diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..a291161e --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.DS_Store + +# Node.js package manager +/node_modules +/npm-debug.log diff --git a/node_modules/.bin/karma b/node_modules/.bin/karma deleted file mode 100755 index 5c55decf..00000000 --- a/node_modules/.bin/karma +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); - -// Try to find a local install -var dir = path.resolve(process.cwd(), 'node_modules', 'karma', 'lib'); - -// Check if the local install exists else we use the install we are in -if (!fs.existsSync(dir)) { - dir = path.join('..', 'lib'); -} - -var cli = require(path.join(dir, 'cli')); -var config = cli.process(); - -switch (config.cmd) { - case 'start': - require(path.join(dir, 'server')).start(config); - break; - case 'run': - require(path.join(dir, 'runner')).run(config); - break; - case 'init': - require(path.join(dir, 'init')).init(config); - break; - case 'completion': - require(path.join(dir, 'completion')).completion(config); - break; -} diff --git a/node_modules/.bin/r.js b/node_modules/.bin/r.js deleted file mode 100755 index 55028dad..00000000 --- a/node_modules/.bin/r.js +++ /dev/null @@ -1,26059 +0,0 @@ -#!/usr/bin/env node -/** - * @license r.js 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/* - * This is a bootstrap script to allow running RequireJS in the command line - * in either a Java/Rhino or Node environment. It is modified by the top-level - * dist.js file to inject other files to completely enable this file. It is - * the shell of the r.js file. - */ - -/*jslint evil: true, nomen: true, sloppy: true */ -/*global readFile: true, process: false, Packages: false, print: false, -console: false, java: false, module: false, requirejsVars, navigator, -document, importScripts, self, location, Components, FileUtils */ - -var requirejs, require, define, xpcUtil; -(function (console, args, readFileFunc) { - var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire, - nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci, - version = '2.1.9', - jsSuffixRegExp = /\.js$/, - commandOption = '', - useLibLoaded = {}, - //Used by jslib/rhino/args.js - rhinoArgs = args, - //Used by jslib/xpconnect/args.js - xpconnectArgs = args, - readFile = typeof readFileFunc !== 'undefined' ? readFileFunc : null; - - function showHelp() { - console.log('See https://github.com/jrburke/r.js for usage.'); - } - - if ((typeof navigator !== 'undefined' && typeof document !== 'undefined') || - (typeof importScripts !== 'undefined' && typeof self !== 'undefined')) { - env = 'browser'; - - readFile = function (path) { - return fs.readFileSync(path, 'utf8'); - }; - - exec = function (string) { - return eval(string); - }; - - exists = function () { - console.log('x.js exists not applicable in browser env'); - return false; - }; - - } else if (typeof Packages !== 'undefined') { - env = 'rhino'; - - fileName = args[0]; - - if (fileName && fileName.indexOf('-') === 0) { - commandOption = fileName.substring(1); - fileName = args[1]; - } - - //Set up execution context. - rhinoContext = Packages.org.mozilla.javascript.ContextFactory.getGlobal().enterContext(); - - exec = function (string, name) { - return rhinoContext.evaluateString(this, string, name, 0, null); - }; - - exists = function (fileName) { - return (new java.io.File(fileName)).exists(); - }; - - //Define a console.log for easier logging. Don't - //get fancy though. - if (typeof console === 'undefined') { - console = { - log: function () { - print.apply(undefined, arguments); - } - }; - } - } else if (typeof process !== 'undefined' && process.versions && !!process.versions.node) { - env = 'node'; - - //Get the fs module via Node's require before it - //gets replaced. Used in require/node.js - fs = require('fs'); - vm = require('vm'); - path = require('path'); - //In Node 0.7+ existsSync is on fs. - existsForNode = fs.existsSync || path.existsSync; - - nodeRequire = require; - nodeDefine = define; - reqMain = require.main; - - //Temporarily hide require and define to allow require.js to define - //them. - require = undefined; - define = undefined; - - readFile = function (path) { - return fs.readFileSync(path, 'utf8'); - }; - - exec = function (string, name) { - return vm.runInThisContext(this.requirejsVars.require.makeNodeWrapper(string), - name ? fs.realpathSync(name) : ''); - }; - - exists = function (fileName) { - return existsForNode(fileName); - }; - - - fileName = process.argv[2]; - - if (fileName && fileName.indexOf('-') === 0) { - commandOption = fileName.substring(1); - fileName = process.argv[3]; - } - } else if (typeof Components !== 'undefined' && Components.classes && Components.interfaces) { - env = 'xpconnect'; - - Components.utils['import']('resource://gre/modules/FileUtils.jsm'); - Cc = Components.classes; - Ci = Components.interfaces; - - fileName = args[0]; - - if (fileName && fileName.indexOf('-') === 0) { - commandOption = fileName.substring(1); - fileName = args[1]; - } - - xpcUtil = { - isWindows: ('@mozilla.org/windows-registry-key;1' in Cc), - cwd: function () { - return FileUtils.getFile("CurWorkD", []).path; - }, - - //Remove . and .. from paths, normalize on front slashes - normalize: function (path) { - //There has to be an easier way to do this. - var i, part, ary, - firstChar = path.charAt(0); - - if (firstChar !== '/' && - firstChar !== '\\' && - path.indexOf(':') === -1) { - //A relative path. Use the current working directory. - path = xpcUtil.cwd() + '/' + path; - } - - ary = path.replace(/\\/g, '/').split('/'); - - for (i = 0; i < ary.length; i += 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - ary.splice(i - 1, 2); - i -= 2; - } - } - return ary.join('/'); - }, - - xpfile: function (path) { - var fullPath; - try { - fullPath = xpcUtil.normalize(path); - if (xpcUtil.isWindows) { - fullPath = fullPath.replace(/\//g, '\\'); - } - return new FileUtils.File(fullPath); - } catch (e) { - throw new Error((fullPath || path) + ' failed: ' + e); - } - }, - - readFile: function (/*String*/path, /*String?*/encoding) { - //A file read function that can deal with BOMs - encoding = encoding || "utf-8"; - - var inStream, convertStream, - readData = {}, - fileObj = xpcUtil.xpfile(path); - - //XPCOM, you so crazy - try { - inStream = Cc['@mozilla.org/network/file-input-stream;1'] - .createInstance(Ci.nsIFileInputStream); - inStream.init(fileObj, 1, 0, false); - - convertStream = Cc['@mozilla.org/intl/converter-input-stream;1'] - .createInstance(Ci.nsIConverterInputStream); - convertStream.init(inStream, encoding, inStream.available(), - Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER); - - convertStream.readString(inStream.available(), readData); - return readData.value; - } catch (e) { - throw new Error((fileObj && fileObj.path || '') + ': ' + e); - } finally { - if (convertStream) { - convertStream.close(); - } - if (inStream) { - inStream.close(); - } - } - } - }; - - readFile = xpcUtil.readFile; - - exec = function (string) { - return eval(string); - }; - - exists = function (fileName) { - return xpcUtil.xpfile(fileName).exists(); - }; - - //Define a console.log for easier logging. Don't - //get fancy though. - if (typeof console === 'undefined') { - console = { - log: function () { - print.apply(undefined, arguments); - } - }; - } - } - - /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -//Not using strict: uneven strict support in browsers, #392, and causes -//problems with requirejs.exec()/transpiler plugins that may not be strict. -/*jslint regexp: true, nomen: true, sloppy: true */ -/*global window, navigator, document, importScripts, setTimeout, opera */ - - -(function (global) { - var req, s, head, baseElement, dataMain, src, - interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.9', - commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, - cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, - jsSuffixRegExp = /\.js$/, - currDirRegExp = /^\.\//, - op = Object.prototype, - ostring = op.toString, - hasOwn = op.hasOwnProperty, - ap = Array.prototype, - apsp = ap.splice, - isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), - isWebWorker = !isBrowser && typeof importScripts !== 'undefined', - //PS3 indicates loaded and complete, but need to wait for complete - //specifically. Sequence is 'loading', 'loaded', execution, - // then 'complete'. The UA check is unfortunate, but not sure how - //to feature test w/o causing perf issues. - readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? - /^complete$/ : /^(complete|loaded)$/, - defContextName = '_', - //Oh the tragedy, detecting opera. See the usage of isOpera for reason. - isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', - contexts = {}, - cfg = {}, - globalDefQueue = [], - useInteractive = false; - - function isFunction(it) { - return ostring.call(it) === '[object Function]'; - } - - function isArray(it) { - return ostring.call(it) === '[object Array]'; - } - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } - } - } - } - - /** - * Helper function for iterating over an array backwards. If the func - * returns a true value, it will break out of the loop. - */ - function eachReverse(ary, func) { - if (ary) { - var i; - for (i = ary.length - 1; i > -1; i -= 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } - } - } - } - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - function getOwn(obj, prop) { - return hasProp(obj, prop) && obj[prop]; - } - - /** - * Cycles over properties in an object and calls a function for each - * property value. If the function returns a truthy value, then the - * iteration is stopped. - */ - function eachProp(obj, func) { - var prop; - for (prop in obj) { - if (hasProp(obj, prop)) { - if (func(obj[prop], prop)) { - break; - } - } - } - } - - /** - * Simple function to mix in properties from source into target, - * but only if target does not already have a property of the same name. - */ - function mixin(target, source, force, deepStringMixin) { - if (source) { - eachProp(source, function (value, prop) { - if (force || !hasProp(target, prop)) { - if (deepStringMixin && typeof value !== 'string') { - if (!target[prop]) { - target[prop] = {}; - } - mixin(target[prop], value, force, deepStringMixin); - } else { - target[prop] = value; - } - } - }); - } - return target; - } - - //Similar to Function.prototype.bind, but the 'this' object is specified - //first, since it is easier to read/figure out what 'this' will be. - function bind(obj, fn) { - return function () { - return fn.apply(obj, arguments); - }; - } - - function scripts() { - return document.getElementsByTagName('script'); - } - - function defaultOnError(err) { - throw err; - } - - //Allow getting a global that expressed in - //dot notation, like 'a.b.c'. - function getGlobal(value) { - if (!value) { - return value; - } - var g = global; - each(value.split('.'), function (part) { - g = g[part]; - }); - return g; - } - - /** - * Constructs an error with a pointer to an URL with more information. - * @param {String} id the error ID that maps to an ID on a web page. - * @param {String} message human readable error. - * @param {Error} [err] the original error, if there is one. - * - * @returns {Error} - */ - function makeError(id, msg, err, requireModules) { - var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); - e.requireType = id; - e.requireModules = requireModules; - if (err) { - e.originalError = err; - } - return e; - } - - if (typeof define !== 'undefined') { - //If a define is already in play via another AMD loader, - //do not overwrite. - return; - } - - if (typeof requirejs !== 'undefined') { - if (isFunction(requirejs)) { - //Do not overwrite and existing requirejs instance. - return; - } - cfg = requirejs; - requirejs = undefined; - } - - //Allow for a require config object - if (typeof require !== 'undefined' && !isFunction(require)) { - //assume it is a config object. - cfg = require; - require = undefined; - } - - function newContext(contextName) { - var inCheckLoaded, Module, context, handlers, - checkLoadedTimeoutId, - config = { - //Defaults. Do not set a default for map - //config to speed up normalize(), which - //will run faster if there is no default. - waitSeconds: 7, - baseUrl: './', - paths: {}, - pkgs: {}, - shim: {}, - config: {} - }, - registry = {}, - //registry of just enabled modules, to speed - //cycle breaking code when lots of modules - //are registered, but not activated. - enabledRegistry = {}, - undefEvents = {}, - defQueue = [], - defined = {}, - urlFetched = {}, - requireCounter = 1, - unnormalizedCounter = 1; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i += 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - /** - * Given a relative module name, like ./something, normalize it to - * a real name that can be mapped to a path. - * @param {String} name the relative name - * @param {String} baseName a real name that the name arg is relative - * to. - * @param {Boolean} applyMap apply the map config to the value. Should - * only be done if this normalization is for a dependency ID. - * @returns {String} normalized name - */ - function normalize(name, baseName, applyMap) { - var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment, - foundMap, foundI, foundStarMap, starI, - baseParts = baseName && baseName.split('/'), - normalizedBaseParts = baseParts, - map = config.map, - starMap = map && map['*']; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - if (getOwn(config.pkgs, baseName)) { - //If the baseName is a package name, then just treat it as one - //name to concat the name with. - normalizedBaseParts = baseParts = [baseName]; - } else { - //Convert baseName to array, and lop off the last part, - //so that . matches that 'directory' and not name of the baseName's - //module. For instance, baseName of 'one/two/three', maps to - //'one/two/three.js', but we want the directory, 'one/two' for - //this normalization. - normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); - } - - name = normalizedBaseParts.concat(name.split('/')); - trimDots(name); - - //Some use of packages may use a . path to reference the - //'main' module name, so normalize for that. - pkgConfig = getOwn(config.pkgs, (pkgName = name[0])); - name = name.join('/'); - if (pkgConfig && name === pkgName + '/' + pkgConfig.main) { - name = pkgName; - } - } else if (name.indexOf('./') === 0) { - // No baseName, so this is ID is resolved relative - // to baseUrl, pull off the leading dot. - name = name.substring(2); - } - } - - //Apply map config if available. - if (applyMap && map && (baseParts || starMap)) { - nameParts = name.split('/'); - - for (i = nameParts.length; i > 0; i -= 1) { - nameSegment = nameParts.slice(0, i).join('/'); - - if (baseParts) { - //Find the longest baseName segment match in the config. - //So, do joins on the biggest to smallest lengths of baseParts. - for (j = baseParts.length; j > 0; j -= 1) { - mapValue = getOwn(map, baseParts.slice(0, j).join('/')); - - //baseName segment has config, find if it has one for - //this name. - if (mapValue) { - mapValue = getOwn(mapValue, nameSegment); - if (mapValue) { - //Match, update name to the new value. - foundMap = mapValue; - foundI = i; - break; - } - } - } - } - - if (foundMap) { - break; - } - - //Check for a star map match, but just hold on to it, - //if there is a shorter segment match later in a matching - //config, then favor over this star map. - if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { - foundStarMap = getOwn(starMap, nameSegment); - starI = i; - } - } - - if (!foundMap && foundStarMap) { - foundMap = foundStarMap; - foundI = starI; - } - - if (foundMap) { - nameParts.splice(0, foundI, foundMap); - name = nameParts.join('/'); - } - } - - return name; - } - - function removeScript(name) { - if (isBrowser) { - each(scripts(), function (scriptNode) { - if (scriptNode.getAttribute('data-requiremodule') === name && - scriptNode.getAttribute('data-requirecontext') === context.contextName) { - scriptNode.parentNode.removeChild(scriptNode); - return true; - } - }); - } - } - - function hasPathFallback(id) { - var pathConfig = getOwn(config.paths, id); - if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { - //Pop off the first array value, since it failed, and - //retry - pathConfig.shift(); - context.require.undef(id); - context.require([id]); - return true; - } - } - - //Turns a plugin!resource to [plugin, resource] - //with the plugin being undefined if the name - //did not have a plugin prefix. - function splitPrefix(name) { - var prefix, - index = name ? name.indexOf('!') : -1; - if (index > -1) { - prefix = name.substring(0, index); - name = name.substring(index + 1, name.length); - } - return [prefix, name]; - } - - /** - * Creates a module mapping that includes plugin prefix, module - * name, and path. If parentModuleMap is provided it will - * also normalize the name via require.normalize() - * - * @param {String} name the module name - * @param {String} [parentModuleMap] parent module map - * for the module name, used to resolve relative names. - * @param {Boolean} isNormalized: is the ID already normalized. - * This is true if this call is done for a define() module ID. - * @param {Boolean} applyMap: apply the map config to the ID. - * Should only be true if this map is for a dependency. - * - * @returns {Object} - */ - function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { - var url, pluginModule, suffix, nameParts, - prefix = null, - parentName = parentModuleMap ? parentModuleMap.name : null, - originalName = name, - isDefine = true, - normalizedName = ''; - - //If no name, then it means it is a require call, generate an - //internal name. - if (!name) { - isDefine = false; - name = '_@r' + (requireCounter += 1); - } - - nameParts = splitPrefix(name); - prefix = nameParts[0]; - name = nameParts[1]; - - if (prefix) { - prefix = normalize(prefix, parentName, applyMap); - pluginModule = getOwn(defined, prefix); - } - - //Account for relative paths if there is a base name. - if (name) { - if (prefix) { - if (pluginModule && pluginModule.normalize) { - //Plugin is loaded, use its normalize method. - normalizedName = pluginModule.normalize(name, function (name) { - return normalize(name, parentName, applyMap); - }); - } else { - normalizedName = normalize(name, parentName, applyMap); - } - } else { - //A regular module. - normalizedName = normalize(name, parentName, applyMap); - - //Normalized name may be a plugin ID due to map config - //application in normalize. The map config values must - //already be normalized, so do not need to redo that part. - nameParts = splitPrefix(normalizedName); - prefix = nameParts[0]; - normalizedName = nameParts[1]; - isNormalized = true; - - url = context.nameToUrl(normalizedName); - } - } - - //If the id is a plugin id that cannot be determined if it needs - //normalization, stamp it with a unique ID so two matching relative - //ids that may conflict can be separate. - suffix = prefix && !pluginModule && !isNormalized ? - '_unnormalized' + (unnormalizedCounter += 1) : - ''; - - return { - prefix: prefix, - name: normalizedName, - parentMap: parentModuleMap, - unnormalized: !!suffix, - url: url, - originalName: originalName, - isDefine: isDefine, - id: (prefix ? - prefix + '!' + normalizedName : - normalizedName) + suffix - }; - } - - function getModule(depMap) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (!mod) { - mod = registry[id] = new context.Module(depMap); - } - - return mod; - } - - function on(depMap, name, fn) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (hasProp(defined, id) && - (!mod || mod.defineEmitComplete)) { - if (name === 'defined') { - fn(defined[id]); - } - } else { - mod = getModule(depMap); - if (mod.error && name === 'error') { - fn(mod.error); - } else { - mod.on(name, fn); - } - } - } - - function onError(err, errback) { - var ids = err.requireModules, - notified = false; - - if (errback) { - errback(err); - } else { - each(ids, function (id) { - var mod = getOwn(registry, id); - if (mod) { - //Set error on module, so it skips timeout checks. - mod.error = err; - if (mod.events.error) { - notified = true; - mod.emit('error', err); - } - } - }); - - if (!notified) { - req.onError(err); - } - } - } - - /** - * Internal method to transfer globalQueue items to this context's - * defQueue. - */ - function takeGlobalQueue() { - //Push all the globalDefQueue items into the context's defQueue - if (globalDefQueue.length) { - //Array splice in the values since the context code has a - //local var ref to defQueue, so cannot just reassign the one - //on context. - apsp.apply(defQueue, - [defQueue.length - 1, 0].concat(globalDefQueue)); - globalDefQueue = []; - } - } - - handlers = { - 'require': function (mod) { - if (mod.require) { - return mod.require; - } else { - return (mod.require = context.makeRequire(mod.map)); - } - }, - 'exports': function (mod) { - mod.usingExports = true; - if (mod.map.isDefine) { - if (mod.exports) { - return mod.exports; - } else { - return (mod.exports = defined[mod.map.id] = {}); - } - } - }, - 'module': function (mod) { - if (mod.module) { - return mod.module; - } else { - return (mod.module = { - id: mod.map.id, - uri: mod.map.url, - config: function () { - var c, - pkg = getOwn(config.pkgs, mod.map.id); - // For packages, only support config targeted - // at the main module. - c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) : - getOwn(config.config, mod.map.id); - return c || {}; - }, - exports: defined[mod.map.id] - }); - } - } - }; - - function cleanRegistry(id) { - //Clean up machinery used for waiting modules. - delete registry[id]; - delete enabledRegistry[id]; - } - - function breakCycle(mod, traced, processed) { - var id = mod.map.id; - - if (mod.error) { - mod.emit('error', mod.error); - } else { - traced[id] = true; - each(mod.depMaps, function (depMap, i) { - var depId = depMap.id, - dep = getOwn(registry, depId); - - //Only force things that have not completed - //being defined, so still in the registry, - //and only if it has not been matched up - //in the module already. - if (dep && !mod.depMatched[i] && !processed[depId]) { - if (getOwn(traced, depId)) { - mod.defineDep(i, defined[depId]); - mod.check(); //pass false? - } else { - breakCycle(dep, traced, processed); - } - } - }); - processed[id] = true; - } - } - - function checkLoaded() { - var map, modId, err, usingPathFallback, - waitInterval = config.waitSeconds * 1000, - //It is possible to disable the wait interval by using waitSeconds of 0. - expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), - noLoads = [], - reqCalls = [], - stillLoading = false, - needCycleCheck = true; - - //Do not bother if this call was a result of a cycle break. - if (inCheckLoaded) { - return; - } - - inCheckLoaded = true; - - //Figure out the state of all the modules. - eachProp(enabledRegistry, function (mod) { - map = mod.map; - modId = map.id; - - //Skip things that are not enabled or in error state. - if (!mod.enabled) { - return; - } - - if (!map.isDefine) { - reqCalls.push(mod); - } - - if (!mod.error) { - //If the module should be executed, and it has not - //been inited and time is up, remember it. - if (!mod.inited && expired) { - if (hasPathFallback(modId)) { - usingPathFallback = true; - stillLoading = true; - } else { - noLoads.push(modId); - removeScript(modId); - } - } else if (!mod.inited && mod.fetched && map.isDefine) { - stillLoading = true; - if (!map.prefix) { - //No reason to keep looking for unfinished - //loading. If the only stillLoading is a - //plugin resource though, keep going, - //because it may be that a plugin resource - //is waiting on a non-plugin cycle. - return (needCycleCheck = false); - } - } - } - }); - - if (expired && noLoads.length) { - //If wait time expired, throw error of unloaded modules. - err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); - err.contextName = context.contextName; - return onError(err); - } - - //Not expired, check for a cycle. - if (needCycleCheck) { - each(reqCalls, function (mod) { - breakCycle(mod, {}, {}); - }); - } - - //If still waiting on loads, and the waiting load is something - //other than a plugin resource, or there are still outstanding - //scripts, then just try back later. - if ((!expired || usingPathFallback) && stillLoading) { - //Something is still waiting to load. Wait for it, but only - //if a timeout is not already in effect. - if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { - checkLoadedTimeoutId = setTimeout(function () { - checkLoadedTimeoutId = 0; - checkLoaded(); - }, 50); - } - } - - inCheckLoaded = false; - } - - Module = function (map) { - this.events = getOwn(undefEvents, map.id) || {}; - this.map = map; - this.shim = getOwn(config.shim, map.id); - this.depExports = []; - this.depMaps = []; - this.depMatched = []; - this.pluginMaps = {}; - this.depCount = 0; - - /* this.exports this.factory - this.depMaps = [], - this.enabled, this.fetched - */ - }; - - Module.prototype = { - init: function (depMaps, factory, errback, options) { - options = options || {}; - - //Do not do more inits if already done. Can happen if there - //are multiple define calls for the same module. That is not - //a normal, common case, but it is also not unexpected. - if (this.inited) { - return; - } - - this.factory = factory; - - if (errback) { - //Register for errors on this module. - this.on('error', errback); - } else if (this.events.error) { - //If no errback already, but there are error listeners - //on this module, set up an errback to pass to the deps. - errback = bind(this, function (err) { - this.emit('error', err); - }); - } - - //Do a copy of the dependency array, so that - //source inputs are not modified. For example - //"shim" deps are passed in here directly, and - //doing a direct modification of the depMaps array - //would affect that config. - this.depMaps = depMaps && depMaps.slice(0); - - this.errback = errback; - - //Indicate this module has be initialized - this.inited = true; - - this.ignore = options.ignore; - - //Could have option to init this module in enabled mode, - //or could have been previously marked as enabled. However, - //the dependencies are not known until init is called. So - //if enabled previously, now trigger dependencies as enabled. - if (options.enabled || this.enabled) { - //Enable this module and dependencies. - //Will call this.check() - this.enable(); - } else { - this.check(); - } - }, - - defineDep: function (i, depExports) { - //Because of cycles, defined callback for a given - //export can be called more than once. - if (!this.depMatched[i]) { - this.depMatched[i] = true; - this.depCount -= 1; - this.depExports[i] = depExports; - } - }, - - fetch: function () { - if (this.fetched) { - return; - } - this.fetched = true; - - context.startTime = (new Date()).getTime(); - - var map = this.map; - - //If the manager is for a plugin managed resource, - //ask the plugin to load it now. - if (this.shim) { - context.makeRequire(this.map, { - enableBuildCallback: true - })(this.shim.deps || [], bind(this, function () { - return map.prefix ? this.callPlugin() : this.load(); - })); - } else { - //Regular dependency. - return map.prefix ? this.callPlugin() : this.load(); - } - }, - - load: function () { - var url = this.map.url; - - //Regular dependency. - if (!urlFetched[url]) { - urlFetched[url] = true; - context.load(this.map.id, url); - } - }, - - /** - * Checks if the module is ready to define itself, and if so, - * define it. - */ - check: function () { - if (!this.enabled || this.enabling) { - return; - } - - var err, cjsModule, - id = this.map.id, - depExports = this.depExports, - exports = this.exports, - factory = this.factory; - - if (!this.inited) { - this.fetch(); - } else if (this.error) { - this.emit('error', this.error); - } else if (!this.defining) { - //The factory could trigger another require call - //that would result in checking this module to - //define itself again. If already in the process - //of doing that, skip this work. - this.defining = true; - - if (this.depCount < 1 && !this.defined) { - if (isFunction(factory)) { - //If there is an error listener, favor passing - //to that instead of throwing an error. However, - //only do it for define()'d modules. require - //errbacks should not be called for failures in - //their callbacks (#699). However if a global - //onError is set, use that. - if ((this.events.error && this.map.isDefine) || - req.onError !== defaultOnError) { - try { - exports = context.execCb(id, factory, depExports, exports); - } catch (e) { - err = e; - } - } else { - exports = context.execCb(id, factory, depExports, exports); - } - - if (this.map.isDefine) { - //If setting exports via 'module' is in play, - //favor that over return value and exports. After that, - //favor a non-undefined return value over exports use. - cjsModule = this.module; - if (cjsModule && - cjsModule.exports !== undefined && - //Make sure it is not already the exports value - cjsModule.exports !== this.exports) { - exports = cjsModule.exports; - } else if (exports === undefined && this.usingExports) { - //exports already set the defined value. - exports = this.exports; - } - } - - if (err) { - err.requireMap = this.map; - err.requireModules = this.map.isDefine ? [this.map.id] : null; - err.requireType = this.map.isDefine ? 'define' : 'require'; - return onError((this.error = err)); - } - - } else { - //Just a literal value - exports = factory; - } - - this.exports = exports; - - if (this.map.isDefine && !this.ignore) { - defined[id] = exports; - - if (req.onResourceLoad) { - req.onResourceLoad(context, this.map, this.depMaps); - } - } - - //Clean up - cleanRegistry(id); - - this.defined = true; - } - - //Finished the define stage. Allow calling check again - //to allow define notifications below in the case of a - //cycle. - this.defining = false; - - if (this.defined && !this.defineEmitted) { - this.defineEmitted = true; - this.emit('defined', this.exports); - this.defineEmitComplete = true; - } - - } - }, - - callPlugin: function () { - var map = this.map, - id = map.id, - //Map already normalized the prefix. - pluginMap = makeModuleMap(map.prefix); - - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(pluginMap); - - on(pluginMap, 'defined', bind(this, function (plugin) { - var load, normalizedMap, normalizedMod, - name = this.map.name, - parentName = this.map.parentMap ? this.map.parentMap.name : null, - localRequire = context.makeRequire(map.parentMap, { - enableBuildCallback: true - }); - - //If current map is not normalized, wait for that - //normalized name to load instead of continuing. - if (this.map.unnormalized) { - //Normalize the ID if the plugin allows it. - if (plugin.normalize) { - name = plugin.normalize(name, function (name) { - return normalize(name, parentName, true); - }) || ''; - } - - //prefix and name should already be normalized, no need - //for applying map config again either. - normalizedMap = makeModuleMap(map.prefix + '!' + name, - this.map.parentMap); - on(normalizedMap, - 'defined', bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true, - ignore: true - }); - })); - - normalizedMod = getOwn(registry, normalizedMap.id); - if (normalizedMod) { - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(normalizedMap); - - if (this.events.error) { - normalizedMod.on('error', bind(this, function (err) { - this.emit('error', err); - })); - } - normalizedMod.enable(); - } - - return; - } - - load = bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true - }); - }); - - load.error = bind(this, function (err) { - this.inited = true; - this.error = err; - err.requireModules = [id]; - - //Remove temp unnormalized modules for this module, - //since they will never be resolved otherwise now. - eachProp(registry, function (mod) { - if (mod.map.id.indexOf(id + '_unnormalized') === 0) { - cleanRegistry(mod.map.id); - } - }); - - onError(err); - }); - - //Allow plugins to load other code without having to know the - //context or how to 'complete' the load. - load.fromText = bind(this, function (text, textAlt) { - /*jslint evil: true */ - var moduleName = map.name, - moduleMap = makeModuleMap(moduleName), - hasInteractive = useInteractive; - - //As of 2.1.0, support just passing the text, to reinforce - //fromText only being called once per resource. Still - //support old style of passing moduleName but discard - //that moduleName in favor of the internal ref. - if (textAlt) { - text = textAlt; - } - - //Turn off interactive script matching for IE for any define - //calls in the text, then turn it back on at the end. - if (hasInteractive) { - useInteractive = false; - } - - //Prime the system by creating a module instance for - //it. - getModule(moduleMap); - - //Transfer any config to this other module. - if (hasProp(config.config, id)) { - config.config[moduleName] = config.config[id]; - } - - try { - req.exec(text); - } catch (e) { - return onError(makeError('fromtexteval', - 'fromText eval for ' + id + - ' failed: ' + e, - e, - [id])); - } - - if (hasInteractive) { - useInteractive = true; - } - - //Mark this as a dependency for the plugin - //resource - this.depMaps.push(moduleMap); - - //Support anonymous modules. - context.completeLoad(moduleName); - - //Bind the value of that module to the value for this - //resource ID. - localRequire([moduleName], load); - }); - - //Use parentName here since the plugin's name is not reliable, - //could be some weird string with no path that actually wants to - //reference the parentName's path. - plugin.load(map.name, localRequire, load, config); - })); - - context.enable(pluginMap, this); - this.pluginMaps[pluginMap.id] = pluginMap; - }, - - enable: function () { - enabledRegistry[this.map.id] = this; - this.enabled = true; - - //Set flag mentioning that the module is enabling, - //so that immediate calls to the defined callbacks - //for dependencies do not trigger inadvertent load - //with the depCount still being zero. - this.enabling = true; - - //Enable each dependency - each(this.depMaps, bind(this, function (depMap, i) { - var id, mod, handler; - - if (typeof depMap === 'string') { - //Dependency needs to be converted to a depMap - //and wired up to this module. - depMap = makeModuleMap(depMap, - (this.map.isDefine ? this.map : this.map.parentMap), - false, - !this.skipMap); - this.depMaps[i] = depMap; - - handler = getOwn(handlers, depMap.id); - - if (handler) { - this.depExports[i] = handler(this); - return; - } - - this.depCount += 1; - - on(depMap, 'defined', bind(this, function (depExports) { - this.defineDep(i, depExports); - this.check(); - })); - - if (this.errback) { - on(depMap, 'error', bind(this, this.errback)); - } - } - - id = depMap.id; - mod = registry[id]; - - //Skip special modules like 'require', 'exports', 'module' - //Also, don't call enable if it is already enabled, - //important in circular dependency cases. - if (!hasProp(handlers, id) && mod && !mod.enabled) { - context.enable(depMap, this); - } - })); - - //Enable each plugin that is used in - //a dependency - eachProp(this.pluginMaps, bind(this, function (pluginMap) { - var mod = getOwn(registry, pluginMap.id); - if (mod && !mod.enabled) { - context.enable(pluginMap, this); - } - })); - - this.enabling = false; - - this.check(); - }, - - on: function (name, cb) { - var cbs = this.events[name]; - if (!cbs) { - cbs = this.events[name] = []; - } - cbs.push(cb); - }, - - emit: function (name, evt) { - each(this.events[name], function (cb) { - cb(evt); - }); - if (name === 'error') { - //Now that the error handler was triggered, remove - //the listeners, since this broken Module instance - //can stay around for a while in the registry. - delete this.events[name]; - } - } - }; - - function callGetModule(args) { - //Skip modules already defined. - if (!hasProp(defined, args[0])) { - getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); - } - } - - function removeListener(node, func, name, ieName) { - //Favor detachEvent because of IE9 - //issue, see attachEvent/addEventListener comment elsewhere - //in this file. - if (node.detachEvent && !isOpera) { - //Probably IE. If not it will throw an error, which will be - //useful to know. - if (ieName) { - node.detachEvent(ieName, func); - } - } else { - node.removeEventListener(name, func, false); - } - } - - /** - * Given an event from a script node, get the requirejs info from it, - * and then removes the event listeners on the node. - * @param {Event} evt - * @returns {Object} - */ - function getScriptData(evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - var node = evt.currentTarget || evt.srcElement; - - //Remove the listeners once here. - removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); - removeListener(node, context.onScriptError, 'error'); - - return { - node: node, - id: node && node.getAttribute('data-requiremodule') - }; - } - - function intakeDefines() { - var args; - - //Any defined modules in the global queue, intake them now. - takeGlobalQueue(); - - //Make sure any remaining defQueue items get properly processed. - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); - } else { - //args are id, deps, factory. Should be normalized by the - //define() function. - callGetModule(args); - } - } - } - - context = { - config: config, - contextName: contextName, - registry: registry, - defined: defined, - urlFetched: urlFetched, - defQueue: defQueue, - Module: Module, - makeModuleMap: makeModuleMap, - nextTick: req.nextTick, - onError: onError, - - /** - * Set a configuration for the context. - * @param {Object} cfg config object to integrate. - */ - configure: function (cfg) { - //Make sure the baseUrl ends in a slash. - if (cfg.baseUrl) { - if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { - cfg.baseUrl += '/'; - } - } - - //Save off the paths and packages since they require special processing, - //they are additive. - var pkgs = config.pkgs, - shim = config.shim, - objs = { - paths: true, - config: true, - map: true - }; - - eachProp(cfg, function (value, prop) { - if (objs[prop]) { - if (prop === 'map') { - if (!config.map) { - config.map = {}; - } - mixin(config[prop], value, true, true); - } else { - mixin(config[prop], value, true); - } - } else { - config[prop] = value; - } - }); - - //Merge shim - if (cfg.shim) { - eachProp(cfg.shim, function (value, id) { - //Normalize the structure - if (isArray(value)) { - value = { - deps: value - }; - } - if ((value.exports || value.init) && !value.exportsFn) { - value.exportsFn = context.makeShimExports(value); - } - shim[id] = value; - }); - config.shim = shim; - } - - //Adjust packages if necessary. - if (cfg.packages) { - each(cfg.packages, function (pkgObj) { - var location; - - pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; - location = pkgObj.location; - - //Create a brand new object on pkgs, since currentPackages can - //be passed in again, and config.pkgs is the internal transformed - //state for all package configs. - pkgs[pkgObj.name] = { - name: pkgObj.name, - location: location || pkgObj.name, - //Remove leading dot in main, so main paths are normalized, - //and remove any trailing .js, since different package - //envs have different conventions: some use a module name, - //some use a file name. - main: (pkgObj.main || 'main') - .replace(currDirRegExp, '') - .replace(jsSuffixRegExp, '') - }; - }); - - //Done with modifications, assing packages back to context config - config.pkgs = pkgs; - } - - //If there are any "waiting to execute" modules in the registry, - //update the maps for them, since their info, like URLs to load, - //may have changed. - eachProp(registry, function (mod, id) { - //If module already has init called, since it is too - //late to modify them, and ignore unnormalized ones - //since they are transient. - if (!mod.inited && !mod.map.unnormalized) { - mod.map = makeModuleMap(id); - } - }); - - //If a deps array or a config callback is specified, then call - //require with those args. This is useful when require is defined as a - //config object before require.js is loaded. - if (cfg.deps || cfg.callback) { - context.require(cfg.deps || [], cfg.callback); - } - }, - - makeShimExports: function (value) { - function fn() { - var ret; - if (value.init) { - ret = value.init.apply(global, arguments); - } - return ret || (value.exports && getGlobal(value.exports)); - } - return fn; - }, - - makeRequire: function (relMap, options) { - options = options || {}; - - function localRequire(deps, callback, errback) { - var id, map, requireMod; - - if (options.enableBuildCallback && callback && isFunction(callback)) { - callback.__requireJsBuild = true; - } - - if (typeof deps === 'string') { - if (isFunction(callback)) { - //Invalid call - return onError(makeError('requireargs', 'Invalid require call'), errback); - } - - //If require|exports|module are requested, get the - //value for them from the special handlers. Caveat: - //this only works while module is being defined. - if (relMap && hasProp(handlers, deps)) { - return handlers[deps](registry[relMap.id]); - } - - //Synchronous access to one module. If require.get is - //available (as in the Node adapter), prefer that. - if (req.get) { - return req.get(context, deps, relMap, localRequire); - } - - //Normalize module name, if it contains . or .. - map = makeModuleMap(deps, relMap, false, true); - id = map.id; - - if (!hasProp(defined, id)) { - return onError(makeError('notloaded', 'Module name "' + - id + - '" has not been loaded yet for context: ' + - contextName + - (relMap ? '' : '. Use require([])'))); - } - return defined[id]; - } - - //Grab defines waiting in the global queue. - intakeDefines(); - - //Mark all the dependencies as needing to be loaded. - context.nextTick(function () { - //Some defines could have been added since the - //require call, collect them. - intakeDefines(); - - requireMod = getModule(makeModuleMap(null, relMap)); - - //Store if map config should be applied to this require - //call for dependencies. - requireMod.skipMap = options.skipMap; - - requireMod.init(deps, callback, errback, { - enabled: true - }); - - checkLoaded(); - }); - - return localRequire; - } - - mixin(localRequire, { - isBrowser: isBrowser, - - /** - * Converts a module name + .extension into an URL path. - * *Requires* the use of a module name. It does not support using - * plain URLs like nameToUrl. - */ - toUrl: function (moduleNamePlusExt) { - var ext, - index = moduleNamePlusExt.lastIndexOf('.'), - segment = moduleNamePlusExt.split('/')[0], - isRelative = segment === '.' || segment === '..'; - - //Have a file extension alias, and it is not the - //dots from a relative path. - if (index !== -1 && (!isRelative || index > 1)) { - ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); - moduleNamePlusExt = moduleNamePlusExt.substring(0, index); - } - - return context.nameToUrl(normalize(moduleNamePlusExt, - relMap && relMap.id, true), ext, true); - }, - - defined: function (id) { - return hasProp(defined, makeModuleMap(id, relMap, false, true).id); - }, - - specified: function (id) { - id = makeModuleMap(id, relMap, false, true).id; - return hasProp(defined, id) || hasProp(registry, id); - } - }); - - //Only allow undef on top level require calls - if (!relMap) { - localRequire.undef = function (id) { - //Bind any waiting define() calls to this context, - //fix for #408 - takeGlobalQueue(); - - var map = makeModuleMap(id, relMap, true), - mod = getOwn(registry, id); - - removeScript(id); - - delete defined[id]; - delete urlFetched[map.url]; - delete undefEvents[id]; - - if (mod) { - //Hold on to listeners in case the - //module will be attempted to be reloaded - //using a different config. - if (mod.events.defined) { - undefEvents[id] = mod.events; - } - - cleanRegistry(id); - } - }; - } - - return localRequire; - }, - - /** - * Called to enable a module if it is still in the registry - * awaiting enablement. A second arg, parent, the parent module, - * is passed in for context, when this method is overriden by - * the optimizer. Not shown here to keep code compact. - */ - enable: function (depMap) { - var mod = getOwn(registry, depMap.id); - if (mod) { - getModule(depMap).enable(); - } - }, - - /** - * Internal method used by environment adapters to complete a load event. - * A load event could be a script load or just a load pass from a synchronous - * load call. - * @param {String} moduleName the name of the module to potentially complete. - */ - completeLoad: function (moduleName) { - var found, args, mod, - shim = getOwn(config.shim, moduleName) || {}, - shExports = shim.exports; - - takeGlobalQueue(); - - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - args[0] = moduleName; - //If already found an anonymous module and bound it - //to this name, then this is some other anon module - //waiting for its completeLoad to fire. - if (found) { - break; - } - found = true; - } else if (args[0] === moduleName) { - //Found matching define call for this script! - found = true; - } - - callGetModule(args); - } - - //Do this after the cycle of callGetModule in case the result - //of those calls/init calls changes the registry. - mod = getOwn(registry, moduleName); - - if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { - if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { - if (hasPathFallback(moduleName)) { - return; - } else { - return onError(makeError('nodefine', - 'No define call for ' + moduleName, - null, - [moduleName])); - } - } else { - //A script that does not call define(), so just simulate - //the call for it. - callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); - } - } - - checkLoaded(); - }, - - /** - * Converts a module name to a file path. Supports cases where - * moduleName may actually be just an URL. - * Note that it **does not** call normalize on the moduleName, - * it is assumed to have already been normalized. This is an - * internal API, not a public one. Use toUrl for the public API. - */ - nameToUrl: function (moduleName, ext, skipExt) { - var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url, - parentPath; - - //If a colon is in the URL, it indicates a protocol is used and it is just - //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) - //or ends with .js, then assume the user meant to use an url and not a module id. - //The slash is important for protocol-less URLs as well as full paths. - if (req.jsExtRegExp.test(moduleName)) { - //Just a plain path, not module name lookup, so just return it. - //Add extension if it is included. This is a bit wonky, only non-.js things pass - //an extension, this method probably needs to be reworked. - url = moduleName + (ext || ''); - } else { - //A module that needs to be converted to a path. - paths = config.paths; - pkgs = config.pkgs; - - syms = moduleName.split('/'); - //For each module name segment, see if there is a path - //registered for it. Start with most specific name - //and work up from it. - for (i = syms.length; i > 0; i -= 1) { - parentModule = syms.slice(0, i).join('/'); - pkg = getOwn(pkgs, parentModule); - parentPath = getOwn(paths, parentModule); - if (parentPath) { - //If an array, it means there are a few choices, - //Choose the one that is desired - if (isArray(parentPath)) { - parentPath = parentPath[0]; - } - syms.splice(0, i, parentPath); - break; - } else if (pkg) { - //If module name is just the package name, then looking - //for the main module. - if (moduleName === pkg.name) { - pkgPath = pkg.location + '/' + pkg.main; - } else { - pkgPath = pkg.location; - } - syms.splice(0, i, pkgPath); - break; - } - } - - //Join the path parts together, then figure out if baseUrl is needed. - url = syms.join('/'); - url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); - url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; - } - - return config.urlArgs ? url + - ((url.indexOf('?') === -1 ? '?' : '&') + - config.urlArgs) : url; - }, - - //Delegates to req.load. Broken out as a separate function to - //allow overriding in the optimizer. - load: function (id, url) { - req.load(context, id, url); - }, - - /** - * Executes a module callback function. Broken out as a separate function - * solely to allow the build system to sequence the files in the built - * layer in the right sequence. - * - * @private - */ - execCb: function (name, callback, args, exports) { - return callback.apply(exports, args); - }, - - /** - * callback for script loads, used to check status of loading. - * - * @param {Event} evt the event from the browser for the script - * that was loaded. - */ - onScriptLoad: function (evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - if (evt.type === 'load' || - (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { - //Reset interactive script so a script node is not held onto for - //to long. - interactiveScript = null; - - //Pull out the name of the module and the context. - var data = getScriptData(evt); - context.completeLoad(data.id); - } - }, - - /** - * Callback for script errors. - */ - onScriptError: function (evt) { - var data = getScriptData(evt); - if (!hasPathFallback(data.id)) { - return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); - } - } - }; - - context.require = context.makeRequire(); - return context; - } - - /** - * Main entry point. - * - * If the only argument to require is a string, then the module that - * is represented by that string is fetched for the appropriate context. - * - * If the first argument is an array, then it will be treated as an array - * of dependency string names to fetch. An optional function callback can - * be specified to execute when all of those dependencies are available. - * - * Make a local req variable to help Caja compliance (it assumes things - * on a require that are not standardized), and to give a short - * name for minification/local scope use. - */ - req = requirejs = function (deps, callback, errback, optional) { - - //Find the right context, use default - var context, config, - contextName = defContextName; - - // Determine if have config object in the call. - if (!isArray(deps) && typeof deps !== 'string') { - // deps is a config object - config = deps; - if (isArray(callback)) { - // Adjust args if there are dependencies - deps = callback; - callback = errback; - errback = optional; - } else { - deps = []; - } - } - - if (config && config.context) { - contextName = config.context; - } - - context = getOwn(contexts, contextName); - if (!context) { - context = contexts[contextName] = req.s.newContext(contextName); - } - - if (config) { - context.configure(config); - } - - return context.require(deps, callback, errback); - }; - - /** - * Support require.config() to make it easier to cooperate with other - * AMD loaders on globally agreed names. - */ - req.config = function (config) { - return req(config); - }; - - /** - * Execute something after the current tick - * of the event loop. Override for other envs - * that have a better solution than setTimeout. - * @param {Function} fn function to execute later. - */ - req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { - setTimeout(fn, 4); - } : function (fn) { fn(); }; - - /** - * Export require as a global, but only if it does not already exist. - */ - if (!require) { - require = req; - } - - req.version = version; - - //Used to filter out dependencies that are already paths. - req.jsExtRegExp = /^\/|:|\?|\.js$/; - req.isBrowser = isBrowser; - s = req.s = { - contexts: contexts, - newContext: newContext - }; - - //Create default context. - req({}); - - //Exports some context-sensitive methods on global require. - each([ - 'toUrl', - 'undef', - 'defined', - 'specified' - ], function (prop) { - //Reference from contexts instead of early binding to default context, - //so that during builds, the latest instance of the default context - //with its config gets used. - req[prop] = function () { - var ctx = contexts[defContextName]; - return ctx.require[prop].apply(ctx, arguments); - }; - }); - - if (isBrowser) { - head = s.head = document.getElementsByTagName('head')[0]; - //If BASE tag is in play, using appendChild is a problem for IE6. - //When that browser dies, this can be removed. Details in this jQuery bug: - //http://dev.jquery.com/ticket/2709 - baseElement = document.getElementsByTagName('base')[0]; - if (baseElement) { - head = s.head = baseElement.parentNode; - } - } - - /** - * Any errors that require explicitly generates will be passed to this - * function. Intercept/override it if you want custom error handling. - * @param {Error} err the error object. - */ - req.onError = defaultOnError; - - /** - * Creates the node for the load command. Only used in browser envs. - */ - req.createNode = function (config, moduleName, url) { - var node = config.xhtml ? - document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : - document.createElement('script'); - node.type = config.scriptType || 'text/javascript'; - node.charset = 'utf-8'; - node.async = true; - return node; - }; - - /** - * Does the request to load a module for the browser case. - * Make this a separate function to allow other environments - * to override it. - * - * @param {Object} context the require context to find state. - * @param {String} moduleName the name of the module. - * @param {Object} url the URL to the module. - */ - req.load = function (context, moduleName, url) { - var config = (context && context.config) || {}, - node; - if (isBrowser) { - //In the browser so use a script tag - node = req.createNode(config, moduleName, url); - - node.setAttribute('data-requirecontext', context.contextName); - node.setAttribute('data-requiremodule', moduleName); - - //Set up load listener. Test attachEvent first because IE9 has - //a subtle issue in its addEventListener and script onload firings - //that do not match the behavior of all other browsers with - //addEventListener support, which fire the onload event for a - //script right after the script execution. See: - //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution - //UNFORTUNATELY Opera implements attachEvent but does not follow the script - //script execution mode. - if (node.attachEvent && - //Check if node.attachEvent is artificially added by custom script or - //natively supported by browser - //read https://github.com/jrburke/requirejs/issues/187 - //if we can NOT find [native code] then it must NOT natively supported. - //in IE8, node.attachEvent does not have toString() - //Note the test for "[native code" with no closing brace, see: - //https://github.com/jrburke/requirejs/issues/273 - !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && - !isOpera) { - //Probably IE. IE (at least 6-8) do not fire - //script onload right after executing the script, so - //we cannot tie the anonymous define call to a name. - //However, IE reports the script as being in 'interactive' - //readyState at the time of the define call. - useInteractive = true; - - node.attachEvent('onreadystatechange', context.onScriptLoad); - //It would be great to add an error handler here to catch - //404s in IE9+. However, onreadystatechange will fire before - //the error handler, so that does not help. If addEventListener - //is used, then IE will fire error before load, but we cannot - //use that pathway given the connect.microsoft.com issue - //mentioned above about not doing the 'script execute, - //then fire the script load event listener before execute - //next script' that other browsers do. - //Best hope: IE10 fixes the issues, - //and then destroys all installs of IE 6-9. - //node.attachEvent('onerror', context.onScriptError); - } else { - node.addEventListener('load', context.onScriptLoad, false); - node.addEventListener('error', context.onScriptError, false); - } - node.src = url; - - //For some cache cases in IE 6-8, the script executes before the end - //of the appendChild execution, so to tie an anonymous define - //call to the module name (which is stored on the node), hold on - //to a reference to this node, but clear after the DOM insertion. - currentlyAddingScript = node; - if (baseElement) { - head.insertBefore(node, baseElement); - } else { - head.appendChild(node); - } - currentlyAddingScript = null; - - return node; - } else if (isWebWorker) { - try { - //In a web worker, use importScripts. This is not a very - //efficient use of importScripts, importScripts will block until - //its script is downloaded and evaluated. However, if web workers - //are in play, the expectation that a build has been done so that - //only one script needs to be loaded anyway. This may need to be - //reevaluated if other use cases become common. - importScripts(url); - - //Account for anonymous modules - context.completeLoad(moduleName); - } catch (e) { - context.onError(makeError('importscripts', - 'importScripts failed for ' + - moduleName + ' at ' + url, - e, - [moduleName])); - } - } - }; - - function getInteractiveScript() { - if (interactiveScript && interactiveScript.readyState === 'interactive') { - return interactiveScript; - } - - eachReverse(scripts(), function (script) { - if (script.readyState === 'interactive') { - return (interactiveScript = script); - } - }); - return interactiveScript; - } - - //Look for a data-main script attribute, which could also adjust the baseUrl. - if (isBrowser && !cfg.skipDataMain) { - //Figure out baseUrl. Get it from the script tag with require.js in it. - eachReverse(scripts(), function (script) { - //Set the 'head' where we can append children by - //using the script's parent. - if (!head) { - head = script.parentNode; - } - - //Look for a data-main attribute to set main script for the page - //to load. If it is there, the path to data main becomes the - //baseUrl, if it is not already set. - dataMain = script.getAttribute('data-main'); - if (dataMain) { - //Preserve dataMain in case it is a path (i.e. contains '?') - mainScript = dataMain; - - //Set final baseUrl if there is not already an explicit one. - if (!cfg.baseUrl) { - //Pull off the directory of data-main for use as the - //baseUrl. - src = mainScript.split('/'); - mainScript = src.pop(); - subPath = src.length ? src.join('/') + '/' : './'; - - cfg.baseUrl = subPath; - } - - //Strip off any trailing .js since mainScript is now - //like a module name. - mainScript = mainScript.replace(jsSuffixRegExp, ''); - - //If mainScript is still a path, fall back to dataMain - if (req.jsExtRegExp.test(mainScript)) { - mainScript = dataMain; - } - - //Put the data-main script in the files to load. - cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; - - return true; - } - }); - } - - /** - * The function that handles definitions of modules. Differs from - * require() in that a string for the module should be the first argument, - * and the function to execute after dependencies are loaded should - * return a value to define the module corresponding to the first argument's - * name. - */ - define = function (name, deps, callback) { - var node, context; - - //Allow for anonymous modules - if (typeof name !== 'string') { - //Adjust args appropriately - callback = deps; - deps = name; - name = null; - } - - //This module may not have dependencies - if (!isArray(deps)) { - callback = deps; - deps = null; - } - - //If no name, and callback is a function, then figure out if it a - //CommonJS thing with dependencies. - if (!deps && isFunction(callback)) { - deps = []; - //Remove comments from the callback string, - //look for require calls, and pull them into the dependencies, - //but only if there are function args. - if (callback.length) { - callback - .toString() - .replace(commentRegExp, '') - .replace(cjsRequireRegExp, function (match, dep) { - deps.push(dep); - }); - - //May be a CommonJS thing even without require calls, but still - //could use exports, and module. Avoid doing exports and module - //work though if it just needs require. - //REQUIRES the function to expect the CommonJS variables in the - //order listed below. - deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); - } - } - - //If in IE 6-8 and hit an anonymous define() call, do the interactive - //work. - if (useInteractive) { - node = currentlyAddingScript || getInteractiveScript(); - if (node) { - if (!name) { - name = node.getAttribute('data-requiremodule'); - } - context = contexts[node.getAttribute('data-requirecontext')]; - } - } - - //Always save off evaluating the def call until the script onload handler. - //This allows multiple modules to be in a file without prematurely - //tracing dependencies, and allows for anonymous module support, - //where the module name is not known until the script onload event - //occurs. If no context, use the global queue, and get it processed - //in the onscript load callback. - (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); - }; - - define.amd = { - jQuery: true - }; - - - /** - * Executes the text. Normally just uses eval, but can be modified - * to use a better, environment-specific call. Only used for transpiling - * loader plugins, not for plain JS modules. - * @param {String} text the text to execute/evaluate. - */ - req.exec = function (text) { - /*jslint evil: true */ - return eval(text); - }; - - //Set up with config info. - req(cfg); -}(this)); - - - - this.requirejsVars = { - require: require, - requirejs: require, - define: define - }; - - if (env === 'browser') { - /** - * @license RequireJS rhino Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -//sloppy since eval enclosed with use strict causes problems if the source -//text is not strict-compliant. -/*jslint sloppy: true, evil: true */ -/*global require, XMLHttpRequest */ - -(function () { - require.load = function (context, moduleName, url) { - var xhr = new XMLHttpRequest(); - - xhr.open('GET', url, true); - xhr.send(); - - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - eval(xhr.responseText); - - //Support anonymous modules. - context.completeLoad(moduleName); - } - }; - }; -}()); - } else if (env === 'rhino') { - /** - * @license RequireJS rhino Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint */ -/*global require: false, java: false, load: false */ - -(function () { - 'use strict'; - require.load = function (context, moduleName, url) { - - load(url); - - //Support anonymous modules. - context.completeLoad(moduleName); - }; - -}()); - } else if (env === 'node') { - this.requirejsVars.nodeRequire = nodeRequire; - require.nodeRequire = nodeRequire; - - /** - * @license RequireJS node Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint regexp: false */ -/*global require: false, define: false, requirejsVars: false, process: false */ - -/** - * This adapter assumes that x.js has loaded it and set up - * some variables. This adapter just allows limited RequireJS - * usage from within the requirejs directory. The general - * node adapater is r.js. - */ - -(function () { - 'use strict'; - - var nodeReq = requirejsVars.nodeRequire, - req = requirejsVars.require, - def = requirejsVars.define, - fs = nodeReq('fs'), - path = nodeReq('path'), - vm = nodeReq('vm'), - //In Node 0.7+ existsSync is on fs. - exists = fs.existsSync || path.existsSync, - hasOwn = Object.prototype.hasOwnProperty; - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - function syncTick(fn) { - fn(); - } - - function makeError(message, moduleName) { - var err = new Error(message); - err.requireModules = [moduleName]; - return err; - } - - //Supply an implementation that allows synchronous get of a module. - req.get = function (context, moduleName, relModuleMap, localRequire) { - if (moduleName === "require" || moduleName === "exports" || moduleName === "module") { - context.onError(makeError("Explicit require of " + moduleName + " is not allowed.", moduleName)); - } - - var ret, oldTick, - moduleMap = context.makeModuleMap(moduleName, relModuleMap, false, true); - - //Normalize module name, if it contains . or .. - moduleName = moduleMap.id; - - if (hasProp(context.defined, moduleName)) { - ret = context.defined[moduleName]; - } else { - if (ret === undefined) { - //Make sure nextTick for this type of call is sync-based. - oldTick = context.nextTick; - context.nextTick = syncTick; - try { - if (moduleMap.prefix) { - //A plugin, call requirejs to handle it. Now that - //nextTick is syncTick, the require will complete - //synchronously. - localRequire([moduleMap.originalName]); - - //Now that plugin is loaded, can regenerate the moduleMap - //to get the final, normalized ID. - moduleMap = context.makeModuleMap(moduleMap.originalName, relModuleMap, false, true); - moduleName = moduleMap.id; - } else { - //Try to dynamically fetch it. - req.load(context, moduleName, moduleMap.url); - - //Enable the module - context.enable(moduleMap, relModuleMap); - } - - //Break any cycles by requiring it normally, but this will - //finish synchronously - require([moduleName]); - - //The above calls are sync, so can do the next thing safely. - ret = context.defined[moduleName]; - } finally { - context.nextTick = oldTick; - } - } - } - - return ret; - }; - - req.nextTick = function (fn) { - process.nextTick(fn); - }; - - //Add wrapper around the code so that it gets the requirejs - //API instead of the Node API, and it is done lexically so - //that it survives later execution. - req.makeNodeWrapper = function (contents) { - return '(function (require, requirejs, define) { ' + - contents + - '\n}(requirejsVars.require, requirejsVars.requirejs, requirejsVars.define));'; - }; - - req.load = function (context, moduleName, url) { - var contents, err, - config = context.config; - - if (config.shim[moduleName] && (!config.suppress || !config.suppress.nodeShim)) { - console.warn('Shim config not supported in Node, may or may not work. Detected ' + - 'for module: ' + moduleName); - } - - if (exists(url)) { - contents = fs.readFileSync(url, 'utf8'); - - contents = req.makeNodeWrapper(contents); - try { - vm.runInThisContext(contents, fs.realpathSync(url)); - } catch (e) { - err = new Error('Evaluating ' + url + ' as module "' + - moduleName + '" failed with error: ' + e); - err.originalError = e; - err.moduleName = moduleName; - err.requireModules = [moduleName]; - err.fileName = url; - return context.onError(err); - } - } else { - def(moduleName, function () { - //Get the original name, since relative requires may be - //resolved differently in node (issue #202). Also, if relative, - //make it relative to the URL of the item requesting it - //(issue #393) - var dirName, - map = hasProp(context.registry, moduleName) && - context.registry[moduleName].map, - parentMap = map && map.parentMap, - originalName = map && map.originalName; - - if (originalName.charAt(0) === '.' && parentMap) { - dirName = parentMap.url.split('/'); - dirName.pop(); - originalName = dirName.join('/') + '/' + originalName; - } - - try { - return (context.config.nodeRequire || req.nodeRequire)(originalName); - } catch (e) { - err = new Error('Tried loading "' + moduleName + '" at ' + - url + ' then tried node\'s require("' + - originalName + '") and it failed ' + - 'with error: ' + e); - err.originalError = e; - err.moduleName = originalName; - err.requireModules = [moduleName]; - return context.onError(err); - } - }); - } - - //Support anonymous modules. - context.completeLoad(moduleName); - }; - - //Override to provide the function wrapper for define/require. - req.exec = function (text) { - /*jslint evil: true */ - text = req.makeNodeWrapper(text); - return eval(text); - }; -}()); - - } else if (env === 'xpconnect') { - /** - * @license RequireJS xpconnect Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint */ -/*global require, load */ - -(function () { - 'use strict'; - require.load = function (context, moduleName, url) { - - load(url); - - //Support anonymous modules. - context.completeLoad(moduleName); - }; - -}()); - - } - - //Support a default file name to execute. Useful for hosted envs - //like Joyent where it defaults to a server.js as the only executed - //script. But only do it if this is not an optimization run. - if (commandOption !== 'o' && (!fileName || !jsSuffixRegExp.test(fileName))) { - fileName = 'main.js'; - } - - /** - * Loads the library files that can be used for the optimizer, or for other - * tasks. - */ - function loadLib() { - /** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global Packages: false, process: false, window: false, navigator: false, - document: false, define: false */ - -/** - * A plugin that modifies any /env/ path to be the right path based on - * the host environment. Right now only works for Node, Rhino and browser. - */ -(function () { - var pathRegExp = /(\/|^)env\/|\{env\}/, - env = 'unknown'; - - if (typeof Packages !== 'undefined') { - env = 'rhino'; - } else if (typeof process !== 'undefined' && process.versions && !!process.versions.node) { - env = 'node'; - } else if ((typeof navigator !== 'undefined' && typeof document !== 'undefined') || - (typeof importScripts !== 'undefined' && typeof self !== 'undefined')) { - env = 'browser'; - } else if (typeof Components !== 'undefined' && Components.classes && Components.interfaces) { - env = 'xpconnect'; - } - - define('env', { - get: function () { - return env; - }, - - load: function (name, req, load, config) { - //Allow override in the config. - if (config.env) { - env = config.env; - } - - name = name.replace(pathRegExp, function (match, prefix) { - if (match.indexOf('{') === -1) { - return prefix + env + '/'; - } else { - return env; - } - }); - - req([name], function (mod) { - load(mod); - }); - } - }); -}());/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true */ -/*global define */ - -define('lang', function () { - 'use strict'; - - var lang, - hasOwn = Object.prototype.hasOwnProperty; - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - lang = { - backSlashRegExp: /\\/g, - ostring: Object.prototype.toString, - - isArray: Array.isArray || function (it) { - return lang.ostring.call(it) === "[object Array]"; - }, - - isFunction: function(it) { - return lang.ostring.call(it) === "[object Function]"; - }, - - isRegExp: function(it) { - return it && it instanceof RegExp; - }, - - hasProp: hasProp, - - //returns true if the object does not have an own property prop, - //or if it does, it is a falsy value. - falseProp: function (obj, prop) { - return !hasProp(obj, prop) || !obj[prop]; - }, - - //gets own property value for given prop on object - getOwn: function (obj, prop) { - return hasProp(obj, prop) && obj[prop]; - }, - - _mixin: function(dest, source, override){ - var name; - for (name in source) { - if(source.hasOwnProperty(name) && - (override || !dest.hasOwnProperty(name))) { - dest[name] = source[name]; - } - } - - return dest; // Object - }, - - /** - * mixin({}, obj1, obj2) is allowed. If the last argument is a boolean, - * then the source objects properties are force copied over to dest. - */ - mixin: function(dest){ - var parameters = Array.prototype.slice.call(arguments), - override, i, l; - - if (!dest) { dest = {}; } - - if (parameters.length > 2 && typeof arguments[parameters.length-1] === 'boolean') { - override = parameters.pop(); - } - - for (i = 1, l = parameters.length; i < l; i++) { - lang._mixin(dest, parameters[i], override); - } - return dest; // Object - }, - - - /** - * Does a type of deep copy. Do not give it anything fancy, best - * for basic object copies of objects that also work well as - * JSON-serialized things, or has properties pointing to functions. - * For non-array/object values, just returns the same object. - * @param {Object} obj copy properties from this object - * @param {Object} [result] optional result object to use - * @return {Object} - */ - deeplikeCopy: function (obj) { - var type, result; - - if (lang.isArray(obj)) { - result = []; - obj.forEach(function(value) { - result.push(lang.deeplikeCopy(value)); - }); - return result; - } - - type = typeof obj; - if (obj === null || obj === undefined || type === 'boolean' || - type === 'string' || type === 'number' || lang.isFunction(obj) || - lang.isRegExp(obj)) { - return obj; - } - - //Anything else is an object, hopefully. - result = {}; - lang.eachProp(obj, function(value, key) { - result[key] = lang.deeplikeCopy(value); - }); - return result; - }, - - delegate: (function () { - // boodman/crockford delegation w/ cornford optimization - function TMP() {} - return function (obj, props) { - TMP.prototype = obj; - var tmp = new TMP(); - TMP.prototype = null; - if (props) { - lang.mixin(tmp, props); - } - return tmp; // Object - }; - }()), - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - each: function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (func(ary[i], i, ary)) { - break; - } - } - } - }, - - /** - * Cycles over properties in an object and calls a function for each - * property value. If the function returns a truthy value, then the - * iteration is stopped. - */ - eachProp: function eachProp(obj, func) { - var prop; - for (prop in obj) { - if (hasProp(obj, prop)) { - if (func(obj[prop], prop)) { - break; - } - } - } - }, - - //Similar to Function.prototype.bind, but the "this" object is specified - //first, since it is easier to read/figure out what "this" will be. - bind: function bind(obj, fn) { - return function () { - return fn.apply(obj, arguments); - }; - }, - - //Escapes a content string to be be a string that has characters escaped - //for inclusion as part of a JS string. - jsEscape: function (content) { - return content.replace(/(["'\\])/g, '\\$1') - .replace(/[\f]/g, "\\f") - .replace(/[\b]/g, "\\b") - .replace(/[\n]/g, "\\n") - .replace(/[\t]/g, "\\t") - .replace(/[\r]/g, "\\r"); - } - }; - return lang; -}); -/** - * prim 0.0.1 Copyright (c) 2012-2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/requirejs/prim for details - */ - -/*global setImmediate, process, setTimeout, define, module */ - -//Set prime.hideResolutionConflict = true to allow "resolution-races" -//in promise-tests to pass. -//Since the goal of prim is to be a small impl for trusted code, it is -//more important to normally throw in this case so that we can find -//logic errors quicker. - -var prim; -(function () { - 'use strict'; - var op = Object.prototype, - hasOwn = op.hasOwnProperty; - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (ary[i]) { - func(ary[i], i, ary); - } - } - } - } - - function check(p) { - if (hasProp(p, 'e') || hasProp(p, 'v')) { - if (!prim.hideResolutionConflict) { - throw new Error('nope'); - } - return false; - } - return true; - } - - function notify(ary, value) { - prim.nextTick(function () { - each(ary, function (item) { - item(value); - }); - }); - } - - prim = function prim() { - var p, - ok = [], - fail = []; - - return (p = { - callback: function (yes, no) { - if (no) { - p.errback(no); - } - - if (hasProp(p, 'v')) { - prim.nextTick(function () { - yes(p.v); - }); - } else { - ok.push(yes); - } - }, - - errback: function (no) { - if (hasProp(p, 'e')) { - prim.nextTick(function () { - no(p.e); - }); - } else { - fail.push(no); - } - }, - - finished: function () { - return hasProp(p, 'e') || hasProp(p, 'v'); - }, - - rejected: function () { - return hasProp(p, 'e'); - }, - - resolve: function (v) { - if (check(p)) { - p.v = v; - notify(ok, v); - } - return p; - }, - reject: function (e) { - if (check(p)) { - p.e = e; - notify(fail, e); - } - return p; - }, - - start: function (fn) { - p.resolve(); - return p.promise.then(fn); - }, - - promise: { - then: function (yes, no) { - var next = prim(); - - p.callback(function (v) { - try { - if (yes && typeof yes === 'function') { - v = yes(v); - } - - if (v && v.then) { - v.then(next.resolve, next.reject); - } else { - next.resolve(v); - } - } catch (e) { - next.reject(e); - } - }, function (e) { - var err; - - try { - if (!no || typeof no !== 'function') { - next.reject(e); - } else { - err = no(e); - - if (err && err.then) { - err.then(next.resolve, next.reject); - } else { - next.resolve(err); - } - } - } catch (e2) { - next.reject(e2); - } - }); - - return next.promise; - }, - - fail: function (no) { - return p.promise.then(null, no); - }, - - end: function () { - p.errback(function (e) { - throw e; - }); - } - } - }); - }; - - prim.serial = function (ary) { - var result = prim().resolve().promise; - each(ary, function (item) { - result = result.then(function () { - return item(); - }); - }); - return result; - }; - - prim.nextTick = typeof setImmediate === 'function' ? setImmediate : - (typeof process !== 'undefined' && process.nextTick ? - process.nextTick : (typeof setTimeout !== 'undefined' ? - function (fn) { - setTimeout(fn, 0); - } : function (fn) { - fn(); - })); - - if (typeof define === 'function' && define.amd) { - define('prim', function () { return prim; }); - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = prim; - } -}()); -if(env === 'browser') { -/** - * @license RequireJS Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Just a stub for use with uglify's consolidator.js -define('browser/assert', function () { - return {}; -}); - -} - -if(env === 'node') { -/** - * @license RequireJS Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Needed so that rhino/assert can return a stub for uglify's consolidator.js -define('node/assert', ['assert'], function (assert) { - return assert; -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Just a stub for use with uglify's consolidator.js -define('rhino/assert', function () { - return {}; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Just a stub for use with uglify's consolidator.js -define('xpconnect/assert', function () { - return {}; -}); - -} - -if(env === 'browser') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, process: false */ - -define('browser/args', function () { - //Always expect config via an API call - return []; -}); - -} - -if(env === 'node') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, process: false */ - -define('node/args', function () { - //Do not return the "node" or "r.js" arguments - var args = process.argv.slice(2); - - //Ignore any command option used for main x.js branching - if (args[0] && args[0].indexOf('-') === 0) { - args = args.slice(1); - } - - return args; -}); - -} - -if(env === 'rhino') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, process: false */ - -var jsLibRhinoArgs = (typeof rhinoArgs !== 'undefined' && rhinoArgs) || [].concat(Array.prototype.slice.call(arguments, 0)); - -define('rhino/args', function () { - var args = jsLibRhinoArgs; - - //Ignore any command option used for main x.js branching - if (args[0] && args[0].indexOf('-') === 0) { - args = args.slice(1); - } - - return args; -}); - -} - -if(env === 'xpconnect') { -/** - * @license Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define, xpconnectArgs */ - -var jsLibXpConnectArgs = (typeof xpconnectArgs !== 'undefined' && xpconnectArgs) || [].concat(Array.prototype.slice.call(arguments, 0)); - -define('xpconnect/args', function () { - var args = jsLibXpConnectArgs; - - //Ignore any command option used for main x.js branching - if (args[0] && args[0].indexOf('-') === 0) { - args = args.slice(1); - } - - return args; -}); - -} - -if(env === 'browser') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('browser/load', ['./file'], function (file) { - function load(fileName) { - eval(file.readFile(fileName)); - } - - return load; -}); - -} - -if(env === 'node') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('node/load', ['fs'], function (fs) { - function load(fileName) { - var contents = fs.readFileSync(fileName, 'utf8'); - process.compile(contents, fileName); - } - - return load; -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -define('rhino/load', function () { - return load; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -define('xpconnect/load', function () { - return load; -}); - -} - -if(env === 'browser') { -/** - * @license Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint sloppy: true, nomen: true */ -/*global require, define, console, XMLHttpRequest, requirejs, location */ - -define('browser/file', ['prim'], function (prim) { - - var file, - currDirRegExp = /^\.(\/|$)/; - - function frontSlash(path) { - return path.replace(/\\/g, '/'); - } - - function exists(path) { - var status, xhr = new XMLHttpRequest(); - - //Oh yeah, that is right SYNC IO. Behold its glory - //and horrible blocking behavior. - xhr.open('HEAD', path, false); - xhr.send(); - status = xhr.status; - - return status === 200 || status === 304; - } - - function mkDir(dir) { - console.log('mkDir is no-op in browser'); - } - - function mkFullDir(dir) { - console.log('mkFullDir is no-op in browser'); - } - - file = { - backSlashRegExp: /\\/g, - exclusionRegExp: /^\./, - getLineSeparator: function () { - return '/'; - }, - - exists: function (fileName) { - return exists(fileName); - }, - - parent: function (fileName) { - var parts = fileName.split('/'); - parts.pop(); - return parts.join('/'); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {String} fileName - */ - absPath: function (fileName) { - var dir; - if (currDirRegExp.test(fileName)) { - dir = frontSlash(location.href); - if (dir.indexOf('/') !== -1) { - dir = dir.split('/'); - - //Pull off protocol and host, just want - //to allow paths (other build parts, like - //require._isSupportedBuildUrl do not support - //full URLs), but a full path from - //the root. - dir.splice(0, 3); - - dir.pop(); - dir = '/' + dir.join('/'); - } - - fileName = dir + fileName.substring(1); - } - - return fileName; - }, - - normalize: function (fileName) { - return fileName; - }, - - isFile: function (path) { - return true; - }, - - isDirectory: function (path) { - return false; - }, - - getFilteredFileList: function (startDir, regExpFilters, makeUnixPaths) { - console.log('file.getFilteredFileList is no-op in browser'); - }, - - copyDir: function (srcDir, destDir, regExpFilter, onlyCopyNew) { - console.log('file.copyDir is no-op in browser'); - - }, - - copyFile: function (srcFileName, destFileName, onlyCopyNew) { - console.log('file.copyFile is no-op in browser'); - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - console.log('file.renameFile is no-op in browser'); - }, - - /** - * Reads a *text* file. - */ - readFile: function (path, encoding) { - var xhr = new XMLHttpRequest(); - - //Oh yeah, that is right SYNC IO. Behold its glory - //and horrible blocking behavior. - xhr.open('GET', path, false); - xhr.send(); - - return xhr.responseText; - }, - - readFileAsync: function (path, encoding) { - var xhr = new XMLHttpRequest(), - d = prim(); - - xhr.open('GET', path, true); - xhr.send(); - - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - if (xhr.status > 400) { - d.reject(new Error('Status: ' + xhr.status + ': ' + xhr.statusText)); - } else { - d.resolve(xhr.responseText); - } - } - }; - - return d.promise; - }, - - saveUtf8File: function (fileName, fileContents) { - //summary: saves a *text* file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf8"); - }, - - saveFile: function (fileName, fileContents, encoding) { - requirejs.browser.saveFile(fileName, fileContents, encoding); - }, - - deleteFile: function (fileName) { - console.log('file.deleteFile is no-op in browser'); - }, - - /** - * Deletes any empty directories under the given directory. - */ - deleteEmptyDirs: function (startDir) { - console.log('file.deleteEmptyDirs is no-op in browser'); - } - }; - - return file; - -}); - -} - -if(env === 'node') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: false, octal:false, strict: false */ -/*global define: false, process: false */ - -define('node/file', ['fs', 'path', 'prim'], function (fs, path, prim) { - - var isWindows = process.platform === 'win32', - windowsDriveRegExp = /^[a-zA-Z]\:\/$/, - file; - - function frontSlash(path) { - return path.replace(/\\/g, '/'); - } - - function exists(path) { - if (isWindows && path.charAt(path.length - 1) === '/' && - path.charAt(path.length - 2) !== ':') { - path = path.substring(0, path.length - 1); - } - - try { - fs.statSync(path); - return true; - } catch (e) { - return false; - } - } - - function mkDir(dir) { - if (!exists(dir) && (!isWindows || !windowsDriveRegExp.test(dir))) { - fs.mkdirSync(dir, 511); - } - } - - function mkFullDir(dir) { - var parts = dir.split('/'), - currDir = '', - first = true; - - parts.forEach(function (part) { - //First part may be empty string if path starts with a slash. - currDir += part + '/'; - first = false; - - if (part) { - mkDir(currDir); - } - }); - } - - file = { - backSlashRegExp: /\\/g, - exclusionRegExp: /^\./, - getLineSeparator: function () { - return '/'; - }, - - exists: function (fileName) { - return exists(fileName); - }, - - parent: function (fileName) { - var parts = fileName.split('/'); - parts.pop(); - return parts.join('/'); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {String} fileName - */ - absPath: function (fileName) { - return frontSlash(path.normalize(frontSlash(fs.realpathSync(fileName)))); - }, - - normalize: function (fileName) { - return frontSlash(path.normalize(fileName)); - }, - - isFile: function (path) { - return fs.statSync(path).isFile(); - }, - - isDirectory: function (path) { - return fs.statSync(path).isDirectory(); - }, - - getFilteredFileList: function (/*String*/startDir, /*RegExp*/regExpFilters, /*boolean?*/makeUnixPaths) { - //summary: Recurses startDir and finds matches to the files that match regExpFilters.include - //and do not match regExpFilters.exclude. Or just one regexp can be passed in for regExpFilters, - //and it will be treated as the "include" case. - //Ignores files/directories that start with a period (.) unless exclusionRegExp - //is set to another value. - var files = [], topDir, regExpInclude, regExpExclude, dirFileArray, - i, stat, filePath, ok, dirFiles, fileName; - - topDir = startDir; - - regExpInclude = regExpFilters.include || regExpFilters; - regExpExclude = regExpFilters.exclude || null; - - if (file.exists(topDir)) { - dirFileArray = fs.readdirSync(topDir); - for (i = 0; i < dirFileArray.length; i++) { - fileName = dirFileArray[i]; - filePath = path.join(topDir, fileName); - stat = fs.statSync(filePath); - if (stat.isFile()) { - if (makeUnixPaths) { - //Make sure we have a JS string. - if (filePath.indexOf("/") === -1) { - filePath = frontSlash(filePath); - } - } - - ok = true; - if (regExpInclude) { - ok = filePath.match(regExpInclude); - } - if (ok && regExpExclude) { - ok = !filePath.match(regExpExclude); - } - - if (ok && (!file.exclusionRegExp || - !file.exclusionRegExp.test(fileName))) { - files.push(filePath); - } - } else if (stat.isDirectory() && - (!file.exclusionRegExp || !file.exclusionRegExp.test(fileName))) { - dirFiles = this.getFilteredFileList(filePath, regExpFilters, makeUnixPaths); - files.push.apply(files, dirFiles); - } - } - } - - return files; //Array - }, - - copyDir: function (/*String*/srcDir, /*String*/destDir, /*RegExp?*/regExpFilter, /*boolean?*/onlyCopyNew) { - //summary: copies files from srcDir to destDir using the regExpFilter to determine if the - //file should be copied. Returns a list file name strings of the destinations that were copied. - regExpFilter = regExpFilter || /\w/; - - //Normalize th directory names, but keep front slashes. - //path module on windows now returns backslashed paths. - srcDir = frontSlash(path.normalize(srcDir)); - destDir = frontSlash(path.normalize(destDir)); - - var fileNames = file.getFilteredFileList(srcDir, regExpFilter, true), - copiedFiles = [], i, srcFileName, destFileName; - - for (i = 0; i < fileNames.length; i++) { - srcFileName = fileNames[i]; - destFileName = srcFileName.replace(srcDir, destDir); - - if (file.copyFile(srcFileName, destFileName, onlyCopyNew)) { - copiedFiles.push(destFileName); - } - } - - return copiedFiles.length ? copiedFiles : null; //Array or null - }, - - copyFile: function (/*String*/srcFileName, /*String*/destFileName, /*boolean?*/onlyCopyNew) { - //summary: copies srcFileName to destFileName. If onlyCopyNew is set, it only copies the file if - //srcFileName is newer than destFileName. Returns a boolean indicating if the copy occurred. - var parentDir; - - //logger.trace("Src filename: " + srcFileName); - //logger.trace("Dest filename: " + destFileName); - - //If onlyCopyNew is true, then compare dates and only copy if the src is newer - //than dest. - if (onlyCopyNew) { - if (file.exists(destFileName) && fs.statSync(destFileName).mtime.getTime() >= fs.statSync(srcFileName).mtime.getTime()) { - return false; //Boolean - } - } - - //Make sure destination dir exists. - parentDir = path.dirname(destFileName); - if (!file.exists(parentDir)) { - mkFullDir(parentDir); - } - - fs.writeFileSync(destFileName, fs.readFileSync(srcFileName, 'binary'), 'binary'); - - return true; //Boolean - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - return fs.renameSync(from, to); - }, - - /** - * Reads a *text* file. - */ - readFile: function (/*String*/path, /*String?*/encoding) { - if (encoding === 'utf-8') { - encoding = 'utf8'; - } - if (!encoding) { - encoding = 'utf8'; - } - - var text = fs.readFileSync(path, encoding); - - //Hmm, would not expect to get A BOM, but it seems to happen, - //remove it just in case. - if (text.indexOf('\uFEFF') === 0) { - text = text.substring(1, text.length); - } - - return text; - }, - - readFileAsync: function (path, encoding) { - var d = prim(); - try { - d.resolve(file.readFile(path, encoding)); - } catch (e) { - d.reject(e); - } - return d.promise; - }, - - saveUtf8File: function (/*String*/fileName, /*String*/fileContents) { - //summary: saves a *text* file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf8"); - }, - - saveFile: function (/*String*/fileName, /*String*/fileContents, /*String?*/encoding) { - //summary: saves a *text* file. - var parentDir; - - if (encoding === 'utf-8') { - encoding = 'utf8'; - } - if (!encoding) { - encoding = 'utf8'; - } - - //Make sure destination directories exist. - parentDir = path.dirname(fileName); - if (!file.exists(parentDir)) { - mkFullDir(parentDir); - } - - fs.writeFileSync(fileName, fileContents, encoding); - }, - - deleteFile: function (/*String*/fileName) { - //summary: deletes a file or directory if it exists. - var files, i, stat; - if (file.exists(fileName)) { - stat = fs.statSync(fileName); - if (stat.isDirectory()) { - files = fs.readdirSync(fileName); - for (i = 0; i < files.length; i++) { - this.deleteFile(path.join(fileName, files[i])); - } - fs.rmdirSync(fileName); - } else { - fs.unlinkSync(fileName); - } - } - }, - - - /** - * Deletes any empty directories under the given directory. - */ - deleteEmptyDirs: function (startDir) { - var dirFileArray, i, fileName, filePath, stat; - - if (file.exists(startDir)) { - dirFileArray = fs.readdirSync(startDir); - for (i = 0; i < dirFileArray.length; i++) { - fileName = dirFileArray[i]; - filePath = path.join(startDir, fileName); - stat = fs.statSync(filePath); - if (stat.isDirectory()) { - file.deleteEmptyDirs(filePath); - } - } - - //If directory is now empty, remove it. - if (fs.readdirSync(startDir).length === 0) { - file.deleteFile(startDir); - } - } - } - }; - - return file; - -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -//Helper functions to deal with file I/O. - -/*jslint plusplus: false */ -/*global java: false, define: false */ - -define('rhino/file', ['prim'], function (prim) { - var file = { - backSlashRegExp: /\\/g, - - exclusionRegExp: /^\./, - - getLineSeparator: function () { - return file.lineSeparator; - }, - - lineSeparator: java.lang.System.getProperty("line.separator"), //Java String - - exists: function (fileName) { - return (new java.io.File(fileName)).exists(); - }, - - parent: function (fileName) { - return file.absPath((new java.io.File(fileName)).getParentFile()); - }, - - normalize: function (fileName) { - return file.absPath(fileName); - }, - - isFile: function (path) { - return (new java.io.File(path)).isFile(); - }, - - isDirectory: function (path) { - return (new java.io.File(path)).isDirectory(); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {java.io.File||String} file - */ - absPath: function (fileObj) { - if (typeof fileObj === "string") { - fileObj = new java.io.File(fileObj); - } - return (fileObj.getCanonicalPath() + "").replace(file.backSlashRegExp, "/"); - }, - - getFilteredFileList: function (/*String*/startDir, /*RegExp*/regExpFilters, /*boolean?*/makeUnixPaths, /*boolean?*/startDirIsJavaObject) { - //summary: Recurses startDir and finds matches to the files that match regExpFilters.include - //and do not match regExpFilters.exclude. Or just one regexp can be passed in for regExpFilters, - //and it will be treated as the "include" case. - //Ignores files/directories that start with a period (.) unless exclusionRegExp - //is set to another value. - var files = [], topDir, regExpInclude, regExpExclude, dirFileArray, - i, fileObj, filePath, ok, dirFiles; - - topDir = startDir; - if (!startDirIsJavaObject) { - topDir = new java.io.File(startDir); - } - - regExpInclude = regExpFilters.include || regExpFilters; - regExpExclude = regExpFilters.exclude || null; - - if (topDir.exists()) { - dirFileArray = topDir.listFiles(); - for (i = 0; i < dirFileArray.length; i++) { - fileObj = dirFileArray[i]; - if (fileObj.isFile()) { - filePath = fileObj.getPath(); - if (makeUnixPaths) { - //Make sure we have a JS string. - filePath = String(filePath); - if (filePath.indexOf("/") === -1) { - filePath = filePath.replace(/\\/g, "/"); - } - } - - ok = true; - if (regExpInclude) { - ok = filePath.match(regExpInclude); - } - if (ok && regExpExclude) { - ok = !filePath.match(regExpExclude); - } - - if (ok && (!file.exclusionRegExp || - !file.exclusionRegExp.test(fileObj.getName()))) { - files.push(filePath); - } - } else if (fileObj.isDirectory() && - (!file.exclusionRegExp || !file.exclusionRegExp.test(fileObj.getName()))) { - dirFiles = this.getFilteredFileList(fileObj, regExpFilters, makeUnixPaths, true); - files.push.apply(files, dirFiles); - } - } - } - - return files; //Array - }, - - copyDir: function (/*String*/srcDir, /*String*/destDir, /*RegExp?*/regExpFilter, /*boolean?*/onlyCopyNew) { - //summary: copies files from srcDir to destDir using the regExpFilter to determine if the - //file should be copied. Returns a list file name strings of the destinations that were copied. - regExpFilter = regExpFilter || /\w/; - - var fileNames = file.getFilteredFileList(srcDir, regExpFilter, true), - copiedFiles = [], i, srcFileName, destFileName; - - for (i = 0; i < fileNames.length; i++) { - srcFileName = fileNames[i]; - destFileName = srcFileName.replace(srcDir, destDir); - - if (file.copyFile(srcFileName, destFileName, onlyCopyNew)) { - copiedFiles.push(destFileName); - } - } - - return copiedFiles.length ? copiedFiles : null; //Array or null - }, - - copyFile: function (/*String*/srcFileName, /*String*/destFileName, /*boolean?*/onlyCopyNew) { - //summary: copies srcFileName to destFileName. If onlyCopyNew is set, it only copies the file if - //srcFileName is newer than destFileName. Returns a boolean indicating if the copy occurred. - var destFile = new java.io.File(destFileName), srcFile, parentDir, - srcChannel, destChannel; - - //logger.trace("Src filename: " + srcFileName); - //logger.trace("Dest filename: " + destFileName); - - //If onlyCopyNew is true, then compare dates and only copy if the src is newer - //than dest. - if (onlyCopyNew) { - srcFile = new java.io.File(srcFileName); - if (destFile.exists() && destFile.lastModified() >= srcFile.lastModified()) { - return false; //Boolean - } - } - - //Make sure destination dir exists. - parentDir = destFile.getParentFile(); - if (!parentDir.exists()) { - if (!parentDir.mkdirs()) { - throw "Could not create directory: " + parentDir.getCanonicalPath(); - } - } - - //Java's version of copy file. - srcChannel = new java.io.FileInputStream(srcFileName).getChannel(); - destChannel = new java.io.FileOutputStream(destFileName).getChannel(); - destChannel.transferFrom(srcChannel, 0, srcChannel.size()); - srcChannel.close(); - destChannel.close(); - - return true; //Boolean - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - return (new java.io.File(from)).renameTo((new java.io.File(to))); - }, - - readFile: function (/*String*/path, /*String?*/encoding) { - //A file read function that can deal with BOMs - encoding = encoding || "utf-8"; - var fileObj = new java.io.File(path), - input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(fileObj), encoding)), - stringBuffer, line; - try { - stringBuffer = new java.lang.StringBuffer(); - line = input.readLine(); - - // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324 - // http://www.unicode.org/faq/utf_bom.html - - // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK: - // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058 - if (line && line.length() && line.charAt(0) === 0xfeff) { - // Eat the BOM, since we've already found the encoding on this file, - // and we plan to concatenating this buffer with others; the BOM should - // only appear at the top of a file. - line = line.substring(1); - } - while (line !== null) { - stringBuffer.append(line); - stringBuffer.append(file.lineSeparator); - line = input.readLine(); - } - //Make sure we return a JavaScript string and not a Java string. - return String(stringBuffer.toString()); //String - } finally { - input.close(); - } - }, - - readFileAsync: function (path, encoding) { - var d = prim(); - try { - d.resolve(file.readFile(path, encoding)); - } catch (e) { - d.reject(e); - } - return d.promise; - }, - - saveUtf8File: function (/*String*/fileName, /*String*/fileContents) { - //summary: saves a file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf-8"); - }, - - saveFile: function (/*String*/fileName, /*String*/fileContents, /*String?*/encoding) { - //summary: saves a file. - var outFile = new java.io.File(fileName), outWriter, parentDir, os; - - parentDir = outFile.getAbsoluteFile().getParentFile(); - if (!parentDir.exists()) { - if (!parentDir.mkdirs()) { - throw "Could not create directory: " + parentDir.getAbsolutePath(); - } - } - - if (encoding) { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile), encoding); - } else { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile)); - } - - os = new java.io.BufferedWriter(outWriter); - try { - os.write(fileContents); - } finally { - os.close(); - } - }, - - deleteFile: function (/*String*/fileName) { - //summary: deletes a file or directory if it exists. - var fileObj = new java.io.File(fileName), files, i; - if (fileObj.exists()) { - if (fileObj.isDirectory()) { - files = fileObj.listFiles(); - for (i = 0; i < files.length; i++) { - this.deleteFile(files[i]); - } - } - fileObj["delete"](); - } - }, - - /** - * Deletes any empty directories under the given directory. - * The startDirIsJavaObject is private to this implementation's - * recursion needs. - */ - deleteEmptyDirs: function (startDir, startDirIsJavaObject) { - var topDir = startDir, - dirFileArray, i, fileObj; - - if (!startDirIsJavaObject) { - topDir = new java.io.File(startDir); - } - - if (topDir.exists()) { - dirFileArray = topDir.listFiles(); - for (i = 0; i < dirFileArray.length; i++) { - fileObj = dirFileArray[i]; - if (fileObj.isDirectory()) { - file.deleteEmptyDirs(fileObj, true); - } - } - - //If the directory is empty now, delete it. - if (topDir.listFiles().length === 0) { - file.deleteFile(String(topDir.getPath())); - } - } - } - }; - - return file; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -//Helper functions to deal with file I/O. - -/*jslint plusplus: false */ -/*global define, Components, xpcUtil */ - -define('xpconnect/file', ['prim'], function (prim) { - var file, - Cc = Components.classes, - Ci = Components.interfaces, - //Depends on xpcUtil which is set up in x.js - xpfile = xpcUtil.xpfile; - - function mkFullDir(dirObj) { - //1 is DIRECTORY_TYPE, 511 is 0777 permissions - if (!dirObj.exists()) { - dirObj.create(1, 511); - } - } - - file = { - backSlashRegExp: /\\/g, - - exclusionRegExp: /^\./, - - getLineSeparator: function () { - return file.lineSeparator; - }, - - lineSeparator: ('@mozilla.org/windows-registry-key;1' in Cc) ? - '\r\n' : '\n', - - exists: function (fileName) { - return xpfile(fileName).exists(); - }, - - parent: function (fileName) { - return xpfile(fileName).parent; - }, - - normalize: function (fileName) { - return file.absPath(fileName); - }, - - isFile: function (path) { - return xpfile(path).isFile(); - }, - - isDirectory: function (path) { - return xpfile(path).isDirectory(); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {java.io.File||String} file - */ - absPath: function (fileObj) { - if (typeof fileObj === "string") { - fileObj = xpfile(fileObj); - } - return fileObj.path; - }, - - getFilteredFileList: function (/*String*/startDir, /*RegExp*/regExpFilters, /*boolean?*/makeUnixPaths, /*boolean?*/startDirIsObject) { - //summary: Recurses startDir and finds matches to the files that match regExpFilters.include - //and do not match regExpFilters.exclude. Or just one regexp can be passed in for regExpFilters, - //and it will be treated as the "include" case. - //Ignores files/directories that start with a period (.) unless exclusionRegExp - //is set to another value. - var files = [], topDir, regExpInclude, regExpExclude, dirFileArray, - fileObj, filePath, ok, dirFiles; - - topDir = startDir; - if (!startDirIsObject) { - topDir = xpfile(startDir); - } - - regExpInclude = regExpFilters.include || regExpFilters; - regExpExclude = regExpFilters.exclude || null; - - if (topDir.exists()) { - dirFileArray = topDir.directoryEntries; - while (dirFileArray.hasMoreElements()) { - fileObj = dirFileArray.getNext().QueryInterface(Ci.nsILocalFile); - if (fileObj.isFile()) { - filePath = fileObj.path; - if (makeUnixPaths) { - if (filePath.indexOf("/") === -1) { - filePath = filePath.replace(/\\/g, "/"); - } - } - - ok = true; - if (regExpInclude) { - ok = filePath.match(regExpInclude); - } - if (ok && regExpExclude) { - ok = !filePath.match(regExpExclude); - } - - if (ok && (!file.exclusionRegExp || - !file.exclusionRegExp.test(fileObj.leafName))) { - files.push(filePath); - } - } else if (fileObj.isDirectory() && - (!file.exclusionRegExp || !file.exclusionRegExp.test(fileObj.leafName))) { - dirFiles = this.getFilteredFileList(fileObj, regExpFilters, makeUnixPaths, true); - files.push.apply(files, dirFiles); - } - } - } - - return files; //Array - }, - - copyDir: function (/*String*/srcDir, /*String*/destDir, /*RegExp?*/regExpFilter, /*boolean?*/onlyCopyNew) { - //summary: copies files from srcDir to destDir using the regExpFilter to determine if the - //file should be copied. Returns a list file name strings of the destinations that were copied. - regExpFilter = regExpFilter || /\w/; - - var fileNames = file.getFilteredFileList(srcDir, regExpFilter, true), - copiedFiles = [], i, srcFileName, destFileName; - - for (i = 0; i < fileNames.length; i += 1) { - srcFileName = fileNames[i]; - destFileName = srcFileName.replace(srcDir, destDir); - - if (file.copyFile(srcFileName, destFileName, onlyCopyNew)) { - copiedFiles.push(destFileName); - } - } - - return copiedFiles.length ? copiedFiles : null; //Array or null - }, - - copyFile: function (/*String*/srcFileName, /*String*/destFileName, /*boolean?*/onlyCopyNew) { - //summary: copies srcFileName to destFileName. If onlyCopyNew is set, it only copies the file if - //srcFileName is newer than destFileName. Returns a boolean indicating if the copy occurred. - var destFile = xpfile(destFileName), - srcFile = xpfile(srcFileName); - - //logger.trace("Src filename: " + srcFileName); - //logger.trace("Dest filename: " + destFileName); - - //If onlyCopyNew is true, then compare dates and only copy if the src is newer - //than dest. - if (onlyCopyNew) { - if (destFile.exists() && destFile.lastModifiedTime >= srcFile.lastModifiedTime) { - return false; //Boolean - } - } - - srcFile.copyTo(destFile.parent, destFile.leafName); - - return true; //Boolean - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - var toFile = xpfile(to); - return xpfile(from).moveTo(toFile.parent, toFile.leafName); - }, - - readFile: xpcUtil.readFile, - - readFileAsync: function (path, encoding) { - var d = prim(); - try { - d.resolve(file.readFile(path, encoding)); - } catch (e) { - d.reject(e); - } - return d.promise; - }, - - saveUtf8File: function (/*String*/fileName, /*String*/fileContents) { - //summary: saves a file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf-8"); - }, - - saveFile: function (/*String*/fileName, /*String*/fileContents, /*String?*/encoding) { - var outStream, convertStream, - fileObj = xpfile(fileName); - - mkFullDir(fileObj.parent); - - try { - outStream = Cc['@mozilla.org/network/file-output-stream;1'] - .createInstance(Ci.nsIFileOutputStream); - //438 is decimal for 0777 - outStream.init(fileObj, 0x02 | 0x08 | 0x20, 511, 0); - - convertStream = Cc['@mozilla.org/intl/converter-output-stream;1'] - .createInstance(Ci.nsIConverterOutputStream); - - convertStream.init(outStream, encoding, 0, 0); - convertStream.writeString(fileContents); - } catch (e) { - throw new Error((fileObj && fileObj.path || '') + ': ' + e); - } finally { - if (convertStream) { - convertStream.close(); - } - if (outStream) { - outStream.close(); - } - } - }, - - deleteFile: function (/*String*/fileName) { - //summary: deletes a file or directory if it exists. - var fileObj = xpfile(fileName); - if (fileObj.exists()) { - fileObj.remove(true); - } - }, - - /** - * Deletes any empty directories under the given directory. - * The startDirIsJavaObject is private to this implementation's - * recursion needs. - */ - deleteEmptyDirs: function (startDir, startDirIsObject) { - var topDir = startDir, - dirFileArray, fileObj; - - if (!startDirIsObject) { - topDir = xpfile(startDir); - } - - if (topDir.exists()) { - dirFileArray = topDir.directoryEntries; - while (dirFileArray.hasMoreElements()) { - fileObj = dirFileArray.getNext().QueryInterface(Ci.nsILocalFile); - - if (fileObj.isDirectory()) { - file.deleteEmptyDirs(fileObj, true); - } - } - - //If the directory is empty now, delete it. - dirFileArray = topDir.directoryEntries; - if (!dirFileArray.hasMoreElements()) { - file.deleteFile(topDir.path); - } - } - } - }; - - return file; -}); - -} - -if(env === 'browser') { -/*global process */ -define('browser/quit', function () { - 'use strict'; - return function (code) { - }; -}); -} - -if(env === 'node') { -/*global process */ -define('node/quit', function () { - 'use strict'; - return function (code) { - var draining = 0; - var exit = function () { - if (draining === 0) { - process.exit(code); - } else { - draining -= 1; - } - }; - if (process.stdout.bufferSize) { - draining += 1; - process.stdout.once('drain', exit); - } - if (process.stderr.bufferSize) { - draining += 1; - process.stderr.once('drain', exit); - } - exit(); - }; -}); - -} - -if(env === 'rhino') { -/*global quit */ -define('rhino/quit', function () { - 'use strict'; - return function (code) { - return quit(code); - }; -}); - -} - -if(env === 'xpconnect') { -/*global quit */ -define('xpconnect/quit', function () { - 'use strict'; - return function (code) { - return quit(code); - }; -}); - -} - -if(env === 'browser') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('browser/print', function () { - function print(msg) { - console.log(msg); - } - - return print; -}); - -} - -if(env === 'node') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('node/print', function () { - function print(msg) { - console.log(msg); - } - - return print; -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, print: false */ - -define('rhino/print', function () { - return print; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, print: false */ - -define('xpconnect/print', function () { - return print; -}); - -} -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint nomen: false, strict: false */ -/*global define: false */ - -define('logger', ['env!env/print'], function (print) { - var logger = { - TRACE: 0, - INFO: 1, - WARN: 2, - ERROR: 3, - SILENT: 4, - level: 0, - logPrefix: "", - - logLevel: function( level ) { - this.level = level; - }, - - trace: function (message) { - if (this.level <= this.TRACE) { - this._print(message); - } - }, - - info: function (message) { - if (this.level <= this.INFO) { - this._print(message); - } - }, - - warn: function (message) { - if (this.level <= this.WARN) { - this._print(message); - } - }, - - error: function (message) { - if (this.level <= this.ERROR) { - this._print(message); - } - }, - - _print: function (message) { - this._sysPrint((this.logPrefix ? (this.logPrefix + " ") : "") + message); - }, - - _sysPrint: function (message) { - print(message); - } - }; - - return logger; -}); -//Just a blank file to use when building the optimizer with the optimizer, -//so that the build does not attempt to inline some env modules, -//like Node's fs and path. - -/* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Mathias Bynens - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Kris Kowal - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint bitwise:true plusplus:true */ -/*global esprima:true, define:true, exports:true, window: true, -throwError: true, createLiteral: true, generateStatement: true, -parseAssignmentExpression: true, parseBlock: true, parseExpression: true, -parseFunctionDeclaration: true, parseFunctionExpression: true, -parseFunctionSourceElements: true, parseVariableIdentifier: true, -parseLeftHandSideExpression: true, -parseStatement: true, parseSourceElement: true */ - -(function (root, factory) { - 'use strict'; - - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // Rhino, and plain browser loading. - if (typeof define === 'function' && define.amd) { - define('esprima', ['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.esprima = {})); - } -}(this, function (exports) { - 'use strict'; - - var Token, - TokenName, - Syntax, - PropertyKind, - Messages, - Regex, - source, - strict, - index, - lineNumber, - lineStart, - length, - buffer, - state, - extra; - - Token = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8 - }; - - TokenName = {}; - TokenName[Token.BooleanLiteral] = 'Boolean'; - TokenName[Token.EOF] = ''; - TokenName[Token.Identifier] = 'Identifier'; - TokenName[Token.Keyword] = 'Keyword'; - TokenName[Token.NullLiteral] = 'Null'; - TokenName[Token.NumericLiteral] = 'Numeric'; - TokenName[Token.Punctuator] = 'Punctuator'; - TokenName[Token.StringLiteral] = 'String'; - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - ArrayExpression: 'ArrayExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - Program: 'Program', - Property: 'Property', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement' - }; - - PropertyKind = { - Data: 1, - Get: 2, - Set: 4 - }; - - // Error messages should be identical to V8. - Messages = { - UnexpectedToken: 'Unexpected token %0', - UnexpectedNumber: 'Unexpected number', - UnexpectedString: 'Unexpected string', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedEOS: 'Unexpected end of input', - NewlineAfterThrow: 'Illegal newline after throw', - InvalidRegExp: 'Invalid regular expression', - UnterminatedRegExp: 'Invalid regular expression: missing /', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NoCatchOrFinally: 'Missing catch or finally after try', - UnknownLabel: 'Undefined label \'%0\'', - Redeclaration: '%0 \'%1\' has already been declared', - IllegalContinue: 'Illegal continue statement', - IllegalBreak: 'Illegal break statement', - IllegalReturn: 'Illegal return statement', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', - AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', - AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode' - }; - - // See also tools/generate-unicode-regex.py. - Regex = { - NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), - NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') - }; - - // Ensure the condition is true, otherwise throw an error. - // This is only to have a better contract semantic, i.e. another safety net - // to catch a logic error. The condition shall be fulfilled in normal case. - // Do NOT use this to enforce a certain condition on any user input. - - function assert(condition, message) { - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } - - function sliceSource(from, to) { - return source.slice(from, to); - } - - if (typeof 'esprima'[0] === 'undefined') { - sliceSource = function sliceArraySource(from, to) { - return source.slice(from, to).join(''); - }; - } - - function isDecimalDigit(ch) { - return '0123456789'.indexOf(ch) >= 0; - } - - function isHexDigit(ch) { - return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; - } - - function isOctalDigit(ch) { - return '01234567'.indexOf(ch) >= 0; - } - - - // 7.2 White Space - - function isWhiteSpace(ch) { - return (ch === ' ') || (ch === '\u0009') || (ch === '\u000B') || - (ch === '\u000C') || (ch === '\u00A0') || - (ch.charCodeAt(0) >= 0x1680 && - '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(ch) >= 0); - } - - // 7.3 Line Terminators - - function isLineTerminator(ch) { - return (ch === '\n' || ch === '\r' || ch === '\u2028' || ch === '\u2029'); - } - - // 7.6 Identifier Names and Identifiers - - function isIdentifierStart(ch) { - return (ch === '$') || (ch === '_') || (ch === '\\') || - (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || - ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch)); - } - - function isIdentifierPart(ch) { - return (ch === '$') || (ch === '_') || (ch === '\\') || - (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || - ((ch >= '0') && (ch <= '9')) || - ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierPart.test(ch)); - } - - // 7.6.1.2 Future Reserved Words - - function isFutureReservedWord(id) { - switch (id) { - - // Future reserved words. - case 'class': - case 'enum': - case 'export': - case 'extends': - case 'import': - case 'super': - return true; - } - - return false; - } - - function isStrictModeReservedWord(id) { - switch (id) { - - // Strict Mode reserved words. - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - } - - return false; - } - - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - - // 7.6.1.1 Keywords - - function isKeyword(id) { - var keyword = false; - switch (id.length) { - case 2: - keyword = (id === 'if') || (id === 'in') || (id === 'do'); - break; - case 3: - keyword = (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); - break; - case 4: - keyword = (id === 'this') || (id === 'else') || (id === 'case') || (id === 'void') || (id === 'with'); - break; - case 5: - keyword = (id === 'while') || (id === 'break') || (id === 'catch') || (id === 'throw'); - break; - case 6: - keyword = (id === 'return') || (id === 'typeof') || (id === 'delete') || (id === 'switch'); - break; - case 7: - keyword = (id === 'default') || (id === 'finally'); - break; - case 8: - keyword = (id === 'function') || (id === 'continue') || (id === 'debugger'); - break; - case 10: - keyword = (id === 'instanceof'); - break; - } - - if (keyword) { - return true; - } - - switch (id) { - // Future reserved words. - // 'const' is specialized as Keyword in V8. - case 'const': - return true; - - // For compatiblity to SpiderMonkey and ES.next - case 'yield': - case 'let': - return true; - } - - if (strict && isStrictModeReservedWord(id)) { - return true; - } - - return isFutureReservedWord(id); - } - - // 7.4 Comments - - function skipComment() { - var ch, blockComment, lineComment; - - blockComment = false; - lineComment = false; - - while (index < length) { - ch = source[index]; - - if (lineComment) { - ch = source[index++]; - if (isLineTerminator(ch)) { - lineComment = false; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } - } else if (blockComment) { - if (isLineTerminator(ch)) { - if (ch === '\r' && source[index + 1] === '\n') { - ++index; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - ch = source[index++]; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - if (ch === '*') { - ch = source[index]; - if (ch === '/') { - ++index; - blockComment = false; - } - } - } - } else if (ch === '/') { - ch = source[index + 1]; - if (ch === '/') { - index += 2; - lineComment = true; - } else if (ch === '*') { - index += 2; - blockComment = true; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - break; - } - } else if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } else { - break; - } - } - } - - function scanHexEscape(prefix) { - var i, len, ch, code = 0; - - len = (prefix === 'u') ? 4 : 2; - for (i = 0; i < len; ++i) { - if (index < length && isHexDigit(source[index])) { - ch = source[index++]; - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } else { - return ''; - } - } - return String.fromCharCode(code); - } - - function scanIdentifier() { - var ch, start, id, restore; - - ch = source[index]; - if (!isIdentifierStart(ch)) { - return; - } - - start = index; - if (ch === '\\') { - ++index; - if (source[index] !== 'u') { - return; - } - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - if (ch === '\\' || !isIdentifierStart(ch)) { - return; - } - id = ch; - } else { - index = restore; - id = 'u'; - } - } else { - id = source[index++]; - } - - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch)) { - break; - } - if (ch === '\\') { - ++index; - if (source[index] !== 'u') { - return; - } - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - if (ch === '\\' || !isIdentifierPart(ch)) { - return; - } - id += ch; - } else { - index = restore; - id += 'u'; - } - } else { - id += source[index++]; - } - } - - // There is no keyword or literal with only one character. - // Thus, it must be an identifier. - if (id.length === 1) { - return { - type: Token.Identifier, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (isKeyword(id)) { - return { - type: Token.Keyword, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.1 Null Literals - - if (id === 'null') { - return { - type: Token.NullLiteral, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.2 Boolean Literals - - if (id === 'true' || id === 'false') { - return { - type: Token.BooleanLiteral, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - return { - type: Token.Identifier, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.7 Punctuators - - function scanPunctuator() { - var start = index, - ch1 = source[index], - ch2, - ch3, - ch4; - - // Check for most common single-character punctuators. - - if (ch1 === ';' || ch1 === '{' || ch1 === '}') { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === ',' || ch1 === '(' || ch1 === ')') { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // Dot (.) can also start a floating-point number, hence the need - // to check the next character. - - ch2 = source[index + 1]; - if (ch1 === '.' && !isDecimalDigit(ch2)) { - return { - type: Token.Punctuator, - value: source[index++], - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // Peek more characters. - - ch3 = source[index + 2]; - ch4 = source[index + 3]; - - // 4-character punctuator: >>>= - - if (ch1 === '>' && ch2 === '>' && ch3 === '>') { - if (ch4 === '=') { - index += 4; - return { - type: Token.Punctuator, - value: '>>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // 3-character punctuators: === !== >>> <<= >>= - - if (ch1 === '=' && ch2 === '=' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '===', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '!' && ch2 === '=' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '!==', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '>' && ch2 === '>' && ch3 === '>') { - index += 3; - return { - type: Token.Punctuator, - value: '>>>', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '<' && ch2 === '<' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '<<=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '>' && ch2 === '>' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 2-character punctuators: <= >= == != ++ -- << >> && || - // += -= *= %= &= |= ^= /= - - if (ch2 === '=') { - if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { - index += 2; - return { - type: Token.Punctuator, - value: ch1 + ch2, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) { - if ('+-<>&|'.indexOf(ch2) >= 0) { - index += 2; - return { - type: Token.Punctuator, - value: ch1 + ch2, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // The remaining 1-character punctuators. - - if ('[]<>+-*%&|^!~?:=/'.indexOf(ch1) >= 0) { - return { - type: Token.Punctuator, - value: source[index++], - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // 7.8.3 Numeric Literals - - function scanNumericLiteral() { - var number, start, ch; - - ch = source[index]; - assert(isDecimalDigit(ch) || (ch === '.'), - 'Numeric literal must start with a decimal digit or a decimal point'); - - start = index; - number = ''; - if (ch !== '.') { - number = source[index++]; - ch = source[index]; - - // Hex number starts with '0x'. - // Octal number starts with '0'. - if (number === '0') { - if (ch === 'x' || ch === 'X') { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isHexDigit(ch)) { - break; - } - number += source[index++]; - } - - if (number.length <= 2) { - // only 0x - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - return { - type: Token.NumericLiteral, - value: parseInt(number, 16), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } else if (isOctalDigit(ch)) { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isOctalDigit(ch)) { - break; - } - number += source[index++]; - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch) || isDecimalDigit(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - return { - type: Token.NumericLiteral, - value: parseInt(number, 8), - octal: true, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // decimal number starts with '0' such as '09' is illegal. - if (isDecimalDigit(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } - - if (ch === '.') { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } - - if (ch === 'e' || ch === 'E') { - number += source[index++]; - - ch = source[index]; - if (ch === '+' || ch === '-') { - number += source[index++]; - } - - ch = source[index]; - if (isDecimalDigit(ch)) { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } else { - ch = 'character ' + ch; - if (index >= length) { - ch = ''; - } - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - return { - type: Token.NumericLiteral, - value: parseFloat(number), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.4 String Literals - - function scanStringLiteral() { - var str = '', quote, start, ch, code, unescaped, restore, octal = false; - - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); - - start = index; - ++index; - - while (index < length) { - ch = source[index++]; - - if (ch === quote) { - quote = ''; - break; - } else if (ch === '\\') { - ch = source[index++]; - if (!isLineTerminator(ch)) { - switch (ch) { - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'u': - case 'x': - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - str += unescaped; - } else { - index = restore; - str += ch; - } - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - - default: - if (isOctalDigit(ch)) { - code = '01234567'.indexOf(ch); - - // \0 is not octal escape sequence - if (code !== 0) { - octal = true; - } - - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); - - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } - str += String.fromCharCode(code); - } else { - str += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - } - } else if (isLineTerminator(ch)) { - break; - } else { - str += ch; - } - } - - if (quote !== '') { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.StringLiteral, - value: str, - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanRegExp() { - var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false; - - buffer = null; - skipComment(); - - start = index; - ch = source[index]; - assert(ch === '/', 'Regular expression literal must start with a slash'); - str = source[index++]; - - while (index < length) { - ch = source[index++]; - str += ch; - if (ch === '\\') { - ch = source[index++]; - // ECMA-262 7.8.5 - if (isLineTerminator(ch)) { - throwError({}, Messages.UnterminatedRegExp); - } - str += ch; - } else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } else { - if (ch === '/') { - terminated = true; - break; - } else if (ch === '[') { - classMarker = true; - } else if (isLineTerminator(ch)) { - throwError({}, Messages.UnterminatedRegExp); - } - } - } - - if (!terminated) { - throwError({}, Messages.UnterminatedRegExp); - } - - // Exclude leading and trailing slash. - pattern = str.substr(1, str.length - 2); - - flags = ''; - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch)) { - break; - } - - ++index; - if (ch === '\\' && index < length) { - ch = source[index]; - if (ch === 'u') { - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - flags += ch; - str += '\\u'; - for (; restore < index; ++restore) { - str += source[restore]; - } - } else { - index = restore; - flags += 'u'; - str += '\\u'; - } - } else { - str += '\\'; - } - } else { - flags += ch; - str += ch; - } - } - - try { - value = new RegExp(pattern, flags); - } catch (e) { - throwError({}, Messages.InvalidRegExp); - } - - return { - literal: str, - value: value, - range: [start, index] - }; - } - - function isIdentifierName(token) { - return token.type === Token.Identifier || - token.type === Token.Keyword || - token.type === Token.BooleanLiteral || - token.type === Token.NullLiteral; - } - - function advance() { - var ch, token; - - skipComment(); - - if (index >= length) { - return { - type: Token.EOF, - lineNumber: lineNumber, - lineStart: lineStart, - range: [index, index] - }; - } - - token = scanPunctuator(); - if (typeof token !== 'undefined') { - return token; - } - - ch = source[index]; - - if (ch === '\'' || ch === '"') { - return scanStringLiteral(); - } - - if (ch === '.' || isDecimalDigit(ch)) { - return scanNumericLiteral(); - } - - token = scanIdentifier(); - if (typeof token !== 'undefined') { - return token; - } - - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - function lex() { - var token; - - if (buffer) { - index = buffer.range[1]; - lineNumber = buffer.lineNumber; - lineStart = buffer.lineStart; - token = buffer; - buffer = null; - return token; - } - - buffer = null; - return advance(); - } - - function lookahead() { - var pos, line, start; - - if (buffer !== null) { - return buffer; - } - - pos = index; - line = lineNumber; - start = lineStart; - buffer = advance(); - index = pos; - lineNumber = line; - lineStart = start; - - return buffer; - } - - // Return true if there is a line terminator before the next token. - - function peekLineTerminator() { - var pos, line, start, found; - - pos = index; - line = lineNumber; - start = lineStart; - skipComment(); - found = lineNumber !== line; - index = pos; - lineNumber = line; - lineStart = start; - - return found; - } - - // Throw an exception - - function throwError(token, messageFormat) { - var error, - args = Array.prototype.slice.call(arguments, 2), - msg = messageFormat.replace( - /%(\d)/g, - function (whole, index) { - return args[index] || ''; - } - ); - - if (typeof token.lineNumber === 'number') { - error = new Error('Line ' + token.lineNumber + ': ' + msg); - error.index = token.range[0]; - error.lineNumber = token.lineNumber; - error.column = token.range[0] - lineStart + 1; - } else { - error = new Error('Line ' + lineNumber + ': ' + msg); - error.index = index; - error.lineNumber = lineNumber; - error.column = index - lineStart + 1; - } - - throw error; - } - - function throwErrorTolerant() { - try { - throwError.apply(null, arguments); - } catch (e) { - if (extra.errors) { - extra.errors.push(e); - } else { - throw e; - } - } - } - - - // Throw an exception because of the token. - - function throwUnexpected(token) { - if (token.type === Token.EOF) { - throwError(token, Messages.UnexpectedEOS); - } - - if (token.type === Token.NumericLiteral) { - throwError(token, Messages.UnexpectedNumber); - } - - if (token.type === Token.StringLiteral) { - throwError(token, Messages.UnexpectedString); - } - - if (token.type === Token.Identifier) { - throwError(token, Messages.UnexpectedIdentifier); - } - - if (token.type === Token.Keyword) { - if (isFutureReservedWord(token.value)) { - throwError(token, Messages.UnexpectedReserved); - } else if (strict && isStrictModeReservedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictReservedWord); - return; - } - throwError(token, Messages.UnexpectedToken, token.value); - } - - // BooleanLiteral, NullLiteral, or Punctuator. - throwError(token, Messages.UnexpectedToken, token.value); - } - - // Expect the next token to match the specified punctuator. - // If not, an exception will be thrown. - - function expect(value) { - var token = lex(); - if (token.type !== Token.Punctuator || token.value !== value) { - throwUnexpected(token); - } - } - - // Expect the next token to match the specified keyword. - // If not, an exception will be thrown. - - function expectKeyword(keyword) { - var token = lex(); - if (token.type !== Token.Keyword || token.value !== keyword) { - throwUnexpected(token); - } - } - - // Return true if the next token matches the specified punctuator. - - function match(value) { - var token = lookahead(); - return token.type === Token.Punctuator && token.value === value; - } - - // Return true if the next token matches the specified keyword - - function matchKeyword(keyword) { - var token = lookahead(); - return token.type === Token.Keyword && token.value === keyword; - } - - // Return true if the next token is an assignment operator - - function matchAssign() { - var token = lookahead(), - op = token.value; - - if (token.type !== Token.Punctuator) { - return false; - } - return op === '=' || - op === '*=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - } - - function consumeSemicolon() { - var token, line; - - // Catch the very common case first. - if (source[index] === ';') { - lex(); - return; - } - - line = lineNumber; - skipComment(); - if (lineNumber !== line) { - return; - } - - if (match(';')) { - lex(); - return; - } - - token = lookahead(); - if (token.type !== Token.EOF && !match('}')) { - throwUnexpected(token); - } - } - - // Return true if provided expression is LeftHandSideExpression - - function isLeftHandSide(expr) { - return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; - } - - // 11.1.4 Array Initialiser - - function parseArrayInitialiser() { - var elements = []; - - expect('['); - - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else { - elements.push(parseAssignmentExpression()); - - if (!match(']')) { - expect(','); - } - } - } - - expect(']'); - - return { - type: Syntax.ArrayExpression, - elements: elements - }; - } - - // 11.1.5 Object Initialiser - - function parsePropertyFunction(param, first) { - var previousStrict, body; - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (first && strict && isRestrictedWord(param[0].name)) { - throwErrorTolerant(first, Messages.StrictParamName); - } - strict = previousStrict; - - return { - type: Syntax.FunctionExpression, - id: null, - params: param, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - function parseObjectPropertyKey() { - var token = lex(); - - // Note: This function is called only from parseObjectProperty(), where - // EOF and Punctuator tokens are already filtered out. - - if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return createLiteral(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseObjectProperty() { - var token, key, id, param; - - token = lookahead(); - - if (token.type === Token.Identifier) { - - id = parseObjectPropertyKey(); - - // Property Assignment: Getter and Setter. - - if (token.value === 'get' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - expect(')'); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction([]), - kind: 'get' - }; - } else if (token.value === 'set' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - token = lookahead(); - if (token.type !== Token.Identifier) { - expect(')'); - throwErrorTolerant(token, Messages.UnexpectedToken, token.value); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction([]), - kind: 'set' - }; - } else { - param = [ parseVariableIdentifier() ]; - expect(')'); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction(param, token), - kind: 'set' - }; - } - } else { - expect(':'); - return { - type: Syntax.Property, - key: id, - value: parseAssignmentExpression(), - kind: 'init' - }; - } - } else if (token.type === Token.EOF || token.type === Token.Punctuator) { - throwUnexpected(token); - } else { - key = parseObjectPropertyKey(); - expect(':'); - return { - type: Syntax.Property, - key: key, - value: parseAssignmentExpression(), - kind: 'init' - }; - } - } - - function parseObjectInitialiser() { - var properties = [], property, name, kind, map = {}, toString = String; - - expect('{'); - - while (!match('}')) { - property = parseObjectProperty(); - - if (property.key.type === Syntax.Identifier) { - name = property.key.name; - } else { - name = toString(property.key.value); - } - kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; - if (Object.prototype.hasOwnProperty.call(map, name)) { - if (map[name] === PropertyKind.Data) { - if (strict && kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.StrictDuplicateProperty); - } else if (kind !== PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } - } else { - if (kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } else if (map[name] & kind) { - throwErrorTolerant({}, Messages.AccessorGetSet); - } - } - map[name] |= kind; - } else { - map[name] = kind; - } - - properties.push(property); - - if (!match('}')) { - expect(','); - } - } - - expect('}'); - - return { - type: Syntax.ObjectExpression, - properties: properties - }; - } - - // 11.1.6 The Grouping Operator - - function parseGroupExpression() { - var expr; - - expect('('); - - expr = parseExpression(); - - expect(')'); - - return expr; - } - - - // 11.1 Primary Expressions - - function parsePrimaryExpression() { - var token = lookahead(), - type = token.type; - - if (type === Token.Identifier) { - return { - type: Syntax.Identifier, - name: lex().value - }; - } - - if (type === Token.StringLiteral || type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return createLiteral(lex()); - } - - if (type === Token.Keyword) { - if (matchKeyword('this')) { - lex(); - return { - type: Syntax.ThisExpression - }; - } - - if (matchKeyword('function')) { - return parseFunctionExpression(); - } - } - - if (type === Token.BooleanLiteral) { - lex(); - token.value = (token.value === 'true'); - return createLiteral(token); - } - - if (type === Token.NullLiteral) { - lex(); - token.value = null; - return createLiteral(token); - } - - if (match('[')) { - return parseArrayInitialiser(); - } - - if (match('{')) { - return parseObjectInitialiser(); - } - - if (match('(')) { - return parseGroupExpression(); - } - - if (match('/') || match('/=')) { - return createLiteral(scanRegExp()); - } - - return throwUnexpected(lex()); - } - - // 11.2 Left-Hand-Side Expressions - - function parseArguments() { - var args = []; - - expect('('); - - if (!match(')')) { - while (index < length) { - args.push(parseAssignmentExpression()); - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - return args; - } - - function parseNonComputedProperty() { - var token = lex(); - - if (!isIdentifierName(token)) { - throwUnexpected(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseNonComputedMember() { - expect('.'); - - return parseNonComputedProperty(); - } - - function parseComputedMember() { - var expr; - - expect('['); - - expr = parseExpression(); - - expect(']'); - - return expr; - } - - function parseNewExpression() { - var expr; - - expectKeyword('new'); - - expr = { - type: Syntax.NewExpression, - callee: parseLeftHandSideExpression(), - 'arguments': [] - }; - - if (match('(')) { - expr['arguments'] = parseArguments(); - } - - return expr; - } - - function parseLeftHandSideExpressionAllowCall() { - var expr; - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || match('(')) { - if (match('(')) { - expr = { - type: Syntax.CallExpression, - callee: expr, - 'arguments': parseArguments() - }; - } else if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - } - } - - return expr; - } - - - function parseLeftHandSideExpression() { - var expr; - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[')) { - if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - } - } - - return expr; - } - - // 11.3 Postfix Expressions - - function parsePostfixExpression() { - var expr = parseLeftHandSideExpressionAllowCall(), token; - - token = lookahead(); - if (token.type !== Token.Punctuator) { - return expr; - } - - if ((match('++') || match('--')) && !peekLineTerminator()) { - // 11.3.1, 11.3.2 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPostfix); - } - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - expr = { - type: Syntax.UpdateExpression, - operator: lex().value, - argument: expr, - prefix: false - }; - } - - return expr; - } - - // 11.4 Unary Operators - - function parseUnaryExpression() { - var token, expr; - - token = lookahead(); - if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { - return parsePostfixExpression(); - } - - if (match('++') || match('--')) { - token = lex(); - expr = parseUnaryExpression(); - // 11.4.4, 11.4.5 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPrefix); - } - - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - expr = { - type: Syntax.UpdateExpression, - operator: token.value, - argument: expr, - prefix: true - }; - return expr; - } - - if (match('+') || match('-') || match('~') || match('!')) { - expr = { - type: Syntax.UnaryExpression, - operator: lex().value, - argument: parseUnaryExpression(), - prefix: true - }; - return expr; - } - - if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { - expr = { - type: Syntax.UnaryExpression, - operator: lex().value, - argument: parseUnaryExpression(), - prefix: true - }; - if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { - throwErrorTolerant({}, Messages.StrictDelete); - } - return expr; - } - - return parsePostfixExpression(); - } - - // 11.5 Multiplicative Operators - - function parseMultiplicativeExpression() { - var expr = parseUnaryExpression(); - - while (match('*') || match('/') || match('%')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseUnaryExpression() - }; - } - - return expr; - } - - // 11.6 Additive Operators - - function parseAdditiveExpression() { - var expr = parseMultiplicativeExpression(); - - while (match('+') || match('-')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseMultiplicativeExpression() - }; - } - - return expr; - } - - // 11.7 Bitwise Shift Operators - - function parseShiftExpression() { - var expr = parseAdditiveExpression(); - - while (match('<<') || match('>>') || match('>>>')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseAdditiveExpression() - }; - } - - return expr; - } - // 11.8 Relational Operators - - function parseRelationalExpression() { - var expr, previousAllowIn; - - previousAllowIn = state.allowIn; - state.allowIn = true; - - expr = parseShiftExpression(); - - while (match('<') || match('>') || match('<=') || match('>=') || (previousAllowIn && matchKeyword('in')) || matchKeyword('instanceof')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseShiftExpression() - }; - } - - state.allowIn = previousAllowIn; - return expr; - } - - // 11.9 Equality Operators - - function parseEqualityExpression() { - var expr = parseRelationalExpression(); - - while (match('==') || match('!=') || match('===') || match('!==')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseRelationalExpression() - }; - } - - return expr; - } - - // 11.10 Binary Bitwise Operators - - function parseBitwiseANDExpression() { - var expr = parseEqualityExpression(); - - while (match('&')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '&', - left: expr, - right: parseEqualityExpression() - }; - } - - return expr; - } - - function parseBitwiseXORExpression() { - var expr = parseBitwiseANDExpression(); - - while (match('^')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '^', - left: expr, - right: parseBitwiseANDExpression() - }; - } - - return expr; - } - - function parseBitwiseORExpression() { - var expr = parseBitwiseXORExpression(); - - while (match('|')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '|', - left: expr, - right: parseBitwiseXORExpression() - }; - } - - return expr; - } - - // 11.11 Binary Logical Operators - - function parseLogicalANDExpression() { - var expr = parseBitwiseORExpression(); - - while (match('&&')) { - lex(); - expr = { - type: Syntax.LogicalExpression, - operator: '&&', - left: expr, - right: parseBitwiseORExpression() - }; - } - - return expr; - } - - function parseLogicalORExpression() { - var expr = parseLogicalANDExpression(); - - while (match('||')) { - lex(); - expr = { - type: Syntax.LogicalExpression, - operator: '||', - left: expr, - right: parseLogicalANDExpression() - }; - } - - return expr; - } - - // 11.12 Conditional Operator - - function parseConditionalExpression() { - var expr, previousAllowIn, consequent; - - expr = parseLogicalORExpression(); - - if (match('?')) { - lex(); - previousAllowIn = state.allowIn; - state.allowIn = true; - consequent = parseAssignmentExpression(); - state.allowIn = previousAllowIn; - expect(':'); - - expr = { - type: Syntax.ConditionalExpression, - test: expr, - consequent: consequent, - alternate: parseAssignmentExpression() - }; - } - - return expr; - } - - // 11.13 Assignment Operators - - function parseAssignmentExpression() { - var token, expr; - - token = lookahead(); - expr = parseConditionalExpression(); - - if (matchAssign()) { - // LeftHandSideExpression - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - // 11.13.1 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant(token, Messages.StrictLHSAssignment); - } - - expr = { - type: Syntax.AssignmentExpression, - operator: lex().value, - left: expr, - right: parseAssignmentExpression() - }; - } - - return expr; - } - - // 11.14 Comma Operator - - function parseExpression() { - var expr = parseAssignmentExpression(); - - if (match(',')) { - expr = { - type: Syntax.SequenceExpression, - expressions: [ expr ] - }; - - while (index < length) { - if (!match(',')) { - break; - } - lex(); - expr.expressions.push(parseAssignmentExpression()); - } - - } - return expr; - } - - // 12.1 Block - - function parseStatementList() { - var list = [], - statement; - - while (index < length) { - if (match('}')) { - break; - } - statement = parseSourceElement(); - if (typeof statement === 'undefined') { - break; - } - list.push(statement); - } - - return list; - } - - function parseBlock() { - var block; - - expect('{'); - - block = parseStatementList(); - - expect('}'); - - return { - type: Syntax.BlockStatement, - body: block - }; - } - - // 12.2 Variable Statement - - function parseVariableIdentifier() { - var token = lex(); - - if (token.type !== Token.Identifier) { - throwUnexpected(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseVariableDeclaration(kind) { - var id = parseVariableIdentifier(), - init = null; - - // 12.2.1 - if (strict && isRestrictedWord(id.name)) { - throwErrorTolerant({}, Messages.StrictVarName); - } - - if (kind === 'const') { - expect('='); - init = parseAssignmentExpression(); - } else if (match('=')) { - lex(); - init = parseAssignmentExpression(); - } - - return { - type: Syntax.VariableDeclarator, - id: id, - init: init - }; - } - - function parseVariableDeclarationList(kind) { - var list = []; - - do { - list.push(parseVariableDeclaration(kind)); - if (!match(',')) { - break; - } - lex(); - } while (index < length); - - return list; - } - - function parseVariableStatement() { - var declarations; - - expectKeyword('var'); - - declarations = parseVariableDeclarationList(); - - consumeSemicolon(); - - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: 'var' - }; - } - - // kind may be `const` or `let` - // Both are experimental and not in the specification yet. - // see http://wiki.ecmascript.org/doku.php?id=harmony:const - // and http://wiki.ecmascript.org/doku.php?id=harmony:let - function parseConstLetDeclaration(kind) { - var declarations; - - expectKeyword(kind); - - declarations = parseVariableDeclarationList(kind); - - consumeSemicolon(); - - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: kind - }; - } - - // 12.3 Empty Statement - - function parseEmptyStatement() { - expect(';'); - - return { - type: Syntax.EmptyStatement - }; - } - - // 12.4 Expression Statement - - function parseExpressionStatement() { - var expr = parseExpression(); - - consumeSemicolon(); - - return { - type: Syntax.ExpressionStatement, - expression: expr - }; - } - - // 12.5 If statement - - function parseIfStatement() { - var test, consequent, alternate; - - expectKeyword('if'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - consequent = parseStatement(); - - if (matchKeyword('else')) { - lex(); - alternate = parseStatement(); - } else { - alternate = null; - } - - return { - type: Syntax.IfStatement, - test: test, - consequent: consequent, - alternate: alternate - }; - } - - // 12.6 Iteration Statements - - function parseDoWhileStatement() { - var body, test, oldInIteration; - - expectKeyword('do'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - if (match(';')) { - lex(); - } - - return { - type: Syntax.DoWhileStatement, - body: body, - test: test - }; - } - - function parseWhileStatement() { - var test, body, oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - return { - type: Syntax.WhileStatement, - test: test, - body: body - }; - } - - function parseForVariableDeclaration() { - var token = lex(); - - return { - type: Syntax.VariableDeclaration, - declarations: parseVariableDeclarationList(), - kind: token.value - }; - } - - function parseForStatement() { - var init, test, update, left, right, body, oldInIteration; - - init = test = update = null; - - expectKeyword('for'); - - expect('('); - - if (match(';')) { - lex(); - } else { - if (matchKeyword('var') || matchKeyword('let')) { - state.allowIn = false; - init = parseForVariableDeclaration(); - state.allowIn = true; - - if (init.declarations.length === 1 && matchKeyword('in')) { - lex(); - left = init; - right = parseExpression(); - init = null; - } - } else { - state.allowIn = false; - init = parseExpression(); - state.allowIn = true; - - if (matchKeyword('in')) { - // LeftHandSideExpression - if (!isLeftHandSide(init)) { - throwErrorTolerant({}, Messages.InvalidLHSInForIn); - } - - lex(); - left = init; - right = parseExpression(); - init = null; - } - } - - if (typeof left === 'undefined') { - expect(';'); - } - } - - if (typeof left === 'undefined') { - - if (!match(';')) { - test = parseExpression(); - } - expect(';'); - - if (!match(')')) { - update = parseExpression(); - } - } - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - if (typeof left === 'undefined') { - return { - type: Syntax.ForStatement, - init: init, - test: test, - update: update, - body: body - }; - } - - return { - type: Syntax.ForInStatement, - left: left, - right: right, - body: body, - each: false - }; - } - - // 12.7 The continue statement - - function parseContinueStatement() { - var token, label = null; - - expectKeyword('continue'); - - // Optimize the most common form: 'continue;'. - if (source[index] === ';') { - lex(); - - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: null - }; - } - - if (peekLineTerminator()) { - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: null - }; - } - - token = lookahead(); - if (token.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: label - }; - } - - // 12.8 The break statement - - function parseBreakStatement() { - var token, label = null; - - expectKeyword('break'); - - // Optimize the most common form: 'break;'. - if (source[index] === ';') { - lex(); - - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: null - }; - } - - if (peekLineTerminator()) { - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: null - }; - } - - token = lookahead(); - if (token.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: label - }; - } - - // 12.9 The return statement - - function parseReturnStatement() { - var token, argument = null; - - expectKeyword('return'); - - if (!state.inFunctionBody) { - throwErrorTolerant({}, Messages.IllegalReturn); - } - - // 'return' followed by a space and an identifier is very common. - if (source[index] === ' ') { - if (isIdentifierStart(source[index + 1])) { - argument = parseExpression(); - consumeSemicolon(); - return { - type: Syntax.ReturnStatement, - argument: argument - }; - } - } - - if (peekLineTerminator()) { - return { - type: Syntax.ReturnStatement, - argument: null - }; - } - - if (!match(';')) { - token = lookahead(); - if (!match('}') && token.type !== Token.EOF) { - argument = parseExpression(); - } - } - - consumeSemicolon(); - - return { - type: Syntax.ReturnStatement, - argument: argument - }; - } - - // 12.10 The with statement - - function parseWithStatement() { - var object, body; - - if (strict) { - throwErrorTolerant({}, Messages.StrictModeWith); - } - - expectKeyword('with'); - - expect('('); - - object = parseExpression(); - - expect(')'); - - body = parseStatement(); - - return { - type: Syntax.WithStatement, - object: object, - body: body - }; - } - - // 12.10 The swith statement - - function parseSwitchCase() { - var test, - consequent = [], - statement; - - if (matchKeyword('default')) { - lex(); - test = null; - } else { - expectKeyword('case'); - test = parseExpression(); - } - expect(':'); - - while (index < length) { - if (match('}') || matchKeyword('default') || matchKeyword('case')) { - break; - } - statement = parseStatement(); - if (typeof statement === 'undefined') { - break; - } - consequent.push(statement); - } - - return { - type: Syntax.SwitchCase, - test: test, - consequent: consequent - }; - } - - function parseSwitchStatement() { - var discriminant, cases, clause, oldInSwitch, defaultFound; - - expectKeyword('switch'); - - expect('('); - - discriminant = parseExpression(); - - expect(')'); - - expect('{'); - - cases = []; - - if (match('}')) { - lex(); - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - } - - oldInSwitch = state.inSwitch; - state.inSwitch = true; - defaultFound = false; - - while (index < length) { - if (match('}')) { - break; - } - clause = parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - throwError({}, Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); - } - - state.inSwitch = oldInSwitch; - - expect('}'); - - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - } - - // 12.13 The throw statement - - function parseThrowStatement() { - var argument; - - expectKeyword('throw'); - - if (peekLineTerminator()) { - throwError({}, Messages.NewlineAfterThrow); - } - - argument = parseExpression(); - - consumeSemicolon(); - - return { - type: Syntax.ThrowStatement, - argument: argument - }; - } - - // 12.14 The try statement - - function parseCatchClause() { - var param; - - expectKeyword('catch'); - - expect('('); - if (match(')')) { - throwUnexpected(lookahead()); - } - - param = parseVariableIdentifier(); - // 12.14.1 - if (strict && isRestrictedWord(param.name)) { - throwErrorTolerant({}, Messages.StrictCatchVariable); - } - - expect(')'); - - return { - type: Syntax.CatchClause, - param: param, - body: parseBlock() - }; - } - - function parseTryStatement() { - var block, handlers = [], finalizer = null; - - expectKeyword('try'); - - block = parseBlock(); - - if (matchKeyword('catch')) { - handlers.push(parseCatchClause()); - } - - if (matchKeyword('finally')) { - lex(); - finalizer = parseBlock(); - } - - if (handlers.length === 0 && !finalizer) { - throwError({}, Messages.NoCatchOrFinally); - } - - return { - type: Syntax.TryStatement, - block: block, - guardedHandlers: [], - handlers: handlers, - finalizer: finalizer - }; - } - - // 12.15 The debugger statement - - function parseDebuggerStatement() { - expectKeyword('debugger'); - - consumeSemicolon(); - - return { - type: Syntax.DebuggerStatement - }; - } - - // 12 Statements - - function parseStatement() { - var token = lookahead(), - expr, - labeledBody; - - if (token.type === Token.EOF) { - throwUnexpected(token); - } - - if (token.type === Token.Punctuator) { - switch (token.value) { - case ';': - return parseEmptyStatement(); - case '{': - return parseBlock(); - case '(': - return parseExpressionStatement(); - default: - break; - } - } - - if (token.type === Token.Keyword) { - switch (token.value) { - case 'break': - return parseBreakStatement(); - case 'continue': - return parseContinueStatement(); - case 'debugger': - return parseDebuggerStatement(); - case 'do': - return parseDoWhileStatement(); - case 'for': - return parseForStatement(); - case 'function': - return parseFunctionDeclaration(); - case 'if': - return parseIfStatement(); - case 'return': - return parseReturnStatement(); - case 'switch': - return parseSwitchStatement(); - case 'throw': - return parseThrowStatement(); - case 'try': - return parseTryStatement(); - case 'var': - return parseVariableStatement(); - case 'while': - return parseWhileStatement(); - case 'with': - return parseWithStatement(); - default: - break; - } - } - - expr = parseExpression(); - - // 12.12 Labelled Statements - if ((expr.type === Syntax.Identifier) && match(':')) { - lex(); - - if (Object.prototype.hasOwnProperty.call(state.labelSet, expr.name)) { - throwError({}, Messages.Redeclaration, 'Label', expr.name); - } - - state.labelSet[expr.name] = true; - labeledBody = parseStatement(); - delete state.labelSet[expr.name]; - - return { - type: Syntax.LabeledStatement, - label: expr, - body: labeledBody - }; - } - - consumeSemicolon(); - - return { - type: Syntax.ExpressionStatement, - expression: expr - }; - } - - // 13 Function Definition - - function parseFunctionSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted, - oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody; - - expect('{'); - - while (index < length) { - token = lookahead(); - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = sliceSource(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - oldLabelSet = state.labelSet; - oldInIteration = state.inIteration; - oldInSwitch = state.inSwitch; - oldInFunctionBody = state.inFunctionBody; - - state.labelSet = {}; - state.inIteration = false; - state.inSwitch = false; - state.inFunctionBody = true; - - while (index < length) { - if (match('}')) { - break; - } - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - - expect('}'); - - state.labelSet = oldLabelSet; - state.inIteration = oldInIteration; - state.inSwitch = oldInSwitch; - state.inFunctionBody = oldInFunctionBody; - - return { - type: Syntax.BlockStatement, - body: sourceElements - }; - } - - function parseFunctionDeclaration() { - var id, param, params = [], body, token, stricted, firstRestricted, message, previousStrict, paramSet; - - expectKeyword('function'); - token = lookahead(); - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - - expect('('); - - if (!match(')')) { - paramSet = {}; - while (index < length) { - token = lookahead(); - param = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - stricted = token; - message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - stricted = token; - message = Messages.StrictParamDupe; - } - } else if (!firstRestricted) { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - firstRestricted = token; - message = Messages.StrictParamDupe; - } - } - params.push(param); - paramSet[param.name] = true; - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return { - type: Syntax.FunctionDeclaration, - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - function parseFunctionExpression() { - var token, id = null, stricted, firstRestricted, message, param, params = [], body, previousStrict, paramSet; - - expectKeyword('function'); - - if (!match('(')) { - token = lookahead(); - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } - - expect('('); - - if (!match(')')) { - paramSet = {}; - while (index < length) { - token = lookahead(); - param = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - stricted = token; - message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - stricted = token; - message = Messages.StrictParamDupe; - } - } else if (!firstRestricted) { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - firstRestricted = token; - message = Messages.StrictParamDupe; - } - } - params.push(param); - paramSet[param.name] = true; - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return { - type: Syntax.FunctionExpression, - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - // 14 Program - - function parseSourceElement() { - var token = lookahead(); - - if (token.type === Token.Keyword) { - switch (token.value) { - case 'const': - case 'let': - return parseConstLetDeclaration(token.value); - case 'function': - return parseFunctionDeclaration(); - default: - return parseStatement(); - } - } - - if (token.type !== Token.EOF) { - return parseStatement(); - } - } - - function parseSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted; - - while (index < length) { - token = lookahead(); - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = sliceSource(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - while (index < length) { - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - return sourceElements; - } - - function parseProgram() { - var program; - strict = false; - program = { - type: Syntax.Program, - body: parseSourceElements() - }; - return program; - } - - // The following functions are needed only when the option to preserve - // the comments is active. - - function addComment(type, value, start, end, loc) { - assert(typeof start === 'number', 'Comment must have valid position'); - - // Because the way the actual token is scanned, often the comments - // (if any) are skipped twice during the lexical analysis. - // Thus, we need to skip adding a comment if the comment array already - // handled it. - if (extra.comments.length > 0) { - if (extra.comments[extra.comments.length - 1].range[1] > start) { - return; - } - } - - extra.comments.push({ - type: type, - value: value, - range: [start, end], - loc: loc - }); - } - - function scanComment() { - var comment, ch, loc, start, blockComment, lineComment; - - comment = ''; - blockComment = false; - lineComment = false; - - while (index < length) { - ch = source[index]; - - if (lineComment) { - ch = source[index++]; - if (isLineTerminator(ch)) { - loc.end = { - line: lineNumber, - column: index - lineStart - 1 - }; - lineComment = false; - addComment('Line', comment, start, index - 1, loc); - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - comment = ''; - } else if (index >= length) { - lineComment = false; - comment += ch; - loc.end = { - line: lineNumber, - column: length - lineStart - }; - addComment('Line', comment, start, length, loc); - } else { - comment += ch; - } - } else if (blockComment) { - if (isLineTerminator(ch)) { - if (ch === '\r' && source[index + 1] === '\n') { - ++index; - comment += '\r\n'; - } else { - comment += ch; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - ch = source[index++]; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - comment += ch; - if (ch === '*') { - ch = source[index]; - if (ch === '/') { - comment = comment.substr(0, comment.length - 1); - blockComment = false; - ++index; - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Block', comment, start, index, loc); - comment = ''; - } - } - } - } else if (ch === '/') { - ch = source[index + 1]; - if (ch === '/') { - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - start = index; - index += 2; - lineComment = true; - if (index >= length) { - loc.end = { - line: lineNumber, - column: index - lineStart - }; - lineComment = false; - addComment('Line', comment, start, index, loc); - } - } else if (ch === '*') { - start = index; - index += 2; - blockComment = true; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - break; - } - } else if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } else { - break; - } - } - } - - function filterCommentLocation() { - var i, entry, comment, comments = []; - - for (i = 0; i < extra.comments.length; ++i) { - entry = extra.comments[i]; - comment = { - type: entry.type, - value: entry.value - }; - if (extra.range) { - comment.range = entry.range; - } - if (extra.loc) { - comment.loc = entry.loc; - } - comments.push(comment); - } - - extra.comments = comments; - } - - function collectToken() { - var start, loc, token, range, value; - - skipComment(); - start = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - token = extra.advance(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - if (token.type !== Token.EOF) { - range = [token.range[0], token.range[1]]; - value = sliceSource(token.range[0], token.range[1]); - extra.tokens.push({ - type: TokenName[token.type], - value: value, - range: range, - loc: loc - }); - } - - return token; - } - - function collectRegex() { - var pos, loc, regex, token; - - skipComment(); - - pos = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - regex = extra.scanRegExp(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - // Pop the previous token, which is likely '/' or '/=' - if (extra.tokens.length > 0) { - token = extra.tokens[extra.tokens.length - 1]; - if (token.range[0] === pos && token.type === 'Punctuator') { - if (token.value === '/' || token.value === '/=') { - extra.tokens.pop(); - } - } - } - - extra.tokens.push({ - type: 'RegularExpression', - value: regex.literal, - range: [pos, index], - loc: loc - }); - - return regex; - } - - function filterTokenLocation() { - var i, entry, token, tokens = []; - - for (i = 0; i < extra.tokens.length; ++i) { - entry = extra.tokens[i]; - token = { - type: entry.type, - value: entry.value - }; - if (extra.range) { - token.range = entry.range; - } - if (extra.loc) { - token.loc = entry.loc; - } - tokens.push(token); - } - - extra.tokens = tokens; - } - - function createLiteral(token) { - return { - type: Syntax.Literal, - value: token.value - }; - } - - function createRawLiteral(token) { - return { - type: Syntax.Literal, - value: token.value, - raw: sliceSource(token.range[0], token.range[1]) - }; - } - - function createLocationMarker() { - var marker = {}; - - marker.range = [index, index]; - marker.loc = { - start: { - line: lineNumber, - column: index - lineStart - }, - end: { - line: lineNumber, - column: index - lineStart - } - }; - - marker.end = function () { - this.range[1] = index; - this.loc.end.line = lineNumber; - this.loc.end.column = index - lineStart; - }; - - marker.applyGroup = function (node) { - if (extra.range) { - node.groupRange = [this.range[0], this.range[1]]; - } - if (extra.loc) { - node.groupLoc = { - start: { - line: this.loc.start.line, - column: this.loc.start.column - }, - end: { - line: this.loc.end.line, - column: this.loc.end.column - } - }; - } - }; - - marker.apply = function (node) { - if (extra.range) { - node.range = [this.range[0], this.range[1]]; - } - if (extra.loc) { - node.loc = { - start: { - line: this.loc.start.line, - column: this.loc.start.column - }, - end: { - line: this.loc.end.line, - column: this.loc.end.column - } - }; - } - }; - - return marker; - } - - function trackGroupExpression() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - expect('('); - - expr = parseExpression(); - - expect(')'); - - marker.end(); - marker.applyGroup(expr); - - return expr; - } - - function trackLeftHandSideExpression() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[')) { - if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - marker.end(); - marker.apply(expr); - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - marker.end(); - marker.apply(expr); - } - } - - return expr; - } - - function trackLeftHandSideExpressionAllowCall() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || match('(')) { - if (match('(')) { - expr = { - type: Syntax.CallExpression, - callee: expr, - 'arguments': parseArguments() - }; - marker.end(); - marker.apply(expr); - } else if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - marker.end(); - marker.apply(expr); - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - marker.end(); - marker.apply(expr); - } - } - - return expr; - } - - function filterGroup(node) { - var n, i, entry; - - n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {}; - for (i in node) { - if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') { - entry = node[i]; - if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) { - n[i] = entry; - } else { - n[i] = filterGroup(entry); - } - } - } - return n; - } - - function wrapTrackingFunction(range, loc) { - - return function (parseFunction) { - - function isBinary(node) { - return node.type === Syntax.LogicalExpression || - node.type === Syntax.BinaryExpression; - } - - function visit(node) { - var start, end; - - if (isBinary(node.left)) { - visit(node.left); - } - if (isBinary(node.right)) { - visit(node.right); - } - - if (range) { - if (node.left.groupRange || node.right.groupRange) { - start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0]; - end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1]; - node.range = [start, end]; - } else if (typeof node.range === 'undefined') { - start = node.left.range[0]; - end = node.right.range[1]; - node.range = [start, end]; - } - } - if (loc) { - if (node.left.groupLoc || node.right.groupLoc) { - start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start; - end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end; - node.loc = { - start: start, - end: end - }; - } else if (typeof node.loc === 'undefined') { - node.loc = { - start: node.left.loc.start, - end: node.right.loc.end - }; - } - } - } - - return function () { - var marker, node; - - skipComment(); - - marker = createLocationMarker(); - node = parseFunction.apply(null, arguments); - marker.end(); - - if (range && typeof node.range === 'undefined') { - marker.apply(node); - } - - if (loc && typeof node.loc === 'undefined') { - marker.apply(node); - } - - if (isBinary(node)) { - visit(node); - } - - return node; - }; - }; - } - - function patch() { - - var wrapTracking; - - if (extra.comments) { - extra.skipComment = skipComment; - skipComment = scanComment; - } - - if (extra.raw) { - extra.createLiteral = createLiteral; - createLiteral = createRawLiteral; - } - - if (extra.range || extra.loc) { - - extra.parseGroupExpression = parseGroupExpression; - extra.parseLeftHandSideExpression = parseLeftHandSideExpression; - extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall; - parseGroupExpression = trackGroupExpression; - parseLeftHandSideExpression = trackLeftHandSideExpression; - parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall; - - wrapTracking = wrapTrackingFunction(extra.range, extra.loc); - - extra.parseAdditiveExpression = parseAdditiveExpression; - extra.parseAssignmentExpression = parseAssignmentExpression; - extra.parseBitwiseANDExpression = parseBitwiseANDExpression; - extra.parseBitwiseORExpression = parseBitwiseORExpression; - extra.parseBitwiseXORExpression = parseBitwiseXORExpression; - extra.parseBlock = parseBlock; - extra.parseFunctionSourceElements = parseFunctionSourceElements; - extra.parseCatchClause = parseCatchClause; - extra.parseComputedMember = parseComputedMember; - extra.parseConditionalExpression = parseConditionalExpression; - extra.parseConstLetDeclaration = parseConstLetDeclaration; - extra.parseEqualityExpression = parseEqualityExpression; - extra.parseExpression = parseExpression; - extra.parseForVariableDeclaration = parseForVariableDeclaration; - extra.parseFunctionDeclaration = parseFunctionDeclaration; - extra.parseFunctionExpression = parseFunctionExpression; - extra.parseLogicalANDExpression = parseLogicalANDExpression; - extra.parseLogicalORExpression = parseLogicalORExpression; - extra.parseMultiplicativeExpression = parseMultiplicativeExpression; - extra.parseNewExpression = parseNewExpression; - extra.parseNonComputedProperty = parseNonComputedProperty; - extra.parseObjectProperty = parseObjectProperty; - extra.parseObjectPropertyKey = parseObjectPropertyKey; - extra.parsePostfixExpression = parsePostfixExpression; - extra.parsePrimaryExpression = parsePrimaryExpression; - extra.parseProgram = parseProgram; - extra.parsePropertyFunction = parsePropertyFunction; - extra.parseRelationalExpression = parseRelationalExpression; - extra.parseStatement = parseStatement; - extra.parseShiftExpression = parseShiftExpression; - extra.parseSwitchCase = parseSwitchCase; - extra.parseUnaryExpression = parseUnaryExpression; - extra.parseVariableDeclaration = parseVariableDeclaration; - extra.parseVariableIdentifier = parseVariableIdentifier; - - parseAdditiveExpression = wrapTracking(extra.parseAdditiveExpression); - parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression); - parseBitwiseANDExpression = wrapTracking(extra.parseBitwiseANDExpression); - parseBitwiseORExpression = wrapTracking(extra.parseBitwiseORExpression); - parseBitwiseXORExpression = wrapTracking(extra.parseBitwiseXORExpression); - parseBlock = wrapTracking(extra.parseBlock); - parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements); - parseCatchClause = wrapTracking(extra.parseCatchClause); - parseComputedMember = wrapTracking(extra.parseComputedMember); - parseConditionalExpression = wrapTracking(extra.parseConditionalExpression); - parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration); - parseEqualityExpression = wrapTracking(extra.parseEqualityExpression); - parseExpression = wrapTracking(extra.parseExpression); - parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration); - parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration); - parseFunctionExpression = wrapTracking(extra.parseFunctionExpression); - parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression); - parseLogicalANDExpression = wrapTracking(extra.parseLogicalANDExpression); - parseLogicalORExpression = wrapTracking(extra.parseLogicalORExpression); - parseMultiplicativeExpression = wrapTracking(extra.parseMultiplicativeExpression); - parseNewExpression = wrapTracking(extra.parseNewExpression); - parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty); - parseObjectProperty = wrapTracking(extra.parseObjectProperty); - parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey); - parsePostfixExpression = wrapTracking(extra.parsePostfixExpression); - parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression); - parseProgram = wrapTracking(extra.parseProgram); - parsePropertyFunction = wrapTracking(extra.parsePropertyFunction); - parseRelationalExpression = wrapTracking(extra.parseRelationalExpression); - parseStatement = wrapTracking(extra.parseStatement); - parseShiftExpression = wrapTracking(extra.parseShiftExpression); - parseSwitchCase = wrapTracking(extra.parseSwitchCase); - parseUnaryExpression = wrapTracking(extra.parseUnaryExpression); - parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration); - parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier); - } - - if (typeof extra.tokens !== 'undefined') { - extra.advance = advance; - extra.scanRegExp = scanRegExp; - - advance = collectToken; - scanRegExp = collectRegex; - } - } - - function unpatch() { - if (typeof extra.skipComment === 'function') { - skipComment = extra.skipComment; - } - - if (extra.raw) { - createLiteral = extra.createLiteral; - } - - if (extra.range || extra.loc) { - parseAdditiveExpression = extra.parseAdditiveExpression; - parseAssignmentExpression = extra.parseAssignmentExpression; - parseBitwiseANDExpression = extra.parseBitwiseANDExpression; - parseBitwiseORExpression = extra.parseBitwiseORExpression; - parseBitwiseXORExpression = extra.parseBitwiseXORExpression; - parseBlock = extra.parseBlock; - parseFunctionSourceElements = extra.parseFunctionSourceElements; - parseCatchClause = extra.parseCatchClause; - parseComputedMember = extra.parseComputedMember; - parseConditionalExpression = extra.parseConditionalExpression; - parseConstLetDeclaration = extra.parseConstLetDeclaration; - parseEqualityExpression = extra.parseEqualityExpression; - parseExpression = extra.parseExpression; - parseForVariableDeclaration = extra.parseForVariableDeclaration; - parseFunctionDeclaration = extra.parseFunctionDeclaration; - parseFunctionExpression = extra.parseFunctionExpression; - parseGroupExpression = extra.parseGroupExpression; - parseLeftHandSideExpression = extra.parseLeftHandSideExpression; - parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall; - parseLogicalANDExpression = extra.parseLogicalANDExpression; - parseLogicalORExpression = extra.parseLogicalORExpression; - parseMultiplicativeExpression = extra.parseMultiplicativeExpression; - parseNewExpression = extra.parseNewExpression; - parseNonComputedProperty = extra.parseNonComputedProperty; - parseObjectProperty = extra.parseObjectProperty; - parseObjectPropertyKey = extra.parseObjectPropertyKey; - parsePrimaryExpression = extra.parsePrimaryExpression; - parsePostfixExpression = extra.parsePostfixExpression; - parseProgram = extra.parseProgram; - parsePropertyFunction = extra.parsePropertyFunction; - parseRelationalExpression = extra.parseRelationalExpression; - parseStatement = extra.parseStatement; - parseShiftExpression = extra.parseShiftExpression; - parseSwitchCase = extra.parseSwitchCase; - parseUnaryExpression = extra.parseUnaryExpression; - parseVariableDeclaration = extra.parseVariableDeclaration; - parseVariableIdentifier = extra.parseVariableIdentifier; - } - - if (typeof extra.scanRegExp === 'function') { - advance = extra.advance; - scanRegExp = extra.scanRegExp; - } - } - - function stringToArray(str) { - var length = str.length, - result = [], - i; - for (i = 0; i < length; ++i) { - result[i] = str.charAt(i); - } - return result; - } - - function parse(code, options) { - var program, toString; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - length = source.length; - buffer = null; - state = { - allowIn: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false - }; - - extra = {}; - if (typeof options !== 'undefined') { - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - extra.raw = (typeof options.raw === 'boolean') && options.raw; - if (typeof options.tokens === 'boolean' && options.tokens) { - extra.tokens = []; - } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - } - - if (length > 0) { - if (typeof source[0] === 'undefined') { - // Try first to convert to a string. This is good as fast path - // for old IE which understands string indexing for string - // literals only and not for string object. - if (code instanceof String) { - source = code.valueOf(); - } - - // Force accessing the characters via an array. - if (typeof source[0] === 'undefined') { - source = stringToArray(code); - } - } - } - - patch(); - try { - program = parseProgram(); - if (typeof extra.comments !== 'undefined') { - filterCommentLocation(); - program.comments = extra.comments; - } - if (typeof extra.tokens !== 'undefined') { - filterTokenLocation(); - program.tokens = extra.tokens; - } - if (typeof extra.errors !== 'undefined') { - program.errors = extra.errors; - } - if (extra.range || extra.loc) { - program.body = filterGroup(program.body); - } - } catch (e) { - throw e; - } finally { - unpatch(); - extra = {}; - } - - return program; - } - - // Sync with package.json. - exports.version = '1.0.4'; - - exports.parse = parse; - - // Deep copy. - exports.Syntax = (function () { - var name, types = {}; - - if (typeof Object.create === 'function') { - types = Object.create(null); - } - - for (name in Syntax) { - if (Syntax.hasOwnProperty(name)) { - types[name] = Syntax[name]; - } - } - - if (typeof Object.freeze === 'function') { - Object.freeze(types); - } - - return types; - }()); - -})); -/* vim: set sw=4 ts=4 et tw=80 : */ -/** - * @license Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*global define, Reflect */ - -/* - * xpcshell has a smaller stack on linux and windows (1MB vs 9MB on mac), - * and the recursive nature of esprima can cause it to overflow pretty - * quickly. So favor it built in Reflect parser: - * https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - */ -define('esprimaAdapter', ['./esprima', 'env'], function (esprima, env) { - if (env.get() === 'xpconnect' && typeof Reflect !== 'undefined') { - return Reflect; - } else { - return esprima; - } -}); -define('uglifyjs/consolidator', ["require", "exports", "module", "./parse-js", "./process"], function(require, exports, module) { -/** - * @preserve Copyright 2012 Robert Gust-Bardon . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/** - * @fileoverview Enhances UglifyJS with consolidation of null, Boolean, and String values. - *

Also known as aliasing, this feature has been deprecated in the Closure Compiler since its - * initial release, where it is unavailable from the CLI. The Closure Compiler allows one to log and - * influence this process. In contrast, this implementation does not introduce - * any variable declarations in global code and derives String values from - * identifier names used as property accessors.

- *

Consolidating literals may worsen the data compression ratio when an encoding - * transformation is applied. For instance, jQuery 1.7.1 takes 248235 bytes. - * Building it with - * UglifyJS v1.2.5 results in 93647 bytes (37.73% of the original) which are - * then compressed to 33154 bytes (13.36% of the original) using gzip(1). Building it with the same - * version of UglifyJS 1.2.5 patched with the implementation of consolidation - * results in 80784 bytes (a decrease of 12863 bytes, i.e. 13.74%, in comparison - * to the aforementioned 93647 bytes) which are then compressed to 34013 bytes - * (an increase of 859 bytes, i.e. 2.59%, in comparison to the aforementioned - * 33154 bytes).

- *

Written in the strict variant - * of ECMA-262 5.1 Edition. Encoded in UTF-8. Follows Revision 2.28 of the Google JavaScript Style Guide (except for the - * discouraged use of the {@code function} tag and the {@code namespace} tag). - * 100% typed for the Closure Compiler Version 1741.

- *

Should you find this software useful, please consider a donation.

- * @author follow.me@RGustBardon (Robert Gust-Bardon) - * @supported Tested with: - * - */ - -/*global console:false, exports:true, module:false, require:false */ -/*jshint sub:true */ -/** - * Consolidates null, Boolean, and String values found inside an AST. - * @param {!TSyntacticCodeUnit} oAbstractSyntaxTree An array-like object - * representing an AST. - * @return {!TSyntacticCodeUnit} An array-like object representing an AST with its null, Boolean, and - * String values consolidated. - */ -// TODO(user) Consolidation of mathematical values found in numeric literals. -// TODO(user) Unconsolidation. -// TODO(user) Consolidation of ECMA-262 6th Edition programs. -// TODO(user) Rewrite in ECMA-262 6th Edition. -exports['ast_consolidate'] = function(oAbstractSyntaxTree) { - 'use strict'; - /*jshint bitwise:true, curly:true, eqeqeq:true, forin:true, immed:true, - latedef:true, newcap:true, noarge:true, noempty:true, nonew:true, - onevar:true, plusplus:true, regexp:true, undef:true, strict:true, - sub:false, trailing:true */ - - var _, - /** - * A record consisting of data about one or more source elements. - * @constructor - * @nosideeffects - */ - TSourceElementsData = function() { - /** - * The category of the elements. - * @type {number} - * @see ESourceElementCategories - */ - this.nCategory = ESourceElementCategories.N_OTHER; - /** - * The number of occurrences (within the elements) of each primitive - * value that could be consolidated. - * @type {!Array.>} - */ - this.aCount = []; - this.aCount[EPrimaryExpressionCategories.N_IDENTIFIER_NAMES] = {}; - this.aCount[EPrimaryExpressionCategories.N_STRING_LITERALS] = {}; - this.aCount[EPrimaryExpressionCategories.N_NULL_AND_BOOLEAN_LITERALS] = - {}; - /** - * Identifier names found within the elements. - * @type {!Array.} - */ - this.aIdentifiers = []; - /** - * Prefixed representation Strings of each primitive value that could be - * consolidated within the elements. - * @type {!Array.} - */ - this.aPrimitiveValues = []; - }, - /** - * A record consisting of data about a primitive value that could be - * consolidated. - * @constructor - * @nosideeffects - */ - TPrimitiveValue = function() { - /** - * The difference in the number of terminal symbols between the original - * source text and the one with the primitive value consolidated. If the - * difference is positive, the primitive value is considered worthwhile. - * @type {number} - */ - this.nSaving = 0; - /** - * An identifier name of the variable that will be declared and assigned - * the primitive value if the primitive value is consolidated. - * @type {string} - */ - this.sName = ''; - }, - /** - * A record consisting of data on what to consolidate within the range of - * source elements that is currently being considered. - * @constructor - * @nosideeffects - */ - TSolution = function() { - /** - * An object whose keys are prefixed representation Strings of each - * primitive value that could be consolidated within the elements and - * whose values are corresponding data about those primitive values. - * @type {!Object.} - * @see TPrimitiveValue - */ - this.oPrimitiveValues = {}; - /** - * The difference in the number of terminal symbols between the original - * source text and the one with all the worthwhile primitive values - * consolidated. - * @type {number} - * @see TPrimitiveValue#nSaving - */ - this.nSavings = 0; - }, - /** - * The processor of ASTs found - * in UglifyJS. - * @namespace - * @type {!TProcessor} - */ - oProcessor = (/** @type {!TProcessor} */ require('./process')), - /** - * A record consisting of a number of constants that represent the - * difference in the number of terminal symbols between a source text with - * a modified syntactic code unit and the original one. - * @namespace - * @type {!Object.} - */ - oWeights = { - /** - * The difference in the number of punctuators required by the bracket - * notation and the dot notation. - *

'[]'.length - '.'.length

- * @const - * @type {number} - */ - N_PROPERTY_ACCESSOR: 1, - /** - * The number of punctuators required by a variable declaration with an - * initialiser. - *

':'.length + ';'.length

- * @const - * @type {number} - */ - N_VARIABLE_DECLARATION: 2, - /** - * The number of terminal symbols required to introduce a variable - * statement (excluding its variable declaration list). - *

'var '.length

- * @const - * @type {number} - */ - N_VARIABLE_STATEMENT_AFFIXATION: 4, - /** - * The number of terminal symbols needed to enclose source elements - * within a function call with no argument values to a function with an - * empty parameter list. - *

'(function(){}());'.length

- * @const - * @type {number} - */ - N_CLOSURE: 17 - }, - /** - * Categories of primary expressions from which primitive values that - * could be consolidated are derivable. - * @namespace - * @enum {number} - */ - EPrimaryExpressionCategories = { - /** - * Identifier names used as property accessors. - * @type {number} - */ - N_IDENTIFIER_NAMES: 0, - /** - * String literals. - * @type {number} - */ - N_STRING_LITERALS: 1, - /** - * Null and Boolean literals. - * @type {number} - */ - N_NULL_AND_BOOLEAN_LITERALS: 2 - }, - /** - * Prefixes of primitive values that could be consolidated. - * The String values of the prefixes must have same number of characters. - * The prefixes must not be used in any properties defined in any version - * of ECMA-262. - * @namespace - * @enum {string} - */ - EValuePrefixes = { - /** - * Identifies String values. - * @type {string} - */ - S_STRING: '#S', - /** - * Identifies null and Boolean values. - * @type {string} - */ - S_SYMBOLIC: '#O' - }, - /** - * Categories of source elements in terms of their appropriateness of - * having their primitive values consolidated. - * @namespace - * @enum {number} - */ - ESourceElementCategories = { - /** - * Identifies a source element that includes the {@code with} statement. - * @type {number} - */ - N_WITH: 0, - /** - * Identifies a source element that includes the {@code eval} identifier name. - * @type {number} - */ - N_EVAL: 1, - /** - * Identifies a source element that must be excluded from the process - * unless its whole scope is examined. - * @type {number} - */ - N_EXCLUDABLE: 2, - /** - * Identifies source elements not posing any problems. - * @type {number} - */ - N_OTHER: 3 - }, - /** - * The list of literals (other than the String ones) whose primitive - * values can be consolidated. - * @const - * @type {!Array.} - */ - A_OTHER_SUBSTITUTABLE_LITERALS = [ - 'null', // The null literal. - 'false', // The Boolean literal {@code false}. - 'true' // The Boolean literal {@code true}. - ]; - - (/** - * Consolidates all worthwhile primitive values in a syntactic code unit. - * @param {!TSyntacticCodeUnit} oSyntacticCodeUnit An array-like object - * representing the branch of the abstract syntax tree representing the - * syntactic code unit along with its scope. - * @see TPrimitiveValue#nSaving - */ - function fExamineSyntacticCodeUnit(oSyntacticCodeUnit) { - var _, - /** - * Indicates whether the syntactic code unit represents global code. - * @type {boolean} - */ - bIsGlobal = 'toplevel' === oSyntacticCodeUnit[0], - /** - * Indicates whether the whole scope is being examined. - * @type {boolean} - */ - bIsWhollyExaminable = !bIsGlobal, - /** - * An array-like object representing source elements that constitute a - * syntactic code unit. - * @type {!TSyntacticCodeUnit} - */ - oSourceElements, - /** - * A record consisting of data about the source element that is - * currently being examined. - * @type {!TSourceElementsData} - */ - oSourceElementData, - /** - * The scope of the syntactic code unit. - * @type {!TScope} - */ - oScope, - /** - * An instance of an object that allows the traversal of an AST. - * @type {!TWalker} - */ - oWalker, - /** - * An object encompassing collections of functions used during the - * traversal of an AST. - * @namespace - * @type {!Object.>} - */ - oWalkers = { - /** - * A collection of functions used during the surveyance of source - * elements. - * @namespace - * @type {!Object.} - */ - oSurveySourceElement: { - /**#nocode+*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. Adds the identifier of the function and its formal - * parameters to the list of identifier names found. - * @param {string} sIdentifier The identifier of the function. - * @param {!Array.} aFormalParameterList Formal parameters. - * @param {!TSyntacticCodeUnit} oFunctionBody Function code. - */ - 'defun': function( - sIdentifier, - aFormalParameterList, - oFunctionBody) { - fClassifyAsExcludable(); - fAddIdentifier(sIdentifier); - aFormalParameterList.forEach(fAddIdentifier); - }, - /** - * Increments the count of the number of occurrences of the String - * value that is equivalent to the sequence of terminal symbols - * that constitute the encountered identifier name. - * @param {!TSyntacticCodeUnit} oExpression The nonterminal - * MemberExpression. - * @param {string} sIdentifierName The identifier name used as the - * property accessor. - * @return {!Array} The encountered branch of an AST with its nonterminal - * MemberExpression traversed. - */ - 'dot': function(oExpression, sIdentifierName) { - fCountPrimaryExpression( - EPrimaryExpressionCategories.N_IDENTIFIER_NAMES, - EValuePrefixes.S_STRING + sIdentifierName); - return ['dot', oWalker.walk(oExpression), sIdentifierName]; - }, - /** - * Adds the optional identifier of the function and its formal - * parameters to the list of identifier names found. - * @param {?string} sIdentifier The optional identifier of the - * function. - * @param {!Array.} aFormalParameterList Formal parameters. - * @param {!TSyntacticCodeUnit} oFunctionBody Function code. - */ - 'function': function( - sIdentifier, - aFormalParameterList, - oFunctionBody) { - if ('string' === typeof sIdentifier) { - fAddIdentifier(sIdentifier); - } - aFormalParameterList.forEach(fAddIdentifier); - }, - /** - * Either increments the count of the number of occurrences of the - * encountered null or Boolean value or classifies a source element - * as containing the {@code eval} identifier name. - * @param {string} sIdentifier The identifier encountered. - */ - 'name': function(sIdentifier) { - if (-1 !== A_OTHER_SUBSTITUTABLE_LITERALS.indexOf(sIdentifier)) { - fCountPrimaryExpression( - EPrimaryExpressionCategories.N_NULL_AND_BOOLEAN_LITERALS, - EValuePrefixes.S_SYMBOLIC + sIdentifier); - } else { - if ('eval' === sIdentifier) { - oSourceElementData.nCategory = - ESourceElementCategories.N_EVAL; - } - fAddIdentifier(sIdentifier); - } - }, - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. - * @param {TSyntacticCodeUnit} oExpression The expression whose - * value is to be returned. - */ - 'return': function(oExpression) { - fClassifyAsExcludable(); - }, - /** - * Increments the count of the number of occurrences of the - * encountered String value. - * @param {string} sStringValue The String value of the string - * literal encountered. - */ - 'string': function(sStringValue) { - if (sStringValue.length > 0) { - fCountPrimaryExpression( - EPrimaryExpressionCategories.N_STRING_LITERALS, - EValuePrefixes.S_STRING + sStringValue); - } - }, - /** - * Adds the identifier reserved for an exception to the list of - * identifier names found. - * @param {!TSyntacticCodeUnit} oTry A block of code in which an - * exception can occur. - * @param {Array} aCatch The identifier reserved for an exception - * and a block of code to handle the exception. - * @param {TSyntacticCodeUnit} oFinally An optional block of code - * to be evaluated regardless of whether an exception occurs. - */ - 'try': function(oTry, aCatch, oFinally) { - if (Array.isArray(aCatch)) { - fAddIdentifier(aCatch[0]); - } - }, - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. Adds the identifier of each declared variable to the list - * of identifier names found. - * @param {!Array.} aVariableDeclarationList Variable - * declarations. - */ - 'var': function(aVariableDeclarationList) { - fClassifyAsExcludable(); - aVariableDeclarationList.forEach(fAddVariable); - }, - /** - * Classifies a source element as containing the {@code with} - * statement. - * @param {!TSyntacticCodeUnit} oExpression An expression whose - * value is to be converted to a value of type Object and - * become the binding object of a new object environment - * record of a new lexical environment in which the statement - * is to be executed. - * @param {!TSyntacticCodeUnit} oStatement The statement to be - * executed in the augmented lexical environment. - * @return {!Array} An empty array to stop the traversal. - */ - 'with': function(oExpression, oStatement) { - oSourceElementData.nCategory = ESourceElementCategories.N_WITH; - return []; - } - /**#nocode-*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - }, - /** - * A collection of functions used while looking for nested functions. - * @namespace - * @type {!Object.} - */ - oExamineFunctions: { - /**#nocode+*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - /** - * Orders an examination of a nested function declaration. - * @this {!TSyntacticCodeUnit} An array-like object representing - * the branch of an AST representing the syntactic code unit along with - * its scope. - * @return {!Array} An empty array to stop the traversal. - */ - 'defun': function() { - fExamineSyntacticCodeUnit(this); - return []; - }, - /** - * Orders an examination of a nested function expression. - * @this {!TSyntacticCodeUnit} An array-like object representing - * the branch of an AST representing the syntactic code unit along with - * its scope. - * @return {!Array} An empty array to stop the traversal. - */ - 'function': function() { - fExamineSyntacticCodeUnit(this); - return []; - } - /**#nocode-*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - } - }, - /** - * Records containing data about source elements. - * @type {Array.} - */ - aSourceElementsData = [], - /** - * The index (in the source text order) of the source element - * immediately following a Directive Prologue. - * @type {number} - */ - nAfterDirectivePrologue = 0, - /** - * The index (in the source text order) of the source element that is - * currently being considered. - * @type {number} - */ - nPosition, - /** - * The index (in the source text order) of the source element that is - * the last element of the range of source elements that is currently - * being considered. - * @type {(undefined|number)} - */ - nTo, - /** - * Initiates the traversal of a source element. - * @param {!TWalker} oWalker An instance of an object that allows the - * traversal of an abstract syntax tree. - * @param {!TSyntacticCodeUnit} oSourceElement A source element from - * which the traversal should commence. - * @return {function(): !TSyntacticCodeUnit} A function that is able to - * initiate the traversal from a given source element. - */ - cContext = function(oWalker, oSourceElement) { - /** - * @return {!TSyntacticCodeUnit} A function that is able to - * initiate the traversal from a given source element. - */ - var fLambda = function() { - return oWalker.walk(oSourceElement); - }; - - return fLambda; - }, - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. - */ - fClassifyAsExcludable = function() { - if (oSourceElementData.nCategory === - ESourceElementCategories.N_OTHER) { - oSourceElementData.nCategory = - ESourceElementCategories.N_EXCLUDABLE; - } - }, - /** - * Adds an identifier to the list of identifier names found. - * @param {string} sIdentifier The identifier to be added. - */ - fAddIdentifier = function(sIdentifier) { - if (-1 === oSourceElementData.aIdentifiers.indexOf(sIdentifier)) { - oSourceElementData.aIdentifiers.push(sIdentifier); - } - }, - /** - * Adds the identifier of a variable to the list of identifier names - * found. - * @param {!Array} aVariableDeclaration A variable declaration. - */ - fAddVariable = function(aVariableDeclaration) { - fAddIdentifier(/** @type {string} */ aVariableDeclaration[0]); - }, - /** - * Increments the count of the number of occurrences of the prefixed - * String representation attributed to the primary expression. - * @param {number} nCategory The category of the primary expression. - * @param {string} sName The prefixed String representation attributed - * to the primary expression. - */ - fCountPrimaryExpression = function(nCategory, sName) { - if (!oSourceElementData.aCount[nCategory].hasOwnProperty(sName)) { - oSourceElementData.aCount[nCategory][sName] = 0; - if (-1 === oSourceElementData.aPrimitiveValues.indexOf(sName)) { - oSourceElementData.aPrimitiveValues.push(sName); - } - } - oSourceElementData.aCount[nCategory][sName] += 1; - }, - /** - * Consolidates all worthwhile primitive values in a range of source - * elements. - * @param {number} nFrom The index (in the source text order) of the - * source element that is the first element of the range. - * @param {number} nTo The index (in the source text order) of the - * source element that is the last element of the range. - * @param {boolean} bEnclose Indicates whether the range should be - * enclosed within a function call with no argument values to a - * function with an empty parameter list if any primitive values - * are consolidated. - * @see TPrimitiveValue#nSaving - */ - fExamineSourceElements = function(nFrom, nTo, bEnclose) { - var _, - /** - * The index of the last mangled name. - * @type {number} - */ - nIndex = oScope.cname, - /** - * The index of the source element that is currently being - * considered. - * @type {number} - */ - nPosition, - /** - * A collection of functions used during the consolidation of - * primitive values and identifier names used as property - * accessors. - * @namespace - * @type {!Object.} - */ - oWalkersTransformers = { - /** - * If the String value that is equivalent to the sequence of - * terminal symbols that constitute the encountered identifier - * name is worthwhile, a syntactic conversion from the dot - * notation to the bracket notation ensues with that sequence - * being substituted by an identifier name to which the value - * is assigned. - * Applies to property accessors that use the dot notation. - * @param {!TSyntacticCodeUnit} oExpression The nonterminal - * MemberExpression. - * @param {string} sIdentifierName The identifier name used as - * the property accessor. - * @return {!Array} A syntactic code unit that is equivalent to - * the one encountered. - * @see TPrimitiveValue#nSaving - */ - 'dot': function(oExpression, sIdentifierName) { - /** - * The prefixed String value that is equivalent to the - * sequence of terminal symbols that constitute the - * encountered identifier name. - * @type {string} - */ - var sPrefixed = EValuePrefixes.S_STRING + sIdentifierName; - - return oSolutionBest.oPrimitiveValues.hasOwnProperty( - sPrefixed) && - oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0 ? - ['sub', - oWalker.walk(oExpression), - ['name', - oSolutionBest.oPrimitiveValues[sPrefixed].sName]] : - ['dot', oWalker.walk(oExpression), sIdentifierName]; - }, - /** - * If the encountered identifier is a null or Boolean literal - * and its value is worthwhile, the identifier is substituted - * by an identifier name to which that value is assigned. - * Applies to identifier names. - * @param {string} sIdentifier The identifier encountered. - * @return {!Array} A syntactic code unit that is equivalent to - * the one encountered. - * @see TPrimitiveValue#nSaving - */ - 'name': function(sIdentifier) { - /** - * The prefixed representation String of the identifier. - * @type {string} - */ - var sPrefixed = EValuePrefixes.S_SYMBOLIC + sIdentifier; - - return [ - 'name', - oSolutionBest.oPrimitiveValues.hasOwnProperty(sPrefixed) && - oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0 ? - oSolutionBest.oPrimitiveValues[sPrefixed].sName : - sIdentifier - ]; - }, - /** - * If the encountered String value is worthwhile, it is - * substituted by an identifier name to which that value is - * assigned. - * Applies to String values. - * @param {string} sStringValue The String value of the string - * literal encountered. - * @return {!Array} A syntactic code unit that is equivalent to - * the one encountered. - * @see TPrimitiveValue#nSaving - */ - 'string': function(sStringValue) { - /** - * The prefixed representation String of the primitive value - * of the literal. - * @type {string} - */ - var sPrefixed = - EValuePrefixes.S_STRING + sStringValue; - - return oSolutionBest.oPrimitiveValues.hasOwnProperty( - sPrefixed) && - oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0 ? - ['name', - oSolutionBest.oPrimitiveValues[sPrefixed].sName] : - ['string', sStringValue]; - } - }, - /** - * Such data on what to consolidate within the range of source - * elements that is currently being considered that lead to the - * greatest known reduction of the number of the terminal symbols - * in comparison to the original source text. - * @type {!TSolution} - */ - oSolutionBest = new TSolution(), - /** - * Data representing an ongoing attempt to find a better - * reduction of the number of the terminal symbols in comparison - * to the original source text than the best one that is - * currently known. - * @type {!TSolution} - * @see oSolutionBest - */ - oSolutionCandidate = new TSolution(), - /** - * A record consisting of data about the range of source elements - * that is currently being examined. - * @type {!TSourceElementsData} - */ - oSourceElementsData = new TSourceElementsData(), - /** - * Variable declarations for each primitive value that is to be - * consolidated within the elements. - * @type {!Array.} - */ - aVariableDeclarations = [], - /** - * Augments a list with a prefixed representation String. - * @param {!Array.} aList A list that is to be augmented. - * @return {function(string)} A function that augments a list - * with a prefixed representation String. - */ - cAugmentList = function(aList) { - /** - * @param {string} sPrefixed Prefixed representation String of - * a primitive value that could be consolidated within the - * elements. - */ - var fLambda = function(sPrefixed) { - if (-1 === aList.indexOf(sPrefixed)) { - aList.push(sPrefixed); - } - }; - - return fLambda; - }, - /** - * Adds the number of occurrences of a primitive value of a given - * category that could be consolidated in the source element with - * a given index to the count of occurrences of that primitive - * value within the range of source elements that is currently - * being considered. - * @param {number} nPosition The index (in the source text order) - * of a source element. - * @param {number} nCategory The category of the primary - * expression from which the primitive value is derived. - * @return {function(string)} A function that performs the - * addition. - * @see cAddOccurrencesInCategory - */ - cAddOccurrences = function(nPosition, nCategory) { - /** - * @param {string} sPrefixed The prefixed representation String - * of a primitive value. - */ - var fLambda = function(sPrefixed) { - if (!oSourceElementsData.aCount[nCategory].hasOwnProperty( - sPrefixed)) { - oSourceElementsData.aCount[nCategory][sPrefixed] = 0; - } - oSourceElementsData.aCount[nCategory][sPrefixed] += - aSourceElementsData[nPosition].aCount[nCategory][ - sPrefixed]; - }; - - return fLambda; - }, - /** - * Adds the number of occurrences of each primitive value of a - * given category that could be consolidated in the source - * element with a given index to the count of occurrences of that - * primitive values within the range of source elements that is - * currently being considered. - * @param {number} nPosition The index (in the source text order) - * of a source element. - * @return {function(number)} A function that performs the - * addition. - * @see fAddOccurrences - */ - cAddOccurrencesInCategory = function(nPosition) { - /** - * @param {number} nCategory The category of the primary - * expression from which the primitive value is derived. - */ - var fLambda = function(nCategory) { - Object.keys( - aSourceElementsData[nPosition].aCount[nCategory] - ).forEach(cAddOccurrences(nPosition, nCategory)); - }; - - return fLambda; - }, - /** - * Adds the number of occurrences of each primitive value that - * could be consolidated in the source element with a given index - * to the count of occurrences of that primitive values within - * the range of source elements that is currently being - * considered. - * @param {number} nPosition The index (in the source text order) - * of a source element. - */ - fAddOccurrences = function(nPosition) { - Object.keys(aSourceElementsData[nPosition].aCount).forEach( - cAddOccurrencesInCategory(nPosition)); - }, - /** - * Creates a variable declaration for a primitive value if that - * primitive value is to be consolidated within the elements. - * @param {string} sPrefixed Prefixed representation String of a - * primitive value that could be consolidated within the - * elements. - * @see aVariableDeclarations - */ - cAugmentVariableDeclarations = function(sPrefixed) { - if (oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0) { - aVariableDeclarations.push([ - oSolutionBest.oPrimitiveValues[sPrefixed].sName, - [0 === sPrefixed.indexOf(EValuePrefixes.S_SYMBOLIC) ? - 'name' : 'string', - sPrefixed.substring(EValuePrefixes.S_SYMBOLIC.length)] - ]); - } - }, - /** - * Sorts primitive values with regard to the difference in the - * number of terminal symbols between the original source text - * and the one with those primitive values consolidated. - * @param {string} sPrefixed0 The prefixed representation String - * of the first of the two primitive values that are being - * compared. - * @param {string} sPrefixed1 The prefixed representation String - * of the second of the two primitive values that are being - * compared. - * @return {number} - *
- *
-1
- *
if the first primitive value must be placed before - * the other one,
- *
0
- *
if the first primitive value may be placed before - * the other one,
- *
1
- *
if the first primitive value must not be placed - * before the other one.
- *
- * @see TSolution.oPrimitiveValues - */ - cSortPrimitiveValues = function(sPrefixed0, sPrefixed1) { - /** - * The difference between: - *
    - *
  1. the difference in the number of terminal symbols - * between the original source text and the one with the - * first primitive value consolidated, and
  2. - *
  3. the difference in the number of terminal symbols - * between the original source text and the one with the - * second primitive value consolidated.
  4. - *
- * @type {number} - */ - var nDifference = - oSolutionCandidate.oPrimitiveValues[sPrefixed0].nSaving - - oSolutionCandidate.oPrimitiveValues[sPrefixed1].nSaving; - - return nDifference > 0 ? -1 : nDifference < 0 ? 1 : 0; - }, - /** - * Assigns an identifier name to a primitive value and calculates - * whether instances of that primitive value are worth - * consolidating. - * @param {string} sPrefixed The prefixed representation String - * of a primitive value that is being evaluated. - */ - fEvaluatePrimitiveValue = function(sPrefixed) { - var _, - /** - * The index of the last mangled name. - * @type {number} - */ - nIndex, - /** - * The representation String of the primitive value that is - * being evaluated. - * @type {string} - */ - sName = - sPrefixed.substring(EValuePrefixes.S_SYMBOLIC.length), - /** - * The number of source characters taken up by the - * representation String of the primitive value that is - * being evaluated. - * @type {number} - */ - nLengthOriginal = sName.length, - /** - * The number of source characters taken up by the - * identifier name that could substitute the primitive - * value that is being evaluated. - * substituted. - * @type {number} - */ - nLengthSubstitution, - /** - * The number of source characters taken up by by the - * representation String of the primitive value that is - * being evaluated when it is represented by a string - * literal. - * @type {number} - */ - nLengthString = oProcessor.make_string(sName).length; - - oSolutionCandidate.oPrimitiveValues[sPrefixed] = - new TPrimitiveValue(); - do { // Find an identifier unused in this or any nested scope. - nIndex = oScope.cname; - oSolutionCandidate.oPrimitiveValues[sPrefixed].sName = - oScope.next_mangled(); - } while (-1 !== oSourceElementsData.aIdentifiers.indexOf( - oSolutionCandidate.oPrimitiveValues[sPrefixed].sName)); - nLengthSubstitution = oSolutionCandidate.oPrimitiveValues[ - sPrefixed].sName.length; - if (0 === sPrefixed.indexOf(EValuePrefixes.S_SYMBOLIC)) { - // foo:null, or foo:null; - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving -= - nLengthSubstitution + nLengthOriginal + - oWeights.N_VARIABLE_DECLARATION; - // null vs foo - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving += - oSourceElementsData.aCount[ - EPrimaryExpressionCategories. - N_NULL_AND_BOOLEAN_LITERALS][sPrefixed] * - (nLengthOriginal - nLengthSubstitution); - } else { - // foo:'fromCharCode'; - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving -= - nLengthSubstitution + nLengthString + - oWeights.N_VARIABLE_DECLARATION; - // .fromCharCode vs [foo] - if (oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_IDENTIFIER_NAMES - ].hasOwnProperty(sPrefixed)) { - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving += - oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_IDENTIFIER_NAMES - ][sPrefixed] * - (nLengthOriginal - nLengthSubstitution - - oWeights.N_PROPERTY_ACCESSOR); - } - // 'fromCharCode' vs foo - if (oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_STRING_LITERALS - ].hasOwnProperty(sPrefixed)) { - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving += - oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_STRING_LITERALS - ][sPrefixed] * - (nLengthString - nLengthSubstitution); - } - } - if (oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving > - 0) { - oSolutionCandidate.nSavings += - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving; - } else { - oScope.cname = nIndex; // Free the identifier name. - } - }, - /** - * Adds a variable declaration to an existing variable statement. - * @param {!Array} aVariableDeclaration A variable declaration - * with an initialiser. - */ - cAddVariableDeclaration = function(aVariableDeclaration) { - (/** @type {!Array} */ oSourceElements[nFrom][1]).unshift( - aVariableDeclaration); - }; - - if (nFrom > nTo) { - return; - } - // If the range is a closure, reuse the closure. - if (nFrom === nTo && - 'stat' === oSourceElements[nFrom][0] && - 'call' === oSourceElements[nFrom][1][0] && - 'function' === oSourceElements[nFrom][1][1][0]) { - fExamineSyntacticCodeUnit(oSourceElements[nFrom][1][1]); - return; - } - // Create a list of all derived primitive values within the range. - for (nPosition = nFrom; nPosition <= nTo; nPosition += 1) { - aSourceElementsData[nPosition].aPrimitiveValues.forEach( - cAugmentList(oSourceElementsData.aPrimitiveValues)); - } - if (0 === oSourceElementsData.aPrimitiveValues.length) { - return; - } - for (nPosition = nFrom; nPosition <= nTo; nPosition += 1) { - // Add the number of occurrences to the total count. - fAddOccurrences(nPosition); - // Add identifiers of this or any nested scope to the list. - aSourceElementsData[nPosition].aIdentifiers.forEach( - cAugmentList(oSourceElementsData.aIdentifiers)); - } - // Distribute identifier names among derived primitive values. - do { // If there was any progress, find a better distribution. - oSolutionBest = oSolutionCandidate; - if (Object.keys(oSolutionCandidate.oPrimitiveValues).length > 0) { - // Sort primitive values descending by their worthwhileness. - oSourceElementsData.aPrimitiveValues.sort(cSortPrimitiveValues); - } - oSolutionCandidate = new TSolution(); - oSourceElementsData.aPrimitiveValues.forEach( - fEvaluatePrimitiveValue); - oScope.cname = nIndex; - } while (oSolutionCandidate.nSavings > oSolutionBest.nSavings); - // Take the necessity of adding a variable statement into account. - if ('var' !== oSourceElements[nFrom][0]) { - oSolutionBest.nSavings -= oWeights.N_VARIABLE_STATEMENT_AFFIXATION; - } - if (bEnclose) { - // Take the necessity of forming a closure into account. - oSolutionBest.nSavings -= oWeights.N_CLOSURE; - } - if (oSolutionBest.nSavings > 0) { - // Create variable declarations suitable for UglifyJS. - Object.keys(oSolutionBest.oPrimitiveValues).forEach( - cAugmentVariableDeclarations); - // Rewrite expressions that contain worthwhile primitive values. - for (nPosition = nFrom; nPosition <= nTo; nPosition += 1) { - oWalker = oProcessor.ast_walker(); - oSourceElements[nPosition] = - oWalker.with_walkers( - oWalkersTransformers, - cContext(oWalker, oSourceElements[nPosition])); - } - if ('var' === oSourceElements[nFrom][0]) { // Reuse the statement. - (/** @type {!Array.} */ aVariableDeclarations.reverse( - )).forEach(cAddVariableDeclaration); - } else { // Add a variable statement. - Array.prototype.splice.call( - oSourceElements, - nFrom, - 0, - ['var', aVariableDeclarations]); - nTo += 1; - } - if (bEnclose) { - // Add a closure. - Array.prototype.splice.call( - oSourceElements, - nFrom, - 0, - ['stat', ['call', ['function', null, [], []], []]]); - // Copy source elements into the closure. - for (nPosition = nTo + 1; nPosition > nFrom; nPosition -= 1) { - Array.prototype.unshift.call( - oSourceElements[nFrom][1][1][3], - oSourceElements[nPosition]); - } - // Remove source elements outside the closure. - Array.prototype.splice.call( - oSourceElements, - nFrom + 1, - nTo - nFrom + 1); - } - } - if (bEnclose) { - // Restore the availability of identifier names. - oScope.cname = nIndex; - } - }; - - oSourceElements = (/** @type {!TSyntacticCodeUnit} */ - oSyntacticCodeUnit[bIsGlobal ? 1 : 3]); - if (0 === oSourceElements.length) { - return; - } - oScope = bIsGlobal ? oSyntacticCodeUnit.scope : oSourceElements.scope; - // Skip a Directive Prologue. - while (nAfterDirectivePrologue < oSourceElements.length && - 'directive' === oSourceElements[nAfterDirectivePrologue][0]) { - nAfterDirectivePrologue += 1; - aSourceElementsData.push(null); - } - if (oSourceElements.length === nAfterDirectivePrologue) { - return; - } - for (nPosition = nAfterDirectivePrologue; - nPosition < oSourceElements.length; - nPosition += 1) { - oSourceElementData = new TSourceElementsData(); - oWalker = oProcessor.ast_walker(); - // Classify a source element. - // Find its derived primitive values and count their occurrences. - // Find all identifiers used (including nested scopes). - oWalker.with_walkers( - oWalkers.oSurveySourceElement, - cContext(oWalker, oSourceElements[nPosition])); - // Establish whether the scope is still wholly examinable. - bIsWhollyExaminable = bIsWhollyExaminable && - ESourceElementCategories.N_WITH !== oSourceElementData.nCategory && - ESourceElementCategories.N_EVAL !== oSourceElementData.nCategory; - aSourceElementsData.push(oSourceElementData); - } - if (bIsWhollyExaminable) { // Examine the whole scope. - fExamineSourceElements( - nAfterDirectivePrologue, - oSourceElements.length - 1, - false); - } else { // Examine unexcluded ranges of source elements. - for (nPosition = oSourceElements.length - 1; - nPosition >= nAfterDirectivePrologue; - nPosition -= 1) { - oSourceElementData = (/** @type {!TSourceElementsData} */ - aSourceElementsData[nPosition]); - if (ESourceElementCategories.N_OTHER === - oSourceElementData.nCategory) { - if ('undefined' === typeof nTo) { - nTo = nPosition; // Indicate the end of a range. - } - // Examine the range if it immediately follows a Directive Prologue. - if (nPosition === nAfterDirectivePrologue) { - fExamineSourceElements(nPosition, nTo, true); - } - } else { - if ('undefined' !== typeof nTo) { - // Examine the range that immediately follows this source element. - fExamineSourceElements(nPosition + 1, nTo, true); - nTo = void 0; // Obliterate the range. - } - // Examine nested functions. - oWalker = oProcessor.ast_walker(); - oWalker.with_walkers( - oWalkers.oExamineFunctions, - cContext(oWalker, oSourceElements[nPosition])); - } - } - } - }(oAbstractSyntaxTree = oProcessor.ast_add_scope(oAbstractSyntaxTree))); - return oAbstractSyntaxTree; -}; -/*jshint sub:false */ - -/* Local Variables: */ -/* mode: js */ -/* coding: utf-8 */ -/* indent-tabs-mode: nil */ -/* tab-width: 2 */ -/* End: */ -/* vim: set ft=javascript fenc=utf-8 et ts=2 sts=2 sw=2: */ -/* :mode=javascript:noTabs=true:tabSize=2:indentSize=2:deepIndent=true: */ -}); -define('uglifyjs/parse-js', ["exports"], function(exports) { -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - - This version is suitable for Node.js. With minimal changes (the - exports stuff) it should work on any JS platform. - - This file contains the tokenizer/parser. It is a port to JavaScript - of parse-js [1], a JavaScript parser library written in Common Lisp - by Marijn Haverbeke. Thank you Marijn! - - [1] http://marijn.haverbeke.nl/parse-js/ - - Exported functions: - - - tokenizer(code) -- returns a function. Call the returned - function to fetch the next token. - - - parse(code) -- returns an AST of the given JavaScript code. - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2010 (c) Mihai Bazon - Based on parse-js (http://marijn.haverbeke.nl/parse-js/). - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -/* -----[ Tokenizer (constants) ]----- */ - -var KEYWORDS = array_to_hash([ - "break", - "case", - "catch", - "const", - "continue", - "debugger", - "default", - "delete", - "do", - "else", - "finally", - "for", - "function", - "if", - "in", - "instanceof", - "new", - "return", - "switch", - "throw", - "try", - "typeof", - "var", - "void", - "while", - "with" -]); - -var RESERVED_WORDS = array_to_hash([ - "abstract", - "boolean", - "byte", - "char", - "class", - "double", - "enum", - "export", - "extends", - "final", - "float", - "goto", - "implements", - "import", - "int", - "interface", - "long", - "native", - "package", - "private", - "protected", - "public", - "short", - "static", - "super", - "synchronized", - "throws", - "transient", - "volatile" -]); - -var KEYWORDS_BEFORE_EXPRESSION = array_to_hash([ - "return", - "new", - "delete", - "throw", - "else", - "case" -]); - -var KEYWORDS_ATOM = array_to_hash([ - "false", - "null", - "true", - "undefined" -]); - -var OPERATOR_CHARS = array_to_hash(characters("+-*&%=<>!?|~^")); - -var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i; -var RE_OCT_NUMBER = /^0[0-7]+$/; -var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i; - -var OPERATORS = array_to_hash([ - "in", - "instanceof", - "typeof", - "new", - "void", - "delete", - "++", - "--", - "+", - "-", - "!", - "~", - "&", - "|", - "^", - "*", - "/", - "%", - ">>", - "<<", - ">>>", - "<", - ">", - "<=", - ">=", - "==", - "===", - "!=", - "!==", - "?", - "=", - "+=", - "-=", - "/=", - "*=", - "%=", - ">>=", - "<<=", - ">>>=", - "|=", - "^=", - "&=", - "&&", - "||" -]); - -var WHITESPACE_CHARS = array_to_hash(characters(" \u00a0\n\r\t\f\u000b\u200b\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\uFEFF")); - -var PUNC_BEFORE_EXPRESSION = array_to_hash(characters("[{(,.;:")); - -var PUNC_CHARS = array_to_hash(characters("[]{}(),;:")); - -var REGEXP_MODIFIERS = array_to_hash(characters("gmsiy")); - -/* -----[ Tokenizer ]----- */ - -var UNICODE = { // Unicode 6.1 - letter: new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), - combining_mark: new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u08FE\\u0900-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C01-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C82\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D02\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1DC0-\\u1DE6\\u1DFC-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"), - connector_punctuation: new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]"), - digit: new RegExp("[\\u0030-\\u0039\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19]") -}; - -function is_letter(ch) { - return UNICODE.letter.test(ch); -}; - -function is_digit(ch) { - ch = ch.charCodeAt(0); - return ch >= 48 && ch <= 57; -}; - -function is_unicode_digit(ch) { - return UNICODE.digit.test(ch); -} - -function is_alphanumeric_char(ch) { - return is_digit(ch) || is_letter(ch); -}; - -function is_unicode_combining_mark(ch) { - return UNICODE.combining_mark.test(ch); -}; - -function is_unicode_connector_punctuation(ch) { - return UNICODE.connector_punctuation.test(ch); -}; - -function is_identifier_start(ch) { - return ch == "$" || ch == "_" || is_letter(ch); -}; - -function is_identifier_char(ch) { - return is_identifier_start(ch) - || is_unicode_combining_mark(ch) - || is_unicode_digit(ch) - || is_unicode_connector_punctuation(ch) - || ch == "\u200c" // zero-width non-joiner - || ch == "\u200d" // zero-width joiner (in my ECMA-262 PDF, this is also 200c) - ; -}; - -function parse_js_number(num) { - if (RE_HEX_NUMBER.test(num)) { - return parseInt(num.substr(2), 16); - } else if (RE_OCT_NUMBER.test(num)) { - return parseInt(num.substr(1), 8); - } else if (RE_DEC_NUMBER.test(num)) { - return parseFloat(num); - } -}; - -function JS_Parse_Error(message, line, col, pos) { - this.message = message; - this.line = line + 1; - this.col = col + 1; - this.pos = pos + 1; - this.stack = new Error().stack; -}; - -JS_Parse_Error.prototype.toString = function() { - return this.message + " (line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack; -}; - -function js_error(message, line, col, pos) { - throw new JS_Parse_Error(message, line, col, pos); -}; - -function is_token(token, type, val) { - return token.type == type && (val == null || token.value == val); -}; - -var EX_EOF = {}; - -function tokenizer($TEXT) { - - var S = { - text : $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, ''), - pos : 0, - tokpos : 0, - line : 0, - tokline : 0, - col : 0, - tokcol : 0, - newline_before : false, - regex_allowed : false, - comments_before : [] - }; - - function peek() { return S.text.charAt(S.pos); }; - - function next(signal_eof, in_string) { - var ch = S.text.charAt(S.pos++); - if (signal_eof && !ch) - throw EX_EOF; - if (ch == "\n") { - S.newline_before = S.newline_before || !in_string; - ++S.line; - S.col = 0; - } else { - ++S.col; - } - return ch; - }; - - function eof() { - return !S.peek(); - }; - - function find(what, signal_eof) { - var pos = S.text.indexOf(what, S.pos); - if (signal_eof && pos == -1) throw EX_EOF; - return pos; - }; - - function start_token() { - S.tokline = S.line; - S.tokcol = S.col; - S.tokpos = S.pos; - }; - - function token(type, value, is_comment) { - S.regex_allowed = ((type == "operator" && !HOP(UNARY_POSTFIX, value)) || - (type == "keyword" && HOP(KEYWORDS_BEFORE_EXPRESSION, value)) || - (type == "punc" && HOP(PUNC_BEFORE_EXPRESSION, value))); - var ret = { - type : type, - value : value, - line : S.tokline, - col : S.tokcol, - pos : S.tokpos, - endpos : S.pos, - nlb : S.newline_before - }; - if (!is_comment) { - ret.comments_before = S.comments_before; - S.comments_before = []; - // make note of any newlines in the comments that came before - for (var i = 0, len = ret.comments_before.length; i < len; i++) { - ret.nlb = ret.nlb || ret.comments_before[i].nlb; - } - } - S.newline_before = false; - return ret; - }; - - function skip_whitespace() { - while (HOP(WHITESPACE_CHARS, peek())) - next(); - }; - - function read_while(pred) { - var ret = "", ch = peek(), i = 0; - while (ch && pred(ch, i++)) { - ret += next(); - ch = peek(); - } - return ret; - }; - - function parse_error(err) { - js_error(err, S.tokline, S.tokcol, S.tokpos); - }; - - function read_num(prefix) { - var has_e = false, after_e = false, has_x = false, has_dot = prefix == "."; - var num = read_while(function(ch, i){ - if (ch == "x" || ch == "X") { - if (has_x) return false; - return has_x = true; - } - if (!has_x && (ch == "E" || ch == "e")) { - if (has_e) return false; - return has_e = after_e = true; - } - if (ch == "-") { - if (after_e || (i == 0 && !prefix)) return true; - return false; - } - if (ch == "+") return after_e; - after_e = false; - if (ch == ".") { - if (!has_dot && !has_x && !has_e) - return has_dot = true; - return false; - } - return is_alphanumeric_char(ch); - }); - if (prefix) - num = prefix + num; - var valid = parse_js_number(num); - if (!isNaN(valid)) { - return token("num", valid); - } else { - parse_error("Invalid syntax: " + num); - } - }; - - function read_escaped_char(in_string) { - var ch = next(true, in_string); - switch (ch) { - case "n" : return "\n"; - case "r" : return "\r"; - case "t" : return "\t"; - case "b" : return "\b"; - case "v" : return "\u000b"; - case "f" : return "\f"; - case "0" : return "\0"; - case "x" : return String.fromCharCode(hex_bytes(2)); - case "u" : return String.fromCharCode(hex_bytes(4)); - case "\n": return ""; - default : return ch; - } - }; - - function hex_bytes(n) { - var num = 0; - for (; n > 0; --n) { - var digit = parseInt(next(true), 16); - if (isNaN(digit)) - parse_error("Invalid hex-character pattern in string"); - num = (num << 4) | digit; - } - return num; - }; - - function read_string() { - return with_eof_error("Unterminated string constant", function(){ - var quote = next(), ret = ""; - for (;;) { - var ch = next(true); - if (ch == "\\") { - // read OctalEscapeSequence (XXX: deprecated if "strict mode") - // https://github.com/mishoo/UglifyJS/issues/178 - var octal_len = 0, first = null; - ch = read_while(function(ch){ - if (ch >= "0" && ch <= "7") { - if (!first) { - first = ch; - return ++octal_len; - } - else if (first <= "3" && octal_len <= 2) return ++octal_len; - else if (first >= "4" && octal_len <= 1) return ++octal_len; - } - return false; - }); - if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8)); - else ch = read_escaped_char(true); - } - else if (ch == quote) break; - else if (ch == "\n") throw EX_EOF; - ret += ch; - } - return token("string", ret); - }); - }; - - function read_line_comment() { - next(); - var i = find("\n"), ret; - if (i == -1) { - ret = S.text.substr(S.pos); - S.pos = S.text.length; - } else { - ret = S.text.substring(S.pos, i); - S.pos = i; - } - return token("comment1", ret, true); - }; - - function read_multiline_comment() { - next(); - return with_eof_error("Unterminated multiline comment", function(){ - var i = find("*/", true), - text = S.text.substring(S.pos, i); - S.pos = i + 2; - S.line += text.split("\n").length - 1; - S.newline_before = S.newline_before || text.indexOf("\n") >= 0; - - // https://github.com/mishoo/UglifyJS/issues/#issue/100 - if (/^@cc_on/i.test(text)) { - warn("WARNING: at line " + S.line); - warn("*** Found \"conditional comment\": " + text); - warn("*** UglifyJS DISCARDS ALL COMMENTS. This means your code might no longer work properly in Internet Explorer."); - } - - return token("comment2", text, true); - }); - }; - - function read_name() { - var backslash = false, name = "", ch, escaped = false, hex; - while ((ch = peek()) != null) { - if (!backslash) { - if (ch == "\\") escaped = backslash = true, next(); - else if (is_identifier_char(ch)) name += next(); - else break; - } - else { - if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); - ch = read_escaped_char(); - if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); - name += ch; - backslash = false; - } - } - if (HOP(KEYWORDS, name) && escaped) { - hex = name.charCodeAt(0).toString(16).toUpperCase(); - name = "\\u" + "0000".substr(hex.length) + hex + name.slice(1); - } - return name; - }; - - function read_regexp(regexp) { - return with_eof_error("Unterminated regular expression", function(){ - var prev_backslash = false, ch, in_class = false; - while ((ch = next(true))) if (prev_backslash) { - regexp += "\\" + ch; - prev_backslash = false; - } else if (ch == "[") { - in_class = true; - regexp += ch; - } else if (ch == "]" && in_class) { - in_class = false; - regexp += ch; - } else if (ch == "/" && !in_class) { - break; - } else if (ch == "\\") { - prev_backslash = true; - } else { - regexp += ch; - } - var mods = read_name(); - return token("regexp", [ regexp, mods ]); - }); - }; - - function read_operator(prefix) { - function grow(op) { - if (!peek()) return op; - var bigger = op + peek(); - if (HOP(OPERATORS, bigger)) { - next(); - return grow(bigger); - } else { - return op; - } - }; - return token("operator", grow(prefix || next())); - }; - - function handle_slash() { - next(); - var regex_allowed = S.regex_allowed; - switch (peek()) { - case "/": - S.comments_before.push(read_line_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - case "*": - S.comments_before.push(read_multiline_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - } - return S.regex_allowed ? read_regexp("") : read_operator("/"); - }; - - function handle_dot() { - next(); - return is_digit(peek()) - ? read_num(".") - : token("punc", "."); - }; - - function read_word() { - var word = read_name(); - return !HOP(KEYWORDS, word) - ? token("name", word) - : HOP(OPERATORS, word) - ? token("operator", word) - : HOP(KEYWORDS_ATOM, word) - ? token("atom", word) - : token("keyword", word); - }; - - function with_eof_error(eof_error, cont) { - try { - return cont(); - } catch(ex) { - if (ex === EX_EOF) parse_error(eof_error); - else throw ex; - } - }; - - function next_token(force_regexp) { - if (force_regexp != null) - return read_regexp(force_regexp); - skip_whitespace(); - start_token(); - var ch = peek(); - if (!ch) return token("eof"); - if (is_digit(ch)) return read_num(); - if (ch == '"' || ch == "'") return read_string(); - if (HOP(PUNC_CHARS, ch)) return token("punc", next()); - if (ch == ".") return handle_dot(); - if (ch == "/") return handle_slash(); - if (HOP(OPERATOR_CHARS, ch)) return read_operator(); - if (ch == "\\" || is_identifier_start(ch)) return read_word(); - parse_error("Unexpected character '" + ch + "'"); - }; - - next_token.context = function(nc) { - if (nc) S = nc; - return S; - }; - - return next_token; - -}; - -/* -----[ Parser (constants) ]----- */ - -var UNARY_PREFIX = array_to_hash([ - "typeof", - "void", - "delete", - "--", - "++", - "!", - "~", - "-", - "+" -]); - -var UNARY_POSTFIX = array_to_hash([ "--", "++" ]); - -var ASSIGNMENT = (function(a, ret, i){ - while (i < a.length) { - ret[a[i]] = a[i].substr(0, a[i].length - 1); - i++; - } - return ret; -})( - ["+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&="], - { "=": true }, - 0 -); - -var PRECEDENCE = (function(a, ret){ - for (var i = 0, n = 1; i < a.length; ++i, ++n) { - var b = a[i]; - for (var j = 0; j < b.length; ++j) { - ret[b[j]] = n; - } - } - return ret; -})( - [ - ["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"] - ], - {} -); - -var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); - -var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); - -/* -----[ Parser ]----- */ - -function NodeWithToken(str, start, end) { - this.name = str; - this.start = start; - this.end = end; -}; - -NodeWithToken.prototype.toString = function() { return this.name; }; - -function parse($TEXT, exigent_mode, embed_tokens) { - - var S = { - input : typeof $TEXT == "string" ? tokenizer($TEXT, true) : $TEXT, - token : null, - prev : null, - peeked : null, - in_function : 0, - in_directives : true, - in_loop : 0, - labels : [] - }; - - S.token = next(); - - function is(type, value) { - return is_token(S.token, type, value); - }; - - function peek() { return S.peeked || (S.peeked = S.input()); }; - - function next() { - S.prev = S.token; - if (S.peeked) { - S.token = S.peeked; - S.peeked = null; - } else { - S.token = S.input(); - } - S.in_directives = S.in_directives && ( - S.token.type == "string" || is("punc", ";") - ); - return S.token; - }; - - function prev() { - return S.prev; - }; - - function croak(msg, line, col, pos) { - var ctx = S.input.context(); - js_error(msg, - line != null ? line : ctx.tokline, - col != null ? col : ctx.tokcol, - pos != null ? pos : ctx.tokpos); - }; - - function token_error(token, msg) { - croak(msg, token.line, token.col); - }; - - function unexpected(token) { - if (token == null) - token = S.token; - token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); - }; - - function expect_token(type, val) { - if (is(type, val)) { - return next(); - } - token_error(S.token, "Unexpected token " + S.token.type + ", expected " + type); - }; - - function expect(punc) { return expect_token("punc", punc); }; - - function can_insert_semicolon() { - return !exigent_mode && ( - S.token.nlb || is("eof") || is("punc", "}") - ); - }; - - function semicolon() { - if (is("punc", ";")) next(); - else if (!can_insert_semicolon()) unexpected(); - }; - - function as() { - return slice(arguments); - }; - - function parenthesised() { - expect("("); - var ex = expression(); - expect(")"); - return ex; - }; - - function add_tokens(str, start, end) { - return str instanceof NodeWithToken ? str : new NodeWithToken(str, start, end); - }; - - function maybe_embed_tokens(parser) { - if (embed_tokens) return function() { - var start = S.token; - var ast = parser.apply(this, arguments); - ast[0] = add_tokens(ast[0], start, prev()); - return ast; - }; - else return parser; - }; - - var statement = maybe_embed_tokens(function() { - if (is("operator", "/") || is("operator", "/=")) { - S.peeked = null; - S.token = S.input(S.token.value.substr(1)); // force regexp - } - switch (S.token.type) { - case "string": - var dir = S.in_directives, stat = simple_statement(); - if (dir && stat[1][0] == "string" && !is("punc", ",")) - return as("directive", stat[1][1]); - return stat; - case "num": - case "regexp": - case "operator": - case "atom": - return simple_statement(); - - case "name": - return is_token(peek(), "punc", ":") - ? labeled_statement(prog1(S.token.value, next, next)) - : simple_statement(); - - case "punc": - switch (S.token.value) { - case "{": - return as("block", block_()); - case "[": - case "(": - return simple_statement(); - case ";": - next(); - return as("block"); - default: - unexpected(); - } - - case "keyword": - switch (prog1(S.token.value, next)) { - case "break": - return break_cont("break"); - - case "continue": - return break_cont("continue"); - - case "debugger": - semicolon(); - return as("debugger"); - - case "do": - return (function(body){ - expect_token("keyword", "while"); - return as("do", prog1(parenthesised, semicolon), body); - })(in_loop(statement)); - - case "for": - return for_(); - - case "function": - return function_(true); - - case "if": - return if_(); - - case "return": - if (S.in_function == 0) - croak("'return' outside of function"); - return as("return", - is("punc", ";") - ? (next(), null) - : can_insert_semicolon() - ? null - : prog1(expression, semicolon)); - - case "switch": - return as("switch", parenthesised(), switch_block_()); - - case "throw": - if (S.token.nlb) - croak("Illegal newline after 'throw'"); - return as("throw", prog1(expression, semicolon)); - - case "try": - return try_(); - - case "var": - return prog1(var_, semicolon); - - case "const": - return prog1(const_, semicolon); - - case "while": - return as("while", parenthesised(), in_loop(statement)); - - case "with": - return as("with", parenthesised(), statement()); - - default: - unexpected(); - } - } - }); - - function labeled_statement(label) { - S.labels.push(label); - var start = S.token, stat = statement(); - if (exigent_mode && !HOP(STATEMENTS_WITH_LABELS, stat[0])) - unexpected(start); - S.labels.pop(); - return as("label", label, stat); - }; - - function simple_statement() { - return as("stat", prog1(expression, semicolon)); - }; - - function break_cont(type) { - var name; - if (!can_insert_semicolon()) { - name = is("name") ? S.token.value : null; - } - if (name != null) { - next(); - if (!member(name, S.labels)) - croak("Label " + name + " without matching loop or statement"); - } - else if (S.in_loop == 0) - croak(type + " not inside a loop or switch"); - semicolon(); - return as(type, name); - }; - - function for_() { - expect("("); - var init = null; - if (!is("punc", ";")) { - init = is("keyword", "var") - ? (next(), var_(true)) - : expression(true, true); - if (is("operator", "in")) { - if (init[0] == "var" && init[1].length > 1) - croak("Only one variable declaration allowed in for..in loop"); - return for_in(init); - } - } - return regular_for(init); - }; - - function regular_for(init) { - expect(";"); - var test = is("punc", ";") ? null : expression(); - expect(";"); - var step = is("punc", ")") ? null : expression(); - expect(")"); - return as("for", init, test, step, in_loop(statement)); - }; - - function for_in(init) { - var lhs = init[0] == "var" ? as("name", init[1][0]) : init; - next(); - var obj = expression(); - expect(")"); - return as("for-in", init, lhs, obj, in_loop(statement)); - }; - - var function_ = function(in_statement) { - var name = is("name") ? prog1(S.token.value, next) : null; - if (in_statement && !name) - unexpected(); - expect("("); - return as(in_statement ? "defun" : "function", - name, - // arguments - (function(first, a){ - while (!is("punc", ")")) { - if (first) first = false; else expect(","); - if (!is("name")) unexpected(); - a.push(S.token.value); - next(); - } - next(); - return a; - })(true, []), - // body - (function(){ - ++S.in_function; - var loop = S.in_loop; - S.in_directives = true; - S.in_loop = 0; - var a = block_(); - --S.in_function; - S.in_loop = loop; - return a; - })()); - }; - - function if_() { - var cond = parenthesised(), body = statement(), belse; - if (is("keyword", "else")) { - next(); - belse = statement(); - } - return as("if", cond, body, belse); - }; - - function block_() { - expect("{"); - var a = []; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - a.push(statement()); - } - next(); - return a; - }; - - var switch_block_ = curry(in_loop, function(){ - expect("{"); - var a = [], cur = null; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - if (is("keyword", "case")) { - next(); - cur = []; - a.push([ expression(), cur ]); - expect(":"); - } - else if (is("keyword", "default")) { - next(); - expect(":"); - cur = []; - a.push([ null, cur ]); - } - else { - if (!cur) unexpected(); - cur.push(statement()); - } - } - next(); - return a; - }); - - function try_() { - var body = block_(), bcatch, bfinally; - if (is("keyword", "catch")) { - next(); - expect("("); - if (!is("name")) - croak("Name expected"); - var name = S.token.value; - next(); - expect(")"); - bcatch = [ name, block_() ]; - } - if (is("keyword", "finally")) { - next(); - bfinally = block_(); - } - if (!bcatch && !bfinally) - croak("Missing catch/finally blocks"); - return as("try", body, bcatch, bfinally); - }; - - function vardefs(no_in) { - var a = []; - for (;;) { - if (!is("name")) - unexpected(); - var name = S.token.value; - next(); - if (is("operator", "=")) { - next(); - a.push([ name, expression(false, no_in) ]); - } else { - a.push([ name ]); - } - if (!is("punc", ",")) - break; - next(); - } - return a; - }; - - function var_(no_in) { - return as("var", vardefs(no_in)); - }; - - function const_() { - return as("const", vardefs()); - }; - - function new_() { - var newexp = expr_atom(false), args; - if (is("punc", "(")) { - next(); - args = expr_list(")"); - } else { - args = []; - } - return subscripts(as("new", newexp, args), true); - }; - - var expr_atom = maybe_embed_tokens(function(allow_calls) { - if (is("operator", "new")) { - next(); - return new_(); - } - if (is("punc")) { - switch (S.token.value) { - case "(": - next(); - return subscripts(prog1(expression, curry(expect, ")")), allow_calls); - case "[": - next(); - return subscripts(array_(), allow_calls); - case "{": - next(); - return subscripts(object_(), allow_calls); - } - unexpected(); - } - if (is("keyword", "function")) { - next(); - return subscripts(function_(false), allow_calls); - } - if (HOP(ATOMIC_START_TOKEN, S.token.type)) { - var atom = S.token.type == "regexp" - ? as("regexp", S.token.value[0], S.token.value[1]) - : as(S.token.type, S.token.value); - return subscripts(prog1(atom, next), allow_calls); - } - unexpected(); - }); - - function expr_list(closing, allow_trailing_comma, allow_empty) { - var first = true, a = []; - while (!is("punc", closing)) { - if (first) first = false; else expect(","); - if (allow_trailing_comma && is("punc", closing)) break; - if (is("punc", ",") && allow_empty) { - a.push([ "atom", "undefined" ]); - } else { - a.push(expression(false)); - } - } - next(); - return a; - }; - - function array_() { - return as("array", expr_list("]", !exigent_mode, true)); - }; - - function object_() { - var first = true, a = []; - while (!is("punc", "}")) { - if (first) first = false; else expect(","); - if (!exigent_mode && is("punc", "}")) - // allow trailing comma - break; - var type = S.token.type; - var name = as_property_name(); - if (type == "name" && (name == "get" || name == "set") && !is("punc", ":")) { - a.push([ as_name(), function_(false), name ]); - } else { - expect(":"); - a.push([ name, expression(false) ]); - } - } - next(); - return as("object", a); - }; - - function as_property_name() { - switch (S.token.type) { - case "num": - case "string": - return prog1(S.token.value, next); - } - return as_name(); - }; - - function as_name() { - switch (S.token.type) { - case "name": - case "operator": - case "keyword": - case "atom": - return prog1(S.token.value, next); - default: - unexpected(); - } - }; - - function subscripts(expr, allow_calls) { - if (is("punc", ".")) { - next(); - return subscripts(as("dot", expr, as_name()), allow_calls); - } - if (is("punc", "[")) { - next(); - return subscripts(as("sub", expr, prog1(expression, curry(expect, "]"))), allow_calls); - } - if (allow_calls && is("punc", "(")) { - next(); - return subscripts(as("call", expr, expr_list(")")), true); - } - return expr; - }; - - function maybe_unary(allow_calls) { - if (is("operator") && HOP(UNARY_PREFIX, S.token.value)) { - return make_unary("unary-prefix", - prog1(S.token.value, next), - maybe_unary(allow_calls)); - } - var val = expr_atom(allow_calls); - while (is("operator") && HOP(UNARY_POSTFIX, S.token.value) && !S.token.nlb) { - val = make_unary("unary-postfix", S.token.value, val); - next(); - } - return val; - }; - - function make_unary(tag, op, expr) { - if ((op == "++" || op == "--") && !is_assignable(expr)) - croak("Invalid use of " + op + " operator"); - return as(tag, op, expr); - }; - - function expr_op(left, min_prec, no_in) { - var op = is("operator") ? S.token.value : null; - if (op && op == "in" && no_in) op = null; - var prec = op != null ? PRECEDENCE[op] : null; - if (prec != null && prec > min_prec) { - next(); - var right = expr_op(maybe_unary(true), prec, no_in); - return expr_op(as("binary", op, left, right), min_prec, no_in); - } - return left; - }; - - function expr_ops(no_in) { - return expr_op(maybe_unary(true), 0, no_in); - }; - - function maybe_conditional(no_in) { - var expr = expr_ops(no_in); - if (is("operator", "?")) { - next(); - var yes = expression(false); - expect(":"); - return as("conditional", expr, yes, expression(false, no_in)); - } - return expr; - }; - - function is_assignable(expr) { - if (!exigent_mode) return true; - switch (expr[0]+"") { - case "dot": - case "sub": - case "new": - case "call": - return true; - case "name": - return expr[1] != "this"; - } - }; - - function maybe_assign(no_in) { - var left = maybe_conditional(no_in), val = S.token.value; - if (is("operator") && HOP(ASSIGNMENT, val)) { - if (is_assignable(left)) { - next(); - return as("assign", ASSIGNMENT[val], left, maybe_assign(no_in)); - } - croak("Invalid assignment"); - } - return left; - }; - - var expression = maybe_embed_tokens(function(commas, no_in) { - if (arguments.length == 0) - commas = true; - var expr = maybe_assign(no_in); - if (commas && is("punc", ",")) { - next(); - return as("seq", expr, expression(true, no_in)); - } - return expr; - }); - - function in_loop(cont) { - try { - ++S.in_loop; - return cont(); - } finally { - --S.in_loop; - } - }; - - return as("toplevel", (function(a){ - while (!is("eof")) - a.push(statement()); - return a; - })([])); - -}; - -/* -----[ Utilities ]----- */ - -function curry(f) { - var args = slice(arguments, 1); - return function() { return f.apply(this, args.concat(slice(arguments))); }; -}; - -function prog1(ret) { - if (ret instanceof Function) - ret = ret(); - for (var i = 1, n = arguments.length; --n > 0; ++i) - arguments[i](); - return ret; -}; - -function array_to_hash(a) { - var ret = {}; - for (var i = 0; i < a.length; ++i) - ret[a[i]] = true; - return ret; -}; - -function slice(a, start) { - return Array.prototype.slice.call(a, start || 0); -}; - -function characters(str) { - return str.split(""); -}; - -function member(name, array) { - for (var i = array.length; --i >= 0;) - if (array[i] == name) - return true; - return false; -}; - -function HOP(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -}; - -var warn = function() {}; - -/* -----[ Exports ]----- */ - -exports.tokenizer = tokenizer; -exports.parse = parse; -exports.slice = slice; -exports.curry = curry; -exports.member = member; -exports.array_to_hash = array_to_hash; -exports.PRECEDENCE = PRECEDENCE; -exports.KEYWORDS_ATOM = KEYWORDS_ATOM; -exports.RESERVED_WORDS = RESERVED_WORDS; -exports.KEYWORDS = KEYWORDS; -exports.ATOMIC_START_TOKEN = ATOMIC_START_TOKEN; -exports.OPERATORS = OPERATORS; -exports.is_alphanumeric_char = is_alphanumeric_char; -exports.is_identifier_start = is_identifier_start; -exports.is_identifier_char = is_identifier_char; -exports.set_logger = function(logger) { - warn = logger; -}; - -// Local variables: -// js-indent-level: 4 -// End: -});define('uglifyjs/squeeze-more', ["require", "exports", "module", "./parse-js", "./squeeze-more"], function(require, exports, module) { -var jsp = require("./parse-js"), - pro = require("./process"), - slice = jsp.slice, - member = jsp.member, - curry = jsp.curry, - MAP = pro.MAP, - PRECEDENCE = jsp.PRECEDENCE, - OPERATORS = jsp.OPERATORS; - -function ast_squeeze_more(ast) { - var w = pro.ast_walker(), walk = w.walk, scope; - function with_scope(s, cont) { - var save = scope, ret; - scope = s; - ret = cont(); - scope = save; - return ret; - }; - function _lambda(name, args, body) { - return [ this[0], name, args, with_scope(body.scope, curry(MAP, body, walk)) ]; - }; - return w.with_walkers({ - "toplevel": function(body) { - return [ this[0], with_scope(this.scope, curry(MAP, body, walk)) ]; - }, - "function": _lambda, - "defun": _lambda, - "new": function(ctor, args) { - if (ctor[0] == "name") { - if (ctor[1] == "Array" && !scope.has("Array")) { - if (args.length != 1) { - return [ "array", args ]; - } else { - return walk([ "call", [ "name", "Array" ], args ]); - } - } else if (ctor[1] == "Object" && !scope.has("Object")) { - if (!args.length) { - return [ "object", [] ]; - } else { - return walk([ "call", [ "name", "Object" ], args ]); - } - } else if ((ctor[1] == "RegExp" || ctor[1] == "Function" || ctor[1] == "Error") && !scope.has(ctor[1])) { - return walk([ "call", [ "name", ctor[1] ], args]); - } - } - }, - "call": function(expr, args) { - if (expr[0] == "dot" && expr[1][0] == "string" && args.length == 1 - && (args[0][1] > 0 && expr[2] == "substring" || expr[2] == "substr")) { - return [ "call", [ "dot", expr[1], "slice"], args]; - } - if (expr[0] == "dot" && expr[2] == "toString" && args.length == 0) { - // foo.toString() ==> foo+"" - if (expr[1][0] == "string") return expr[1]; - return [ "binary", "+", expr[1], [ "string", "" ]]; - } - if (expr[0] == "name") { - if (expr[1] == "Array" && args.length != 1 && !scope.has("Array")) { - return [ "array", args ]; - } - if (expr[1] == "Object" && !args.length && !scope.has("Object")) { - return [ "object", [] ]; - } - if (expr[1] == "String" && !scope.has("String")) { - return [ "binary", "+", args[0], [ "string", "" ]]; - } - } - } - }, function() { - return walk(pro.ast_add_scope(ast)); - }); -}; - -exports.ast_squeeze_more = ast_squeeze_more; - -// Local variables: -// js-indent-level: 4 -// End: -}); -define('uglifyjs/process', ["require", "exports", "module", "./parse-js", "./squeeze-more"], function(require, exports, module) { -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - - This version is suitable for Node.js. With minimal changes (the - exports stuff) it should work on any JS platform. - - This file implements some AST processors. They work on data built - by parse-js. - - Exported functions: - - - ast_mangle(ast, options) -- mangles the variable/function names - in the AST. Returns an AST. - - - ast_squeeze(ast) -- employs various optimizations to make the - final generated code even smaller. Returns an AST. - - - gen_code(ast, options) -- generates JS code from the AST. Pass - true (or an object, see the code for some options) as second - argument to get "pretty" (indented) code. - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2010 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -var jsp = require("./parse-js"), - curry = jsp.curry, - slice = jsp.slice, - member = jsp.member, - is_identifier_char = jsp.is_identifier_char, - PRECEDENCE = jsp.PRECEDENCE, - OPERATORS = jsp.OPERATORS; - -/* -----[ helper for AST traversal ]----- */ - -function ast_walker() { - function _vardefs(defs) { - return [ this[0], MAP(defs, function(def){ - var a = [ def[0] ]; - if (def.length > 1) - a[1] = walk(def[1]); - return a; - }) ]; - }; - function _block(statements) { - var out = [ this[0] ]; - if (statements != null) - out.push(MAP(statements, walk)); - return out; - }; - var walkers = { - "string": function(str) { - return [ this[0], str ]; - }, - "num": function(num) { - return [ this[0], num ]; - }, - "name": function(name) { - return [ this[0], name ]; - }, - "toplevel": function(statements) { - return [ this[0], MAP(statements, walk) ]; - }, - "block": _block, - "splice": _block, - "var": _vardefs, - "const": _vardefs, - "try": function(t, c, f) { - return [ - this[0], - MAP(t, walk), - c != null ? [ c[0], MAP(c[1], walk) ] : null, - f != null ? MAP(f, walk) : null - ]; - }, - "throw": function(expr) { - return [ this[0], walk(expr) ]; - }, - "new": function(ctor, args) { - return [ this[0], walk(ctor), MAP(args, walk) ]; - }, - "switch": function(expr, body) { - return [ this[0], walk(expr), MAP(body, function(branch){ - return [ branch[0] ? walk(branch[0]) : null, - MAP(branch[1], walk) ]; - }) ]; - }, - "break": function(label) { - return [ this[0], label ]; - }, - "continue": function(label) { - return [ this[0], label ]; - }, - "conditional": function(cond, t, e) { - return [ this[0], walk(cond), walk(t), walk(e) ]; - }, - "assign": function(op, lvalue, rvalue) { - return [ this[0], op, walk(lvalue), walk(rvalue) ]; - }, - "dot": function(expr) { - return [ this[0], walk(expr) ].concat(slice(arguments, 1)); - }, - "call": function(expr, args) { - return [ this[0], walk(expr), MAP(args, walk) ]; - }, - "function": function(name, args, body) { - return [ this[0], name, args.slice(), MAP(body, walk) ]; - }, - "debugger": function() { - return [ this[0] ]; - }, - "defun": function(name, args, body) { - return [ this[0], name, args.slice(), MAP(body, walk) ]; - }, - "if": function(conditional, t, e) { - return [ this[0], walk(conditional), walk(t), walk(e) ]; - }, - "for": function(init, cond, step, block) { - return [ this[0], walk(init), walk(cond), walk(step), walk(block) ]; - }, - "for-in": function(vvar, key, hash, block) { - return [ this[0], walk(vvar), walk(key), walk(hash), walk(block) ]; - }, - "while": function(cond, block) { - return [ this[0], walk(cond), walk(block) ]; - }, - "do": function(cond, block) { - return [ this[0], walk(cond), walk(block) ]; - }, - "return": function(expr) { - return [ this[0], walk(expr) ]; - }, - "binary": function(op, left, right) { - return [ this[0], op, walk(left), walk(right) ]; - }, - "unary-prefix": function(op, expr) { - return [ this[0], op, walk(expr) ]; - }, - "unary-postfix": function(op, expr) { - return [ this[0], op, walk(expr) ]; - }, - "sub": function(expr, subscript) { - return [ this[0], walk(expr), walk(subscript) ]; - }, - "object": function(props) { - return [ this[0], MAP(props, function(p){ - return p.length == 2 - ? [ p[0], walk(p[1]) ] - : [ p[0], walk(p[1]), p[2] ]; // get/set-ter - }) ]; - }, - "regexp": function(rx, mods) { - return [ this[0], rx, mods ]; - }, - "array": function(elements) { - return [ this[0], MAP(elements, walk) ]; - }, - "stat": function(stat) { - return [ this[0], walk(stat) ]; - }, - "seq": function() { - return [ this[0] ].concat(MAP(slice(arguments), walk)); - }, - "label": function(name, block) { - return [ this[0], name, walk(block) ]; - }, - "with": function(expr, block) { - return [ this[0], walk(expr), walk(block) ]; - }, - "atom": function(name) { - return [ this[0], name ]; - }, - "directive": function(dir) { - return [ this[0], dir ]; - } - }; - - var user = {}; - var stack = []; - function walk(ast) { - if (ast == null) - return null; - try { - stack.push(ast); - var type = ast[0]; - var gen = user[type]; - if (gen) { - var ret = gen.apply(ast, ast.slice(1)); - if (ret != null) - return ret; - } - gen = walkers[type]; - return gen.apply(ast, ast.slice(1)); - } finally { - stack.pop(); - } - }; - - function dive(ast) { - if (ast == null) - return null; - try { - stack.push(ast); - return walkers[ast[0]].apply(ast, ast.slice(1)); - } finally { - stack.pop(); - } - }; - - function with_walkers(walkers, cont){ - var save = {}, i; - for (i in walkers) if (HOP(walkers, i)) { - save[i] = user[i]; - user[i] = walkers[i]; - } - var ret = cont(); - for (i in save) if (HOP(save, i)) { - if (!save[i]) delete user[i]; - else user[i] = save[i]; - } - return ret; - }; - - return { - walk: walk, - dive: dive, - with_walkers: with_walkers, - parent: function() { - return stack[stack.length - 2]; // last one is current node - }, - stack: function() { - return stack; - } - }; -}; - -/* -----[ Scope and mangling ]----- */ - -function Scope(parent) { - this.names = {}; // names defined in this scope - this.mangled = {}; // mangled names (orig.name => mangled) - this.rev_mangled = {}; // reverse lookup (mangled => orig.name) - this.cname = -1; // current mangled name - this.refs = {}; // names referenced from this scope - this.uses_with = false; // will become TRUE if with() is detected in this or any subscopes - this.uses_eval = false; // will become TRUE if eval() is detected in this or any subscopes - this.directives = []; // directives activated from this scope - this.parent = parent; // parent scope - this.children = []; // sub-scopes - if (parent) { - this.level = parent.level + 1; - parent.children.push(this); - } else { - this.level = 0; - } -}; - -function base54_digits() { - if (typeof DIGITS_OVERRIDE_FOR_TESTING != "undefined") - return DIGITS_OVERRIDE_FOR_TESTING; - else - return "etnrisouaflchpdvmgybwESxTNCkLAOM_DPHBjFIqRUzWXV$JKQGYZ0516372984"; -} - -var base54 = (function(){ - var DIGITS = base54_digits(); - return function(num) { - var ret = "", base = 54; - do { - ret += DIGITS.charAt(num % base); - num = Math.floor(num / base); - base = 64; - } while (num > 0); - return ret; - }; -})(); - -Scope.prototype = { - has: function(name) { - for (var s = this; s; s = s.parent) - if (HOP(s.names, name)) - return s; - }, - has_mangled: function(mname) { - for (var s = this; s; s = s.parent) - if (HOP(s.rev_mangled, mname)) - return s; - }, - toJSON: function() { - return { - names: this.names, - uses_eval: this.uses_eval, - uses_with: this.uses_with - }; - }, - - next_mangled: function() { - // we must be careful that the new mangled name: - // - // 1. doesn't shadow a mangled name from a parent - // scope, unless we don't reference the original - // name from this scope OR from any sub-scopes! - // This will get slow. - // - // 2. doesn't shadow an original name from a parent - // scope, in the event that the name is not mangled - // in the parent scope and we reference that name - // here OR IN ANY SUBSCOPES! - // - // 3. doesn't shadow a name that is referenced but not - // defined (possibly global defined elsewhere). - for (;;) { - var m = base54(++this.cname), prior; - - // case 1. - prior = this.has_mangled(m); - if (prior && this.refs[prior.rev_mangled[m]] === prior) - continue; - - // case 2. - prior = this.has(m); - if (prior && prior !== this && this.refs[m] === prior && !prior.has_mangled(m)) - continue; - - // case 3. - if (HOP(this.refs, m) && this.refs[m] == null) - continue; - - // I got "do" once. :-/ - if (!is_identifier(m)) - continue; - - return m; - } - }, - set_mangle: function(name, m) { - this.rev_mangled[m] = name; - return this.mangled[name] = m; - }, - get_mangled: function(name, newMangle) { - if (this.uses_eval || this.uses_with) return name; // no mangle if eval or with is in use - var s = this.has(name); - if (!s) return name; // not in visible scope, no mangle - if (HOP(s.mangled, name)) return s.mangled[name]; // already mangled in this scope - if (!newMangle) return name; // not found and no mangling requested - return s.set_mangle(name, s.next_mangled()); - }, - references: function(name) { - return name && !this.parent || this.uses_with || this.uses_eval || this.refs[name]; - }, - define: function(name, type) { - if (name != null) { - if (type == "var" || !HOP(this.names, name)) - this.names[name] = type || "var"; - return name; - } - }, - active_directive: function(dir) { - return member(dir, this.directives) || this.parent && this.parent.active_directive(dir); - } -}; - -function ast_add_scope(ast) { - - var current_scope = null; - var w = ast_walker(), walk = w.walk; - var having_eval = []; - - function with_new_scope(cont) { - current_scope = new Scope(current_scope); - current_scope.labels = new Scope(); - var ret = current_scope.body = cont(); - ret.scope = current_scope; - current_scope = current_scope.parent; - return ret; - }; - - function define(name, type) { - return current_scope.define(name, type); - }; - - function reference(name) { - current_scope.refs[name] = true; - }; - - function _lambda(name, args, body) { - var is_defun = this[0] == "defun"; - return [ this[0], is_defun ? define(name, "defun") : name, args, with_new_scope(function(){ - if (!is_defun) define(name, "lambda"); - MAP(args, function(name){ define(name, "arg") }); - return MAP(body, walk); - })]; - }; - - function _vardefs(type) { - return function(defs) { - MAP(defs, function(d){ - define(d[0], type); - if (d[1]) reference(d[0]); - }); - }; - }; - - function _breacont(label) { - if (label) - current_scope.labels.refs[label] = true; - }; - - return with_new_scope(function(){ - // process AST - var ret = w.with_walkers({ - "function": _lambda, - "defun": _lambda, - "label": function(name, stat) { current_scope.labels.define(name) }, - "break": _breacont, - "continue": _breacont, - "with": function(expr, block) { - for (var s = current_scope; s; s = s.parent) - s.uses_with = true; - }, - "var": _vardefs("var"), - "const": _vardefs("const"), - "try": function(t, c, f) { - if (c != null) return [ - this[0], - MAP(t, walk), - [ define(c[0], "catch"), MAP(c[1], walk) ], - f != null ? MAP(f, walk) : null - ]; - }, - "name": function(name) { - if (name == "eval") - having_eval.push(current_scope); - reference(name); - } - }, function(){ - return walk(ast); - }); - - // the reason why we need an additional pass here is - // that names can be used prior to their definition. - - // scopes where eval was detected and their parents - // are marked with uses_eval, unless they define the - // "eval" name. - MAP(having_eval, function(scope){ - if (!scope.has("eval")) while (scope) { - scope.uses_eval = true; - scope = scope.parent; - } - }); - - // for referenced names it might be useful to know - // their origin scope. current_scope here is the - // toplevel one. - function fixrefs(scope, i) { - // do children first; order shouldn't matter - for (i = scope.children.length; --i >= 0;) - fixrefs(scope.children[i]); - for (i in scope.refs) if (HOP(scope.refs, i)) { - // find origin scope and propagate the reference to origin - for (var origin = scope.has(i), s = scope; s; s = s.parent) { - s.refs[i] = origin; - if (s === origin) break; - } - } - }; - fixrefs(current_scope); - - return ret; - }); - -}; - -/* -----[ mangle names ]----- */ - -function ast_mangle(ast, options) { - var w = ast_walker(), walk = w.walk, scope; - options = defaults(options, { - mangle : true, - toplevel : false, - defines : null, - except : null, - no_functions : false - }); - - function get_mangled(name, newMangle) { - if (!options.mangle) return name; - if (!options.toplevel && !scope.parent) return name; // don't mangle toplevel - if (options.except && member(name, options.except)) - return name; - if (options.no_functions && HOP(scope.names, name) && - (scope.names[name] == 'defun' || scope.names[name] == 'lambda')) - return name; - return scope.get_mangled(name, newMangle); - }; - - function get_define(name) { - if (options.defines) { - // we always lookup a defined symbol for the current scope FIRST, so declared - // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value - if (!scope.has(name)) { - if (HOP(options.defines, name)) { - return options.defines[name]; - } - } - return null; - } - }; - - function _lambda(name, args, body) { - if (!options.no_functions && options.mangle) { - var is_defun = this[0] == "defun", extra; - if (name) { - if (is_defun) name = get_mangled(name); - else if (body.scope.references(name)) { - extra = {}; - if (!(scope.uses_eval || scope.uses_with)) - name = extra[name] = scope.next_mangled(); - else - extra[name] = name; - } - else name = null; - } - } - body = with_scope(body.scope, function(){ - args = MAP(args, function(name){ return get_mangled(name) }); - return MAP(body, walk); - }, extra); - return [ this[0], name, args, body ]; - }; - - function with_scope(s, cont, extra) { - var _scope = scope; - scope = s; - if (extra) for (var i in extra) if (HOP(extra, i)) { - s.set_mangle(i, extra[i]); - } - for (var i in s.names) if (HOP(s.names, i)) { - get_mangled(i, true); - } - var ret = cont(); - ret.scope = s; - scope = _scope; - return ret; - }; - - function _vardefs(defs) { - return [ this[0], MAP(defs, function(d){ - return [ get_mangled(d[0]), walk(d[1]) ]; - }) ]; - }; - - function _breacont(label) { - if (label) return [ this[0], scope.labels.get_mangled(label) ]; - }; - - return w.with_walkers({ - "function": _lambda, - "defun": function() { - // move function declarations to the top when - // they are not in some block. - var ast = _lambda.apply(this, arguments); - switch (w.parent()[0]) { - case "toplevel": - case "function": - case "defun": - return MAP.at_top(ast); - } - return ast; - }, - "label": function(label, stat) { - if (scope.labels.refs[label]) return [ - this[0], - scope.labels.get_mangled(label, true), - walk(stat) - ]; - return walk(stat); - }, - "break": _breacont, - "continue": _breacont, - "var": _vardefs, - "const": _vardefs, - "name": function(name) { - return get_define(name) || [ this[0], get_mangled(name) ]; - }, - "try": function(t, c, f) { - return [ this[0], - MAP(t, walk), - c != null ? [ get_mangled(c[0]), MAP(c[1], walk) ] : null, - f != null ? MAP(f, walk) : null ]; - }, - "toplevel": function(body) { - var self = this; - return with_scope(self.scope, function(){ - return [ self[0], MAP(body, walk) ]; - }); - }, - "directive": function() { - return MAP.at_top(this); - } - }, function() { - return walk(ast_add_scope(ast)); - }); -}; - -/* -----[ - - compress foo["bar"] into foo.bar, - - remove block brackets {} where possible - - join consecutive var declarations - - various optimizations for IFs: - - if (cond) foo(); else bar(); ==> cond?foo():bar(); - - if (cond) foo(); ==> cond&&foo(); - - if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); // also for throw - - if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} - ]----- */ - -var warn = function(){}; - -function best_of(ast1, ast2) { - return gen_code(ast1).length > gen_code(ast2[0] == "stat" ? ast2[1] : ast2).length ? ast2 : ast1; -}; - -function last_stat(b) { - if (b[0] == "block" && b[1] && b[1].length > 0) - return b[1][b[1].length - 1]; - return b; -} - -function aborts(t) { - if (t) switch (last_stat(t)[0]) { - case "return": - case "break": - case "continue": - case "throw": - return true; - } -}; - -function boolean_expr(expr) { - return ( (expr[0] == "unary-prefix" - && member(expr[1], [ "!", "delete" ])) || - - (expr[0] == "binary" - && member(expr[1], [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ])) || - - (expr[0] == "binary" - && member(expr[1], [ "&&", "||" ]) - && boolean_expr(expr[2]) - && boolean_expr(expr[3])) || - - (expr[0] == "conditional" - && boolean_expr(expr[2]) - && boolean_expr(expr[3])) || - - (expr[0] == "assign" - && expr[1] === true - && boolean_expr(expr[3])) || - - (expr[0] == "seq" - && boolean_expr(expr[expr.length - 1])) - ); -}; - -function empty(b) { - return !b || (b[0] == "block" && (!b[1] || b[1].length == 0)); -}; - -function is_string(node) { - return (node[0] == "string" || - node[0] == "unary-prefix" && node[1] == "typeof" || - node[0] == "binary" && node[1] == "+" && - (is_string(node[2]) || is_string(node[3]))); -}; - -var when_constant = (function(){ - - var $NOT_CONSTANT = {}; - - // this can only evaluate constant expressions. If it finds anything - // not constant, it throws $NOT_CONSTANT. - function evaluate(expr) { - switch (expr[0]) { - case "string": - case "num": - return expr[1]; - case "name": - case "atom": - switch (expr[1]) { - case "true": return true; - case "false": return false; - case "null": return null; - } - break; - case "unary-prefix": - switch (expr[1]) { - case "!": return !evaluate(expr[2]); - case "typeof": return typeof evaluate(expr[2]); - case "~": return ~evaluate(expr[2]); - case "-": return -evaluate(expr[2]); - case "+": return +evaluate(expr[2]); - } - break; - case "binary": - var left = expr[2], right = expr[3]; - switch (expr[1]) { - case "&&" : return evaluate(left) && evaluate(right); - case "||" : return evaluate(left) || evaluate(right); - case "|" : return evaluate(left) | evaluate(right); - case "&" : return evaluate(left) & evaluate(right); - case "^" : return evaluate(left) ^ evaluate(right); - case "+" : return evaluate(left) + evaluate(right); - case "*" : return evaluate(left) * evaluate(right); - case "/" : return evaluate(left) / evaluate(right); - case "%" : return evaluate(left) % evaluate(right); - case "-" : return evaluate(left) - evaluate(right); - case "<<" : return evaluate(left) << evaluate(right); - case ">>" : return evaluate(left) >> evaluate(right); - case ">>>" : return evaluate(left) >>> evaluate(right); - case "==" : return evaluate(left) == evaluate(right); - case "===" : return evaluate(left) === evaluate(right); - case "!=" : return evaluate(left) != evaluate(right); - case "!==" : return evaluate(left) !== evaluate(right); - case "<" : return evaluate(left) < evaluate(right); - case "<=" : return evaluate(left) <= evaluate(right); - case ">" : return evaluate(left) > evaluate(right); - case ">=" : return evaluate(left) >= evaluate(right); - case "in" : return evaluate(left) in evaluate(right); - case "instanceof" : return evaluate(left) instanceof evaluate(right); - } - } - throw $NOT_CONSTANT; - }; - - return function(expr, yes, no) { - try { - var val = evaluate(expr), ast; - switch (typeof val) { - case "string": ast = [ "string", val ]; break; - case "number": ast = [ "num", val ]; break; - case "boolean": ast = [ "name", String(val) ]; break; - default: - if (val === null) { ast = [ "atom", "null" ]; break; } - throw new Error("Can't handle constant of type: " + (typeof val)); - } - return yes.call(expr, ast, val); - } catch(ex) { - if (ex === $NOT_CONSTANT) { - if (expr[0] == "binary" - && (expr[1] == "===" || expr[1] == "!==") - && ((is_string(expr[2]) && is_string(expr[3])) - || (boolean_expr(expr[2]) && boolean_expr(expr[3])))) { - expr[1] = expr[1].substr(0, 2); - } - else if (no && expr[0] == "binary" - && (expr[1] == "||" || expr[1] == "&&")) { - // the whole expression is not constant but the lval may be... - try { - var lval = evaluate(expr[2]); - expr = ((expr[1] == "&&" && (lval ? expr[3] : lval)) || - (expr[1] == "||" && (lval ? lval : expr[3])) || - expr); - } catch(ex2) { - // IGNORE... lval is not constant - } - } - return no ? no.call(expr, expr) : null; - } - else throw ex; - } - }; - -})(); - -function warn_unreachable(ast) { - if (!empty(ast)) - warn("Dropping unreachable code: " + gen_code(ast, true)); -}; - -function prepare_ifs(ast) { - var w = ast_walker(), walk = w.walk; - // In this first pass, we rewrite ifs which abort with no else with an - // if-else. For example: - // - // if (x) { - // blah(); - // return y; - // } - // foobar(); - // - // is rewritten into: - // - // if (x) { - // blah(); - // return y; - // } else { - // foobar(); - // } - function redo_if(statements) { - statements = MAP(statements, walk); - - for (var i = 0; i < statements.length; ++i) { - var fi = statements[i]; - if (fi[0] != "if") continue; - - if (fi[3]) continue; - - var t = fi[2]; - if (!aborts(t)) continue; - - var conditional = walk(fi[1]); - - var e_body = redo_if(statements.slice(i + 1)); - var e = e_body.length == 1 ? e_body[0] : [ "block", e_body ]; - - return statements.slice(0, i).concat([ [ - fi[0], // "if" - conditional, // conditional - t, // then - e // else - ] ]); - } - - return statements; - }; - - function redo_if_lambda(name, args, body) { - body = redo_if(body); - return [ this[0], name, args, body ]; - }; - - function redo_if_block(statements) { - return [ this[0], statements != null ? redo_if(statements) : null ]; - }; - - return w.with_walkers({ - "defun": redo_if_lambda, - "function": redo_if_lambda, - "block": redo_if_block, - "splice": redo_if_block, - "toplevel": function(statements) { - return [ this[0], redo_if(statements) ]; - }, - "try": function(t, c, f) { - return [ - this[0], - redo_if(t), - c != null ? [ c[0], redo_if(c[1]) ] : null, - f != null ? redo_if(f) : null - ]; - } - }, function() { - return walk(ast); - }); -}; - -function for_side_effects(ast, handler) { - var w = ast_walker(), walk = w.walk; - var $stop = {}, $restart = {}; - function stop() { throw $stop }; - function restart() { throw $restart }; - function found(){ return handler.call(this, this, w, stop, restart) }; - function unary(op) { - if (op == "++" || op == "--") - return found.apply(this, arguments); - }; - function binary(op) { - if (op == "&&" || op == "||") - return found.apply(this, arguments); - }; - return w.with_walkers({ - "try": found, - "throw": found, - "return": found, - "new": found, - "switch": found, - "break": found, - "continue": found, - "assign": found, - "call": found, - "if": found, - "for": found, - "for-in": found, - "while": found, - "do": found, - "return": found, - "unary-prefix": unary, - "unary-postfix": unary, - "conditional": found, - "binary": binary, - "defun": found - }, function(){ - while (true) try { - walk(ast); - break; - } catch(ex) { - if (ex === $stop) break; - if (ex === $restart) continue; - throw ex; - } - }); -}; - -function ast_lift_variables(ast) { - var w = ast_walker(), walk = w.walk, scope; - function do_body(body, env) { - var _scope = scope; - scope = env; - body = MAP(body, walk); - var hash = {}, names = MAP(env.names, function(type, name){ - if (type != "var") return MAP.skip; - if (!env.references(name)) return MAP.skip; - hash[name] = true; - return [ name ]; - }); - if (names.length > 0) { - // looking for assignments to any of these variables. - // we can save considerable space by moving the definitions - // in the var declaration. - for_side_effects([ "block", body ], function(ast, walker, stop, restart) { - if (ast[0] == "assign" - && ast[1] === true - && ast[2][0] == "name" - && HOP(hash, ast[2][1])) { - // insert the definition into the var declaration - for (var i = names.length; --i >= 0;) { - if (names[i][0] == ast[2][1]) { - if (names[i][1]) // this name already defined, we must stop - stop(); - names[i][1] = ast[3]; // definition - names.push(names.splice(i, 1)[0]); - break; - } - } - // remove this assignment from the AST. - var p = walker.parent(); - if (p[0] == "seq") { - var a = p[2]; - a.unshift(0, p.length); - p.splice.apply(p, a); - } - else if (p[0] == "stat") { - p.splice(0, p.length, "block"); // empty statement - } - else { - stop(); - } - restart(); - } - stop(); - }); - body.unshift([ "var", names ]); - } - scope = _scope; - return body; - }; - function _vardefs(defs) { - var ret = null; - for (var i = defs.length; --i >= 0;) { - var d = defs[i]; - if (!d[1]) continue; - d = [ "assign", true, [ "name", d[0] ], d[1] ]; - if (ret == null) ret = d; - else ret = [ "seq", d, ret ]; - } - if (ret == null && w.parent()[0] != "for") { - if (w.parent()[0] == "for-in") - return [ "name", defs[0][0] ]; - return MAP.skip; - } - return [ "stat", ret ]; - }; - function _toplevel(body) { - return [ this[0], do_body(body, this.scope) ]; - }; - return w.with_walkers({ - "function": function(name, args, body){ - for (var i = args.length; --i >= 0 && !body.scope.references(args[i]);) - args.pop(); - if (!body.scope.references(name)) name = null; - return [ this[0], name, args, do_body(body, body.scope) ]; - }, - "defun": function(name, args, body){ - if (!scope.references(name)) return MAP.skip; - for (var i = args.length; --i >= 0 && !body.scope.references(args[i]);) - args.pop(); - return [ this[0], name, args, do_body(body, body.scope) ]; - }, - "var": _vardefs, - "toplevel": _toplevel - }, function(){ - return walk(ast_add_scope(ast)); - }); -}; - -function ast_squeeze(ast, options) { - ast = squeeze_1(ast, options); - ast = squeeze_2(ast, options); - return ast; -}; - -function squeeze_1(ast, options) { - options = defaults(options, { - make_seqs : true, - dead_code : true, - no_warnings : false, - keep_comps : true, - unsafe : false - }); - - var w = ast_walker(), walk = w.walk, scope; - - function negate(c) { - var not_c = [ "unary-prefix", "!", c ]; - switch (c[0]) { - case "unary-prefix": - return c[1] == "!" && boolean_expr(c[2]) ? c[2] : not_c; - case "seq": - c = slice(c); - c[c.length - 1] = negate(c[c.length - 1]); - return c; - case "conditional": - return best_of(not_c, [ "conditional", c[1], negate(c[2]), negate(c[3]) ]); - case "binary": - var op = c[1], left = c[2], right = c[3]; - if (!options.keep_comps) switch (op) { - case "<=" : return [ "binary", ">", left, right ]; - case "<" : return [ "binary", ">=", left, right ]; - case ">=" : return [ "binary", "<", left, right ]; - case ">" : return [ "binary", "<=", left, right ]; - } - switch (op) { - case "==" : return [ "binary", "!=", left, right ]; - case "!=" : return [ "binary", "==", left, right ]; - case "===" : return [ "binary", "!==", left, right ]; - case "!==" : return [ "binary", "===", left, right ]; - case "&&" : return best_of(not_c, [ "binary", "||", negate(left), negate(right) ]); - case "||" : return best_of(not_c, [ "binary", "&&", negate(left), negate(right) ]); - } - break; - } - return not_c; - }; - - function make_conditional(c, t, e) { - var make_real_conditional = function() { - if (c[0] == "unary-prefix" && c[1] == "!") { - return e ? [ "conditional", c[2], e, t ] : [ "binary", "||", c[2], t ]; - } else { - return e ? best_of( - [ "conditional", c, t, e ], - [ "conditional", negate(c), e, t ] - ) : [ "binary", "&&", c, t ]; - } - }; - // shortcut the conditional if the expression has a constant value - return when_constant(c, function(ast, val){ - warn_unreachable(val ? e : t); - return (val ? t : e); - }, make_real_conditional); - }; - - function rmblock(block) { - if (block != null && block[0] == "block" && block[1]) { - if (block[1].length == 1) - block = block[1][0]; - else if (block[1].length == 0) - block = [ "block" ]; - } - return block; - }; - - function _lambda(name, args, body) { - return [ this[0], name, args, tighten(body, "lambda") ]; - }; - - // this function does a few things: - // 1. discard useless blocks - // 2. join consecutive var declarations - // 3. remove obviously dead code - // 4. transform consecutive statements using the comma operator - // 5. if block_type == "lambda" and it detects constructs like if(foo) return ... - rewrite like if (!foo) { ... } - function tighten(statements, block_type) { - statements = MAP(statements, walk); - - statements = statements.reduce(function(a, stat){ - if (stat[0] == "block") { - if (stat[1]) { - a.push.apply(a, stat[1]); - } - } else { - a.push(stat); - } - return a; - }, []); - - statements = (function(a, prev){ - statements.forEach(function(cur){ - if (prev && ((cur[0] == "var" && prev[0] == "var") || - (cur[0] == "const" && prev[0] == "const"))) { - prev[1] = prev[1].concat(cur[1]); - } else { - a.push(cur); - prev = cur; - } - }); - return a; - })([]); - - if (options.dead_code) statements = (function(a, has_quit){ - statements.forEach(function(st){ - if (has_quit) { - if (st[0] == "function" || st[0] == "defun") { - a.push(st); - } - else if (st[0] == "var" || st[0] == "const") { - if (!options.no_warnings) - warn("Variables declared in unreachable code"); - st[1] = MAP(st[1], function(def){ - if (def[1] && !options.no_warnings) - warn_unreachable([ "assign", true, [ "name", def[0] ], def[1] ]); - return [ def[0] ]; - }); - a.push(st); - } - else if (!options.no_warnings) - warn_unreachable(st); - } - else { - a.push(st); - if (member(st[0], [ "return", "throw", "break", "continue" ])) - has_quit = true; - } - }); - return a; - })([]); - - if (options.make_seqs) statements = (function(a, prev) { - statements.forEach(function(cur){ - if (prev && prev[0] == "stat" && cur[0] == "stat") { - prev[1] = [ "seq", prev[1], cur[1] ]; - } else { - a.push(cur); - prev = cur; - } - }); - if (a.length >= 2 - && a[a.length-2][0] == "stat" - && (a[a.length-1][0] == "return" || a[a.length-1][0] == "throw") - && a[a.length-1][1]) - { - a.splice(a.length - 2, 2, - [ a[a.length-1][0], - [ "seq", a[a.length-2][1], a[a.length-1][1] ]]); - } - return a; - })([]); - - // this increases jQuery by 1K. Probably not such a good idea after all.. - // part of this is done in prepare_ifs anyway. - // if (block_type == "lambda") statements = (function(i, a, stat){ - // while (i < statements.length) { - // stat = statements[i++]; - // if (stat[0] == "if" && !stat[3]) { - // if (stat[2][0] == "return" && stat[2][1] == null) { - // a.push(make_if(negate(stat[1]), [ "block", statements.slice(i) ])); - // break; - // } - // var last = last_stat(stat[2]); - // if (last[0] == "return" && last[1] == null) { - // a.push(make_if(stat[1], [ "block", stat[2][1].slice(0, -1) ], [ "block", statements.slice(i) ])); - // break; - // } - // } - // a.push(stat); - // } - // return a; - // })(0, []); - - return statements; - }; - - function make_if(c, t, e) { - return when_constant(c, function(ast, val){ - if (val) { - t = walk(t); - warn_unreachable(e); - return t || [ "block" ]; - } else { - e = walk(e); - warn_unreachable(t); - return e || [ "block" ]; - } - }, function() { - return make_real_if(c, t, e); - }); - }; - - function abort_else(c, t, e) { - var ret = [ [ "if", negate(c), e ] ]; - if (t[0] == "block") { - if (t[1]) ret = ret.concat(t[1]); - } else { - ret.push(t); - } - return walk([ "block", ret ]); - }; - - function make_real_if(c, t, e) { - c = walk(c); - t = walk(t); - e = walk(e); - - if (empty(e) && empty(t)) - return [ "stat", c ]; - - if (empty(t)) { - c = negate(c); - t = e; - e = null; - } else if (empty(e)) { - e = null; - } else { - // if we have both else and then, maybe it makes sense to switch them? - (function(){ - var a = gen_code(c); - var n = negate(c); - var b = gen_code(n); - if (b.length < a.length) { - var tmp = t; - t = e; - e = tmp; - c = n; - } - })(); - } - var ret = [ "if", c, t, e ]; - if (t[0] == "if" && empty(t[3]) && empty(e)) { - ret = best_of(ret, walk([ "if", [ "binary", "&&", c, t[1] ], t[2] ])); - } - else if (t[0] == "stat") { - if (e) { - if (e[0] == "stat") - ret = best_of(ret, [ "stat", make_conditional(c, t[1], e[1]) ]); - else if (aborts(e)) - ret = abort_else(c, t, e); - } - else { - ret = best_of(ret, [ "stat", make_conditional(c, t[1]) ]); - } - } - else if (e && t[0] == e[0] && (t[0] == "return" || t[0] == "throw") && t[1] && e[1]) { - ret = best_of(ret, [ t[0], make_conditional(c, t[1], e[1] ) ]); - } - else if (e && aborts(t)) { - ret = [ [ "if", c, t ] ]; - if (e[0] == "block") { - if (e[1]) ret = ret.concat(e[1]); - } - else { - ret.push(e); - } - ret = walk([ "block", ret ]); - } - else if (t && aborts(e)) { - ret = abort_else(c, t, e); - } - return ret; - }; - - function _do_while(cond, body) { - return when_constant(cond, function(cond, val){ - if (!val) { - warn_unreachable(body); - return [ "block" ]; - } else { - return [ "for", null, null, null, walk(body) ]; - } - }); - }; - - return w.with_walkers({ - "sub": function(expr, subscript) { - if (subscript[0] == "string") { - var name = subscript[1]; - if (is_identifier(name)) - return [ "dot", walk(expr), name ]; - else if (/^[1-9][0-9]*$/.test(name) || name === "0") - return [ "sub", walk(expr), [ "num", parseInt(name, 10) ] ]; - } - }, - "if": make_if, - "toplevel": function(body) { - return [ "toplevel", tighten(body) ]; - }, - "switch": function(expr, body) { - var last = body.length - 1; - return [ "switch", walk(expr), MAP(body, function(branch, i){ - var block = tighten(branch[1]); - if (i == last && block.length > 0) { - var node = block[block.length - 1]; - if (node[0] == "break" && !node[1]) - block.pop(); - } - return [ branch[0] ? walk(branch[0]) : null, block ]; - }) ]; - }, - "function": _lambda, - "defun": _lambda, - "block": function(body) { - if (body) return rmblock([ "block", tighten(body) ]); - }, - "binary": function(op, left, right) { - return when_constant([ "binary", op, walk(left), walk(right) ], function yes(c){ - return best_of(walk(c), this); - }, function no() { - return function(){ - if(op != "==" && op != "!=") return; - var l = walk(left), r = walk(right); - if(l && l[0] == "unary-prefix" && l[1] == "!" && l[2][0] == "num") - left = ['num', +!l[2][1]]; - else if (r && r[0] == "unary-prefix" && r[1] == "!" && r[2][0] == "num") - right = ['num', +!r[2][1]]; - return ["binary", op, left, right]; - }() || this; - }); - }, - "conditional": function(c, t, e) { - return make_conditional(walk(c), walk(t), walk(e)); - }, - "try": function(t, c, f) { - return [ - "try", - tighten(t), - c != null ? [ c[0], tighten(c[1]) ] : null, - f != null ? tighten(f) : null - ]; - }, - "unary-prefix": function(op, expr) { - expr = walk(expr); - var ret = [ "unary-prefix", op, expr ]; - if (op == "!") - ret = best_of(ret, negate(expr)); - return when_constant(ret, function(ast, val){ - return walk(ast); // it's either true or false, so minifies to !0 or !1 - }, function() { return ret }); - }, - "name": function(name) { - switch (name) { - case "true": return [ "unary-prefix", "!", [ "num", 0 ]]; - case "false": return [ "unary-prefix", "!", [ "num", 1 ]]; - } - }, - "while": _do_while, - "assign": function(op, lvalue, rvalue) { - lvalue = walk(lvalue); - rvalue = walk(rvalue); - var okOps = [ '+', '-', '/', '*', '%', '>>', '<<', '>>>', '|', '^', '&' ]; - if (op === true && lvalue[0] === "name" && rvalue[0] === "binary" && - ~okOps.indexOf(rvalue[1]) && rvalue[2][0] === "name" && - rvalue[2][1] === lvalue[1]) { - return [ this[0], rvalue[1], lvalue, rvalue[3] ] - } - return [ this[0], op, lvalue, rvalue ]; - }, - "call": function(expr, args) { - expr = walk(expr); - if (options.unsafe && expr[0] == "dot" && expr[1][0] == "string" && expr[2] == "toString") { - return expr[1]; - } - return [ this[0], expr, MAP(args, walk) ]; - }, - "num": function (num) { - if (!isFinite(num)) - return [ "binary", "/", num === 1 / 0 - ? [ "num", 1 ] : num === -1 / 0 - ? [ "unary-prefix", "-", [ "num", 1 ] ] - : [ "num", 0 ], [ "num", 0 ] ]; - - return [ this[0], num ]; - } - }, function() { - return walk(prepare_ifs(walk(prepare_ifs(ast)))); - }); -}; - -function squeeze_2(ast, options) { - var w = ast_walker(), walk = w.walk, scope; - function with_scope(s, cont) { - var save = scope, ret; - scope = s; - ret = cont(); - scope = save; - return ret; - }; - function lambda(name, args, body) { - return [ this[0], name, args, with_scope(body.scope, curry(MAP, body, walk)) ]; - }; - return w.with_walkers({ - "directive": function(dir) { - if (scope.active_directive(dir)) - return [ "block" ]; - scope.directives.push(dir); - }, - "toplevel": function(body) { - return [ this[0], with_scope(this.scope, curry(MAP, body, walk)) ]; - }, - "function": lambda, - "defun": lambda - }, function(){ - return walk(ast_add_scope(ast)); - }); -}; - -/* -----[ re-generate code from the AST ]----- */ - -var DOT_CALL_NO_PARENS = jsp.array_to_hash([ - "name", - "array", - "object", - "string", - "dot", - "sub", - "call", - "regexp", - "defun" -]); - -function make_string(str, ascii_only) { - var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){ - switch (s) { - case "\\": return "\\\\"; - case "\b": return "\\b"; - case "\f": return "\\f"; - case "\n": return "\\n"; - case "\r": return "\\r"; - case "\u2028": return "\\u2028"; - case "\u2029": return "\\u2029"; - case '"': ++dq; return '"'; - case "'": ++sq; return "'"; - case "\0": return "\\0"; - } - return s; - }); - if (ascii_only) str = to_ascii(str); - if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'"; - else return '"' + str.replace(/\x22/g, '\\"') + '"'; -}; - -function to_ascii(str) { - return str.replace(/[\u0080-\uffff]/g, function(ch) { - var code = ch.charCodeAt(0).toString(16); - while (code.length < 4) code = "0" + code; - return "\\u" + code; - }); -}; - -var SPLICE_NEEDS_BRACKETS = jsp.array_to_hash([ "if", "while", "do", "for", "for-in", "with" ]); - -function gen_code(ast, options) { - options = defaults(options, { - indent_start : 0, - indent_level : 4, - quote_keys : false, - space_colon : false, - beautify : false, - ascii_only : false, - inline_script: false - }); - var beautify = !!options.beautify; - var indentation = 0, - newline = beautify ? "\n" : "", - space = beautify ? " " : ""; - - function encode_string(str) { - var ret = make_string(str, options.ascii_only); - if (options.inline_script) - ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); - return ret; - }; - - function make_name(name) { - name = name.toString(); - if (options.ascii_only) - name = to_ascii(name); - return name; - }; - - function indent(line) { - if (line == null) - line = ""; - if (beautify) - line = repeat_string(" ", options.indent_start + indentation * options.indent_level) + line; - return line; - }; - - function with_indent(cont, incr) { - if (incr == null) incr = 1; - indentation += incr; - try { return cont.apply(null, slice(arguments, 1)); } - finally { indentation -= incr; } - }; - - function last_char(str) { - str = str.toString(); - return str.charAt(str.length - 1); - }; - - function first_char(str) { - return str.toString().charAt(0); - }; - - function add_spaces(a) { - if (beautify) - return a.join(" "); - var b = []; - for (var i = 0; i < a.length; ++i) { - var next = a[i + 1]; - b.push(a[i]); - if (next && - ((is_identifier_char(last_char(a[i])) && (is_identifier_char(first_char(next)) - || first_char(next) == "\\")) || - (/[\+\-]$/.test(a[i].toString()) && /^[\+\-]/.test(next.toString()) || - last_char(a[i]) == "/" && first_char(next) == "/"))) { - b.push(" "); - } - } - return b.join(""); - }; - - function add_commas(a) { - return a.join("," + space); - }; - - function parenthesize(expr) { - var gen = make(expr); - for (var i = 1; i < arguments.length; ++i) { - var el = arguments[i]; - if ((el instanceof Function && el(expr)) || expr[0] == el) - return "(" + gen + ")"; - } - return gen; - }; - - function best_of(a) { - if (a.length == 1) { - return a[0]; - } - if (a.length == 2) { - var b = a[1]; - a = a[0]; - return a.length <= b.length ? a : b; - } - return best_of([ a[0], best_of(a.slice(1)) ]); - }; - - function needs_parens(expr) { - if (expr[0] == "function" || expr[0] == "object") { - // dot/call on a literal function requires the - // function literal itself to be parenthesized - // only if it's the first "thing" in a - // statement. This means that the parent is - // "stat", but it could also be a "seq" and - // we're the first in this "seq" and the - // parent is "stat", and so on. Messy stuff, - // but it worths the trouble. - var a = slice(w.stack()), self = a.pop(), p = a.pop(); - while (p) { - if (p[0] == "stat") return true; - if (((p[0] == "seq" || p[0] == "call" || p[0] == "dot" || p[0] == "sub" || p[0] == "conditional") && p[1] === self) || - ((p[0] == "binary" || p[0] == "assign" || p[0] == "unary-postfix") && p[2] === self)) { - self = p; - p = a.pop(); - } else { - return false; - } - } - } - return !HOP(DOT_CALL_NO_PARENS, expr[0]); - }; - - function make_num(num) { - var str = num.toString(10), a = [ str.replace(/^0\./, ".").replace('e+', 'e') ], m; - if (Math.floor(num) === num) { - if (num >= 0) { - a.push("0x" + num.toString(16).toLowerCase(), // probably pointless - "0" + num.toString(8)); // same. - } else { - a.push("-0x" + (-num).toString(16).toLowerCase(), // probably pointless - "-0" + (-num).toString(8)); // same. - } - if ((m = /^(.*?)(0+)$/.exec(num))) { - a.push(m[1] + "e" + m[2].length); - } - } else if ((m = /^0?\.(0+)(.*)$/.exec(num))) { - a.push(m[2] + "e-" + (m[1].length + m[2].length), - str.substr(str.indexOf("."))); - } - return best_of(a); - }; - - var w = ast_walker(); - var make = w.walk; - return w.with_walkers({ - "string": encode_string, - "num": make_num, - "name": make_name, - "debugger": function(){ return "debugger;" }, - "toplevel": function(statements) { - return make_block_statements(statements) - .join(newline + newline); - }, - "splice": function(statements) { - var parent = w.parent(); - if (HOP(SPLICE_NEEDS_BRACKETS, parent)) { - // we need block brackets in this case - return make_block.apply(this, arguments); - } else { - return MAP(make_block_statements(statements, true), - function(line, i) { - // the first line is already indented - return i > 0 ? indent(line) : line; - }).join(newline); - } - }, - "block": make_block, - "var": function(defs) { - return "var " + add_commas(MAP(defs, make_1vardef)) + ";"; - }, - "const": function(defs) { - return "const " + add_commas(MAP(defs, make_1vardef)) + ";"; - }, - "try": function(tr, ca, fi) { - var out = [ "try", make_block(tr) ]; - if (ca) out.push("catch", "(" + ca[0] + ")", make_block(ca[1])); - if (fi) out.push("finally", make_block(fi)); - return add_spaces(out); - }, - "throw": function(expr) { - return add_spaces([ "throw", make(expr) ]) + ";"; - }, - "new": function(ctor, args) { - args = args.length > 0 ? "(" + add_commas(MAP(args, function(expr){ - return parenthesize(expr, "seq"); - })) + ")" : ""; - return add_spaces([ "new", parenthesize(ctor, "seq", "binary", "conditional", "assign", function(expr){ - var w = ast_walker(), has_call = {}; - try { - w.with_walkers({ - "call": function() { throw has_call }, - "function": function() { return this } - }, function(){ - w.walk(expr); - }); - } catch(ex) { - if (ex === has_call) - return true; - throw ex; - } - }) + args ]); - }, - "switch": function(expr, body) { - return add_spaces([ "switch", "(" + make(expr) + ")", make_switch_block(body) ]); - }, - "break": function(label) { - var out = "break"; - if (label != null) - out += " " + make_name(label); - return out + ";"; - }, - "continue": function(label) { - var out = "continue"; - if (label != null) - out += " " + make_name(label); - return out + ";"; - }, - "conditional": function(co, th, el) { - return add_spaces([ parenthesize(co, "assign", "seq", "conditional"), "?", - parenthesize(th, "seq"), ":", - parenthesize(el, "seq") ]); - }, - "assign": function(op, lvalue, rvalue) { - if (op && op !== true) op += "="; - else op = "="; - return add_spaces([ make(lvalue), op, parenthesize(rvalue, "seq") ]); - }, - "dot": function(expr) { - var out = make(expr), i = 1; - if (expr[0] == "num") { - if (!/[a-f.]/i.test(out)) - out += "."; - } else if (expr[0] != "function" && needs_parens(expr)) - out = "(" + out + ")"; - while (i < arguments.length) - out += "." + make_name(arguments[i++]); - return out; - }, - "call": function(func, args) { - var f = make(func); - if (f.charAt(0) != "(" && needs_parens(func)) - f = "(" + f + ")"; - return f + "(" + add_commas(MAP(args, function(expr){ - return parenthesize(expr, "seq"); - })) + ")"; - }, - "function": make_function, - "defun": make_function, - "if": function(co, th, el) { - var out = [ "if", "(" + make(co) + ")", el ? make_then(th) : make(th) ]; - if (el) { - out.push("else", make(el)); - } - return add_spaces(out); - }, - "for": function(init, cond, step, block) { - var out = [ "for" ]; - init = (init != null ? make(init) : "").replace(/;*\s*$/, ";" + space); - cond = (cond != null ? make(cond) : "").replace(/;*\s*$/, ";" + space); - step = (step != null ? make(step) : "").replace(/;*\s*$/, ""); - var args = init + cond + step; - if (args == "; ; ") args = ";;"; - out.push("(" + args + ")", make(block)); - return add_spaces(out); - }, - "for-in": function(vvar, key, hash, block) { - return add_spaces([ "for", "(" + - (vvar ? make(vvar).replace(/;+$/, "") : make(key)), - "in", - make(hash) + ")", make(block) ]); - }, - "while": function(condition, block) { - return add_spaces([ "while", "(" + make(condition) + ")", make(block) ]); - }, - "do": function(condition, block) { - return add_spaces([ "do", make(block), "while", "(" + make(condition) + ")" ]) + ";"; - }, - "return": function(expr) { - var out = [ "return" ]; - if (expr != null) out.push(make(expr)); - return add_spaces(out) + ";"; - }, - "binary": function(operator, lvalue, rvalue) { - var left = make(lvalue), right = make(rvalue); - // XXX: I'm pretty sure other cases will bite here. - // we need to be smarter. - // adding parens all the time is the safest bet. - if (member(lvalue[0], [ "assign", "conditional", "seq" ]) || - lvalue[0] == "binary" && PRECEDENCE[operator] > PRECEDENCE[lvalue[1]] || - lvalue[0] == "function" && needs_parens(this)) { - left = "(" + left + ")"; - } - if (member(rvalue[0], [ "assign", "conditional", "seq" ]) || - rvalue[0] == "binary" && PRECEDENCE[operator] >= PRECEDENCE[rvalue[1]] && - !(rvalue[1] == operator && member(operator, [ "&&", "||", "*" ]))) { - right = "(" + right + ")"; - } - else if (!beautify && options.inline_script && (operator == "<" || operator == "<<") - && rvalue[0] == "regexp" && /^script/i.test(rvalue[1])) { - right = " " + right; - } - return add_spaces([ left, operator, right ]); - }, - "unary-prefix": function(operator, expr) { - var val = make(expr); - if (!(expr[0] == "num" || (expr[0] == "unary-prefix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr))) - val = "(" + val + ")"; - return operator + (jsp.is_alphanumeric_char(operator.charAt(0)) ? " " : "") + val; - }, - "unary-postfix": function(operator, expr) { - var val = make(expr); - if (!(expr[0] == "num" || (expr[0] == "unary-postfix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr))) - val = "(" + val + ")"; - return val + operator; - }, - "sub": function(expr, subscript) { - var hash = make(expr); - if (needs_parens(expr)) - hash = "(" + hash + ")"; - return hash + "[" + make(subscript) + "]"; - }, - "object": function(props) { - var obj_needs_parens = needs_parens(this); - if (props.length == 0) - return obj_needs_parens ? "({})" : "{}"; - var out = "{" + newline + with_indent(function(){ - return MAP(props, function(p){ - if (p.length == 3) { - // getter/setter. The name is in p[0], the arg.list in p[1][2], the - // body in p[1][3] and type ("get" / "set") in p[2]. - return indent(make_function(p[0], p[1][2], p[1][3], p[2], true)); - } - var key = p[0], val = parenthesize(p[1], "seq"); - if (options.quote_keys) { - key = encode_string(key); - } else if ((typeof key == "number" || !beautify && +key + "" == key) - && parseFloat(key) >= 0) { - key = make_num(+key); - } else if (!is_identifier(key)) { - key = encode_string(key); - } - return indent(add_spaces(beautify && options.space_colon - ? [ key, ":", val ] - : [ key + ":", val ])); - }).join("," + newline); - }) + newline + indent("}"); - return obj_needs_parens ? "(" + out + ")" : out; - }, - "regexp": function(rx, mods) { - if (options.ascii_only) rx = to_ascii(rx); - return "/" + rx + "/" + mods; - }, - "array": function(elements) { - if (elements.length == 0) return "[]"; - return add_spaces([ "[", add_commas(MAP(elements, function(el, i){ - if (!beautify && el[0] == "atom" && el[1] == "undefined") return i === elements.length - 1 ? "," : ""; - return parenthesize(el, "seq"); - })), "]" ]); - }, - "stat": function(stmt) { - return stmt != null - ? make(stmt).replace(/;*\s*$/, ";") - : ";"; - }, - "seq": function() { - return add_commas(MAP(slice(arguments), make)); - }, - "label": function(name, block) { - return add_spaces([ make_name(name), ":", make(block) ]); - }, - "with": function(expr, block) { - return add_spaces([ "with", "(" + make(expr) + ")", make(block) ]); - }, - "atom": function(name) { - return make_name(name); - }, - "directive": function(dir) { - return make_string(dir) + ";"; - } - }, function(){ return make(ast) }); - - // The squeezer replaces "block"-s that contain only a single - // statement with the statement itself; technically, the AST - // is correct, but this can create problems when we output an - // IF having an ELSE clause where the THEN clause ends in an - // IF *without* an ELSE block (then the outer ELSE would refer - // to the inner IF). This function checks for this case and - // adds the block brackets if needed. - function make_then(th) { - if (th == null) return ";"; - if (th[0] == "do") { - // https://github.com/mishoo/UglifyJS/issues/#issue/57 - // IE croaks with "syntax error" on code like this: - // if (foo) do ... while(cond); else ... - // we need block brackets around do/while - return make_block([ th ]); - } - var b = th; - while (true) { - var type = b[0]; - if (type == "if") { - if (!b[3]) - // no else, we must add the block - return make([ "block", [ th ]]); - b = b[3]; - } - else if (type == "while" || type == "do") b = b[2]; - else if (type == "for" || type == "for-in") b = b[4]; - else break; - } - return make(th); - }; - - function make_function(name, args, body, keyword, no_parens) { - var out = keyword || "function"; - if (name) { - out += " " + make_name(name); - } - out += "(" + add_commas(MAP(args, make_name)) + ")"; - out = add_spaces([ out, make_block(body) ]); - return (!no_parens && needs_parens(this)) ? "(" + out + ")" : out; - }; - - function must_has_semicolon(node) { - switch (node[0]) { - case "with": - case "while": - return empty(node[2]) || must_has_semicolon(node[2]); - case "for": - case "for-in": - return empty(node[4]) || must_has_semicolon(node[4]); - case "if": - if (empty(node[2]) && !node[3]) return true; // `if' with empty `then' and no `else' - if (node[3]) { - if (empty(node[3])) return true; // `else' present but empty - return must_has_semicolon(node[3]); // dive into the `else' branch - } - return must_has_semicolon(node[2]); // dive into the `then' branch - case "directive": - return true; - } - }; - - function make_block_statements(statements, noindent) { - for (var a = [], last = statements.length - 1, i = 0; i <= last; ++i) { - var stat = statements[i]; - var code = make(stat); - if (code != ";") { - if (!beautify && i == last && !must_has_semicolon(stat)) { - code = code.replace(/;+\s*$/, ""); - } - a.push(code); - } - } - return noindent ? a : MAP(a, indent); - }; - - function make_switch_block(body) { - var n = body.length; - if (n == 0) return "{}"; - return "{" + newline + MAP(body, function(branch, i){ - var has_body = branch[1].length > 0, code = with_indent(function(){ - return indent(branch[0] - ? add_spaces([ "case", make(branch[0]) + ":" ]) - : "default:"); - }, 0.5) + (has_body ? newline + with_indent(function(){ - return make_block_statements(branch[1]).join(newline); - }) : ""); - if (!beautify && has_body && i < n - 1) - code += ";"; - return code; - }).join(newline) + newline + indent("}"); - }; - - function make_block(statements) { - if (!statements) return ";"; - if (statements.length == 0) return "{}"; - return "{" + newline + with_indent(function(){ - return make_block_statements(statements).join(newline); - }) + newline + indent("}"); - }; - - function make_1vardef(def) { - var name = def[0], val = def[1]; - if (val != null) - name = add_spaces([ make_name(name), "=", parenthesize(val, "seq") ]); - return name; - }; - -}; - -function split_lines(code, max_line_length) { - var splits = [ 0 ]; - jsp.parse(function(){ - var next_token = jsp.tokenizer(code); - var last_split = 0; - var prev_token; - function current_length(tok) { - return tok.pos - last_split; - }; - function split_here(tok) { - last_split = tok.pos; - splits.push(last_split); - }; - function custom(){ - var tok = next_token.apply(this, arguments); - out: { - if (prev_token) { - if (prev_token.type == "keyword") break out; - } - if (current_length(tok) > max_line_length) { - switch (tok.type) { - case "keyword": - case "atom": - case "name": - case "punc": - split_here(tok); - break out; - } - } - } - prev_token = tok; - return tok; - }; - custom.context = function() { - return next_token.context.apply(this, arguments); - }; - return custom; - }()); - return splits.map(function(pos, i){ - return code.substring(pos, splits[i + 1] || code.length); - }).join("\n"); -}; - -/* -----[ Utilities ]----- */ - -function repeat_string(str, i) { - if (i <= 0) return ""; - if (i == 1) return str; - var d = repeat_string(str, i >> 1); - d += d; - if (i & 1) d += str; - return d; -}; - -function defaults(args, defs) { - var ret = {}; - if (args === true) - args = {}; - for (var i in defs) if (HOP(defs, i)) { - ret[i] = (args && HOP(args, i)) ? args[i] : defs[i]; - } - return ret; -}; - -function is_identifier(name) { - return /^[a-z_$][a-z0-9_$]*$/i.test(name) - && name != "this" - && !HOP(jsp.KEYWORDS_ATOM, name) - && !HOP(jsp.RESERVED_WORDS, name) - && !HOP(jsp.KEYWORDS, name); -}; - -function HOP(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -}; - -// some utilities - -var MAP; - -(function(){ - MAP = function(a, f, o) { - var ret = [], top = [], i; - function doit() { - var val = f.call(o, a[i], i); - if (val instanceof AtTop) { - val = val.v; - if (val instanceof Splice) { - top.push.apply(top, val.v); - } else { - top.push(val); - } - } - else if (val != skip) { - if (val instanceof Splice) { - ret.push.apply(ret, val.v); - } else { - ret.push(val); - } - } - }; - if (a instanceof Array) for (i = 0; i < a.length; ++i) doit(); - else for (i in a) if (HOP(a, i)) doit(); - return top.concat(ret); - }; - MAP.at_top = function(val) { return new AtTop(val) }; - MAP.splice = function(val) { return new Splice(val) }; - var skip = MAP.skip = {}; - function AtTop(val) { this.v = val }; - function Splice(val) { this.v = val }; -})(); - -/* -----[ Exports ]----- */ - -exports.ast_walker = ast_walker; -exports.ast_mangle = ast_mangle; -exports.ast_squeeze = ast_squeeze; -exports.ast_lift_variables = ast_lift_variables; -exports.gen_code = gen_code; -exports.ast_add_scope = ast_add_scope; -exports.set_logger = function(logger) { warn = logger }; -exports.make_string = make_string; -exports.split_lines = split_lines; -exports.MAP = MAP; - -// keep this last! -exports.ast_squeeze_more = require("./squeeze-more").ast_squeeze_more; - -// Local variables: -// js-indent-level: 4 -// End: -}); -define('uglifyjs/index', ["require", "exports", "module", "./parse-js", "./process", "./consolidator"], function(require, exports, module) { -//convienence function(src, [options]); -function uglify(orig_code, options){ - options || (options = {}); - var jsp = uglify.parser; - var pro = uglify.uglify; - - var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST - ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names - ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations - var final_code = pro.gen_code(ast, options.gen_options); // compressed code here - return final_code; -}; - -uglify.parser = require("./parse-js"); -uglify.uglify = require("./process"); -uglify.consolidator = require("./consolidator"); - -module.exports = uglify -});/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/array-set', function (require, exports, module) { - - var util = require('./util'); - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -define('source-map/base64-vlq', function (require, exports, module) { - - var base64 = require('./base64'); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string. - */ - exports.decode = function base64VLQ_decode(aStr) { - var i = 0; - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (i >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charAt(i++)); - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - return { - value: fromVLQSigned(result), - rest: aStr.slice(i) - }; - }; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/base64', function (require, exports, module) { - - var charToIntMap = {}; - var intToCharMap = {}; - - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - .split('') - .forEach(function (ch, index) { - charToIntMap[ch] = index; - intToCharMap[index] = ch; - }); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function base64_encode(aNumber) { - if (aNumber in intToCharMap) { - return intToCharMap[aNumber]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; - - /** - * Decode a single base 64 digit to an integer. - */ - exports.decode = function base64_decode(aChar) { - if (aChar in charToIntMap) { - return charToIntMap[aChar]; - } - throw new TypeError("Not a valid base 64 digit: " + aChar); - }; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/binary-search', function (require, exports, module) { - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the next - // closest element that is less than that element. - // - // 3. We did not find the exact element, and there is no next-closest - // element which is less than the one we are searching for, so we - // return null. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return aHaystack[mid]; - } - else if (cmp > 0) { - // aHaystack[mid] is greater than our needle. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); - } - // We did not find an exact match, return the next closest one - // (termination case 2). - return aHaystack[mid]; - } - else { - // aHaystack[mid] is less than our needle. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); - } - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (2) or (3) and return the appropriate thing. - return aLow < 0 - ? null - : aHaystack[aLow]; - } - } - - /** - * This is an implementation of binary search which will always try and return - * the next lowest value checked if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - */ - exports.search = function search(aNeedle, aHaystack, aCompare) { - return aHaystack.length > 0 - ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) - : null; - }; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/source-map-consumer', function (require, exports, module) { - - var util = require('./util'); - var binarySearch = require('./binary-search'); - var ArraySet = require('./array-set').ArraySet; - var base64VLQ = require('./base64-vlq'); - - /** - * A SourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - var names = util.getArg(sourceMap, 'names'); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - if (version !== this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this.file = file; - - // `this._generatedMappings` and `this._originalMappings` hold the parsed - // mapping coordinates from the source map's "mappings" attribute. Each - // object in the array is of the form - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `this._generatedMappings` is ordered by the generated positions. - // - // `this._originalMappings` is ordered by the original positions. - this._generatedMappings = []; - this._originalMappings = []; - this._parseMappings(mappings, sourceRoot); - } - - /** - * Create a SourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns SourceMapConsumer - */ - SourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(SourceMapConsumer.prototype); - - smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - smc._generatedMappings = aSourceMap._mappings.slice() - .sort(util.compareByGeneratedPositions); - smc._originalMappings = aSourceMap._mappings.slice() - .sort(util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(SourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (an ordered list in this._generatedMappings). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var mappingSeparator = /^[,;]/; - var str = aStr; - var mapping; - var temp; - - while (str.length > 0) { - if (str.charAt(0) === ';') { - generatedLine++; - str = str.slice(1); - previousGeneratedColumn = 0; - } - else if (str.charAt(0) === ',') { - str = str.slice(1); - } - else { - mapping = {}; - mapping.generatedLine = generatedLine; - - // Generated column. - temp = base64VLQ.decode(str); - mapping.generatedColumn = previousGeneratedColumn + temp.value; - previousGeneratedColumn = mapping.generatedColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original source. - temp = base64VLQ.decode(str); - mapping.source = this._sources.at(previousSource + temp.value); - previousSource += temp.value; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source, but no line and column'); - } - - // Original line. - temp = base64VLQ.decode(str); - mapping.originalLine = previousOriginalLine + temp.value; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source and line, but no column'); - } - - // Original column. - temp = base64VLQ.decode(str); - mapping.originalColumn = previousOriginalColumn + temp.value; - previousOriginalColumn = mapping.originalColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original name. - temp = base64VLQ.decode(str); - mapping.name = this._names.at(previousName + temp.value); - previousName += temp.value; - str = temp.rest; - } - } - - this._generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - this._originalMappings.push(mapping); - } - } - } - - this._originalMappings.sort(util.compareByOriginalPositions); - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - SourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator); - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - SourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var mapping = this._findMapping(needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositions); - - if (mapping) { - var source = util.getArg(mapping, 'source', null); - if (source && this.sourceRoot) { - source = util.join(this.sourceRoot, source); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: util.getArg(mapping, 'name', null) - }; - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - SourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - throw new Error('"' + aSource + '" is not in the SourceMap.'); - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - if (this.sourceRoot) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - - var mapping = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions); - - if (mapping) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null) - }; - } - - return { - line: null, - column: null - }; - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source; - if (source && sourceRoot) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name - }; - }).forEach(aCallback, context); - }; - - exports.SourceMapConsumer = SourceMapConsumer; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/source-map-generator', function (require, exports, module) { - - var base64VLQ = require('./base64-vlq'); - var util = require('./util'); - var ArraySet = require('./array-set').ArraySet; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. To create a new one, you must pass an object - * with the following properties: - * - * - file: The filename of the generated source. - * - sourceRoot: An optional root for all URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - this._file = util.getArg(aArgs, 'file'); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = []; - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source) { - newMapping.source = mapping.source; - if (sourceRoot) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - this._validateMapping(generated, original, source, name); - - if (source && !this._sources.has(source)) { - this._sources.add(source); - } - - if (name && !this._names.has(name)) { - this._names.add(name); - } - - this._mappings.push({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent !== null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) { - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (!aSourceFile) { - aSourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "aSourceFile" relative if an absolute Url is passed. - if (sourceRoot) { - aSourceFile = util.relative(sourceRoot, aSourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "aSourceFile" - this._mappings.forEach(function (mapping) { - if (mapping.source === aSourceFile && mapping.originalLine) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source !== null) { - // Copy mapping - if (sourceRoot) { - mapping.source = util.relative(sourceRoot, original.source); - } else { - mapping.source = original.source; - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name !== null && mapping.name !== null) { - // Only use the identifier name if it's an identifier - // in both SourceMaps - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - if (sourceRoot) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - orginal: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; - - // The mappings must be guaranteed to be in sorted order before we start - // serializing them or else the generated line numbers (which are defined - // via the ';' separators) will be all messed up. Note: it might be more - // performant to maintain the sorting as we insert them, rather than as we - // serialize them, but the big O is the same either way. - this._mappings.sort(util.compareByGeneratedPositions); - - for (var i = 0, len = this._mappings.length; i < len; i++) { - mapping = this._mappings[i]; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) { - continue; - } - result += ','; - } - } - - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); - - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); - } - } - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - file: this._file, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._sourceRoot) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/source-node', function (require, exports, module) { - - var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; - var util = require('./util'); - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine === undefined ? null : aLine; - this.column = aColumn === undefined ? null : aColumn; - this.source = aSource === undefined ? null : aSource; - this.name = aName === undefined ? null : aName; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // The generated code - // Processed fragments are removed from this array. - var remainingLines = aGeneratedCode.split('\n'); - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping === null) { - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(remainingLines.shift() + "\n"); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - } else { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate full lines with "lastMapping" - do { - code += remainingLines.shift() + "\n"; - lastGeneratedLine++; - lastGeneratedColumn = 0; - } while (lastGeneratedLine < mapping.generatedLine); - // When we reached the correct line, we add code until we - // reach the correct column too. - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - code += nextLine.substr(0, mapping.generatedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - // Create the SourceNode. - addMappingWithCode(lastMapping, code); - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - } - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - // Associate the remaining code in the current line with "lastMapping" - // and add the remaining lines without any mapping - addMappingWithCode(lastMapping, remainingLines.join("\n")); - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - mapping.source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk instanceof SourceNode) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild instanceof SourceNode) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i] instanceof SourceNode) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - chunk.split('').forEach(function (ch) { - if (ch === '\n') { - generated.line++; - generated.column = 0; - } else { - generated.column++; - } - }); - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/util', function (require, exports, module) { - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/; - var dataUrlRegexp = /^data:.+\,.+/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[3], - host: match[4], - port: match[6], - path: match[7] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = aParsedUrl.scheme + "://"; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + "@" - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - function join(aRoot, aPath) { - var url; - - if (aPath.match(urlRegexp) || aPath.match(dataUrlRegexp)) { - return aPath; - } - - if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) { - url.path = aPath; - return urlGenerate(url); - } - - return aRoot.replace(/\/$/, '') + '/' + aPath; - } - exports.join = join; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; - - function relative(aRoot, aPath) { - aRoot = aRoot.replace(/\/$/, ''); - - var url = urlParse(aRoot); - if (aPath.charAt(0) == "/" && url && url.path == "/") { - return aPath.slice(1); - } - - return aPath.indexOf(aRoot + '/') === 0 - ? aPath.substr(aRoot.length + 1) - : aPath; - } - exports.relative = relative; - - function strcmp(aStr1, aStr2) { - var s1 = aStr1 || ""; - var s2 = aStr2 || ""; - return (s1 > s2) - (s1 < s2); - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp || onlyCompareOriginal) { - return cmp; - } - - cmp = strcmp(mappingA.name, mappingB.name); - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - return mappingA.generatedColumn - mappingB.generatedColumn; - }; - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings where the generated positions are - * compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { - var cmp; - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositions = compareByGeneratedPositions; - -}); -define('source-map', function (require, exports, module) { - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./source-map/source-node').SourceNode; - -}); - -//Distributed under the BSD license: -//Copyright 2012 (c) Mihai Bazon -define('uglifyjs2', ['exports', 'source-map', 'logger', 'env!env/file'], function (exports, MOZ_SourceMap, logger, rjsFile) { -(function(exports, global) { - global["UglifyJS"] = exports; - "use strict"; - function array_to_hash(a) { - var ret = Object.create(null); - for (var i = 0; i < a.length; ++i) ret[a[i]] = true; - return ret; - } - function slice(a, start) { - return Array.prototype.slice.call(a, start || 0); - } - function characters(str) { - return str.split(""); - } - function member(name, array) { - for (var i = array.length; --i >= 0; ) if (array[i] == name) return true; - return false; - } - function find_if(func, array) { - for (var i = 0, n = array.length; i < n; ++i) { - if (func(array[i])) return array[i]; - } - } - function repeat_string(str, i) { - if (i <= 0) return ""; - if (i == 1) return str; - var d = repeat_string(str, i >> 1); - d += d; - if (i & 1) d += str; - return d; - } - function DefaultsError(msg, defs) { - this.msg = msg; - this.defs = defs; - } - function defaults(args, defs, croak) { - if (args === true) args = {}; - var ret = args || {}; - if (croak) for (var i in ret) if (ret.hasOwnProperty(i) && !defs.hasOwnProperty(i)) throw new DefaultsError("`" + i + "` is not a supported option", defs); - for (var i in defs) if (defs.hasOwnProperty(i)) { - ret[i] = args && args.hasOwnProperty(i) ? args[i] : defs[i]; - } - return ret; - } - function merge(obj, ext) { - for (var i in ext) if (ext.hasOwnProperty(i)) { - obj[i] = ext[i]; - } - return obj; - } - function noop() {} - var MAP = function() { - function MAP(a, f, backwards) { - var ret = [], top = [], i; - function doit() { - var val = f(a[i], i); - var is_last = val instanceof Last; - if (is_last) val = val.v; - if (val instanceof AtTop) { - val = val.v; - if (val instanceof Splice) { - top.push.apply(top, backwards ? val.v.slice().reverse() : val.v); - } else { - top.push(val); - } - } else if (val !== skip) { - if (val instanceof Splice) { - ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); - } else { - ret.push(val); - } - } - return is_last; - } - if (a instanceof Array) { - if (backwards) { - for (i = a.length; --i >= 0; ) if (doit()) break; - ret.reverse(); - top.reverse(); - } else { - for (i = 0; i < a.length; ++i) if (doit()) break; - } - } else { - for (i in a) if (a.hasOwnProperty(i)) if (doit()) break; - } - return top.concat(ret); - } - MAP.at_top = function(val) { - return new AtTop(val); - }; - MAP.splice = function(val) { - return new Splice(val); - }; - MAP.last = function(val) { - return new Last(val); - }; - var skip = MAP.skip = {}; - function AtTop(val) { - this.v = val; - } - function Splice(val) { - this.v = val; - } - function Last(val) { - this.v = val; - } - return MAP; - }(); - function push_uniq(array, el) { - if (array.indexOf(el) < 0) array.push(el); - } - function string_template(text, props) { - return text.replace(/\{(.+?)\}/g, function(str, p) { - return props[p]; - }); - } - function remove(array, el) { - for (var i = array.length; --i >= 0; ) { - if (array[i] === el) array.splice(i, 1); - } - } - function mergeSort(array, cmp) { - if (array.length < 2) return array.slice(); - function merge(a, b) { - var r = [], ai = 0, bi = 0, i = 0; - while (ai < a.length && bi < b.length) { - cmp(a[ai], b[bi]) <= 0 ? r[i++] = a[ai++] : r[i++] = b[bi++]; - } - if (ai < a.length) r.push.apply(r, a.slice(ai)); - if (bi < b.length) r.push.apply(r, b.slice(bi)); - return r; - } - function _ms(a) { - if (a.length <= 1) return a; - var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m); - left = _ms(left); - right = _ms(right); - return merge(left, right); - } - return _ms(array); - } - function set_difference(a, b) { - return a.filter(function(el) { - return b.indexOf(el) < 0; - }); - } - function set_intersection(a, b) { - return a.filter(function(el) { - return b.indexOf(el) >= 0; - }); - } - function makePredicate(words) { - if (!(words instanceof Array)) words = words.split(" "); - var f = "", cats = []; - out: for (var i = 0; i < words.length; ++i) { - for (var j = 0; j < cats.length; ++j) if (cats[j][0].length == words[i].length) { - cats[j].push(words[i]); - continue out; - } - cats.push([ words[i] ]); - } - function compareTo(arr) { - if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; - f += "switch(str){"; - for (var i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":"; - f += "return true}return false;"; - } - if (cats.length > 3) { - cats.sort(function(a, b) { - return b.length - a.length; - }); - f += "switch(str.length){"; - for (var i = 0; i < cats.length; ++i) { - var cat = cats[i]; - f += "case " + cat[0].length + ":"; - compareTo(cat); - } - f += "}"; - } else { - compareTo(words); - } - return new Function("str", f); - } - function all(array, predicate) { - for (var i = array.length; --i >= 0; ) if (!predicate(array[i])) return false; - return true; - } - function Dictionary() { - this._values = Object.create(null); - this._size = 0; - } - Dictionary.prototype = { - set: function(key, val) { - if (!this.has(key)) ++this._size; - this._values["$" + key] = val; - return this; - }, - add: function(key, val) { - if (this.has(key)) { - this.get(key).push(val); - } else { - this.set(key, [ val ]); - } - return this; - }, - get: function(key) { - return this._values["$" + key]; - }, - del: function(key) { - if (this.has(key)) { - --this._size; - delete this._values["$" + key]; - } - return this; - }, - has: function(key) { - return "$" + key in this._values; - }, - each: function(f) { - for (var i in this._values) f(this._values[i], i.substr(1)); - }, - size: function() { - return this._size; - }, - map: function(f) { - var ret = []; - for (var i in this._values) ret.push(f(this._values[i], i.substr(1))); - return ret; - } - }; - "use strict"; - function DEFNODE(type, props, methods, base) { - if (arguments.length < 4) base = AST_Node; - if (!props) props = []; else props = props.split(/\s+/); - var self_props = props; - if (base && base.PROPS) props = props.concat(base.PROPS); - var code = "return function AST_" + type + "(props){ if (props) { "; - for (var i = props.length; --i >= 0; ) { - code += "this." + props[i] + " = props." + props[i] + ";"; - } - var proto = base && new base(); - if (proto && proto.initialize || methods && methods.initialize) code += "this.initialize();"; - code += "}}"; - var ctor = new Function(code)(); - if (proto) { - ctor.prototype = proto; - ctor.BASE = base; - } - if (base) base.SUBCLASSES.push(ctor); - ctor.prototype.CTOR = ctor; - ctor.PROPS = props || null; - ctor.SELF_PROPS = self_props; - ctor.SUBCLASSES = []; - if (type) { - ctor.prototype.TYPE = ctor.TYPE = type; - } - if (methods) for (i in methods) if (methods.hasOwnProperty(i)) { - if (/^\$/.test(i)) { - ctor[i.substr(1)] = methods[i]; - } else { - ctor.prototype[i] = methods[i]; - } - } - ctor.DEFMETHOD = function(name, method) { - this.prototype[name] = method; - }; - return ctor; - } - var AST_Token = DEFNODE("Token", "type value line col pos endpos nlb comments_before file", {}, null); - var AST_Node = DEFNODE("Node", "start end", { - clone: function() { - return new this.CTOR(this); - }, - $documentation: "Base class of all AST nodes", - $propdoc: { - start: "[AST_Token] The first token of this node", - end: "[AST_Token] The last token of this node" - }, - _walk: function(visitor) { - return visitor._visit(this); - }, - walk: function(visitor) { - return this._walk(visitor); - } - }, null); - AST_Node.warn_function = null; - AST_Node.warn = function(txt, props) { - if (AST_Node.warn_function) AST_Node.warn_function(string_template(txt, props)); - }; - var AST_Statement = DEFNODE("Statement", null, { - $documentation: "Base class of all statements" - }); - var AST_Debugger = DEFNODE("Debugger", null, { - $documentation: "Represents a debugger statement" - }, AST_Statement); - var AST_Directive = DEFNODE("Directive", "value scope", { - $documentation: 'Represents a directive, like "use strict";', - $propdoc: { - value: "[string] The value of this directive as a plain string (it's not an AST_String!)", - scope: "[AST_Scope/S] The scope that this directive affects" - } - }, AST_Statement); - var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { - $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", - $propdoc: { - body: "[AST_Node] an expression node (should not be instanceof AST_Statement)" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.body._walk(visitor); - }); - } - }, AST_Statement); - function walk_body(node, visitor) { - if (node.body instanceof AST_Statement) { - node.body._walk(visitor); - } else node.body.forEach(function(stat) { - stat._walk(visitor); - }); - } - var AST_Block = DEFNODE("Block", "body", { - $documentation: "A body of statements (usually bracketed)", - $propdoc: { - body: "[AST_Statement*] an array of statements" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - walk_body(this, visitor); - }); - } - }, AST_Statement); - var AST_BlockStatement = DEFNODE("BlockStatement", null, { - $documentation: "A block statement" - }, AST_Block); - var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { - $documentation: "The empty statement (empty block or simply a semicolon)", - _walk: function(visitor) { - return visitor._visit(this); - } - }, AST_Statement); - var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { - $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", - $propdoc: { - body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.body._walk(visitor); - }); - } - }, AST_Statement); - var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { - $documentation: "Statement with a label", - $propdoc: { - label: "[AST_Label] a label definition" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.label._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_DWLoop = DEFNODE("DWLoop", "condition", { - $documentation: "Base class for do/while statements", - $propdoc: { - condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_Do = DEFNODE("Do", null, { - $documentation: "A `do` statement" - }, AST_DWLoop); - var AST_While = DEFNODE("While", null, { - $documentation: "A `while` statement" - }, AST_DWLoop); - var AST_For = DEFNODE("For", "init condition step", { - $documentation: "A `for` statement", - $propdoc: { - init: "[AST_Node?] the `for` initialization code, or null if empty", - condition: "[AST_Node?] the `for` termination clause, or null if empty", - step: "[AST_Node?] the `for` update clause, or null if empty" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - if (this.init) this.init._walk(visitor); - if (this.condition) this.condition._walk(visitor); - if (this.step) this.step._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_ForIn = DEFNODE("ForIn", "init name object", { - $documentation: "A `for ... in` statement", - $propdoc: { - init: "[AST_Node] the `for/in` initialization code", - name: "[AST_SymbolRef?] the loop variable, only if `init` is AST_Var", - object: "[AST_Node] the object that we're looping through" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.init._walk(visitor); - this.object._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_With = DEFNODE("With", "expression", { - $documentation: "A `with` statement", - $propdoc: { - expression: "[AST_Node] the `with` expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_Scope = DEFNODE("Scope", "directives variables functions uses_with uses_eval parent_scope enclosed cname", { - $documentation: "Base class for all statements introducing a lexical scope", - $propdoc: { - directives: "[string*/S] an array of directives declared in this scope", - variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope", - functions: "[Object/S] like `variables`, but only lists function declarations", - uses_with: "[boolean/S] tells whether this scope uses the `with` statement", - uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", - parent_scope: "[AST_Scope?/S] link to the parent scope", - enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", - cname: "[integer/S] current index for mangling variables (used internally by the mangler)" - } - }, AST_Block); - var AST_Toplevel = DEFNODE("Toplevel", "globals", { - $documentation: "The toplevel scope", - $propdoc: { - globals: "[Object/S] a map of name -> SymbolDef for all undeclared names" - }, - wrap_enclose: function(arg_parameter_pairs) { - var self = this; - var args = []; - var parameters = []; - arg_parameter_pairs.forEach(function(pair) { - var split = pair.split(":"); - args.push(split[0]); - parameters.push(split[1]); - }); - var wrapped_tl = "(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")"; - wrapped_tl = parse(wrapped_tl); - wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node) { - if (node instanceof AST_Directive && node.value == "$ORIG") { - return MAP.splice(self.body); - } - })); - return wrapped_tl; - }, - wrap_commonjs: function(name, export_all) { - var self = this; - var to_export = []; - if (export_all) { - self.figure_out_scope(); - self.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolDeclaration && node.definition().global) { - if (!find_if(function(n) { - return n.name == node.name; - }, to_export)) to_export.push(node); - } - })); - } - var wrapped_tl = "(function(exports, global){ global['" + name + "'] = exports; '$ORIG'; '$EXPORTS'; }({}, (function(){return this}())))"; - wrapped_tl = parse(wrapped_tl); - wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node) { - if (node instanceof AST_SimpleStatement) { - node = node.body; - if (node instanceof AST_String) switch (node.getValue()) { - case "$ORIG": - return MAP.splice(self.body); - - case "$EXPORTS": - var body = []; - to_export.forEach(function(sym) { - body.push(new AST_SimpleStatement({ - body: new AST_Assign({ - left: new AST_Sub({ - expression: new AST_SymbolRef({ - name: "exports" - }), - property: new AST_String({ - value: sym.name - }) - }), - operator: "=", - right: new AST_SymbolRef(sym) - }) - })); - }); - return MAP.splice(body); - } - } - })); - return wrapped_tl; - } - }, AST_Scope); - var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments", { - $documentation: "Base class for functions", - $propdoc: { - name: "[AST_SymbolDeclaration?] the name of this function", - argnames: "[AST_SymbolFunarg*] array of function arguments", - uses_arguments: "[boolean/S] tells whether this function accesses the arguments array" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - if (this.name) this.name._walk(visitor); - this.argnames.forEach(function(arg) { - arg._walk(visitor); - }); - walk_body(this, visitor); - }); - } - }, AST_Scope); - var AST_Accessor = DEFNODE("Accessor", null, { - $documentation: "A setter/getter function" - }, AST_Lambda); - var AST_Function = DEFNODE("Function", null, { - $documentation: "A function expression" - }, AST_Lambda); - var AST_Defun = DEFNODE("Defun", null, { - $documentation: "A function definition" - }, AST_Lambda); - var AST_Jump = DEFNODE("Jump", null, { - $documentation: "Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)" - }, AST_Statement); - var AST_Exit = DEFNODE("Exit", "value", { - $documentation: "Base class for “exits” (`return` and `throw`)", - $propdoc: { - value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" - }, - _walk: function(visitor) { - return visitor._visit(this, this.value && function() { - this.value._walk(visitor); - }); - } - }, AST_Jump); - var AST_Return = DEFNODE("Return", null, { - $documentation: "A `return` statement" - }, AST_Exit); - var AST_Throw = DEFNODE("Throw", null, { - $documentation: "A `throw` statement" - }, AST_Exit); - var AST_LoopControl = DEFNODE("LoopControl", "label", { - $documentation: "Base class for loop control statements (`break` and `continue`)", - $propdoc: { - label: "[AST_LabelRef?] the label, or null if none" - }, - _walk: function(visitor) { - return visitor._visit(this, this.label && function() { - this.label._walk(visitor); - }); - } - }, AST_Jump); - var AST_Break = DEFNODE("Break", null, { - $documentation: "A `break` statement" - }, AST_LoopControl); - var AST_Continue = DEFNODE("Continue", null, { - $documentation: "A `continue` statement" - }, AST_LoopControl); - var AST_If = DEFNODE("If", "condition alternative", { - $documentation: "A `if` statement", - $propdoc: { - condition: "[AST_Node] the `if` condition", - alternative: "[AST_Statement?] the `else` part, or null if not present" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.body._walk(visitor); - if (this.alternative) this.alternative._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_Switch = DEFNODE("Switch", "expression", { - $documentation: "A `switch` statement", - $propdoc: { - expression: "[AST_Node] the `switch` “discriminant”" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - walk_body(this, visitor); - }); - } - }, AST_Block); - var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { - $documentation: "Base class for `switch` branches" - }, AST_Block); - var AST_Default = DEFNODE("Default", null, { - $documentation: "A `default` switch branch" - }, AST_SwitchBranch); - var AST_Case = DEFNODE("Case", "expression", { - $documentation: "A `case` switch branch", - $propdoc: { - expression: "[AST_Node] the `case` expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - walk_body(this, visitor); - }); - } - }, AST_SwitchBranch); - var AST_Try = DEFNODE("Try", "bcatch bfinally", { - $documentation: "A `try` statement", - $propdoc: { - bcatch: "[AST_Catch?] the catch block, or null if not present", - bfinally: "[AST_Finally?] the finally block, or null if not present" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - walk_body(this, visitor); - if (this.bcatch) this.bcatch._walk(visitor); - if (this.bfinally) this.bfinally._walk(visitor); - }); - } - }, AST_Block); - var AST_Catch = DEFNODE("Catch", "argname", { - $documentation: "A `catch` node; only makes sense as part of a `try` statement", - $propdoc: { - argname: "[AST_SymbolCatch] symbol for the exception" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.argname._walk(visitor); - walk_body(this, visitor); - }); - } - }, AST_Block); - var AST_Finally = DEFNODE("Finally", null, { - $documentation: "A `finally` node; only makes sense as part of a `try` statement" - }, AST_Block); - var AST_Definitions = DEFNODE("Definitions", "definitions", { - $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)", - $propdoc: { - definitions: "[AST_VarDef*] array of variable definitions" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.definitions.forEach(function(def) { - def._walk(visitor); - }); - }); - } - }, AST_Statement); - var AST_Var = DEFNODE("Var", null, { - $documentation: "A `var` statement" - }, AST_Definitions); - var AST_Const = DEFNODE("Const", null, { - $documentation: "A `const` statement" - }, AST_Definitions); - var AST_VarDef = DEFNODE("VarDef", "name value", { - $documentation: "A variable declaration; only appears in a AST_Definitions node", - $propdoc: { - name: "[AST_SymbolVar|AST_SymbolConst] name of the variable", - value: "[AST_Node?] initializer, or null of there's no initializer" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.name._walk(visitor); - if (this.value) this.value._walk(visitor); - }); - } - }); - var AST_Call = DEFNODE("Call", "expression args", { - $documentation: "A function call expression", - $propdoc: { - expression: "[AST_Node] expression to invoke as function", - args: "[AST_Node*] array of arguments" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.args.forEach(function(arg) { - arg._walk(visitor); - }); - }); - } - }); - var AST_New = DEFNODE("New", null, { - $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties" - }, AST_Call); - var AST_Seq = DEFNODE("Seq", "car cdr", { - $documentation: "A sequence expression (two comma-separated expressions)", - $propdoc: { - car: "[AST_Node] first element in sequence", - cdr: "[AST_Node] second element in sequence" - }, - $cons: function(x, y) { - var seq = new AST_Seq(x); - seq.car = x; - seq.cdr = y; - return seq; - }, - $from_array: function(array) { - if (array.length == 0) return null; - if (array.length == 1) return array[0].clone(); - var list = null; - for (var i = array.length; --i >= 0; ) { - list = AST_Seq.cons(array[i], list); - } - var p = list; - while (p) { - if (p.cdr && !p.cdr.cdr) { - p.cdr = p.cdr.car; - break; - } - p = p.cdr; - } - return list; - }, - to_array: function() { - var p = this, a = []; - while (p) { - a.push(p.car); - if (p.cdr && !(p.cdr instanceof AST_Seq)) { - a.push(p.cdr); - break; - } - p = p.cdr; - } - return a; - }, - add: function(node) { - var p = this; - while (p) { - if (!(p.cdr instanceof AST_Seq)) { - var cell = AST_Seq.cons(p.cdr, node); - return p.cdr = cell; - } - p = p.cdr; - } - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.car._walk(visitor); - if (this.cdr) this.cdr._walk(visitor); - }); - } - }); - var AST_PropAccess = DEFNODE("PropAccess", "expression property", { - $documentation: 'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`', - $propdoc: { - expression: "[AST_Node] the “container” expression", - property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" - } - }); - var AST_Dot = DEFNODE("Dot", null, { - $documentation: "A dotted property access expression", - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - }); - } - }, AST_PropAccess); - var AST_Sub = DEFNODE("Sub", null, { - $documentation: 'Index-style property access, i.e. `a["foo"]`', - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.property._walk(visitor); - }); - } - }, AST_PropAccess); - var AST_Unary = DEFNODE("Unary", "operator expression", { - $documentation: "Base class for unary expressions", - $propdoc: { - operator: "[string] the operator", - expression: "[AST_Node] expression that this unary operator applies to" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - }); - } - }); - var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { - $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" - }, AST_Unary); - var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { - $documentation: "Unary postfix expression, i.e. `i++`" - }, AST_Unary); - var AST_Binary = DEFNODE("Binary", "left operator right", { - $documentation: "Binary expression, i.e. `a + b`", - $propdoc: { - left: "[AST_Node] left-hand side expression", - operator: "[string] the operator", - right: "[AST_Node] right-hand side expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.left._walk(visitor); - this.right._walk(visitor); - }); - } - }); - var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { - $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", - $propdoc: { - condition: "[AST_Node]", - consequent: "[AST_Node]", - alternative: "[AST_Node]" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.consequent._walk(visitor); - this.alternative._walk(visitor); - }); - } - }); - var AST_Assign = DEFNODE("Assign", null, { - $documentation: "An assignment expression — `a = b + 5`" - }, AST_Binary); - var AST_Array = DEFNODE("Array", "elements", { - $documentation: "An array literal", - $propdoc: { - elements: "[AST_Node*] array of elements" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.elements.forEach(function(el) { - el._walk(visitor); - }); - }); - } - }); - var AST_Object = DEFNODE("Object", "properties", { - $documentation: "An object literal", - $propdoc: { - properties: "[AST_ObjectProperty*] array of properties" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.properties.forEach(function(prop) { - prop._walk(visitor); - }); - }); - } - }); - var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { - $documentation: "Base class for literal object properties", - $propdoc: { - key: "[string] the property name; it's always a plain string in our AST, no matter if it was a string, number or identifier in original code", - value: "[AST_Node] property value. For setters and getters this is an AST_Function." - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.value._walk(visitor); - }); - } - }); - var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", null, { - $documentation: "A key: value object property" - }, AST_ObjectProperty); - var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { - $documentation: "An object setter property" - }, AST_ObjectProperty); - var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { - $documentation: "An object getter property" - }, AST_ObjectProperty); - var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { - $propdoc: { - name: "[string] name of this symbol", - scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", - thedef: "[SymbolDef/S] the definition of this symbol" - }, - $documentation: "Base class for all symbols" - }); - var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, { - $documentation: "The name of a property accessor (setter/getter function)" - }, AST_Symbol); - var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { - $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)", - $propdoc: { - init: "[AST_Node*/S] array of initializers for this declaration." - } - }, AST_Symbol); - var AST_SymbolVar = DEFNODE("SymbolVar", null, { - $documentation: "Symbol defining a variable" - }, AST_SymbolDeclaration); - var AST_SymbolConst = DEFNODE("SymbolConst", null, { - $documentation: "A constant declaration" - }, AST_SymbolDeclaration); - var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { - $documentation: "Symbol naming a function argument" - }, AST_SymbolVar); - var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { - $documentation: "Symbol defining a function" - }, AST_SymbolDeclaration); - var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { - $documentation: "Symbol naming a function expression" - }, AST_SymbolDeclaration); - var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { - $documentation: "Symbol naming the exception in catch" - }, AST_SymbolDeclaration); - var AST_Label = DEFNODE("Label", "references", { - $documentation: "Symbol naming a label (declaration)", - $propdoc: { - references: "[AST_LabelRef*] a list of nodes referring to this label" - } - }, AST_Symbol); - var AST_SymbolRef = DEFNODE("SymbolRef", null, { - $documentation: "Reference to some symbol (not definition/declaration)" - }, AST_Symbol); - var AST_LabelRef = DEFNODE("LabelRef", null, { - $documentation: "Reference to a label symbol" - }, AST_Symbol); - var AST_This = DEFNODE("This", null, { - $documentation: "The `this` symbol" - }, AST_Symbol); - var AST_Constant = DEFNODE("Constant", null, { - $documentation: "Base class for all constants", - getValue: function() { - return this.value; - } - }); - var AST_String = DEFNODE("String", "value", { - $documentation: "A string literal", - $propdoc: { - value: "[string] the contents of this string" - } - }, AST_Constant); - var AST_Number = DEFNODE("Number", "value", { - $documentation: "A number literal", - $propdoc: { - value: "[number] the numeric value" - } - }, AST_Constant); - var AST_RegExp = DEFNODE("RegExp", "value", { - $documentation: "A regexp literal", - $propdoc: { - value: "[RegExp] the actual regexp" - } - }, AST_Constant); - var AST_Atom = DEFNODE("Atom", null, { - $documentation: "Base class for atoms" - }, AST_Constant); - var AST_Null = DEFNODE("Null", null, { - $documentation: "The `null` atom", - value: null - }, AST_Atom); - var AST_NaN = DEFNODE("NaN", null, { - $documentation: "The impossible value", - value: 0 / 0 - }, AST_Atom); - var AST_Undefined = DEFNODE("Undefined", null, { - $documentation: "The `undefined` value", - value: function() {}() - }, AST_Atom); - var AST_Hole = DEFNODE("Hole", null, { - $documentation: "A hole in an array", - value: function() {}() - }, AST_Atom); - var AST_Infinity = DEFNODE("Infinity", null, { - $documentation: "The `Infinity` value", - value: 1 / 0 - }, AST_Atom); - var AST_Boolean = DEFNODE("Boolean", null, { - $documentation: "Base class for booleans" - }, AST_Atom); - var AST_False = DEFNODE("False", null, { - $documentation: "The `false` atom", - value: false - }, AST_Boolean); - var AST_True = DEFNODE("True", null, { - $documentation: "The `true` atom", - value: true - }, AST_Boolean); - function TreeWalker(callback) { - this.visit = callback; - this.stack = []; - } - TreeWalker.prototype = { - _visit: function(node, descend) { - this.stack.push(node); - var ret = this.visit(node, descend ? function() { - descend.call(node); - } : noop); - if (!ret && descend) { - descend.call(node); - } - this.stack.pop(); - return ret; - }, - parent: function(n) { - return this.stack[this.stack.length - 2 - (n || 0)]; - }, - push: function(node) { - this.stack.push(node); - }, - pop: function() { - return this.stack.pop(); - }, - self: function() { - return this.stack[this.stack.length - 1]; - }, - find_parent: function(type) { - var stack = this.stack; - for (var i = stack.length; --i >= 0; ) { - var x = stack[i]; - if (x instanceof type) return x; - } - }, - has_directive: function(type) { - return this.find_parent(AST_Scope).has_directive(type); - }, - in_boolean_context: function() { - var stack = this.stack; - var i = stack.length, self = stack[--i]; - while (i > 0) { - var p = stack[--i]; - if (p instanceof AST_If && p.condition === self || p instanceof AST_Conditional && p.condition === self || p instanceof AST_DWLoop && p.condition === self || p instanceof AST_For && p.condition === self || p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self) { - return true; - } - if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) return false; - self = p; - } - }, - loopcontrol_target: function(label) { - var stack = this.stack; - if (label) { - for (var i = stack.length; --i >= 0; ) { - var x = stack[i]; - if (x instanceof AST_LabeledStatement && x.label.name == label.name) { - return x.body; - } - } - } else { - for (var i = stack.length; --i >= 0; ) { - var x = stack[i]; - if (x instanceof AST_Switch || x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) return x; - } - } - } - }; - "use strict"; - var KEYWORDS = "break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with"; - var KEYWORDS_ATOM = "false null true"; - var RESERVED_WORDS = "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile" + " " + KEYWORDS_ATOM + " " + KEYWORDS; - var KEYWORDS_BEFORE_EXPRESSION = "return new delete throw else case"; - KEYWORDS = makePredicate(KEYWORDS); - RESERVED_WORDS = makePredicate(RESERVED_WORDS); - KEYWORDS_BEFORE_EXPRESSION = makePredicate(KEYWORDS_BEFORE_EXPRESSION); - KEYWORDS_ATOM = makePredicate(KEYWORDS_ATOM); - var OPERATOR_CHARS = makePredicate(characters("+-*&%=<>!?|~^")); - var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i; - var RE_OCT_NUMBER = /^0[0-7]+$/; - var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i; - var OPERATORS = makePredicate([ "in", "instanceof", "typeof", "new", "void", "delete", "++", "--", "+", "-", "!", "~", "&", "|", "^", "*", "/", "%", ">>", "<<", ">>>", "<", ">", "<=", ">=", "==", "===", "!=", "!==", "?", "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=", "&&", "||" ]); - var WHITESPACE_CHARS = makePredicate(characters(" \u00a0\n\r\t\f\u000b\u200b\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000")); - var PUNC_BEFORE_EXPRESSION = makePredicate(characters("[{(,.;:")); - var PUNC_CHARS = makePredicate(characters("[]{}(),;:")); - var REGEXP_MODIFIERS = makePredicate(characters("gmsiy")); - var UNICODE = { - letter: new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), - non_spacing_mark: new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"), - space_combining_mark: new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"), - connector_punctuation: new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]") - }; - function is_letter(code) { - return code >= 97 && code <= 122 || code >= 65 && code <= 90 || code >= 170 && UNICODE.letter.test(String.fromCharCode(code)); - } - function is_digit(code) { - return code >= 48 && code <= 57; - } - function is_alphanumeric_char(code) { - return is_digit(code) || is_letter(code); - } - function is_unicode_combining_mark(ch) { - return UNICODE.non_spacing_mark.test(ch) || UNICODE.space_combining_mark.test(ch); - } - function is_unicode_connector_punctuation(ch) { - return UNICODE.connector_punctuation.test(ch); - } - function is_identifier(name) { - return !RESERVED_WORDS(name) && /^[a-z_$][a-z0-9_$]*$/i.test(name); - } - function is_identifier_start(code) { - return code == 36 || code == 95 || is_letter(code); - } - function is_identifier_char(ch) { - var code = ch.charCodeAt(0); - return is_identifier_start(code) || is_digit(code) || code == 8204 || code == 8205 || is_unicode_combining_mark(ch) || is_unicode_connector_punctuation(ch); - } - function is_identifier_string(str) { - var i = str.length; - if (i == 0) return false; - if (is_digit(str.charCodeAt(0))) return false; - while (--i >= 0) { - if (!is_identifier_char(str.charAt(i))) return false; - } - return true; - } - function parse_js_number(num) { - if (RE_HEX_NUMBER.test(num)) { - return parseInt(num.substr(2), 16); - } else if (RE_OCT_NUMBER.test(num)) { - return parseInt(num.substr(1), 8); - } else if (RE_DEC_NUMBER.test(num)) { - return parseFloat(num); - } - } - function JS_Parse_Error(message, line, col, pos) { - this.message = message; - this.line = line; - this.col = col; - this.pos = pos; - this.stack = new Error().stack; - } - JS_Parse_Error.prototype.toString = function() { - return this.message + " (line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack; - }; - function js_error(message, filename, line, col, pos) { - throw new JS_Parse_Error(message, line, col, pos); - } - function is_token(token, type, val) { - return token.type == type && (val == null || token.value == val); - } - var EX_EOF = {}; - function tokenizer($TEXT, filename) { - var S = { - text: $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/\uFEFF/g, ""), - filename: filename, - pos: 0, - tokpos: 0, - line: 1, - tokline: 0, - col: 0, - tokcol: 0, - newline_before: false, - regex_allowed: false, - comments_before: [] - }; - function peek() { - return S.text.charAt(S.pos); - } - function next(signal_eof, in_string) { - var ch = S.text.charAt(S.pos++); - if (signal_eof && !ch) throw EX_EOF; - if (ch == "\n") { - S.newline_before = S.newline_before || !in_string; - ++S.line; - S.col = 0; - } else { - ++S.col; - } - return ch; - } - function find(what, signal_eof) { - var pos = S.text.indexOf(what, S.pos); - if (signal_eof && pos == -1) throw EX_EOF; - return pos; - } - function start_token() { - S.tokline = S.line; - S.tokcol = S.col; - S.tokpos = S.pos; - } - function token(type, value, is_comment) { - S.regex_allowed = type == "operator" && !UNARY_POSTFIX(value) || type == "keyword" && KEYWORDS_BEFORE_EXPRESSION(value) || type == "punc" && PUNC_BEFORE_EXPRESSION(value); - var ret = { - type: type, - value: value, - line: S.tokline, - col: S.tokcol, - pos: S.tokpos, - endpos: S.pos, - nlb: S.newline_before, - file: filename - }; - if (!is_comment) { - ret.comments_before = S.comments_before; - S.comments_before = []; - for (var i = 0, len = ret.comments_before.length; i < len; i++) { - ret.nlb = ret.nlb || ret.comments_before[i].nlb; - } - } - S.newline_before = false; - return new AST_Token(ret); - } - function skip_whitespace() { - while (WHITESPACE_CHARS(peek())) next(); - } - function read_while(pred) { - var ret = "", ch, i = 0; - while ((ch = peek()) && pred(ch, i++)) ret += next(); - return ret; - } - function parse_error(err) { - js_error(err, filename, S.tokline, S.tokcol, S.tokpos); - } - function read_num(prefix) { - var has_e = false, after_e = false, has_x = false, has_dot = prefix == "."; - var num = read_while(function(ch, i) { - var code = ch.charCodeAt(0); - switch (code) { - case 120: - case 88: - return has_x ? false : has_x = true; - - case 101: - case 69: - return has_x ? true : has_e ? false : has_e = after_e = true; - - case 45: - return after_e || i == 0 && !prefix; - - case 43: - return after_e; - - case after_e = false, 46: - return !has_dot && !has_x && !has_e ? has_dot = true : false; - } - return is_alphanumeric_char(code); - }); - if (prefix) num = prefix + num; - var valid = parse_js_number(num); - if (!isNaN(valid)) { - return token("num", valid); - } else { - parse_error("Invalid syntax: " + num); - } - } - function read_escaped_char(in_string) { - var ch = next(true, in_string); - switch (ch.charCodeAt(0)) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 116: - return " "; - - case 98: - return "\b"; - - case 118: - return " "; - - case 102: - return "\f"; - - case 48: - return "\x00"; - - case 120: - return String.fromCharCode(hex_bytes(2)); - - case 117: - return String.fromCharCode(hex_bytes(4)); - - case 10: - return ""; - - default: - return ch; - } - } - function hex_bytes(n) { - var num = 0; - for (;n > 0; --n) { - var digit = parseInt(next(true), 16); - if (isNaN(digit)) parse_error("Invalid hex-character pattern in string"); - num = num << 4 | digit; - } - return num; - } - var read_string = with_eof_error("Unterminated string constant", function() { - var quote = next(), ret = ""; - for (;;) { - var ch = next(true); - if (ch == "\\") { - var octal_len = 0, first = null; - ch = read_while(function(ch) { - if (ch >= "0" && ch <= "7") { - if (!first) { - first = ch; - return ++octal_len; - } else if (first <= "3" && octal_len <= 2) return ++octal_len; else if (first >= "4" && octal_len <= 1) return ++octal_len; - } - return false; - }); - if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8)); else ch = read_escaped_char(true); - } else if (ch == quote) break; - ret += ch; - } - return token("string", ret); - }); - function read_line_comment() { - next(); - var i = find("\n"), ret; - if (i == -1) { - ret = S.text.substr(S.pos); - S.pos = S.text.length; - } else { - ret = S.text.substring(S.pos, i); - S.pos = i; - } - return token("comment1", ret, true); - } - var read_multiline_comment = with_eof_error("Unterminated multiline comment", function() { - next(); - var i = find("*/", true); - var text = S.text.substring(S.pos, i); - var a = text.split("\n"), n = a.length; - S.pos = i + 2; - S.line += n - 1; - if (n > 1) S.col = a[n - 1].length; else S.col += a[n - 1].length; - S.col += 2; - S.newline_before = S.newline_before || text.indexOf("\n") >= 0; - return token("comment2", text, true); - }); - function read_name() { - var backslash = false, name = "", ch, escaped = false, hex; - while ((ch = peek()) != null) { - if (!backslash) { - if (ch == "\\") escaped = backslash = true, next(); else if (is_identifier_char(ch)) name += next(); else break; - } else { - if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); - ch = read_escaped_char(); - if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); - name += ch; - backslash = false; - } - } - if (KEYWORDS(name) && escaped) { - hex = name.charCodeAt(0).toString(16).toUpperCase(); - name = "\\u" + "0000".substr(hex.length) + hex + name.slice(1); - } - return name; - } - var read_regexp = with_eof_error("Unterminated regular expression", function(regexp) { - var prev_backslash = false, ch, in_class = false; - while (ch = next(true)) if (prev_backslash) { - regexp += "\\" + ch; - prev_backslash = false; - } else if (ch == "[") { - in_class = true; - regexp += ch; - } else if (ch == "]" && in_class) { - in_class = false; - regexp += ch; - } else if (ch == "/" && !in_class) { - break; - } else if (ch == "\\") { - prev_backslash = true; - } else { - regexp += ch; - } - var mods = read_name(); - return token("regexp", new RegExp(regexp, mods)); - }); - function read_operator(prefix) { - function grow(op) { - if (!peek()) return op; - var bigger = op + peek(); - if (OPERATORS(bigger)) { - next(); - return grow(bigger); - } else { - return op; - } - } - return token("operator", grow(prefix || next())); - } - function handle_slash() { - next(); - var regex_allowed = S.regex_allowed; - switch (peek()) { - case "/": - S.comments_before.push(read_line_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - - case "*": - S.comments_before.push(read_multiline_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - } - return S.regex_allowed ? read_regexp("") : read_operator("/"); - } - function handle_dot() { - next(); - return is_digit(peek().charCodeAt(0)) ? read_num(".") : token("punc", "."); - } - function read_word() { - var word = read_name(); - return KEYWORDS_ATOM(word) ? token("atom", word) : !KEYWORDS(word) ? token("name", word) : OPERATORS(word) ? token("operator", word) : token("keyword", word); - } - function with_eof_error(eof_error, cont) { - return function(x) { - try { - return cont(x); - } catch (ex) { - if (ex === EX_EOF) parse_error(eof_error); else throw ex; - } - }; - } - function next_token(force_regexp) { - if (force_regexp != null) return read_regexp(force_regexp); - skip_whitespace(); - start_token(); - var ch = peek(); - if (!ch) return token("eof"); - var code = ch.charCodeAt(0); - switch (code) { - case 34: - case 39: - return read_string(); - - case 46: - return handle_dot(); - - case 47: - return handle_slash(); - } - if (is_digit(code)) return read_num(); - if (PUNC_CHARS(ch)) return token("punc", next()); - if (OPERATOR_CHARS(ch)) return read_operator(); - if (code == 92 || is_identifier_start(code)) return read_word(); - parse_error("Unexpected character '" + ch + "'"); - } - next_token.context = function(nc) { - if (nc) S = nc; - return S; - }; - return next_token; - } - var UNARY_PREFIX = makePredicate([ "typeof", "void", "delete", "--", "++", "!", "~", "-", "+" ]); - var UNARY_POSTFIX = makePredicate([ "--", "++" ]); - var ASSIGNMENT = makePredicate([ "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=" ]); - var PRECEDENCE = function(a, ret) { - for (var i = 0, n = 1; i < a.length; ++i, ++n) { - var b = a[i]; - for (var j = 0; j < b.length; ++j) { - ret[b[j]] = n; - } - } - return ret; - }([ [ "||" ], [ "&&" ], [ "|" ], [ "^" ], [ "&" ], [ "==", "===", "!=", "!==" ], [ "<", ">", "<=", ">=", "in", "instanceof" ], [ ">>", "<<", ">>>" ], [ "+", "-" ], [ "*", "/", "%" ] ], {}); - var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); - var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); - function parse($TEXT, options) { - options = defaults(options, { - strict: false, - filename: null, - toplevel: null, - expression: false - }); - var S = { - input: typeof $TEXT == "string" ? tokenizer($TEXT, options.filename) : $TEXT, - token: null, - prev: null, - peeked: null, - in_function: 0, - in_directives: true, - in_loop: 0, - labels: [] - }; - S.token = next(); - function is(type, value) { - return is_token(S.token, type, value); - } - function peek() { - return S.peeked || (S.peeked = S.input()); - } - function next() { - S.prev = S.token; - if (S.peeked) { - S.token = S.peeked; - S.peeked = null; - } else { - S.token = S.input(); - } - S.in_directives = S.in_directives && (S.token.type == "string" || is("punc", ";")); - return S.token; - } - function prev() { - return S.prev; - } - function croak(msg, line, col, pos) { - var ctx = S.input.context(); - js_error(msg, ctx.filename, line != null ? line : ctx.tokline, col != null ? col : ctx.tokcol, pos != null ? pos : ctx.tokpos); - } - function token_error(token, msg) { - croak(msg, token.line, token.col); - } - function unexpected(token) { - if (token == null) token = S.token; - token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); - } - function expect_token(type, val) { - if (is(type, val)) { - return next(); - } - token_error(S.token, "Unexpected token " + S.token.type + " «" + S.token.value + "»" + ", expected " + type + " «" + val + "»"); - } - function expect(punc) { - return expect_token("punc", punc); - } - function can_insert_semicolon() { - return !options.strict && (S.token.nlb || is("eof") || is("punc", "}")); - } - function semicolon() { - if (is("punc", ";")) next(); else if (!can_insert_semicolon()) unexpected(); - } - function parenthesised() { - expect("("); - var exp = expression(true); - expect(")"); - return exp; - } - function embed_tokens(parser) { - return function() { - var start = S.token; - var expr = parser(); - var end = prev(); - expr.start = start; - expr.end = end; - return expr; - }; - } - var statement = embed_tokens(function() { - var tmp; - if (is("operator", "/") || is("operator", "/=")) { - S.peeked = null; - S.token = S.input(S.token.value.substr(1)); - } - switch (S.token.type) { - case "string": - var dir = S.in_directives, stat = simple_statement(); - if (dir && stat.body instanceof AST_String && !is("punc", ",")) return new AST_Directive({ - value: stat.body.value - }); - return stat; - - case "num": - case "regexp": - case "operator": - case "atom": - return simple_statement(); - - case "name": - return is_token(peek(), "punc", ":") ? labeled_statement() : simple_statement(); - - case "punc": - switch (S.token.value) { - case "{": - return new AST_BlockStatement({ - start: S.token, - body: block_(), - end: prev() - }); - - case "[": - case "(": - return simple_statement(); - - case ";": - next(); - return new AST_EmptyStatement(); - - default: - unexpected(); - } - - case "keyword": - switch (tmp = S.token.value, next(), tmp) { - case "break": - return break_cont(AST_Break); - - case "continue": - return break_cont(AST_Continue); - - case "debugger": - semicolon(); - return new AST_Debugger(); - - case "do": - return new AST_Do({ - body: in_loop(statement), - condition: (expect_token("keyword", "while"), tmp = parenthesised(), semicolon(), - tmp) - }); - - case "while": - return new AST_While({ - condition: parenthesised(), - body: in_loop(statement) - }); - - case "for": - return for_(); - - case "function": - return function_(true); - - case "if": - return if_(); - - case "return": - if (S.in_function == 0) croak("'return' outside of function"); - return new AST_Return({ - value: is("punc", ";") ? (next(), null) : can_insert_semicolon() ? null : (tmp = expression(true), - semicolon(), tmp) - }); - - case "switch": - return new AST_Switch({ - expression: parenthesised(), - body: in_loop(switch_body_) - }); - - case "throw": - if (S.token.nlb) croak("Illegal newline after 'throw'"); - return new AST_Throw({ - value: (tmp = expression(true), semicolon(), tmp) - }); - - case "try": - return try_(); - - case "var": - return tmp = var_(), semicolon(), tmp; - - case "const": - return tmp = const_(), semicolon(), tmp; - - case "with": - return new AST_With({ - expression: parenthesised(), - body: statement() - }); - - default: - unexpected(); - } - } - }); - function labeled_statement() { - var label = as_symbol(AST_Label); - if (find_if(function(l) { - return l.name == label.name; - }, S.labels)) { - croak("Label " + label.name + " defined twice"); - } - expect(":"); - S.labels.push(label); - var stat = statement(); - S.labels.pop(); - return new AST_LabeledStatement({ - body: stat, - label: label - }); - } - function simple_statement(tmp) { - return new AST_SimpleStatement({ - body: (tmp = expression(true), semicolon(), tmp) - }); - } - function break_cont(type) { - var label = null; - if (!can_insert_semicolon()) { - label = as_symbol(AST_LabelRef, true); - } - if (label != null) { - if (!find_if(function(l) { - return l.name == label.name; - }, S.labels)) croak("Undefined label " + label.name); - } else if (S.in_loop == 0) croak(type.TYPE + " not inside a loop or switch"); - semicolon(); - return new type({ - label: label - }); - } - function for_() { - expect("("); - var init = null; - if (!is("punc", ";")) { - init = is("keyword", "var") ? (next(), var_(true)) : expression(true, true); - if (is("operator", "in")) { - if (init instanceof AST_Var && init.definitions.length > 1) croak("Only one variable declaration allowed in for..in loop"); - next(); - return for_in(init); - } - } - return regular_for(init); - } - function regular_for(init) { - expect(";"); - var test = is("punc", ";") ? null : expression(true); - expect(";"); - var step = is("punc", ")") ? null : expression(true); - expect(")"); - return new AST_For({ - init: init, - condition: test, - step: step, - body: in_loop(statement) - }); - } - function for_in(init) { - var lhs = init instanceof AST_Var ? init.definitions[0].name : null; - var obj = expression(true); - expect(")"); - return new AST_ForIn({ - init: init, - name: lhs, - object: obj, - body: in_loop(statement) - }); - } - var function_ = function(in_statement, ctor) { - var is_accessor = ctor === AST_Accessor; - var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : is_accessor ? AST_SymbolAccessor : AST_SymbolLambda) : is_accessor && (is("string") || is("num")) ? as_atom_node() : null; - if (in_statement && !name) unexpected(); - expect("("); - if (!ctor) ctor = in_statement ? AST_Defun : AST_Function; - return new ctor({ - name: name, - argnames: function(first, a) { - while (!is("punc", ")")) { - if (first) first = false; else expect(","); - a.push(as_symbol(AST_SymbolFunarg)); - } - next(); - return a; - }(true, []), - body: function(loop, labels) { - ++S.in_function; - S.in_directives = true; - S.in_loop = 0; - S.labels = []; - var a = block_(); - --S.in_function; - S.in_loop = loop; - S.labels = labels; - return a; - }(S.in_loop, S.labels) - }); - }; - function if_() { - var cond = parenthesised(), body = statement(), belse = null; - if (is("keyword", "else")) { - next(); - belse = statement(); - } - return new AST_If({ - condition: cond, - body: body, - alternative: belse - }); - } - function block_() { - expect("{"); - var a = []; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - a.push(statement()); - } - next(); - return a; - } - function switch_body_() { - expect("{"); - var a = [], cur = null, branch = null, tmp; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - if (is("keyword", "case")) { - if (branch) branch.end = prev(); - cur = []; - branch = new AST_Case({ - start: (tmp = S.token, next(), tmp), - expression: expression(true), - body: cur - }); - a.push(branch); - expect(":"); - } else if (is("keyword", "default")) { - if (branch) branch.end = prev(); - cur = []; - branch = new AST_Default({ - start: (tmp = S.token, next(), expect(":"), tmp), - body: cur - }); - a.push(branch); - } else { - if (!cur) unexpected(); - cur.push(statement()); - } - } - if (branch) branch.end = prev(); - next(); - return a; - } - function try_() { - var body = block_(), bcatch = null, bfinally = null; - if (is("keyword", "catch")) { - var start = S.token; - next(); - expect("("); - var name = as_symbol(AST_SymbolCatch); - expect(")"); - bcatch = new AST_Catch({ - start: start, - argname: name, - body: block_(), - end: prev() - }); - } - if (is("keyword", "finally")) { - var start = S.token; - next(); - bfinally = new AST_Finally({ - start: start, - body: block_(), - end: prev() - }); - } - if (!bcatch && !bfinally) croak("Missing catch/finally blocks"); - return new AST_Try({ - body: body, - bcatch: bcatch, - bfinally: bfinally - }); - } - function vardefs(no_in, in_const) { - var a = []; - for (;;) { - a.push(new AST_VarDef({ - start: S.token, - name: as_symbol(in_const ? AST_SymbolConst : AST_SymbolVar), - value: is("operator", "=") ? (next(), expression(false, no_in)) : null, - end: prev() - })); - if (!is("punc", ",")) break; - next(); - } - return a; - } - var var_ = function(no_in) { - return new AST_Var({ - start: prev(), - definitions: vardefs(no_in, false), - end: prev() - }); - }; - var const_ = function() { - return new AST_Const({ - start: prev(), - definitions: vardefs(false, true), - end: prev() - }); - }; - var new_ = function() { - var start = S.token; - expect_token("operator", "new"); - var newexp = expr_atom(false), args; - if (is("punc", "(")) { - next(); - args = expr_list(")"); - } else { - args = []; - } - return subscripts(new AST_New({ - start: start, - expression: newexp, - args: args, - end: prev() - }), true); - }; - function as_atom_node() { - var tok = S.token, ret; - switch (tok.type) { - case "name": - return as_symbol(AST_SymbolRef); - - case "num": - ret = new AST_Number({ - start: tok, - end: tok, - value: tok.value - }); - break; - - case "string": - ret = new AST_String({ - start: tok, - end: tok, - value: tok.value - }); - break; - - case "regexp": - ret = new AST_RegExp({ - start: tok, - end: tok, - value: tok.value - }); - break; - - case "atom": - switch (tok.value) { - case "false": - ret = new AST_False({ - start: tok, - end: tok - }); - break; - - case "true": - ret = new AST_True({ - start: tok, - end: tok - }); - break; - - case "null": - ret = new AST_Null({ - start: tok, - end: tok - }); - break; - } - break; - } - next(); - return ret; - } - var expr_atom = function(allow_calls) { - if (is("operator", "new")) { - return new_(); - } - var start = S.token; - if (is("punc")) { - switch (start.value) { - case "(": - next(); - var ex = expression(true); - ex.start = start; - ex.end = S.token; - expect(")"); - return subscripts(ex, allow_calls); - - case "[": - return subscripts(array_(), allow_calls); - - case "{": - return subscripts(object_(), allow_calls); - } - unexpected(); - } - if (is("keyword", "function")) { - next(); - var func = function_(false); - func.start = start; - func.end = prev(); - return subscripts(func, allow_calls); - } - if (ATOMIC_START_TOKEN[S.token.type]) { - return subscripts(as_atom_node(), allow_calls); - } - unexpected(); - }; - function expr_list(closing, allow_trailing_comma, allow_empty) { - var first = true, a = []; - while (!is("punc", closing)) { - if (first) first = false; else expect(","); - if (allow_trailing_comma && is("punc", closing)) break; - if (is("punc", ",") && allow_empty) { - a.push(new AST_Hole({ - start: S.token, - end: S.token - })); - } else { - a.push(expression(false)); - } - } - next(); - return a; - } - var array_ = embed_tokens(function() { - expect("["); - return new AST_Array({ - elements: expr_list("]", !options.strict, true) - }); - }); - var object_ = embed_tokens(function() { - expect("{"); - var first = true, a = []; - while (!is("punc", "}")) { - if (first) first = false; else expect(","); - if (!options.strict && is("punc", "}")) break; - var start = S.token; - var type = start.type; - var name = as_property_name(); - if (type == "name" && !is("punc", ":")) { - if (name == "get") { - a.push(new AST_ObjectGetter({ - start: start, - key: name, - value: function_(false, AST_Accessor), - end: prev() - })); - continue; - } - if (name == "set") { - a.push(new AST_ObjectSetter({ - start: start, - key: name, - value: function_(false, AST_Accessor), - end: prev() - })); - continue; - } - } - expect(":"); - a.push(new AST_ObjectKeyVal({ - start: start, - key: name, - value: expression(false), - end: prev() - })); - } - next(); - return new AST_Object({ - properties: a - }); - }); - function as_property_name() { - var tmp = S.token; - next(); - switch (tmp.type) { - case "num": - case "string": - case "name": - case "operator": - case "keyword": - case "atom": - return tmp.value; - - default: - unexpected(); - } - } - function as_name() { - var tmp = S.token; - next(); - switch (tmp.type) { - case "name": - case "operator": - case "keyword": - case "atom": - return tmp.value; - - default: - unexpected(); - } - } - function as_symbol(type, noerror) { - if (!is("name")) { - if (!noerror) croak("Name expected"); - return null; - } - var name = S.token.value; - var sym = new (name == "this" ? AST_This : type)({ - name: String(S.token.value), - start: S.token, - end: S.token - }); - next(); - return sym; - } - var subscripts = function(expr, allow_calls) { - var start = expr.start; - if (is("punc", ".")) { - next(); - return subscripts(new AST_Dot({ - start: start, - expression: expr, - property: as_name(), - end: prev() - }), allow_calls); - } - if (is("punc", "[")) { - next(); - var prop = expression(true); - expect("]"); - return subscripts(new AST_Sub({ - start: start, - expression: expr, - property: prop, - end: prev() - }), allow_calls); - } - if (allow_calls && is("punc", "(")) { - next(); - return subscripts(new AST_Call({ - start: start, - expression: expr, - args: expr_list(")"), - end: prev() - }), true); - } - return expr; - }; - var maybe_unary = function(allow_calls) { - var start = S.token; - if (is("operator") && UNARY_PREFIX(start.value)) { - next(); - var ex = make_unary(AST_UnaryPrefix, start.value, maybe_unary(allow_calls)); - ex.start = start; - ex.end = prev(); - return ex; - } - var val = expr_atom(allow_calls); - while (is("operator") && UNARY_POSTFIX(S.token.value) && !S.token.nlb) { - val = make_unary(AST_UnaryPostfix, S.token.value, val); - val.start = start; - val.end = S.token; - next(); - } - return val; - }; - function make_unary(ctor, op, expr) { - if ((op == "++" || op == "--") && !is_assignable(expr)) croak("Invalid use of " + op + " operator"); - return new ctor({ - operator: op, - expression: expr - }); - } - var expr_op = function(left, min_prec, no_in) { - var op = is("operator") ? S.token.value : null; - if (op == "in" && no_in) op = null; - var prec = op != null ? PRECEDENCE[op] : null; - if (prec != null && prec > min_prec) { - next(); - var right = expr_op(maybe_unary(true), prec, no_in); - return expr_op(new AST_Binary({ - start: left.start, - left: left, - operator: op, - right: right, - end: right.end - }), min_prec, no_in); - } - return left; - }; - function expr_ops(no_in) { - return expr_op(maybe_unary(true), 0, no_in); - } - var maybe_conditional = function(no_in) { - var start = S.token; - var expr = expr_ops(no_in); - if (is("operator", "?")) { - next(); - var yes = expression(false); - expect(":"); - return new AST_Conditional({ - start: start, - condition: expr, - consequent: yes, - alternative: expression(false, no_in), - end: peek() - }); - } - return expr; - }; - function is_assignable(expr) { - if (!options.strict) return true; - if (expr instanceof AST_This) return false; - return expr instanceof AST_PropAccess || expr instanceof AST_Symbol; - } - var maybe_assign = function(no_in) { - var start = S.token; - var left = maybe_conditional(no_in), val = S.token.value; - if (is("operator") && ASSIGNMENT(val)) { - if (is_assignable(left)) { - next(); - return new AST_Assign({ - start: start, - left: left, - operator: val, - right: maybe_assign(no_in), - end: prev() - }); - } - croak("Invalid assignment"); - } - return left; - }; - var expression = function(commas, no_in) { - var start = S.token; - var expr = maybe_assign(no_in); - if (commas && is("punc", ",")) { - next(); - return new AST_Seq({ - start: start, - car: expr, - cdr: expression(true, no_in), - end: peek() - }); - } - return expr; - }; - function in_loop(cont) { - ++S.in_loop; - var ret = cont(); - --S.in_loop; - return ret; - } - if (options.expression) { - return expression(true); - } - return function() { - var start = S.token; - var body = []; - while (!is("eof")) body.push(statement()); - var end = prev(); - var toplevel = options.toplevel; - if (toplevel) { - toplevel.body = toplevel.body.concat(body); - toplevel.end = end; - } else { - toplevel = new AST_Toplevel({ - start: start, - body: body, - end: end - }); - } - return toplevel; - }(); - } - "use strict"; - function TreeTransformer(before, after) { - TreeWalker.call(this); - this.before = before; - this.after = after; - } - TreeTransformer.prototype = new TreeWalker(); - (function(undefined) { - function _(node, descend) { - node.DEFMETHOD("transform", function(tw, in_list) { - var x, y; - tw.push(this); - if (tw.before) x = tw.before(this, descend, in_list); - if (x === undefined) { - if (!tw.after) { - x = this; - descend(x, tw); - } else { - tw.stack[tw.stack.length - 1] = x = this.clone(); - descend(x, tw); - y = tw.after(x, in_list); - if (y !== undefined) x = y; - } - } - tw.pop(); - return x; - }); - } - function do_list(list, tw) { - return MAP(list, function(node) { - return node.transform(tw, true); - }); - } - _(AST_Node, noop); - _(AST_LabeledStatement, function(self, tw) { - self.label = self.label.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_SimpleStatement, function(self, tw) { - self.body = self.body.transform(tw); - }); - _(AST_Block, function(self, tw) { - self.body = do_list(self.body, tw); - }); - _(AST_DWLoop, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_For, function(self, tw) { - if (self.init) self.init = self.init.transform(tw); - if (self.condition) self.condition = self.condition.transform(tw); - if (self.step) self.step = self.step.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_ForIn, function(self, tw) { - self.init = self.init.transform(tw); - self.object = self.object.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_With, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_Exit, function(self, tw) { - if (self.value) self.value = self.value.transform(tw); - }); - _(AST_LoopControl, function(self, tw) { - if (self.label) self.label = self.label.transform(tw); - }); - _(AST_If, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - if (self.alternative) self.alternative = self.alternative.transform(tw); - }); - _(AST_Switch, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - _(AST_Case, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - _(AST_Try, function(self, tw) { - self.body = do_list(self.body, tw); - if (self.bcatch) self.bcatch = self.bcatch.transform(tw); - if (self.bfinally) self.bfinally = self.bfinally.transform(tw); - }); - _(AST_Catch, function(self, tw) { - self.argname = self.argname.transform(tw); - self.body = do_list(self.body, tw); - }); - _(AST_Definitions, function(self, tw) { - self.definitions = do_list(self.definitions, tw); - }); - _(AST_VarDef, function(self, tw) { - self.name = self.name.transform(tw); - if (self.value) self.value = self.value.transform(tw); - }); - _(AST_Lambda, function(self, tw) { - if (self.name) self.name = self.name.transform(tw); - self.argnames = do_list(self.argnames, tw); - self.body = do_list(self.body, tw); - }); - _(AST_Call, function(self, tw) { - self.expression = self.expression.transform(tw); - self.args = do_list(self.args, tw); - }); - _(AST_Seq, function(self, tw) { - self.car = self.car.transform(tw); - self.cdr = self.cdr.transform(tw); - }); - _(AST_Dot, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - _(AST_Sub, function(self, tw) { - self.expression = self.expression.transform(tw); - self.property = self.property.transform(tw); - }); - _(AST_Unary, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - _(AST_Binary, function(self, tw) { - self.left = self.left.transform(tw); - self.right = self.right.transform(tw); - }); - _(AST_Conditional, function(self, tw) { - self.condition = self.condition.transform(tw); - self.consequent = self.consequent.transform(tw); - self.alternative = self.alternative.transform(tw); - }); - _(AST_Array, function(self, tw) { - self.elements = do_list(self.elements, tw); - }); - _(AST_Object, function(self, tw) { - self.properties = do_list(self.properties, tw); - }); - _(AST_ObjectProperty, function(self, tw) { - self.value = self.value.transform(tw); - }); - })(); - "use strict"; - function SymbolDef(scope, index, orig) { - this.name = orig.name; - this.orig = [ orig ]; - this.scope = scope; - this.references = []; - this.global = false; - this.mangled_name = null; - this.undeclared = false; - this.constant = false; - this.index = index; - } - SymbolDef.prototype = { - unmangleable: function(options) { - return this.global && !(options && options.toplevel) || this.undeclared || !(options && options.eval) && (this.scope.uses_eval || this.scope.uses_with); - }, - mangle: function(options) { - if (!this.mangled_name && !this.unmangleable(options)) { - var s = this.scope; - if (this.orig[0] instanceof AST_SymbolLambda && !options.screw_ie8) s = s.parent_scope; - this.mangled_name = s.next_mangled(options); - } - } - }; - AST_Toplevel.DEFMETHOD("figure_out_scope", function() { - var self = this; - var scope = self.parent_scope = null; - var labels = new Dictionary(); - var nesting = 0; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Scope) { - node.init_scope_vars(nesting); - var save_scope = node.parent_scope = scope; - var save_labels = labels; - ++nesting; - scope = node; - labels = new Dictionary(); - descend(); - labels = save_labels; - scope = save_scope; - --nesting; - return true; - } - if (node instanceof AST_Directive) { - node.scope = scope; - push_uniq(scope.directives, node.value); - return true; - } - if (node instanceof AST_With) { - for (var s = scope; s; s = s.parent_scope) s.uses_with = true; - return; - } - if (node instanceof AST_LabeledStatement) { - var l = node.label; - if (labels.has(l.name)) throw new Error(string_template("Label {name} defined twice", l)); - labels.set(l.name, l); - descend(); - labels.del(l.name); - return true; - } - if (node instanceof AST_Symbol) { - node.scope = scope; - } - if (node instanceof AST_Label) { - node.thedef = node; - node.init_scope_vars(); - } - if (node instanceof AST_SymbolLambda) { - scope.def_function(node); - } else if (node instanceof AST_SymbolDefun) { - (node.scope = scope.parent_scope).def_function(node); - } else if (node instanceof AST_SymbolVar || node instanceof AST_SymbolConst) { - var def = scope.def_variable(node); - def.constant = node instanceof AST_SymbolConst; - def.init = tw.parent().value; - } else if (node instanceof AST_SymbolCatch) { - scope.def_variable(node); - } - if (node instanceof AST_LabelRef) { - var sym = labels.get(node.name); - if (!sym) throw new Error(string_template("Undefined label {name} [{line},{col}]", { - name: node.name, - line: node.start.line, - col: node.start.col - })); - node.thedef = sym; - } - }); - self.walk(tw); - var func = null; - var globals = self.globals = new Dictionary(); - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Lambda) { - var prev_func = func; - func = node; - descend(); - func = prev_func; - return true; - } - if (node instanceof AST_LabelRef) { - node.reference(); - return true; - } - if (node instanceof AST_SymbolRef) { - var name = node.name; - var sym = node.scope.find_variable(name); - if (!sym) { - var g; - if (globals.has(name)) { - g = globals.get(name); - } else { - g = new SymbolDef(self, globals.size(), node); - g.undeclared = true; - g.global = true; - globals.set(name, g); - } - node.thedef = g; - if (name == "eval" && tw.parent() instanceof AST_Call) { - for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) s.uses_eval = true; - } - if (name == "arguments") { - func.uses_arguments = true; - } - } else { - node.thedef = sym; - } - node.reference(); - return true; - } - }); - self.walk(tw); - }); - AST_Scope.DEFMETHOD("init_scope_vars", function(nesting) { - this.directives = []; - this.variables = new Dictionary(); - this.functions = new Dictionary(); - this.uses_with = false; - this.uses_eval = false; - this.parent_scope = null; - this.enclosed = []; - this.cname = -1; - this.nesting = nesting; - }); - AST_Scope.DEFMETHOD("strict", function() { - return this.has_directive("use strict"); - }); - AST_Lambda.DEFMETHOD("init_scope_vars", function() { - AST_Scope.prototype.init_scope_vars.apply(this, arguments); - this.uses_arguments = false; - }); - AST_SymbolRef.DEFMETHOD("reference", function() { - var def = this.definition(); - def.references.push(this); - var s = this.scope; - while (s) { - push_uniq(s.enclosed, def); - if (s === def.scope) break; - s = s.parent_scope; - } - this.frame = this.scope.nesting - def.scope.nesting; - }); - AST_Label.DEFMETHOD("init_scope_vars", function() { - this.references = []; - }); - AST_LabelRef.DEFMETHOD("reference", function() { - this.thedef.references.push(this); - }); - AST_Scope.DEFMETHOD("find_variable", function(name) { - if (name instanceof AST_Symbol) name = name.name; - return this.variables.get(name) || this.parent_scope && this.parent_scope.find_variable(name); - }); - AST_Scope.DEFMETHOD("has_directive", function(value) { - return this.parent_scope && this.parent_scope.has_directive(value) || (this.directives.indexOf(value) >= 0 ? this : null); - }); - AST_Scope.DEFMETHOD("def_function", function(symbol) { - this.functions.set(symbol.name, this.def_variable(symbol)); - }); - AST_Scope.DEFMETHOD("def_variable", function(symbol) { - var def; - if (!this.variables.has(symbol.name)) { - def = new SymbolDef(this, this.variables.size(), symbol); - this.variables.set(symbol.name, def); - def.global = !this.parent_scope; - } else { - def = this.variables.get(symbol.name); - def.orig.push(symbol); - } - return symbol.thedef = def; - }); - AST_Scope.DEFMETHOD("next_mangled", function(options) { - var ext = this.enclosed; - out: while (true) { - var m = base54(++this.cname); - if (!is_identifier(m)) continue; - for (var i = ext.length; --i >= 0; ) { - var sym = ext[i]; - var name = sym.mangled_name || sym.unmangleable(options) && sym.name; - if (m == name) continue out; - } - return m; - } - }); - AST_Scope.DEFMETHOD("references", function(sym) { - if (sym instanceof AST_Symbol) sym = sym.definition(); - return this.enclosed.indexOf(sym) < 0 ? null : sym; - }); - AST_Symbol.DEFMETHOD("unmangleable", function(options) { - return this.definition().unmangleable(options); - }); - AST_SymbolAccessor.DEFMETHOD("unmangleable", function() { - return true; - }); - AST_Label.DEFMETHOD("unmangleable", function() { - return false; - }); - AST_Symbol.DEFMETHOD("unreferenced", function() { - return this.definition().references.length == 0 && !(this.scope.uses_eval || this.scope.uses_with); - }); - AST_Symbol.DEFMETHOD("undeclared", function() { - return this.definition().undeclared; - }); - AST_LabelRef.DEFMETHOD("undeclared", function() { - return false; - }); - AST_Label.DEFMETHOD("undeclared", function() { - return false; - }); - AST_Symbol.DEFMETHOD("definition", function() { - return this.thedef; - }); - AST_Symbol.DEFMETHOD("global", function() { - return this.definition().global; - }); - AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options) { - return defaults(options, { - except: [], - eval: false, - sort: false, - toplevel: false, - screw_ie8: false - }); - }); - AST_Toplevel.DEFMETHOD("mangle_names", function(options) { - options = this._default_mangler_options(options); - var lname = -1; - var to_mangle = []; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_LabeledStatement) { - var save_nesting = lname; - descend(); - lname = save_nesting; - return true; - } - if (node instanceof AST_Scope) { - var p = tw.parent(), a = []; - node.variables.each(function(symbol) { - if (options.except.indexOf(symbol.name) < 0) { - a.push(symbol); - } - }); - if (options.sort) a.sort(function(a, b) { - return b.references.length - a.references.length; - }); - to_mangle.push.apply(to_mangle, a); - return; - } - if (node instanceof AST_Label) { - var name; - do name = base54(++lname); while (!is_identifier(name)); - node.mangled_name = name; - return true; - } - }); - this.walk(tw); - to_mangle.forEach(function(def) { - def.mangle(options); - }); - }); - AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options) { - options = this._default_mangler_options(options); - var tw = new TreeWalker(function(node) { - if (node instanceof AST_Constant) base54.consider(node.print_to_string()); else if (node instanceof AST_Return) base54.consider("return"); else if (node instanceof AST_Throw) base54.consider("throw"); else if (node instanceof AST_Continue) base54.consider("continue"); else if (node instanceof AST_Break) base54.consider("break"); else if (node instanceof AST_Debugger) base54.consider("debugger"); else if (node instanceof AST_Directive) base54.consider(node.value); else if (node instanceof AST_While) base54.consider("while"); else if (node instanceof AST_Do) base54.consider("do while"); else if (node instanceof AST_If) { - base54.consider("if"); - if (node.alternative) base54.consider("else"); - } else if (node instanceof AST_Var) base54.consider("var"); else if (node instanceof AST_Const) base54.consider("const"); else if (node instanceof AST_Lambda) base54.consider("function"); else if (node instanceof AST_For) base54.consider("for"); else if (node instanceof AST_ForIn) base54.consider("for in"); else if (node instanceof AST_Switch) base54.consider("switch"); else if (node instanceof AST_Case) base54.consider("case"); else if (node instanceof AST_Default) base54.consider("default"); else if (node instanceof AST_With) base54.consider("with"); else if (node instanceof AST_ObjectSetter) base54.consider("set" + node.key); else if (node instanceof AST_ObjectGetter) base54.consider("get" + node.key); else if (node instanceof AST_ObjectKeyVal) base54.consider(node.key); else if (node instanceof AST_New) base54.consider("new"); else if (node instanceof AST_This) base54.consider("this"); else if (node instanceof AST_Try) base54.consider("try"); else if (node instanceof AST_Catch) base54.consider("catch"); else if (node instanceof AST_Finally) base54.consider("finally"); else if (node instanceof AST_Symbol && node.unmangleable(options)) base54.consider(node.name); else if (node instanceof AST_Unary || node instanceof AST_Binary) base54.consider(node.operator); else if (node instanceof AST_Dot) base54.consider(node.property); - }); - this.walk(tw); - base54.sort(); - }); - var base54 = function() { - var string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789"; - var chars, frequency; - function reset() { - frequency = Object.create(null); - chars = string.split("").map(function(ch) { - return ch.charCodeAt(0); - }); - chars.forEach(function(ch) { - frequency[ch] = 0; - }); - } - base54.consider = function(str) { - for (var i = str.length; --i >= 0; ) { - var code = str.charCodeAt(i); - if (code in frequency) ++frequency[code]; - } - }; - base54.sort = function() { - chars = mergeSort(chars, function(a, b) { - if (is_digit(a) && !is_digit(b)) return 1; - if (is_digit(b) && !is_digit(a)) return -1; - return frequency[b] - frequency[a]; - }); - }; - base54.reset = reset; - reset(); - base54.get = function() { - return chars; - }; - base54.freq = function() { - return frequency; - }; - function base54(num) { - var ret = "", base = 54; - do { - ret += String.fromCharCode(chars[num % base]); - num = Math.floor(num / base); - base = 64; - } while (num > 0); - return ret; - } - return base54; - }(); - AST_Toplevel.DEFMETHOD("scope_warnings", function(options) { - options = defaults(options, { - undeclared: false, - unreferenced: true, - assign_to_global: true, - func_arguments: true, - nested_defuns: true, - eval: true - }); - var tw = new TreeWalker(function(node) { - if (options.undeclared && node instanceof AST_SymbolRef && node.undeclared()) { - AST_Node.warn("Undeclared symbol: {name} [{file}:{line},{col}]", { - name: node.name, - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - if (options.assign_to_global) { - var sym = null; - if (node instanceof AST_Assign && node.left instanceof AST_SymbolRef) sym = node.left; else if (node instanceof AST_ForIn && node.init instanceof AST_SymbolRef) sym = node.init; - if (sym && (sym.undeclared() || sym.global() && sym.scope !== sym.definition().scope)) { - AST_Node.warn("{msg}: {name} [{file}:{line},{col}]", { - msg: sym.undeclared() ? "Accidental global?" : "Assignment to global", - name: sym.name, - file: sym.start.file, - line: sym.start.line, - col: sym.start.col - }); - } - } - if (options.eval && node instanceof AST_SymbolRef && node.undeclared() && node.name == "eval") { - AST_Node.warn("Eval is used [{file}:{line},{col}]", node.start); - } - if (options.unreferenced && (node instanceof AST_SymbolDeclaration || node instanceof AST_Label) && node.unreferenced()) { - AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", { - type: node instanceof AST_Label ? "Label" : "Symbol", - name: node.name, - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - if (options.func_arguments && node instanceof AST_Lambda && node.uses_arguments) { - AST_Node.warn("arguments used in function {name} [{file}:{line},{col}]", { - name: node.name ? node.name.name : "anonymous", - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - if (options.nested_defuns && node instanceof AST_Defun && !(tw.parent() instanceof AST_Scope)) { - AST_Node.warn('Function {name} declared in nested statement "{type}" [{file}:{line},{col}]', { - name: node.name.name, - type: tw.parent().TYPE, - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - }); - this.walk(tw); - }); - "use strict"; - function OutputStream(options) { - options = defaults(options, { - indent_start: 0, - indent_level: 4, - quote_keys: false, - space_colon: true, - ascii_only: false, - inline_script: false, - width: 80, - max_line_len: 32e3, - beautify: false, - source_map: null, - bracketize: false, - semicolons: true, - comments: false, - preserve_line: false, - screw_ie8: false - }, true); - var indentation = 0; - var current_col = 0; - var current_line = 1; - var current_pos = 0; - var OUTPUT = ""; - function to_ascii(str, identifier) { - return str.replace(/[\u0080-\uffff]/g, function(ch) { - var code = ch.charCodeAt(0).toString(16); - if (code.length <= 2 && !identifier) { - while (code.length < 2) code = "0" + code; - return "\\x" + code; - } else { - while (code.length < 4) code = "0" + code; - return "\\u" + code; - } - }); - } - function make_string(str) { - var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s) { - switch (s) { - case "\\": - return "\\\\"; - - case "\b": - return "\\b"; - - case "\f": - return "\\f"; - - case "\n": - return "\\n"; - - case "\r": - return "\\r"; - - case "\u2028": - return "\\u2028"; - - case "\u2029": - return "\\u2029"; - - case '"': - ++dq; - return '"'; - - case "'": - ++sq; - return "'"; - - case "\x00": - return "\\x00"; - } - return s; - }); - if (options.ascii_only) str = to_ascii(str); - if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'"; else return '"' + str.replace(/\x22/g, '\\"') + '"'; - } - function encode_string(str) { - var ret = make_string(str); - if (options.inline_script) ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); - return ret; - } - function make_name(name) { - name = name.toString(); - if (options.ascii_only) name = to_ascii(name, true); - return name; - } - function make_indent(back) { - return repeat_string(" ", options.indent_start + indentation - back * options.indent_level); - } - var might_need_space = false; - var might_need_semicolon = false; - var last = null; - function last_char() { - return last.charAt(last.length - 1); - } - function maybe_newline() { - if (options.max_line_len && current_col > options.max_line_len) print("\n"); - } - var requireSemicolonChars = makePredicate("( [ + * / - , ."); - function print(str) { - str = String(str); - var ch = str.charAt(0); - if (might_need_semicolon) { - if ((!ch || ";}".indexOf(ch) < 0) && !/[;]$/.test(last)) { - if (options.semicolons || requireSemicolonChars(ch)) { - OUTPUT += ";"; - current_col++; - current_pos++; - } else { - OUTPUT += "\n"; - current_pos++; - current_line++; - current_col = 0; - } - if (!options.beautify) might_need_space = false; - } - might_need_semicolon = false; - maybe_newline(); - } - if (!options.beautify && options.preserve_line && stack[stack.length - 1]) { - var target_line = stack[stack.length - 1].start.line; - while (current_line < target_line) { - OUTPUT += "\n"; - current_pos++; - current_line++; - current_col = 0; - might_need_space = false; - } - } - if (might_need_space) { - var prev = last_char(); - if (is_identifier_char(prev) && (is_identifier_char(ch) || ch == "\\") || /^[\+\-\/]$/.test(ch) && ch == prev) { - OUTPUT += " "; - current_col++; - current_pos++; - } - might_need_space = false; - } - var a = str.split(/\r?\n/), n = a.length - 1; - current_line += n; - if (n == 0) { - current_col += a[n].length; - } else { - current_col = a[n].length; - } - current_pos += str.length; - last = str; - OUTPUT += str; - } - var space = options.beautify ? function() { - print(" "); - } : function() { - might_need_space = true; - }; - var indent = options.beautify ? function(half) { - if (options.beautify) { - print(make_indent(half ? .5 : 0)); - } - } : noop; - var with_indent = options.beautify ? function(col, cont) { - if (col === true) col = next_indent(); - var save_indentation = indentation; - indentation = col; - var ret = cont(); - indentation = save_indentation; - return ret; - } : function(col, cont) { - return cont(); - }; - var newline = options.beautify ? function() { - print("\n"); - } : noop; - var semicolon = options.beautify ? function() { - print(";"); - } : function() { - might_need_semicolon = true; - }; - function force_semicolon() { - might_need_semicolon = false; - print(";"); - } - function next_indent() { - return indentation + options.indent_level; - } - function with_block(cont) { - var ret; - print("{"); - newline(); - with_indent(next_indent(), function() { - ret = cont(); - }); - indent(); - print("}"); - return ret; - } - function with_parens(cont) { - print("("); - var ret = cont(); - print(")"); - return ret; - } - function with_square(cont) { - print("["); - var ret = cont(); - print("]"); - return ret; - } - function comma() { - print(","); - space(); - } - function colon() { - print(":"); - if (options.space_colon) space(); - } - var add_mapping = options.source_map ? function(token, name) { - try { - if (token) options.source_map.add(token.file || "?", current_line, current_col, token.line, token.col, !name && token.type == "name" ? token.value : name); - } catch (ex) { - AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { - file: token.file, - line: token.line, - col: token.col, - cline: current_line, - ccol: current_col, - name: name || "" - }); - } - } : noop; - function get() { - return OUTPUT; - } - var stack = []; - return { - get: get, - toString: get, - indent: indent, - indentation: function() { - return indentation; - }, - current_width: function() { - return current_col - indentation; - }, - should_break: function() { - return options.width && this.current_width() >= options.width; - }, - newline: newline, - print: print, - space: space, - comma: comma, - colon: colon, - last: function() { - return last; - }, - semicolon: semicolon, - force_semicolon: force_semicolon, - to_ascii: to_ascii, - print_name: function(name) { - print(make_name(name)); - }, - print_string: function(str) { - print(encode_string(str)); - }, - next_indent: next_indent, - with_indent: with_indent, - with_block: with_block, - with_parens: with_parens, - with_square: with_square, - add_mapping: add_mapping, - option: function(opt) { - return options[opt]; - }, - line: function() { - return current_line; - }, - col: function() { - return current_col; - }, - pos: function() { - return current_pos; - }, - push_node: function(node) { - stack.push(node); - }, - pop_node: function() { - return stack.pop(); - }, - stack: function() { - return stack; - }, - parent: function(n) { - return stack[stack.length - 2 - (n || 0)]; - } - }; - } - (function() { - function DEFPRINT(nodetype, generator) { - nodetype.DEFMETHOD("_codegen", generator); - } - AST_Node.DEFMETHOD("print", function(stream, force_parens) { - var self = this, generator = self._codegen; - function doit() { - self.add_comments(stream); - self.add_source_map(stream); - generator(self, stream); - } - stream.push_node(self); - if (force_parens || self.needs_parens(stream)) { - stream.with_parens(doit); - } else { - doit(); - } - stream.pop_node(); - }); - AST_Node.DEFMETHOD("print_to_string", function(options) { - var s = OutputStream(options); - this.print(s); - return s.get(); - }); - AST_Node.DEFMETHOD("add_comments", function(output) { - var c = output.option("comments"), self = this; - if (c) { - var start = self.start; - if (start && !start._comments_dumped) { - start._comments_dumped = true; - var comments = start.comments_before; - if (self instanceof AST_Exit && self.value && self.value.start.comments_before.length > 0) { - comments = (comments || []).concat(self.value.start.comments_before); - self.value.start.comments_before = []; - } - if (c.test) { - comments = comments.filter(function(comment) { - return c.test(comment.value); - }); - } else if (typeof c == "function") { - comments = comments.filter(function(comment) { - return c(self, comment); - }); - } - comments.forEach(function(c) { - if (c.type == "comment1") { - output.print("//" + c.value + "\n"); - output.indent(); - } else if (c.type == "comment2") { - output.print("/*" + c.value + "*/"); - if (start.nlb) { - output.print("\n"); - output.indent(); - } else { - output.space(); - } - } - }); - } - } - }); - function PARENS(nodetype, func) { - nodetype.DEFMETHOD("needs_parens", func); - } - PARENS(AST_Node, function() { - return false; - }); - PARENS(AST_Function, function(output) { - return first_in_statement(output); - }); - PARENS(AST_Object, function(output) { - return first_in_statement(output); - }); - PARENS(AST_Unary, function(output) { - var p = output.parent(); - return p instanceof AST_PropAccess && p.expression === this; - }); - PARENS(AST_Seq, function(output) { - var p = output.parent(); - return p instanceof AST_Call || p instanceof AST_Unary || p instanceof AST_Binary || p instanceof AST_VarDef || p instanceof AST_Dot || p instanceof AST_Array || p instanceof AST_ObjectProperty || p instanceof AST_Conditional; - }); - PARENS(AST_Binary, function(output) { - var p = output.parent(); - if (p instanceof AST_Call && p.expression === this) return true; - if (p instanceof AST_Unary) return true; - if (p instanceof AST_PropAccess && p.expression === this) return true; - if (p instanceof AST_Binary) { - var po = p.operator, pp = PRECEDENCE[po]; - var so = this.operator, sp = PRECEDENCE[so]; - if (pp > sp || pp == sp && this === p.right && !(so == po && (so == "*" || so == "&&" || so == "||"))) { - return true; - } - } - }); - PARENS(AST_PropAccess, function(output) { - var p = output.parent(); - if (p instanceof AST_New && p.expression === this) { - try { - this.walk(new TreeWalker(function(node) { - if (node instanceof AST_Call) throw p; - })); - } catch (ex) { - if (ex !== p) throw ex; - return true; - } - } - }); - PARENS(AST_Call, function(output) { - var p = output.parent(); - return p instanceof AST_New && p.expression === this; - }); - PARENS(AST_New, function(output) { - var p = output.parent(); - if (no_constructor_parens(this, output) && (p instanceof AST_PropAccess || p instanceof AST_Call && p.expression === this)) return true; - }); - PARENS(AST_Number, function(output) { - var p = output.parent(); - if (this.getValue() < 0 && p instanceof AST_PropAccess && p.expression === this) return true; - }); - PARENS(AST_NaN, function(output) { - var p = output.parent(); - if (p instanceof AST_PropAccess && p.expression === this) return true; - }); - function assign_and_conditional_paren_rules(output) { - var p = output.parent(); - if (p instanceof AST_Unary) return true; - if (p instanceof AST_Binary && !(p instanceof AST_Assign)) return true; - if (p instanceof AST_Call && p.expression === this) return true; - if (p instanceof AST_Conditional && p.condition === this) return true; - if (p instanceof AST_PropAccess && p.expression === this) return true; - } - PARENS(AST_Assign, assign_and_conditional_paren_rules); - PARENS(AST_Conditional, assign_and_conditional_paren_rules); - DEFPRINT(AST_Directive, function(self, output) { - output.print_string(self.value); - output.semicolon(); - }); - DEFPRINT(AST_Debugger, function(self, output) { - output.print("debugger"); - output.semicolon(); - }); - function display_body(body, is_toplevel, output) { - var last = body.length - 1; - body.forEach(function(stmt, i) { - if (!(stmt instanceof AST_EmptyStatement)) { - output.indent(); - stmt.print(output); - if (!(i == last && is_toplevel)) { - output.newline(); - if (is_toplevel) output.newline(); - } - } - }); - } - AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output) { - force_statement(this.body, output); - }); - DEFPRINT(AST_Statement, function(self, output) { - self.body.print(output); - output.semicolon(); - }); - DEFPRINT(AST_Toplevel, function(self, output) { - display_body(self.body, true, output); - output.print(""); - }); - DEFPRINT(AST_LabeledStatement, function(self, output) { - self.label.print(output); - output.colon(); - self.body.print(output); - }); - DEFPRINT(AST_SimpleStatement, function(self, output) { - self.body.print(output); - output.semicolon(); - }); - function print_bracketed(body, output) { - if (body.length > 0) output.with_block(function() { - display_body(body, false, output); - }); else output.print("{}"); - } - DEFPRINT(AST_BlockStatement, function(self, output) { - print_bracketed(self.body, output); - }); - DEFPRINT(AST_EmptyStatement, function(self, output) { - output.semicolon(); - }); - DEFPRINT(AST_Do, function(self, output) { - output.print("do"); - output.space(); - self._do_print_body(output); - output.space(); - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.semicolon(); - }); - DEFPRINT(AST_While, function(self, output) { - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_For, function(self, output) { - output.print("for"); - output.space(); - output.with_parens(function() { - if (self.init) { - if (self.init instanceof AST_Definitions) { - self.init.print(output); - } else { - parenthesize_for_noin(self.init, output, true); - } - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.condition) { - self.condition.print(output); - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.step) { - self.step.print(output); - } - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_ForIn, function(self, output) { - output.print("for"); - output.space(); - output.with_parens(function() { - self.init.print(output); - output.space(); - output.print("in"); - output.space(); - self.object.print(output); - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_With, function(self, output) { - output.print("with"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - self._do_print_body(output); - }); - AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword) { - var self = this; - if (!nokeyword) { - output.print("function"); - } - if (self.name) { - output.space(); - self.name.print(output); - } - output.with_parens(function() { - self.argnames.forEach(function(arg, i) { - if (i) output.comma(); - arg.print(output); - }); - }); - output.space(); - print_bracketed(self.body, output); - }); - DEFPRINT(AST_Lambda, function(self, output) { - self._do_print(output); - }); - AST_Exit.DEFMETHOD("_do_print", function(output, kind) { - output.print(kind); - if (this.value) { - output.space(); - this.value.print(output); - } - output.semicolon(); - }); - DEFPRINT(AST_Return, function(self, output) { - self._do_print(output, "return"); - }); - DEFPRINT(AST_Throw, function(self, output) { - self._do_print(output, "throw"); - }); - AST_LoopControl.DEFMETHOD("_do_print", function(output, kind) { - output.print(kind); - if (this.label) { - output.space(); - this.label.print(output); - } - output.semicolon(); - }); - DEFPRINT(AST_Break, function(self, output) { - self._do_print(output, "break"); - }); - DEFPRINT(AST_Continue, function(self, output) { - self._do_print(output, "continue"); - }); - function make_then(self, output) { - if (output.option("bracketize")) { - make_block(self.body, output); - return; - } - if (!self.body) return output.force_semicolon(); - if (self.body instanceof AST_Do && !output.option("screw_ie8")) { - make_block(self.body, output); - return; - } - var b = self.body; - while (true) { - if (b instanceof AST_If) { - if (!b.alternative) { - make_block(self.body, output); - return; - } - b = b.alternative; - } else if (b instanceof AST_StatementWithBody) { - b = b.body; - } else break; - } - force_statement(self.body, output); - } - DEFPRINT(AST_If, function(self, output) { - output.print("if"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - if (self.alternative) { - make_then(self, output); - output.space(); - output.print("else"); - output.space(); - force_statement(self.alternative, output); - } else { - self._do_print_body(output); - } - }); - DEFPRINT(AST_Switch, function(self, output) { - output.print("switch"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - if (self.body.length > 0) output.with_block(function() { - self.body.forEach(function(stmt, i) { - if (i) output.newline(); - output.indent(true); - stmt.print(output); - }); - }); else output.print("{}"); - }); - AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output) { - if (this.body.length > 0) { - output.newline(); - this.body.forEach(function(stmt) { - output.indent(); - stmt.print(output); - output.newline(); - }); - } - }); - DEFPRINT(AST_Default, function(self, output) { - output.print("default:"); - self._do_print_body(output); - }); - DEFPRINT(AST_Case, function(self, output) { - output.print("case"); - output.space(); - self.expression.print(output); - output.print(":"); - self._do_print_body(output); - }); - DEFPRINT(AST_Try, function(self, output) { - output.print("try"); - output.space(); - print_bracketed(self.body, output); - if (self.bcatch) { - output.space(); - self.bcatch.print(output); - } - if (self.bfinally) { - output.space(); - self.bfinally.print(output); - } - }); - DEFPRINT(AST_Catch, function(self, output) { - output.print("catch"); - output.space(); - output.with_parens(function() { - self.argname.print(output); - }); - output.space(); - print_bracketed(self.body, output); - }); - DEFPRINT(AST_Finally, function(self, output) { - output.print("finally"); - output.space(); - print_bracketed(self.body, output); - }); - AST_Definitions.DEFMETHOD("_do_print", function(output, kind) { - output.print(kind); - output.space(); - this.definitions.forEach(function(def, i) { - if (i) output.comma(); - def.print(output); - }); - var p = output.parent(); - var in_for = p instanceof AST_For || p instanceof AST_ForIn; - var avoid_semicolon = in_for && p.init === this; - if (!avoid_semicolon) output.semicolon(); - }); - DEFPRINT(AST_Var, function(self, output) { - self._do_print(output, "var"); - }); - DEFPRINT(AST_Const, function(self, output) { - self._do_print(output, "const"); - }); - function parenthesize_for_noin(node, output, noin) { - if (!noin) node.print(output); else try { - node.walk(new TreeWalker(function(node) { - if (node instanceof AST_Binary && node.operator == "in") throw output; - })); - node.print(output); - } catch (ex) { - if (ex !== output) throw ex; - node.print(output, true); - } - } - DEFPRINT(AST_VarDef, function(self, output) { - self.name.print(output); - if (self.value) { - output.space(); - output.print("="); - output.space(); - var p = output.parent(1); - var noin = p instanceof AST_For || p instanceof AST_ForIn; - parenthesize_for_noin(self.value, output, noin); - } - }); - DEFPRINT(AST_Call, function(self, output) { - self.expression.print(output); - if (self instanceof AST_New && no_constructor_parens(self, output)) return; - output.with_parens(function() { - self.args.forEach(function(expr, i) { - if (i) output.comma(); - expr.print(output); - }); - }); - }); - DEFPRINT(AST_New, function(self, output) { - output.print("new"); - output.space(); - AST_Call.prototype._codegen(self, output); - }); - AST_Seq.DEFMETHOD("_do_print", function(output) { - this.car.print(output); - if (this.cdr) { - output.comma(); - if (output.should_break()) { - output.newline(); - output.indent(); - } - this.cdr.print(output); - } - }); - DEFPRINT(AST_Seq, function(self, output) { - self._do_print(output); - }); - DEFPRINT(AST_Dot, function(self, output) { - var expr = self.expression; - expr.print(output); - if (expr instanceof AST_Number && expr.getValue() >= 0) { - if (!/[xa-f.]/i.test(output.last())) { - output.print("."); - } - } - output.print("."); - output.add_mapping(self.end); - output.print_name(self.property); - }); - DEFPRINT(AST_Sub, function(self, output) { - self.expression.print(output); - output.print("["); - self.property.print(output); - output.print("]"); - }); - DEFPRINT(AST_UnaryPrefix, function(self, output) { - var op = self.operator; - output.print(op); - if (/^[a-z]/i.test(op)) output.space(); - self.expression.print(output); - }); - DEFPRINT(AST_UnaryPostfix, function(self, output) { - self.expression.print(output); - output.print(self.operator); - }); - DEFPRINT(AST_Binary, function(self, output) { - self.left.print(output); - output.space(); - output.print(self.operator); - output.space(); - self.right.print(output); - }); - DEFPRINT(AST_Conditional, function(self, output) { - self.condition.print(output); - output.space(); - output.print("?"); - output.space(); - self.consequent.print(output); - output.space(); - output.colon(); - self.alternative.print(output); - }); - DEFPRINT(AST_Array, function(self, output) { - output.with_square(function() { - var a = self.elements, len = a.length; - if (len > 0) output.space(); - a.forEach(function(exp, i) { - if (i) output.comma(); - exp.print(output); - if (i === len - 1 && exp instanceof AST_Hole) output.comma(); - }); - if (len > 0) output.space(); - }); - }); - DEFPRINT(AST_Object, function(self, output) { - if (self.properties.length > 0) output.with_block(function() { - self.properties.forEach(function(prop, i) { - if (i) { - output.print(","); - output.newline(); - } - output.indent(); - prop.print(output); - }); - output.newline(); - }); else output.print("{}"); - }); - DEFPRINT(AST_ObjectKeyVal, function(self, output) { - var key = self.key; - if (output.option("quote_keys")) { - output.print_string(key + ""); - } else if ((typeof key == "number" || !output.option("beautify") && +key + "" == key) && parseFloat(key) >= 0) { - output.print(make_num(key)); - } else if (RESERVED_WORDS(key) ? output.option("screw_ie8") : is_identifier_string(key)) { - output.print_name(key); - } else { - output.print_string(key); - } - output.colon(); - self.value.print(output); - }); - DEFPRINT(AST_ObjectSetter, function(self, output) { - output.print("set"); - self.value._do_print(output, true); - }); - DEFPRINT(AST_ObjectGetter, function(self, output) { - output.print("get"); - self.value._do_print(output, true); - }); - DEFPRINT(AST_Symbol, function(self, output) { - var def = self.definition(); - output.print_name(def ? def.mangled_name || def.name : self.name); - }); - DEFPRINT(AST_Undefined, function(self, output) { - output.print("void 0"); - }); - DEFPRINT(AST_Hole, noop); - DEFPRINT(AST_Infinity, function(self, output) { - output.print("1/0"); - }); - DEFPRINT(AST_NaN, function(self, output) { - output.print("0/0"); - }); - DEFPRINT(AST_This, function(self, output) { - output.print("this"); - }); - DEFPRINT(AST_Constant, function(self, output) { - output.print(self.getValue()); - }); - DEFPRINT(AST_String, function(self, output) { - output.print_string(self.getValue()); - }); - DEFPRINT(AST_Number, function(self, output) { - output.print(make_num(self.getValue())); - }); - DEFPRINT(AST_RegExp, function(self, output) { - var str = self.getValue().toString(); - if (output.option("ascii_only")) str = output.to_ascii(str); - output.print(str); - var p = output.parent(); - if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self) output.print(" "); - }); - function force_statement(stat, output) { - if (output.option("bracketize")) { - if (!stat || stat instanceof AST_EmptyStatement) output.print("{}"); else if (stat instanceof AST_BlockStatement) stat.print(output); else output.with_block(function() { - output.indent(); - stat.print(output); - output.newline(); - }); - } else { - if (!stat || stat instanceof AST_EmptyStatement) output.force_semicolon(); else stat.print(output); - } - } - function first_in_statement(output) { - var a = output.stack(), i = a.length, node = a[--i], p = a[--i]; - while (i > 0) { - if (p instanceof AST_Statement && p.body === node) return true; - if (p instanceof AST_Seq && p.car === node || p instanceof AST_Call && p.expression === node && !(p instanceof AST_New) || p instanceof AST_Dot && p.expression === node || p instanceof AST_Sub && p.expression === node || p instanceof AST_Conditional && p.condition === node || p instanceof AST_Binary && p.left === node || p instanceof AST_UnaryPostfix && p.expression === node) { - node = p; - p = a[--i]; - } else { - return false; - } - } - } - function no_constructor_parens(self, output) { - return self.args.length == 0 && !output.option("beautify"); - } - function best_of(a) { - var best = a[0], len = best.length; - for (var i = 1; i < a.length; ++i) { - if (a[i].length < len) { - best = a[i]; - len = best.length; - } - } - return best; - } - function make_num(num) { - var str = num.toString(10), a = [ str.replace(/^0\./, ".").replace("e+", "e") ], m; - if (Math.floor(num) === num) { - if (num >= 0) { - a.push("0x" + num.toString(16).toLowerCase(), "0" + num.toString(8)); - } else { - a.push("-0x" + (-num).toString(16).toLowerCase(), "-0" + (-num).toString(8)); - } - if (m = /^(.*?)(0+)$/.exec(num)) { - a.push(m[1] + "e" + m[2].length); - } - } else if (m = /^0?\.(0+)(.*)$/.exec(num)) { - a.push(m[2] + "e-" + (m[1].length + m[2].length), str.substr(str.indexOf("."))); - } - return best_of(a); - } - function make_block(stmt, output) { - if (stmt instanceof AST_BlockStatement) { - stmt.print(output); - return; - } - output.with_block(function() { - output.indent(); - stmt.print(output); - output.newline(); - }); - } - function DEFMAP(nodetype, generator) { - nodetype.DEFMETHOD("add_source_map", function(stream) { - generator(this, stream); - }); - } - DEFMAP(AST_Node, noop); - function basic_sourcemap_gen(self, output) { - output.add_mapping(self.start); - } - DEFMAP(AST_Directive, basic_sourcemap_gen); - DEFMAP(AST_Debugger, basic_sourcemap_gen); - DEFMAP(AST_Symbol, basic_sourcemap_gen); - DEFMAP(AST_Jump, basic_sourcemap_gen); - DEFMAP(AST_StatementWithBody, basic_sourcemap_gen); - DEFMAP(AST_LabeledStatement, noop); - DEFMAP(AST_Lambda, basic_sourcemap_gen); - DEFMAP(AST_Switch, basic_sourcemap_gen); - DEFMAP(AST_SwitchBranch, basic_sourcemap_gen); - DEFMAP(AST_BlockStatement, basic_sourcemap_gen); - DEFMAP(AST_Toplevel, noop); - DEFMAP(AST_New, basic_sourcemap_gen); - DEFMAP(AST_Try, basic_sourcemap_gen); - DEFMAP(AST_Catch, basic_sourcemap_gen); - DEFMAP(AST_Finally, basic_sourcemap_gen); - DEFMAP(AST_Definitions, basic_sourcemap_gen); - DEFMAP(AST_Constant, basic_sourcemap_gen); - DEFMAP(AST_ObjectProperty, function(self, output) { - output.add_mapping(self.start, self.key); - }); - })(); - "use strict"; - function Compressor(options, false_by_default) { - if (!(this instanceof Compressor)) return new Compressor(options, false_by_default); - TreeTransformer.call(this, this.before, this.after); - this.options = defaults(options, { - sequences: !false_by_default, - properties: !false_by_default, - dead_code: !false_by_default, - drop_debugger: !false_by_default, - unsafe: false, - unsafe_comps: false, - conditionals: !false_by_default, - comparisons: !false_by_default, - evaluate: !false_by_default, - booleans: !false_by_default, - loops: !false_by_default, - unused: !false_by_default, - hoist_funs: !false_by_default, - hoist_vars: false, - if_return: !false_by_default, - join_vars: !false_by_default, - cascade: !false_by_default, - side_effects: !false_by_default, - negate_iife: !false_by_default, - screw_ie8: false, - warnings: true, - global_defs: {} - }, true); - } - Compressor.prototype = new TreeTransformer(); - merge(Compressor.prototype, { - option: function(key) { - return this.options[key]; - }, - warn: function() { - if (this.options.warnings) AST_Node.warn.apply(AST_Node, arguments); - }, - before: function(node, descend, in_list) { - if (node._squeezed) return node; - if (node instanceof AST_Scope) { - node.drop_unused(this); - node = node.hoist_declarations(this); - } - descend(node, this); - node = node.optimize(this); - if (node instanceof AST_Scope) { - var save_warnings = this.options.warnings; - this.options.warnings = false; - node.drop_unused(this); - this.options.warnings = save_warnings; - } - node._squeezed = true; - return node; - } - }); - (function() { - function OPT(node, optimizer) { - node.DEFMETHOD("optimize", function(compressor) { - var self = this; - if (self._optimized) return self; - var opt = optimizer(self, compressor); - opt._optimized = true; - if (opt === self) return opt; - return opt.transform(compressor); - }); - } - OPT(AST_Node, function(self, compressor) { - return self; - }); - AST_Node.DEFMETHOD("equivalent_to", function(node) { - return this.print_to_string() == node.print_to_string(); - }); - function make_node(ctor, orig, props) { - if (!props) props = {}; - if (orig) { - if (!props.start) props.start = orig.start; - if (!props.end) props.end = orig.end; - } - return new ctor(props); - } - function make_node_from_constant(compressor, val, orig) { - if (val instanceof AST_Node) return val.transform(compressor); - switch (typeof val) { - case "string": - return make_node(AST_String, orig, { - value: val - }).optimize(compressor); - - case "number": - return make_node(isNaN(val) ? AST_NaN : AST_Number, orig, { - value: val - }).optimize(compressor); - - case "boolean": - return make_node(val ? AST_True : AST_False, orig).optimize(compressor); - - case "undefined": - return make_node(AST_Undefined, orig).optimize(compressor); - - default: - if (val === null) { - return make_node(AST_Null, orig).optimize(compressor); - } - if (val instanceof RegExp) { - return make_node(AST_RegExp, orig).optimize(compressor); - } - throw new Error(string_template("Can't handle constant of type: {type}", { - type: typeof val - })); - } - } - function as_statement_array(thing) { - if (thing === null) return []; - if (thing instanceof AST_BlockStatement) return thing.body; - if (thing instanceof AST_EmptyStatement) return []; - if (thing instanceof AST_Statement) return [ thing ]; - throw new Error("Can't convert thing to statement array"); - } - function is_empty(thing) { - if (thing === null) return true; - if (thing instanceof AST_EmptyStatement) return true; - if (thing instanceof AST_BlockStatement) return thing.body.length == 0; - return false; - } - function loop_body(x) { - if (x instanceof AST_Switch) return x; - if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) { - return x.body instanceof AST_BlockStatement ? x.body : x; - } - return x; - } - function tighten_body(statements, compressor) { - var CHANGED; - do { - CHANGED = false; - statements = eliminate_spurious_blocks(statements); - if (compressor.option("dead_code")) { - statements = eliminate_dead_code(statements, compressor); - } - if (compressor.option("if_return")) { - statements = handle_if_return(statements, compressor); - } - if (compressor.option("sequences")) { - statements = sequencesize(statements, compressor); - } - if (compressor.option("join_vars")) { - statements = join_consecutive_vars(statements, compressor); - } - } while (CHANGED); - if (compressor.option("negate_iife")) { - negate_iifes(statements, compressor); - } - return statements; - function eliminate_spurious_blocks(statements) { - var seen_dirs = []; - return statements.reduce(function(a, stat) { - if (stat instanceof AST_BlockStatement) { - CHANGED = true; - a.push.apply(a, eliminate_spurious_blocks(stat.body)); - } else if (stat instanceof AST_EmptyStatement) { - CHANGED = true; - } else if (stat instanceof AST_Directive) { - if (seen_dirs.indexOf(stat.value) < 0) { - a.push(stat); - seen_dirs.push(stat.value); - } else { - CHANGED = true; - } - } else { - a.push(stat); - } - return a; - }, []); - } - function handle_if_return(statements, compressor) { - var self = compressor.self(); - var in_lambda = self instanceof AST_Lambda; - var ret = []; - loop: for (var i = statements.length; --i >= 0; ) { - var stat = statements[i]; - switch (true) { - case in_lambda && stat instanceof AST_Return && !stat.value && ret.length == 0: - CHANGED = true; - continue loop; - - case stat instanceof AST_If: - if (stat.body instanceof AST_Return) { - if ((in_lambda && ret.length == 0 || ret[0] instanceof AST_Return && !ret[0].value) && !stat.body.value && !stat.alternative) { - CHANGED = true; - var cond = make_node(AST_SimpleStatement, stat.condition, { - body: stat.condition - }); - ret.unshift(cond); - continue loop; - } - if (ret[0] instanceof AST_Return && stat.body.value && ret[0].value && !stat.alternative) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = ret[0]; - ret[0] = stat.transform(compressor); - continue loop; - } - if ((ret.length == 0 || ret[0] instanceof AST_Return) && stat.body.value && !stat.alternative && in_lambda) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = ret[0] || make_node(AST_Return, stat, { - value: make_node(AST_Undefined, stat) - }); - ret[0] = stat.transform(compressor); - continue loop; - } - if (!stat.body.value && in_lambda) { - CHANGED = true; - stat = stat.clone(); - stat.condition = stat.condition.negate(compressor); - stat.body = make_node(AST_BlockStatement, stat, { - body: as_statement_array(stat.alternative).concat(ret) - }); - stat.alternative = null; - ret = [ stat.transform(compressor) ]; - continue loop; - } - if (ret.length == 1 && in_lambda && ret[0] instanceof AST_SimpleStatement && (!stat.alternative || stat.alternative instanceof AST_SimpleStatement)) { - CHANGED = true; - ret.push(make_node(AST_Return, ret[0], { - value: make_node(AST_Undefined, ret[0]) - }).transform(compressor)); - ret = as_statement_array(stat.alternative).concat(ret); - ret.unshift(stat); - continue loop; - } - } - var ab = aborts(stat.body); - var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; - if (ab && (ab instanceof AST_Return && !ab.value && in_lambda || ab instanceof AST_Continue && self === loop_body(lct) || ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct)) { - if (ab.label) { - remove(ab.label.thedef.references, ab.label); - } - CHANGED = true; - var body = as_statement_array(stat.body).slice(0, -1); - stat = stat.clone(); - stat.condition = stat.condition.negate(compressor); - stat.body = make_node(AST_BlockStatement, stat, { - body: ret - }); - stat.alternative = make_node(AST_BlockStatement, stat, { - body: body - }); - ret = [ stat.transform(compressor) ]; - continue loop; - } - var ab = aborts(stat.alternative); - var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; - if (ab && (ab instanceof AST_Return && !ab.value && in_lambda || ab instanceof AST_Continue && self === loop_body(lct) || ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct)) { - if (ab.label) { - remove(ab.label.thedef.references, ab.label); - } - CHANGED = true; - stat = stat.clone(); - stat.body = make_node(AST_BlockStatement, stat.body, { - body: as_statement_array(stat.body).concat(ret) - }); - stat.alternative = make_node(AST_BlockStatement, stat.alternative, { - body: as_statement_array(stat.alternative).slice(0, -1) - }); - ret = [ stat.transform(compressor) ]; - continue loop; - } - ret.unshift(stat); - break; - - default: - ret.unshift(stat); - break; - } - } - return ret; - } - function eliminate_dead_code(statements, compressor) { - var has_quit = false; - var orig = statements.length; - var self = compressor.self(); - statements = statements.reduce(function(a, stat) { - if (has_quit) { - extract_declarations_from_unreachable_code(compressor, stat, a); - } else { - if (stat instanceof AST_LoopControl) { - var lct = compressor.loopcontrol_target(stat.label); - if (stat instanceof AST_Break && lct instanceof AST_BlockStatement && loop_body(lct) === self || stat instanceof AST_Continue && loop_body(lct) === self) { - if (stat.label) { - remove(stat.label.thedef.references, stat.label); - } - } else { - a.push(stat); - } - } else { - a.push(stat); - } - if (aborts(stat)) has_quit = true; - } - return a; - }, []); - CHANGED = statements.length != orig; - return statements; - } - function sequencesize(statements, compressor) { - if (statements.length < 2) return statements; - var seq = [], ret = []; - function push_seq() { - seq = AST_Seq.from_array(seq); - if (seq) ret.push(make_node(AST_SimpleStatement, seq, { - body: seq - })); - seq = []; - } - statements.forEach(function(stat) { - if (stat instanceof AST_SimpleStatement) seq.push(stat.body); else push_seq(), ret.push(stat); - }); - push_seq(); - ret = sequencesize_2(ret, compressor); - CHANGED = ret.length != statements.length; - return ret; - } - function sequencesize_2(statements, compressor) { - function cons_seq(right) { - ret.pop(); - var left = prev.body; - if (left instanceof AST_Seq) { - left.add(right); - } else { - left = AST_Seq.cons(left, right); - } - return left.transform(compressor); - } - var ret = [], prev = null; - statements.forEach(function(stat) { - if (prev) { - if (stat instanceof AST_For) { - var opera = {}; - try { - prev.body.walk(new TreeWalker(function(node) { - if (node instanceof AST_Binary && node.operator == "in") throw opera; - })); - if (stat.init && !(stat.init instanceof AST_Definitions)) { - stat.init = cons_seq(stat.init); - } else if (!stat.init) { - stat.init = prev.body; - ret.pop(); - } - } catch (ex) { - if (ex !== opera) throw ex; - } - } else if (stat instanceof AST_If) { - stat.condition = cons_seq(stat.condition); - } else if (stat instanceof AST_With) { - stat.expression = cons_seq(stat.expression); - } else if (stat instanceof AST_Exit && stat.value) { - stat.value = cons_seq(stat.value); - } else if (stat instanceof AST_Exit) { - stat.value = cons_seq(make_node(AST_Undefined, stat)); - } else if (stat instanceof AST_Switch) { - stat.expression = cons_seq(stat.expression); - } - } - ret.push(stat); - prev = stat instanceof AST_SimpleStatement ? stat : null; - }); - return ret; - } - function join_consecutive_vars(statements, compressor) { - var prev = null; - return statements.reduce(function(a, stat) { - if (stat instanceof AST_Definitions && prev && prev.TYPE == stat.TYPE) { - prev.definitions = prev.definitions.concat(stat.definitions); - CHANGED = true; - } else if (stat instanceof AST_For && prev instanceof AST_Definitions && (!stat.init || stat.init.TYPE == prev.TYPE)) { - CHANGED = true; - a.pop(); - if (stat.init) { - stat.init.definitions = prev.definitions.concat(stat.init.definitions); - } else { - stat.init = prev; - } - a.push(stat); - prev = stat; - } else { - prev = stat; - a.push(stat); - } - return a; - }, []); - } - function negate_iifes(statements, compressor) { - statements.forEach(function(stat) { - if (stat instanceof AST_SimpleStatement) { - stat.body = function transform(thing) { - return thing.transform(new TreeTransformer(function(node) { - if (node instanceof AST_Call && node.expression instanceof AST_Function) { - return make_node(AST_UnaryPrefix, node, { - operator: "!", - expression: node - }); - } else if (node instanceof AST_Call) { - node.expression = transform(node.expression); - } else if (node instanceof AST_Seq) { - node.car = transform(node.car); - } else if (node instanceof AST_Conditional) { - var expr = transform(node.condition); - if (expr !== node.condition) { - node.condition = expr; - var tmp = node.consequent; - node.consequent = node.alternative; - node.alternative = tmp; - } - } - return node; - })); - }(stat.body); - } - }); - } - } - function extract_declarations_from_unreachable_code(compressor, stat, target) { - compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); - stat.walk(new TreeWalker(function(node) { - if (node instanceof AST_Definitions) { - compressor.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start); - node.remove_initializers(); - target.push(node); - return true; - } - if (node instanceof AST_Defun) { - target.push(node); - return true; - } - if (node instanceof AST_Scope) { - return true; - } - })); - } - (function(def) { - var unary_bool = [ "!", "delete" ]; - var binary_bool = [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ]; - def(AST_Node, function() { - return false; - }); - def(AST_UnaryPrefix, function() { - return member(this.operator, unary_bool); - }); - def(AST_Binary, function() { - return member(this.operator, binary_bool) || (this.operator == "&&" || this.operator == "||") && this.left.is_boolean() && this.right.is_boolean(); - }); - def(AST_Conditional, function() { - return this.consequent.is_boolean() && this.alternative.is_boolean(); - }); - def(AST_Assign, function() { - return this.operator == "=" && this.right.is_boolean(); - }); - def(AST_Seq, function() { - return this.cdr.is_boolean(); - }); - def(AST_True, function() { - return true; - }); - def(AST_False, function() { - return true; - }); - })(function(node, func) { - node.DEFMETHOD("is_boolean", func); - }); - (function(def) { - def(AST_Node, function() { - return false; - }); - def(AST_String, function() { - return true; - }); - def(AST_UnaryPrefix, function() { - return this.operator == "typeof"; - }); - def(AST_Binary, function(compressor) { - return this.operator == "+" && (this.left.is_string(compressor) || this.right.is_string(compressor)); - }); - def(AST_Assign, function(compressor) { - return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor); - }); - def(AST_Seq, function(compressor) { - return this.cdr.is_string(compressor); - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); - }); - def(AST_Call, function(compressor) { - return compressor.option("unsafe") && this.expression instanceof AST_SymbolRef && this.expression.name == "String" && this.expression.undeclared(); - }); - })(function(node, func) { - node.DEFMETHOD("is_string", func); - }); - function best_of(ast1, ast2) { - return ast1.print_to_string().length > ast2.print_to_string().length ? ast2 : ast1; - } - (function(def) { - AST_Node.DEFMETHOD("evaluate", function(compressor) { - if (!compressor.option("evaluate")) return [ this ]; - try { - var val = this._eval(), ast = make_node_from_constant(compressor, val, this); - return [ best_of(ast, this), val ]; - } catch (ex) { - if (ex !== def) throw ex; - return [ this ]; - } - }); - def(AST_Statement, function() { - throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); - }); - def(AST_Function, function() { - throw def; - }); - function ev(node) { - return node._eval(); - } - def(AST_Node, function() { - throw def; - }); - def(AST_Constant, function() { - return this.getValue(); - }); - def(AST_UnaryPrefix, function() { - var e = this.expression; - switch (this.operator) { - case "!": - return !ev(e); - - case "typeof": - if (e instanceof AST_Function) return typeof function() {}; - e = ev(e); - if (e instanceof RegExp) throw def; - return typeof e; - - case "void": - return void ev(e); - - case "~": - return ~ev(e); - - case "-": - e = ev(e); - if (e === 0) throw def; - return -e; - - case "+": - return +ev(e); - } - throw def; - }); - def(AST_Binary, function() { - var left = this.left, right = this.right; - switch (this.operator) { - case "&&": - return ev(left) && ev(right); - - case "||": - return ev(left) || ev(right); - - case "|": - return ev(left) | ev(right); - - case "&": - return ev(left) & ev(right); - - case "^": - return ev(left) ^ ev(right); - - case "+": - return ev(left) + ev(right); - - case "*": - return ev(left) * ev(right); - - case "/": - return ev(left) / ev(right); - - case "%": - return ev(left) % ev(right); - - case "-": - return ev(left) - ev(right); - - case "<<": - return ev(left) << ev(right); - - case ">>": - return ev(left) >> ev(right); - - case ">>>": - return ev(left) >>> ev(right); - - case "==": - return ev(left) == ev(right); - - case "===": - return ev(left) === ev(right); - - case "!=": - return ev(left) != ev(right); - - case "!==": - return ev(left) !== ev(right); - - case "<": - return ev(left) < ev(right); - - case "<=": - return ev(left) <= ev(right); - - case ">": - return ev(left) > ev(right); - - case ">=": - return ev(left) >= ev(right); - - case "in": - return ev(left) in ev(right); - - case "instanceof": - return ev(left) instanceof ev(right); - } - throw def; - }); - def(AST_Conditional, function() { - return ev(this.condition) ? ev(this.consequent) : ev(this.alternative); - }); - def(AST_SymbolRef, function() { - var d = this.definition(); - if (d && d.constant && d.init) return ev(d.init); - throw def; - }); - })(function(node, func) { - node.DEFMETHOD("_eval", func); - }); - (function(def) { - function basic_negation(exp) { - return make_node(AST_UnaryPrefix, exp, { - operator: "!", - expression: exp - }); - } - def(AST_Node, function() { - return basic_negation(this); - }); - def(AST_Statement, function() { - throw new Error("Cannot negate a statement"); - }); - def(AST_Function, function() { - return basic_negation(this); - }); - def(AST_UnaryPrefix, function() { - if (this.operator == "!") return this.expression; - return basic_negation(this); - }); - def(AST_Seq, function(compressor) { - var self = this.clone(); - self.cdr = self.cdr.negate(compressor); - return self; - }); - def(AST_Conditional, function(compressor) { - var self = this.clone(); - self.consequent = self.consequent.negate(compressor); - self.alternative = self.alternative.negate(compressor); - return best_of(basic_negation(this), self); - }); - def(AST_Binary, function(compressor) { - var self = this.clone(), op = this.operator; - if (compressor.option("unsafe_comps")) { - switch (op) { - case "<=": - self.operator = ">"; - return self; - - case "<": - self.operator = ">="; - return self; - - case ">=": - self.operator = "<"; - return self; - - case ">": - self.operator = "<="; - return self; - } - } - switch (op) { - case "==": - self.operator = "!="; - return self; - - case "!=": - self.operator = "=="; - return self; - - case "===": - self.operator = "!=="; - return self; - - case "!==": - self.operator = "==="; - return self; - - case "&&": - self.operator = "||"; - self.left = self.left.negate(compressor); - self.right = self.right.negate(compressor); - return best_of(basic_negation(this), self); - - case "||": - self.operator = "&&"; - self.left = self.left.negate(compressor); - self.right = self.right.negate(compressor); - return best_of(basic_negation(this), self); - } - return basic_negation(this); - }); - })(function(node, func) { - node.DEFMETHOD("negate", function(compressor) { - return func.call(this, compressor); - }); - }); - (function(def) { - def(AST_Node, function() { - return true; - }); - def(AST_EmptyStatement, function() { - return false; - }); - def(AST_Constant, function() { - return false; - }); - def(AST_This, function() { - return false; - }); - def(AST_Block, function() { - for (var i = this.body.length; --i >= 0; ) { - if (this.body[i].has_side_effects()) return true; - } - return false; - }); - def(AST_SimpleStatement, function() { - return this.body.has_side_effects(); - }); - def(AST_Defun, function() { - return true; - }); - def(AST_Function, function() { - return false; - }); - def(AST_Binary, function() { - return this.left.has_side_effects() || this.right.has_side_effects(); - }); - def(AST_Assign, function() { - return true; - }); - def(AST_Conditional, function() { - return this.condition.has_side_effects() || this.consequent.has_side_effects() || this.alternative.has_side_effects(); - }); - def(AST_Unary, function() { - return this.operator == "delete" || this.operator == "++" || this.operator == "--" || this.expression.has_side_effects(); - }); - def(AST_SymbolRef, function() { - return false; - }); - def(AST_Object, function() { - for (var i = this.properties.length; --i >= 0; ) if (this.properties[i].has_side_effects()) return true; - return false; - }); - def(AST_ObjectProperty, function() { - return this.value.has_side_effects(); - }); - def(AST_Array, function() { - for (var i = this.elements.length; --i >= 0; ) if (this.elements[i].has_side_effects()) return true; - return false; - }); - def(AST_PropAccess, function() { - return true; - }); - def(AST_Seq, function() { - return this.car.has_side_effects() || this.cdr.has_side_effects(); - }); - })(function(node, func) { - node.DEFMETHOD("has_side_effects", func); - }); - function aborts(thing) { - return thing && thing.aborts(); - } - (function(def) { - def(AST_Statement, function() { - return null; - }); - def(AST_Jump, function() { - return this; - }); - function block_aborts() { - var n = this.body.length; - return n > 0 && aborts(this.body[n - 1]); - } - def(AST_BlockStatement, block_aborts); - def(AST_SwitchBranch, block_aborts); - def(AST_If, function() { - return this.alternative && aborts(this.body) && aborts(this.alternative); - }); - })(function(node, func) { - node.DEFMETHOD("aborts", func); - }); - OPT(AST_Directive, function(self, compressor) { - if (self.scope.has_directive(self.value) !== self.scope) { - return make_node(AST_EmptyStatement, self); - } - return self; - }); - OPT(AST_Debugger, function(self, compressor) { - if (compressor.option("drop_debugger")) return make_node(AST_EmptyStatement, self); - return self; - }); - OPT(AST_LabeledStatement, function(self, compressor) { - if (self.body instanceof AST_Break && compressor.loopcontrol_target(self.body.label) === self.body) { - return make_node(AST_EmptyStatement, self); - } - return self.label.references.length == 0 ? self.body : self; - }); - OPT(AST_Block, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return self; - }); - OPT(AST_BlockStatement, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - switch (self.body.length) { - case 1: - return self.body[0]; - - case 0: - return make_node(AST_EmptyStatement, self); - } - return self; - }); - AST_Scope.DEFMETHOD("drop_unused", function(compressor) { - var self = this; - if (compressor.option("unused") && !(self instanceof AST_Toplevel) && !self.uses_eval) { - var in_use = []; - var initializations = new Dictionary(); - var scope = this; - var tw = new TreeWalker(function(node, descend) { - if (node !== self) { - if (node instanceof AST_Defun) { - initializations.add(node.name.name, node); - return true; - } - if (node instanceof AST_Definitions && scope === self) { - node.definitions.forEach(function(def) { - if (def.value) { - initializations.add(def.name.name, def.value); - if (def.value.has_side_effects()) { - def.value.walk(tw); - } - } - }); - return true; - } - if (node instanceof AST_SymbolRef) { - push_uniq(in_use, node.definition()); - return true; - } - if (node instanceof AST_Scope) { - var save_scope = scope; - scope = node; - descend(); - scope = save_scope; - return true; - } - } - }); - self.walk(tw); - for (var i = 0; i < in_use.length; ++i) { - in_use[i].orig.forEach(function(decl) { - var init = initializations.get(decl.name); - if (init) init.forEach(function(init) { - var tw = new TreeWalker(function(node) { - if (node instanceof AST_SymbolRef) { - push_uniq(in_use, node.definition()); - } - }); - init.walk(tw); - }); - }); - } - var tt = new TreeTransformer(function before(node, descend, in_list) { - if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) { - for (var a = node.argnames, i = a.length; --i >= 0; ) { - var sym = a[i]; - if (sym.unreferenced()) { - a.pop(); - compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", { - name: sym.name, - file: sym.start.file, - line: sym.start.line, - col: sym.start.col - }); - } else break; - } - } - if (node instanceof AST_Defun && node !== self) { - if (!member(node.name.definition(), in_use)) { - compressor.warn("Dropping unused function {name} [{file}:{line},{col}]", { - name: node.name.name, - file: node.name.start.file, - line: node.name.start.line, - col: node.name.start.col - }); - return make_node(AST_EmptyStatement, node); - } - return node; - } - if (node instanceof AST_Definitions && !(tt.parent() instanceof AST_ForIn)) { - var def = node.definitions.filter(function(def) { - if (member(def.name.definition(), in_use)) return true; - var w = { - name: def.name.name, - file: def.name.start.file, - line: def.name.start.line, - col: def.name.start.col - }; - if (def.value && def.value.has_side_effects()) { - def._unused_side_effects = true; - compressor.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", w); - return true; - } - compressor.warn("Dropping unused variable {name} [{file}:{line},{col}]", w); - return false; - }); - def = mergeSort(def, function(a, b) { - if (!a.value && b.value) return -1; - if (!b.value && a.value) return 1; - return 0; - }); - var side_effects = []; - for (var i = 0; i < def.length; ) { - var x = def[i]; - if (x._unused_side_effects) { - side_effects.push(x.value); - def.splice(i, 1); - } else { - if (side_effects.length > 0) { - side_effects.push(x.value); - x.value = AST_Seq.from_array(side_effects); - side_effects = []; - } - ++i; - } - } - if (side_effects.length > 0) { - side_effects = make_node(AST_BlockStatement, node, { - body: [ make_node(AST_SimpleStatement, node, { - body: AST_Seq.from_array(side_effects) - }) ] - }); - } else { - side_effects = null; - } - if (def.length == 0 && !side_effects) { - return make_node(AST_EmptyStatement, node); - } - if (def.length == 0) { - return side_effects; - } - node.definitions = def; - if (side_effects) { - side_effects.body.unshift(node); - node = side_effects; - } - return node; - } - if (node instanceof AST_For && node.init instanceof AST_BlockStatement) { - descend(node, this); - var body = node.init.body.slice(0, -1); - node.init = node.init.body.slice(-1)[0].body; - body.push(node); - return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { - body: body - }); - } - if (node instanceof AST_Scope && node !== self) return node; - }); - self.transform(tt); - } - }); - AST_Scope.DEFMETHOD("hoist_declarations", function(compressor) { - var hoist_funs = compressor.option("hoist_funs"); - var hoist_vars = compressor.option("hoist_vars"); - var self = this; - if (hoist_funs || hoist_vars) { - var dirs = []; - var hoisted = []; - var vars = new Dictionary(), vars_found = 0, var_decl = 0; - self.walk(new TreeWalker(function(node) { - if (node instanceof AST_Scope && node !== self) return true; - if (node instanceof AST_Var) { - ++var_decl; - return true; - } - })); - hoist_vars = hoist_vars && var_decl > 1; - var tt = new TreeTransformer(function before(node) { - if (node !== self) { - if (node instanceof AST_Directive) { - dirs.push(node); - return make_node(AST_EmptyStatement, node); - } - if (node instanceof AST_Defun && hoist_funs) { - hoisted.push(node); - return make_node(AST_EmptyStatement, node); - } - if (node instanceof AST_Var && hoist_vars) { - node.definitions.forEach(function(def) { - vars.set(def.name.name, def); - ++vars_found; - }); - var seq = node.to_assignments(); - var p = tt.parent(); - if (p instanceof AST_ForIn && p.init === node) { - if (seq == null) return node.definitions[0].name; - return seq; - } - if (p instanceof AST_For && p.init === node) { - return seq; - } - if (!seq) return make_node(AST_EmptyStatement, node); - return make_node(AST_SimpleStatement, node, { - body: seq - }); - } - if (node instanceof AST_Scope) return node; - } - }); - self = self.transform(tt); - if (vars_found > 0) { - var defs = []; - vars.each(function(def, name) { - if (self instanceof AST_Lambda && find_if(function(x) { - return x.name == def.name.name; - }, self.argnames)) { - vars.del(name); - } else { - def = def.clone(); - def.value = null; - defs.push(def); - vars.set(name, def); - } - }); - if (defs.length > 0) { - for (var i = 0; i < self.body.length; ) { - if (self.body[i] instanceof AST_SimpleStatement) { - var expr = self.body[i].body, sym, assign; - if (expr instanceof AST_Assign && expr.operator == "=" && (sym = expr.left) instanceof AST_Symbol && vars.has(sym.name)) { - var def = vars.get(sym.name); - if (def.value) break; - def.value = expr.right; - remove(defs, def); - defs.push(def); - self.body.splice(i, 1); - continue; - } - if (expr instanceof AST_Seq && (assign = expr.car) instanceof AST_Assign && assign.operator == "=" && (sym = assign.left) instanceof AST_Symbol && vars.has(sym.name)) { - var def = vars.get(sym.name); - if (def.value) break; - def.value = assign.right; - remove(defs, def); - defs.push(def); - self.body[i].body = expr.cdr; - continue; - } - } - if (self.body[i] instanceof AST_EmptyStatement) { - self.body.splice(i, 1); - continue; - } - if (self.body[i] instanceof AST_BlockStatement) { - var tmp = [ i, 1 ].concat(self.body[i].body); - self.body.splice.apply(self.body, tmp); - continue; - } - break; - } - defs = make_node(AST_Var, self, { - definitions: defs - }); - hoisted.push(defs); - } - } - self.body = dirs.concat(hoisted, self.body); - } - return self; - }); - OPT(AST_SimpleStatement, function(self, compressor) { - if (compressor.option("side_effects")) { - if (!self.body.has_side_effects()) { - compressor.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); - return make_node(AST_EmptyStatement, self); - } - } - return self; - }); - OPT(AST_DWLoop, function(self, compressor) { - var cond = self.condition.evaluate(compressor); - self.condition = cond[0]; - if (!compressor.option("loops")) return self; - if (cond.length > 1) { - if (cond[1]) { - return make_node(AST_For, self, { - body: self.body - }); - } else if (self instanceof AST_While) { - if (compressor.option("dead_code")) { - var a = []; - extract_declarations_from_unreachable_code(compressor, self.body, a); - return make_node(AST_BlockStatement, self, { - body: a - }); - } - } - } - return self; - }); - function if_break_in_loop(self, compressor) { - function drop_it(rest) { - rest = as_statement_array(rest); - if (self.body instanceof AST_BlockStatement) { - self.body = self.body.clone(); - self.body.body = rest.concat(self.body.body.slice(1)); - self.body = self.body.transform(compressor); - } else { - self.body = make_node(AST_BlockStatement, self.body, { - body: rest - }).transform(compressor); - } - if_break_in_loop(self, compressor); - } - var first = self.body instanceof AST_BlockStatement ? self.body.body[0] : self.body; - if (first instanceof AST_If) { - if (first.body instanceof AST_Break && compressor.loopcontrol_target(first.body.label) === self) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition.negate(compressor) - }); - } else { - self.condition = first.condition.negate(compressor); - } - drop_it(first.alternative); - } else if (first.alternative instanceof AST_Break && compressor.loopcontrol_target(first.alternative.label) === self) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition - }); - } else { - self.condition = first.condition; - } - drop_it(first.body); - } - } - } - OPT(AST_While, function(self, compressor) { - if (!compressor.option("loops")) return self; - self = AST_DWLoop.prototype.optimize.call(self, compressor); - if (self instanceof AST_While) { - if_break_in_loop(self, compressor); - self = make_node(AST_For, self, self).transform(compressor); - } - return self; - }); - OPT(AST_For, function(self, compressor) { - var cond = self.condition; - if (cond) { - cond = cond.evaluate(compressor); - self.condition = cond[0]; - } - if (!compressor.option("loops")) return self; - if (cond) { - if (cond.length > 1 && !cond[1]) { - if (compressor.option("dead_code")) { - var a = []; - if (self.init instanceof AST_Statement) { - a.push(self.init); - } else if (self.init) { - a.push(make_node(AST_SimpleStatement, self.init, { - body: self.init - })); - } - extract_declarations_from_unreachable_code(compressor, self.body, a); - return make_node(AST_BlockStatement, self, { - body: a - }); - } - } - } - if_break_in_loop(self, compressor); - return self; - }); - OPT(AST_If, function(self, compressor) { - if (!compressor.option("conditionals")) return self; - var cond = self.condition.evaluate(compressor); - self.condition = cond[0]; - if (cond.length > 1) { - if (cond[1]) { - compressor.warn("Condition always true [{file}:{line},{col}]", self.condition.start); - if (compressor.option("dead_code")) { - var a = []; - if (self.alternative) { - extract_declarations_from_unreachable_code(compressor, self.alternative, a); - } - a.push(self.body); - return make_node(AST_BlockStatement, self, { - body: a - }).transform(compressor); - } - } else { - compressor.warn("Condition always false [{file}:{line},{col}]", self.condition.start); - if (compressor.option("dead_code")) { - var a = []; - extract_declarations_from_unreachable_code(compressor, self.body, a); - if (self.alternative) a.push(self.alternative); - return make_node(AST_BlockStatement, self, { - body: a - }).transform(compressor); - } - } - } - if (is_empty(self.alternative)) self.alternative = null; - var negated = self.condition.negate(compressor); - var negated_is_best = best_of(self.condition, negated) === negated; - if (self.alternative && negated_is_best) { - negated_is_best = false; - self.condition = negated; - var tmp = self.body; - self.body = self.alternative || make_node(AST_EmptyStatement); - self.alternative = tmp; - } - if (is_empty(self.body) && is_empty(self.alternative)) { - return make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }).transform(compressor); - } - if (self.body instanceof AST_SimpleStatement && self.alternative instanceof AST_SimpleStatement) { - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Conditional, self, { - condition: self.condition, - consequent: self.body.body, - alternative: self.alternative.body - }) - }).transform(compressor); - } - if (is_empty(self.alternative) && self.body instanceof AST_SimpleStatement) { - if (negated_is_best) return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator: "||", - left: negated, - right: self.body.body - }) - }).transform(compressor); - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator: "&&", - left: self.condition, - right: self.body.body - }) - }).transform(compressor); - } - if (self.body instanceof AST_EmptyStatement && self.alternative && self.alternative instanceof AST_SimpleStatement) { - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator: "||", - left: self.condition, - right: self.alternative.body - }) - }).transform(compressor); - } - if (self.body instanceof AST_Exit && self.alternative instanceof AST_Exit && self.body.TYPE == self.alternative.TYPE) { - return make_node(self.body.CTOR, self, { - value: make_node(AST_Conditional, self, { - condition: self.condition, - consequent: self.body.value || make_node(AST_Undefined, self.body).optimize(compressor), - alternative: self.alternative.value || make_node(AST_Undefined, self.alternative).optimize(compressor) - }) - }).transform(compressor); - } - if (self.body instanceof AST_If && !self.body.alternative && !self.alternative) { - self.condition = make_node(AST_Binary, self.condition, { - operator: "&&", - left: self.condition, - right: self.body.condition - }).transform(compressor); - self.body = self.body.body; - } - if (aborts(self.body)) { - if (self.alternative) { - var alt = self.alternative; - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, alt ] - }).transform(compressor); - } - } - if (aborts(self.alternative)) { - var body = self.body; - self.body = self.alternative; - self.condition = negated_is_best ? negated : self.condition.negate(compressor); - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, body ] - }).transform(compressor); - } - return self; - }); - OPT(AST_Switch, function(self, compressor) { - if (self.body.length == 0 && compressor.option("conditionals")) { - return make_node(AST_SimpleStatement, self, { - body: self.expression - }).transform(compressor); - } - for (;;) { - var last_branch = self.body[self.body.length - 1]; - if (last_branch) { - var stat = last_branch.body[last_branch.body.length - 1]; - if (stat instanceof AST_Break && loop_body(compressor.loopcontrol_target(stat.label)) === self) last_branch.body.pop(); - if (last_branch instanceof AST_Default && last_branch.body.length == 0) { - self.body.pop(); - continue; - } - } - break; - } - var exp = self.expression.evaluate(compressor); - out: if (exp.length == 2) try { - self.expression = exp[0]; - if (!compressor.option("dead_code")) break out; - var value = exp[1]; - var in_if = false; - var in_block = false; - var started = false; - var stopped = false; - var ruined = false; - var tt = new TreeTransformer(function(node, descend, in_list) { - if (node instanceof AST_Lambda || node instanceof AST_SimpleStatement) { - return node; - } else if (node instanceof AST_Switch && node === self) { - node = node.clone(); - descend(node, this); - return ruined ? node : make_node(AST_BlockStatement, node, { - body: node.body.reduce(function(a, branch) { - return a.concat(branch.body); - }, []) - }).transform(compressor); - } else if (node instanceof AST_If || node instanceof AST_Try) { - var save = in_if; - in_if = !in_block; - descend(node, this); - in_if = save; - return node; - } else if (node instanceof AST_StatementWithBody || node instanceof AST_Switch) { - var save = in_block; - in_block = true; - descend(node, this); - in_block = save; - return node; - } else if (node instanceof AST_Break && this.loopcontrol_target(node.label) === self) { - if (in_if) { - ruined = true; - return node; - } - if (in_block) return node; - stopped = true; - return in_list ? MAP.skip : make_node(AST_EmptyStatement, node); - } else if (node instanceof AST_SwitchBranch && this.parent() === self) { - if (stopped) return MAP.skip; - if (node instanceof AST_Case) { - var exp = node.expression.evaluate(compressor); - if (exp.length < 2) { - throw self; - } - if (exp[1] === value || started) { - started = true; - if (aborts(node)) stopped = true; - descend(node, this); - return node; - } - return MAP.skip; - } - descend(node, this); - return node; - } - }); - tt.stack = compressor.stack.slice(); - self = self.transform(tt); - } catch (ex) { - if (ex !== self) throw ex; - } - return self; - }); - OPT(AST_Case, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return self; - }); - OPT(AST_Try, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return self; - }); - AST_Definitions.DEFMETHOD("remove_initializers", function() { - this.definitions.forEach(function(def) { - def.value = null; - }); - }); - AST_Definitions.DEFMETHOD("to_assignments", function() { - var assignments = this.definitions.reduce(function(a, def) { - if (def.value) { - var name = make_node(AST_SymbolRef, def.name, def.name); - a.push(make_node(AST_Assign, def, { - operator: "=", - left: name, - right: def.value - })); - } - return a; - }, []); - if (assignments.length == 0) return null; - return AST_Seq.from_array(assignments); - }); - OPT(AST_Definitions, function(self, compressor) { - if (self.definitions.length == 0) return make_node(AST_EmptyStatement, self); - return self; - }); - OPT(AST_Function, function(self, compressor) { - self = AST_Lambda.prototype.optimize.call(self, compressor); - if (compressor.option("unused")) { - if (self.name && self.name.unreferenced()) { - self.name = null; - } - } - return self; - }); - OPT(AST_Call, function(self, compressor) { - if (compressor.option("unsafe")) { - var exp = self.expression; - if (exp instanceof AST_SymbolRef && exp.undeclared()) { - switch (exp.name) { - case "Array": - if (self.args.length != 1) { - return make_node(AST_Array, self, { - elements: self.args - }); - } - break; - - case "Object": - if (self.args.length == 0) { - return make_node(AST_Object, self, { - properties: [] - }); - } - break; - - case "String": - if (self.args.length == 0) return make_node(AST_String, self, { - value: "" - }); - return make_node(AST_Binary, self, { - left: self.args[0], - operator: "+", - right: make_node(AST_String, self, { - value: "" - }) - }); - - case "Function": - if (all(self.args, function(x) { - return x instanceof AST_String; - })) { - try { - var code = "(function(" + self.args.slice(0, -1).map(function(arg) { - return arg.value; - }).join(",") + "){" + self.args[self.args.length - 1].value + "})()"; - var ast = parse(code); - ast.figure_out_scope(); - var comp = new Compressor(compressor.options); - ast = ast.transform(comp); - ast.figure_out_scope(); - ast.mangle_names(); - var fun = ast.body[0].body.expression; - var args = fun.argnames.map(function(arg, i) { - return make_node(AST_String, self.args[i], { - value: arg.print_to_string() - }); - }); - var code = OutputStream(); - AST_BlockStatement.prototype._codegen.call(fun, fun, code); - code = code.toString().replace(/^\{|\}$/g, ""); - args.push(make_node(AST_String, self.args[self.args.length - 1], { - value: code - })); - self.args = args; - return self; - } catch (ex) { - if (ex instanceof JS_Parse_Error) { - compressor.warn("Error parsing code passed to new Function [{file}:{line},{col}]", self.args[self.args.length - 1].start); - compressor.warn(ex.toString()); - } else { - console.log(ex); - } - } - } - break; - } - } else if (exp instanceof AST_Dot && exp.property == "toString" && self.args.length == 0) { - return make_node(AST_Binary, self, { - left: make_node(AST_String, self, { - value: "" - }), - operator: "+", - right: exp.expression - }).transform(compressor); - } - } - if (compressor.option("side_effects")) { - if (self.expression instanceof AST_Function && self.args.length == 0 && !AST_Block.prototype.has_side_effects.call(self.expression)) { - return make_node(AST_Undefined, self).transform(compressor); - } - } - return self; - }); - OPT(AST_New, function(self, compressor) { - if (compressor.option("unsafe")) { - var exp = self.expression; - if (exp instanceof AST_SymbolRef && exp.undeclared()) { - switch (exp.name) { - case "Object": - case "RegExp": - case "Function": - case "Error": - case "Array": - return make_node(AST_Call, self, self).transform(compressor); - } - } - } - return self; - }); - OPT(AST_Seq, function(self, compressor) { - if (!compressor.option("side_effects")) return self; - if (!self.car.has_side_effects()) { - var p; - if (!(self.cdr instanceof AST_SymbolRef && self.cdr.name == "eval" && self.cdr.undeclared() && (p = compressor.parent()) instanceof AST_Call && p.expression === self)) { - return self.cdr; - } - } - if (compressor.option("cascade")) { - if (self.car instanceof AST_Assign && !self.car.left.has_side_effects() && self.car.left.equivalent_to(self.cdr)) { - return self.car; - } - if (!self.car.has_side_effects() && !self.cdr.has_side_effects() && self.car.equivalent_to(self.cdr)) { - return self.car; - } - } - return self; - }); - AST_Unary.DEFMETHOD("lift_sequences", function(compressor) { - if (compressor.option("sequences")) { - if (this.expression instanceof AST_Seq) { - var seq = this.expression; - var x = seq.to_array(); - this.expression = x.pop(); - x.push(this); - seq = AST_Seq.from_array(x).transform(compressor); - return seq; - } - } - return this; - }); - OPT(AST_UnaryPostfix, function(self, compressor) { - return self.lift_sequences(compressor); - }); - OPT(AST_UnaryPrefix, function(self, compressor) { - self = self.lift_sequences(compressor); - var e = self.expression; - if (compressor.option("booleans") && compressor.in_boolean_context()) { - switch (self.operator) { - case "!": - if (e instanceof AST_UnaryPrefix && e.operator == "!") { - return e.expression; - } - break; - - case "typeof": - compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start); - return make_node(AST_True, self); - } - if (e instanceof AST_Binary && self.operator == "!") { - self = best_of(self, e.negate(compressor)); - } - } - return self.evaluate(compressor)[0]; - }); - AST_Binary.DEFMETHOD("lift_sequences", function(compressor) { - if (compressor.option("sequences")) { - if (this.left instanceof AST_Seq) { - var seq = this.left; - var x = seq.to_array(); - this.left = x.pop(); - x.push(this); - seq = AST_Seq.from_array(x).transform(compressor); - return seq; - } - if (this.right instanceof AST_Seq && !(this.operator == "||" || this.operator == "&&") && !this.left.has_side_effects()) { - var seq = this.right; - var x = seq.to_array(); - this.right = x.pop(); - x.push(this); - seq = AST_Seq.from_array(x).transform(compressor); - return seq; - } - } - return this; - }); - var commutativeOperators = makePredicate("== === != !== * & | ^"); - OPT(AST_Binary, function(self, compressor) { - var reverse = compressor.has_directive("use asm") ? noop : function(op, force) { - if (force || !(self.left.has_side_effects() || self.right.has_side_effects())) { - if (op) self.operator = op; - var tmp = self.left; - self.left = self.right; - self.right = tmp; - } - }; - if (commutativeOperators(self.operator)) { - if (self.right instanceof AST_Constant && !(self.left instanceof AST_Constant)) { - reverse(null, true); - } - } - self = self.lift_sequences(compressor); - if (compressor.option("comparisons")) switch (self.operator) { - case "===": - case "!==": - if (self.left.is_string(compressor) && self.right.is_string(compressor) || self.left.is_boolean() && self.right.is_boolean()) { - self.operator = self.operator.substr(0, 2); - } - - case "==": - case "!=": - if (self.left instanceof AST_String && self.left.value == "undefined" && self.right instanceof AST_UnaryPrefix && self.right.operator == "typeof" && compressor.option("unsafe")) { - if (!(self.right.expression instanceof AST_SymbolRef) || !self.right.expression.undeclared()) { - self.right = self.right.expression; - self.left = make_node(AST_Undefined, self.left).optimize(compressor); - if (self.operator.length == 2) self.operator += "="; - } - } - break; - } - if (compressor.option("booleans") && compressor.in_boolean_context()) switch (self.operator) { - case "&&": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll.length > 1 && !ll[1] || rr.length > 1 && !rr[1]) { - compressor.warn("Boolean && always false [{file}:{line},{col}]", self.start); - return make_node(AST_False, self); - } - if (ll.length > 1 && ll[1]) { - return rr[0]; - } - if (rr.length > 1 && rr[1]) { - return ll[0]; - } - break; - - case "||": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll.length > 1 && ll[1] || rr.length > 1 && rr[1]) { - compressor.warn("Boolean || always true [{file}:{line},{col}]", self.start); - return make_node(AST_True, self); - } - if (ll.length > 1 && !ll[1]) { - return rr[0]; - } - if (rr.length > 1 && !rr[1]) { - return ll[0]; - } - break; - - case "+": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll.length > 1 && ll[0] instanceof AST_String && ll[1] || rr.length > 1 && rr[0] instanceof AST_String && rr[1]) { - compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); - return make_node(AST_True, self); - } - break; - } - var exp = self.evaluate(compressor); - if (exp.length > 1) { - if (best_of(exp[0], self) !== self) return exp[0]; - } - if (compressor.option("comparisons")) { - if (!(compressor.parent() instanceof AST_Binary) || compressor.parent() instanceof AST_Assign) { - var negated = make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.negate(compressor) - }); - self = best_of(self, negated); - } - switch (self.operator) { - case "<": - reverse(">"); - break; - - case "<=": - reverse(">="); - break; - } - } - if (self.operator == "+" && self.right instanceof AST_String && self.right.getValue() === "" && self.left instanceof AST_Binary && self.left.operator == "+" && self.left.is_string(compressor)) { - return self.left; - } - return self; - }); - OPT(AST_SymbolRef, function(self, compressor) { - if (self.undeclared()) { - var defines = compressor.option("global_defs"); - if (defines && defines.hasOwnProperty(self.name)) { - return make_node_from_constant(compressor, defines[self.name], self); - } - switch (self.name) { - case "undefined": - return make_node(AST_Undefined, self); - - case "NaN": - return make_node(AST_NaN, self); - - case "Infinity": - return make_node(AST_Infinity, self); - } - } - return self; - }); - OPT(AST_Undefined, function(self, compressor) { - if (compressor.option("unsafe")) { - var scope = compressor.find_parent(AST_Scope); - var undef = scope.find_variable("undefined"); - if (undef) { - var ref = make_node(AST_SymbolRef, self, { - name: "undefined", - scope: scope, - thedef: undef - }); - ref.reference(); - return ref; - } - } - return self; - }); - var ASSIGN_OPS = [ "+", "-", "/", "*", "%", ">>", "<<", ">>>", "|", "^", "&" ]; - OPT(AST_Assign, function(self, compressor) { - self = self.lift_sequences(compressor); - if (self.operator == "=" && self.left instanceof AST_SymbolRef && self.right instanceof AST_Binary && self.right.left instanceof AST_SymbolRef && self.right.left.name == self.left.name && member(self.right.operator, ASSIGN_OPS)) { - self.operator = self.right.operator + "="; - self.right = self.right.right; - } - return self; - }); - OPT(AST_Conditional, function(self, compressor) { - if (!compressor.option("conditionals")) return self; - if (self.condition instanceof AST_Seq) { - var car = self.condition.car; - self.condition = self.condition.cdr; - return AST_Seq.cons(car, self); - } - var cond = self.condition.evaluate(compressor); - if (cond.length > 1) { - if (cond[1]) { - compressor.warn("Condition always true [{file}:{line},{col}]", self.start); - return self.consequent; - } else { - compressor.warn("Condition always false [{file}:{line},{col}]", self.start); - return self.alternative; - } - } - var negated = cond[0].negate(compressor); - if (best_of(cond[0], negated) === negated) { - self = make_node(AST_Conditional, self, { - condition: negated, - consequent: self.alternative, - alternative: self.consequent - }); - } - var consequent = self.consequent; - var alternative = self.alternative; - if (consequent instanceof AST_Assign && alternative instanceof AST_Assign && consequent.operator == alternative.operator && consequent.left.equivalent_to(alternative.left)) { - self = make_node(AST_Assign, self, { - operator: consequent.operator, - left: consequent.left, - right: make_node(AST_Conditional, self, { - condition: self.condition, - consequent: consequent.right, - alternative: alternative.right - }) - }); - } - return self; - }); - OPT(AST_Boolean, function(self, compressor) { - if (compressor.option("booleans")) { - var p = compressor.parent(); - if (p instanceof AST_Binary && (p.operator == "==" || p.operator == "!=")) { - compressor.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { - operator: p.operator, - value: self.value, - file: p.start.file, - line: p.start.line, - col: p.start.col - }); - return make_node(AST_Number, self, { - value: +self.value - }); - } - return make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: make_node(AST_Number, self, { - value: 1 - self.value - }) - }); - } - return self; - }); - OPT(AST_Sub, function(self, compressor) { - var prop = self.property; - if (prop instanceof AST_String && compressor.option("properties")) { - prop = prop.getValue(); - if (RESERVED_WORDS(prop) ? compressor.option("screw_ie8") : is_identifier_string(prop)) { - return make_node(AST_Dot, self, { - expression: self.expression, - property: prop - }); - } - } - return self; - }); - function literals_in_boolean_context(self, compressor) { - if (compressor.option("booleans") && compressor.in_boolean_context()) { - return make_node(AST_True, self); - } - return self; - } - OPT(AST_Array, literals_in_boolean_context); - OPT(AST_Object, literals_in_boolean_context); - OPT(AST_RegExp, literals_in_boolean_context); - })(); - "use strict"; - function SourceMap(options) { - options = defaults(options, { - file: null, - root: null, - orig: null - }); - var generator = new MOZ_SourceMap.SourceMapGenerator({ - file: options.file, - sourceRoot: options.root - }); - var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); - function add(source, gen_line, gen_col, orig_line, orig_col, name) { - if (orig_map) { - var info = orig_map.originalPositionFor({ - line: orig_line, - column: orig_col - }); - source = info.source; - orig_line = info.line; - orig_col = info.column; - name = info.name; - } - generator.addMapping({ - generated: { - line: gen_line, - column: gen_col - }, - original: { - line: orig_line, - column: orig_col - }, - source: source, - name: name - }); - } - return { - add: add, - get: function() { - return generator; - }, - toString: function() { - return generator.toString(); - } - }; - } - "use strict"; - (function() { - var MOZ_TO_ME = { - TryStatement: function(M) { - return new AST_Try({ - start: my_start_token(M), - end: my_end_token(M), - body: from_moz(M.block).body, - bcatch: from_moz(M.handlers[0]), - bfinally: M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null - }); - }, - CatchClause: function(M) { - return new AST_Catch({ - start: my_start_token(M), - end: my_end_token(M), - argname: from_moz(M.param), - body: from_moz(M.body).body - }); - }, - ObjectExpression: function(M) { - return new AST_Object({ - start: my_start_token(M), - end: my_end_token(M), - properties: M.properties.map(function(prop) { - var key = prop.key; - var name = key.type == "Identifier" ? key.name : key.value; - var args = { - start: my_start_token(key), - end: my_end_token(prop.value), - key: name, - value: from_moz(prop.value) - }; - switch (prop.kind) { - case "init": - return new AST_ObjectKeyVal(args); - - case "set": - args.value.name = from_moz(key); - return new AST_ObjectSetter(args); - - case "get": - args.value.name = from_moz(key); - return new AST_ObjectGetter(args); - } - }) - }); - }, - SequenceExpression: function(M) { - return AST_Seq.from_array(M.expressions.map(from_moz)); - }, - MemberExpression: function(M) { - return new (M.computed ? AST_Sub : AST_Dot)({ - start: my_start_token(M), - end: my_end_token(M), - property: M.computed ? from_moz(M.property) : M.property.name, - expression: from_moz(M.object) - }); - }, - SwitchCase: function(M) { - return new (M.test ? AST_Case : AST_Default)({ - start: my_start_token(M), - end: my_end_token(M), - expression: from_moz(M.test), - body: M.consequent.map(from_moz) - }); - }, - Literal: function(M) { - var val = M.value, args = { - start: my_start_token(M), - end: my_end_token(M) - }; - if (val === null) return new AST_Null(args); - switch (typeof val) { - case "string": - args.value = val; - return new AST_String(args); - - case "number": - args.value = val; - return new AST_Number(args); - - case "boolean": - return new (val ? AST_True : AST_False)(args); - - default: - args.value = val; - return new AST_RegExp(args); - } - }, - UnaryExpression: From_Moz_Unary, - UpdateExpression: From_Moz_Unary, - Identifier: function(M) { - var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2]; - return new (M.name == "this" ? AST_This : p.type == "LabeledStatement" ? AST_Label : p.type == "VariableDeclarator" && p.id === M ? p.kind == "const" ? AST_SymbolConst : AST_SymbolVar : p.type == "FunctionExpression" ? p.id === M ? AST_SymbolLambda : AST_SymbolFunarg : p.type == "FunctionDeclaration" ? p.id === M ? AST_SymbolDefun : AST_SymbolFunarg : p.type == "CatchClause" ? AST_SymbolCatch : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef : AST_SymbolRef)({ - start: my_start_token(M), - end: my_end_token(M), - name: M.name - }); - } - }; - function From_Moz_Unary(M) { - var prefix = "prefix" in M ? M.prefix : M.type == "UnaryExpression" ? true : false; - return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ - start: my_start_token(M), - end: my_end_token(M), - operator: M.operator, - expression: from_moz(M.argument) - }); - } - var ME_TO_MOZ = {}; - map("Node", AST_Node); - map("Program", AST_Toplevel, "body@body"); - map("Function", AST_Function, "id>name, params@argnames, body%body"); - map("EmptyStatement", AST_EmptyStatement); - map("BlockStatement", AST_BlockStatement, "body@body"); - map("ExpressionStatement", AST_SimpleStatement, "expression>body"); - map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); - map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); - map("BreakStatement", AST_Break, "label>label"); - map("ContinueStatement", AST_Continue, "label>label"); - map("WithStatement", AST_With, "object>expression, body>body"); - map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); - map("ReturnStatement", AST_Return, "argument>value"); - map("ThrowStatement", AST_Throw, "argument>value"); - map("WhileStatement", AST_While, "test>condition, body>body"); - map("DoWhileStatement", AST_Do, "test>condition, body>body"); - map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); - map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); - map("DebuggerStatement", AST_Debugger); - map("FunctionDeclaration", AST_Defun, "id>name, params@argnames, body%body"); - map("VariableDeclaration", AST_Var, "declarations@definitions"); - map("VariableDeclarator", AST_VarDef, "id>name, init>value"); - map("ThisExpression", AST_This); - map("ArrayExpression", AST_Array, "elements@elements"); - map("FunctionExpression", AST_Function, "id>name, params@argnames, body%body"); - map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); - map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); - map("NewExpression", AST_New, "callee>expression, arguments@args"); - map("CallExpression", AST_Call, "callee>expression, arguments@args"); - function my_start_token(moznode) { - return new AST_Token({ - file: moznode.loc && moznode.loc.source, - line: moznode.loc && moznode.loc.start.line, - col: moznode.loc && moznode.loc.start.column, - pos: moznode.start, - endpos: moznode.start - }); - } - function my_end_token(moznode) { - return new AST_Token({ - file: moznode.loc && moznode.loc.source, - line: moznode.loc && moznode.loc.end.line, - col: moznode.loc && moznode.loc.end.column, - pos: moznode.end, - endpos: moznode.end - }); - } - function map(moztype, mytype, propmap) { - var moz_to_me = "function From_Moz_" + moztype + "(M){\n"; - moz_to_me += "return new mytype({\n" + "start: my_start_token(M),\n" + "end: my_end_token(M)"; - if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop) { - var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); - if (!m) throw new Error("Can't understand property map: " + prop); - var moz = "M." + m[1], how = m[2], my = m[3]; - moz_to_me += ",\n" + my + ": "; - if (how == "@") { - moz_to_me += moz + ".map(from_moz)"; - } else if (how == ">") { - moz_to_me += "from_moz(" + moz + ")"; - } else if (how == "=") { - moz_to_me += moz; - } else if (how == "%") { - moz_to_me += "from_moz(" + moz + ").body"; - } else throw new Error("Can't understand operator in propmap: " + prop); - }); - moz_to_me += "\n})}"; - moz_to_me = new Function("mytype", "my_start_token", "my_end_token", "from_moz", "return(" + moz_to_me + ")")(mytype, my_start_token, my_end_token, from_moz); - return MOZ_TO_ME[moztype] = moz_to_me; - } - var FROM_MOZ_STACK = null; - function from_moz(node) { - FROM_MOZ_STACK.push(node); - var ret = node != null ? MOZ_TO_ME[node.type](node) : null; - FROM_MOZ_STACK.pop(); - return ret; - } - AST_Node.from_mozilla_ast = function(node) { - var save_stack = FROM_MOZ_STACK; - FROM_MOZ_STACK = []; - var ast = from_moz(node); - FROM_MOZ_STACK = save_stack; - return ast; - }; - })(); - exports["array_to_hash"] = array_to_hash; - exports["slice"] = slice; - exports["characters"] = characters; - exports["member"] = member; - exports["find_if"] = find_if; - exports["repeat_string"] = repeat_string; - exports["DefaultsError"] = DefaultsError; - exports["defaults"] = defaults; - exports["merge"] = merge; - exports["noop"] = noop; - exports["MAP"] = MAP; - exports["push_uniq"] = push_uniq; - exports["string_template"] = string_template; - exports["remove"] = remove; - exports["mergeSort"] = mergeSort; - exports["set_difference"] = set_difference; - exports["set_intersection"] = set_intersection; - exports["makePredicate"] = makePredicate; - exports["all"] = all; - exports["Dictionary"] = Dictionary; - exports["DEFNODE"] = DEFNODE; - exports["AST_Token"] = AST_Token; - exports["AST_Node"] = AST_Node; - exports["AST_Statement"] = AST_Statement; - exports["AST_Debugger"] = AST_Debugger; - exports["AST_Directive"] = AST_Directive; - exports["AST_SimpleStatement"] = AST_SimpleStatement; - exports["walk_body"] = walk_body; - exports["AST_Block"] = AST_Block; - exports["AST_BlockStatement"] = AST_BlockStatement; - exports["AST_EmptyStatement"] = AST_EmptyStatement; - exports["AST_StatementWithBody"] = AST_StatementWithBody; - exports["AST_LabeledStatement"] = AST_LabeledStatement; - exports["AST_DWLoop"] = AST_DWLoop; - exports["AST_Do"] = AST_Do; - exports["AST_While"] = AST_While; - exports["AST_For"] = AST_For; - exports["AST_ForIn"] = AST_ForIn; - exports["AST_With"] = AST_With; - exports["AST_Scope"] = AST_Scope; - exports["AST_Toplevel"] = AST_Toplevel; - exports["AST_Lambda"] = AST_Lambda; - exports["AST_Accessor"] = AST_Accessor; - exports["AST_Function"] = AST_Function; - exports["AST_Defun"] = AST_Defun; - exports["AST_Jump"] = AST_Jump; - exports["AST_Exit"] = AST_Exit; - exports["AST_Return"] = AST_Return; - exports["AST_Throw"] = AST_Throw; - exports["AST_LoopControl"] = AST_LoopControl; - exports["AST_Break"] = AST_Break; - exports["AST_Continue"] = AST_Continue; - exports["AST_If"] = AST_If; - exports["AST_Switch"] = AST_Switch; - exports["AST_SwitchBranch"] = AST_SwitchBranch; - exports["AST_Default"] = AST_Default; - exports["AST_Case"] = AST_Case; - exports["AST_Try"] = AST_Try; - exports["AST_Catch"] = AST_Catch; - exports["AST_Finally"] = AST_Finally; - exports["AST_Definitions"] = AST_Definitions; - exports["AST_Var"] = AST_Var; - exports["AST_Const"] = AST_Const; - exports["AST_VarDef"] = AST_VarDef; - exports["AST_Call"] = AST_Call; - exports["AST_New"] = AST_New; - exports["AST_Seq"] = AST_Seq; - exports["AST_PropAccess"] = AST_PropAccess; - exports["AST_Dot"] = AST_Dot; - exports["AST_Sub"] = AST_Sub; - exports["AST_Unary"] = AST_Unary; - exports["AST_UnaryPrefix"] = AST_UnaryPrefix; - exports["AST_UnaryPostfix"] = AST_UnaryPostfix; - exports["AST_Binary"] = AST_Binary; - exports["AST_Conditional"] = AST_Conditional; - exports["AST_Assign"] = AST_Assign; - exports["AST_Array"] = AST_Array; - exports["AST_Object"] = AST_Object; - exports["AST_ObjectProperty"] = AST_ObjectProperty; - exports["AST_ObjectKeyVal"] = AST_ObjectKeyVal; - exports["AST_ObjectSetter"] = AST_ObjectSetter; - exports["AST_ObjectGetter"] = AST_ObjectGetter; - exports["AST_Symbol"] = AST_Symbol; - exports["AST_SymbolAccessor"] = AST_SymbolAccessor; - exports["AST_SymbolDeclaration"] = AST_SymbolDeclaration; - exports["AST_SymbolVar"] = AST_SymbolVar; - exports["AST_SymbolConst"] = AST_SymbolConst; - exports["AST_SymbolFunarg"] = AST_SymbolFunarg; - exports["AST_SymbolDefun"] = AST_SymbolDefun; - exports["AST_SymbolLambda"] = AST_SymbolLambda; - exports["AST_SymbolCatch"] = AST_SymbolCatch; - exports["AST_Label"] = AST_Label; - exports["AST_SymbolRef"] = AST_SymbolRef; - exports["AST_LabelRef"] = AST_LabelRef; - exports["AST_This"] = AST_This; - exports["AST_Constant"] = AST_Constant; - exports["AST_String"] = AST_String; - exports["AST_Number"] = AST_Number; - exports["AST_RegExp"] = AST_RegExp; - exports["AST_Atom"] = AST_Atom; - exports["AST_Null"] = AST_Null; - exports["AST_NaN"] = AST_NaN; - exports["AST_Undefined"] = AST_Undefined; - exports["AST_Hole"] = AST_Hole; - exports["AST_Infinity"] = AST_Infinity; - exports["AST_Boolean"] = AST_Boolean; - exports["AST_False"] = AST_False; - exports["AST_True"] = AST_True; - exports["TreeWalker"] = TreeWalker; - exports["KEYWORDS"] = KEYWORDS; - exports["KEYWORDS_ATOM"] = KEYWORDS_ATOM; - exports["RESERVED_WORDS"] = RESERVED_WORDS; - exports["KEYWORDS_BEFORE_EXPRESSION"] = KEYWORDS_BEFORE_EXPRESSION; - exports["OPERATOR_CHARS"] = OPERATOR_CHARS; - exports["RE_HEX_NUMBER"] = RE_HEX_NUMBER; - exports["RE_OCT_NUMBER"] = RE_OCT_NUMBER; - exports["RE_DEC_NUMBER"] = RE_DEC_NUMBER; - exports["OPERATORS"] = OPERATORS; - exports["WHITESPACE_CHARS"] = WHITESPACE_CHARS; - exports["PUNC_BEFORE_EXPRESSION"] = PUNC_BEFORE_EXPRESSION; - exports["PUNC_CHARS"] = PUNC_CHARS; - exports["REGEXP_MODIFIERS"] = REGEXP_MODIFIERS; - exports["UNICODE"] = UNICODE; - exports["is_letter"] = is_letter; - exports["is_digit"] = is_digit; - exports["is_alphanumeric_char"] = is_alphanumeric_char; - exports["is_unicode_combining_mark"] = is_unicode_combining_mark; - exports["is_unicode_connector_punctuation"] = is_unicode_connector_punctuation; - exports["is_identifier"] = is_identifier; - exports["is_identifier_start"] = is_identifier_start; - exports["is_identifier_char"] = is_identifier_char; - exports["is_identifier_string"] = is_identifier_string; - exports["parse_js_number"] = parse_js_number; - exports["JS_Parse_Error"] = JS_Parse_Error; - exports["js_error"] = js_error; - exports["is_token"] = is_token; - exports["EX_EOF"] = EX_EOF; - exports["tokenizer"] = tokenizer; - exports["UNARY_PREFIX"] = UNARY_PREFIX; - exports["UNARY_POSTFIX"] = UNARY_POSTFIX; - exports["ASSIGNMENT"] = ASSIGNMENT; - exports["PRECEDENCE"] = PRECEDENCE; - exports["STATEMENTS_WITH_LABELS"] = STATEMENTS_WITH_LABELS; - exports["ATOMIC_START_TOKEN"] = ATOMIC_START_TOKEN; - exports["parse"] = parse; - exports["TreeTransformer"] = TreeTransformer; - exports["SymbolDef"] = SymbolDef; - exports["base54"] = base54; - exports["OutputStream"] = OutputStream; - exports["Compressor"] = Compressor; - exports["SourceMap"] = SourceMap; -})({}, function() { - return exports; -}()); - -var UglifyJS = exports.UglifyJS; - -UglifyJS.AST_Node.warn_function = function(txt) { - logger.error("uglifyjs2 WARN: " + txt); -}; - -//JRB: MODIFIED FROM UGLIFY SOURCE -//to take a name for the file, and then set toplevel.filename to be that name. -exports.minify = function(files, options, name) { - options = UglifyJS.defaults(options, { - outSourceMap : null, - sourceRoot : null, - inSourceMap : null, - fromString : false, - warnings : false, - mangle : {}, - output : null, - compress : {} - }); - if (typeof files == "string") - files = [ files ]; - - UglifyJS.base54.reset(); - - // 1. parse - var toplevel = null; - files.forEach(function(file){ - var code = options.fromString - ? file - : rjsFile.readFile(file, "utf8"); - toplevel = UglifyJS.parse(code, { - filename: options.fromString ? name : file, - toplevel: toplevel - }); - }); - - // 2. compress - if (options.compress) { - var compress = { warnings: options.warnings }; - UglifyJS.merge(compress, options.compress); - toplevel.figure_out_scope(); - var sq = UglifyJS.Compressor(compress); - toplevel = toplevel.transform(sq); - } - - // 3. mangle - if (options.mangle) { - toplevel.figure_out_scope(); - toplevel.compute_char_frequency(); - toplevel.mangle_names(options.mangle); - } - - // 4. output - var inMap = options.inSourceMap; - var output = {}; - if (typeof options.inSourceMap == "string") { - inMap = rjsFile.readFile(options.inSourceMap, "utf8"); - } - if (options.outSourceMap) { - output.source_map = UglifyJS.SourceMap({ - file: options.outSourceMap, - orig: inMap, - root: options.sourceRoot - }); - } - if (options.output) { - UglifyJS.merge(output, options.output); - } - var stream = UglifyJS.OutputStream(output); - toplevel.print(stream); - return { - code : stream + "", - map : output.source_map + "" - }; -}; - -// exports.describe_ast = function() { -// function doitem(ctor) { -// var sub = {}; -// ctor.SUBCLASSES.forEach(function(ctor){ -// sub[ctor.TYPE] = doitem(ctor); -// }); -// var ret = {}; -// if (ctor.SELF_PROPS.length > 0) ret.props = ctor.SELF_PROPS; -// if (ctor.SUBCLASSES.length > 0) ret.sub = sub; -// return ret; -// } -// return doitem(UglifyJS.AST_Node).sub; -// } - -exports.describe_ast = function() { - var out = UglifyJS.OutputStream({ beautify: true }); - function doitem(ctor) { - out.print("AST_" + ctor.TYPE); - var props = ctor.SELF_PROPS.filter(function(prop){ - return !/^\$/.test(prop); - }); - if (props.length > 0) { - out.space(); - out.with_parens(function(){ - props.forEach(function(prop, i){ - if (i) out.space(); - out.print(prop); - }); - }); - } - if (ctor.documentation) { - out.space(); - out.print_string(ctor.documentation); - } - if (ctor.SUBCLASSES.length > 0) { - out.space(); - out.with_block(function(){ - ctor.SUBCLASSES.forEach(function(ctor, i){ - out.indent(); - doitem(ctor); - out.newline(); - }); - }); - } - }; - doitem(UglifyJS.AST_Node); - return out + ""; -}; - -}); -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true */ -/*global define: false */ - -define('parse', ['./esprimaAdapter', 'lang'], function (esprima, lang) { - 'use strict'; - - function arrayToString(ary) { - var output = '['; - if (ary) { - ary.forEach(function (item, i) { - output += (i > 0 ? ',' : '') + '"' + lang.jsEscape(item) + '"'; - }); - } - output += ']'; - - return output; - } - - //This string is saved off because JSLint complains - //about obj.arguments use, as 'reserved word' - var argPropName = 'arguments'; - - //From an esprima example for traversing its ast. - function traverse(object, visitor) { - var key, child; - - if (!object) { - return; - } - - if (visitor.call(null, object) === false) { - return false; - } - for (key in object) { - if (object.hasOwnProperty(key)) { - child = object[key]; - if (typeof child === 'object' && child !== null) { - if (traverse(child, visitor) === false) { - return false; - } - } - } - } - } - - //Like traverse, but visitor returning false just - //stops that subtree analysis, not the rest of tree - //visiting. - function traverseBroad(object, visitor) { - var key, child; - - if (!object) { - return; - } - - if (visitor.call(null, object) === false) { - return false; - } - for (key in object) { - if (object.hasOwnProperty(key)) { - child = object[key]; - if (typeof child === 'object' && child !== null) { - traverse(child, visitor); - } - } - } - } - - /** - * Pulls out dependencies from an array literal with just string members. - * If string literals, will just return those string values in an array, - * skipping other items in the array. - * - * @param {Node} node an AST node. - * - * @returns {Array} an array of strings. - * If null is returned, then it means the input node was not a valid - * dependency. - */ - function getValidDeps(node) { - if (!node || node.type !== 'ArrayExpression' || !node.elements) { - return; - } - - var deps = []; - - node.elements.some(function (elem) { - if (elem.type === 'Literal') { - deps.push(elem.value); - } - }); - - return deps.length ? deps : undefined; - } - - /** - * Main parse function. Returns a string of any valid require or - * define/require.def calls as part of one JavaScript source string. - * @param {String} moduleName the module name that represents this file. - * It is used to create a default define if there is not one already for the - * file. This allows properly tracing dependencies for builds. Otherwise, if - * the file just has a require() call, the file dependencies will not be - * properly reflected: the file will come before its dependencies. - * @param {String} moduleName - * @param {String} fileName - * @param {String} fileContents - * @param {Object} options optional options. insertNeedsDefine: true will - * add calls to require.needsDefine() if appropriate. - * @returns {String} JS source string or null, if no require or - * define/require.def calls are found. - */ - function parse(moduleName, fileName, fileContents, options) { - options = options || {}; - - //Set up source input - var i, moduleCall, depString, - moduleDeps = [], - result = '', - moduleList = [], - needsDefine = true, - astRoot = esprima.parse(fileContents); - - parse.recurse(astRoot, function (callName, config, name, deps) { - if (!deps) { - deps = []; - } - - if (callName === 'define' && (!name || name === moduleName)) { - needsDefine = false; - } - - if (!name) { - //If there is no module name, the dependencies are for - //this file/default module name. - moduleDeps = moduleDeps.concat(deps); - } else { - moduleList.push({ - name: name, - deps: deps - }); - } - - //If define was found, no need to dive deeper, unless - //the config explicitly wants to dig deeper. - return !!options.findNestedDependencies; - }, options); - - if (options.insertNeedsDefine && needsDefine) { - result += 'require.needsDefine("' + moduleName + '");'; - } - - if (moduleDeps.length || moduleList.length) { - for (i = 0; i < moduleList.length; i++) { - moduleCall = moduleList[i]; - if (result) { - result += '\n'; - } - - //If this is the main module for this file, combine any - //"anonymous" dependencies (could come from a nested require - //call) with this module. - if (moduleCall.name === moduleName) { - moduleCall.deps = moduleCall.deps.concat(moduleDeps); - moduleDeps = []; - } - - depString = arrayToString(moduleCall.deps); - result += 'define("' + moduleCall.name + '",' + - depString + ');'; - } - if (moduleDeps.length) { - if (result) { - result += '\n'; - } - depString = arrayToString(moduleDeps); - result += 'define("' + moduleName + '",' + depString + ');'; - } - } - - return result || null; - } - - parse.traverse = traverse; - parse.traverseBroad = traverseBroad; - - /** - * Handles parsing a file recursively for require calls. - * @param {Array} parentNode the AST node to start with. - * @param {Function} onMatch function to call on a parse match. - * @param {Object} [options] This is normally the build config options if - * it is passed. - */ - parse.recurse = function (object, onMatch, options) { - //Like traverse, but skips if branches that would not be processed - //after has application that results in tests of true or false boolean - //literal values. - var key, child, - hasHas = options && options.has; - - if (!object) { - return; - } - - //If has replacement has resulted in if(true){} or if(false){}, take - //the appropriate branch and skip the other one. - if (hasHas && object.type === 'IfStatement' && object.test.type && - object.test.type === 'Literal') { - if (object.test.value) { - //Take the if branch - this.recurse(object.consequent, onMatch, options); - } else { - //Take the else branch - this.recurse(object.alternate, onMatch, options); - } - } else { - if (this.parseNode(object, onMatch) === false) { - return; - } - for (key in object) { - if (object.hasOwnProperty(key)) { - child = object[key]; - if (typeof child === 'object' && child !== null) { - this.recurse(child, onMatch, options); - } - } - } - } - }; - - /** - * Determines if the file defines the require/define module API. - * Specifically, it looks for the `define.amd = ` expression. - * @param {String} fileName - * @param {String} fileContents - * @returns {Boolean} - */ - parse.definesRequire = function (fileName, fileContents) { - var found = false; - - traverse(esprima.parse(fileContents), function (node) { - if (parse.hasDefineAmd(node)) { - found = true; - - //Stop traversal - return false; - } - }); - - return found; - }; - - /** - * Finds require("") calls inside a CommonJS anonymous module wrapped in a - * define(function(require, exports, module){}) wrapper. These dependencies - * will be added to a modified define() call that lists the dependencies - * on the outside of the function. - * @param {String} fileName - * @param {String|Object} fileContents: a string of contents, or an already - * parsed AST tree. - * @returns {Array} an array of module names that are dependencies. Always - * returns an array, but could be of length zero. - */ - parse.getAnonDeps = function (fileName, fileContents) { - var astRoot = typeof fileContents === 'string' ? - esprima.parse(fileContents) : fileContents, - defFunc = this.findAnonDefineFactory(astRoot); - - return parse.getAnonDepsFromNode(defFunc); - }; - - /** - * Finds require("") calls inside a CommonJS anonymous module wrapped - * in a define function, given an AST node for the definition function. - * @param {Node} node the AST node for the definition function. - * @returns {Array} and array of dependency names. Can be of zero length. - */ - parse.getAnonDepsFromNode = function (node) { - var deps = [], - funcArgLength; - - if (node) { - this.findRequireDepNames(node, deps); - - //If no deps, still add the standard CommonJS require, exports, - //module, in that order, to the deps, but only if specified as - //function args. In particular, if exports is used, it is favored - //over the return value of the function, so only add it if asked. - funcArgLength = node.params && node.params.length; - if (funcArgLength) { - deps = (funcArgLength > 1 ? ["require", "exports", "module"] : - ["require"]).concat(deps); - } - } - return deps; - }; - - parse.isDefineNodeWithArgs = function (node) { - return node && node.type === 'CallExpression' && - node.callee && node.callee.type === 'Identifier' && - node.callee.name === 'define' && node[argPropName]; - }; - - /** - * Finds the function in define(function (require, exports, module){}); - * @param {Array} node - * @returns {Boolean} - */ - parse.findAnonDefineFactory = function (node) { - var match; - - traverse(node, function (node) { - var arg0, arg1; - - if (parse.isDefineNodeWithArgs(node)) { - - //Just the factory function passed to define - arg0 = node[argPropName][0]; - if (arg0 && arg0.type === 'FunctionExpression') { - match = arg0; - return false; - } - - //A string literal module ID followed by the factory function. - arg1 = node[argPropName][1]; - if (arg0.type === 'Literal' && - arg1 && arg1.type === 'FunctionExpression') { - match = arg1; - return false; - } - } - }); - - return match; - }; - - /** - * Finds any config that is passed to requirejs. That includes calls to - * require/requirejs.config(), as well as require({}, ...) and - * requirejs({}, ...) - * @param {String} fileContents - * - * @returns {Object} a config details object with the following properties: - * - config: {Object} the config object found. Can be undefined if no - * config found. - * - range: {Array} the start index and end index in the contents where - * the config was found. Can be undefined if no config found. - * Can throw an error if the config in the file cannot be evaluated in - * a build context to valid JavaScript. - */ - parse.findConfig = function (fileContents) { - /*jslint evil: true */ - var jsConfig, foundConfig, stringData, foundRange, quote, quoteMatch, - quoteRegExp = /(:\s|\[\s*)(['"])/, - astRoot = esprima.parse(fileContents, { - loc: true - }); - - traverse(astRoot, function (node) { - var arg, - requireType = parse.hasRequire(node); - - if (requireType && (requireType === 'require' || - requireType === 'requirejs' || - requireType === 'requireConfig' || - requireType === 'requirejsConfig')) { - - arg = node[argPropName] && node[argPropName][0]; - - if (arg && arg.type === 'ObjectExpression') { - stringData = parse.nodeToString(fileContents, arg); - jsConfig = stringData.value; - foundRange = stringData.range; - return false; - } - } else { - arg = parse.getRequireObjectLiteral(node); - if (arg) { - stringData = parse.nodeToString(fileContents, arg); - jsConfig = stringData.value; - foundRange = stringData.range; - return false; - } - } - }); - - if (jsConfig) { - // Eval the config - quoteMatch = quoteRegExp.exec(jsConfig); - quote = (quoteMatch && quoteMatch[2]) || '"'; - foundConfig = eval('(' + jsConfig + ')'); - } - - return { - config: foundConfig, - range: foundRange, - quote: quote - }; - }; - - /** Returns the node for the object literal assigned to require/requirejs, - * for holding a declarative config. - */ - parse.getRequireObjectLiteral = function (node) { - if (node.id && node.id.type === 'Identifier' && - (node.id.name === 'require' || node.id.name === 'requirejs') && - node.init && node.init.type === 'ObjectExpression') { - return node.init; - } - }; - - /** - * Renames require/requirejs/define calls to be ns + '.' + require/requirejs/define - * Does *not* do .config calls though. See pragma.namespace for the complete - * set of namespace transforms. This function is used because require calls - * inside a define() call should not be renamed, so a simple regexp is not - * good enough. - * @param {String} fileContents the contents to transform. - * @param {String} ns the namespace, *not* including trailing dot. - * @return {String} the fileContents with the namespace applied - */ - parse.renameNamespace = function (fileContents, ns) { - var lines, - locs = [], - astRoot = esprima.parse(fileContents, { - loc: true - }); - - parse.recurse(astRoot, function (callName, config, name, deps, node) { - locs.push(node.loc); - //Do not recurse into define functions, they should be using - //local defines. - return callName !== 'define'; - }, {}); - - if (locs.length) { - lines = fileContents.split('\n'); - - //Go backwards through the found locs, adding in the namespace name - //in front. - locs.reverse(); - locs.forEach(function (loc) { - var startIndex = loc.start.column, - //start.line is 1-based, not 0 based. - lineIndex = loc.start.line - 1, - line = lines[lineIndex]; - - lines[lineIndex] = line.substring(0, startIndex) + - ns + '.' + - line.substring(startIndex, - line.length); - }); - - fileContents = lines.join('\n'); - } - - return fileContents; - }; - - /** - * Finds all dependencies specified in dependency arrays and inside - * simplified commonjs wrappers. - * @param {String} fileName - * @param {String} fileContents - * - * @returns {Array} an array of dependency strings. The dependencies - * have not been normalized, they may be relative IDs. - */ - parse.findDependencies = function (fileName, fileContents, options) { - var dependencies = [], - astRoot = esprima.parse(fileContents); - - parse.recurse(astRoot, function (callName, config, name, deps) { - if (deps) { - dependencies = dependencies.concat(deps); - } - }, options); - - return dependencies; - }; - - /** - * Finds only CJS dependencies, ones that are the form - * require('stringLiteral') - */ - parse.findCjsDependencies = function (fileName, fileContents) { - var dependencies = []; - - traverse(esprima.parse(fileContents), function (node) { - var arg; - - if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'require' && node[argPropName] && - node[argPropName].length === 1) { - arg = node[argPropName][0]; - if (arg.type === 'Literal') { - dependencies.push(arg.value); - } - } - }); - - return dependencies; - }; - - //function define() {} - parse.hasDefDefine = function (node) { - return node.type === 'FunctionDeclaration' && node.id && - node.id.type === 'Identifier' && node.id.name === 'define'; - }; - - //define.amd = ... - parse.hasDefineAmd = function (node) { - return node && node.type === 'AssignmentExpression' && - node.left && node.left.type === 'MemberExpression' && - node.left.object && node.left.object.name === 'define' && - node.left.property && node.left.property.name === 'amd'; - }; - - //define.amd reference, as in: if (define.amd) - parse.refsDefineAmd = function (node) { - return node && node.type === 'MemberExpression' && - node.object && node.object.name === 'define' && - node.object.type === 'Identifier' && - node.property && node.property.name === 'amd' && - node.property.type === 'Identifier'; - }; - - //require(), requirejs(), require.config() and requirejs.config() - parse.hasRequire = function (node) { - var callName, - c = node && node.callee; - - if (node && node.type === 'CallExpression' && c) { - if (c.type === 'Identifier' && - (c.name === 'require' || - c.name === 'requirejs')) { - //A require/requirejs({}, ...) call - callName = c.name; - } else if (c.type === 'MemberExpression' && - c.object && - c.object.type === 'Identifier' && - (c.object.name === 'require' || - c.object.name === 'requirejs') && - c.property && c.property.name === 'config') { - // require/requirejs.config({}) call - callName = c.object.name + 'Config'; - } - } - - return callName; - }; - - //define() - parse.hasDefine = function (node) { - return node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'define'; - }; - - /** - * If there is a named define in the file, returns the name. Does not - * scan for mulitple names, just the first one. - */ - parse.getNamedDefine = function (fileContents) { - var name; - traverse(esprima.parse(fileContents), function (node) { - if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'define' && - node[argPropName] && node[argPropName][0] && - node[argPropName][0].type === 'Literal') { - name = node[argPropName][0].value; - return false; - } - }); - - return name; - }; - - /** - * Determines if define(), require({}|[]) or requirejs was called in the - * file. Also finds out if define() is declared and if define.amd is called. - */ - parse.usesAmdOrRequireJs = function (fileName, fileContents) { - var uses; - - traverse(esprima.parse(fileContents), function (node) { - var type, callName, arg; - - if (parse.hasDefDefine(node)) { - //function define() {} - type = 'declaresDefine'; - } else if (parse.hasDefineAmd(node)) { - type = 'defineAmd'; - } else { - callName = parse.hasRequire(node); - if (callName) { - arg = node[argPropName] && node[argPropName][0]; - if (arg && (arg.type === 'ObjectExpression' || - arg.type === 'ArrayExpression')) { - type = callName; - } - } else if (parse.hasDefine(node)) { - type = 'define'; - } - } - - if (type) { - if (!uses) { - uses = {}; - } - uses[type] = true; - } - }); - - return uses; - }; - - /** - * Determines if require(''), exports.x =, module.exports =, - * __dirname, __filename are used. So, not strictly traditional CommonJS, - * also checks for Node variants. - */ - parse.usesCommonJs = function (fileName, fileContents) { - var uses = null, - assignsExports = false; - - - traverse(esprima.parse(fileContents), function (node) { - var type, - exp = node.expression || node.init; - - if (node.type === 'Identifier' && - (node.name === '__dirname' || node.name === '__filename')) { - type = node.name.substring(2); - } else if (node.type === 'VariableDeclarator' && node.id && - node.id.type === 'Identifier' && - node.id.name === 'exports') { - //Hmm, a variable assignment for exports, so does not use cjs - //exports. - type = 'varExports'; - } else if (exp && exp.type === 'AssignmentExpression' && exp.left && - exp.left.type === 'MemberExpression' && exp.left.object) { - if (exp.left.object.name === 'module' && exp.left.property && - exp.left.property.name === 'exports') { - type = 'moduleExports'; - } else if (exp.left.object.name === 'exports' && - exp.left.property) { - type = 'exports'; - } - - } else if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'require' && node[argPropName] && - node[argPropName].length === 1 && - node[argPropName][0].type === 'Literal') { - type = 'require'; - } - - if (type) { - if (type === 'varExports') { - assignsExports = true; - } else if (type !== 'exports' || !assignsExports) { - if (!uses) { - uses = {}; - } - uses[type] = true; - } - } - }); - - return uses; - }; - - - parse.findRequireDepNames = function (node, deps) { - traverse(node, function (node) { - var arg; - - if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'require' && - node[argPropName] && node[argPropName].length === 1) { - - arg = node[argPropName][0]; - if (arg.type === 'Literal') { - deps.push(arg.value); - } - } - }); - }; - - /** - * Determines if a specific node is a valid require or define/require.def - * call. - * @param {Array} node - * @param {Function} onMatch a function to call when a match is found. - * It is passed the match name, and the config, name, deps possible args. - * The config, name and deps args are not normalized. - * - * @returns {String} a JS source string with the valid require/define call. - * Otherwise null. - */ - parse.parseNode = function (node, onMatch) { - var name, deps, cjsDeps, arg, factory, exp, refsDefine, bodyNode, - args = node && node[argPropName], - callName = parse.hasRequire(node); - - if (callName === 'require' || callName === 'requirejs') { - //A plain require/requirejs call - arg = node[argPropName] && node[argPropName][0]; - if (arg.type !== 'ArrayExpression') { - if (arg.type === 'ObjectExpression') { - //A config call, try the second arg. - arg = node[argPropName][1]; - } - } - - deps = getValidDeps(arg); - if (!deps) { - return; - } - - return onMatch("require", null, null, deps, node); - } else if (parse.hasDefine(node) && args && args.length) { - name = args[0]; - deps = args[1]; - factory = args[2]; - - if (name.type === 'ArrayExpression') { - //No name, adjust args - factory = deps; - deps = name; - name = null; - } else if (name.type === 'FunctionExpression') { - //Just the factory, no name or deps - factory = name; - name = deps = null; - } else if (name.type !== 'Literal') { - //An object literal, just null out - name = deps = factory = null; - } - - if (name && name.type === 'Literal' && deps) { - if (deps.type === 'FunctionExpression') { - //deps is the factory - factory = deps; - deps = null; - } else if (deps.type === 'ObjectExpression') { - //deps is object literal, null out - deps = factory = null; - } else if (deps.type === 'Identifier' && args.length === 2) { - // define('id', factory) - deps = factory = null; - } - } - - if (deps && deps.type === 'ArrayExpression') { - deps = getValidDeps(deps); - } else if (factory && factory.type === 'FunctionExpression') { - //If no deps and a factory function, could be a commonjs sugar - //wrapper, scan the function for dependencies. - cjsDeps = parse.getAnonDepsFromNode(factory); - if (cjsDeps.length) { - deps = cjsDeps; - } - } else if (deps || factory) { - //Does not match the shape of an AMD call. - return; - } - - //Just save off the name as a string instead of an AST object. - if (name && name.type === 'Literal') { - name = name.value; - } - - return onMatch("define", null, name, deps, node); - } else if (node.type === 'CallExpression' && node.callee && - node.callee.type === 'FunctionExpression' && - node.callee.body && node.callee.body.body && - node.callee.body.body.length === 1 && - node.callee.body.body[0].type === 'IfStatement') { - bodyNode = node.callee.body.body[0]; - //Look for a define(Identifier) case, but only if inside an - //if that has a define.amd test - if (bodyNode.consequent && bodyNode.consequent.body) { - exp = bodyNode.consequent.body[0]; - if (exp.type === 'ExpressionStatement' && exp.expression && - parse.hasDefine(exp.expression) && - exp.expression.arguments && - exp.expression.arguments.length === 1 && - exp.expression.arguments[0].type === 'Identifier') { - - //Calls define(Identifier) as first statement in body. - //Confirm the if test references define.amd - traverse(bodyNode.test, function (node) { - if (parse.refsDefineAmd(node)) { - refsDefine = true; - return false; - } - }); - - if (refsDefine) { - return onMatch("define", null, null, null, exp.expression); - } - } - } - } - }; - - /** - * Converts an AST node into a JS source string by extracting - * the node's location from the given contents string. Assumes - * esprima.parse() with loc was done. - * @param {String} contents - * @param {Object} node - * @returns {String} a JS source string. - */ - parse.nodeToString = function (contents, node) { - var extracted, - loc = node.loc, - lines = contents.split('\n'), - firstLine = loc.start.line > 1 ? - lines.slice(0, loc.start.line - 1).join('\n') + '\n' : - '', - preamble = firstLine + - lines[loc.start.line - 1].substring(0, loc.start.column); - - if (loc.start.line === loc.end.line) { - extracted = lines[loc.start.line - 1].substring(loc.start.column, - loc.end.column); - } else { - extracted = lines[loc.start.line - 1].substring(loc.start.column) + - '\n' + - lines.slice(loc.start.line, loc.end.line - 1).join('\n') + - '\n' + - lines[loc.end.line - 1].substring(0, loc.end.column); - } - - return { - value: extracted, - range: [ - preamble.length, - preamble.length + extracted.length - ] - }; - }; - - /** - * Extracts license comments from JS text. - * @param {String} fileName - * @param {String} contents - * @returns {String} a string of license comments. - */ - parse.getLicenseComments = function (fileName, contents) { - var commentNode, refNode, subNode, value, i, j, - //xpconnect's Reflect does not support comment or range, but - //prefer continued operation vs strict parity of operation, - //as license comments can be expressed in other ways, like - //via wrap args, or linked via sourcemaps. - ast = esprima.parse(contents, { - comment: true, - range: true - }), - result = '', - existsMap = {}, - lineEnd = contents.indexOf('\r') === -1 ? '\n' : '\r\n'; - - if (ast.comments) { - for (i = 0; i < ast.comments.length; i++) { - commentNode = ast.comments[i]; - - if (commentNode.type === 'Line') { - value = '//' + commentNode.value + lineEnd; - refNode = commentNode; - - if (i + 1 >= ast.comments.length) { - value += lineEnd; - } else { - //Look for immediately adjacent single line comments - //since it could from a multiple line comment made out - //of single line comments. Like this comment. - for (j = i + 1; j < ast.comments.length; j++) { - subNode = ast.comments[j]; - if (subNode.type === 'Line' && - subNode.range[0] === refNode.range[1] + 1) { - //Adjacent single line comment. Collect it. - value += '//' + subNode.value + lineEnd; - refNode = subNode; - } else { - //No more single line comment blocks. Break out - //and continue outer looping. - break; - } - } - value += lineEnd; - i = j - 1; - } - } else { - value = '/*' + commentNode.value + '*/' + lineEnd + lineEnd; - } - - if (!existsMap[value] && (value.indexOf('license') !== -1 || - (commentNode.type === 'Block' && - value.indexOf('/*!') === 0) || - value.indexOf('opyright') !== -1 || - value.indexOf('(c)') !== -1)) { - - result += value; - existsMap[value] = true; - } - - } - } - - return result; - }; - - return parse; -}); -/** - * @license Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*global define */ - -define('transform', [ './esprimaAdapter', './parse', 'logger', 'lang'], -function (esprima, parse, logger, lang) { - 'use strict'; - var transform, - baseIndentRegExp = /^([ \t]+)/, - indentRegExp = /\{[\r\n]+([ \t]+)/, - keyRegExp = /^[_A-Za-z]([A-Za-z\d_]*)$/, - bulkIndentRegExps = { - '\n': /\n/g, - '\r\n': /\r\n/g - }; - - function applyIndent(str, indent, lineReturn) { - var regExp = bulkIndentRegExps[lineReturn]; - return str.replace(regExp, '$&' + indent); - } - - transform = { - toTransport: function (namespace, moduleName, path, contents, onFound, options) { - options = options || {}; - - var astRoot, contentLines, modLine, - foundAnon, - scanCount = 0, - scanReset = false, - defineInfos = []; - - try { - astRoot = esprima.parse(contents, { - loc: true - }); - } catch (e) { - logger.trace('toTransport skipping ' + path + ': ' + - e.toString()); - return contents; - } - - //Find the define calls and their position in the files. - parse.traverseBroad(astRoot, function (node) { - var args, firstArg, firstArgLoc, factoryNode, - needsId, depAction, foundId, - sourceUrlData, range, - namespaceExists = false; - - namespaceExists = namespace && - node.type === 'CallExpression' && - node.callee && node.callee.object && - node.callee.object.type === 'Identifier' && - node.callee.object.name === namespace && - node.callee.property.type === 'Identifier' && - node.callee.property.name === 'define'; - - if (namespaceExists || parse.isDefineNodeWithArgs(node)) { - //The arguments are where its at. - args = node.arguments; - if (!args || !args.length) { - return; - } - - firstArg = args[0]; - firstArgLoc = firstArg.loc; - - if (args.length === 1) { - if (firstArg.type === 'Identifier') { - //The define(factory) case, but - //only allow it if one Identifier arg, - //to limit impact of false positives. - needsId = true; - depAction = 'empty'; - } else if (firstArg.type === 'FunctionExpression') { - //define(function(){}) - factoryNode = firstArg; - needsId = true; - depAction = 'scan'; - } else if (firstArg.type === 'ObjectExpression') { - //define({}); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'Literal' && - typeof firstArg.value === 'number') { - //define('12345'); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'UnaryExpression' && - firstArg.operator === '-' && - firstArg.argument && - firstArg.argument.type === 'Literal' && - typeof firstArg.argument.value === 'number') { - //define('-12345'); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'MemberExpression' && - firstArg.object && - firstArg.property && - firstArg.property.type === 'Identifier') { - //define(this.key); - needsId = true; - depAction = 'empty'; - } - } else if (firstArg.type === 'ArrayExpression') { - //define([], ...); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'Literal' && - typeof firstArg.value === 'string') { - //define('string', ....) - //Already has an ID. - needsId = false; - if (args.length === 2 && - args[1].type === 'FunctionExpression') { - //Needs dependency scanning. - factoryNode = args[1]; - depAction = 'scan'; - } else { - depAction = 'skip'; - } - } else { - //Unknown define entity, keep looking, even - //in the subtree for this node. - return; - } - - range = { - foundId: foundId, - needsId: needsId, - depAction: depAction, - namespaceExists: namespaceExists, - node: node, - defineLoc: node.loc, - firstArgLoc: firstArgLoc, - factoryNode: factoryNode, - sourceUrlData: sourceUrlData - }; - - //Only transform ones that do not have IDs. If it has an - //ID but no dependency array, assume it is something like - //a phonegap implementation, that has its own internal - //define that cannot handle dependency array constructs, - //and if it is a named module, then it means it has been - //set for transport form. - if (range.needsId) { - if (foundAnon) { - logger.trace(path + ' has more than one anonymous ' + - 'define. May be a built file from another ' + - 'build system like, Ender. Skipping normalization.'); - defineInfos = []; - return false; - } else { - foundAnon = range; - defineInfos.push(range); - } - } else if (depAction === 'scan') { - scanCount += 1; - if (scanCount > 1) { - //Just go back to an array that just has the - //anon one, since this is an already optimized - //file like the phonegap one. - if (!scanReset) { - defineInfos = foundAnon ? [foundAnon] : []; - scanReset = true; - } - } else { - defineInfos.push(range); - } - } - } - }); - - if (!defineInfos.length) { - return contents; - } - - //Reverse the matches, need to start from the bottom of - //the file to modify it, so that the ranges are still true - //further up. - defineInfos.reverse(); - - contentLines = contents.split('\n'); - - modLine = function (loc, contentInsertion) { - var startIndex = loc.start.column, - //start.line is 1-based, not 0 based. - lineIndex = loc.start.line - 1, - line = contentLines[lineIndex]; - contentLines[lineIndex] = line.substring(0, startIndex) + - contentInsertion + - line.substring(startIndex, - line.length); - }; - - defineInfos.forEach(function (info) { - var deps, - contentInsertion = '', - depString = ''; - - //Do the modifications "backwards", in other words, start with the - //one that is farthest down and work up, so that the ranges in the - //defineInfos still apply. So that means deps, id, then namespace. - if (info.needsId && moduleName) { - contentInsertion += "'" + moduleName + "',"; - } - - if (info.depAction === 'scan') { - deps = parse.getAnonDepsFromNode(info.factoryNode); - - if (deps.length) { - depString = '[' + deps.map(function (dep) { - return "'" + dep + "'"; - }) + ']'; - } else { - depString = '[]'; - } - depString += ','; - - if (info.factoryNode) { - //Already have a named module, need to insert the - //dependencies after the name. - modLine(info.factoryNode.loc, depString); - } else { - contentInsertion += depString; - } - } - - if (contentInsertion) { - modLine(info.firstArgLoc, contentInsertion); - } - - //Do namespace last so that ui does not mess upthe parenRange - //used above. - if (namespace && !info.namespaceExists) { - modLine(info.defineLoc, namespace + '.'); - } - - //Notify any listener for the found info - if (onFound) { - onFound(info); - } - }); - - contents = contentLines.join('\n'); - - if (options.useSourceUrl) { - contents = 'eval("' + lang.jsEscape(contents) + - '\\n//# sourceURL=' + (path.indexOf('/') === 0 ? '' : '/') + - path + - '");\n'; - } - - return contents; - }, - - /** - * Modify the contents of a require.config/requirejs.config call. This - * call will LOSE any existing comments that are in the config string. - * - * @param {String} fileContents String that may contain a config call - * @param {Function} onConfig Function called when the first config - * call is found. It will be passed an Object which is the current - * config, and the onConfig function should return an Object to use - * as the config. - * @return {String} the fileContents with the config changes applied. - */ - modifyConfig: function (fileContents, onConfig) { - var details = parse.findConfig(fileContents), - config = details.config; - - if (config) { - config = onConfig(config); - if (config) { - return transform.serializeConfig(config, - fileContents, - details.range[0], - details.range[1], - { - quote: details.quote - }); - } - } - - return fileContents; - }, - - serializeConfig: function (config, fileContents, start, end, options) { - //Calculate base level of indent - var indent, match, configString, outDentRegExp, - baseIndent = '', - startString = fileContents.substring(0, start), - existingConfigString = fileContents.substring(start, end), - lineReturn = existingConfigString.indexOf('\r') === -1 ? '\n' : '\r\n', - lastReturnIndex = startString.lastIndexOf('\n'); - - //Get the basic amount of indent for the require config call. - if (lastReturnIndex === -1) { - lastReturnIndex = 0; - } - - match = baseIndentRegExp.exec(startString.substring(lastReturnIndex + 1, start)); - if (match && match[1]) { - baseIndent = match[1]; - } - - //Calculate internal indentation for config - match = indentRegExp.exec(existingConfigString); - if (match && match[1]) { - indent = match[1]; - } - - if (!indent || indent.length < baseIndent) { - indent = ' '; - } else { - indent = indent.substring(baseIndent.length); - } - - outDentRegExp = new RegExp('(' + lineReturn + ')' + indent, 'g'); - - configString = transform.objectToString(config, { - indent: indent, - lineReturn: lineReturn, - outDentRegExp: outDentRegExp, - quote: options && options.quote - }); - - //Add in the base indenting level. - configString = applyIndent(configString, baseIndent, lineReturn); - - return startString + configString + fileContents.substring(end); - }, - - /** - * Tries converting a JS object to a string. This will likely suck, and - * is tailored to the type of config expected in a loader config call. - * So, hasOwnProperty fields, strings, numbers, arrays and functions, - * no weird recursively referenced stuff. - * @param {Object} obj the object to convert - * @param {Object} options options object with the following values: - * {String} indent the indentation to use for each level - * {String} lineReturn the type of line return to use - * {outDentRegExp} outDentRegExp the regexp to use to outdent functions - * {String} quote the quote type to use, ' or ". Optional. Default is " - * @param {String} totalIndent the total indent to print for this level - * @return {String} a string representation of the object. - */ - objectToString: function (obj, options, totalIndent) { - var startBrace, endBrace, nextIndent, - first = true, - value = '', - lineReturn = options.lineReturn, - indent = options.indent, - outDentRegExp = options.outDentRegExp, - quote = options.quote || '"'; - - totalIndent = totalIndent || ''; - nextIndent = totalIndent + indent; - - if (obj === null) { - value = 'null'; - } else if (obj === undefined) { - value = 'undefined'; - } else if (typeof obj === 'number' || typeof obj === 'boolean') { - value = obj; - } else if (typeof obj === 'string') { - //Use double quotes in case the config may also work as JSON. - value = quote + lang.jsEscape(obj) + quote; - } else if (lang.isArray(obj)) { - lang.each(obj, function (item, i) { - value += (i !== 0 ? ',' + lineReturn : '' ) + - nextIndent + - transform.objectToString(item, - options, - nextIndent); - }); - - startBrace = '['; - endBrace = ']'; - } else if (lang.isFunction(obj) || lang.isRegExp(obj)) { - //The outdent regexp just helps pretty up the conversion - //just in node. Rhino strips comments and does a different - //indent scheme for Function toString, so not really helpful - //there. - value = obj.toString().replace(outDentRegExp, '$1'); - } else { - //An object - lang.eachProp(obj, function (v, prop) { - value += (first ? '': ',' + lineReturn) + - nextIndent + - (keyRegExp.test(prop) ? prop : quote + lang.jsEscape(prop) + quote )+ - ': ' + - transform.objectToString(v, - options, - nextIndent); - first = false; - }); - startBrace = '{'; - endBrace = '}'; - } - - if (startBrace) { - value = startBrace + - lineReturn + - value + - lineReturn + totalIndent + - endBrace; - } - - return value; - } - }; - - return transform; -}); -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint regexp: true, plusplus: true */ -/*global define: false */ - -define('pragma', ['parse', 'logger'], function (parse, logger) { - 'use strict'; - function Temp() {} - - function create(obj, mixin) { - Temp.prototype = obj; - var temp = new Temp(), prop; - - //Avoid any extra memory hanging around - Temp.prototype = null; - - if (mixin) { - for (prop in mixin) { - if (mixin.hasOwnProperty(prop) && !temp.hasOwnProperty(prop)) { - temp[prop] = mixin[prop]; - } - } - } - - return temp; // Object - } - - var pragma = { - conditionalRegExp: /(exclude|include)Start\s*\(\s*["'](\w+)["']\s*,(.*)\)/, - useStrictRegExp: /['"]use strict['"];/g, - hasRegExp: /has\s*\(\s*['"]([^'"]+)['"]\s*\)/g, - configRegExp: /(^|[^\.])(requirejs|require)(\.config)\s*\(/g, - nsWrapRegExp: /\/\*requirejs namespace: true \*\//, - apiDefRegExp: /var requirejs,\s*require,\s*define;/, - defineCheckRegExp: /typeof\s+define\s*===\s*["']function["']\s*&&\s*define\s*\.\s*amd/g, - defineStringCheckRegExp: /typeof\s+define\s*===\s*["']function["']\s*&&\s*define\s*\[\s*["']amd["']\s*\]/g, - defineTypeFirstCheckRegExp: /\s*["']function["']\s*==(=?)\s*typeof\s+define\s*&&\s*define\s*\.\s*amd/g, - defineJQueryRegExp: /typeof\s+define\s*===\s*["']function["']\s*&&\s*define\s*\.\s*amd\s*&&\s*define\s*\.\s*amd\s*\.\s*jQuery/g, - defineHasRegExp: /typeof\s+define\s*==(=)?\s*['"]function['"]\s*&&\s*typeof\s+define\.amd\s*==(=)?\s*['"]object['"]\s*&&\s*define\.amd/g, - defineTernaryRegExp: /typeof\s+define\s*===\s*['"]function["']\s*&&\s*define\s*\.\s*amd\s*\?\s*define/, - amdefineRegExp: /if\s*\(\s*typeof define\s*\!==\s*'function'\s*\)\s*\{\s*[^\{\}]+amdefine[^\{\}]+\}/g, - - removeStrict: function (contents, config) { - return config.useStrict ? contents : contents.replace(pragma.useStrictRegExp, ''); - }, - - namespace: function (fileContents, ns, onLifecycleName) { - if (ns) { - //Namespace require/define calls - fileContents = fileContents.replace(pragma.configRegExp, '$1' + ns + '.$2$3('); - - - fileContents = parse.renameNamespace(fileContents, ns); - - //Namespace define ternary use: - fileContents = fileContents.replace(pragma.defineTernaryRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define.amd ? " + ns + ".define"); - - //Namespace define jquery use: - fileContents = fileContents.replace(pragma.defineJQueryRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define.amd && " + ns + ".define.amd.jQuery"); - - //Namespace has.js define use: - fileContents = fileContents.replace(pragma.defineHasRegExp, - "typeof " + ns + ".define === 'function' && typeof " + ns + ".define.amd === 'object' && " + ns + ".define.amd"); - - //Namespace define checks. - //Do these ones last, since they are a subset of the more specific - //checks above. - fileContents = fileContents.replace(pragma.defineCheckRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define.amd"); - fileContents = fileContents.replace(pragma.defineStringCheckRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define['amd']"); - fileContents = fileContents.replace(pragma.defineTypeFirstCheckRegExp, - "'function' === typeof " + ns + ".define && " + ns + ".define.amd"); - - //Check for require.js with the require/define definitions - if (pragma.apiDefRegExp.test(fileContents) && - fileContents.indexOf("if (!" + ns + " || !" + ns + ".requirejs)") === -1) { - //Wrap the file contents in a typeof check, and a function - //to contain the API globals. - fileContents = "var " + ns + ";(function () { if (!" + ns + " || !" + ns + ".requirejs) {\n" + - "if (!" + ns + ") { " + ns + ' = {}; } else { require = ' + ns + '; }\n' + - fileContents + - "\n" + - ns + ".requirejs = requirejs;" + - ns + ".require = require;" + - ns + ".define = define;\n" + - "}\n}());"; - } - - //Finally, if the file wants a special wrapper because it ties - //in to the requirejs internals in a way that would not fit - //the above matches, do that. Look for /*requirejs namespace: true*/ - if (pragma.nsWrapRegExp.test(fileContents)) { - //Remove the pragma. - fileContents = fileContents.replace(pragma.nsWrapRegExp, ''); - - //Alter the contents. - fileContents = '(function () {\n' + - 'var require = ' + ns + '.require,' + - 'requirejs = ' + ns + '.requirejs,' + - 'define = ' + ns + '.define;\n' + - fileContents + - '\n}());'; - } - } - - return fileContents; - }, - - /** - * processes the fileContents for some //>> conditional statements - */ - process: function (fileName, fileContents, config, onLifecycleName, pluginCollector) { - /*jslint evil: true */ - var foundIndex = -1, startIndex = 0, lineEndIndex, conditionLine, - matches, type, marker, condition, isTrue, endRegExp, endMatches, - endMarkerIndex, shouldInclude, startLength, lifecycleHas, deps, - i, dep, moduleName, collectorMod, - lifecyclePragmas, pragmas = config.pragmas, hasConfig = config.has, - //Legacy arg defined to help in dojo conversion script. Remove later - //when dojo no longer needs conversion: - kwArgs = pragmas; - - //Mix in a specific lifecycle scoped object, to allow targeting - //some pragmas/has tests to only when files are saved, or at different - //lifecycle events. Do not bother with kwArgs in this section, since - //the old dojo kwArgs were for all points in the build lifecycle. - if (onLifecycleName) { - lifecyclePragmas = config['pragmas' + onLifecycleName]; - lifecycleHas = config['has' + onLifecycleName]; - - if (lifecyclePragmas) { - pragmas = create(pragmas || {}, lifecyclePragmas); - } - - if (lifecycleHas) { - hasConfig = create(hasConfig || {}, lifecycleHas); - } - } - - //Replace has references if desired - if (hasConfig) { - fileContents = fileContents.replace(pragma.hasRegExp, function (match, test) { - if (hasConfig.hasOwnProperty(test)) { - return !!hasConfig[test]; - } - return match; - }); - } - - if (!config.skipPragmas) { - - while ((foundIndex = fileContents.indexOf("//>>", startIndex)) !== -1) { - //Found a conditional. Get the conditional line. - lineEndIndex = fileContents.indexOf("\n", foundIndex); - if (lineEndIndex === -1) { - lineEndIndex = fileContents.length - 1; - } - - //Increment startIndex past the line so the next conditional search can be done. - startIndex = lineEndIndex + 1; - - //Break apart the conditional. - conditionLine = fileContents.substring(foundIndex, lineEndIndex + 1); - matches = conditionLine.match(pragma.conditionalRegExp); - if (matches) { - type = matches[1]; - marker = matches[2]; - condition = matches[3]; - isTrue = false; - //See if the condition is true. - try { - isTrue = !!eval("(" + condition + ")"); - } catch (e) { - throw "Error in file: " + - fileName + - ". Conditional comment: " + - conditionLine + - " failed with this error: " + e; - } - - //Find the endpoint marker. - endRegExp = new RegExp('\\/\\/\\>\\>\\s*' + type + 'End\\(\\s*[\'"]' + marker + '[\'"]\\s*\\)', "g"); - endMatches = endRegExp.exec(fileContents.substring(startIndex, fileContents.length)); - if (endMatches) { - endMarkerIndex = startIndex + endRegExp.lastIndex - endMatches[0].length; - - //Find the next line return based on the match position. - lineEndIndex = fileContents.indexOf("\n", endMarkerIndex); - if (lineEndIndex === -1) { - lineEndIndex = fileContents.length - 1; - } - - //Should we include the segment? - shouldInclude = ((type === "exclude" && !isTrue) || (type === "include" && isTrue)); - - //Remove the conditional comments, and optionally remove the content inside - //the conditional comments. - startLength = startIndex - foundIndex; - fileContents = fileContents.substring(0, foundIndex) + - (shouldInclude ? fileContents.substring(startIndex, endMarkerIndex) : "") + - fileContents.substring(lineEndIndex + 1, fileContents.length); - - //Move startIndex to foundIndex, since that is the new position in the file - //where we need to look for more conditionals in the next while loop pass. - startIndex = foundIndex; - } else { - throw "Error in file: " + - fileName + - ". Cannot find end marker for conditional comment: " + - conditionLine; - - } - } - } - } - - //If need to find all plugin resources to optimize, do that now, - //before namespacing, since the namespacing will change the API - //names. - //If there is a plugin collector, scan the file for plugin resources. - if (config.optimizeAllPluginResources && pluginCollector) { - try { - deps = parse.findDependencies(fileName, fileContents); - if (deps.length) { - for (i = 0; i < deps.length; i++) { - dep = deps[i]; - if (dep.indexOf('!') !== -1) { - moduleName = dep.split('!')[0]; - collectorMod = pluginCollector[moduleName]; - if (!collectorMod) { - collectorMod = pluginCollector[moduleName] = []; - } - collectorMod.push(dep); - } - } - } - } catch (eDep) { - logger.error('Parse error looking for plugin resources in ' + - fileName + ', skipping.'); - } - } - - //Strip amdefine use for node-shared modules. - fileContents = fileContents.replace(pragma.amdefineRegExp, ''); - - //Do namespacing - if (onLifecycleName === 'OnSave' && config.namespace) { - fileContents = pragma.namespace(fileContents, config.namespace, onLifecycleName); - } - - - return pragma.removeStrict(fileContents, config); - } - }; - - return pragma; -}); -if(env === 'browser') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false */ - -define('browser/optimize', {}); - -} - -if(env === 'node') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false */ - -define('node/optimize', {}); - -} - -if(env === 'rhino') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint sloppy: true, plusplus: true */ -/*global define, java, Packages, com */ - -define('rhino/optimize', ['logger', 'env!env/file'], function (logger, file) { - - //Add .reduce to Rhino so UglifyJS can run in Rhino, - //inspired by https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce - //but rewritten for brevity, and to be good enough for use by UglifyJS. - if (!Array.prototype.reduce) { - Array.prototype.reduce = function (fn /*, initialValue */) { - var i = 0, - length = this.length, - accumulator; - - if (arguments.length >= 2) { - accumulator = arguments[1]; - } else { - if (length) { - while (!(i in this)) { - i++; - } - accumulator = this[i++]; - } - } - - for (; i < length; i++) { - if (i in this) { - accumulator = fn.call(undefined, accumulator, this[i], i, this); - } - } - - return accumulator; - }; - } - - var JSSourceFilefromCode, optimize, - mapRegExp = /"file":"[^"]+"/; - - //Bind to Closure compiler, but if it is not available, do not sweat it. - try { - JSSourceFilefromCode = java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode', [java.lang.String, java.lang.String]); - } catch (e) {} - - //Helper for closure compiler, because of weird Java-JavaScript interactions. - function closurefromCode(filename, content) { - return JSSourceFilefromCode.invoke(null, [filename, content]); - } - - - function getFileWriter(fileName, encoding) { - var outFile = new java.io.File(fileName), outWriter, parentDir; - - parentDir = outFile.getAbsoluteFile().getParentFile(); - if (!parentDir.exists()) { - if (!parentDir.mkdirs()) { - throw "Could not create directory: " + parentDir.getAbsolutePath(); - } - } - - if (encoding) { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile), encoding); - } else { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile)); - } - - return new java.io.BufferedWriter(outWriter); - } - - optimize = { - closure: function (fileName, fileContents, outFileName, keepLines, config) { - config = config || {}; - var result, mappings, optimized, compressed, baseName, writer, - outBaseName, outFileNameMap, outFileNameMapContent, - srcOutFileName, concatNameMap, - jscomp = Packages.com.google.javascript.jscomp, - flags = Packages.com.google.common.flags, - //Set up source input - jsSourceFile = closurefromCode(String(fileName), String(fileContents)), - sourceListArray = new java.util.ArrayList(), - options, option, FLAG_compilation_level, compiler, - Compiler = Packages.com.google.javascript.jscomp.Compiler, - CommandLineRunner = Packages.com.google.javascript.jscomp.CommandLineRunner; - - logger.trace("Minifying file: " + fileName); - - baseName = (new java.io.File(fileName)).getName(); - - //Set up options - options = new jscomp.CompilerOptions(); - for (option in config.CompilerOptions) { - // options are false by default and jslint wanted an if statement in this for loop - if (config.CompilerOptions[option]) { - options[option] = config.CompilerOptions[option]; - } - - } - options.prettyPrint = keepLines || options.prettyPrint; - - FLAG_compilation_level = jscomp.CompilationLevel[config.CompilationLevel || 'SIMPLE_OPTIMIZATIONS']; - FLAG_compilation_level.setOptionsForCompilationLevel(options); - - if (config.generateSourceMaps) { - mappings = new java.util.ArrayList(); - - mappings.add(new com.google.javascript.jscomp.SourceMap.LocationMapping(fileName, baseName + ".src.js")); - options.setSourceMapLocationMappings(mappings); - options.setSourceMapOutputPath(fileName + ".map"); - } - - //Trigger the compiler - Compiler.setLoggingLevel(Packages.java.util.logging.Level[config.loggingLevel || 'WARNING']); - compiler = new Compiler(); - - //fill the sourceArrrayList; we need the ArrayList because the only overload of compile - //accepting the getDefaultExterns return value (a List) also wants the sources as a List - sourceListArray.add(jsSourceFile); - - result = compiler.compile(CommandLineRunner.getDefaultExterns(), sourceListArray, options); - if (result.success) { - optimized = String(compiler.toSource()); - - if (config.generateSourceMaps && result.sourceMap && outFileName) { - outBaseName = (new java.io.File(outFileName)).getName(); - - srcOutFileName = outFileName + ".src.js"; - outFileNameMap = outFileName + ".map"; - - //If previous .map file exists, move it to the ".src.js" - //location. Need to update the sourceMappingURL part in the - //src.js file too. - if (file.exists(outFileNameMap)) { - concatNameMap = outFileNameMap.replace(/\.map$/, '.src.js.map'); - file.saveFile(concatNameMap, file.readFile(outFileNameMap)); - file.saveFile(srcOutFileName, - fileContents.replace(/\/\# sourceMappingURL=(.+).map/, - '/# sourceMappingURL=$1.src.js.map')); - } else { - file.saveUtf8File(srcOutFileName, fileContents); - } - - writer = getFileWriter(outFileNameMap, "utf-8"); - result.sourceMap.appendTo(writer, outFileName); - writer.close(); - - //Not sure how better to do this, but right now the .map file - //leaks the full OS path in the "file" property. Manually - //modify it to not do that. - file.saveFile(outFileNameMap, - file.readFile(outFileNameMap).replace(mapRegExp, '"file":"' + baseName + '"')); - - fileContents = optimized + "\n//# sourceMappingURL=" + outBaseName + ".map"; - } else { - fileContents = optimized; - } - return fileContents; - } else { - throw new Error('Cannot closure compile file: ' + fileName + '. Skipping it.'); - } - - return fileContents; - } - }; - - return optimize; -}); -} - -if(env === 'xpconnect') { -define('xpconnect/optimize', {}); -} -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true, nomen: true, regexp: true */ -/*global define: false */ - -define('optimize', [ 'lang', 'logger', 'env!env/optimize', 'env!env/file', 'parse', - 'pragma', 'uglifyjs/index', 'uglifyjs2', - 'source-map'], -function (lang, logger, envOptimize, file, parse, - pragma, uglify, uglify2, - sourceMap) { - 'use strict'; - - var optimize, - cssImportRegExp = /\@import\s+(url\()?\s*([^);]+)\s*(\))?([\w, ]*)(;)?/ig, - cssCommentImportRegExp = /\/\*[^\*]*@import[^\*]*\*\//g, - cssUrlRegExp = /\url\(\s*([^\)]+)\s*\)?/g, - SourceMapGenerator = sourceMap.SourceMapGenerator, - SourceMapConsumer =sourceMap.SourceMapConsumer; - - /** - * If an URL from a CSS url value contains start/end quotes, remove them. - * This is not done in the regexp, since my regexp fu is not that strong, - * and the CSS spec allows for ' and " in the URL if they are backslash escaped. - * @param {String} url - */ - function cleanCssUrlQuotes(url) { - //Make sure we are not ending in whitespace. - //Not very confident of the css regexps above that there will not be ending - //whitespace. - url = url.replace(/\s+$/, ""); - - if (url.charAt(0) === "'" || url.charAt(0) === "\"") { - url = url.substring(1, url.length - 1); - } - - return url; - } - - function fixCssUrlPaths(fileName, path, contents, cssPrefix) { - return contents.replace(cssUrlRegExp, function (fullMatch, urlMatch) { - var colonIndex, parts, i, - fixedUrlMatch = cleanCssUrlQuotes(urlMatch); - - fixedUrlMatch = fixedUrlMatch.replace(lang.backSlashRegExp, "/"); - - //Only do the work for relative URLs. Skip things that start with / or have - //a protocol. - colonIndex = fixedUrlMatch.indexOf(":"); - if (fixedUrlMatch.charAt(0) !== "/" && (colonIndex === -1 || colonIndex > fixedUrlMatch.indexOf("/"))) { - //It is a relative URL, tack on the cssPrefix and path prefix - urlMatch = cssPrefix + path + fixedUrlMatch; - - } else { - logger.trace(fileName + "\n URL not a relative URL, skipping: " + urlMatch); - } - - //Collapse .. and . - parts = urlMatch.split("/"); - for (i = parts.length - 1; i > 0; i--) { - if (parts[i] === ".") { - parts.splice(i, 1); - } else if (parts[i] === "..") { - if (i !== 0 && parts[i - 1] !== "..") { - parts.splice(i - 1, 2); - i -= 1; - } - } - } - - return "url(" + parts.join("/") + ")"; - }); - } - - /** - * Inlines nested stylesheets that have @import calls in them. - * @param {String} fileName the file name - * @param {String} fileContents the file contents - * @param {String} cssImportIgnore comma delimited string of files to ignore - * @param {String} cssPrefix string to be prefixed before relative URLs - * @param {Object} included an object used to track the files already imported - */ - function flattenCss(fileName, fileContents, cssImportIgnore, cssPrefix, included, topLevel) { - //Find the last slash in the name. - fileName = fileName.replace(lang.backSlashRegExp, "/"); - var endIndex = fileName.lastIndexOf("/"), - //Make a file path based on the last slash. - //If no slash, so must be just a file name. Use empty string then. - filePath = (endIndex !== -1) ? fileName.substring(0, endIndex + 1) : "", - //store a list of merged files - importList = [], - skippedList = []; - - //First make a pass by removing any commented out @import calls. - fileContents = fileContents.replace(cssCommentImportRegExp, ''); - - //Make sure we have a delimited ignore list to make matching faster - if (cssImportIgnore && cssImportIgnore.charAt(cssImportIgnore.length - 1) !== ",") { - cssImportIgnore += ","; - } - - fileContents = fileContents.replace(cssImportRegExp, function (fullMatch, urlStart, importFileName, urlEnd, mediaTypes) { - //Only process media type "all" or empty media type rules. - if (mediaTypes && ((mediaTypes.replace(/^\s\s*/, '').replace(/\s\s*$/, '')) !== "all")) { - skippedList.push(fileName); - return fullMatch; - } - - importFileName = cleanCssUrlQuotes(importFileName); - - //Ignore the file import if it is part of an ignore list. - if (cssImportIgnore && cssImportIgnore.indexOf(importFileName + ",") !== -1) { - return fullMatch; - } - - //Make sure we have a unix path for the rest of the operation. - importFileName = importFileName.replace(lang.backSlashRegExp, "/"); - - try { - //if a relative path, then tack on the filePath. - //If it is not a relative path, then the readFile below will fail, - //and we will just skip that import. - var fullImportFileName = importFileName.charAt(0) === "/" ? importFileName : filePath + importFileName, - importContents = file.readFile(fullImportFileName), - importEndIndex, importPath, flat; - - //Skip the file if it has already been included. - if (included[fullImportFileName]) { - return ''; - } - included[fullImportFileName] = true; - - //Make sure to flatten any nested imports. - flat = flattenCss(fullImportFileName, importContents, cssImportIgnore, cssPrefix, included); - importContents = flat.fileContents; - - if (flat.importList.length) { - importList.push.apply(importList, flat.importList); - } - if (flat.skippedList.length) { - skippedList.push.apply(skippedList, flat.skippedList); - } - - //Make the full import path - importEndIndex = importFileName.lastIndexOf("/"); - - //Make a file path based on the last slash. - //If no slash, so must be just a file name. Use empty string then. - importPath = (importEndIndex !== -1) ? importFileName.substring(0, importEndIndex + 1) : ""; - - //fix url() on relative import (#5) - importPath = importPath.replace(/^\.\//, ''); - - //Modify URL paths to match the path represented by this file. - importContents = fixCssUrlPaths(importFileName, importPath, importContents, cssPrefix); - - importList.push(fullImportFileName); - return importContents; - } catch (e) { - logger.warn(fileName + "\n Cannot inline css import, skipping: " + importFileName); - return fullMatch; - } - }); - - if (cssPrefix && topLevel) { - //Modify URL paths to match the path represented by this file. - fileContents = fixCssUrlPaths(fileName, '', fileContents, cssPrefix); - } - - return { - importList : importList, - skippedList: skippedList, - fileContents : fileContents - }; - } - - optimize = { - /** - * Optimizes a file that contains JavaScript content. Optionally collects - * plugin resources mentioned in a file, and then passes the content - * through an minifier if one is specified via config.optimize. - * - * @param {String} fileName the name of the file to optimize - * @param {String} fileContents the contents to optimize. If this is - * a null value, then fileName will be used to read the fileContents. - * @param {String} outFileName the name of the file to use for the - * saved optimized content. - * @param {Object} config the build config object. - * @param {Array} [pluginCollector] storage for any plugin resources - * found. - */ - jsFile: function (fileName, fileContents, outFileName, config, pluginCollector) { - if (!fileContents) { - fileContents = file.readFile(fileName); - } - - fileContents = optimize.js(fileName, fileContents, outFileName, config, pluginCollector); - - file.saveUtf8File(outFileName, fileContents); - }, - - /** - * Optimizes a file that contains JavaScript content. Optionally collects - * plugin resources mentioned in a file, and then passes the content - * through an minifier if one is specified via config.optimize. - * - * @param {String} fileName the name of the file that matches the - * fileContents. - * @param {String} fileContents the string of JS to optimize. - * @param {Object} [config] the build config object. - * @param {Array} [pluginCollector] storage for any plugin resources - * found. - */ - js: function (fileName, fileContents, outFileName, config, pluginCollector) { - var optFunc, optConfig, - parts = (String(config.optimize)).split('.'), - optimizerName = parts[0], - keepLines = parts[1] === 'keepLines', - licenseContents = ''; - - config = config || {}; - - //Apply pragmas/namespace renaming - fileContents = pragma.process(fileName, fileContents, config, 'OnSave', pluginCollector); - - //Optimize the JS files if asked. - if (optimizerName && optimizerName !== 'none') { - optFunc = envOptimize[optimizerName] || optimize.optimizers[optimizerName]; - if (!optFunc) { - throw new Error('optimizer with name of "' + - optimizerName + - '" not found for this environment'); - } - - optConfig = config[optimizerName] || {}; - if (config.generateSourceMaps) { - optConfig.generateSourceMaps = !!config.generateSourceMaps; - } - - try { - if (config.preserveLicenseComments) { - //Pull out any license comments for prepending after optimization. - try { - licenseContents = parse.getLicenseComments(fileName, fileContents); - } catch (e) { - throw new Error('Cannot parse file: ' + fileName + ' for comments. Skipping it. Error is:\n' + e.toString()); - } - } - - fileContents = licenseContents + optFunc(fileName, - fileContents, - outFileName, - keepLines, - optConfig); - } catch (e) { - if (config.throwWhen && config.throwWhen.optimize) { - throw e; - } else { - logger.error(e); - } - } - } - - return fileContents; - }, - - /** - * Optimizes one CSS file, inlining @import calls, stripping comments, and - * optionally removes line returns. - * @param {String} fileName the path to the CSS file to optimize - * @param {String} outFileName the path to save the optimized file. - * @param {Object} config the config object with the optimizeCss and - * cssImportIgnore options. - */ - cssFile: function (fileName, outFileName, config) { - - //Read in the file. Make sure we have a JS string. - var originalFileContents = file.readFile(fileName), - flat = flattenCss(fileName, originalFileContents, config.cssImportIgnore, config.cssPrefix, {}, true), - //Do not use the flattened CSS if there was one that was skipped. - fileContents = flat.skippedList.length ? originalFileContents : flat.fileContents, - startIndex, endIndex, buildText, comment; - - if (flat.skippedList.length) { - logger.warn('Cannot inline @imports for ' + fileName + - ',\nthe following files had media queries in them:\n' + - flat.skippedList.join('\n')); - } - - //Do comment removal. - try { - if (config.optimizeCss.indexOf(".keepComments") === -1) { - startIndex = 0; - //Get rid of comments. - while ((startIndex = fileContents.indexOf("/*", startIndex)) !== -1) { - endIndex = fileContents.indexOf("*/", startIndex + 2); - if (endIndex === -1) { - throw "Improper comment in CSS file: " + fileName; - } - comment = fileContents.substring(startIndex, endIndex); - - if (config.preserveLicenseComments && - (comment.indexOf('license') !== -1 || - comment.indexOf('opyright') !== -1 || - comment.indexOf('(c)') !== -1)) { - //Keep the comment, just increment the startIndex - startIndex = endIndex; - } else { - fileContents = fileContents.substring(0, startIndex) + fileContents.substring(endIndex + 2, fileContents.length); - startIndex = 0; - } - } - } - //Get rid of newlines. - if (config.optimizeCss.indexOf(".keepLines") === -1) { - fileContents = fileContents.replace(/[\r\n]/g, " "); - fileContents = fileContents.replace(/\s+/g, " "); - fileContents = fileContents.replace(/\{\s/g, "{"); - fileContents = fileContents.replace(/\s\}/g, "}"); - } else { - //Remove multiple empty lines. - fileContents = fileContents.replace(/(\r\n)+/g, "\r\n"); - fileContents = fileContents.replace(/(\n)+/g, "\n"); - } - } catch (e) { - fileContents = originalFileContents; - logger.error("Could not optimized CSS file: " + fileName + ", error: " + e); - } - - file.saveUtf8File(outFileName, fileContents); - - //text output to stdout and/or written to build.txt file - buildText = "\n"+ outFileName.replace(config.dir, "") +"\n----------------\n"; - flat.importList.push(fileName); - buildText += flat.importList.map(function(path){ - return path.replace(config.dir, ""); - }).join("\n"); - - return { - importList: flat.importList, - buildText: buildText +"\n" - }; - }, - - /** - * Optimizes CSS files, inlining @import calls, stripping comments, and - * optionally removes line returns. - * @param {String} startDir the path to the top level directory - * @param {Object} config the config object with the optimizeCss and - * cssImportIgnore options. - */ - css: function (startDir, config) { - var buildText = "", - importList = [], - shouldRemove = config.dir && config.removeCombined, - i, fileName, result, fileList; - if (config.optimizeCss.indexOf("standard") !== -1) { - fileList = file.getFilteredFileList(startDir, /\.css$/, true); - if (fileList) { - for (i = 0; i < fileList.length; i++) { - fileName = fileList[i]; - logger.trace("Optimizing (" + config.optimizeCss + ") CSS file: " + fileName); - result = optimize.cssFile(fileName, fileName, config); - buildText += result.buildText; - if (shouldRemove) { - result.importList.pop(); - importList = importList.concat(result.importList); - } - } - } - - if (shouldRemove) { - importList.forEach(function (path) { - if (file.exists(path)) { - file.deleteFile(path); - } - }); - } - } - return buildText; - }, - - optimizers: { - uglify: function (fileName, fileContents, outFileName, keepLines, config) { - var parser = uglify.parser, - processor = uglify.uglify, - ast, errMessage, errMatch; - - config = config || {}; - - logger.trace("Uglifying file: " + fileName); - - try { - ast = parser.parse(fileContents, config.strict_semicolons); - if (config.no_mangle !== true) { - ast = processor.ast_mangle(ast, config); - } - ast = processor.ast_squeeze(ast, config); - - fileContents = processor.gen_code(ast, config); - - if (config.max_line_length) { - fileContents = processor.split_lines(fileContents, config.max_line_length); - } - - //Add trailing semicolon to match uglifyjs command line version - fileContents += ';'; - } catch (e) { - errMessage = e.toString(); - errMatch = /\nError(\r)?\n/.exec(errMessage); - if (errMatch) { - errMessage = errMessage.substring(0, errMatch.index); - } - throw new Error('Cannot uglify file: ' + fileName + '. Skipping it. Error is:\n' + errMessage); - } - return fileContents; - }, - uglify2: function (fileName, fileContents, outFileName, keepLines, config) { - var result, existingMap, resultMap, finalMap, sourceIndex, - uconfig = {}, - existingMapPath = outFileName + '.map', - baseName = fileName && fileName.split('/').pop(); - - config = config || {}; - - lang.mixin(uconfig, config, true); - - uconfig.fromString = true; - - if (config.generateSourceMaps && outFileName) { - uconfig.outSourceMap = baseName; - - if (file.exists(existingMapPath)) { - uconfig.inSourceMap = existingMapPath; - existingMap = JSON.parse(file.readFile(existingMapPath)); - } - } - - logger.trace("Uglify2 file: " + fileName); - - try { - //var tempContents = fileContents.replace(/\/\/\# sourceMappingURL=.*$/, ''); - result = uglify2.minify(fileContents, uconfig, baseName + '.src.js'); - if (uconfig.outSourceMap && result.map) { - resultMap = result.map; - if (existingMap) { - resultMap = JSON.parse(resultMap); - finalMap = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(resultMap)); - finalMap.applySourceMap(new SourceMapConsumer(existingMap)); - resultMap = finalMap.toString(); - } else { - file.saveFile(outFileName + '.src.js', fileContents); - } - file.saveFile(outFileName + '.map', resultMap); - fileContents = result.code + "\n//# sourceMappingURL=" + baseName + ".map"; - } else { - fileContents = result.code; - } - } catch (e) { - throw new Error('Cannot uglify2 file: ' + fileName + '. Skipping it. Error is:\n' + e.toString()); - } - return fileContents; - } - } - }; - - return optimize; -}); -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -/* - * This file patches require.js to communicate with the build system. - */ - -//Using sloppy since this uses eval for some code like plugins, -//which may not be strict mode compliant. So if use strict is used -//below they will have strict rules applied and may cause an error. -/*jslint sloppy: true, nomen: true, plusplus: true, regexp: true */ -/*global require, define: true */ - -//NOT asking for require as a dependency since the goal is to modify the -//global require below -define('requirePatch', [ 'env!env/file', 'pragma', 'parse', 'lang', 'logger', 'commonJs', 'prim'], function ( - file, - pragma, - parse, - lang, - logger, - commonJs, - prim -) { - - var allowRun = true, - hasProp = lang.hasProp, - falseProp = lang.falseProp, - getOwn = lang.getOwn; - - //This method should be called when the patches to require should take hold. - return function () { - if (!allowRun) { - return; - } - allowRun = false; - - var layer, - pluginBuilderRegExp = /(["']?)pluginBuilder(["']?)\s*[=\:]\s*["']([^'"\s]+)["']/, - oldNewContext = require.s.newContext, - oldDef, - - //create local undefined values for module and exports, - //so that when files are evaled in this function they do not - //see the node values used for r.js - exports, - module; - - /** - * Reset "global" build caches that are kept around between - * build layer builds. Useful to do when there are multiple - * top level requirejs.optimize() calls. - */ - require._cacheReset = function () { - //Stored raw text caches, used by browser use. - require._cachedRawText = {}; - //Stored cached file contents for reuse in other layers. - require._cachedFileContents = {}; - //Store which cached files contain a require definition. - require._cachedDefinesRequireUrls = {}; - }; - require._cacheReset(); - - /** - * Makes sure the URL is something that can be supported by the - * optimization tool. - * @param {String} url - * @returns {Boolean} - */ - require._isSupportedBuildUrl = function (url) { - //Ignore URLs with protocols, hosts or question marks, means either network - //access is needed to fetch it or it is too dynamic. Note that - //on Windows, full paths are used for some urls, which include - //the drive, like c:/something, so need to test for something other - //than just a colon. - if (url.indexOf("://") === -1 && url.indexOf("?") === -1 && - url.indexOf('empty:') !== 0 && url.indexOf('//') !== 0) { - return true; - } else { - if (!layer.ignoredUrls[url]) { - if (url.indexOf('empty:') === -1) { - logger.info('Cannot optimize network URL, skipping: ' + url); - } - layer.ignoredUrls[url] = true; - } - return false; - } - }; - - function normalizeUrlWithBase(context, moduleName, url) { - //Adjust the URL if it was not transformed to use baseUrl. - if (require.jsExtRegExp.test(moduleName)) { - url = (context.config.dir || context.config.dirBaseUrl) + url; - } - return url; - } - - //Overrides the new context call to add existing tracking features. - require.s.newContext = function (name) { - var context = oldNewContext(name), - oldEnable = context.enable, - moduleProto = context.Module.prototype, - oldInit = moduleProto.init, - oldCallPlugin = moduleProto.callPlugin; - - //Only do this for the context used for building. - if (name === '_') { - //For build contexts, do everything sync - context.nextTick = function (fn) { - fn(); - }; - - context.needFullExec = {}; - context.fullExec = {}; - context.plugins = {}; - context.buildShimExports = {}; - - //Override the shim exports function generator to just - //spit out strings that can be used in the stringified - //build output. - context.makeShimExports = function (value) { - function fn() { - return '(function (global) {\n' + - ' return function () {\n' + - ' var ret, fn;\n' + - (value.init ? - (' fn = ' + value.init.toString() + ';\n' + - ' ret = fn.apply(global, arguments);\n') : '') + - (value.exports ? - ' return ret || global.' + value.exports + ';\n' : - ' return ret;\n') + - ' };\n' + - '}(this))'; - } - - return fn; - }; - - context.enable = function (depMap, parent) { - var id = depMap.id, - parentId = parent && parent.map.id, - needFullExec = context.needFullExec, - fullExec = context.fullExec, - mod = getOwn(context.registry, id); - - if (mod && !mod.defined) { - if (parentId && getOwn(needFullExec, parentId)) { - needFullExec[id] = true; - } - - } else if ((getOwn(needFullExec, id) && falseProp(fullExec, id)) || - (parentId && getOwn(needFullExec, parentId) && - falseProp(fullExec, id))) { - context.require.undef(id); - } - - return oldEnable.apply(context, arguments); - }; - - //Override load so that the file paths can be collected. - context.load = function (moduleName, url) { - /*jslint evil: true */ - var contents, pluginBuilderMatch, builderName, - shim, shimExports; - - //Do not mark the url as fetched if it is - //not an empty: URL, used by the optimizer. - //In that case we need to be sure to call - //load() for each module that is mapped to - //empty: so that dependencies are satisfied - //correctly. - if (url.indexOf('empty:') === 0) { - delete context.urlFetched[url]; - } - - //Only handle urls that can be inlined, so that means avoiding some - //URLs like ones that require network access or may be too dynamic, - //like JSONP - if (require._isSupportedBuildUrl(url)) { - //Adjust the URL if it was not transformed to use baseUrl. - url = normalizeUrlWithBase(context, moduleName, url); - - //Save the module name to path and path to module name mappings. - layer.buildPathMap[moduleName] = url; - layer.buildFileToModule[url] = moduleName; - - if (hasProp(context.plugins, moduleName)) { - //plugins need to have their source evaled as-is. - context.needFullExec[moduleName] = true; - } - - prim().start(function () { - if (hasProp(require._cachedFileContents, url) && - (falseProp(context.needFullExec, moduleName) || - getOwn(context.fullExec, moduleName))) { - contents = require._cachedFileContents[url]; - - //If it defines require, mark it so it can be hoisted. - //Done here and in the else below, before the - //else block removes code from the contents. - //Related to #263 - if (!layer.existingRequireUrl && require._cachedDefinesRequireUrls[url]) { - layer.existingRequireUrl = url; - } - } else { - //Load the file contents, process for conditionals, then - //evaluate it. - return require._cacheReadAsync(url).then(function (text) { - contents = text; - - if (context.config.cjsTranslate && - (!context.config.shim || !lang.hasProp(context.config.shim, moduleName))) { - contents = commonJs.convert(url, contents); - } - - //If there is a read filter, run it now. - if (context.config.onBuildRead) { - contents = context.config.onBuildRead(moduleName, url, contents); - } - - contents = pragma.process(url, contents, context.config, 'OnExecute'); - - //Find out if the file contains a require() definition. Need to know - //this so we can inject plugins right after it, but before they are needed, - //and to make sure this file is first, so that define calls work. - try { - if (!layer.existingRequireUrl && parse.definesRequire(url, contents)) { - layer.existingRequireUrl = url; - require._cachedDefinesRequireUrls[url] = true; - } - } catch (e1) { - throw new Error('Parse error using esprima ' + - 'for file: ' + url + '\n' + e1); - } - }).then(function () { - if (hasProp(context.plugins, moduleName)) { - //This is a loader plugin, check to see if it has a build extension, - //otherwise the plugin will act as the plugin builder too. - pluginBuilderMatch = pluginBuilderRegExp.exec(contents); - if (pluginBuilderMatch) { - //Load the plugin builder for the plugin contents. - builderName = context.makeModuleMap(pluginBuilderMatch[3], - context.makeModuleMap(moduleName), - null, - true).id; - return require._cacheReadAsync(context.nameToUrl(builderName)); - } - } - return contents; - }).then(function (text) { - contents = text; - - //Parse out the require and define calls. - //Do this even for plugins in case they have their own - //dependencies that may be separate to how the pluginBuilder works. - try { - if (falseProp(context.needFullExec, moduleName)) { - contents = parse(moduleName, url, contents, { - insertNeedsDefine: true, - has: context.config.has, - findNestedDependencies: context.config.findNestedDependencies - }); - } - } catch (e2) { - throw new Error('Parse error using esprima ' + - 'for file: ' + url + '\n' + e2); - } - - require._cachedFileContents[url] = contents; - }); - } - }).then(function () { - if (contents) { - eval(contents); - } - - try { - //If have a string shim config, and this is - //a fully executed module, try to see if - //it created a variable in this eval scope - if (getOwn(context.needFullExec, moduleName)) { - shim = getOwn(context.config.shim, moduleName); - if (shim && shim.exports) { - shimExports = eval(shim.exports); - if (typeof shimExports !== 'undefined') { - context.buildShimExports[moduleName] = shimExports; - } - } - } - - //Need to close out completion of this module - //so that listeners will get notified that it is available. - context.completeLoad(moduleName); - } catch (e) { - //Track which module could not complete loading. - if (!e.moduleTree) { - e.moduleTree = []; - } - e.moduleTree.push(moduleName); - throw e; - } - }).then(null, function (eOuter) { - - if (!eOuter.fileName) { - eOuter.fileName = url; - } - throw eOuter; - }).end(); - } else { - //With unsupported URLs still need to call completeLoad to - //finish loading. - context.completeLoad(moduleName); - } - }; - - //Marks module has having a name, and optionally executes the - //callback, but only if it meets certain criteria. - context.execCb = function (name, cb, args, exports) { - var buildShimExports = getOwn(layer.context.buildShimExports, name); - - if (buildShimExports) { - return buildShimExports; - } else if (cb.__requireJsBuild || getOwn(layer.context.needFullExec, name)) { - return cb.apply(exports, args); - } - return undefined; - }; - - moduleProto.init = function (depMaps) { - if (context.needFullExec[this.map.id]) { - lang.each(depMaps, lang.bind(this, function (depMap) { - if (typeof depMap === 'string') { - depMap = context.makeModuleMap(depMap, - (this.map.isDefine ? this.map : this.map.parentMap)); - } - - if (!context.fullExec[depMap.id]) { - context.require.undef(depMap.id); - } - })); - } - - return oldInit.apply(this, arguments); - }; - - moduleProto.callPlugin = function () { - var map = this.map, - pluginMap = context.makeModuleMap(map.prefix), - pluginId = pluginMap.id, - pluginMod = getOwn(context.registry, pluginId); - - context.plugins[pluginId] = true; - context.needFullExec[pluginId] = true; - - //If the module is not waiting to finish being defined, - //undef it and start over, to get full execution. - if (falseProp(context.fullExec, pluginId) && (!pluginMod || pluginMod.defined)) { - context.require.undef(pluginMap.id); - } - - return oldCallPlugin.apply(this, arguments); - }; - } - - return context; - }; - - //Clear up the existing context so that the newContext modifications - //above will be active. - delete require.s.contexts._; - - /** Reset state for each build layer pass. */ - require._buildReset = function () { - var oldContext = require.s.contexts._; - - //Clear up the existing context. - delete require.s.contexts._; - - //Set up new context, so the layer object can hold onto it. - require({}); - - layer = require._layer = { - buildPathMap: {}, - buildFileToModule: {}, - buildFilePaths: [], - pathAdded: {}, - modulesWithNames: {}, - needsDefine: {}, - existingRequireUrl: "", - ignoredUrls: {}, - context: require.s.contexts._ - }; - - //Return the previous context in case it is needed, like for - //the basic config object. - return oldContext; - }; - - require._buildReset(); - - //Override define() to catch modules that just define an object, so that - //a dummy define call is not put in the build file for them. They do - //not end up getting defined via context.execCb, so we need to catch them - //at the define call. - oldDef = define; - - //This function signature does not have to be exact, just match what we - //are looking for. - define = function (name) { - if (typeof name === "string" && falseProp(layer.needsDefine, name)) { - layer.modulesWithNames[name] = true; - } - return oldDef.apply(require, arguments); - }; - - define.amd = oldDef.amd; - - //Add some utilities for plugins - require._readFile = file.readFile; - require._fileExists = function (path) { - return file.exists(path); - }; - - //Called when execManager runs for a dependency. Used to figure out - //what order of execution. - require.onResourceLoad = function (context, map) { - var id = map.id, - url; - - //If build needed a full execution, indicate it - //has been done now. But only do it if the context is tracking - //that. Only valid for the context used in a build, not for - //other contexts being run, like for useLib, plain requirejs - //use in node/rhino. - if (context.needFullExec && getOwn(context.needFullExec, id)) { - context.fullExec[id] = true; - } - - //A plugin. - if (map.prefix) { - if (falseProp(layer.pathAdded, id)) { - layer.buildFilePaths.push(id); - //For plugins the real path is not knowable, use the name - //for both module to file and file to module mappings. - layer.buildPathMap[id] = id; - layer.buildFileToModule[id] = id; - layer.modulesWithNames[id] = true; - layer.pathAdded[id] = true; - } - } else if (map.url && require._isSupportedBuildUrl(map.url)) { - //If the url has not been added to the layer yet, and it - //is from an actual file that was loaded, add it now. - url = normalizeUrlWithBase(context, id, map.url); - if (!layer.pathAdded[url] && getOwn(layer.buildPathMap, id)) { - //Remember the list of dependencies for this layer. - layer.buildFilePaths.push(url); - layer.pathAdded[url] = true; - } - } - }; - - //Called by output of the parse() function, when a file does not - //explicitly call define, probably just require, but the parse() - //function normalizes on define() for dependency mapping and file - //ordering works correctly. - require.needsDefine = function (moduleName) { - layer.needsDefine[moduleName] = true; - }; - }; -}); -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint */ -/*global define: false, console: false */ - -define('commonJs', ['env!env/file', 'parse'], function (file, parse) { - 'use strict'; - var commonJs = { - //Set to false if you do not want this file to log. Useful in environments - //like node where you want the work to happen without noise. - useLog: true, - - convertDir: function (commonJsPath, savePath) { - var fileList, i, - jsFileRegExp = /\.js$/, - fileName, convertedFileName, fileContents; - - //Get list of files to convert. - fileList = file.getFilteredFileList(commonJsPath, /\w/, true); - - //Normalize on front slashes and make sure the paths do not end in a slash. - commonJsPath = commonJsPath.replace(/\\/g, "/"); - savePath = savePath.replace(/\\/g, "/"); - if (commonJsPath.charAt(commonJsPath.length - 1) === "/") { - commonJsPath = commonJsPath.substring(0, commonJsPath.length - 1); - } - if (savePath.charAt(savePath.length - 1) === "/") { - savePath = savePath.substring(0, savePath.length - 1); - } - - //Cycle through all the JS files and convert them. - if (!fileList || !fileList.length) { - if (commonJs.useLog) { - if (commonJsPath === "convert") { - //A request just to convert one file. - console.log('\n\n' + commonJs.convert(savePath, file.readFile(savePath))); - } else { - console.log("No files to convert in directory: " + commonJsPath); - } - } - } else { - for (i = 0; i < fileList.length; i++) { - fileName = fileList[i]; - convertedFileName = fileName.replace(commonJsPath, savePath); - - //Handle JS files. - if (jsFileRegExp.test(fileName)) { - fileContents = file.readFile(fileName); - fileContents = commonJs.convert(fileName, fileContents); - file.saveUtf8File(convertedFileName, fileContents); - } else { - //Just copy the file over. - file.copyFile(fileName, convertedFileName, true); - } - } - } - }, - - /** - * Does the actual file conversion. - * - * @param {String} fileName the name of the file. - * - * @param {String} fileContents the contents of a file :) - * - * @returns {String} the converted contents - */ - convert: function (fileName, fileContents) { - //Strip out comments. - try { - var preamble = '', - commonJsProps = parse.usesCommonJs(fileName, fileContents); - - //First see if the module is not already RequireJS-formatted. - if (parse.usesAmdOrRequireJs(fileName, fileContents) || !commonJsProps) { - return fileContents; - } - - if (commonJsProps.dirname || commonJsProps.filename) { - preamble = 'var __filename = module.uri || "", ' + - '__dirname = __filename.substring(0, __filename.lastIndexOf("/") + 1); '; - } - - //Construct the wrapper boilerplate. - fileContents = 'define(function (require, exports, module) {' + - preamble + - fileContents + - '\n});\n'; - - } catch (e) { - console.log("commonJs.convert: COULD NOT CONVERT: " + fileName + ", so skipping it. Error was: " + e); - return fileContents; - } - - return fileContents; - } - }; - - return commonJs; -}); -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true, nomen: true, regexp: true */ -/*global define, requirejs */ - - -define('build', function (require) { - 'use strict'; - - var build, buildBaseConfig, - lang = require('lang'), - prim = require('prim'), - logger = require('logger'), - file = require('env!env/file'), - parse = require('parse'), - optimize = require('optimize'), - pragma = require('pragma'), - transform = require('transform'), - requirePatch = require('requirePatch'), - env = require('env'), - commonJs = require('commonJs'), - SourceMapGenerator = require('source-map/source-map-generator'), - hasProp = lang.hasProp, - getOwn = lang.getOwn, - falseProp = lang.falseProp, - endsWithSemiColonRegExp = /;\s*$/, - resourceIsModuleIdRegExp = /^[\w\/\\\.]+$/; - - prim.nextTick = function (fn) { - fn(); - }; - - //Now map require to the outermost requirejs, now that we have - //local dependencies for this module. The rest of the require use is - //manipulating the requirejs loader. - require = requirejs; - - //Caching function for performance. Attached to - //require so it can be reused in requirePatch.js. _cachedRawText - //set up by requirePatch.js - require._cacheReadAsync = function (path, encoding) { - var d; - - if (lang.hasProp(require._cachedRawText, path)) { - d = prim(); - d.resolve(require._cachedRawText[path]); - return d.promise; - } else { - return file.readFileAsync(path, encoding).then(function (text) { - require._cachedRawText[path] = text; - return text; - }); - } - }; - - buildBaseConfig = { - appDir: "", - pragmas: {}, - paths: {}, - optimize: "uglify", - optimizeCss: "standard.keepLines", - inlineText: true, - isBuild: true, - optimizeAllPluginResources: false, - findNestedDependencies: false, - preserveLicenseComments: true, - //By default, all files/directories are copied, unless - //they match this regexp, by default just excludes .folders - dirExclusionRegExp: file.dirExclusionRegExp, - _buildPathToModuleIndex: {} - }; - - /** - * Some JS may not be valid if concatenated with other JS, in particular - * the style of omitting semicolons and rely on ASI. Add a semicolon in - * those cases. - */ - function addSemiColon(text, config) { - if (config.skipSemiColonInsertion || endsWithSemiColonRegExp.test(text)) { - return text; - } else { - return text + ";"; - } - } - - function endsWithSlash(dirName) { - if (dirName.charAt(dirName.length - 1) !== "/") { - dirName += "/"; - } - return dirName; - } - - //Method used by plugin writeFile calls, defined up here to avoid - //jslint warning about "making a function in a loop". - function makeWriteFile(namespace, layer) { - function writeFile(name, contents) { - logger.trace('Saving plugin-optimized file: ' + name); - file.saveUtf8File(name, contents); - } - - writeFile.asModule = function (moduleName, fileName, contents) { - writeFile(fileName, - build.toTransport(namespace, moduleName, fileName, contents, layer)); - }; - - return writeFile; - } - - /** - * Main API entry point into the build. The args argument can either be - * an array of arguments (like the onese passed on a command-line), - * or it can be a JavaScript object that has the format of a build profile - * file. - * - * If it is an object, then in addition to the normal properties allowed in - * a build profile file, the object should contain one other property: - * - * The object could also contain a "buildFile" property, which is a string - * that is the file path to a build profile that contains the rest - * of the build profile directives. - * - * This function does not return a status, it should throw an error if - * there is a problem completing the build. - */ - build = function (args) { - var buildFile, cmdConfig, errorMsg, errorStack, stackMatch, errorTree, - i, j, errorMod, - stackRegExp = /( {4}at[^\n]+)\n/, - standardIndent = ' '; - - return prim().start(function () { - if (!args || lang.isArray(args)) { - if (!args || args.length < 1) { - logger.error("build.js buildProfile.js\n" + - "where buildProfile.js is the name of the build file (see example.build.js for hints on how to make a build file)."); - return undefined; - } - - //Next args can include a build file path as well as other build args. - //build file path comes first. If it does not contain an = then it is - //a build file path. Otherwise, just all build args. - if (args[0].indexOf("=") === -1) { - buildFile = args[0]; - args.splice(0, 1); - } - - //Remaining args are options to the build - cmdConfig = build.convertArrayToObject(args); - cmdConfig.buildFile = buildFile; - } else { - cmdConfig = args; - } - - return build._run(cmdConfig); - }).then(null, function (e) { - var err; - - errorMsg = e.toString(); - errorTree = e.moduleTree; - stackMatch = stackRegExp.exec(errorMsg); - - if (stackMatch) { - errorMsg += errorMsg.substring(0, stackMatch.index + stackMatch[0].length + 1); - } - - //If a module tree that shows what module triggered the error, - //print it out. - if (errorTree && errorTree.length > 0) { - errorMsg += '\nIn module tree:\n'; - - for (i = errorTree.length - 1; i > -1; i--) { - errorMod = errorTree[i]; - if (errorMod) { - for (j = errorTree.length - i; j > -1; j--) { - errorMsg += standardIndent; - } - errorMsg += errorMod + '\n'; - } - } - - logger.error(errorMsg); - } - - errorStack = e.stack; - - if (typeof args === 'string' && args.indexOf('stacktrace=true') !== -1) { - errorMsg += '\n' + errorStack; - } else { - if (!stackMatch && errorStack) { - //Just trim out the first "at" in the stack. - stackMatch = stackRegExp.exec(errorStack); - if (stackMatch) { - errorMsg += '\n' + stackMatch[0] || ''; - } - } - } - - err = new Error(errorMsg); - err.originalError = e; - throw err; - }); - }; - - build._run = function (cmdConfig) { - var buildPaths, fileName, fileNames, - paths, i, - baseConfig, config, - modules, srcPath, buildContext, - destPath, moduleMap, parentModuleMap, context, - resources, resource, plugin, fileContents, - pluginProcessed = {}, - buildFileContents = "", - pluginCollector = {}; - - return prim().start(function () { - var prop; - - //Can now run the patches to require.js to allow it to be used for - //build generation. Do it here instead of at the top of the module - //because we want normal require behavior to load the build tool - //then want to switch to build mode. - requirePatch(); - - config = build.createConfig(cmdConfig); - paths = config.paths; - - //Remove the previous build dir, in case it contains source transforms, - //like the ones done with onBuildRead and onBuildWrite. - if (config.dir && !config.keepBuildDir && file.exists(config.dir)) { - file.deleteFile(config.dir); - } - - if (!config.out && !config.cssIn) { - //This is not just a one-off file build but a full build profile, with - //lots of files to process. - - //First copy all the baseUrl content - file.copyDir((config.appDir || config.baseUrl), config.dir, /\w/, true); - - //Adjust baseUrl if config.appDir is in play, and set up build output paths. - buildPaths = {}; - if (config.appDir) { - //All the paths should be inside the appDir, so just adjust - //the paths to use the dirBaseUrl - for (prop in paths) { - if (hasProp(paths, prop)) { - buildPaths[prop] = paths[prop].replace(config.appDir, config.dir); - } - } - } else { - //If no appDir, then make sure to copy the other paths to this directory. - for (prop in paths) { - if (hasProp(paths, prop)) { - //Set up build path for each path prefix, but only do so - //if the path falls out of the current baseUrl - if (paths[prop].indexOf(config.baseUrl) === 0) { - buildPaths[prop] = paths[prop].replace(config.baseUrl, config.dirBaseUrl); - } else { - buildPaths[prop] = paths[prop] === 'empty:' ? 'empty:' : prop.replace(/\./g, "/"); - - //Make sure source path is fully formed with baseUrl, - //if it is a relative URL. - srcPath = paths[prop]; - if (srcPath.indexOf('/') !== 0 && srcPath.indexOf(':') === -1) { - srcPath = config.baseUrl + srcPath; - } - - destPath = config.dirBaseUrl + buildPaths[prop]; - - //Skip empty: paths - if (srcPath !== 'empty:') { - //If the srcPath is a directory, copy the whole directory. - if (file.exists(srcPath) && file.isDirectory(srcPath)) { - //Copy files to build area. Copy all files (the /\w/ regexp) - file.copyDir(srcPath, destPath, /\w/, true); - } else { - //Try a .js extension - srcPath += '.js'; - destPath += '.js'; - file.copyFile(srcPath, destPath); - } - } - } - } - } - } - } - - //Figure out source file location for each module layer. Do this by seeding require - //with source area configuration. This is needed so that later the module layers - //can be manually copied over to the source area, since the build may be - //require multiple times and the above copyDir call only copies newer files. - require({ - baseUrl: config.baseUrl, - paths: paths, - packagePaths: config.packagePaths, - packages: config.packages - }); - buildContext = require.s.contexts._; - modules = config.modules; - - if (modules) { - modules.forEach(function (module) { - if (module.name) { - module._sourcePath = buildContext.nameToUrl(module.name); - //If the module does not exist, and this is not a "new" module layer, - //as indicated by a true "create" property on the module, and - //it is not a plugin-loaded resource, and there is no - //'rawText' containing the module's source then throw an error. - if (!file.exists(module._sourcePath) && !module.create && - module.name.indexOf('!') === -1 && - (!config.rawText || !lang.hasProp(config.rawText, module.name))) { - throw new Error("ERROR: module path does not exist: " + - module._sourcePath + " for module named: " + module.name + - ". Path is relative to: " + file.absPath('.')); - } - } - }); - } - - if (config.out) { - //Just set up the _buildPath for the module layer. - require(config); - if (!config.cssIn) { - config.modules[0]._buildPath = typeof config.out === 'function' ? - 'FUNCTION' : config.out; - } - } else if (!config.cssIn) { - //Now set up the config for require to use the build area, and calculate the - //build file locations. Pass along any config info too. - baseConfig = { - baseUrl: config.dirBaseUrl, - paths: buildPaths - }; - - lang.mixin(baseConfig, config); - require(baseConfig); - - if (modules) { - modules.forEach(function (module) { - if (module.name) { - module._buildPath = buildContext.nameToUrl(module.name, null); - if (!module.create) { - file.copyFile(module._sourcePath, module._buildPath); - } - } - }); - } - } - - //Run CSS optimizations before doing JS module tracing, to allow - //things like text loader plugins loading CSS to get the optimized - //CSS. - if (config.optimizeCss && config.optimizeCss !== "none" && config.dir) { - buildFileContents += optimize.css(config.dir, config); - } - }).then(function() { - baseConfig = lang.deeplikeCopy(require.s.contexts._.config); - }).then(function () { - var actions = []; - - if (modules) { - actions = modules.map(function (module, i) { - return function () { - //Save off buildPath to module index in a hash for quicker - //lookup later. - config._buildPathToModuleIndex[file.normalize(module._buildPath)] = i; - - //Call require to calculate dependencies. - return build.traceDependencies(module, config, baseConfig) - .then(function (layer) { - module.layer = layer; - }); - }; - }); - - return prim.serial(actions); - } - }).then(function () { - var actions; - - if (modules) { - //Now build up shadow layers for anything that should be excluded. - //Do this after tracing dependencies for each module, in case one - //of those modules end up being one of the excluded values. - actions = modules.map(function (module) { - return function () { - if (module.exclude) { - module.excludeLayers = []; - return prim.serial(module.exclude.map(function (exclude, i) { - return function () { - //See if it is already in the list of modules. - //If not trace dependencies for it. - var found = build.findBuildModule(exclude, modules); - if (found) { - module.excludeLayers[i] = found; - } else { - return build.traceDependencies({name: exclude}, config, baseConfig) - .then(function (layer) { - module.excludeLayers[i] = { layer: layer }; - }); - } - }; - })); - } - }; - }); - - return prim.serial(actions); - } - }).then(function () { - if (modules) { - return prim.serial(modules.map(function (module) { - return function () { - if (module.exclude) { - //module.exclude is an array of module names. For each one, - //get the nested dependencies for it via a matching entry - //in the module.excludeLayers array. - module.exclude.forEach(function (excludeModule, i) { - var excludeLayer = module.excludeLayers[i].layer, - map = excludeLayer.buildFileToModule; - excludeLayer.buildFilePaths.forEach(function(filePath){ - build.removeModulePath(map[filePath], filePath, module.layer); - }); - }); - } - if (module.excludeShallow) { - //module.excludeShallow is an array of module names. - //shallow exclusions are just that module itself, and not - //its nested dependencies. - module.excludeShallow.forEach(function (excludeShallowModule) { - var path = getOwn(module.layer.buildPathMap, excludeShallowModule); - if (path) { - build.removeModulePath(excludeShallowModule, path, module.layer); - } - }); - } - - //Flatten them and collect the build output for each module. - return build.flattenModule(module, module.layer, config).then(function (builtModule) { - var finalText, baseName; - //Save it to a temp file for now, in case there are other layers that - //contain optimized content that should not be included in later - //layer optimizations. See issue #56. - if (module._buildPath === 'FUNCTION') { - module._buildText = builtModule.text; - module._buildSourceMap = builtModule.sourceMap; - } else { - finalText = builtModule.text; - if (builtModule.sourceMap) { - baseName = module._buildPath.split('/'); - baseName = baseName.pop(); - finalText += '\n//# sourceMappingURL=' + baseName + '.map'; - file.saveUtf8File(module._buildPath + '.map', builtModule.sourceMap); - } - file.saveUtf8File(module._buildPath + '-temp', finalText); - - } - buildFileContents += builtModule.buildText; - }); - }; - })); - } - }).then(function () { - var moduleName; - if (modules) { - //Now move the build layers to their final position. - modules.forEach(function (module) { - var finalPath = module._buildPath; - if (finalPath !== 'FUNCTION') { - if (file.exists(finalPath)) { - file.deleteFile(finalPath); - } - file.renameFile(finalPath + '-temp', finalPath); - - //And finally, if removeCombined is specified, remove - //any of the files that were used in this layer. - //Be sure not to remove other build layers. - if (config.removeCombined && !config.out) { - module.layer.buildFilePaths.forEach(function (path) { - var isLayer = modules.some(function (mod) { - return mod._buildPath === path; - }), - relPath = build.makeRelativeFilePath(config.dir, path); - - if (file.exists(path) && - // not a build layer target - !isLayer && - // not outside the build directory - relPath.indexOf('..') !== 0) { - file.deleteFile(path); - } - }); - } - } - - //Signal layer is done - if (config.onModuleBundleComplete) { - config.onModuleBundleComplete(module.onCompleteData); - } - }); - } - - //If removeCombined in play, remove any empty directories that - //may now exist because of its use - if (config.removeCombined && !config.out && config.dir) { - file.deleteEmptyDirs(config.dir); - } - - //Do other optimizations. - if (config.out && !config.cssIn) { - //Just need to worry about one JS file. - fileName = config.modules[0]._buildPath; - if (fileName === 'FUNCTION') { - config.modules[0]._buildText = optimize.js(fileName, - config.modules[0]._buildText, - null, - config); - } else { - optimize.jsFile(fileName, null, fileName, config); - } - } else if (!config.cssIn) { - //Normal optimizations across modules. - - //JS optimizations. - fileNames = file.getFilteredFileList(config.dir, /\.js$/, true); - fileNames.forEach(function (fileName) { - var cfg, override, moduleIndex; - - //Generate the module name from the config.dir root. - moduleName = fileName.replace(config.dir, ''); - //Get rid of the extension - moduleName = moduleName.substring(0, moduleName.length - 3); - - //If there is an override for a specific layer build module, - //and this file is that module, mix in the override for use - //by optimize.jsFile. - moduleIndex = getOwn(config._buildPathToModuleIndex, fileName); - //Normalize, since getOwn could have returned undefined - moduleIndex = moduleIndex === 0 || moduleIndex > 0 ? moduleIndex : -1; - - //Try to avoid extra work if the other files do not need to - //be read. Build layers should be processed at the very - //least for optimization. - if (moduleIndex > -1 || !config.skipDirOptimize || - config.normalizeDirDefines === "all" || - config.cjsTranslate) { - //Convert the file to transport format, but without a name - //inserted (by passing null for moduleName) since the files are - //standalone, one module per file. - fileContents = file.readFile(fileName); - - - //For builds, if wanting cjs translation, do it now, so that - //the individual modules can be loaded cross domain via - //plain script tags. - if (config.cjsTranslate && - (!config.shim || !lang.hasProp(config.shim, moduleName))) { - fileContents = commonJs.convert(fileName, fileContents); - } - - if (moduleIndex === -1) { - if (config.onBuildRead) { - fileContents = config.onBuildRead(moduleName, - fileName, - fileContents); - } - - //Only do transport normalization if this is not a build - //layer (since it was already normalized) and if - //normalizeDirDefines indicated all should be done. - if (config.normalizeDirDefines === "all") { - fileContents = build.toTransport(config.namespace, - null, - fileName, - fileContents); - } - - if (config.onBuildWrite) { - fileContents = config.onBuildWrite(moduleName, - fileName, - fileContents); - } - } - - override = moduleIndex > -1 ? - config.modules[moduleIndex].override : null; - if (override) { - cfg = build.createOverrideConfig(config, override); - } else { - cfg = config; - } - - if (moduleIndex > -1 || !config.skipDirOptimize) { - optimize.jsFile(fileName, fileContents, fileName, cfg, pluginCollector); - } - } - }); - - //Normalize all the plugin resources. - context = require.s.contexts._; - - for (moduleName in pluginCollector) { - if (hasProp(pluginCollector, moduleName)) { - parentModuleMap = context.makeModuleMap(moduleName); - resources = pluginCollector[moduleName]; - for (i = 0; i < resources.length; i++) { - resource = resources[i]; - moduleMap = context.makeModuleMap(resource, parentModuleMap); - if (falseProp(context.plugins, moduleMap.prefix)) { - //Set the value in context.plugins so it - //will be evaluated as a full plugin. - context.plugins[moduleMap.prefix] = true; - - //Do not bother if the plugin is not available. - if (!file.exists(require.toUrl(moduleMap.prefix + '.js'))) { - continue; - } - - //Rely on the require in the build environment - //to be synchronous - context.require([moduleMap.prefix]); - - //Now that the plugin is loaded, redo the moduleMap - //since the plugin will need to normalize part of the path. - moduleMap = context.makeModuleMap(resource, parentModuleMap); - } - - //Only bother with plugin resources that can be handled - //processed by the plugin, via support of the writeFile - //method. - if (falseProp(pluginProcessed, moduleMap.id)) { - //Only do the work if the plugin was really loaded. - //Using an internal access because the file may - //not really be loaded. - plugin = getOwn(context.defined, moduleMap.prefix); - if (plugin && plugin.writeFile) { - plugin.writeFile( - moduleMap.prefix, - moduleMap.name, - require, - makeWriteFile( - config.namespace - ), - context.config - ); - } - - pluginProcessed[moduleMap.id] = true; - } - } - - } - } - - //console.log('PLUGIN COLLECTOR: ' + JSON.stringify(pluginCollector, null, " ")); - - - //All module layers are done, write out the build.txt file. - file.saveUtf8File(config.dir + "build.txt", buildFileContents); - } - - //If just have one CSS file to optimize, do that here. - if (config.cssIn) { - buildFileContents += optimize.cssFile(config.cssIn, config.out, config).buildText; - } - - if (typeof config.out === 'function') { - config.out(config.modules[0]._buildText); - } - - //Print out what was built into which layers. - if (buildFileContents) { - logger.info(buildFileContents); - return buildFileContents; - } - - return ''; - }); - }; - - /** - * Converts command line args like "paths.foo=../some/path" - * result.paths = { foo: '../some/path' } where prop = paths, - * name = paths.foo and value = ../some/path, so it assumes the - * name=value splitting has already happened. - */ - function stringDotToObj(result, name, value) { - var parts = name.split('.'); - - parts.forEach(function (prop, i) { - if (i === parts.length - 1) { - result[prop] = value; - } else { - if (falseProp(result, prop)) { - result[prop] = {}; - } - result = result[prop]; - } - - }); - } - - build.objProps = { - paths: true, - wrap: true, - pragmas: true, - pragmasOnSave: true, - has: true, - hasOnSave: true, - uglify: true, - uglify2: true, - closure: true, - map: true, - throwWhen: true - }; - - build.hasDotPropMatch = function (prop) { - var dotProp, - index = prop.indexOf('.'); - - if (index !== -1) { - dotProp = prop.substring(0, index); - return hasProp(build.objProps, dotProp); - } - return false; - }; - - /** - * Converts an array that has String members of "name=value" - * into an object, where the properties on the object are the names in the array. - * Also converts the strings "true" and "false" to booleans for the values. - * member name/value pairs, and converts some comma-separated lists into - * arrays. - * @param {Array} ary - */ - build.convertArrayToObject = function (ary) { - var result = {}, i, separatorIndex, prop, value, - needArray = { - "include": true, - "exclude": true, - "excludeShallow": true, - "insertRequire": true, - "stubModules": true, - "deps": true - }; - - for (i = 0; i < ary.length; i++) { - separatorIndex = ary[i].indexOf("="); - if (separatorIndex === -1) { - throw "Malformed name/value pair: [" + ary[i] + "]. Format should be name=value"; - } - - value = ary[i].substring(separatorIndex + 1, ary[i].length); - if (value === "true") { - value = true; - } else if (value === "false") { - value = false; - } - - prop = ary[i].substring(0, separatorIndex); - - //Convert to array if necessary - if (getOwn(needArray, prop)) { - value = value.split(","); - } - - if (build.hasDotPropMatch(prop)) { - stringDotToObj(result, prop, value); - } else { - result[prop] = value; - } - } - return result; //Object - }; - - build.makeAbsPath = function (path, absFilePath) { - if (!absFilePath) { - return path; - } - - //Add abspath if necessary. If path starts with a slash or has a colon, - //then already is an abolute path. - if (path.indexOf('/') !== 0 && path.indexOf(':') === -1) { - path = absFilePath + - (absFilePath.charAt(absFilePath.length - 1) === '/' ? '' : '/') + - path; - path = file.normalize(path); - } - return path.replace(lang.backSlashRegExp, '/'); - }; - - build.makeAbsObject = function (props, obj, absFilePath) { - var i, prop; - if (obj) { - for (i = 0; i < props.length; i++) { - prop = props[i]; - if (hasProp(obj, prop) && typeof obj[prop] === 'string') { - obj[prop] = build.makeAbsPath(obj[prop], absFilePath); - } - } - } - }; - - /** - * For any path in a possible config, make it absolute relative - * to the absFilePath passed in. - */ - build.makeAbsConfig = function (config, absFilePath) { - var props, prop, i; - - props = ["appDir", "dir", "baseUrl"]; - for (i = 0; i < props.length; i++) { - prop = props[i]; - - if (getOwn(config, prop)) { - //Add abspath if necessary, make sure these paths end in - //slashes - if (prop === "baseUrl") { - config.originalBaseUrl = config.baseUrl; - if (config.appDir) { - //If baseUrl with an appDir, the baseUrl is relative to - //the appDir, *not* the absFilePath. appDir and dir are - //made absolute before baseUrl, so this will work. - config.baseUrl = build.makeAbsPath(config.originalBaseUrl, config.appDir); - } else { - //The dir output baseUrl is same as regular baseUrl, both - //relative to the absFilePath. - config.baseUrl = build.makeAbsPath(config[prop], absFilePath); - } - } else { - config[prop] = build.makeAbsPath(config[prop], absFilePath); - } - - config[prop] = endsWithSlash(config[prop]); - } - } - - build.makeAbsObject(["out", "cssIn"], config, absFilePath); - build.makeAbsObject(["startFile", "endFile"], config.wrap, absFilePath); - }; - - /** - * Creates a relative path to targetPath from refPath. - * Only deals with file paths, not folders. If folders, - * make sure paths end in a trailing '/'. - */ - build.makeRelativeFilePath = function (refPath, targetPath) { - var i, dotLength, finalParts, length, - refParts = refPath.split('/'), - targetParts = targetPath.split('/'), - //Pull off file name - targetName = targetParts.pop(), - dotParts = []; - - //Also pop off the ref file name to make the matches against - //targetParts equivalent. - refParts.pop(); - - length = refParts.length; - - for (i = 0; i < length; i += 1) { - if (refParts[i] !== targetParts[i]) { - break; - } - } - - //Now i is the index in which they diverge. - finalParts = targetParts.slice(i); - - dotLength = length - i; - for (i = 0; i > -1 && i < dotLength; i += 1) { - dotParts.push('..'); - } - - return dotParts.join('/') + (dotParts.length ? '/' : '') + - finalParts.join('/') + (finalParts.length ? '/' : '') + - targetName; - }; - - build.nestedMix = { - paths: true, - has: true, - hasOnSave: true, - pragmas: true, - pragmasOnSave: true - }; - - /** - * Mixes additional source config into target config, and merges some - * nested config, like paths, correctly. - */ - function mixConfig(target, source) { - var prop, value; - - for (prop in source) { - if (hasProp(source, prop)) { - //If the value of the property is a plain object, then - //allow a one-level-deep mixing of it. - value = source[prop]; - if (typeof value === 'object' && value && - !lang.isArray(value) && !lang.isFunction(value) && - !lang.isRegExp(value)) { - target[prop] = lang.mixin({}, target[prop], value, true); - } else { - target[prop] = value; - } - } - } - - //Set up log level since it can affect if errors are thrown - //or caught and passed to errbacks while doing config setup. - if (lang.hasProp(target, 'logLevel')) { - logger.logLevel(target.logLevel); - } - } - - /** - * Converts a wrap.startFile or endFile to be start/end as a string. - * the startFile/endFile values can be arrays. - */ - function flattenWrapFile(wrap, keyName, absFilePath) { - var keyFileName = keyName + 'File'; - - if (typeof wrap[keyName] !== 'string' && wrap[keyFileName]) { - wrap[keyName] = ''; - if (typeof wrap[keyFileName] === 'string') { - wrap[keyFileName] = [wrap[keyFileName]]; - } - wrap[keyFileName].forEach(function (fileName) { - wrap[keyName] += (wrap[keyName] ? '\n' : '') + - file.readFile(build.makeAbsPath(fileName, absFilePath)); - }); - } else if (wrap[keyName] === null || wrap[keyName] === undefined) { - //Allow missing one, just set to empty string. - wrap[keyName] = ''; - } else if (typeof wrap[keyName] !== 'string') { - throw new Error('wrap.' + keyName + ' or wrap.' + keyFileName + ' malformed'); - } - } - - function normalizeWrapConfig(config, absFilePath) { - //Get any wrap text. - try { - if (config.wrap) { - if (config.wrap === true) { - //Use default values. - config.wrap = { - start: '(function () {', - end: '}());' - }; - } else { - flattenWrapFile(config.wrap, 'start', absFilePath); - flattenWrapFile(config.wrap, 'end', absFilePath); - } - } - } catch (wrapError) { - throw new Error('Malformed wrap config: ' + wrapError.toString()); - } - } - - /** - * Creates a config object for an optimization build. - * It will also read the build profile if it is available, to create - * the configuration. - * - * @param {Object} cfg config options that take priority - * over defaults and ones in the build file. These options could - * be from a command line, for instance. - * - * @param {Object} the created config object. - */ - build.createConfig = function (cfg) { - /*jslint evil: true */ - var config = {}, buildFileContents, buildFileConfig, mainConfig, - mainConfigFile, mainConfigPath, buildFile, absFilePath; - - //Make sure all paths are relative to current directory. - absFilePath = file.absPath('.'); - build.makeAbsConfig(cfg, absFilePath); - build.makeAbsConfig(buildBaseConfig, absFilePath); - - lang.mixin(config, buildBaseConfig); - lang.mixin(config, cfg, true); - - //Set up log level early since it can affect if errors are thrown - //or caught and passed to errbacks, even while constructing config. - if (lang.hasProp(config, 'logLevel')) { - logger.logLevel(config.logLevel); - } - - if (config.buildFile) { - //A build file exists, load it to get more config. - buildFile = file.absPath(config.buildFile); - - //Find the build file, and make sure it exists, if this is a build - //that has a build profile, and not just command line args with an in=path - if (!file.exists(buildFile)) { - throw new Error("ERROR: build file does not exist: " + buildFile); - } - - absFilePath = config.baseUrl = file.absPath(file.parent(buildFile)); - - //Load build file options. - buildFileContents = file.readFile(buildFile); - try { - buildFileConfig = eval("(" + buildFileContents + ")"); - build.makeAbsConfig(buildFileConfig, absFilePath); - - //Mix in the config now so that items in mainConfigFile can - //be resolved relative to them if necessary, like if appDir - //is set here, but the baseUrl is in mainConfigFile. Will - //re-mix in the same build config later after mainConfigFile - //is processed, since build config should take priority. - mixConfig(config, buildFileConfig); - } catch (e) { - throw new Error("Build file " + buildFile + " is malformed: " + e); - } - } - - mainConfigFile = config.mainConfigFile || (buildFileConfig && buildFileConfig.mainConfigFile); - if (mainConfigFile) { - mainConfigFile = build.makeAbsPath(mainConfigFile, absFilePath); - if (!file.exists(mainConfigFile)) { - throw new Error(mainConfigFile + ' does not exist.'); - } - try { - mainConfig = parse.findConfig(file.readFile(mainConfigFile)).config; - } catch (configError) { - throw new Error('The config in mainConfigFile ' + - mainConfigFile + - ' cannot be used because it cannot be evaluated' + - ' correctly while running in the optimizer. Try only' + - ' using a config that is also valid JSON, or do not use' + - ' mainConfigFile and instead copy the config values needed' + - ' into a build file or command line arguments given to the optimizer.\n' + - 'Source error from parsing: ' + mainConfigFile + ': ' + configError); - } - if (mainConfig) { - mainConfigPath = mainConfigFile.substring(0, mainConfigFile.lastIndexOf('/')); - - //Add in some existing config, like appDir, since they can be - //used inside the mainConfigFile -- paths and baseUrl are - //relative to them. - if (config.appDir && !mainConfig.appDir) { - mainConfig.appDir = config.appDir; - } - - //If no baseUrl, then use the directory holding the main config. - if (!mainConfig.baseUrl) { - mainConfig.baseUrl = mainConfigPath; - } - - build.makeAbsConfig(mainConfig, mainConfigPath); - mixConfig(config, mainConfig); - } - } - - //Mix in build file config, but only after mainConfig has been mixed in. - if (buildFileConfig) { - mixConfig(config, buildFileConfig); - } - - //Re-apply the override config values. Command line - //args should take precedence over build file values. - mixConfig(config, cfg); - - //Fix paths to full paths so that they can be adjusted consistently - //lately to be in the output area. - lang.eachProp(config.paths, function (value, prop) { - if (lang.isArray(value)) { - throw new Error('paths fallback not supported in optimizer. ' + - 'Please provide a build config path override ' + - 'for ' + prop); - } - config.paths[prop] = build.makeAbsPath(value, config.baseUrl); - }); - - //Set final output dir - if (hasProp(config, "baseUrl")) { - if (config.appDir) { - config.dirBaseUrl = build.makeAbsPath(config.originalBaseUrl, config.dir); - } else { - config.dirBaseUrl = config.dir || config.baseUrl; - } - //Make sure dirBaseUrl ends in a slash, since it is - //concatenated with other strings. - config.dirBaseUrl = endsWithSlash(config.dirBaseUrl); - } - - //Check for errors in config - if (config.main) { - throw new Error('"main" passed as an option, but the ' + - 'supported option is called "name".'); - } - if (config.out && !config.name && !config.modules && !config.include && - !config.cssIn) { - throw new Error('Missing either a "name", "include" or "modules" ' + - 'option'); - } - if (config.cssIn) { - if (config.dir || config.appDir) { - throw new Error('cssIn is only for the output of single file ' + - 'CSS optimizations and is not compatible with "dir" or "appDir" configuration.'); - } - if (!config.out) { - throw new Error('"out" option missing.'); - } - } - if (!config.cssIn && !config.baseUrl) { - //Just use the current directory as the baseUrl - config.baseUrl = './'; - } - if (!config.out && !config.dir) { - throw new Error('Missing either an "out" or "dir" config value. ' + - 'If using "appDir" for a full project optimization, ' + - 'use "dir". If you want to optimize to one file, ' + - 'use "out".'); - } - if (config.appDir && config.out) { - throw new Error('"appDir" is not compatible with "out". Use "dir" ' + - 'instead. appDir is used to copy whole projects, ' + - 'where "out" with "baseUrl" is used to just ' + - 'optimize to one file.'); - } - if (config.out && config.dir) { - throw new Error('The "out" and "dir" options are incompatible.' + - ' Use "out" if you are targeting a single file for' + - ' for optimization, and "dir" if you want the appDir' + - ' or baseUrl directories optimized.'); - } - - if (config.dir) { - // Make sure the output dir is not set to a parent of the - // source dir or the same dir, as it will result in source - // code deletion. - if (config.dir === config.baseUrl || - config.dir === config.appDir || - (config.baseUrl && build.makeRelativeFilePath(config.dir, - config.baseUrl).indexOf('..') !== 0) || - (config.appDir && - build.makeRelativeFilePath(config.dir, config.appDir).indexOf('..') !== 0)) { - throw new Error('"dir" is set to a parent or same directory as' + - ' "appDir" or "baseUrl". This can result in' + - ' the deletion of source code. Stopping.'); - } - } - - if (config.insertRequire && !lang.isArray(config.insertRequire)) { - throw new Error('insertRequire should be a list of module IDs' + - ' to insert in to a require([]) call.'); - } - - if (config.generateSourceMaps) { - if (config.preserveLicenseComments && config.optimize !== 'none') { - throw new Error('Cannot use preserveLicenseComments and ' + - 'generateSourceMaps together. Either explcitly set ' + - 'preserveLicenseComments to false (default is true) or ' + - 'turn off generateSourceMaps. If you want source maps with ' + - 'license comments, see: ' + - 'http://requirejs.org/docs/errors.html#sourcemapcomments'); - } else if (config.optimize !== 'none' && - config.optimize !== 'closure' && - config.optimize !== 'uglify2') { - //Allow optimize: none to pass, since it is useful when toggling - //minification on and off to debug something, and it implicitly - //works, since it does not need a source map. - throw new Error('optimize: "' + config.optimize + - '" does not support generateSourceMaps.'); - } - } - - if ((config.name || config.include) && !config.modules) { - //Just need to build one file, but may be part of a whole appDir/ - //baseUrl copy, but specified on the command line, so cannot do - //the modules array setup. So create a modules section in that - //case. - config.modules = [ - { - name: config.name, - out: config.out, - create: config.create, - include: config.include, - exclude: config.exclude, - excludeShallow: config.excludeShallow, - insertRequire: config.insertRequire, - stubModules: config.stubModules - } - ]; - delete config.stubModules; - } else if (config.modules && config.out) { - throw new Error('If the "modules" option is used, then there ' + - 'should be a "dir" option set and "out" should ' + - 'not be used since "out" is only for single file ' + - 'optimization output.'); - } else if (config.modules && config.name) { - throw new Error('"name" and "modules" options are incompatible. ' + - 'Either use "name" if doing a single file ' + - 'optimization, or "modules" if you want to target ' + - 'more than one file for optimization.'); - } - - if (config.out && !config.cssIn) { - //Just one file to optimize. - - //Does not have a build file, so set up some defaults. - //Optimizing CSS should not be allowed, unless explicitly - //asked for on command line. In that case the only task is - //to optimize a CSS file. - if (!cfg.optimizeCss) { - config.optimizeCss = "none"; - } - } - - //Normalize cssPrefix - if (config.cssPrefix) { - //Make sure cssPrefix ends in a slash - config.cssPrefix = endsWithSlash(config.cssPrefix); - } else { - config.cssPrefix = ''; - } - - //Cycle through modules and combine any local stubModules with - //global values. - if (config.modules && config.modules.length) { - config.modules.forEach(function (mod) { - if (config.stubModules) { - mod.stubModules = config.stubModules.concat(mod.stubModules || []); - } - - //Create a hash lookup for the stubModules config to make lookup - //cheaper later. - if (mod.stubModules) { - mod.stubModules._byName = {}; - mod.stubModules.forEach(function (id) { - mod.stubModules._byName[id] = true; - }); - } - - //Allow wrap config in overrides, but normalize it. - if (mod.override) { - normalizeWrapConfig(mod.override, absFilePath); - } - }); - } - - normalizeWrapConfig(config, absFilePath); - - //Do final input verification - if (config.context) { - throw new Error('The build argument "context" is not supported' + - ' in a build. It should only be used in web' + - ' pages.'); - } - - //Set up normalizeDirDefines. If not explicitly set, if optimize "none", - //set to "skip" otherwise set to "all". - if (!hasProp(config, 'normalizeDirDefines')) { - if (config.optimize === 'none' || config.skipDirOptimize) { - config.normalizeDirDefines = 'skip'; - } else { - config.normalizeDirDefines = 'all'; - } - } - - //Set file.fileExclusionRegExp if desired - if (hasProp(config, 'fileExclusionRegExp')) { - if (typeof config.fileExclusionRegExp === "string") { - file.exclusionRegExp = new RegExp(config.fileExclusionRegExp); - } else { - file.exclusionRegExp = config.fileExclusionRegExp; - } - } else if (hasProp(config, 'dirExclusionRegExp')) { - //Set file.dirExclusionRegExp if desired, this is the old - //name for fileExclusionRegExp before 1.0.2. Support for backwards - //compatibility - file.exclusionRegExp = config.dirExclusionRegExp; - } - - //Remove things that may cause problems in the build. - delete config.jQuery; - delete config.enforceDefine; - delete config.urlArgs; - - return config; - }; - - /** - * finds the module being built/optimized with the given moduleName, - * or returns null. - * @param {String} moduleName - * @param {Array} modules - * @returns {Object} the module object from the build profile, or null. - */ - build.findBuildModule = function (moduleName, modules) { - var i, module; - for (i = 0; i < modules.length; i++) { - module = modules[i]; - if (module.name === moduleName) { - return module; - } - } - return null; - }; - - /** - * Removes a module name and path from a layer, if it is supposed to be - * excluded from the layer. - * @param {String} moduleName the name of the module - * @param {String} path the file path for the module - * @param {Object} layer the layer to remove the module/path from - */ - build.removeModulePath = function (module, path, layer) { - var index = layer.buildFilePaths.indexOf(path); - if (index !== -1) { - layer.buildFilePaths.splice(index, 1); - } - }; - - /** - * Uses the module build config object to trace the dependencies for the - * given module. - * - * @param {Object} module the module object from the build config info. - * @param {Object} config the build config object. - * @param {Object} [baseLoaderConfig] the base loader config to use for env resets. - * - * @returns {Object} layer information about what paths and modules should - * be in the flattened module. - */ - build.traceDependencies = function (module, config, baseLoaderConfig) { - var include, override, layer, context, oldContext, - rawTextByIds, - syncChecks = { - rhino: true, - node: true, - xpconnect: true - }, - deferred = prim(); - - //Reset some state set up in requirePatch.js, and clean up require's - //current context. - oldContext = require._buildReset(); - - //Grab the reset layer and context after the reset, but keep the - //old config to reuse in the new context. - layer = require._layer; - context = layer.context; - - //Put back basic config, use a fresh object for it. - if (baseLoaderConfig) { - require(lang.deeplikeCopy(baseLoaderConfig)); - } - - logger.trace("\nTracing dependencies for: " + (module.name || - (typeof module.out === 'function' ? 'FUNCTION' : module.out))); - include = module.name && !module.create ? [module.name] : []; - if (module.include) { - include = include.concat(module.include); - } - - //If there are overrides to basic config, set that up now.; - if (module.override) { - if (baseLoaderConfig) { - override = build.createOverrideConfig(baseLoaderConfig, module.override); - } else { - override = lang.deeplikeCopy(module.override); - } - require(override); - } - - //Now, populate the rawText cache with any values explicitly passed in - //via config. - rawTextByIds = require.s.contexts._.config.rawText; - if (rawTextByIds) { - lang.eachProp(rawTextByIds, function (contents, id) { - var url = require.toUrl(id) + '.js'; - require._cachedRawText[url] = contents; - }); - } - - - //Configure the callbacks to be called. - deferred.reject.__requireJsBuild = true; - - //Use a wrapping function so can check for errors. - function includeFinished(value) { - //If a sync build environment, check for errors here, instead of - //in the then callback below, since some errors, like two IDs pointed - //to same URL but only one anon ID will leave the loader in an - //unresolved state since a setTimeout cannot be used to check for - //timeout. - var hasError = false; - if (syncChecks[env.get()]) { - try { - build.checkForErrors(context); - } catch (e) { - hasError = true; - deferred.reject(e); - } - } - - if (!hasError) { - deferred.resolve(value); - } - } - includeFinished.__requireJsBuild = true; - - //Figure out module layer dependencies by calling require to do the work. - require(include, includeFinished, deferred.reject); - - // If a sync env, then with the "two IDs to same anon module path" - // issue, the require never completes, need to check for errors - // here. - if (syncChecks[env.get()]) { - build.checkForErrors(context); - } - - return deferred.promise.then(function () { - //Reset config - if (module.override && baseLoaderConfig) { - require(lang.deeplikeCopy(baseLoaderConfig)); - } - - build.checkForErrors(context); - - return layer; - }); - }; - - build.checkForErrors = function (context) { - //Check to see if it all loaded. If not, then throw, and give - //a message on what is left. - var id, prop, mod, idParts, pluginId, - errMessage = '', - failedPluginMap = {}, - failedPluginIds = [], - errIds = [], - errUrlMap = {}, - errUrlConflicts = {}, - hasErrUrl = false, - hasUndefined = false, - defined = context.defined, - registry = context.registry; - - function populateErrUrlMap(id, errUrl, skipNew) { - if (!skipNew) { - errIds.push(id); - } - - if (errUrlMap[errUrl]) { - hasErrUrl = true; - //This error module has the same URL as another - //error module, could be misconfiguration. - if (!errUrlConflicts[errUrl]) { - errUrlConflicts[errUrl] = []; - //Store the original module that had the same URL. - errUrlConflicts[errUrl].push(errUrlMap[errUrl]); - } - errUrlConflicts[errUrl].push(id); - } else if (!skipNew) { - errUrlMap[errUrl] = id; - } - } - - for (id in registry) { - if (hasProp(registry, id) && id.indexOf('_@r') !== 0) { - hasUndefined = true; - mod = getOwn(registry, id); - - if (id.indexOf('_unnormalized') === -1 && mod && mod.enabled) { - populateErrUrlMap(id, mod.map.url); - } - - //Look for plugins that did not call load() - idParts = id.split('!'); - pluginId = idParts[0]; - if (idParts.length > 1 && falseProp(failedPluginMap, pluginId)) { - failedPluginIds.push(pluginId); - failedPluginMap[pluginId] = true; - } - } - } - - // If have some modules that are not defined/stuck in the registry, - // then check defined modules for URL overlap. - if (hasUndefined) { - for (id in defined) { - if (hasProp(defined, id) && id.indexOf('!') === -1) { - populateErrUrlMap(id, require.toUrl(id) + '.js', true); - } - } - } - - if (errIds.length || failedPluginIds.length) { - if (failedPluginIds.length) { - errMessage += 'Loader plugin' + - (failedPluginIds.length === 1 ? '' : 's') + - ' did not call ' + - 'the load callback in the build: ' + - failedPluginIds.join(', ') + '\n'; - } - errMessage += 'Module loading did not complete for: ' + errIds.join(', '); - - if (hasErrUrl) { - errMessage += '\nThe following modules share the same URL. This ' + - 'could be a misconfiguration if that URL only has ' + - 'one anonymous module in it:'; - for (prop in errUrlConflicts) { - if (hasProp(errUrlConflicts, prop)) { - errMessage += '\n' + prop + ': ' + - errUrlConflicts[prop].join(', '); - } - } - } - throw new Error(errMessage); - } - }; - - build.createOverrideConfig = function (config, override) { - var cfg = lang.deeplikeCopy(config), - oride = lang.deeplikeCopy(override); - - lang.eachProp(oride, function (value, prop) { - if (hasProp(build.objProps, prop)) { - //An object property, merge keys. Start a new object - //so that source object in config does not get modified. - cfg[prop] = {}; - lang.mixin(cfg[prop], config[prop], true); - lang.mixin(cfg[prop], override[prop], true); - } else { - cfg[prop] = override[prop]; - } - }); - - return cfg; - }; - - /** - * Uses the module build config object to create an flattened version - * of the module, with deep dependencies included. - * - * @param {Object} module the module object from the build config info. - * - * @param {Object} layer the layer object returned from build.traceDependencies. - * - * @param {Object} the build config object. - * - * @returns {Object} with two properties: "text", the text of the flattened - * module, and "buildText", a string of text representing which files were - * included in the flattened module text. - */ - build.flattenModule = function (module, layer, config) { - var fileContents, sourceMapGenerator, - sourceMapBase, - buildFileContents = ''; - - return prim().start(function () { - var reqIndex, currContents, - moduleName, shim, packageConfig, nonPackageName, - parts, builder, writeApi, - namespace, namespaceWithDot, stubModulesByName, - context = layer.context, - onLayerEnds = [], - onLayerEndAdded = {}; - - //Use override settings, particularly for pragmas - //Do this before the var readings since it reads config values. - if (module.override) { - config = build.createOverrideConfig(config, module.override); - } - - namespace = config.namespace || ''; - namespaceWithDot = namespace ? namespace + '.' : ''; - stubModulesByName = (module.stubModules && module.stubModules._byName) || {}; - - //Start build output for the module. - module.onCompleteData = { - name: module.name, - path: (config.dir ? module._buildPath.replace(config.dir, "") : module._buildPath), - included: [] - }; - - buildFileContents += "\n" + - module.onCompleteData.path + - "\n----------------\n"; - - //If there was an existing file with require in it, hoist to the top. - if (layer.existingRequireUrl) { - reqIndex = layer.buildFilePaths.indexOf(layer.existingRequireUrl); - if (reqIndex !== -1) { - layer.buildFilePaths.splice(reqIndex, 1); - layer.buildFilePaths.unshift(layer.existingRequireUrl); - } - } - - if (config.generateSourceMaps) { - sourceMapBase = config.dir || config.baseUrl; - sourceMapGenerator = new SourceMapGenerator.SourceMapGenerator({ - file: module._buildPath.replace(sourceMapBase, '') - }); - } - - //Write the built module to disk, and build up the build output. - fileContents = ""; - return prim.serial(layer.buildFilePaths.map(function (path) { - return function () { - var lineCount, - singleContents = ''; - - moduleName = layer.buildFileToModule[path]; - //If the moduleName is for a package main, then update it to the - //real main value. - packageConfig = layer.context.config.pkgs && - getOwn(layer.context.config.pkgs, moduleName); - if (packageConfig) { - nonPackageName = moduleName; - moduleName += '/' + packageConfig.main; - } - - return prim().start(function () { - //Figure out if the module is a result of a build plugin, and if so, - //then delegate to that plugin. - parts = context.makeModuleMap(moduleName); - builder = parts.prefix && getOwn(context.defined, parts.prefix); - if (builder) { - if (builder.onLayerEnd && falseProp(onLayerEndAdded, parts.prefix)) { - onLayerEnds.push(builder); - onLayerEndAdded[parts.prefix] = true; - } - - if (builder.write) { - writeApi = function (input) { - singleContents += "\n" + addSemiColon(input, config); - if (config.onBuildWrite) { - singleContents = config.onBuildWrite(moduleName, path, singleContents); - } - }; - writeApi.asModule = function (moduleName, input) { - singleContents += "\n" + - addSemiColon(build.toTransport(namespace, moduleName, path, input, layer, { - useSourceUrl: layer.context.config.useSourceUrl - }), config); - if (config.onBuildWrite) { - singleContents = config.onBuildWrite(moduleName, path, singleContents); - } - }; - builder.write(parts.prefix, parts.name, writeApi); - } - return; - } else { - return prim().start(function () { - if (hasProp(stubModulesByName, moduleName)) { - //Just want to insert a simple module definition instead - //of the source module. Useful for plugins that inline - //all their resources. - if (hasProp(layer.context.plugins, moduleName)) { - //Slightly different content for plugins, to indicate - //that dynamic loading will not work. - return 'define({load: function(id){throw new Error("Dynamic load not allowed: " + id);}});'; - } else { - return 'define({});'; - } - } else { - return require._cacheReadAsync(path); - } - }).then(function (text) { - var hasPackageName; - - currContents = text; - - if (config.cjsTranslate && - (!config.shim || !lang.hasProp(config.shim, moduleName))) { - currContents = commonJs.convert(path, currContents); - } - - if (config.onBuildRead) { - currContents = config.onBuildRead(moduleName, path, currContents); - } - - if (packageConfig) { - hasPackageName = (nonPackageName === parse.getNamedDefine(currContents)); - } - - if (namespace) { - currContents = pragma.namespace(currContents, namespace); - } - - currContents = build.toTransport(namespace, moduleName, path, currContents, layer, { - useSourceUrl: config.useSourceUrl - }); - - if (packageConfig && !hasPackageName) { - currContents = addSemiColon(currContents, config) + '\n'; - currContents += namespaceWithDot + "define('" + - packageConfig.name + "', ['" + moduleName + - "'], function (main) { return main; });\n"; - } - - if (config.onBuildWrite) { - currContents = config.onBuildWrite(moduleName, path, currContents); - } - - //Semicolon is for files that are not well formed when - //concatenated with other content. - singleContents += "\n" + addSemiColon(currContents, config); - }); - } - }).then(function () { - var refPath, pluginId, resourcePath, - sourceMapPath, sourceMapLineNumber, - shortPath = path.replace(config.dir, ""); - - module.onCompleteData.included.push(shortPath); - buildFileContents += shortPath + "\n"; - - //Some files may not have declared a require module, and if so, - //put in a placeholder call so the require does not try to load them - //after the module is processed. - //If we have a name, but no defined module, then add in the placeholder. - if (moduleName && falseProp(layer.modulesWithNames, moduleName) && !config.skipModuleInsertion) { - shim = config.shim && (getOwn(config.shim, moduleName) || (packageConfig && getOwn(config.shim, nonPackageName))); - if (shim) { - singleContents += '\n' + namespaceWithDot + 'define("' + moduleName + '", ' + - (shim.deps && shim.deps.length ? - build.makeJsArrayString(shim.deps) + ', ' : '') + - (shim.exportsFn ? shim.exportsFn() : 'function(){}') + - ');\n'; - } else { - singleContents += '\n' + namespaceWithDot + 'define("' + moduleName + '", function(){});\n'; - } - } - - //Add to the source map - if (sourceMapGenerator) { - refPath = config.out ? config.baseUrl : module._buildPath; - parts = path.split('!'); - if (parts.length === 1) { - //Not a plugin resource, fix the path - sourceMapPath = build.makeRelativeFilePath(refPath, path); - } else { - //Plugin resource. If it looks like just a plugin - //followed by a module ID, pull off the plugin - //and put it at the end of the name, otherwise - //just leave it alone. - pluginId = parts.shift(); - resourcePath = parts.join('!'); - if (resourceIsModuleIdRegExp.test(resourcePath)) { - sourceMapPath = build.makeRelativeFilePath(refPath, require.toUrl(resourcePath)) + - '!' + pluginId; - } else { - sourceMapPath = path; - } - } - - sourceMapLineNumber = fileContents.split('\n').length - 1; - lineCount = singleContents.split('\n').length; - for (var i = 1; i <= lineCount; i += 1) { - sourceMapGenerator.addMapping({ - generated: { - line: sourceMapLineNumber + i, - column: 0 - }, - original: { - line: i, - column: 0 - }, - source: sourceMapPath - }); - } - - //Store the content of the original in the source - //map since other transforms later like minification - //can mess up translating back to the original - //source. - sourceMapGenerator.setSourceContent(sourceMapPath, singleContents); - } - - //Add the file to the final contents - fileContents += singleContents; - }); - }; - })).then(function () { - if (onLayerEnds.length) { - onLayerEnds.forEach(function (builder) { - var path; - if (typeof module.out === 'string') { - path = module.out; - } else if (typeof module._buildPath === 'string') { - path = module._buildPath; - } - builder.onLayerEnd(function (input) { - fileContents += "\n" + addSemiColon(input, config); - }, { - name: module.name, - path: path - }); - }); - } - - if (module.create) { - //The ID is for a created layer. Write out - //a module definition for it in case the - //built file is used with enforceDefine - //(#432) - fileContents += '\n' + namespaceWithDot + 'define("' + module.name + '", function(){});\n'; - } - - //Add a require at the end to kick start module execution, if that - //was desired. Usually this is only specified when using small shim - //loaders like almond. - if (module.insertRequire) { - fileContents += '\n' + namespaceWithDot + 'require(["' + module.insertRequire.join('", "') + '"]);\n'; - } - }); - }).then(function () { - return { - text: config.wrap ? - config.wrap.start + fileContents + config.wrap.end : - fileContents, - buildText: buildFileContents, - sourceMap: sourceMapGenerator ? - JSON.stringify(sourceMapGenerator.toJSON(), null, ' ') : - undefined - }; - }); - }; - - //Converts an JS array of strings to a string representation. - //Not using JSON.stringify() for Rhino's sake. - build.makeJsArrayString = function (ary) { - return '["' + ary.map(function (item) { - //Escape any double quotes, backslashes - return lang.jsEscape(item); - }).join('","') + '"]'; - }; - - build.toTransport = function (namespace, moduleName, path, contents, layer, options) { - var baseUrl = layer && layer.context.config.baseUrl; - - function onFound(info) { - //Only mark this module as having a name if not a named module, - //or if a named module and the name matches expectations. - if (layer && (info.needsId || info.foundId === moduleName)) { - layer.modulesWithNames[moduleName] = true; - } - } - - //Convert path to be a local one to the baseUrl, useful for - //useSourceUrl. - if (baseUrl) { - path = path.replace(baseUrl, ''); - } - - return transform.toTransport(namespace, moduleName, path, contents, onFound, options); - }; - - return build; -}); - - } - - - /** - * Sets the default baseUrl for requirejs to be directory of top level - * script. - */ - function setBaseUrl(fileName) { - //Use the file name's directory as the baseUrl if available. - dir = fileName.replace(/\\/g, '/'); - if (dir.indexOf('/') !== -1) { - dir = dir.split('/'); - dir.pop(); - dir = dir.join('/'); - //Make sure dir is JS-escaped, since it will be part of a JS string. - exec("require({baseUrl: '" + dir.replace(/[\\"']/g, '\\$&') + "'});"); - } - } - - function createRjsApi() { - //Create a method that will run the optimzer given an object - //config. - requirejs.optimize = function (config, callback, errback) { - if (!loadedOptimizedLib) { - loadLib(); - loadedOptimizedLib = true; - } - - //Create the function that will be called once build modules - //have been loaded. - var runBuild = function (build, logger, quit) { - //Make sure config has a log level, and if not, - //make it "silent" by default. - config.logLevel = config.hasOwnProperty('logLevel') ? - config.logLevel : logger.SILENT; - - //Reset build internals first in case this is part - //of a long-running server process that could have - //exceptioned out in a bad state. It is only defined - //after the first call though. - if (requirejs._buildReset) { - requirejs._buildReset(); - requirejs._cacheReset(); - } - - function done(result) { - //And clean up, in case something else triggers - //a build in another pathway. - if (requirejs._buildReset) { - requirejs._buildReset(); - requirejs._cacheReset(); - } - - // Ensure errors get propagated to the errback - if (result instanceof Error) { - throw result; - } - - return result; - } - - errback = errback || function (err) { - // Using console here since logger may have - // turned off error logging. Since quit is - // called want to be sure a message is printed. - console.log(err); - quit(1); - }; - - build(config).then(done, done).then(callback, errback); - }; - - requirejs({ - context: 'build' - }, ['build', 'logger', 'env!env/quit'], runBuild); - }; - - requirejs.tools = { - useLib: function (contextName, callback) { - if (!callback) { - callback = contextName; - contextName = 'uselib'; - } - - if (!useLibLoaded[contextName]) { - loadLib(); - useLibLoaded[contextName] = true; - } - - var req = requirejs({ - context: contextName - }); - - req(['build'], function () { - callback(req); - }); - } - }; - - requirejs.define = define; - } - - //If in Node, and included via a require('requirejs'), just export and - //THROW IT ON THE GROUND! - if (env === 'node' && reqMain !== module) { - setBaseUrl(path.resolve(reqMain ? reqMain.filename : '.')); - - createRjsApi(); - - module.exports = requirejs; - return; - } else if (env === 'browser') { - //Only option is to use the API. - setBaseUrl(location.href); - createRjsApi(); - return; - } else if ((env === 'rhino' || env === 'xpconnect') && - //User sets up requirejsAsLib variable to indicate it is loaded - //via load() to be used as a library. - typeof requirejsAsLib !== 'undefined' && requirejsAsLib) { - //This script is loaded via rhino's load() method, expose the - //API and get out. - setBaseUrl(fileName); - createRjsApi(); - return; - } - - if (commandOption === 'o') { - //Do the optimizer work. - loadLib(); - - /** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/* - * Create a build.js file that has the build options you want and pass that - * build file to this file to do the build. See example.build.js for more information. - */ - -/*jslint strict: false, nomen: false */ -/*global require: false */ - -require({ - baseUrl: require.s.contexts._.config.baseUrl, - //Use a separate context than the default context so that the - //build can use the default context. - context: 'build', - catchError: { - define: true - } -}, ['env!env/args', 'env!env/quit', 'logger', 'build'], -function (args, quit, logger, build) { - build(args).then(function () {}, function (err) { - logger.error(err); - quit(1); - }); -}); - - - } else if (commandOption === 'v') { - console.log('r.js: ' + version + - ', RequireJS: ' + this.requirejsVars.require.version + - ', UglifyJS2: 2.4.0, UglifyJS: 1.3.4'); - } else if (commandOption === 'convert') { - loadLib(); - - this.requirejsVars.require(['env!env/args', 'commonJs', 'env!env/print'], - function (args, commonJs, print) { - - var srcDir, outDir; - srcDir = args[0]; - outDir = args[1]; - - if (!srcDir || !outDir) { - print('Usage: path/to/commonjs/modules output/dir'); - return; - } - - commonJs.convertDir(args[0], args[1]); - }); - } else { - //Just run an app - - //Load the bundled libraries for use in the app. - if (commandOption === 'lib') { - loadLib(); - } - - setBaseUrl(fileName); - - if (exists(fileName)) { - exec(readFile(fileName), fileName); - } else { - showHelp(); - } - } - -}((typeof console !== 'undefined' ? console : undefined), - (typeof Packages !== 'undefined' || (typeof window === 'undefined' && - typeof Components !== 'undefined' && Components.interfaces) ? - Array.prototype.slice.call(arguments, 0) : []), - (typeof readFile !== 'undefined' ? readFile : undefined))); diff --git a/node_modules/karma-chrome-launcher/LICENSE b/node_modules/karma-chrome-launcher/LICENSE deleted file mode 100644 index 40727341..00000000 --- a/node_modules/karma-chrome-launcher/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-chrome-launcher/README.md b/node_modules/karma-chrome-launcher/README.md deleted file mode 100644 index 33975adc..00000000 --- a/node_modules/karma-chrome-launcher/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# karma-chrome-launcher - -> Launcher for Google Chrome and Google Chrome Canary. - -## Installation - -**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)** - -The easiest way is to keep `karma-chrome-launcher` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-chrome-launcher": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-chrome-launcher --save-dev -``` - -## Configuration -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - browsers: ['Chrome', 'Chrome_without_security'], - - // you can define custom flags - customLaunchers: { - Chrome_without_security: { - base: 'Chrome', - flags: ['--disable-web-security'] - } - } - }); -}; -``` - -You can pass list of browsers as a CLI argument too: -```bash -karma start --browsers Chrome,Chrome_without_security -``` - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com diff --git a/node_modules/karma-chrome-launcher/index.js b/node_modules/karma-chrome-launcher/index.js deleted file mode 100644 index ea8a2a8b..00000000 --- a/node_modules/karma-chrome-launcher/index.js +++ /dev/null @@ -1,83 +0,0 @@ -var fs = require('fs'); - -var ChromeBrowser = function(baseBrowserDecorator, args) { - baseBrowserDecorator(this); - - var flags = args.flags || []; - - this._getOptions = function(url) { - // Chrome CLI options - // http://peter.sh/experiments/chromium-command-line-switches/ - return [ - '--user-data-dir=' + this._tempDir, - '--no-default-browser-check', - '--no-first-run', - '--disable-default-apps', - '--start-maximized' - ].concat(flags, [url]); - }; -}; - -// Return location of chrome.exe file for a given Chrome directory (available: "Chrome", "Chrome SxS"). -function getChromeExe(chromeDirName) { - if (process.platform !== 'win32') { - return null; - } - var windowsChromeDirectory, i, prefix; - var suffix = '\\Google\\'+ chromeDirName + '\\Application\\chrome.exe'; - var prefixes = [process.env.LOCALAPPDATA, process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)']]; - - for (i = 0; i < prefixes.length; i++) { - prefix = prefixes[i]; - if (fs.existsSync(prefix + suffix)) { - windowsChromeDirectory = prefix + suffix; - break; - } - } - - return windowsChromeDirectory; -} - -ChromeBrowser.prototype = { - name: 'Chrome', - - DEFAULT_CMD: { - linux: 'google-chrome', - darwin: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', - win32: getChromeExe('Chrome') - }, - ENV_CMD: 'CHROME_BIN' -}; - -ChromeBrowser.$inject = ['baseBrowserDecorator', 'args']; - - -var ChromeCanaryBrowser = function(baseBrowserDecorator, args) { - ChromeBrowser.call(this, baseBrowserDecorator, args); - - var parentOptions = this._getOptions; - this._getOptions = function(url) { - // disable crankshaft optimizations, as it causes lot of memory leaks (as of Chrome 23.0) - return parentOptions.call(this, url).concat(['--js-flags="--nocrankshaft --noopt"']); - }; -}; - -ChromeCanaryBrowser.prototype = { - name: 'ChromeCanary', - - DEFAULT_CMD: { - linux: 'google-chrome-canary', - darwin: '/Applications/Google Chrome Canary.app/Contents/MacOS/Google Chrome Canary', - win32: getChromeExe('Chrome SxS') - }, - ENV_CMD: 'CHROME_CANARY_BIN' -}; - -ChromeCanaryBrowser.$inject = ['baseBrowserDecorator', 'args']; - - -// PUBLISH DI MODULE -module.exports = { - 'launcher:Chrome': ['type', ChromeBrowser], - 'launcher:ChromeCanary': ['type', ChromeCanaryBrowser] -}; diff --git a/node_modules/karma-chrome-launcher/package.json b/node_modules/karma-chrome-launcher/package.json deleted file mode 100644 index d66a7e0b..00000000 --- a/node_modules/karma-chrome-launcher/package.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "karma-chrome-launcher", - "version": "0.1.1", - "description": "A Karma plugin. Launcher for Chrome and Chrome Canary.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-chrome-launcher.git" - }, - "keywords": [ - "karma-plugin", - "karma-launcher", - "chrome" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": {}, - "peerDependencies": { - "karma": ">=0.9.3" - }, - "license": "MIT", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.6", - "grunt-auto-release": "~0.0.2" - }, - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - }, - { - "name": "Joe Doyle", - "email": "valdain@gmail.com" - }, - { - "name": "Michał Gołębiowski", - "email": "m.goleb@gmail.com" - } - ], - "readme": "# karma-chrome-launcher\n\n> Launcher for Google Chrome and Google Chrome Canary.\n\n## Installation\n\n**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)**\n\nThe easiest way is to keep `karma-chrome-launcher` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-chrome-launcher\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-chrome-launcher --save-dev\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n browsers: ['Chrome', 'Chrome_without_security'],\n\n // you can define custom flags\n customLaunchers: {\n Chrome_without_security: {\n base: 'Chrome',\n flags: ['--disable-web-security']\n }\n }\n });\n};\n```\n\nYou can pass list of browsers as a CLI argument too:\n```bash\nkarma start --browsers Chrome,Chrome_without_security\n```\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-chrome-launcher/issues" - }, - "homepage": "https://github.com/karma-runner/karma-chrome-launcher", - "_id": "karma-chrome-launcher@0.1.1", - "_from": "karma-chrome-launcher@*" -} diff --git a/node_modules/karma-coffee-preprocessor/LICENSE b/node_modules/karma-coffee-preprocessor/LICENSE deleted file mode 100644 index 40727341..00000000 --- a/node_modules/karma-coffee-preprocessor/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-coffee-preprocessor/README.md b/node_modules/karma-coffee-preprocessor/README.md deleted file mode 100644 index 9c34627b..00000000 --- a/node_modules/karma-coffee-preprocessor/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# karma-coffee-preprocessor - -> Preprocessor to compile CoffeeScript on the fly. - -## Installation - -**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)** - -The easiest way is to keep `karma-coffee-preprocessor` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-coffee-preprocessor": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-coffee-preprocessor --save-dev -``` - -## Configuration -Following code shows the default configuration... -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - preprocessors: { - '**/*.coffee': ['coffee'] - }, - - coffeePreprocessor: { - // options passed to the coffee compiler - options: { - bare: true, - sourceMap: false - }, - // transforming the filenames - transformPath: function(path) { - return path.replace(/\.js$/, '.coffee'); - } - } - }); -}; -``` - -If you set the `sourceMap` coffee compiler option to `true` then the generated source map will be inlined as a data-uri. - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com diff --git a/node_modules/karma-coffee-preprocessor/index.js b/node_modules/karma-coffee-preprocessor/index.js deleted file mode 100644 index 0c177470..00000000 --- a/node_modules/karma-coffee-preprocessor/index.js +++ /dev/null @@ -1,53 +0,0 @@ -var coffee = require('coffee-script'); -var path = require('path'); -var createCoffeePreprocessor = function(args, config, logger, helper) { - config = config || {}; - - var log = logger.create('preprocessor.coffee'); - var defaultOptions = { - bare: true, - sourceMap: false - }; - var options = helper.merge(defaultOptions, args.options || {}, config.options || {}); - - var transformPath = args.transformPath || config.transformPath || function(filepath) { - return filepath.replace(/\.coffee$/, '.js'); - }; - - return function(content, file, done) { - var result = null; - var map; - var datauri; - - log.debug('Processing "%s".', file.originalPath); - file.path = transformPath(file.originalPath); - - // Clone the options because coffee.compile mutates them - var opts = helper._.clone(options) - - try { - result = coffee.compile(content, opts); - } catch (e) { - log.error('%s\n at %s:%d', e.message, file.originalPath, e.location.first_line); - return; - } - - if (result.v3SourceMap) { - map = JSON.parse(result.v3SourceMap) - map.sources[0] = path.basename(file.originalPath) - map.sourcesContent = [content] - map.file = path.basename(file.path) - datauri = 'data:application/json;charset=utf-8;base64,' + new Buffer(JSON.stringify(map)).toString('base64') - done(result.js + '\n//@ sourceMappingURL=' + datauri + '\n'); - } else { - done(result.js || result) - } - }; -}; - -createCoffeePreprocessor.$inject = ['args', 'config.coffeePreprocessor', 'logger', 'helper']; - -// PUBLISH DI MODULE -module.exports = { - 'preprocessor:coffee': ['factory', createCoffeePreprocessor] -}; diff --git a/node_modules/karma-coffee-preprocessor/node_modules/.bin/cake b/node_modules/karma-coffee-preprocessor/node_modules/.bin/cake deleted file mode 100755 index 5965f4ee..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/.bin/cake +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/cake').run(); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/.bin/coffee b/node_modules/karma-coffee-preprocessor/node_modules/.bin/coffee deleted file mode 100755 index 3d1d71c8..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/.bin/coffee +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/command').run(); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/.npmignore b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/.npmignore deleted file mode 100644 index 21e430d2..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -*.coffee -*.html -.DS_Store -.git* -Cakefile -documentation/ -examples/ -extras/coffee-script.js -raw/ -src/ -test/ diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/CNAME b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/CNAME deleted file mode 100644 index faadabe5..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/CNAME +++ /dev/null @@ -1 +0,0 @@ -coffeescript.org \ No newline at end of file diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/CONTRIBUTING.md b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/CONTRIBUTING.md deleted file mode 100644 index 6390c68b..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -## How to contribute to CoffeeScript - -* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffee-script/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. - -* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffee-script/tree/master/test). - -* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffee-script/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide). - -* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release. \ No newline at end of file diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/LICENSE b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/LICENSE deleted file mode 100644 index a396eaed..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2009-2013 Jeremy Ashkenas - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/README b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/README deleted file mode 100644 index 69ee6f43..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/README +++ /dev/null @@ -1,51 +0,0 @@ - - { - } } { - { { } } - } }{ { - { }{ } } _____ __ __ - ( }{ }{ { ) / ____| / _|/ _| - .- { { } { }} -. | | ___ | |_| |_ ___ ___ - ( ( } { } { } } ) | | / _ \| _| _/ _ \/ _ \ - |`-..________ ..-'| | |___| (_) | | | || __/ __/ - | | \_____\___/|_| |_| \___|\___| - | ;--. - | (__ \ _____ _ _ - | | ) ) / ____| (_) | | - | |/ / | (___ ___ _ __ _ _ __ | |_ - | ( / \___ \ / __| '__| | '_ \| __| - | |/ ____) | (__| | | | |_) | |_ - | | |_____/ \___|_| |_| .__/ \__| - `-.._________..-' | | - |_| - - - CoffeeScript is a little language that compiles into JavaScript. - - Install Node.js, and then the CoffeeScript compiler: - sudo bin/cake install - - Or, if you have the Node Package Manager installed: - npm install -g coffee-script - (Leave off the -g if you don't wish to install globally.) - - Execute a script: - coffee /path/to/script.coffee - - Compile a script: - coffee -c /path/to/script.coffee - - For documentation, usage, and examples, see: - http://coffeescript.org/ - - To suggest a feature, report a bug, or general discussion: - http://github.com/jashkenas/coffee-script/issues/ - - If you'd like to chat, drop by #coffeescript on Freenode IRC, - or on webchat.freenode.net. - - The source repository: - git://github.com/jashkenas/coffee-script.git - - All contributors are listed here: - http://github.com/jashkenas/coffee-script/contributors diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/Rakefile b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/Rakefile deleted file mode 100644 index d90cce36..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/Rakefile +++ /dev/null @@ -1,79 +0,0 @@ -require 'rubygems' -require 'erb' -require 'fileutils' -require 'rake/testtask' -require 'json' - -desc "Build the documentation page" -task :doc do - source = 'documentation/index.html.erb' - child = fork { exec "bin/coffee -bcw -o documentation/js documentation/coffee/*.coffee" } - at_exit { Process.kill("INT", child) } - Signal.trap("INT") { exit } - loop do - mtime = File.stat(source).mtime - if !@mtime || mtime > @mtime - rendered = ERB.new(File.read(source)).result(binding) - File.open('index.html', 'w+') {|f| f.write(rendered) } - end - @mtime = mtime - sleep 1 - end -end - -desc "Build coffee-script-source gem" -task :gem do - require 'rubygems' - require 'rubygems/package' - - gemspec = Gem::Specification.new do |s| - s.name = 'coffee-script-source' - s.version = JSON.parse(File.read('package.json'))["version"] - s.date = Time.now.strftime("%Y-%m-%d") - - s.homepage = "http://jashkenas.github.com/coffee-script/" - s.summary = "The CoffeeScript Compiler" - s.description = <<-EOS - CoffeeScript is a little language that compiles into JavaScript. - Underneath all of those embarrassing braces and semicolons, - JavaScript has always had a gorgeous object model at its heart. - CoffeeScript is an attempt to expose the good parts of JavaScript - in a simple way. - EOS - - s.files = [ - 'lib/coffee_script/coffee-script.js', - 'lib/coffee_script/source.rb' - ] - - s.authors = ['Jeremy Ashkenas'] - s.email = 'jashkenas@gmail.com' - s.rubyforge_project = 'coffee-script-source' - s.license = "MIT" - end - - file = File.open("coffee-script-source.gem", "w") - Gem::Package.open(file, 'w') do |pkg| - pkg.metadata = gemspec.to_yaml - - path = "lib/coffee_script/source.rb" - contents = <<-ERUBY -module CoffeeScript - module Source - def self.bundled_path - File.expand_path("../coffee-script.js", __FILE__) - end - end -end - ERUBY - pkg.add_file_simple(path, 0644, contents.size) do |tar_io| - tar_io.write(contents) - end - - contents = File.read("extras/coffee-script.js") - path = "lib/coffee_script/coffee-script.js" - pkg.add_file_simple(path, 0644, contents.size) do |tar_io| - tar_io.write(contents) - end - end -end diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/bin/cake b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/bin/cake deleted file mode 100755 index 5965f4ee..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/bin/cake +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/cake').run(); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/bin/coffee b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/bin/coffee deleted file mode 100755 index 3d1d71c8..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/bin/coffee +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/command').run(); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/browser.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/browser.js deleted file mode 100644 index e5411d8c..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/browser.js +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, compile, runScripts, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - CoffeeScript = require('./coffee-script'); - - CoffeeScript.require = require; - - compile = CoffeeScript.compile; - - CoffeeScript["eval"] = function(code, options) { - if (options == null) { - options = {}; - } - if (options.bare == null) { - options.bare = true; - } - return eval(compile(code, options)); - }; - - CoffeeScript.run = function(code, options) { - if (options == null) { - options = {}; - } - options.bare = true; - options.shiftLine = true; - return Function(compile(code, options))(); - }; - - if (typeof window === "undefined" || window === null) { - return; - } - - if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) && (typeof unescape !== "undefined" && unescape !== null) && (typeof encodeURIComponent !== "undefined" && encodeURIComponent !== null)) { - compile = function(code, options) { - var js, v3SourceMap, _ref; - if (options == null) { - options = {}; - } - options.sourceMap = true; - options.inline = true; - _ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap; - return "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + (btoa(unescape(encodeURIComponent(v3SourceMap)))) + "\n//@ sourceURL=coffeescript"; - }; - } - - CoffeeScript.load = function(url, callback, options) { - var xhr; - if (options == null) { - options = {}; - } - options.sourceFiles = [url]; - xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest(); - xhr.open('GET', url, true); - if ('overrideMimeType' in xhr) { - xhr.overrideMimeType('text/plain'); - } - xhr.onreadystatechange = function() { - var _ref; - if (xhr.readyState === 4) { - if ((_ref = xhr.status) === 0 || _ref === 200) { - CoffeeScript.run(xhr.responseText, options); - } else { - throw new Error("Could not load " + url); - } - if (callback) { - return callback(); - } - } - }; - return xhr.send(null); - }; - - runScripts = function() { - var coffees, coffeetypes, execute, index, length, s, scripts; - scripts = window.document.getElementsByTagName('script'); - coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']; - coffees = (function() { - var _i, _len, _ref, _results; - _results = []; - for (_i = 0, _len = scripts.length; _i < _len; _i++) { - s = scripts[_i]; - if (_ref = s.type, __indexOf.call(coffeetypes, _ref) >= 0) { - _results.push(s); - } - } - return _results; - })(); - index = 0; - length = coffees.length; - (execute = function() { - var mediatype, options, script; - script = coffees[index++]; - mediatype = script != null ? script.type : void 0; - if (__indexOf.call(coffeetypes, mediatype) >= 0) { - options = { - literate: mediatype === 'text/literate-coffeescript' - }; - if (script.src) { - return CoffeeScript.load(script.src, execute, options); - } else { - options.sourceFiles = ['embedded']; - CoffeeScript.run(script.innerHTML, options); - return execute(); - } - } - })(); - return null; - }; - - if (window.addEventListener) { - window.addEventListener('DOMContentLoaded', runScripts, false); - } else { - window.attachEvent('onload', runScripts); - } - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/cake.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/cake.js deleted file mode 100644 index 68bd7c30..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/cake.js +++ /dev/null @@ -1,114 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; - - fs = require('fs'); - - path = require('path'); - - helpers = require('./helpers'); - - optparse = require('./optparse'); - - CoffeeScript = require('./coffee-script'); - - existsSync = fs.existsSync || path.existsSync; - - tasks = {}; - - options = {}; - - switches = []; - - oparse = null; - - helpers.extend(global, { - task: function(name, description, action) { - var _ref; - if (!action) { - _ref = [description, action], action = _ref[0], description = _ref[1]; - } - return tasks[name] = { - name: name, - description: description, - action: action - }; - }, - option: function(letter, flag, description) { - return switches.push([letter, flag, description]); - }, - invoke: function(name) { - if (!tasks[name]) { - missingTask(name); - } - return tasks[name].action(options); - } - }); - - exports.run = function() { - var arg, args, e, _i, _len, _ref, _results; - global.__originalDirname = fs.realpathSync('.'); - process.chdir(cakefileDirectory(__originalDirname)); - args = process.argv.slice(2); - CoffeeScript.run(fs.readFileSync('Cakefile').toString(), { - filename: 'Cakefile' - }); - oparse = new optparse.OptionParser(switches); - if (!args.length) { - return printTasks(); - } - try { - options = oparse.parse(args); - } catch (_error) { - e = _error; - return fatalError("" + e); - } - _ref = options["arguments"]; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - arg = _ref[_i]; - _results.push(invoke(arg)); - } - return _results; - }; - - printTasks = function() { - var cakefilePath, desc, name, relative, spaces, task; - relative = path.relative || path.resolve; - cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile'); - console.log("" + cakefilePath + " defines the following tasks:\n"); - for (name in tasks) { - task = tasks[name]; - spaces = 20 - name.length; - spaces = spaces > 0 ? Array(spaces + 1).join(' ') : ''; - desc = task.description ? "# " + task.description : ''; - console.log("cake " + name + spaces + " " + desc); - } - if (switches.length) { - return console.log(oparse.help()); - } - }; - - fatalError = function(message) { - console.error(message + '\n'); - console.log('To see a list of all tasks/options, run "cake"'); - return process.exit(1); - }; - - missingTask = function(task) { - return fatalError("No such task: " + task); - }; - - cakefileDirectory = function(dir) { - var parent; - if (existsSync(path.join(dir, 'Cakefile'))) { - return dir; - } - parent = path.normalize(path.join(dir, '..')); - if (parent !== dir) { - return cakefileDirectory(parent); - } - throw new Error("Cakefile not found in " + (process.cwd())); - }; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/coffee-script.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/coffee-script.js deleted file mode 100644 index 11ccd810..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/coffee-script.js +++ /dev/null @@ -1,358 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Lexer, Module, SourceMap, child_process, compile, ext, findExtension, fork, formatSourcePosition, fs, helpers, lexer, loadFile, parser, patchStackTrace, patched, path, sourceMaps, vm, _i, _len, _ref, - __hasProp = {}.hasOwnProperty; - - fs = require('fs'); - - vm = require('vm'); - - path = require('path'); - - child_process = require('child_process'); - - Lexer = require('./lexer').Lexer; - - parser = require('./parser').parser; - - helpers = require('./helpers'); - - SourceMap = require('./sourcemap'); - - exports.VERSION = '1.6.3'; - - exports.helpers = helpers; - - exports.compile = compile = function(code, options) { - var answer, currentColumn, currentLine, fragment, fragments, header, js, map, merge, newLines, _i, _len; - if (options == null) { - options = {}; - } - merge = helpers.merge; - if (options.sourceMap) { - map = new SourceMap; - } - fragments = parser.parse(lexer.tokenize(code, options)).compileToFragments(options); - currentLine = 0; - if (options.header) { - currentLine += 1; - } - if (options.shiftLine) { - currentLine += 1; - } - currentColumn = 0; - js = ""; - for (_i = 0, _len = fragments.length; _i < _len; _i++) { - fragment = fragments[_i]; - if (options.sourceMap) { - if (fragment.locationData) { - map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { - noReplace: true - }); - } - newLines = helpers.count(fragment.code, "\n"); - currentLine += newLines; - currentColumn = fragment.code.length - (newLines ? fragment.code.lastIndexOf("\n") : 0); - } - js += fragment.code; - } - if (options.header) { - header = "Generated by CoffeeScript " + this.VERSION; - js = "// " + header + "\n" + js; - } - if (options.sourceMap) { - answer = { - js: js - }; - answer.sourceMap = map; - answer.v3SourceMap = map.generate(options, code); - return answer; - } else { - return js; - } - }; - - exports.tokens = function(code, options) { - return lexer.tokenize(code, options); - }; - - exports.nodes = function(source, options) { - if (typeof source === 'string') { - return parser.parse(lexer.tokenize(source, options)); - } else { - return parser.parse(source); - } - }; - - exports.run = function(code, options) { - var answer, mainModule; - if (options == null) { - options = {}; - } - mainModule = require.main; - if (options.sourceMap == null) { - options.sourceMap = true; - } - mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.'; - mainModule.moduleCache && (mainModule.moduleCache = {}); - mainModule.paths = require('module')._nodeModulePaths(path.dirname(fs.realpathSync(options.filename || '.'))); - if (!helpers.isCoffee(mainModule.filename) || require.extensions) { - answer = compile(code, options); - patchStackTrace(); - sourceMaps[mainModule.filename] = answer.sourceMap; - return mainModule._compile(answer.js, mainModule.filename); - } else { - return mainModule._compile(code, mainModule.filename); - } - }; - - exports["eval"] = function(code, options) { - var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref, _ref1, _require; - if (options == null) { - options = {}; - } - if (!(code = code.trim())) { - return; - } - Script = vm.Script; - if (Script) { - if (options.sandbox != null) { - if (options.sandbox instanceof Script.createContext().constructor) { - sandbox = options.sandbox; - } else { - sandbox = Script.createContext(); - _ref = options.sandbox; - for (k in _ref) { - if (!__hasProp.call(_ref, k)) continue; - v = _ref[k]; - sandbox[k] = v; - } - } - sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox; - } else { - sandbox = global; - } - sandbox.__filename = options.filename || 'eval'; - sandbox.__dirname = path.dirname(sandbox.__filename); - if (!(sandbox !== global || sandbox.module || sandbox.require)) { - Module = require('module'); - sandbox.module = _module = new Module(options.modulename || 'eval'); - sandbox.require = _require = function(path) { - return Module._load(path, _module, true); - }; - _module.filename = sandbox.__filename; - _ref1 = Object.getOwnPropertyNames(require); - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - r = _ref1[_i]; - if (r !== 'paths') { - _require[r] = require[r]; - } - } - _require.paths = _module.paths = Module._nodeModulePaths(process.cwd()); - _require.resolve = function(request) { - return Module._resolveFilename(request, _module); - }; - } - } - o = {}; - for (k in options) { - if (!__hasProp.call(options, k)) continue; - v = options[k]; - o[k] = v; - } - o.bare = true; - js = compile(code, o); - if (sandbox === global) { - return vm.runInThisContext(js); - } else { - return vm.runInContext(js, sandbox); - } - }; - - loadFile = function(module, filename) { - var answer, raw, stripped; - raw = fs.readFileSync(filename, 'utf8'); - stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; - answer = compile(stripped, { - filename: filename, - sourceMap: true, - literate: helpers.isLiterate(filename) - }); - sourceMaps[filename] = answer.sourceMap; - return module._compile(answer.js, filename); - }; - - if (require.extensions) { - _ref = ['.coffee', '.litcoffee', '.coffee.md']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ext = _ref[_i]; - require.extensions[ext] = loadFile; - } - Module = require('module'); - findExtension = function(filename) { - var curExtension, extensions; - extensions = path.basename(filename).split('.'); - if (extensions[0] === '') { - extensions.shift(); - } - while (extensions.shift()) { - curExtension = '.' + extensions.join('.'); - if (Module._extensions[curExtension]) { - return curExtension; - } - } - return '.js'; - }; - Module.prototype.load = function(filename) { - var extension; - this.filename = filename; - this.paths = Module._nodeModulePaths(path.dirname(filename)); - extension = findExtension(filename); - Module._extensions[extension](this, filename); - return this.loaded = true; - }; - } - - if (child_process) { - fork = child_process.fork; - child_process.fork = function(path, args, options) { - var execPath; - if (args == null) { - args = []; - } - if (options == null) { - options = {}; - } - execPath = helpers.isCoffee(path) ? 'coffee' : null; - if (!Array.isArray(args)) { - args = []; - options = args || {}; - } - options.execPath || (options.execPath = execPath); - return fork(path, args, options); - }; - } - - lexer = new Lexer; - - parser.lexer = { - lex: function() { - var tag, token; - token = this.tokens[this.pos++]; - if (token) { - tag = token[0], this.yytext = token[1], this.yylloc = token[2]; - this.yylineno = this.yylloc.first_line; - } else { - tag = ''; - } - return tag; - }, - setInput: function(tokens) { - this.tokens = tokens; - return this.pos = 0; - }, - upcomingInput: function() { - return ""; - } - }; - - parser.yy = require('./nodes'); - - parser.yy.parseError = function(message, _arg) { - var token; - token = _arg.token; - message = "unexpected " + (token === 1 ? 'end of input' : token); - return helpers.throwSyntaxError(message, parser.lexer.yylloc); - }; - - patched = false; - - sourceMaps = {}; - - patchStackTrace = function() { - var mainModule; - if (patched) { - return; - } - patched = true; - mainModule = require.main; - return Error.prepareStackTrace = function(err, stack) { - var frame, frames, getSourceMapping, sourceFiles, _ref1; - sourceFiles = {}; - getSourceMapping = function(filename, line, column) { - var answer, sourceMap; - sourceMap = sourceMaps[filename]; - if (sourceMap) { - answer = sourceMap.sourceLocation([line - 1, column - 1]); - } - if (answer) { - return [answer[0] + 1, answer[1] + 1]; - } else { - return null; - } - }; - frames = (function() { - var _j, _len1, _results; - _results = []; - for (_j = 0, _len1 = stack.length; _j < _len1; _j++) { - frame = stack[_j]; - if (frame.getFunction() === exports.run) { - break; - } - _results.push(" at " + (formatSourcePosition(frame, getSourceMapping))); - } - return _results; - })(); - return "" + err.name + ": " + ((_ref1 = err.message) != null ? _ref1 : '') + "\n" + (frames.join('\n')) + "\n"; - }; - }; - - formatSourcePosition = function(frame, getSourceMapping) { - var as, column, fileLocation, fileName, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName; - fileName = void 0; - fileLocation = ''; - if (frame.isNative()) { - fileLocation = "native"; - } else { - if (frame.isEval()) { - fileName = frame.getScriptNameOrSourceURL(); - if (!fileName) { - fileLocation = "" + (frame.getEvalOrigin()) + ", "; - } - } else { - fileName = frame.getFileName(); - } - fileName || (fileName = ""); - line = frame.getLineNumber(); - column = frame.getColumnNumber(); - source = getSourceMapping(fileName, line, column); - fileLocation = source ? "" + fileName + ":" + source[0] + ":" + source[1] + ", :" + line + ":" + column : "" + fileName + ":" + line + ":" + column; - } - functionName = frame.getFunctionName(); - isConstructor = frame.isConstructor(); - isMethodCall = !(frame.isToplevel() || isConstructor); - if (isMethodCall) { - methodName = frame.getMethodName(); - typeName = frame.getTypeName(); - if (functionName) { - tp = as = ''; - if (typeName && functionName.indexOf(typeName)) { - tp = "" + typeName + "."; - } - if (methodName && functionName.indexOf("." + methodName) !== functionName.length - methodName.length - 1) { - as = " [as " + methodName + "]"; - } - return "" + tp + functionName + as + " (" + fileLocation + ")"; - } else { - return "" + typeName + "." + (methodName || '') + " (" + fileLocation + ")"; - } - } else if (isConstructor) { - return "new " + (functionName || '') + " (" + fileLocation + ")"; - } else if (functionName) { - return "" + functionName + " (" + fileLocation + ")"; - } else { - return fileLocation; - } - }; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/command.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/command.js deleted file mode 100644 index 26b25540..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/command.js +++ /dev/null @@ -1,526 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, useWinPathSep, version, wait, watch, watchDir, watchers, writeJs, _ref; - - fs = require('fs'); - - path = require('path'); - - helpers = require('./helpers'); - - optparse = require('./optparse'); - - CoffeeScript = require('./coffee-script'); - - _ref = require('child_process'), spawn = _ref.spawn, exec = _ref.exec; - - EventEmitter = require('events').EventEmitter; - - exists = fs.exists || path.exists; - - useWinPathSep = path.sep === '\\'; - - helpers.extend(CoffeeScript, new EventEmitter); - - printLine = function(line) { - return process.stdout.write(line + '\n'); - }; - - printWarn = function(line) { - return process.stderr.write(line + '\n'); - }; - - hidden = function(file) { - return /^\.|~$/.test(file); - }; - - BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.'; - - SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; - - opts = {}; - - sources = []; - - sourceCode = []; - - notSources = {}; - - watchers = {}; - - optionParser = null; - - exports.run = function() { - var literals, source, _i, _len, _results; - parseOptions(); - if (opts.nodejs) { - return forkNode(); - } - if (opts.help) { - return usage(); - } - if (opts.version) { - return version(); - } - if (opts.interactive) { - return require('./repl').start(); - } - if (opts.watch && !fs.watch) { - return printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + "."); - } - if (opts.stdio) { - return compileStdio(); - } - if (opts["eval"]) { - return compileScript(null, sources[0]); - } - if (!sources.length) { - return require('./repl').start(); - } - literals = opts.run ? sources.splice(1) : []; - process.argv = process.argv.slice(0, 2).concat(literals); - process.argv[0] = 'coffee'; - _results = []; - for (_i = 0, _len = sources.length; _i < _len; _i++) { - source = sources[_i]; - _results.push(compilePath(source, true, path.normalize(source))); - } - return _results; - }; - - compilePath = function(source, topLevel, base) { - return fs.stat(source, function(err, stats) { - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - console.error("File not found: " + source); - process.exit(1); - } - if (stats.isDirectory() && path.dirname(source) !== 'node_modules') { - if (opts.watch) { - watchDir(source, base); - } - return fs.readdir(source, function(err, files) { - var file, index, _ref1, _ref2; - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - return; - } - index = sources.indexOf(source); - files = files.filter(function(file) { - return !hidden(file); - }); - [].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _results.push(path.join(source, file)); - } - return _results; - })())), _ref1; - [].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() { - return null; - }))), _ref2; - return files.forEach(function(file) { - return compilePath(path.join(source, file), false, base); - }); - }); - } else if (topLevel || helpers.isCoffee(source)) { - if (opts.watch) { - watch(source, base); - } - return fs.readFile(source, function(err, code) { - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - return; - } - return compileScript(source, code.toString(), base); - }); - } else { - notSources[source] = true; - return removeSource(source, base); - } - }); - }; - - compileScript = function(file, input, base) { - var compiled, err, message, o, options, t, task, useColors; - if (base == null) { - base = null; - } - o = opts; - options = compileOptions(file, base); - try { - t = task = { - file: file, - input: input, - options: options - }; - CoffeeScript.emit('compile', task); - if (o.tokens) { - return printTokens(CoffeeScript.tokens(t.input, t.options)); - } else if (o.nodes) { - return printLine(CoffeeScript.nodes(t.input, t.options).toString().trim()); - } else if (o.run) { - return CoffeeScript.run(t.input, t.options); - } else if (o.join && t.file !== o.join) { - if (helpers.isLiterate(file)) { - t.input = helpers.invertLiterate(t.input); - } - sourceCode[sources.indexOf(t.file)] = t.input; - return compileJoin(); - } else { - compiled = CoffeeScript.compile(t.input, t.options); - t.output = compiled; - if (o.map) { - t.output = compiled.js; - t.sourceMap = compiled.v3SourceMap; - } - CoffeeScript.emit('success', task); - if (o.print) { - return printLine(t.output.trim()); - } else if (o.compile || o.map) { - return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap); - } - } - } catch (_error) { - err = _error; - CoffeeScript.emit('failure', err, task); - if (CoffeeScript.listeners('failure').length) { - return; - } - useColors = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS; - message = helpers.prettyErrorMessage(err, file || '[stdin]', input, useColors); - if (o.watch) { - return printLine(message + '\x07'); - } else { - printWarn(message); - return process.exit(1); - } - } - }; - - compileStdio = function() { - var code, stdin; - code = ''; - stdin = process.openStdin(); - stdin.on('data', function(buffer) { - if (buffer) { - return code += buffer.toString(); - } - }); - return stdin.on('end', function() { - return compileScript(null, code); - }); - }; - - joinTimeout = null; - - compileJoin = function() { - if (!opts.join) { - return; - } - if (!sourceCode.some(function(code) { - return code === null; - })) { - clearTimeout(joinTimeout); - return joinTimeout = wait(100, function() { - return compileScript(opts.join, sourceCode.join('\n'), opts.join); - }); - } - }; - - watch = function(source, base) { - var compile, compileTimeout, e, prevStats, rewatch, watchErr, watcher; - prevStats = null; - compileTimeout = null; - watchErr = function(e) { - if (e.code === 'ENOENT') { - if (sources.indexOf(source) === -1) { - return; - } - try { - rewatch(); - return compile(); - } catch (_error) { - e = _error; - removeSource(source, base, true); - return compileJoin(); - } - } else { - throw e; - } - }; - compile = function() { - clearTimeout(compileTimeout); - return compileTimeout = wait(25, function() { - return fs.stat(source, function(err, stats) { - if (err) { - return watchErr(err); - } - if (prevStats && stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime()) { - return rewatch(); - } - prevStats = stats; - return fs.readFile(source, function(err, code) { - if (err) { - return watchErr(err); - } - compileScript(source, code.toString(), base); - return rewatch(); - }); - }); - }); - }; - try { - watcher = fs.watch(source, compile); - } catch (_error) { - e = _error; - watchErr(e); - } - return rewatch = function() { - if (watcher != null) { - watcher.close(); - } - return watcher = fs.watch(source, compile); - }; - }; - - watchDir = function(source, base) { - var e, readdirTimeout, watcher; - readdirTimeout = null; - try { - return watcher = fs.watch(source, function() { - clearTimeout(readdirTimeout); - return readdirTimeout = wait(25, function() { - return fs.readdir(source, function(err, files) { - var file, _i, _len, _results; - if (err) { - if (err.code !== 'ENOENT') { - throw err; - } - watcher.close(); - return unwatchDir(source, base); - } - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - if (!(!hidden(file) && !notSources[file])) { - continue; - } - file = path.join(source, file); - if (sources.some(function(s) { - return s.indexOf(file) >= 0; - })) { - continue; - } - sources.push(file); - sourceCode.push(null); - _results.push(compilePath(file, false, base)); - } - return _results; - }); - }); - }); - } catch (_error) { - e = _error; - if (e.code !== 'ENOENT') { - throw e; - } - } - }; - - unwatchDir = function(source, base) { - var file, prevSources, toRemove, _i, _len; - prevSources = sources.slice(0); - toRemove = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = sources.length; _i < _len; _i++) { - file = sources[_i]; - if (file.indexOf(source) >= 0) { - _results.push(file); - } - } - return _results; - })(); - for (_i = 0, _len = toRemove.length; _i < _len; _i++) { - file = toRemove[_i]; - removeSource(file, base, true); - } - if (!sources.some(function(s, i) { - return prevSources[i] !== s; - })) { - return; - } - return compileJoin(); - }; - - removeSource = function(source, base, removeJs) { - var index, jsPath; - index = sources.indexOf(source); - sources.splice(index, 1); - sourceCode.splice(index, 1); - if (removeJs && !opts.join) { - jsPath = outputPath(source, base); - return exists(jsPath, function(itExists) { - if (itExists) { - return fs.unlink(jsPath, function(err) { - if (err && err.code !== 'ENOENT') { - throw err; - } - return timeLog("removed " + source); - }); - } - }); - } - }; - - outputPath = function(source, base, extension) { - var baseDir, basename, dir, srcDir; - if (extension == null) { - extension = ".js"; - } - basename = helpers.baseFileName(source, true, useWinPathSep); - srcDir = path.dirname(source); - baseDir = base === '.' ? srcDir : srcDir.substring(base.length); - dir = opts.output ? path.join(opts.output, baseDir) : srcDir; - return path.join(dir, basename + extension); - }; - - writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) { - var compile, jsDir, sourceMapPath; - if (generatedSourceMap == null) { - generatedSourceMap = null; - } - sourceMapPath = outputPath(sourcePath, base, ".map"); - jsDir = path.dirname(jsPath); - compile = function() { - if (opts.compile) { - if (js.length <= 0) { - js = ' '; - } - if (generatedSourceMap) { - js = "" + js + "\n/*\n//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n*/\n"; - } - fs.writeFile(jsPath, js, function(err) { - if (err) { - return printLine(err.message); - } else if (opts.compile && opts.watch) { - return timeLog("compiled " + sourcePath); - } - }); - } - if (generatedSourceMap) { - return fs.writeFile(sourceMapPath, generatedSourceMap, function(err) { - if (err) { - return printLine("Could not write source map: " + err.message); - } - }); - } - }; - return exists(jsDir, function(itExists) { - if (itExists) { - return compile(); - } else { - return exec("mkdir -p " + jsDir, compile); - } - }); - }; - - wait = function(milliseconds, func) { - return setTimeout(func, milliseconds); - }; - - timeLog = function(message) { - return console.log("" + ((new Date).toLocaleTimeString()) + " - " + message); - }; - - printTokens = function(tokens) { - var strings, tag, token, value; - strings = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = tokens.length; _i < _len; _i++) { - token = tokens[_i]; - tag = token[0]; - value = token[1].toString().replace(/\n/, '\\n'); - _results.push("[" + tag + " " + value + "]"); - } - return _results; - })(); - return printLine(strings.join(' ')); - }; - - parseOptions = function() { - var i, o, source, _i, _len; - optionParser = new optparse.OptionParser(SWITCHES, BANNER); - o = opts = optionParser.parse(process.argv.slice(2)); - o.compile || (o.compile = !!o.output); - o.run = !(o.compile || o.print || o.map); - o.print = !!(o.print || (o["eval"] || o.stdio && o.compile)); - sources = o["arguments"]; - for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) { - source = sources[i]; - sourceCode[i] = null; - } - }; - - compileOptions = function(filename, base) { - var answer, cwd, jsDir, jsPath; - answer = { - filename: filename, - literate: opts.literate || helpers.isLiterate(filename), - bare: opts.bare, - header: opts.compile, - sourceMap: opts.map - }; - if (filename) { - if (base) { - cwd = process.cwd(); - jsPath = outputPath(filename, base); - jsDir = path.dirname(jsPath); - answer = helpers.merge(answer, { - jsPath: jsPath, - sourceRoot: path.relative(jsDir, cwd), - sourceFiles: [path.relative(cwd, filename)], - generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep) - }); - } else { - answer = helpers.merge(answer, { - sourceRoot: "", - sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)], - generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js" - }); - } - } - return answer; - }; - - forkNode = function() { - var args, nodeArgs; - nodeArgs = opts.nodejs.split(/\s+/); - args = process.argv.slice(1); - args.splice(args.indexOf('--nodejs'), 2); - return spawn(process.execPath, nodeArgs.concat(args), { - cwd: process.cwd(), - env: process.env, - customFds: [0, 1, 2] - }); - }; - - usage = function() { - return printLine((new optparse.OptionParser(SWITCHES, BANNER)).help()); - }; - - version = function() { - return printLine("CoffeeScript version " + CoffeeScript.VERSION); - }; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/grammar.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/grammar.js deleted file mode 100644 index 24d5bacc..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/grammar.js +++ /dev/null @@ -1,625 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; - - Parser = require('jison').Parser; - - unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/; - - o = function(patternString, action, options) { - var addLocationDataFn, match, patternCount; - patternString = patternString.replace(/\s{2,}/g, ' '); - patternCount = patternString.split(' ').length; - if (!action) { - return [patternString, '$$ = $1;', options]; - } - action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())"; - action = action.replace(/\bnew /g, '$&yy.'); - action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&'); - addLocationDataFn = function(first, last) { - if (!last) { - return "yy.addLocationDataFn(@" + first + ")"; - } else { - return "yy.addLocationDataFn(@" + first + ", @" + last + ")"; - } - }; - action = action.replace(/LOC\(([0-9]*)\)/g, addLocationDataFn('$1')); - action = action.replace(/LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2')); - return [patternString, "$$ = " + (addLocationDataFn(1, patternCount)) + "(" + action + ");", options]; - }; - - grammar = { - Root: [ - o('', function() { - return new Block; - }), o('Body'), o('Block TERMINATOR') - ], - Body: [ - o('Line', function() { - return Block.wrap([$1]); - }), o('Body TERMINATOR Line', function() { - return $1.push($3); - }), o('Body TERMINATOR') - ], - Line: [o('Expression'), o('Statement')], - Statement: [ - o('Return'), o('Comment'), o('STATEMENT', function() { - return new Literal($1); - }) - ], - Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class'), o('Throw')], - Block: [ - o('INDENT OUTDENT', function() { - return new Block; - }), o('INDENT Body OUTDENT', function() { - return $2; - }) - ], - Identifier: [ - o('IDENTIFIER', function() { - return new Literal($1); - }) - ], - AlphaNumeric: [ - o('NUMBER', function() { - return new Literal($1); - }), o('STRING', function() { - return new Literal($1); - }) - ], - Literal: [ - o('AlphaNumeric'), o('JS', function() { - return new Literal($1); - }), o('REGEX', function() { - return new Literal($1); - }), o('DEBUGGER', function() { - return new Literal($1); - }), o('UNDEFINED', function() { - return new Undefined; - }), o('NULL', function() { - return new Null; - }), o('BOOL', function() { - return new Bool($1); - }) - ], - Assign: [ - o('Assignable = Expression', function() { - return new Assign($1, $3); - }), o('Assignable = TERMINATOR Expression', function() { - return new Assign($1, $4); - }), o('Assignable = INDENT Expression OUTDENT', function() { - return new Assign($1, $4); - }) - ], - AssignObj: [ - o('ObjAssignable', function() { - return new Value($1); - }), o('ObjAssignable : Expression', function() { - return new Assign(LOC(1)(new Value($1)), $3, 'object'); - }), o('ObjAssignable :\ - INDENT Expression OUTDENT', function() { - return new Assign(LOC(1)(new Value($1)), $4, 'object'); - }), o('Comment') - ], - ObjAssignable: [o('Identifier'), o('AlphaNumeric'), o('ThisProperty')], - Return: [ - o('RETURN Expression', function() { - return new Return($2); - }), o('RETURN', function() { - return new Return; - }) - ], - Comment: [ - o('HERECOMMENT', function() { - return new Comment($1); - }) - ], - Code: [ - o('PARAM_START ParamList PARAM_END FuncGlyph Block', function() { - return new Code($2, $5, $4); - }), o('FuncGlyph Block', function() { - return new Code([], $2, $1); - }) - ], - FuncGlyph: [ - o('->', function() { - return 'func'; - }), o('=>', function() { - return 'boundfunc'; - }) - ], - OptComma: [o(''), o(',')], - ParamList: [ - o('', function() { - return []; - }), o('Param', function() { - return [$1]; - }), o('ParamList , Param', function() { - return $1.concat($3); - }), o('ParamList OptComma TERMINATOR Param', function() { - return $1.concat($4); - }), o('ParamList OptComma INDENT ParamList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Param: [ - o('ParamVar', function() { - return new Param($1); - }), o('ParamVar ...', function() { - return new Param($1, null, true); - }), o('ParamVar = Expression', function() { - return new Param($1, $3); - }) - ], - ParamVar: [o('Identifier'), o('ThisProperty'), o('Array'), o('Object')], - Splat: [ - o('Expression ...', function() { - return new Splat($1); - }) - ], - SimpleAssignable: [ - o('Identifier', function() { - return new Value($1); - }), o('Value Accessor', function() { - return $1.add($2); - }), o('Invocation Accessor', function() { - return new Value($1, [].concat($2)); - }), o('ThisProperty') - ], - Assignable: [ - o('SimpleAssignable'), o('Array', function() { - return new Value($1); - }), o('Object', function() { - return new Value($1); - }) - ], - Value: [ - o('Assignable'), o('Literal', function() { - return new Value($1); - }), o('Parenthetical', function() { - return new Value($1); - }), o('Range', function() { - return new Value($1); - }), o('This') - ], - Accessor: [ - o('. Identifier', function() { - return new Access($2); - }), o('?. Identifier', function() { - return new Access($2, 'soak'); - }), o(':: Identifier', function() { - return [LOC(1)(new Access(new Literal('prototype'))), LOC(2)(new Access($2))]; - }), o('?:: Identifier', function() { - return [LOC(1)(new Access(new Literal('prototype'), 'soak')), LOC(2)(new Access($2))]; - }), o('::', function() { - return new Access(new Literal('prototype')); - }), o('Index') - ], - Index: [ - o('INDEX_START IndexValue INDEX_END', function() { - return $2; - }), o('INDEX_SOAK Index', function() { - return extend($2, { - soak: true - }); - }) - ], - IndexValue: [ - o('Expression', function() { - return new Index($1); - }), o('Slice', function() { - return new Slice($1); - }) - ], - Object: [ - o('{ AssignList OptComma }', function() { - return new Obj($2, $1.generated); - }) - ], - AssignList: [ - o('', function() { - return []; - }), o('AssignObj', function() { - return [$1]; - }), o('AssignList , AssignObj', function() { - return $1.concat($3); - }), o('AssignList OptComma TERMINATOR AssignObj', function() { - return $1.concat($4); - }), o('AssignList OptComma INDENT AssignList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Class: [ - o('CLASS', function() { - return new Class; - }), o('CLASS Block', function() { - return new Class(null, null, $2); - }), o('CLASS EXTENDS Expression', function() { - return new Class(null, $3); - }), o('CLASS EXTENDS Expression Block', function() { - return new Class(null, $3, $4); - }), o('CLASS SimpleAssignable', function() { - return new Class($2); - }), o('CLASS SimpleAssignable Block', function() { - return new Class($2, null, $3); - }), o('CLASS SimpleAssignable EXTENDS Expression', function() { - return new Class($2, $4); - }), o('CLASS SimpleAssignable EXTENDS Expression Block', function() { - return new Class($2, $4, $5); - }) - ], - Invocation: [ - o('Value OptFuncExist Arguments', function() { - return new Call($1, $3, $2); - }), o('Invocation OptFuncExist Arguments', function() { - return new Call($1, $3, $2); - }), o('SUPER', function() { - return new Call('super', [new Splat(new Literal('arguments'))]); - }), o('SUPER Arguments', function() { - return new Call('super', $2); - }) - ], - OptFuncExist: [ - o('', function() { - return false; - }), o('FUNC_EXIST', function() { - return true; - }) - ], - Arguments: [ - o('CALL_START CALL_END', function() { - return []; - }), o('CALL_START ArgList OptComma CALL_END', function() { - return $2; - }) - ], - This: [ - o('THIS', function() { - return new Value(new Literal('this')); - }), o('@', function() { - return new Value(new Literal('this')); - }) - ], - ThisProperty: [ - o('@ Identifier', function() { - return new Value(LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this'); - }) - ], - Array: [ - o('[ ]', function() { - return new Arr([]); - }), o('[ ArgList OptComma ]', function() { - return new Arr($2); - }) - ], - RangeDots: [ - o('..', function() { - return 'inclusive'; - }), o('...', function() { - return 'exclusive'; - }) - ], - Range: [ - o('[ Expression RangeDots Expression ]', function() { - return new Range($2, $4, $3); - }) - ], - Slice: [ - o('Expression RangeDots Expression', function() { - return new Range($1, $3, $2); - }), o('Expression RangeDots', function() { - return new Range($1, null, $2); - }), o('RangeDots Expression', function() { - return new Range(null, $2, $1); - }), o('RangeDots', function() { - return new Range(null, null, $1); - }) - ], - ArgList: [ - o('Arg', function() { - return [$1]; - }), o('ArgList , Arg', function() { - return $1.concat($3); - }), o('ArgList OptComma TERMINATOR Arg', function() { - return $1.concat($4); - }), o('INDENT ArgList OptComma OUTDENT', function() { - return $2; - }), o('ArgList OptComma INDENT ArgList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Arg: [o('Expression'), o('Splat')], - SimpleArgs: [ - o('Expression'), o('SimpleArgs , Expression', function() { - return [].concat($1, $3); - }) - ], - Try: [ - o('TRY Block', function() { - return new Try($2); - }), o('TRY Block Catch', function() { - return new Try($2, $3[0], $3[1]); - }), o('TRY Block FINALLY Block', function() { - return new Try($2, null, null, $4); - }), o('TRY Block Catch FINALLY Block', function() { - return new Try($2, $3[0], $3[1], $5); - }) - ], - Catch: [ - o('CATCH Identifier Block', function() { - return [$2, $3]; - }), o('CATCH Object Block', function() { - return [LOC(2)(new Value($2)), $3]; - }), o('CATCH Block', function() { - return [null, $2]; - }) - ], - Throw: [ - o('THROW Expression', function() { - return new Throw($2); - }) - ], - Parenthetical: [ - o('( Body )', function() { - return new Parens($2); - }), o('( INDENT Body OUTDENT )', function() { - return new Parens($3); - }) - ], - WhileSource: [ - o('WHILE Expression', function() { - return new While($2); - }), o('WHILE Expression WHEN Expression', function() { - return new While($2, { - guard: $4 - }); - }), o('UNTIL Expression', function() { - return new While($2, { - invert: true - }); - }), o('UNTIL Expression WHEN Expression', function() { - return new While($2, { - invert: true, - guard: $4 - }); - }) - ], - While: [ - o('WhileSource Block', function() { - return $1.addBody($2); - }), o('Statement WhileSource', function() { - return $2.addBody(LOC(1)(Block.wrap([$1]))); - }), o('Expression WhileSource', function() { - return $2.addBody(LOC(1)(Block.wrap([$1]))); - }), o('Loop', function() { - return $1; - }) - ], - Loop: [ - o('LOOP Block', function() { - return new While(LOC(1)(new Literal('true'))).addBody($2); - }), o('LOOP Expression', function() { - return new While(LOC(1)(new Literal('true'))).addBody(LOC(2)(Block.wrap([$2]))); - }) - ], - For: [ - o('Statement ForBody', function() { - return new For($1, $2); - }), o('Expression ForBody', function() { - return new For($1, $2); - }), o('ForBody Block', function() { - return new For($2, $1); - }) - ], - ForBody: [ - o('FOR Range', function() { - return { - source: LOC(2)(new Value($2)) - }; - }), o('ForStart ForSource', function() { - $2.own = $1.own; - $2.name = $1[0]; - $2.index = $1[1]; - return $2; - }) - ], - ForStart: [ - o('FOR ForVariables', function() { - return $2; - }), o('FOR OWN ForVariables', function() { - $3.own = true; - return $3; - }) - ], - ForValue: [ - o('Identifier'), o('ThisProperty'), o('Array', function() { - return new Value($1); - }), o('Object', function() { - return new Value($1); - }) - ], - ForVariables: [ - o('ForValue', function() { - return [$1]; - }), o('ForValue , ForValue', function() { - return [$1, $3]; - }) - ], - ForSource: [ - o('FORIN Expression', function() { - return { - source: $2 - }; - }), o('FOROF Expression', function() { - return { - source: $2, - object: true - }; - }), o('FORIN Expression WHEN Expression', function() { - return { - source: $2, - guard: $4 - }; - }), o('FOROF Expression WHEN Expression', function() { - return { - source: $2, - guard: $4, - object: true - }; - }), o('FORIN Expression BY Expression', function() { - return { - source: $2, - step: $4 - }; - }), o('FORIN Expression WHEN Expression BY Expression', function() { - return { - source: $2, - guard: $4, - step: $6 - }; - }), o('FORIN Expression BY Expression WHEN Expression', function() { - return { - source: $2, - step: $4, - guard: $6 - }; - }) - ], - Switch: [ - o('SWITCH Expression INDENT Whens OUTDENT', function() { - return new Switch($2, $4); - }), o('SWITCH Expression INDENT Whens ELSE Block OUTDENT', function() { - return new Switch($2, $4, $6); - }), o('SWITCH INDENT Whens OUTDENT', function() { - return new Switch(null, $3); - }), o('SWITCH INDENT Whens ELSE Block OUTDENT', function() { - return new Switch(null, $3, $5); - }) - ], - Whens: [ - o('When'), o('Whens When', function() { - return $1.concat($2); - }) - ], - When: [ - o('LEADING_WHEN SimpleArgs Block', function() { - return [[$2, $3]]; - }), o('LEADING_WHEN SimpleArgs Block TERMINATOR', function() { - return [[$2, $3]]; - }) - ], - IfBlock: [ - o('IF Expression Block', function() { - return new If($2, $3, { - type: $1 - }); - }), o('IfBlock ELSE IF Expression Block', function() { - return $1.addElse(new If($4, $5, { - type: $3 - })); - }) - ], - If: [ - o('IfBlock'), o('IfBlock ELSE Block', function() { - return $1.addElse($3); - }), o('Statement POST_IF Expression', function() { - return new If($3, LOC(1)(Block.wrap([$1])), { - type: $2, - statement: true - }); - }), o('Expression POST_IF Expression', function() { - return new If($3, LOC(1)(Block.wrap([$1])), { - type: $2, - statement: true - }); - }) - ], - Operation: [ - o('UNARY Expression', function() { - return new Op($1, $2); - }), o('- Expression', (function() { - return new Op('-', $2); - }), { - prec: 'UNARY' - }), o('+ Expression', (function() { - return new Op('+', $2); - }), { - prec: 'UNARY' - }), o('-- SimpleAssignable', function() { - return new Op('--', $2); - }), o('++ SimpleAssignable', function() { - return new Op('++', $2); - }), o('SimpleAssignable --', function() { - return new Op('--', $1, null, true); - }), o('SimpleAssignable ++', function() { - return new Op('++', $1, null, true); - }), o('Expression ?', function() { - return new Existence($1); - }), o('Expression + Expression', function() { - return new Op('+', $1, $3); - }), o('Expression - Expression', function() { - return new Op('-', $1, $3); - }), o('Expression MATH Expression', function() { - return new Op($2, $1, $3); - }), o('Expression SHIFT Expression', function() { - return new Op($2, $1, $3); - }), o('Expression COMPARE Expression', function() { - return new Op($2, $1, $3); - }), o('Expression LOGIC Expression', function() { - return new Op($2, $1, $3); - }), o('Expression RELATION Expression', function() { - if ($2.charAt(0) === '!') { - return new Op($2.slice(1), $1, $3).invert(); - } else { - return new Op($2, $1, $3); - } - }), o('SimpleAssignable COMPOUND_ASSIGN\ - Expression', function() { - return new Assign($1, $3, $2); - }), o('SimpleAssignable COMPOUND_ASSIGN\ - INDENT Expression OUTDENT', function() { - return new Assign($1, $4, $2); - }), o('SimpleAssignable COMPOUND_ASSIGN TERMINATOR\ - Expression', function() { - return new Assign($1, $4, $2); - }), o('SimpleAssignable EXTENDS Expression', function() { - return new Extends($1, $3); - }) - ] - }; - - operators = [['left', '.', '?.', '::', '?::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', 'LOGIC'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'], ['right', 'POST_IF']]; - - tokens = []; - - for (name in grammar) { - alternatives = grammar[name]; - grammar[name] = (function() { - var _i, _j, _len, _len1, _ref, _results; - _results = []; - for (_i = 0, _len = alternatives.length; _i < _len; _i++) { - alt = alternatives[_i]; - _ref = alt[0].split(' '); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - token = _ref[_j]; - if (!grammar[token]) { - tokens.push(token); - } - } - if (name === 'Root') { - alt[1] = "return " + alt[1]; - } - _results.push(alt); - } - return _results; - })(); - } - - exports.parser = new Parser({ - tokens: tokens.join(' '), - bnf: grammar, - operators: operators.reverse(), - startSymbol: 'Root' - }); - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/helpers.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/helpers.js deleted file mode 100644 index 352dc366..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/helpers.js +++ /dev/null @@ -1,223 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var buildLocationData, extend, flatten, last, repeat, _ref; - - exports.starts = function(string, literal, start) { - return literal === string.substr(start, literal.length); - }; - - exports.ends = function(string, literal, back) { - var len; - len = literal.length; - return literal === string.substr(string.length - len - (back || 0), len); - }; - - exports.repeat = repeat = function(str, n) { - var res; - res = ''; - while (n > 0) { - if (n & 1) { - res += str; - } - n >>>= 1; - str += str; - } - return res; - }; - - exports.compact = function(array) { - var item, _i, _len, _results; - _results = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - item = array[_i]; - if (item) { - _results.push(item); - } - } - return _results; - }; - - exports.count = function(string, substr) { - var num, pos; - num = pos = 0; - if (!substr.length) { - return 1 / 0; - } - while (pos = 1 + string.indexOf(substr, pos)) { - num++; - } - return num; - }; - - exports.merge = function(options, overrides) { - return extend(extend({}, options), overrides); - }; - - extend = exports.extend = function(object, properties) { - var key, val; - for (key in properties) { - val = properties[key]; - object[key] = val; - } - return object; - }; - - exports.flatten = flatten = function(array) { - var element, flattened, _i, _len; - flattened = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - element = array[_i]; - if (element instanceof Array) { - flattened = flattened.concat(flatten(element)); - } else { - flattened.push(element); - } - } - return flattened; - }; - - exports.del = function(obj, key) { - var val; - val = obj[key]; - delete obj[key]; - return val; - }; - - exports.last = last = function(array, back) { - return array[array.length - (back || 0) - 1]; - }; - - exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) { - var e, _i, _len; - for (_i = 0, _len = this.length; _i < _len; _i++) { - e = this[_i]; - if (fn(e)) { - return true; - } - } - return false; - }; - - exports.invertLiterate = function(code) { - var line, lines, maybe_code; - maybe_code = true; - lines = (function() { - var _i, _len, _ref1, _results; - _ref1 = code.split('\n'); - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - line = _ref1[_i]; - if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { - _results.push(line); - } else if (maybe_code = /^\s*$/.test(line)) { - _results.push(line); - } else { - _results.push('# ' + line); - } - } - return _results; - })(); - return lines.join('\n'); - }; - - buildLocationData = function(first, last) { - if (!last) { - return first; - } else { - return { - first_line: first.first_line, - first_column: first.first_column, - last_line: last.last_line, - last_column: last.last_column - }; - } - }; - - exports.addLocationDataFn = function(first, last) { - return function(obj) { - if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) { - obj.updateLocationDataIfMissing(buildLocationData(first, last)); - } - return obj; - }; - }; - - exports.locationDataToString = function(obj) { - var locationData; - if (("2" in obj) && ("first_line" in obj[2])) { - locationData = obj[2]; - } else if ("first_line" in obj) { - locationData = obj; - } - if (locationData) { - return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1)); - } else { - return "No location data"; - } - }; - - exports.baseFileName = function(file, stripExt, useWinPathSep) { - var parts, pathSep; - if (stripExt == null) { - stripExt = false; - } - if (useWinPathSep == null) { - useWinPathSep = false; - } - pathSep = useWinPathSep ? /\\|\// : /\//; - parts = file.split(pathSep); - file = parts[parts.length - 1]; - if (!stripExt) { - return file; - } - parts = file.split('.'); - parts.pop(); - if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { - parts.pop(); - } - return parts.join('.'); - }; - - exports.isCoffee = function(file) { - return /\.((lit)?coffee|coffee\.md)$/.test(file); - }; - - exports.isLiterate = function(file) { - return /\.(litcoffee|coffee\.md)$/.test(file); - }; - - exports.throwSyntaxError = function(message, location) { - var error; - if (location.last_line == null) { - location.last_line = location.first_line; - } - if (location.last_column == null) { - location.last_column = location.first_column; - } - error = new SyntaxError(message); - error.location = location; - throw error; - }; - - exports.prettyErrorMessage = function(error, fileName, code, useColors) { - var codeLine, colorize, end, first_column, first_line, last_column, last_line, marker, message, start, _ref1; - if (!error.location) { - return error.stack || ("" + error); - } - _ref1 = error.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column; - codeLine = code.split('\n')[first_line]; - start = first_column; - end = first_line === last_line ? last_column + 1 : codeLine.length; - marker = repeat(' ', start) + repeat('^', end - start); - if (useColors) { - colorize = function(str) { - return "\x1B[1;31m" + str + "\x1B[0m"; - }; - codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); - marker = colorize(marker); - } - message = "" + fileName + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + error.message + "\n" + codeLine + "\n" + marker; - return message; - }; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/index.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/index.js deleted file mode 100644 index 68787dfd..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var key, val, _ref; - - _ref = require('./coffee-script'); - for (key in _ref) { - val = _ref[key]; - exports[key] = val; - } - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/lexer.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/lexer.js deleted file mode 100644 index b4db45fd..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/lexer.js +++ /dev/null @@ -1,889 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; - - _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; - - exports.Lexer = Lexer = (function() { - function Lexer() {} - - Lexer.prototype.tokenize = function(code, opts) { - var consumed, i, tag, _ref2; - if (opts == null) { - opts = {}; - } - this.literate = opts.literate; - this.indent = 0; - this.indebt = 0; - this.outdebt = 0; - this.indents = []; - this.ends = []; - this.tokens = []; - this.chunkLine = opts.line || 0; - this.chunkColumn = opts.column || 0; - code = this.clean(code); - i = 0; - while (this.chunk = code.slice(i)) { - consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); - _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1]; - i += consumed; - } - this.closeIndentation(); - if (tag = this.ends.pop()) { - this.error("missing " + tag); - } - if (opts.rewrite === false) { - return this.tokens; - } - return (new Rewriter).rewrite(this.tokens); - }; - - Lexer.prototype.clean = function(code) { - if (code.charCodeAt(0) === BOM) { - code = code.slice(1); - } - code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); - if (WHITESPACE.test(code)) { - code = "\n" + code; - this.chunkLine--; - } - if (this.literate) { - code = invertLiterate(code); - } - return code; - }; - - Lexer.prototype.identifierToken = function() { - var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4; - if (!(match = IDENTIFIER.exec(this.chunk))) { - return 0; - } - input = match[0], id = match[1], colon = match[2]; - idLength = id.length; - poppedToken = void 0; - if (id === 'own' && this.tag() === 'FOR') { - this.token('OWN', id); - return id.length; - } - forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@'); - tag = 'IDENTIFIER'; - if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { - tag = id.toUpperCase(); - if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) { - tag = 'LEADING_WHEN'; - } else if (tag === 'FOR') { - this.seenFor = true; - } else if (tag === 'UNLESS') { - tag = 'IF'; - } else if (__indexOf.call(UNARY, tag) >= 0) { - tag = 'UNARY'; - } else if (__indexOf.call(RELATION, tag) >= 0) { - if (tag !== 'INSTANCEOF' && this.seenFor) { - tag = 'FOR' + tag; - this.seenFor = false; - } else { - tag = 'RELATION'; - if (this.value() === '!') { - poppedToken = this.tokens.pop(); - id = '!' + id; - } - } - } - } - if (__indexOf.call(JS_FORBIDDEN, id) >= 0) { - if (forcedIdentifier) { - tag = 'IDENTIFIER'; - id = new String(id); - id.reserved = true; - } else if (__indexOf.call(RESERVED, id) >= 0) { - this.error("reserved word \"" + id + "\""); - } - } - if (!forcedIdentifier) { - if (__indexOf.call(COFFEE_ALIASES, id) >= 0) { - id = COFFEE_ALIAS_MAP[id]; - } - tag = (function() { - switch (id) { - case '!': - return 'UNARY'; - case '==': - case '!=': - return 'COMPARE'; - case '&&': - case '||': - return 'LOGIC'; - case 'true': - case 'false': - return 'BOOL'; - case 'break': - case 'continue': - return 'STATEMENT'; - default: - return tag; - } - })(); - } - tagToken = this.token(tag, id, 0, idLength); - if (poppedToken) { - _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1]; - } - if (colon) { - colonOffset = input.lastIndexOf(':'); - this.token(':', ':', colonOffset, colon.length); - } - return input.length; - }; - - Lexer.prototype.numberToken = function() { - var binaryLiteral, lexedLength, match, number, octalLiteral; - if (!(match = NUMBER.exec(this.chunk))) { - return 0; - } - number = match[0]; - if (/^0[BOX]/.test(number)) { - this.error("radix prefix '" + number + "' must be lowercase"); - } else if (/E/.test(number) && !/^0x/.test(number)) { - this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'"); - } else if (/^0\d*[89]/.test(number)) { - this.error("decimal literal '" + number + "' must not be prefixed with '0'"); - } else if (/^0\d+/.test(number)) { - this.error("octal literal '" + number + "' must be prefixed with '0o'"); - } - lexedLength = number.length; - if (octalLiteral = /^0o([0-7]+)/.exec(number)) { - number = '0x' + parseInt(octalLiteral[1], 8).toString(16); - } - if (binaryLiteral = /^0b([01]+)/.exec(number)) { - number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); - } - this.token('NUMBER', number, 0, lexedLength); - return lexedLength; - }; - - Lexer.prototype.stringToken = function() { - var match, octalEsc, string; - switch (this.chunk.charAt(0)) { - case "'": - if (!(match = SIMPLESTR.exec(this.chunk))) { - return 0; - } - string = match[0]; - this.token('STRING', string.replace(MULTILINER, '\\\n'), 0, string.length); - break; - case '"': - if (!(string = this.balancedString(this.chunk, '"'))) { - return 0; - } - if (0 < string.indexOf('#{', 1)) { - this.interpolateString(string.slice(1, -1), { - strOffset: 1, - lexedLength: string.length - }); - } else { - this.token('STRING', this.escapeLines(string, 0, string.length)); - } - break; - default: - return 0; - } - if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) { - this.error("octal escape sequences " + string + " are not allowed"); - } - return string.length; - }; - - Lexer.prototype.heredocToken = function() { - var doc, heredoc, match, quote; - if (!(match = HEREDOC.exec(this.chunk))) { - return 0; - } - heredoc = match[0]; - quote = heredoc.charAt(0); - doc = this.sanitizeHeredoc(match[2], { - quote: quote, - indent: null - }); - if (quote === '"' && 0 <= doc.indexOf('#{')) { - this.interpolateString(doc, { - heredoc: true, - strOffset: 3, - lexedLength: heredoc.length - }); - } else { - this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length); - } - return heredoc.length; - }; - - Lexer.prototype.commentToken = function() { - var comment, here, match; - if (!(match = this.chunk.match(COMMENT))) { - return 0; - } - comment = match[0], here = match[1]; - if (here) { - this.token('HERECOMMENT', this.sanitizeHeredoc(here, { - herecomment: true, - indent: repeat(' ', this.indent) - }), 0, comment.length); - } - return comment.length; - }; - - Lexer.prototype.jsToken = function() { - var match, script; - if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { - return 0; - } - this.token('JS', (script = match[0]).slice(1, -1), 0, script.length); - return script.length; - }; - - Lexer.prototype.regexToken = function() { - var flags, length, match, prev, regex, _ref2, _ref3; - if (this.chunk.charAt(0) !== '/') { - return 0; - } - if (match = HEREGEX.exec(this.chunk)) { - length = this.heregexToken(match); - return length; - } - prev = last(this.tokens); - if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) { - return 0; - } - if (!(match = REGEX.exec(this.chunk))) { - return 0; - } - _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2]; - if (regex.slice(0, 2) === '/*') { - this.error('regular expressions cannot begin with `*`'); - } - if (regex === '//') { - regex = '/(?:)/'; - } - this.token('REGEX', "" + regex + flags, 0, match.length); - return match.length; - }; - - Lexer.prototype.heregexToken = function(match) { - var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; - heregex = match[0], body = match[1], flags = match[2]; - if (0 > body.indexOf('#{')) { - re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/'); - if (re.match(/^\*/)) { - this.error('regular expressions cannot begin with `*`'); - } - this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length); - return heregex.length; - } - this.token('IDENTIFIER', 'RegExp', 0, 0); - this.token('CALL_START', '(', 0, 0); - tokens = []; - _ref2 = this.interpolateString(body, { - regex: true - }); - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - token = _ref2[_i]; - tag = token[0], value = token[1]; - if (tag === 'TOKENS') { - tokens.push.apply(tokens, value); - } else if (tag === 'NEOSTRING') { - if (!(value = value.replace(HEREGEX_OMIT, ''))) { - continue; - } - value = value.replace(/\\/g, '\\\\'); - token[0] = 'STRING'; - token[1] = this.makeString(value, '"', true); - tokens.push(token); - } else { - this.error("Unexpected " + tag); - } - prev = last(this.tokens); - plusToken = ['+', '+']; - plusToken[2] = prev[2]; - tokens.push(plusToken); - } - tokens.pop(); - if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') { - this.token('STRING', '""', 0, 0); - this.token('+', '+', 0, 0); - } - (_ref4 = this.tokens).push.apply(_ref4, tokens); - if (flags) { - flagsOffset = heregex.lastIndexOf(flags); - this.token(',', ',', flagsOffset, 0); - this.token('STRING', '"' + flags + '"', flagsOffset, flags.length); - } - this.token(')', ')', heregex.length - 1, 0); - return heregex.length; - }; - - Lexer.prototype.lineToken = function() { - var diff, indent, match, noNewlines, size; - if (!(match = MULTI_DENT.exec(this.chunk))) { - return 0; - } - indent = match[0]; - this.seenFor = false; - size = indent.length - 1 - indent.lastIndexOf('\n'); - noNewlines = this.unfinished(); - if (size - this.indebt === this.indent) { - if (noNewlines) { - this.suppressNewlines(); - } else { - this.newlineToken(0); - } - return indent.length; - } - if (size > this.indent) { - if (noNewlines) { - this.indebt = size - this.indent; - this.suppressNewlines(); - return indent.length; - } - diff = size - this.indent + this.outdebt; - this.token('INDENT', diff, indent.length - size, size); - this.indents.push(diff); - this.ends.push('OUTDENT'); - this.outdebt = this.indebt = 0; - } else { - this.indebt = 0; - this.outdentToken(this.indent - size, noNewlines, indent.length); - } - this.indent = size; - return indent.length; - }; - - Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { - var dent, len; - while (moveOut > 0) { - len = this.indents.length - 1; - if (this.indents[len] === void 0) { - moveOut = 0; - } else if (this.indents[len] === this.outdebt) { - moveOut -= this.outdebt; - this.outdebt = 0; - } else if (this.indents[len] < this.outdebt) { - this.outdebt -= this.indents[len]; - moveOut -= this.indents[len]; - } else { - dent = this.indents.pop() + this.outdebt; - moveOut -= dent; - this.outdebt = 0; - this.pair('OUTDENT'); - this.token('OUTDENT', dent, 0, outdentLength); - } - } - if (dent) { - this.outdebt -= moveOut; - } - while (this.value() === ';') { - this.tokens.pop(); - } - if (!(this.tag() === 'TERMINATOR' || noNewlines)) { - this.token('TERMINATOR', '\n', outdentLength, 0); - } - return this; - }; - - Lexer.prototype.whitespaceToken = function() { - var match, nline, prev; - if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { - return 0; - } - prev = last(this.tokens); - if (prev) { - prev[match ? 'spaced' : 'newLine'] = true; - } - if (match) { - return match[0].length; - } else { - return 0; - } - }; - - Lexer.prototype.newlineToken = function(offset) { - while (this.value() === ';') { - this.tokens.pop(); - } - if (this.tag() !== 'TERMINATOR') { - this.token('TERMINATOR', '\n', offset, 0); - } - return this; - }; - - Lexer.prototype.suppressNewlines = function() { - if (this.value() === '\\') { - this.tokens.pop(); - } - return this; - }; - - Lexer.prototype.literalToken = function() { - var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; - if (match = OPERATOR.exec(this.chunk)) { - value = match[0]; - if (CODE.test(value)) { - this.tagParameters(); - } - } else { - value = this.chunk.charAt(0); - } - tag = value; - prev = last(this.tokens); - if (value === '=' && prev) { - if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) { - this.error("reserved word \"" + (this.value()) + "\" can't be assigned"); - } - if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') { - prev[0] = 'COMPOUND_ASSIGN'; - prev[1] += '='; - return value.length; - } - } - if (value === ';') { - this.seenFor = false; - tag = 'TERMINATOR'; - } else if (__indexOf.call(MATH, value) >= 0) { - tag = 'MATH'; - } else if (__indexOf.call(COMPARE, value) >= 0) { - tag = 'COMPARE'; - } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) { - tag = 'COMPOUND_ASSIGN'; - } else if (__indexOf.call(UNARY, value) >= 0) { - tag = 'UNARY'; - } else if (__indexOf.call(SHIFT, value) >= 0) { - tag = 'SHIFT'; - } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) { - tag = 'LOGIC'; - } else if (prev && !prev.spaced) { - if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) { - if (prev[0] === '?') { - prev[0] = 'FUNC_EXIST'; - } - tag = 'CALL_START'; - } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) { - tag = 'INDEX_START'; - switch (prev[0]) { - case '?': - prev[0] = 'INDEX_SOAK'; - } - } - } - switch (value) { - case '(': - case '{': - case '[': - this.ends.push(INVERSES[value]); - break; - case ')': - case '}': - case ']': - this.pair(value); - } - this.token(tag, value); - return value.length; - }; - - Lexer.prototype.sanitizeHeredoc = function(doc, options) { - var attempt, herecomment, indent, match, _ref2; - indent = options.indent, herecomment = options.herecomment; - if (herecomment) { - if (HEREDOC_ILLEGAL.test(doc)) { - this.error("block comment cannot contain \"*/\", starting"); - } - if (doc.indexOf('\n') < 0) { - return doc; - } - } else { - while (match = HEREDOC_INDENT.exec(doc)) { - attempt = match[1]; - if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) { - indent = attempt; - } - } - } - if (indent) { - doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); - } - if (!herecomment) { - doc = doc.replace(/^\n/, ''); - } - return doc; - }; - - Lexer.prototype.tagParameters = function() { - var i, stack, tok, tokens; - if (this.tag() !== ')') { - return this; - } - stack = []; - tokens = this.tokens; - i = tokens.length; - tokens[--i][0] = 'PARAM_END'; - while (tok = tokens[--i]) { - switch (tok[0]) { - case ')': - stack.push(tok); - break; - case '(': - case 'CALL_START': - if (stack.length) { - stack.pop(); - } else if (tok[0] === '(') { - tok[0] = 'PARAM_START'; - return this; - } else { - return this; - } - } - } - return this; - }; - - Lexer.prototype.closeIndentation = function() { - return this.outdentToken(this.indent); - }; - - Lexer.prototype.balancedString = function(str, end) { - var continueCount, i, letter, match, prev, stack, _i, _ref2; - continueCount = 0; - stack = [end]; - for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) { - if (continueCount) { - --continueCount; - continue; - } - switch (letter = str.charAt(i)) { - case '\\': - ++continueCount; - continue; - case end: - stack.pop(); - if (!stack.length) { - return str.slice(0, +i + 1 || 9e9); - } - end = stack[stack.length - 1]; - continue; - } - if (end === '}' && (letter === '"' || letter === "'")) { - stack.push(end = letter); - } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) { - continueCount += match[0].length - 1; - } else if (end === '}' && letter === '{') { - stack.push(end = '}'); - } else if (end === '"' && prev === '#' && letter === '{') { - stack.push(end = '}'); - } - prev = letter; - } - return this.error("missing " + (stack.pop()) + ", starting"); - }; - - Lexer.prototype.interpolateString = function(str, options) { - var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; - if (options == null) { - options = {}; - } - heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength; - offsetInChunk = offsetInChunk || 0; - strOffset = strOffset || 0; - lexedLength = lexedLength || str.length; - if (heredoc && str.length > 0 && str[0] === '\n') { - str = str.slice(1); - strOffset++; - } - tokens = []; - pi = 0; - i = -1; - while (letter = str.charAt(i += 1)) { - if (letter === '\\') { - i += 1; - continue; - } - if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) { - continue; - } - if (pi < i) { - tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi)); - } - inner = expr.slice(1, -1); - if (inner.length) { - _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1]; - nested = new Lexer().tokenize(inner, { - line: line, - column: column, - rewrite: false - }); - popped = nested.pop(); - if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') { - popped = nested.shift(); - } - if (len = nested.length) { - if (len > 1) { - nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0)); - nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0)); - } - tokens.push(['TOKENS', nested]); - } - } - i += expr.length; - pi = i + 1; - } - if ((i > pi && pi < str.length)) { - tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi)); - } - if (regex) { - return tokens; - } - if (!tokens.length) { - return this.token('STRING', '""', offsetInChunk, lexedLength); - } - if (tokens[0][0] !== 'NEOSTRING') { - tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk)); - } - if (interpolated = tokens.length > 1) { - this.token('(', '(', offsetInChunk, 0); - } - for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) { - token = tokens[i]; - tag = token[0], value = token[1]; - if (i) { - if (i) { - plusToken = this.token('+', '+'); - } - locationToken = tag === 'TOKENS' ? value[0] : token; - plusToken[2] = { - first_line: locationToken[2].first_line, - first_column: locationToken[2].first_column, - last_line: locationToken[2].first_line, - last_column: locationToken[2].first_column - }; - } - if (tag === 'TOKENS') { - (_ref4 = this.tokens).push.apply(_ref4, value); - } else if (tag === 'NEOSTRING') { - token[0] = 'STRING'; - token[1] = this.makeString(value, '"', heredoc); - this.tokens.push(token); - } else { - this.error("Unexpected " + tag); - } - } - if (interpolated) { - rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0); - rparen.stringEnd = true; - this.tokens.push(rparen); - } - return tokens; - }; - - Lexer.prototype.pair = function(tag) { - var size, wanted; - if (tag !== (wanted = last(this.ends))) { - if ('OUTDENT' !== wanted) { - this.error("unmatched " + tag); - } - this.indent -= size = last(this.indents); - this.outdentToken(size, true); - return this.pair(tag); - } - return this.ends.pop(); - }; - - Lexer.prototype.getLineAndColumnFromChunk = function(offset) { - var column, lineCount, lines, string; - if (offset === 0) { - return [this.chunkLine, this.chunkColumn]; - } - if (offset >= this.chunk.length) { - string = this.chunk; - } else { - string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9); - } - lineCount = count(string, '\n'); - column = this.chunkColumn; - if (lineCount > 0) { - lines = string.split('\n'); - column = last(lines).length; - } else { - column += string.length; - } - return [this.chunkLine + lineCount, column]; - }; - - Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { - var lastCharacter, locationData, token, _ref2, _ref3; - if (offsetInChunk == null) { - offsetInChunk = 0; - } - if (length == null) { - length = value.length; - } - locationData = {}; - _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1]; - lastCharacter = Math.max(0, length - 1); - _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; - token = [tag, value, locationData]; - return token; - }; - - Lexer.prototype.token = function(tag, value, offsetInChunk, length) { - var token; - token = this.makeToken(tag, value, offsetInChunk, length); - this.tokens.push(token); - return token; - }; - - Lexer.prototype.tag = function(index, tag) { - var tok; - return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); - }; - - Lexer.prototype.value = function(index, val) { - var tok; - return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); - }; - - Lexer.prototype.unfinished = function() { - var _ref2; - return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS'); - }; - - Lexer.prototype.escapeLines = function(str, heredoc) { - return str.replace(MULTILINER, heredoc ? '\\n' : ''); - }; - - Lexer.prototype.makeString = function(body, quote, heredoc) { - if (!body) { - return quote + quote; - } - body = body.replace(/\\([\s\S])/g, function(match, contents) { - if (contents === '\n' || contents === quote) { - return contents; - } else { - return match; - } - }); - body = body.replace(RegExp("" + quote, "g"), '\\$&'); - return quote + this.escapeLines(body, heredoc) + quote; - }; - - Lexer.prototype.error = function(message) { - return throwSyntaxError(message, { - first_line: this.chunkLine, - first_column: this.chunkColumn - }); - }; - - return Lexer; - - })(); - - JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; - - COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; - - COFFEE_ALIAS_MAP = { - and: '&&', - or: '||', - is: '==', - isnt: '!=', - not: '!', - yes: 'true', - no: 'false', - on: 'true', - off: 'false' - }; - - COFFEE_ALIASES = (function() { - var _results; - _results = []; - for (key in COFFEE_ALIAS_MAP) { - _results.push(key); - } - return _results; - })(); - - COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); - - RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield']; - - STRICT_PROSCRIBED = ['arguments', 'eval']; - - JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED); - - exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED); - - exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED; - - BOM = 65279; - - IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/; - - NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; - - HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/; - - OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/; - - WHITESPACE = /^[^\n\S]+/; - - COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/; - - CODE = /^[-=]>/; - - MULTI_DENT = /^(?:\n[^\n\S]*)+/; - - SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/; - - JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; - - REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/; - - HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/; - - HEREGEX_OMIT = /\s+(?:#.*)?/g; - - MULTILINER = /\n/g; - - HEREDOC_INDENT = /\n+([^\n\S]*)/g; - - HEREDOC_ILLEGAL = /\*\//; - - LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; - - TRAILING_SPACES = /\s+$/; - - COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']; - - UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']; - - LOGIC = ['&&', '||', '&', '|', '^']; - - SHIFT = ['<<', '>>', '>>>']; - - COMPARE = ['==', '!=', '<', '>', '<=', '>=']; - - MATH = ['*', '/', '%']; - - RELATION = ['IN', 'OF', 'INSTANCEOF']; - - BOOL = ['TRUE', 'FALSE']; - - NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; - - NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); - - CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; - - INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED'); - - LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/nodes.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/nodes.js deleted file mode 100644 index 0edbcf61..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/nodes.js +++ /dev/null @@ -1,3048 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - Error.stackTraceLimit = Infinity; - - Scope = require('./scope').Scope; - - _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED; - - _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; - - exports.extend = extend; - - exports.addLocationDataFn = addLocationDataFn; - - YES = function() { - return true; - }; - - NO = function() { - return false; - }; - - THIS = function() { - return this; - }; - - NEGATE = function() { - this.negated = !this.negated; - return this; - }; - - exports.CodeFragment = CodeFragment = (function() { - function CodeFragment(parent, code) { - var _ref2; - this.code = "" + code; - this.locationData = parent != null ? parent.locationData : void 0; - this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown'; - } - - CodeFragment.prototype.toString = function() { - return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); - }; - - return CodeFragment; - - })(); - - fragmentsToText = function(fragments) { - var fragment; - return ((function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = fragments.length; _i < _len; _i++) { - fragment = fragments[_i]; - _results.push(fragment.code); - } - return _results; - })()).join(''); - }; - - exports.Base = Base = (function() { - function Base() {} - - Base.prototype.compile = function(o, lvl) { - return fragmentsToText(this.compileToFragments(o, lvl)); - }; - - Base.prototype.compileToFragments = function(o, lvl) { - var node; - o = extend({}, o); - if (lvl) { - o.level = lvl; - } - node = this.unfoldSoak(o) || this; - node.tab = o.indent; - if (o.level === LEVEL_TOP || !node.isStatement(o)) { - return node.compileNode(o); - } else { - return node.compileClosure(o); - } - }; - - Base.prototype.compileClosure = function(o) { - var jumpNode; - if (jumpNode = this.jumps()) { - jumpNode.error('cannot use a pure statement in an expression'); - } - o.sharedScope = true; - return Closure.wrap(this).compileNode(o); - }; - - Base.prototype.cache = function(o, level, reused) { - var ref, sub; - if (!this.isComplex()) { - ref = level ? this.compileToFragments(o, level) : this; - return [ref, ref]; - } else { - ref = new Literal(reused || o.scope.freeVariable('ref')); - sub = new Assign(ref, this); - if (level) { - return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]]; - } else { - return [sub, ref]; - } - } - }; - - Base.prototype.cacheToCodeFragments = function(cacheValues) { - return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]; - }; - - Base.prototype.makeReturn = function(res) { - var me; - me = this.unwrapAll(); - if (res) { - return new Call(new Literal("" + res + ".push"), [me]); - } else { - return new Return(me); - } - }; - - Base.prototype.contains = function(pred) { - var node; - node = void 0; - this.traverseChildren(false, function(n) { - if (pred(n)) { - node = n; - return false; - } - }); - return node; - }; - - Base.prototype.lastNonComment = function(list) { - var i; - i = list.length; - while (i--) { - if (!(list[i] instanceof Comment)) { - return list[i]; - } - } - return null; - }; - - Base.prototype.toString = function(idt, name) { - var tree; - if (idt == null) { - idt = ''; - } - if (name == null) { - name = this.constructor.name; - } - tree = '\n' + idt + name; - if (this.soak) { - tree += '?'; - } - this.eachChild(function(node) { - return tree += node.toString(idt + TAB); - }); - return tree; - }; - - Base.prototype.eachChild = function(func) { - var attr, child, _i, _j, _len, _len1, _ref2, _ref3; - if (!this.children) { - return this; - } - _ref2 = this.children; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - attr = _ref2[_i]; - if (this[attr]) { - _ref3 = flatten([this[attr]]); - for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { - child = _ref3[_j]; - if (func(child) === false) { - return this; - } - } - } - } - return this; - }; - - Base.prototype.traverseChildren = function(crossScope, func) { - return this.eachChild(function(child) { - var recur; - recur = func(child); - if (recur !== false) { - return child.traverseChildren(crossScope, func); - } - }); - }; - - Base.prototype.invert = function() { - return new Op('!', this); - }; - - Base.prototype.unwrapAll = function() { - var node; - node = this; - while (node !== (node = node.unwrap())) { - continue; - } - return node; - }; - - Base.prototype.children = []; - - Base.prototype.isStatement = NO; - - Base.prototype.jumps = NO; - - Base.prototype.isComplex = YES; - - Base.prototype.isChainable = NO; - - Base.prototype.isAssignable = NO; - - Base.prototype.unwrap = THIS; - - Base.prototype.unfoldSoak = NO; - - Base.prototype.assigns = NO; - - Base.prototype.updateLocationDataIfMissing = function(locationData) { - this.locationData || (this.locationData = locationData); - return this.eachChild(function(child) { - return child.updateLocationDataIfMissing(locationData); - }); - }; - - Base.prototype.error = function(message) { - return throwSyntaxError(message, this.locationData); - }; - - Base.prototype.makeCode = function(code) { - return new CodeFragment(this, code); - }; - - Base.prototype.wrapInBraces = function(fragments) { - return [].concat(this.makeCode('('), fragments, this.makeCode(')')); - }; - - Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { - var answer, fragments, i, _i, _len; - answer = []; - for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) { - fragments = fragmentsList[i]; - if (i) { - answer.push(this.makeCode(joinStr)); - } - answer = answer.concat(fragments); - } - return answer; - }; - - return Base; - - })(); - - exports.Block = Block = (function(_super) { - __extends(Block, _super); - - function Block(nodes) { - this.expressions = compact(flatten(nodes || [])); - } - - Block.prototype.children = ['expressions']; - - Block.prototype.push = function(node) { - this.expressions.push(node); - return this; - }; - - Block.prototype.pop = function() { - return this.expressions.pop(); - }; - - Block.prototype.unshift = function(node) { - this.expressions.unshift(node); - return this; - }; - - Block.prototype.unwrap = function() { - if (this.expressions.length === 1) { - return this.expressions[0]; - } else { - return this; - } - }; - - Block.prototype.isEmpty = function() { - return !this.expressions.length; - }; - - Block.prototype.isStatement = function(o) { - var exp, _i, _len, _ref2; - _ref2 = this.expressions; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - exp = _ref2[_i]; - if (exp.isStatement(o)) { - return true; - } - } - return false; - }; - - Block.prototype.jumps = function(o) { - var exp, _i, _len, _ref2; - _ref2 = this.expressions; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - exp = _ref2[_i]; - if (exp.jumps(o)) { - return exp; - } - } - }; - - Block.prototype.makeReturn = function(res) { - var expr, len; - len = this.expressions.length; - while (len--) { - expr = this.expressions[len]; - if (!(expr instanceof Comment)) { - this.expressions[len] = expr.makeReturn(res); - if (expr instanceof Return && !expr.expression) { - this.expressions.splice(len, 1); - } - break; - } - } - return this; - }; - - Block.prototype.compileToFragments = function(o, level) { - if (o == null) { - o = {}; - } - if (o.scope) { - return Block.__super__.compileToFragments.call(this, o, level); - } else { - return this.compileRoot(o); - } - }; - - Block.prototype.compileNode = function(o) { - var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2; - this.tab = o.indent; - top = o.level === LEVEL_TOP; - compiledNodes = []; - _ref2 = this.expressions; - for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) { - node = _ref2[index]; - node = node.unwrapAll(); - node = node.unfoldSoak(o) || node; - if (node instanceof Block) { - compiledNodes.push(node.compileNode(o)); - } else if (top) { - node.front = true; - fragments = node.compileToFragments(o); - if (!node.isStatement(o)) { - fragments.unshift(this.makeCode("" + this.tab)); - fragments.push(this.makeCode(";")); - } - compiledNodes.push(fragments); - } else { - compiledNodes.push(node.compileToFragments(o, LEVEL_LIST)); - } - } - if (top) { - if (this.spaced) { - return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); - } else { - return this.joinFragmentArrays(compiledNodes, '\n'); - } - } - if (compiledNodes.length) { - answer = this.joinFragmentArrays(compiledNodes, ', '); - } else { - answer = [this.makeCode("void 0")]; - } - if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Block.prototype.compileRoot = function(o) { - var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; - o.indent = o.bare ? '' : TAB; - o.level = LEVEL_TOP; - this.spaced = true; - o.scope = new Scope(null, this, null); - _ref2 = o.locals || []; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - name = _ref2[_i]; - o.scope.parameter(name); - } - prelude = []; - if (!o.bare) { - preludeExps = (function() { - var _j, _len1, _ref3, _results; - _ref3 = this.expressions; - _results = []; - for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) { - exp = _ref3[i]; - if (!(exp.unwrap() instanceof Comment)) { - break; - } - _results.push(exp); - } - return _results; - }).call(this); - rest = this.expressions.slice(preludeExps.length); - this.expressions = preludeExps; - if (preludeExps.length) { - prelude = this.compileNode(merge(o, { - indent: '' - })); - prelude.push(this.makeCode("\n")); - } - this.expressions = rest; - } - fragments = this.compileWithDeclarations(o); - if (o.bare) { - return fragments; - } - return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n")); - }; - - Block.prototype.compileWithDeclarations = function(o) { - var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4; - fragments = []; - post = []; - _ref2 = this.expressions; - for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { - exp = _ref2[i]; - exp = exp.unwrap(); - if (!(exp instanceof Comment || exp instanceof Literal)) { - break; - } - } - o = merge(o, { - level: LEVEL_TOP - }); - if (i) { - rest = this.expressions.splice(i, 9e9); - _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1]; - _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1]; - this.expressions = rest; - } - post = this.compileNode(o); - scope = o.scope; - if (scope.expressions === this) { - declars = o.scope.hasDeclarations(); - assigns = scope.hasAssignments; - if (declars || assigns) { - if (i) { - fragments.push(this.makeCode('\n')); - } - fragments.push(this.makeCode("" + this.tab + "var ")); - if (declars) { - fragments.push(this.makeCode(scope.declaredVariables().join(', '))); - } - if (assigns) { - if (declars) { - fragments.push(this.makeCode(",\n" + (this.tab + TAB))); - } - fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); - } - fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); - } else if (fragments.length && post.length) { - fragments.push(this.makeCode("\n")); - } - } - return fragments.concat(post); - }; - - Block.wrap = function(nodes) { - if (nodes.length === 1 && nodes[0] instanceof Block) { - return nodes[0]; - } - return new Block(nodes); - }; - - return Block; - - })(Base); - - exports.Literal = Literal = (function(_super) { - __extends(Literal, _super); - - function Literal(value) { - this.value = value; - } - - Literal.prototype.makeReturn = function() { - if (this.isStatement()) { - return this; - } else { - return Literal.__super__.makeReturn.apply(this, arguments); - } - }; - - Literal.prototype.isAssignable = function() { - return IDENTIFIER.test(this.value); - }; - - Literal.prototype.isStatement = function() { - var _ref2; - return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; - }; - - Literal.prototype.isComplex = NO; - - Literal.prototype.assigns = function(name) { - return name === this.value; - }; - - Literal.prototype.jumps = function(o) { - if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) { - return this; - } - if (this.value === 'continue' && !(o != null ? o.loop : void 0)) { - return this; - } - }; - - Literal.prototype.compileNode = function(o) { - var answer, code, _ref2; - code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value; - answer = this.isStatement() ? "" + this.tab + code + ";" : code; - return [this.makeCode(answer)]; - }; - - Literal.prototype.toString = function() { - return ' "' + this.value + '"'; - }; - - return Literal; - - })(Base); - - exports.Undefined = (function(_super) { - __extends(Undefined, _super); - - function Undefined() { - _ref2 = Undefined.__super__.constructor.apply(this, arguments); - return _ref2; - } - - Undefined.prototype.isAssignable = NO; - - Undefined.prototype.isComplex = NO; - - Undefined.prototype.compileNode = function(o) { - return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')]; - }; - - return Undefined; - - })(Base); - - exports.Null = (function(_super) { - __extends(Null, _super); - - function Null() { - _ref3 = Null.__super__.constructor.apply(this, arguments); - return _ref3; - } - - Null.prototype.isAssignable = NO; - - Null.prototype.isComplex = NO; - - Null.prototype.compileNode = function() { - return [this.makeCode("null")]; - }; - - return Null; - - })(Base); - - exports.Bool = (function(_super) { - __extends(Bool, _super); - - Bool.prototype.isAssignable = NO; - - Bool.prototype.isComplex = NO; - - Bool.prototype.compileNode = function() { - return [this.makeCode(this.val)]; - }; - - function Bool(val) { - this.val = val; - } - - return Bool; - - })(Base); - - exports.Return = Return = (function(_super) { - __extends(Return, _super); - - function Return(expr) { - if (expr && !expr.unwrap().isUndefined) { - this.expression = expr; - } - } - - Return.prototype.children = ['expression']; - - Return.prototype.isStatement = YES; - - Return.prototype.makeReturn = THIS; - - Return.prototype.jumps = THIS; - - Return.prototype.compileToFragments = function(o, level) { - var expr, _ref4; - expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0; - if (expr && !(expr instanceof Return)) { - return expr.compileToFragments(o, level); - } else { - return Return.__super__.compileToFragments.call(this, o, level); - } - }; - - Return.prototype.compileNode = function(o) { - var answer; - answer = []; - answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); - if (this.expression) { - answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); - } - answer.push(this.makeCode(";")); - return answer; - }; - - return Return; - - })(Base); - - exports.Value = Value = (function(_super) { - __extends(Value, _super); - - function Value(base, props, tag) { - if (!props && base instanceof Value) { - return base; - } - this.base = base; - this.properties = props || []; - if (tag) { - this[tag] = true; - } - return this; - } - - Value.prototype.children = ['base', 'properties']; - - Value.prototype.add = function(props) { - this.properties = this.properties.concat(props); - return this; - }; - - Value.prototype.hasProperties = function() { - return !!this.properties.length; - }; - - Value.prototype.isArray = function() { - return !this.properties.length && this.base instanceof Arr; - }; - - Value.prototype.isComplex = function() { - return this.hasProperties() || this.base.isComplex(); - }; - - Value.prototype.isAssignable = function() { - return this.hasProperties() || this.base.isAssignable(); - }; - - Value.prototype.isSimpleNumber = function() { - return this.base instanceof Literal && SIMPLENUM.test(this.base.value); - }; - - Value.prototype.isString = function() { - return this.base instanceof Literal && IS_STRING.test(this.base.value); - }; - - Value.prototype.isAtomic = function() { - var node, _i, _len, _ref4; - _ref4 = this.properties.concat(this.base); - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - node = _ref4[_i]; - if (node.soak || node instanceof Call) { - return false; - } - } - return true; - }; - - Value.prototype.isStatement = function(o) { - return !this.properties.length && this.base.isStatement(o); - }; - - Value.prototype.assigns = function(name) { - return !this.properties.length && this.base.assigns(name); - }; - - Value.prototype.jumps = function(o) { - return !this.properties.length && this.base.jumps(o); - }; - - Value.prototype.isObject = function(onlyGenerated) { - if (this.properties.length) { - return false; - } - return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); - }; - - Value.prototype.isSplice = function() { - return last(this.properties) instanceof Slice; - }; - - Value.prototype.unwrap = function() { - if (this.properties.length) { - return this; - } else { - return this.base; - } - }; - - Value.prototype.cacheReference = function(o) { - var base, bref, name, nref; - name = last(this.properties); - if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { - return [this, this]; - } - base = new Value(this.base, this.properties.slice(0, -1)); - if (base.isComplex()) { - bref = new Literal(o.scope.freeVariable('base')); - base = new Value(new Parens(new Assign(bref, base))); - } - if (!name) { - return [base, bref]; - } - if (name.isComplex()) { - nref = new Literal(o.scope.freeVariable('name')); - name = new Index(new Assign(nref, name.index)); - nref = new Index(nref); - } - return [base.add(name), new Value(bref || base.base, [nref || name])]; - }; - - Value.prototype.compileNode = function(o) { - var fragments, prop, props, _i, _len; - this.base.front = this.front; - props = this.properties; - fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null)); - if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) { - fragments.push(this.makeCode('.')); - } - for (_i = 0, _len = props.length; _i < _len; _i++) { - prop = props[_i]; - fragments.push.apply(fragments, prop.compileToFragments(o)); - } - return fragments; - }; - - Value.prototype.unfoldSoak = function(o) { - var _this = this; - return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() { - var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5; - if (ifn = _this.base.unfoldSoak(o)) { - (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties); - return ifn; - } - _ref5 = _this.properties; - for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) { - prop = _ref5[i]; - if (!prop.soak) { - continue; - } - prop.soak = false; - fst = new Value(_this.base, _this.properties.slice(0, i)); - snd = new Value(_this.base, _this.properties.slice(i)); - if (fst.isComplex()) { - ref = new Literal(o.scope.freeVariable('ref')); - fst = new Parens(new Assign(ref, fst)); - snd.base = ref; - } - return new If(new Existence(fst), snd, { - soak: true - }); - } - return false; - })(); - }; - - return Value; - - })(Base); - - exports.Comment = Comment = (function(_super) { - __extends(Comment, _super); - - function Comment(comment) { - this.comment = comment; - } - - Comment.prototype.isStatement = YES; - - Comment.prototype.makeReturn = THIS; - - Comment.prototype.compileNode = function(o, level) { - var code; - code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/\n"; - if ((level || o.level) === LEVEL_TOP) { - code = o.indent + code; - } - return [this.makeCode(code)]; - }; - - return Comment; - - })(Base); - - exports.Call = Call = (function(_super) { - __extends(Call, _super); - - function Call(variable, args, soak) { - this.args = args != null ? args : []; - this.soak = soak; - this.isNew = false; - this.isSuper = variable === 'super'; - this.variable = this.isSuper ? null : variable; - } - - Call.prototype.children = ['variable', 'args']; - - Call.prototype.newInstance = function() { - var base, _ref4; - base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable; - if (base instanceof Call && !base.isNew) { - base.newInstance(); - } else { - this.isNew = true; - } - return this; - }; - - Call.prototype.superReference = function(o) { - var accesses, method; - method = o.scope.namedMethod(); - if (method != null ? method.klass : void 0) { - accesses = [new Access(new Literal('__super__'))]; - if (method["static"]) { - accesses.push(new Access(new Literal('constructor'))); - } - accesses.push(new Access(new Literal(method.name))); - return (new Value(new Literal(method.klass), accesses)).compile(o); - } else if (method != null ? method.ctor : void 0) { - return "" + method.name + ".__super__.constructor"; - } else { - return this.error('cannot call super outside of an instance method.'); - } - }; - - Call.prototype.superThis = function(o) { - var method; - method = o.scope.method; - return (method && !method.klass && method.context) || "this"; - }; - - Call.prototype.unfoldSoak = function(o) { - var call, ifn, left, list, rite, _i, _len, _ref4, _ref5; - if (this.soak) { - if (this.variable) { - if (ifn = unfoldSoak(o, this, 'variable')) { - return ifn; - } - _ref4 = new Value(this.variable).cacheReference(o), left = _ref4[0], rite = _ref4[1]; - } else { - left = new Literal(this.superReference(o)); - rite = new Value(left); - } - rite = new Call(rite, this.args); - rite.isNew = this.isNew; - left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); - return new If(left, new Value(rite), { - soak: true - }); - } - call = this; - list = []; - while (true) { - if (call.variable instanceof Call) { - list.push(call); - call = call.variable; - continue; - } - if (!(call.variable instanceof Value)) { - break; - } - list.push(call); - if (!((call = call.variable.base) instanceof Call)) { - break; - } - } - _ref5 = list.reverse(); - for (_i = 0, _len = _ref5.length; _i < _len; _i++) { - call = _ref5[_i]; - if (ifn) { - if (call.variable instanceof Call) { - call.variable = ifn; - } else { - call.variable.base = ifn; - } - } - ifn = unfoldSoak(o, call, 'variable'); - } - return ifn; - }; - - Call.prototype.compileNode = function(o) { - var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5; - if ((_ref4 = this.variable) != null) { - _ref4.front = this.front; - } - compiledArray = Splat.compileSplattedArray(o, this.args, true); - if (compiledArray.length) { - return this.compileSplat(o, compiledArray); - } - compiledArgs = []; - _ref5 = this.args; - for (argIndex = _i = 0, _len = _ref5.length; _i < _len; argIndex = ++_i) { - arg = _ref5[argIndex]; - if (argIndex) { - compiledArgs.push(this.makeCode(", ")); - } - compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST)); - } - fragments = []; - if (this.isSuper) { - preface = this.superReference(o) + (".call(" + (this.superThis(o))); - if (compiledArgs.length) { - preface += ", "; - } - fragments.push(this.makeCode(preface)); - } else { - if (this.isNew) { - fragments.push(this.makeCode('new ')); - } - fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS)); - fragments.push(this.makeCode("(")); - } - fragments.push.apply(fragments, compiledArgs); - fragments.push(this.makeCode(")")); - return fragments; - }; - - Call.prototype.compileSplat = function(o, splatArgs) { - var answer, base, fun, idt, name, ref; - if (this.isSuper) { - return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); - } - if (this.isNew) { - idt = this.tab + TAB; - return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})")); - } - answer = []; - base = new Value(this.variable); - if ((name = base.properties.pop()) && base.isComplex()) { - ref = o.scope.freeVariable('ref'); - answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o)); - } else { - fun = base.compileToFragments(o, LEVEL_ACCESS); - if (SIMPLENUM.test(fragmentsToText(fun))) { - fun = this.wrapInBraces(fun); - } - if (name) { - ref = fragmentsToText(fun); - fun.push.apply(fun, name.compileToFragments(o)); - } else { - ref = 'null'; - } - answer = answer.concat(fun); - } - return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")")); - }; - - return Call; - - })(Base); - - exports.Extends = Extends = (function(_super) { - __extends(Extends, _super); - - function Extends(child, parent) { - this.child = child; - this.parent = parent; - } - - Extends.prototype.children = ['child', 'parent']; - - Extends.prototype.compileToFragments = function(o) { - return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o); - }; - - return Extends; - - })(Base); - - exports.Access = Access = (function(_super) { - __extends(Access, _super); - - function Access(name, tag) { - this.name = name; - this.name.asKey = true; - this.soak = tag === 'soak'; - } - - Access.prototype.children = ['name']; - - Access.prototype.compileToFragments = function(o) { - var name; - name = this.name.compileToFragments(o); - if (IDENTIFIER.test(fragmentsToText(name))) { - name.unshift(this.makeCode(".")); - } else { - name.unshift(this.makeCode("[")); - name.push(this.makeCode("]")); - } - return name; - }; - - Access.prototype.isComplex = NO; - - return Access; - - })(Base); - - exports.Index = Index = (function(_super) { - __extends(Index, _super); - - function Index(index) { - this.index = index; - } - - Index.prototype.children = ['index']; - - Index.prototype.compileToFragments = function(o) { - return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]")); - }; - - Index.prototype.isComplex = function() { - return this.index.isComplex(); - }; - - return Index; - - })(Base); - - exports.Range = Range = (function(_super) { - __extends(Range, _super); - - Range.prototype.children = ['from', 'to']; - - function Range(from, to, tag) { - this.from = from; - this.to = to; - this.exclusive = tag === 'exclusive'; - this.equals = this.exclusive ? '' : '='; - } - - Range.prototype.compileVariables = function(o) { - var step, _ref4, _ref5, _ref6, _ref7; - o = merge(o, { - top: true - }); - _ref4 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref4[0], this.fromVar = _ref4[1]; - _ref5 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref5[0], this.toVar = _ref5[1]; - if (step = del(o, 'step')) { - _ref6 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref6[0], this.stepVar = _ref6[1]; - } - _ref7 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref7[0], this.toNum = _ref7[1]; - if (this.stepVar) { - return this.stepNum = this.stepVar.match(SIMPLENUM); - } - }; - - Range.prototype.compileNode = function(o) { - var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5; - if (!this.fromVar) { - this.compileVariables(o); - } - if (!o.index) { - return this.compileArray(o); - } - known = this.fromNum && this.toNum; - idx = del(o, 'index'); - idxName = del(o, 'name'); - namedIndex = idxName && idxName !== idx; - varPart = "" + idx + " = " + this.fromC; - if (this.toC !== this.toVar) { - varPart += ", " + this.toC; - } - if (this.step !== this.stepVar) { - varPart += ", " + this.step; - } - _ref4 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref4[0], gt = _ref4[1]; - condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref5 = [+this.fromNum, +this.toNum], from = _ref5[0], to = _ref5[1], _ref5), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); - stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--"; - if (namedIndex) { - varPart = "" + idxName + " = " + varPart; - } - if (namedIndex) { - stepPart = "" + idxName + " = " + stepPart; - } - return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)]; - }; - - Range.prototype.compileArray = function(o) { - var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results; - if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { - range = (function() { - _results = []; - for (var _i = _ref4 = +this.fromNum, _ref5 = +this.toNum; _ref4 <= _ref5 ? _i <= _ref5 : _i >= _ref5; _ref4 <= _ref5 ? _i++ : _i--){ _results.push(_i); } - return _results; - }).apply(this); - if (this.exclusive) { - range.pop(); - } - return [this.makeCode("[" + (range.join(', ')) + "]")]; - } - idt = this.tab + TAB; - i = o.scope.freeVariable('i'); - result = o.scope.freeVariable('results'); - pre = "\n" + idt + result + " = [];"; - if (this.fromNum && this.toNum) { - o.index = i; - body = fragmentsToText(this.compileNode(o)); - } else { - vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); - cond = "" + this.fromVar + " <= " + this.toVar; - body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; - } - post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; - hasArgs = function(node) { - return node != null ? node.contains(function(n) { - return n instanceof Literal && n.value === 'arguments' && !n.asKey; - }) : void 0; - }; - if (hasArgs(this.from) || hasArgs(this.to)) { - args = ', arguments'; - } - return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")]; - }; - - return Range; - - })(Base); - - exports.Slice = Slice = (function(_super) { - __extends(Slice, _super); - - Slice.prototype.children = ['range']; - - function Slice(range) { - this.range = range; - Slice.__super__.constructor.call(this); - } - - Slice.prototype.compileNode = function(o) { - var compiled, compiledText, from, fromCompiled, to, toStr, _ref4; - _ref4 = this.range, to = _ref4.to, from = _ref4.from; - fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; - if (to) { - compiled = to.compileToFragments(o, LEVEL_PAREN); - compiledText = fragmentsToText(compiled); - if (!(!this.range.exclusive && +compiledText === -1)) { - toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9")); - } - } - return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")]; - }; - - return Slice; - - })(Base); - - exports.Obj = Obj = (function(_super) { - __extends(Obj, _super); - - function Obj(props, generated) { - this.generated = generated != null ? generated : false; - this.objects = this.properties = props || []; - } - - Obj.prototype.children = ['properties']; - - Obj.prototype.compileNode = function(o) { - var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1; - props = this.properties; - if (!props.length) { - return [this.makeCode(this.front ? '({})' : '{}')]; - } - if (this.generated) { - for (_i = 0, _len = props.length; _i < _len; _i++) { - node = props[_i]; - if (node instanceof Value) { - node.error('cannot have an implicit value in an implicit object'); - } - } - } - idt = o.indent += TAB; - lastNoncom = this.lastNonComment(this.properties); - answer = []; - for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) { - prop = props[i]; - join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; - indent = prop instanceof Comment ? '' : idt; - if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { - prop.variable.error('Invalid object key'); - } - if (prop instanceof Value && prop["this"]) { - prop = new Assign(prop.properties[0].name, prop, 'object'); - } - if (!(prop instanceof Comment)) { - if (!(prop instanceof Assign)) { - prop = new Assign(prop, prop, 'object'); - } - (prop.variable.base || prop.variable).asKey = true; - } - if (indent) { - answer.push(this.makeCode(indent)); - } - answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP)); - if (join) { - answer.push(this.makeCode(join)); - } - } - answer.unshift(this.makeCode("{" + (props.length && '\n'))); - answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}")); - if (this.front) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Obj.prototype.assigns = function(name) { - var prop, _i, _len, _ref4; - _ref4 = this.properties; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - prop = _ref4[_i]; - if (prop.assigns(name)) { - return true; - } - } - return false; - }; - - return Obj; - - })(Base); - - exports.Arr = Arr = (function(_super) { - __extends(Arr, _super); - - function Arr(objs) { - this.objects = objs || []; - } - - Arr.prototype.children = ['objects']; - - Arr.prototype.compileNode = function(o) { - var answer, compiledObjs, fragments, index, obj, _i, _len; - if (!this.objects.length) { - return [this.makeCode('[]')]; - } - o.indent += TAB; - answer = Splat.compileSplattedArray(o, this.objects); - if (answer.length) { - return answer; - } - answer = []; - compiledObjs = (function() { - var _i, _len, _ref4, _results; - _ref4 = this.objects; - _results = []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - _results.push(obj.compileToFragments(o, LEVEL_LIST)); - } - return _results; - }).call(this); - for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) { - fragments = compiledObjs[index]; - if (index) { - answer.push(this.makeCode(", ")); - } - answer.push.apply(answer, fragments); - } - if (fragmentsToText(answer).indexOf('\n') >= 0) { - answer.unshift(this.makeCode("[\n" + o.indent)); - answer.push(this.makeCode("\n" + this.tab + "]")); - } else { - answer.unshift(this.makeCode("[")); - answer.push(this.makeCode("]")); - } - return answer; - }; - - Arr.prototype.assigns = function(name) { - var obj, _i, _len, _ref4; - _ref4 = this.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (obj.assigns(name)) { - return true; - } - } - return false; - }; - - return Arr; - - })(Base); - - exports.Class = Class = (function(_super) { - __extends(Class, _super); - - function Class(variable, parent, body) { - this.variable = variable; - this.parent = parent; - this.body = body != null ? body : new Block; - this.boundFuncs = []; - this.body.classBody = true; - } - - Class.prototype.children = ['variable', 'parent', 'body']; - - Class.prototype.determineName = function() { - var decl, tail; - if (!this.variable) { - return null; - } - decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; - if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) { - this.variable.error("class variable name may not be " + decl); - } - return decl && (decl = IDENTIFIER.test(decl) && decl); - }; - - Class.prototype.setContext = function(name) { - return this.body.traverseChildren(false, function(node) { - if (node.classBody) { - return false; - } - if (node instanceof Literal && node.value === 'this') { - return node.value = name; - } else if (node instanceof Code) { - node.klass = name; - if (node.bound) { - return node.context = name; - } - } - }); - }; - - Class.prototype.addBoundFunctions = function(o) { - var bvar, lhs, _i, _len, _ref4; - _ref4 = this.boundFuncs; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - bvar = _ref4[_i]; - lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); - this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")); - } - }; - - Class.prototype.addProperties = function(node, name, o) { - var assign, base, exprs, func, props; - props = node.base.properties.slice(0); - exprs = (function() { - var _results; - _results = []; - while (assign = props.shift()) { - if (assign instanceof Assign) { - base = assign.variable.base; - delete assign.context; - func = assign.value; - if (base.value === 'constructor') { - if (this.ctor) { - assign.error('cannot define more than one constructor in a class'); - } - if (func.bound) { - assign.error('cannot define a constructor as a bound function'); - } - if (func instanceof Code) { - assign = this.ctor = func; - } else { - this.externalCtor = o.scope.freeVariable('class'); - assign = new Assign(new Literal(this.externalCtor), func); - } - } else { - if (assign.variable["this"]) { - func["static"] = true; - if (func.bound) { - func.context = name; - } - } else { - assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]); - if (func instanceof Code && func.bound) { - this.boundFuncs.push(base); - func.bound = false; - } - } - } - } - _results.push(assign); - } - return _results; - }).call(this); - return compact(exprs); - }; - - Class.prototype.walkBody = function(name, o) { - var _this = this; - return this.traverseChildren(false, function(child) { - var cont, exps, i, node, _i, _len, _ref4; - cont = true; - if (child instanceof Class) { - return false; - } - if (child instanceof Block) { - _ref4 = exps = child.expressions; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - node = _ref4[i]; - if (node instanceof Value && node.isObject(true)) { - cont = false; - exps[i] = _this.addProperties(node, name, o); - } - } - child.expressions = exps = flatten(exps); - } - return cont && !(child instanceof Class); - }); - }; - - Class.prototype.hoistDirectivePrologue = function() { - var expressions, index, node; - index = 0; - expressions = this.body.expressions; - while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) { - ++index; - } - return this.directives = expressions.splice(0, index); - }; - - Class.prototype.ensureConstructor = function(name, o) { - var missing, ref, superCall; - missing = !this.ctor; - this.ctor || (this.ctor = new Code); - this.ctor.ctor = this.ctor.name = name; - this.ctor.klass = null; - this.ctor.noReturn = true; - if (missing) { - if (this.parent) { - superCall = new Literal("" + name + ".__super__.constructor.apply(this, arguments)"); - } - if (this.externalCtor) { - superCall = new Literal("" + this.externalCtor + ".apply(this, arguments)"); - } - if (superCall) { - ref = new Literal(o.scope.freeVariable('ref')); - this.ctor.body.unshift(new Assign(ref, superCall)); - } - this.addBoundFunctions(o); - if (superCall) { - this.ctor.body.push(ref); - this.ctor.body.makeReturn(); - } - return this.body.expressions.unshift(this.ctor); - } else { - return this.addBoundFunctions(o); - } - }; - - Class.prototype.compileNode = function(o) { - var call, decl, klass, lname, name, params, _ref4; - decl = this.determineName(); - name = decl || '_Class'; - if (name.reserved) { - name = "_" + name; - } - lname = new Literal(name); - this.hoistDirectivePrologue(); - this.setContext(name); - this.walkBody(name, o); - this.ensureConstructor(name, o); - this.body.spaced = true; - if (!(this.ctor instanceof Code)) { - this.body.expressions.unshift(this.ctor); - } - this.body.expressions.push(lname); - (_ref4 = this.body.expressions).unshift.apply(_ref4, this.directives); - call = Closure.wrap(this.body); - if (this.parent) { - this.superClass = new Literal(o.scope.freeVariable('super', false)); - this.body.expressions.unshift(new Extends(lname, this.superClass)); - call.args.push(this.parent); - params = call.variable.params || call.variable.base.params; - params.push(new Param(this.superClass)); - } - klass = new Parens(call, true); - if (this.variable) { - klass = new Assign(this.variable, klass); - } - return klass.compileToFragments(o); - }; - - return Class; - - })(Base); - - exports.Assign = Assign = (function(_super) { - __extends(Assign, _super); - - function Assign(variable, value, context, options) { - var forbidden, name, _ref4; - this.variable = variable; - this.value = value; - this.context = context; - this.param = options && options.param; - this.subpattern = options && options.subpattern; - forbidden = (_ref4 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0); - if (forbidden && this.context !== 'object') { - this.variable.error("variable name may not be \"" + name + "\""); - } - } - - Assign.prototype.children = ['variable', 'value']; - - Assign.prototype.isStatement = function(o) { - return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0; - }; - - Assign.prototype.assigns = function(name) { - return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); - }; - - Assign.prototype.unfoldSoak = function(o) { - return unfoldSoak(o, this, 'variable'); - }; - - Assign.prototype.compileNode = function(o) { - var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7; - if (isValue = this.variable instanceof Value) { - if (this.variable.isArray() || this.variable.isObject()) { - return this.compilePatternMatch(o); - } - if (this.variable.isSplice()) { - return this.compileSplice(o); - } - if ((_ref4 = this.context) === '||=' || _ref4 === '&&=' || _ref4 === '?=') { - return this.compileConditional(o); - } - } - compiledName = this.variable.compileToFragments(o, LEVEL_LIST); - name = fragmentsToText(compiledName); - if (!this.context) { - varBase = this.variable.unwrapAll(); - if (!varBase.isAssignable()) { - this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned"); - } - if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { - if (this.param) { - o.scope.add(name, 'var'); - } else { - o.scope.find(name); - } - } - } - if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) { - if (match[1]) { - this.value.klass = match[1]; - } - this.value.name = (_ref5 = (_ref6 = (_ref7 = match[2]) != null ? _ref7 : match[3]) != null ? _ref6 : match[4]) != null ? _ref5 : match[5]; - } - val = this.value.compileToFragments(o, LEVEL_LIST); - if (this.context === 'object') { - return compiledName.concat(this.makeCode(": "), val); - } - answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val); - if (o.level <= LEVEL_LIST) { - return answer; - } else { - return this.wrapInBraces(answer); - } - }; - - Assign.prototype.compilePatternMatch = function(o) { - var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; - top = o.level === LEVEL_TOP; - value = this.value; - objects = this.variable.base.objects; - if (!(olen = objects.length)) { - code = value.compileToFragments(o); - if (o.level >= LEVEL_OP) { - return this.wrapInBraces(code); - } else { - return code; - } - } - isObject = this.variable.isObject(); - if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { - if (obj instanceof Assign) { - _ref4 = obj, (_ref5 = _ref4.variable, idx = _ref5.base), obj = _ref4.value; - } else { - idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); - } - acc = IDENTIFIER.test(idx.unwrap().value || 0); - value = new Value(value); - value.properties.push(new (acc ? Access : Index)(idx)); - if (_ref6 = obj.unwrap().value, __indexOf.call(RESERVED, _ref6) >= 0) { - obj.error("assignment to a reserved word: " + (obj.compile(o))); - } - return new Assign(obj, value, null, { - param: this.param - }).compileToFragments(o, LEVEL_TOP); - } - vvar = value.compileToFragments(o, LEVEL_LIST); - vvarText = fragmentsToText(vvar); - assigns = []; - splat = false; - if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) { - assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar))); - vvar = [this.makeCode(ref)]; - vvarText = ref; - } - for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) { - obj = objects[i]; - idx = i; - if (isObject) { - if (obj instanceof Assign) { - _ref7 = obj, (_ref8 = _ref7.variable, idx = _ref8.base), obj = _ref7.value; - } else { - if (obj.base instanceof Parens) { - _ref9 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref9[0], idx = _ref9[1]; - } else { - idx = obj["this"] ? obj.properties[0].name : obj; - } - } - } - if (!splat && obj instanceof Splat) { - name = obj.name.unwrap().value; - obj = obj.unwrap(); - val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i; - if (rest = olen - i - 1) { - ivar = o.scope.freeVariable('i'); - val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; - } else { - val += ") : []"; - } - val = new Literal(val); - splat = "" + ivar + "++"; - } else { - name = obj.unwrap().value; - if (obj instanceof Splat) { - obj.error("multiple splats are disallowed in an assignment"); - } - if (typeof idx === 'number') { - idx = new Literal(splat || idx); - acc = false; - } else { - acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0); - } - val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); - } - if ((name != null) && __indexOf.call(RESERVED, name) >= 0) { - obj.error("assignment to a reserved word: " + (obj.compile(o))); - } - assigns.push(new Assign(obj, val, null, { - param: this.param, - subpattern: true - }).compileToFragments(o, LEVEL_LIST)); - } - if (!(top || this.subpattern)) { - assigns.push(vvar); - } - fragments = this.joinFragmentArrays(assigns, ', '); - if (o.level < LEVEL_LIST) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - Assign.prototype.compileConditional = function(o) { - var left, right, _ref4; - _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1]; - if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { - this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); - } - if (__indexOf.call(this.context, "?") >= 0) { - o.isExistentialEquals = true; - } - return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o); - }; - - Assign.prototype.compileSplice = function(o) { - var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6; - _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive; - name = this.variable.compile(o); - if (from) { - _ref5 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref5[0], fromRef = _ref5[1]; - } else { - fromDecl = fromRef = '0'; - } - if (to) { - if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) { - to = +to.compile(o) - +fromRef; - if (!exclusive) { - to += 1; - } - } else { - to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef; - if (!exclusive) { - to += ' + 1'; - } - } - } else { - to = "9e9"; - } - _ref6 = this.value.cache(o, LEVEL_LIST), valDef = _ref6[0], valRef = _ref6[1]; - answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); - if (o.level > LEVEL_TOP) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - return Assign; - - })(Base); - - exports.Code = Code = (function(_super) { - __extends(Code, _super); - - function Code(params, body, tag) { - this.params = params || []; - this.body = body || new Block; - this.bound = tag === 'boundfunc'; - if (this.bound) { - this.context = '_this'; - } - } - - Code.prototype.children = ['params', 'body']; - - Code.prototype.isStatement = function() { - return !!this.ctor; - }; - - Code.prototype.jumps = NO; - - Code.prototype.compileNode = function(o) { - var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8; - o.scope = new Scope(o.scope, this.body, this); - o.scope.shared = del(o, 'sharedScope'); - o.indent += TAB; - delete o.bare; - delete o.isExistentialEquals; - params = []; - exprs = []; - this.eachParamName(function(name) { - if (!o.scope.check(name)) { - return o.scope.parameter(name); - } - }); - _ref4 = this.params; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - if (!param.splat) { - continue; - } - _ref5 = this.params; - for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) { - p = _ref5[_j].name; - if (p["this"]) { - p = p.properties[0].name; - } - if (p.value) { - o.scope.add(p.value, 'var', true); - } - } - splats = new Assign(new Value(new Arr((function() { - var _k, _len2, _ref6, _results; - _ref6 = this.params; - _results = []; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - p = _ref6[_k]; - _results.push(p.asReference(o)); - } - return _results; - }).call(this))), new Value(new Literal('arguments'))); - break; - } - _ref6 = this.params; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - param = _ref6[_k]; - if (param.isComplex()) { - val = ref = param.asReference(o); - if (param.value) { - val = new Op('?', ref, param.value); - } - exprs.push(new Assign(new Value(param.name), val, '=', { - param: true - })); - } else { - ref = param; - if (param.value) { - lit = new Literal(ref.name.value + ' == null'); - val = new Assign(new Value(param.name), param.value, '='); - exprs.push(new If(lit, val)); - } - } - if (!splats) { - params.push(ref); - } - } - wasEmpty = this.body.isEmpty(); - if (splats) { - exprs.unshift(splats); - } - if (exprs.length) { - (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs); - } - for (i = _l = 0, _len3 = params.length; _l < _len3; i = ++_l) { - p = params[i]; - params[i] = p.compileToFragments(o); - o.scope.parameter(fragmentsToText(params[i])); - } - uniqs = []; - this.eachParamName(function(name, node) { - if (__indexOf.call(uniqs, name) >= 0) { - node.error("multiple parameters named '" + name + "'"); - } - return uniqs.push(name); - }); - if (!(wasEmpty || this.noReturn)) { - this.body.makeReturn(); - } - if (this.bound) { - if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) { - this.bound = this.context = o.scope.parent.method.context; - } else if (!this["static"]) { - o.scope.parent.assign('_this', 'this'); - } - } - idt = o.indent; - code = 'function'; - if (this.ctor) { - code += ' ' + this.name; - } - code += '('; - answer = [this.makeCode(code)]; - for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { - p = params[i]; - if (i) { - answer.push(this.makeCode(", ")); - } - answer.push.apply(answer, p); - } - answer.push(this.makeCode(') {')); - if (!this.body.isEmpty()) { - answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab)); - } - answer.push(this.makeCode('}')); - if (this.ctor) { - return [this.makeCode(this.tab)].concat(__slice.call(answer)); - } - if (this.front || (o.level >= LEVEL_ACCESS)) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Code.prototype.eachParamName = function(iterator) { - var param, _i, _len, _ref4, _results; - _ref4 = this.params; - _results = []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - _results.push(param.eachName(iterator)); - } - return _results; - }; - - Code.prototype.traverseChildren = function(crossScope, func) { - if (crossScope) { - return Code.__super__.traverseChildren.call(this, crossScope, func); - } - }; - - return Code; - - })(Base); - - exports.Param = Param = (function(_super) { - __extends(Param, _super); - - function Param(name, value, splat) { - var _ref4; - this.name = name; - this.value = value; - this.splat = splat; - if (_ref4 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) { - this.name.error("parameter name \"" + name + "\" is not allowed"); - } - } - - Param.prototype.children = ['name', 'value']; - - Param.prototype.compileToFragments = function(o) { - return this.name.compileToFragments(o, LEVEL_LIST); - }; - - Param.prototype.asReference = function(o) { - var node; - if (this.reference) { - return this.reference; - } - node = this.name; - if (node["this"]) { - node = node.properties[0].name; - if (node.value.reserved) { - node = new Literal(o.scope.freeVariable(node.value)); - } - } else if (node.isComplex()) { - node = new Literal(o.scope.freeVariable('arg')); - } - node = new Value(node); - if (this.splat) { - node = new Splat(node); - } - return this.reference = node; - }; - - Param.prototype.isComplex = function() { - return this.name.isComplex(); - }; - - Param.prototype.eachName = function(iterator, name) { - var atParam, node, obj, _i, _len, _ref4; - if (name == null) { - name = this.name; - } - atParam = function(obj) { - var node; - node = obj.properties[0].name; - if (!node.value.reserved) { - return iterator(node.value, node); - } - }; - if (name instanceof Literal) { - return iterator(name.value, name); - } - if (name instanceof Value) { - return atParam(name); - } - _ref4 = name.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (obj instanceof Assign) { - this.eachName(iterator, obj.value.unwrap()); - } else if (obj instanceof Splat) { - node = obj.name.unwrap(); - iterator(node.value, node); - } else if (obj instanceof Value) { - if (obj.isArray() || obj.isObject()) { - this.eachName(iterator, obj.base); - } else if (obj["this"]) { - atParam(obj); - } else { - iterator(obj.base.value, obj.base); - } - } else { - obj.error("illegal parameter " + (obj.compile())); - } - } - }; - - return Param; - - })(Base); - - exports.Splat = Splat = (function(_super) { - __extends(Splat, _super); - - Splat.prototype.children = ['name']; - - Splat.prototype.isAssignable = YES; - - function Splat(name) { - this.name = name.compile ? name : new Literal(name); - } - - Splat.prototype.assigns = function(name) { - return this.name.assigns(name); - }; - - Splat.prototype.compileToFragments = function(o) { - return this.name.compileToFragments(o); - }; - - Splat.prototype.unwrap = function() { - return this.name; - }; - - Splat.compileSplattedArray = function(o, list, apply) { - var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len; - index = -1; - while ((node = list[++index]) && !(node instanceof Splat)) { - continue; - } - if (index >= list.length) { - return []; - } - if (list.length === 1) { - node = list[0]; - fragments = node.compileToFragments(o, LEVEL_LIST); - if (apply) { - return fragments; - } - return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")")); - } - args = list.slice(index); - for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { - node = args[i]; - compiledNode = node.compileToFragments(o, LEVEL_LIST); - args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]")); - } - if (index === 0) { - node = list[0]; - concatPart = node.joinFragmentArrays(args.slice(1), ', '); - return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); - } - base = (function() { - var _j, _len1, _ref4, _results; - _ref4 = list.slice(0, index); - _results = []; - for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { - node = _ref4[_j]; - _results.push(node.compileToFragments(o, LEVEL_LIST)); - } - return _results; - })(); - base = list[0].joinFragmentArrays(base, ', '); - concatPart = list[index].joinFragmentArrays(args, ', '); - return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")")); - }; - - return Splat; - - })(Base); - - exports.While = While = (function(_super) { - __extends(While, _super); - - function While(condition, options) { - this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; - this.guard = options != null ? options.guard : void 0; - } - - While.prototype.children = ['condition', 'guard', 'body']; - - While.prototype.isStatement = YES; - - While.prototype.makeReturn = function(res) { - if (res) { - return While.__super__.makeReturn.apply(this, arguments); - } else { - this.returns = !this.jumps({ - loop: true - }); - return this; - } - }; - - While.prototype.addBody = function(body) { - this.body = body; - return this; - }; - - While.prototype.jumps = function() { - var expressions, node, _i, _len; - expressions = this.body.expressions; - if (!expressions.length) { - return false; - } - for (_i = 0, _len = expressions.length; _i < _len; _i++) { - node = expressions[_i]; - if (node.jumps({ - loop: true - })) { - return node; - } - } - return false; - }; - - While.prototype.compileNode = function(o) { - var answer, body, rvar, set; - o.indent += TAB; - set = ''; - body = this.body; - if (body.isEmpty()) { - body = this.makeCode(''); - } else { - if (this.returns) { - body.makeReturn(rvar = o.scope.freeVariable('results')); - set = "" + this.tab + rvar + " = [];\n"; - } - if (this.guard) { - if (body.expressions.length > 1) { - body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); - } else { - if (this.guard) { - body = Block.wrap([new If(this.guard, body)]); - } - } - } - body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab)); - } - answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}")); - if (this.returns) { - answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";")); - } - return answer; - }; - - return While; - - })(Base); - - exports.Op = Op = (function(_super) { - var CONVERSIONS, INVERSIONS; - - __extends(Op, _super); - - function Op(op, first, second, flip) { - if (op === 'in') { - return new In(first, second); - } - if (op === 'do') { - return this.generateDo(first); - } - if (op === 'new') { - if (first instanceof Call && !first["do"] && !first.isNew) { - return first.newInstance(); - } - if (first instanceof Code && first.bound || first["do"]) { - first = new Parens(first); - } - } - this.operator = CONVERSIONS[op] || op; - this.first = first; - this.second = second; - this.flip = !!flip; - return this; - } - - CONVERSIONS = { - '==': '===', - '!=': '!==', - 'of': 'in' - }; - - INVERSIONS = { - '!==': '===', - '===': '!==' - }; - - Op.prototype.children = ['first', 'second']; - - Op.prototype.isSimpleNumber = NO; - - Op.prototype.isUnary = function() { - return !this.second; - }; - - Op.prototype.isComplex = function() { - var _ref4; - return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex(); - }; - - Op.prototype.isChainable = function() { - var _ref4; - return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!=='; - }; - - Op.prototype.invert = function() { - var allInvertable, curr, fst, op, _ref4; - if (this.isChainable() && this.first.isChainable()) { - allInvertable = true; - curr = this; - while (curr && curr.operator) { - allInvertable && (allInvertable = curr.operator in INVERSIONS); - curr = curr.first; - } - if (!allInvertable) { - return new Parens(this).invert(); - } - curr = this; - while (curr && curr.operator) { - curr.invert = !curr.invert; - curr.operator = INVERSIONS[curr.operator]; - curr = curr.first; - } - return this; - } else if (op = INVERSIONS[this.operator]) { - this.operator = op; - if (this.first.unwrap() instanceof Op) { - this.first.invert(); - } - return this; - } else if (this.second) { - return new Parens(this).invert(); - } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref4 = fst.operator) === '!' || _ref4 === 'in' || _ref4 === 'instanceof')) { - return fst; - } else { - return new Op('!', this); - } - }; - - Op.prototype.unfoldSoak = function(o) { - var _ref4; - return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first'); - }; - - Op.prototype.generateDo = function(exp) { - var call, func, param, passedParams, ref, _i, _len, _ref4; - passedParams = []; - func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; - _ref4 = func.params || []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - if (param.value) { - passedParams.push(param.value); - delete param.value; - } else { - passedParams.push(param); - } - } - call = new Call(exp, passedParams); - call["do"] = true; - return call; - }; - - Op.prototype.compileNode = function(o) { - var answer, isChain, _ref4, _ref5; - isChain = this.isChainable() && this.first.isChainable(); - if (!isChain) { - this.first.front = this.front; - } - if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { - this.error('delete operand may not be argument or var'); - } - if (((_ref4 = this.operator) === '--' || _ref4 === '++') && (_ref5 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref5) >= 0)) { - this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\""); - } - if (this.isUnary()) { - return this.compileUnary(o); - } - if (isChain) { - return this.compileChain(o); - } - if (this.operator === '?') { - return this.compileExistence(o); - } - answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP)); - if (o.level <= LEVEL_OP) { - return answer; - } else { - return this.wrapInBraces(answer); - } - }; - - Op.prototype.compileChain = function(o) { - var fragments, fst, shared, _ref4; - _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1]; - fst = this.first.compileToFragments(o, LEVEL_OP); - fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); - return this.wrapInBraces(fragments); - }; - - Op.prototype.compileExistence = function(o) { - var fst, ref; - if (!o.isExistentialEquals && this.first.isComplex()) { - ref = new Literal(o.scope.freeVariable('ref')); - fst = new Parens(new Assign(ref, this.first)); - } else { - fst = this.first; - ref = fst; - } - return new If(new Existence(fst), ref, { - type: 'if' - }).addElse(this.second).compileToFragments(o); - }; - - Op.prototype.compileUnary = function(o) { - var op, parts, plusMinus; - parts = []; - op = this.operator; - parts.push([this.makeCode(op)]); - if (op === '!' && this.first instanceof Existence) { - this.first.negated = !this.first.negated; - return this.first.compileToFragments(o); - } - if (o.level >= LEVEL_ACCESS) { - return (new Parens(this)).compileToFragments(o); - } - plusMinus = op === '+' || op === '-'; - if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) { - parts.push([this.makeCode(' ')]); - } - if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) { - this.first = new Parens(this.first); - } - parts.push(this.first.compileToFragments(o, LEVEL_OP)); - if (this.flip) { - parts.reverse(); - } - return this.joinFragmentArrays(parts, ''); - }; - - Op.prototype.toString = function(idt) { - return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); - }; - - return Op; - - })(Base); - - exports.In = In = (function(_super) { - __extends(In, _super); - - function In(object, array) { - this.object = object; - this.array = array; - } - - In.prototype.children = ['object', 'array']; - - In.prototype.invert = NEGATE; - - In.prototype.compileNode = function(o) { - var hasSplat, obj, _i, _len, _ref4; - if (this.array instanceof Value && this.array.isArray()) { - _ref4 = this.array.base.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (!(obj instanceof Splat)) { - continue; - } - hasSplat = true; - break; - } - if (!hasSplat) { - return this.compileOrTest(o); - } - } - return this.compileLoopTest(o); - }; - - In.prototype.compileOrTest = function(o) { - var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6; - if (this.array.base.objects.length === 0) { - return [this.makeCode("" + (!!this.negated))]; - } - _ref4 = this.object.cache(o, LEVEL_OP), sub = _ref4[0], ref = _ref4[1]; - _ref5 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref5[0], cnj = _ref5[1]; - tests = []; - _ref6 = this.array.base.objects; - for (i = _i = 0, _len = _ref6.length; _i < _len; i = ++_i) { - item = _ref6[i]; - if (i) { - tests.push(this.makeCode(cnj)); - } - tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)); - } - if (o.level < LEVEL_OP) { - return tests; - } else { - return this.wrapInBraces(tests); - } - }; - - In.prototype.compileLoopTest = function(o) { - var fragments, ref, sub, _ref4; - _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1]; - fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); - if (fragmentsToText(sub) === fragmentsToText(ref)) { - return fragments; - } - fragments = sub.concat(this.makeCode(', '), fragments); - if (o.level < LEVEL_LIST) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - In.prototype.toString = function(idt) { - return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); - }; - - return In; - - })(Base); - - exports.Try = Try = (function(_super) { - __extends(Try, _super); - - function Try(attempt, errorVariable, recovery, ensure) { - this.attempt = attempt; - this.errorVariable = errorVariable; - this.recovery = recovery; - this.ensure = ensure; - } - - Try.prototype.children = ['attempt', 'recovery', 'ensure']; - - Try.prototype.isStatement = YES; - - Try.prototype.jumps = function(o) { - var _ref4; - return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0); - }; - - Try.prototype.makeReturn = function(res) { - if (this.attempt) { - this.attempt = this.attempt.makeReturn(res); - } - if (this.recovery) { - this.recovery = this.recovery.makeReturn(res); - } - return this; - }; - - Try.prototype.compileNode = function(o) { - var catchPart, ensurePart, placeholder, tryPart; - o.indent += TAB; - tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); - catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; - ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; - return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); - }; - - return Try; - - })(Base); - - exports.Throw = Throw = (function(_super) { - __extends(Throw, _super); - - function Throw(expression) { - this.expression = expression; - } - - Throw.prototype.children = ['expression']; - - Throw.prototype.isStatement = YES; - - Throw.prototype.jumps = NO; - - Throw.prototype.makeReturn = THIS; - - Throw.prototype.compileNode = function(o) { - return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";")); - }; - - return Throw; - - })(Base); - - exports.Existence = Existence = (function(_super) { - __extends(Existence, _super); - - function Existence(expression) { - this.expression = expression; - } - - Existence.prototype.children = ['expression']; - - Existence.prototype.invert = NEGATE; - - Existence.prototype.compileNode = function(o) { - var cmp, cnj, code, _ref4; - this.expression.front = this.front; - code = this.expression.compile(o, LEVEL_OP); - if (IDENTIFIER.test(code) && !o.scope.check(code)) { - _ref4 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref4[0], cnj = _ref4[1]; - code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; - } else { - code = "" + code + " " + (this.negated ? '==' : '!=') + " null"; - } - return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")]; - }; - - return Existence; - - })(Base); - - exports.Parens = Parens = (function(_super) { - __extends(Parens, _super); - - function Parens(body) { - this.body = body; - } - - Parens.prototype.children = ['body']; - - Parens.prototype.unwrap = function() { - return this.body; - }; - - Parens.prototype.isComplex = function() { - return this.body.isComplex(); - }; - - Parens.prototype.compileNode = function(o) { - var bare, expr, fragments; - expr = this.body.unwrap(); - if (expr instanceof Value && expr.isAtomic()) { - expr.front = this.front; - return expr.compileToFragments(o); - } - fragments = expr.compileToFragments(o, LEVEL_PAREN); - bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); - if (bare) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - return Parens; - - })(Base); - - exports.For = For = (function(_super) { - __extends(For, _super); - - function For(body, source) { - var _ref4; - this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; - this.body = Block.wrap([body]); - this.own = !!source.own; - this.object = !!source.object; - if (this.object) { - _ref4 = [this.index, this.name], this.name = _ref4[0], this.index = _ref4[1]; - } - if (this.index instanceof Value) { - this.index.error('index cannot be a pattern matching expression'); - } - this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; - this.pattern = this.name instanceof Value; - if (this.range && this.index) { - this.index.error('indexes do not apply to range loops'); - } - if (this.range && this.pattern) { - this.name.error('cannot pattern match over range loops'); - } - if (this.own && !this.object) { - this.index.error('cannot use own with for-in'); - } - this.returns = false; - } - - For.prototype.children = ['body', 'source', 'guard', 'step']; - - For.prototype.compileNode = function(o) { - var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5; - body = Block.wrap([this.body]); - lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0; - if (lastJumps && lastJumps instanceof Return) { - this.returns = false; - } - source = this.range ? this.source.base : this.source; - scope = o.scope; - name = this.name && (this.name.compile(o, LEVEL_LIST)); - index = this.index && (this.index.compile(o, LEVEL_LIST)); - if (name && !this.pattern) { - scope.find(name); - } - if (index) { - scope.find(index); - } - if (this.returns) { - rvar = scope.freeVariable('results'); - } - ivar = (this.object && index) || scope.freeVariable('i'); - kvar = (this.range && name) || index || ivar; - kvarAssign = kvar !== ivar ? "" + kvar + " = " : ""; - if (this.step && !this.range) { - _ref5 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref5[0], stepVar = _ref5[1]; - stepNum = stepVar.match(SIMPLENUM); - } - if (this.pattern) { - name = ivar; - } - varPart = ''; - guardPart = ''; - defPart = ''; - idt1 = this.tab + TAB; - if (this.range) { - forPartFragments = source.compileToFragments(merge(o, { - index: ivar, - name: name, - step: this.step - })); - } else { - svar = this.source.compile(o, LEVEL_LIST); - if ((name || this.own) && !IDENTIFIER.test(svar)) { - defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; - svar = ref; - } - if (name && !this.pattern) { - namePart = "" + name + " = " + svar + "[" + kvar + "]"; - } - if (!this.object) { - if (step !== stepVar) { - defPart += "" + this.tab + step + ";\n"; - } - if (!(this.step && stepNum && (down = +stepNum < 0))) { - lvar = scope.freeVariable('len'); - } - declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length"; - declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1"; - compare = "" + ivar + " < " + lvar; - compareDown = "" + ivar + " >= 0"; - if (this.step) { - if (stepNum) { - if (down) { - compare = compareDown; - declare = declareDown; - } - } else { - compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown; - declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")"; - } - increment = "" + ivar + " += " + stepVar; - } else { - increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++"); - } - forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)]; - } - } - if (this.returns) { - resultPart = "" + this.tab + rvar + " = [];\n"; - returnResult = "\n" + this.tab + "return " + rvar + ";"; - body.makeReturn(rvar); - } - if (this.guard) { - if (body.expressions.length > 1) { - body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); - } else { - if (this.guard) { - body = Block.wrap([new If(this.guard, body)]); - } - } - } - if (this.pattern) { - body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]"))); - } - defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body)); - if (namePart) { - varPart = "\n" + idt1 + namePart + ";"; - } - if (this.object) { - forPartFragments = [this.makeCode("" + kvar + " in " + svar)]; - if (this.own) { - guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;"; - } - } - bodyFragments = body.compileToFragments(merge(o, { - indent: idt1 - }), LEVEL_TOP); - if (bodyFragments && (bodyFragments.length > 0)) { - bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n")); - } - return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || ''))); - }; - - For.prototype.pluckDirectCall = function(o, body) { - var base, defs, expr, fn, idx, ref, val, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; - defs = []; - _ref4 = body.expressions; - for (idx = _i = 0, _len = _ref4.length; _i < _len; idx = ++_i) { - expr = _ref4[idx]; - expr = expr.unwrapAll(); - if (!(expr instanceof Call)) { - continue; - } - val = expr.variable.unwrapAll(); - if (!((val instanceof Code) || (val instanceof Value && ((_ref5 = val.base) != null ? _ref5.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref6 = (_ref7 = val.properties[0].name) != null ? _ref7.value : void 0) === 'call' || _ref6 === 'apply')))) { - continue; - } - fn = ((_ref8 = val.base) != null ? _ref8.unwrapAll() : void 0) || val; - ref = new Literal(o.scope.freeVariable('fn')); - base = new Value(ref); - if (val.base) { - _ref9 = [base, val], val.base = _ref9[0], base = _ref9[1]; - } - body.expressions[idx] = new Call(base, expr.args); - defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); - } - return defs; - }; - - return For; - - })(While); - - exports.Switch = Switch = (function(_super) { - __extends(Switch, _super); - - function Switch(subject, cases, otherwise) { - this.subject = subject; - this.cases = cases; - this.otherwise = otherwise; - } - - Switch.prototype.children = ['subject', 'cases', 'otherwise']; - - Switch.prototype.isStatement = YES; - - Switch.prototype.jumps = function(o) { - var block, conds, _i, _len, _ref4, _ref5, _ref6; - if (o == null) { - o = { - block: true - }; - } - _ref4 = this.cases; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - _ref5 = _ref4[_i], conds = _ref5[0], block = _ref5[1]; - if (block.jumps(o)) { - return block; - } - } - return (_ref6 = this.otherwise) != null ? _ref6.jumps(o) : void 0; - }; - - Switch.prototype.makeReturn = function(res) { - var pair, _i, _len, _ref4, _ref5; - _ref4 = this.cases; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - pair = _ref4[_i]; - pair[1].makeReturn(res); - } - if (res) { - this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); - } - if ((_ref5 = this.otherwise) != null) { - _ref5.makeReturn(res); - } - return this; - }; - - Switch.prototype.compileNode = function(o) { - var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref4, _ref5, _ref6; - idt1 = o.indent + TAB; - idt2 = o.indent = idt1 + TAB; - fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); - _ref4 = this.cases; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - _ref5 = _ref4[i], conditions = _ref5[0], block = _ref5[1]; - _ref6 = flatten([conditions]); - for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { - cond = _ref6[_j]; - if (!this.subject) { - cond = cond.invert(); - } - fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n")); - } - if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) { - fragments = fragments.concat(body, this.makeCode('\n')); - } - if (i === this.cases.length - 1 && !this.otherwise) { - break; - } - expr = this.lastNonComment(block.expressions); - if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { - continue; - } - fragments.push(cond.makeCode(idt2 + 'break;\n')); - } - if (this.otherwise && this.otherwise.expressions.length) { - fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")])); - } - fragments.push(this.makeCode(this.tab + '}')); - return fragments; - }; - - return Switch; - - })(Base); - - exports.If = If = (function(_super) { - __extends(If, _super); - - function If(condition, body, options) { - this.body = body; - if (options == null) { - options = {}; - } - this.condition = options.type === 'unless' ? condition.invert() : condition; - this.elseBody = null; - this.isChain = false; - this.soak = options.soak; - } - - If.prototype.children = ['condition', 'body', 'elseBody']; - - If.prototype.bodyNode = function() { - var _ref4; - return (_ref4 = this.body) != null ? _ref4.unwrap() : void 0; - }; - - If.prototype.elseBodyNode = function() { - var _ref4; - return (_ref4 = this.elseBody) != null ? _ref4.unwrap() : void 0; - }; - - If.prototype.addElse = function(elseBody) { - if (this.isChain) { - this.elseBodyNode().addElse(elseBody); - } else { - this.isChain = elseBody instanceof If; - this.elseBody = this.ensureBlock(elseBody); - } - return this; - }; - - If.prototype.isStatement = function(o) { - var _ref4; - return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref4 = this.elseBodyNode()) != null ? _ref4.isStatement(o) : void 0); - }; - - If.prototype.jumps = function(o) { - var _ref4; - return this.body.jumps(o) || ((_ref4 = this.elseBody) != null ? _ref4.jumps(o) : void 0); - }; - - If.prototype.compileNode = function(o) { - if (this.isStatement(o)) { - return this.compileStatement(o); - } else { - return this.compileExpression(o); - } - }; - - If.prototype.makeReturn = function(res) { - if (res) { - this.elseBody || (this.elseBody = new Block([new Literal('void 0')])); - } - this.body && (this.body = new Block([this.body.makeReturn(res)])); - this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)])); - return this; - }; - - If.prototype.ensureBlock = function(node) { - if (node instanceof Block) { - return node; - } else { - return new Block([node]); - } - }; - - If.prototype.compileStatement = function(o) { - var answer, body, child, cond, exeq, ifPart, indent; - child = del(o, 'chainChild'); - exeq = del(o, 'isExistentialEquals'); - if (exeq) { - return new If(this.condition.invert(), this.elseBodyNode(), { - type: 'if' - }).compileToFragments(o); - } - indent = o.indent + TAB; - cond = this.condition.compileToFragments(o, LEVEL_PAREN); - body = this.ensureBlock(this.body).compileToFragments(merge(o, { - indent: indent - })); - ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}")); - if (!child) { - ifPart.unshift(this.makeCode(this.tab)); - } - if (!this.elseBody) { - return ifPart; - } - answer = ifPart.concat(this.makeCode(' else ')); - if (this.isChain) { - o.chainChild = true; - answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP)); - } else { - answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, { - indent: indent - }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); - } - return answer; - }; - - If.prototype.compileExpression = function(o) { - var alt, body, cond, fragments; - cond = this.condition.compileToFragments(o, LEVEL_COND); - body = this.bodyNode().compileToFragments(o, LEVEL_LIST); - alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')]; - fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt); - if (o.level >= LEVEL_COND) { - return this.wrapInBraces(fragments); - } else { - return fragments; - } - }; - - If.prototype.unfoldSoak = function() { - return this.soak && this; - }; - - return If; - - })(Base); - - Closure = { - wrap: function(expressions, statement, noReturn) { - var args, argumentsNode, call, func, meth; - if (expressions.jumps()) { - return expressions; - } - func = new Code([], Block.wrap([expressions])); - args = []; - argumentsNode = expressions.contains(this.isLiteralArguments); - if (argumentsNode && expressions.classBody) { - argumentsNode.error("Class bodies shouldn't reference arguments"); - } - if (argumentsNode || expressions.contains(this.isLiteralThis)) { - meth = new Literal(argumentsNode ? 'apply' : 'call'); - args = [new Literal('this')]; - if (argumentsNode) { - args.push(new Literal('arguments')); - } - func = new Value(func, [new Access(meth)]); - } - func.noReturn = noReturn; - call = new Call(func, args); - if (statement) { - return Block.wrap([call]); - } else { - return call; - } - }, - isLiteralArguments: function(node) { - return node instanceof Literal && node.value === 'arguments' && !node.asKey; - }, - isLiteralThis: function(node) { - return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper); - } - }; - - unfoldSoak = function(o, parent, name) { - var ifn; - if (!(ifn = parent[name].unfoldSoak(o))) { - return; - } - parent[name] = ifn.body; - ifn.body = new Value(parent); - return ifn; - }; - - UTILITIES = { - "extends": function() { - return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"; - }, - bind: function() { - return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }'; - }, - indexOf: function() { - return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"; - }, - hasProp: function() { - return '{}.hasOwnProperty'; - }, - slice: function() { - return '[].slice'; - } - }; - - LEVEL_TOP = 1; - - LEVEL_PAREN = 2; - - LEVEL_LIST = 3; - - LEVEL_COND = 4; - - LEVEL_OP = 5; - - LEVEL_ACCESS = 6; - - TAB = ' '; - - IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; - - IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$"); - - SIMPLENUM = /^[+-]?\d+$/; - - METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$"); - - IS_STRING = /^['"]/; - - utility = function(name) { - var ref; - ref = "__" + name; - Scope.root.assign(ref, UTILITIES[name]()); - return ref; - }; - - multident = function(code, tab) { - code = code.replace(/\n/g, '$&' + tab); - return code.replace(/\s+$/, ''); - }; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/optparse.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/optparse.js deleted file mode 100644 index 0f19ae7d..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/optparse.js +++ /dev/null @@ -1,139 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; - - repeat = require('./helpers').repeat; - - exports.OptionParser = OptionParser = (function() { - function OptionParser(rules, banner) { - this.banner = banner; - this.rules = buildRules(rules); - } - - OptionParser.prototype.parse = function(args) { - var arg, i, isOption, matchedRule, options, originalArgs, pos, rule, seenNonOptionArg, skippingArgument, value, _i, _j, _len, _len1, _ref; - options = { - "arguments": [] - }; - skippingArgument = false; - originalArgs = args; - args = normalizeArguments(args); - for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { - arg = args[i]; - if (skippingArgument) { - skippingArgument = false; - continue; - } - if (arg === '--') { - pos = originalArgs.indexOf('--'); - options["arguments"] = options["arguments"].concat(originalArgs.slice(pos + 1)); - break; - } - isOption = !!(arg.match(LONG_FLAG) || arg.match(SHORT_FLAG)); - seenNonOptionArg = options["arguments"].length > 0; - if (!seenNonOptionArg) { - matchedRule = false; - _ref = this.rules; - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - rule = _ref[_j]; - if (rule.shortFlag === arg || rule.longFlag === arg) { - value = true; - if (rule.hasArgument) { - skippingArgument = true; - value = args[i + 1]; - } - options[rule.name] = rule.isList ? (options[rule.name] || []).concat(value) : value; - matchedRule = true; - break; - } - } - if (isOption && !matchedRule) { - throw new Error("unrecognized option: " + arg); - } - } - if (seenNonOptionArg || !isOption) { - options["arguments"].push(arg); - } - } - return options; - }; - - OptionParser.prototype.help = function() { - var letPart, lines, rule, spaces, _i, _len, _ref; - lines = []; - if (this.banner) { - lines.unshift("" + this.banner + "\n"); - } - _ref = this.rules; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - rule = _ref[_i]; - spaces = 15 - rule.longFlag.length; - spaces = spaces > 0 ? repeat(' ', spaces) : ''; - letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' '; - lines.push(' ' + letPart + rule.longFlag + spaces + rule.description); - } - return "\n" + (lines.join('\n')) + "\n"; - }; - - return OptionParser; - - })(); - - LONG_FLAG = /^(--\w[\w\-]*)/; - - SHORT_FLAG = /^(-\w)$/; - - MULTI_FLAG = /^-(\w{2,})/; - - OPTIONAL = /\[(\w+(\*?))\]/; - - buildRules = function(rules) { - var tuple, _i, _len, _results; - _results = []; - for (_i = 0, _len = rules.length; _i < _len; _i++) { - tuple = rules[_i]; - if (tuple.length < 3) { - tuple.unshift(null); - } - _results.push(buildRule.apply(null, tuple)); - } - return _results; - }; - - buildRule = function(shortFlag, longFlag, description, options) { - var match; - if (options == null) { - options = {}; - } - match = longFlag.match(OPTIONAL); - longFlag = longFlag.match(LONG_FLAG)[1]; - return { - name: longFlag.substr(2), - shortFlag: shortFlag, - longFlag: longFlag, - description: description, - hasArgument: !!(match && match[1]), - isList: !!(match && match[2]) - }; - }; - - normalizeArguments = function(args) { - var arg, l, match, result, _i, _j, _len, _len1, _ref; - args = args.slice(0); - result = []; - for (_i = 0, _len = args.length; _i < _len; _i++) { - arg = args[_i]; - if (match = arg.match(MULTI_FLAG)) { - _ref = match[1].split(''); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - l = _ref[_j]; - result.push('-' + l); - } - } else { - result.push(arg); - } - } - return result; - }; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/parser.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/parser.js deleted file mode 100755 index 9f23cc47..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/parser.js +++ /dev/null @@ -1,610 +0,0 @@ -/* parser generated by jison 0.4.2 */ -var parser = (function(){ -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1}, -terminals_: {2:"error",6:"TERMINATOR",12:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"}, -productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]], -performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { - -var $0 = $$.length - 1; -switch (yystate) { -case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block); -break; -case 2:return this.$ = $$[$0]; -break; -case 3:return this.$ = $$[$0-1]; -break; -case 4:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]])); -break; -case 5:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0])); -break; -case 6:this.$ = $$[$0-1]; -break; -case 7:this.$ = $$[$0]; -break; -case 8:this.$ = $$[$0]; -break; -case 9:this.$ = $$[$0]; -break; -case 10:this.$ = $$[$0]; -break; -case 11:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 12:this.$ = $$[$0]; -break; -case 13:this.$ = $$[$0]; -break; -case 14:this.$ = $$[$0]; -break; -case 15:this.$ = $$[$0]; -break; -case 16:this.$ = $$[$0]; -break; -case 17:this.$ = $$[$0]; -break; -case 18:this.$ = $$[$0]; -break; -case 19:this.$ = $$[$0]; -break; -case 20:this.$ = $$[$0]; -break; -case 21:this.$ = $$[$0]; -break; -case 22:this.$ = $$[$0]; -break; -case 23:this.$ = $$[$0]; -break; -case 24:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block); -break; -case 25:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); -break; -case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 28:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 29:this.$ = $$[$0]; -break; -case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined); -break; -case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null); -break; -case 35:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0])); -break; -case 36:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0])); -break; -case 37:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0])); -break; -case 38:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1])); -break; -case 39:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 40:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object')); -break; -case 41:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object')); -break; -case 42:this.$ = $$[$0]; -break; -case 43:this.$ = $$[$0]; -break; -case 44:this.$ = $$[$0]; -break; -case 45:this.$ = $$[$0]; -break; -case 46:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0])); -break; -case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return); -break; -case 48:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0])); -break; -case 49:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1])); -break; -case 50:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1])); -break; -case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func'); -break; -case 52:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc'); -break; -case 53:this.$ = $$[$0]; -break; -case 54:this.$ = $$[$0]; -break; -case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); -break; -case 56:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 57:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 58:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 59:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 60:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0])); -break; -case 61:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true)); -break; -case 62:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0])); -break; -case 63:this.$ = $$[$0]; -break; -case 64:this.$ = $$[$0]; -break; -case 65:this.$ = $$[$0]; -break; -case 66:this.$ = $$[$0]; -break; -case 67:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1])); -break; -case 68:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0])); -break; -case 70:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0]))); -break; -case 71:this.$ = $$[$0]; -break; -case 72:this.$ = $$[$0]; -break; -case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 74:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 75:this.$ = $$[$0]; -break; -case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 78:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 79:this.$ = $$[$0]; -break; -case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0])); -break; -case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak')); -break; -case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); -break; -case 83:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); -break; -case 84:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype'))); -break; -case 85:this.$ = $$[$0]; -break; -case 86:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); -break; -case 87:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], { - soak: true - })); -break; -case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0])); -break; -case 89:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0])); -break; -case 90:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated)); -break; -case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); -break; -case 92:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 93:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 94:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 95:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 96:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class); -break; -case 97:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0])); -break; -case 98:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0])); -break; -case 99:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0])); -break; -case 100:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0])); -break; -case 101:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0])); -break; -case 102:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0])); -break; -case 103:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0])); -break; -case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); -break; -case 105:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); -break; -case 106:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))])); -break; -case 107:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0])); -break; -case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false); -break; -case 109:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true); -break; -case 110:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]); -break; -case 111:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); -break; -case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); -break; -case 113:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); -break; -case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this')); -break; -case 115:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([])); -break; -case 116:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2])); -break; -case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive'); -break; -case 118:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive'); -break; -case 119:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2])); -break; -case 120:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1])); -break; -case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0])); -break; -case 122:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1])); -break; -case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0])); -break; -case 124:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 125:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 127:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); -break; -case 128:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 129:this.$ = $$[$0]; -break; -case 130:this.$ = $$[$0]; -break; -case 131:this.$ = $$[$0]; -break; -case 132:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0])); -break; -case 133:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0])); -break; -case 134:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1])); -break; -case 135:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0])); -break; -case 136:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0])); -break; -case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); -break; -case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); -break; -case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); -break; -case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); -break; -case 141:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); -break; -case 142:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); -break; -case 143:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); -break; -case 144:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { - guard: $$[$0] - })); -break; -case 145:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { - invert: true - })); -break; -case 146:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { - invert: true, - guard: $$[$0] - })); -break; -case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); -break; -case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); -break; -case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); -break; -case 150:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); -break; -case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); -break; -case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); -break; -case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); -break; -case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); -break; -case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); -break; -case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) - }); -break; -case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { - $$[$0].own = $$[$0-1].own; - $$[$0].name = $$[$0-1][0]; - $$[$0].index = $$[$0-1][1]; - return $$[$0]; - }())); -break; -case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); -break; -case 159:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { - $$[$0].own = true; - return $$[$0]; - }())); -break; -case 160:this.$ = $$[$0]; -break; -case 161:this.$ = $$[$0]; -break; -case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 165:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); -break; -case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: $$[$0] - }); -break; -case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: $$[$0], - object: true - }); -break; -case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - guard: $$[$0] - }); -break; -case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - guard: $$[$0], - object: true - }); -break; -case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - step: $$[$0] - }); -break; -case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ - source: $$[$0-4], - guard: $$[$0-2], - step: $$[$0] - }); -break; -case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ - source: $$[$0-4], - step: $$[$0-2], - guard: $$[$0] - }); -break; -case 173:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); -break; -case 174:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); -break; -case 175:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); -break; -case 176:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); -break; -case 177:this.$ = $$[$0]; -break; -case 178:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); -break; -case 179:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); -break; -case 180:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); -break; -case 181:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { - type: $$[$0-2] - })); -break; -case 182:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], { - type: $$[$0-2] - }))); -break; -case 183:this.$ = $$[$0]; -break; -case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); -break; -case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { - type: $$[$0-1], - statement: true - })); -break; -case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { - type: $$[$0-1], - statement: true - })); -break; -case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); -break; -case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); -break; -case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); -break; -case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); -break; -case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); -break; -case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); -break; -case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); -break; -case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); -break; -case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); -break; -case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); -break; -case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { - if ($$[$0-1].charAt(0) === '!') { - return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); - } else { - return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); - } - }())); -break; -case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); -break; -case 203:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); -break; -case 204:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); -break; -case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); -break; -} -}, -table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,272],25:[1,273],91:[1,271]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:274,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:275,54:[1,229]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:277,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,159],117:[2,159]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:278},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,279],106:[2,166],109:88,110:[2,166],111:69,118:[1,280],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[1,281],106:[2,167],109:88,110:[2,167],111:69,118:[2,167],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,283],25:[1,284],78:[1,282]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:285,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:286,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,287],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:288,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,289],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],86:[1,290]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:291,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:292,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:293,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,294],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:296,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:297,25:[1,5]},{5:298,25:[1,5]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],128:[2,139],129:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139]},{26:[1,299],121:[1,300],122:264,123:[1,220]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{5:301,25:[1,5]},{26:[2,178],121:[2,178],123:[2,178]},{5:302,25:[1,5],54:[1,303]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:304,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,305]},{91:[1,306],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:307,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:308,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,272],25:[1,273],26:[1,309]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[2,144],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:87,104:[1,65],105:[2,146],106:[1,66],109:88,110:[1,68],111:69,118:[2,146],126:[2,146],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,165],117:[2,165]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:312,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:313,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:314,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:315,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:316,54:[1,204]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],104:[2,203],105:[2,203],106:[2,203],110:[2,203],118:[2,203],126:[2,203],128:[2,203],129:[2,203],132:[2,203],133:[2,203],134:[2,203],135:[2,203],136:[2,203],137:[2,203]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{5:317,25:[1,5]},{26:[1,318]},{6:[1,319],26:[2,179],121:[2,179],123:[2,179]},{8:320,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],128:[2,142],129:[2,142],132:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:321,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[1,322],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[1,323],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[2,169],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:324,54:[1,239]},{26:[1,325],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,326]},{26:[1,327]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],128:[2,176],129:[2,176],132:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176]},{26:[2,180],121:[2,180],123:[2,180]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],26:[1,328]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:330,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,283],25:[1,284],26:[1,331]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:87,104:[2,172],105:[2,172],106:[2,172],109:88,110:[2,172],111:69,118:[2,172],126:[2,172],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}], -defaultActions: {60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]}, -parseError: function parseError(str, hash) { - throw new Error(str); -}, -parse: function parse(input) { - var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") - this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") - this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) - if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -} -}; -undefined -function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); -if (typeof require !== 'undefined' && typeof exports !== 'undefined') { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && require.main === module) { - exports.main(process.argv.slice(1)); -} -} \ No newline at end of file diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/repl.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/repl.js deleted file mode 100644 index 6c792913..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/repl.js +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, addHistory, addMultilineHandler, fs, merge, nodeREPL, path, prettyErrorMessage, replDefaults, vm, _ref; - - fs = require('fs'); - - path = require('path'); - - vm = require('vm'); - - nodeREPL = require('repl'); - - CoffeeScript = require('./coffee-script'); - - _ref = require('./helpers'), merge = _ref.merge, prettyErrorMessage = _ref.prettyErrorMessage; - - replDefaults = { - prompt: 'coffee> ', - historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, - historyMaxInputSize: 10240, - "eval": function(input, context, filename, cb) { - var Assign, Block, Literal, Value, ast, err, js, _ref1; - input = input.replace(/\uFF00/g, '\n'); - input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); - _ref1 = require('./nodes'), Block = _ref1.Block, Assign = _ref1.Assign, Value = _ref1.Value, Literal = _ref1.Literal; - try { - ast = CoffeeScript.nodes(input); - ast = new Block([new Assign(new Value(new Literal('_')), ast, '=')]); - js = ast.compile({ - bare: true, - locals: Object.keys(context) - }); - return cb(null, vm.runInContext(js, context, filename)); - } catch (_error) { - err = _error; - return cb(prettyErrorMessage(err, filename, input, true)); - } - } - }; - - addMultilineHandler = function(repl) { - var inputStream, multiline, nodeLineListener, outputStream, rli; - rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream; - multiline = { - enabled: false, - initialPrompt: repl.prompt.replace(/^[^> ]*/, function(x) { - return x.replace(/./g, '-'); - }), - prompt: repl.prompt.replace(/^[^> ]*>?/, function(x) { - return x.replace(/./g, '.'); - }), - buffer: '' - }; - nodeLineListener = rli.listeners('line')[0]; - rli.removeListener('line', nodeLineListener); - rli.on('line', function(cmd) { - if (multiline.enabled) { - multiline.buffer += "" + cmd + "\n"; - rli.setPrompt(multiline.prompt); - rli.prompt(true); - } else { - nodeLineListener(cmd); - } - }); - return inputStream.on('keypress', function(char, key) { - if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'v')) { - return; - } - if (multiline.enabled) { - if (!multiline.buffer.match(/\n/)) { - multiline.enabled = !multiline.enabled; - rli.setPrompt(repl.prompt); - rli.prompt(true); - return; - } - if ((rli.line != null) && !rli.line.match(/^\s*$/)) { - return; - } - multiline.enabled = !multiline.enabled; - rli.line = ''; - rli.cursor = 0; - rli.output.cursorTo(0); - rli.output.clearLine(1); - multiline.buffer = multiline.buffer.replace(/\n/g, '\uFF00'); - rli.emit('line', multiline.buffer); - multiline.buffer = ''; - } else { - multiline.enabled = !multiline.enabled; - rli.setPrompt(multiline.initialPrompt); - rli.prompt(true); - } - }); - }; - - addHistory = function(repl, filename, maxSize) { - var buffer, fd, lastLine, readFd, size, stat; - lastLine = null; - try { - stat = fs.statSync(filename); - size = Math.min(maxSize, stat.size); - readFd = fs.openSync(filename, 'r'); - buffer = new Buffer(size); - fs.readSync(readFd, buffer, 0, size, stat.size - size); - repl.rli.history = buffer.toString().split('\n').reverse(); - if (stat.size > maxSize) { - repl.rli.history.pop(); - } - if (repl.rli.history[0] === '') { - repl.rli.history.shift(); - } - repl.rli.historyIndex = -1; - lastLine = repl.rli.history[0]; - } catch (_error) {} - fd = fs.openSync(filename, 'a'); - repl.rli.addListener('line', function(code) { - if (code && code.length && code !== '.history' && lastLine !== code) { - fs.write(fd, "" + code + "\n"); - return lastLine = code; - } - }); - repl.rli.on('exit', function() { - return fs.close(fd); - }); - return repl.commands['.history'] = { - help: 'Show command history', - action: function() { - repl.outputStream.write("" + (repl.rli.history.slice(0).reverse().join('\n')) + "\n"); - return repl.displayPrompt(); - } - }; - }; - - module.exports = { - start: function(opts) { - var build, major, minor, repl, _ref1; - if (opts == null) { - opts = {}; - } - _ref1 = process.versions.node.split('.').map(function(n) { - return parseInt(n); - }), major = _ref1[0], minor = _ref1[1], build = _ref1[2]; - if (major === 0 && minor < 8) { - console.warn("Node 0.8.0+ required for CoffeeScript REPL"); - process.exit(1); - } - opts = merge(replDefaults, opts); - repl = nodeREPL.start(opts); - repl.on('exit', function() { - return repl.outputStream.write('\n'); - }); - addMultilineHandler(repl); - if (opts.historyFile) { - addHistory(repl, opts.historyFile, opts.historyMaxInputSize); - } - return repl; - } - }; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/rewriter.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/rewriter.js deleted file mode 100644 index 11f36a3e..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/rewriter.js +++ /dev/null @@ -1,485 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - generate = function(tag, value) { - var tok; - tok = [tag, value]; - tok.generated = true; - return tok; - }; - - exports.Rewriter = (function() { - function Rewriter() {} - - Rewriter.prototype.rewrite = function(tokens) { - this.tokens = tokens; - this.removeLeadingNewlines(); - this.removeMidExpressionNewlines(); - this.closeOpenCalls(); - this.closeOpenIndexes(); - this.addImplicitIndentation(); - this.tagPostfixConditionals(); - this.addImplicitBracesAndParens(); - this.addLocationDataToGeneratedTokens(); - return this.tokens; - }; - - Rewriter.prototype.scanTokens = function(block) { - var i, token, tokens; - tokens = this.tokens; - i = 0; - while (token = tokens[i]) { - i += block.call(this, token, i, tokens); - } - return true; - }; - - Rewriter.prototype.detectEnd = function(i, condition, action) { - var levels, token, tokens, _ref, _ref1; - tokens = this.tokens; - levels = 0; - while (token = tokens[i]) { - if (levels === 0 && condition.call(this, token, i)) { - return action.call(this, token, i); - } - if (!token || levels < 0) { - return action.call(this, token, i - 1); - } - if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) { - levels += 1; - } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) { - levels -= 1; - } - i += 1; - } - return i - 1; - }; - - Rewriter.prototype.removeLeadingNewlines = function() { - var i, tag, _i, _len, _ref; - _ref = this.tokens; - for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { - tag = _ref[i][0]; - if (tag !== 'TERMINATOR') { - break; - } - } - if (i) { - return this.tokens.splice(0, i); - } - }; - - Rewriter.prototype.removeMidExpressionNewlines = function() { - return this.scanTokens(function(token, i, tokens) { - var _ref; - if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) { - return 1; - } - tokens.splice(i, 1); - return 0; - }); - }; - - Rewriter.prototype.closeOpenCalls = function() { - var action, condition; - condition = function(token, i) { - var _ref; - return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; - }; - action = function(token, i) { - return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; - }; - return this.scanTokens(function(token, i) { - if (token[0] === 'CALL_START') { - this.detectEnd(i + 1, condition, action); - } - return 1; - }); - }; - - Rewriter.prototype.closeOpenIndexes = function() { - var action, condition; - condition = function(token, i) { - var _ref; - return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; - }; - action = function(token, i) { - return token[0] = 'INDEX_END'; - }; - return this.scanTokens(function(token, i) { - if (token[0] === 'INDEX_START') { - this.detectEnd(i + 1, condition, action); - } - return 1; - }); - }; - - Rewriter.prototype.matchTags = function() { - var fuzz, i, j, pattern, _i, _ref, _ref1; - i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - fuzz = 0; - for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) { - while (this.tag(i + j + fuzz) === 'HERECOMMENT') { - fuzz += 2; - } - if (pattern[j] == null) { - continue; - } - if (typeof pattern[j] === 'string') { - pattern[j] = [pattern[j]]; - } - if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) { - return false; - } - } - return true; - }; - - Rewriter.prototype.looksObjectish = function(j) { - return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':'); - }; - - Rewriter.prototype.findTagsBackwards = function(i, tags) { - var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - backStack = []; - while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) { - if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) { - backStack.push(this.tag(i)); - } - if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) { - backStack.pop(); - } - i -= 1; - } - return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0; - }; - - Rewriter.prototype.addImplicitBracesAndParens = function() { - var stack; - stack = []; - return this.scanTokens(function(token, i, tokens) { - var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - tag = token[0]; - prevTag = (i > 0 ? tokens[i - 1] : [])[0]; - nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0]; - stackTop = function() { - return stack[stack.length - 1]; - }; - startIdx = i; - forward = function(n) { - return i - startIdx + n; - }; - inImplicit = function() { - var _ref, _ref1; - return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0; - }; - inImplicitCall = function() { - var _ref; - return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '('; - }; - inImplicitObject = function() { - var _ref; - return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{'; - }; - inImplicitControl = function() { - var _ref; - return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL'; - }; - startImplicitCall = function(j) { - var idx; - idx = j != null ? j : i; - stack.push([ - '(', idx, { - ours: true - } - ]); - tokens.splice(idx, 0, generate('CALL_START', '(')); - if (j == null) { - return i += 1; - } - }; - endImplicitCall = function() { - stack.pop(); - tokens.splice(i, 0, generate('CALL_END', ')')); - return i += 1; - }; - startImplicitObject = function(j, startsLine) { - var idx; - if (startsLine == null) { - startsLine = true; - } - idx = j != null ? j : i; - stack.push([ - '{', idx, { - sameLine: true, - startsLine: startsLine, - ours: true - } - ]); - tokens.splice(idx, 0, generate('{', generate(new String('{')))); - if (j == null) { - return i += 1; - } - }; - endImplicitObject = function(j) { - j = j != null ? j : i; - stack.pop(); - tokens.splice(j, 0, generate('}', '}')); - return i += 1; - }; - if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) { - stack.push([ - 'CONTROL', i, { - ours: true - } - ]); - return forward(1); - } - if (tag === 'INDENT' && inImplicit()) { - if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') { - while (inImplicitCall()) { - endImplicitCall(); - } - } - if (inImplicitControl()) { - stack.pop(); - } - stack.push([tag, i]); - return forward(1); - } - if (__indexOf.call(EXPRESSION_START, tag) >= 0) { - stack.push([tag, i]); - return forward(1); - } - if (__indexOf.call(EXPRESSION_END, tag) >= 0) { - while (inImplicit()) { - if (inImplicitCall()) { - endImplicitCall(); - } else if (inImplicitObject()) { - endImplicitObject(); - } else { - stack.pop(); - } - } - stack.pop(); - } - if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { - if (tag === '?') { - tag = token[0] = 'FUNC_EXIST'; - } - startImplicitCall(i + 1); - return forward(2); - } - if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { - startImplicitCall(i + 1); - stack.push(['INDENT', i + 2]); - return forward(3); - } - if (tag === ':') { - if (this.tag(i - 2) === '@') { - s = i - 2; - } else { - s = i - 1; - } - while (this.tag(s - 2) === 'HERECOMMENT') { - s -= 2; - } - startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine; - if (stackTop()) { - _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1]; - if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) { - return forward(1); - } - } - startImplicitObject(s, !!startsLine); - return forward(2); - } - if (prevTag === 'OUTDENT' && inImplicitCall() && (tag === '.' || tag === '?.' || tag === '::' || tag === '?::')) { - endImplicitCall(); - return forward(1); - } - if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) { - stackTop()[2].sameLine = false; - } - if (__indexOf.call(IMPLICIT_END, tag) >= 0) { - while (inImplicit()) { - _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine); - if (inImplicitCall() && prevTag !== ',') { - endImplicitCall(); - } else if (inImplicitObject() && sameLine && !startsLine) { - endImplicitObject(); - } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) { - endImplicitObject(); - } else { - break; - } - } - } - if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) { - offset = nextTag === 'OUTDENT' ? 1 : 0; - while (inImplicitObject()) { - endImplicitObject(i + offset); - } - } - return forward(1); - }); - }; - - Rewriter.prototype.addLocationDataToGeneratedTokens = function() { - return this.scanTokens(function(token, i, tokens) { - var column, line, nextLocation, prevLocation, _ref, _ref1; - if (token[2]) { - return 1; - } - if (!(token.generated || token.explicit)) { - return 1; - } - if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) { - line = nextLocation.first_line, column = nextLocation.first_column; - } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) { - line = prevLocation.last_line, column = prevLocation.last_column; - } else { - line = column = 0; - } - token[2] = { - first_line: line, - first_column: column, - last_line: line, - last_column: column - }; - return 1; - }); - }; - - Rewriter.prototype.addImplicitIndentation = function() { - var action, condition, indent, outdent, starter; - starter = indent = outdent = null; - condition = function(token, i) { - var _ref, _ref1; - return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>')); - }; - action = function(token, i) { - return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); - }; - return this.scanTokens(function(token, i, tokens) { - var j, tag, _i, _ref, _ref1; - tag = token[0]; - if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') { - tokens.splice(i, 1); - return 0; - } - if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { - tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation()))); - return 2; - } - if (tag === 'CATCH') { - for (j = _i = 1; _i <= 2; j = ++_i) { - if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { - continue; - } - tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); - return 2 + j; - } - } - if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { - starter = tag; - _ref1 = this.indentation(true), indent = _ref1[0], outdent = _ref1[1]; - if (starter === 'THEN') { - indent.fromThen = true; - } - tokens.splice(i + 1, 0, indent); - this.detectEnd(i + 2, condition, action); - if (tag === 'THEN') { - tokens.splice(i, 1); - } - return 1; - } - return 1; - }); - }; - - Rewriter.prototype.tagPostfixConditionals = function() { - var action, condition, original; - original = null; - condition = function(token, i) { - var prevTag, tag; - tag = token[0]; - prevTag = this.tokens[i - 1][0]; - return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0); - }; - action = function(token, i) { - if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { - return original[0] = 'POST_' + original[0]; - } - }; - return this.scanTokens(function(token, i) { - if (token[0] !== 'IF') { - return 1; - } - original = token; - this.detectEnd(i + 1, condition, action); - return 1; - }); - }; - - Rewriter.prototype.indentation = function(implicit) { - var indent, outdent; - if (implicit == null) { - implicit = false; - } - indent = ['INDENT', 2]; - outdent = ['OUTDENT', 2]; - if (implicit) { - indent.generated = outdent.generated = true; - } - if (!implicit) { - indent.explicit = outdent.explicit = true; - } - return [indent, outdent]; - }; - - Rewriter.prototype.generate = generate; - - Rewriter.prototype.tag = function(i) { - var _ref; - return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; - }; - - return Rewriter; - - })(); - - BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; - - exports.INVERSES = INVERSES = {}; - - EXPRESSION_START = []; - - EXPRESSION_END = []; - - for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) { - _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1]; - EXPRESSION_START.push(INVERSES[rite] = left); - EXPRESSION_END.push(INVERSES[left] = rite); - } - - EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); - - IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; - - IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++']; - - IMPLICIT_UNSPACED_CALL = ['+', '-']; - - IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; - - SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; - - SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; - - LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/scope.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/scope.js deleted file mode 100644 index a09ba970..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/scope.js +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Scope, extend, last, _ref; - - _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; - - exports.Scope = Scope = (function() { - Scope.root = null; - - function Scope(parent, expressions, method) { - this.parent = parent; - this.expressions = expressions; - this.method = method; - this.variables = [ - { - name: 'arguments', - type: 'arguments' - } - ]; - this.positions = {}; - if (!this.parent) { - Scope.root = this; - } - } - - Scope.prototype.add = function(name, type, immediate) { - if (this.shared && !immediate) { - return this.parent.add(name, type, immediate); - } - if (Object.prototype.hasOwnProperty.call(this.positions, name)) { - return this.variables[this.positions[name]].type = type; - } else { - return this.positions[name] = this.variables.push({ - name: name, - type: type - }) - 1; - } - }; - - Scope.prototype.namedMethod = function() { - var _ref1; - if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) { - return this.method; - } - return this.parent.namedMethod(); - }; - - Scope.prototype.find = function(name) { - if (this.check(name)) { - return true; - } - this.add(name, 'var'); - return false; - }; - - Scope.prototype.parameter = function(name) { - if (this.shared && this.parent.check(name, true)) { - return; - } - return this.add(name, 'param'); - }; - - Scope.prototype.check = function(name) { - var _ref1; - return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0)); - }; - - Scope.prototype.temporary = function(name, index) { - if (name.length > 1) { - return '_' + name + (index > 1 ? index - 1 : ''); - } else { - return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a'); - } - }; - - Scope.prototype.type = function(name) { - var v, _i, _len, _ref1; - _ref1 = this.variables; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.name === name) { - return v.type; - } - } - return null; - }; - - Scope.prototype.freeVariable = function(name, reserve) { - var index, temp; - if (reserve == null) { - reserve = true; - } - index = 0; - while (this.check((temp = this.temporary(name, index)))) { - index++; - } - if (reserve) { - this.add(temp, 'var', true); - } - return temp; - }; - - Scope.prototype.assign = function(name, value) { - this.add(name, { - value: value, - assigned: true - }, true); - return this.hasAssignments = true; - }; - - Scope.prototype.hasDeclarations = function() { - return !!this.declaredVariables().length; - }; - - Scope.prototype.declaredVariables = function() { - var realVars, tempVars, v, _i, _len, _ref1; - realVars = []; - tempVars = []; - _ref1 = this.variables; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.type === 'var') { - (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name); - } - } - return realVars.sort().concat(tempVars.sort()); - }; - - Scope.prototype.assignedVariables = function() { - var v, _i, _len, _ref1, _results; - _ref1 = this.variables; - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.type.assigned) { - _results.push("" + v.name + " = " + v.type.value); - } - } - return _results; - }; - - return Scope; - - })(); - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/sourcemap.js b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/sourcemap.js deleted file mode 100644 index 4bb6f258..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/lib/coffee-script/sourcemap.js +++ /dev/null @@ -1,161 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var LineMap, SourceMap; - - LineMap = (function() { - function LineMap(line) { - this.line = line; - this.columns = []; - } - - LineMap.prototype.add = function(column, _arg, options) { - var sourceColumn, sourceLine; - sourceLine = _arg[0], sourceColumn = _arg[1]; - if (options == null) { - options = {}; - } - if (this.columns[column] && options.noReplace) { - return; - } - return this.columns[column] = { - line: this.line, - column: column, - sourceLine: sourceLine, - sourceColumn: sourceColumn - }; - }; - - LineMap.prototype.sourceLocation = function(column) { - var mapping; - while (!((mapping = this.columns[column]) || (column <= 0))) { - column--; - } - return mapping && [mapping.sourceLine, mapping.sourceColumn]; - }; - - return LineMap; - - })(); - - SourceMap = (function() { - var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK; - - function SourceMap() { - this.lines = []; - } - - SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) { - var column, line, lineMap, _base; - if (options == null) { - options = {}; - } - line = generatedLocation[0], column = generatedLocation[1]; - lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line))); - return lineMap.add(column, sourceLocation, options); - }; - - SourceMap.prototype.sourceLocation = function(_arg) { - var column, line, lineMap; - line = _arg[0], column = _arg[1]; - while (!((lineMap = this.lines[line]) || (line <= 0))) { - line--; - } - return lineMap && lineMap.sourceLocation(column); - }; - - SourceMap.prototype.generate = function(options, code) { - var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1; - if (options == null) { - options = {}; - } - if (code == null) { - code = null; - } - writingline = 0; - lastColumn = 0; - lastSourceLine = 0; - lastSourceColumn = 0; - needComma = false; - buffer = ""; - _ref = this.lines; - for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { - lineMap = _ref[lineNumber]; - if (lineMap) { - _ref1 = lineMap.columns; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - mapping = _ref1[_j]; - if (!(mapping)) { - continue; - } - while (writingline < mapping.line) { - lastColumn = 0; - needComma = false; - buffer += ";"; - writingline++; - } - if (needComma) { - buffer += ","; - needComma = false; - } - buffer += this.encodeVlq(mapping.column - lastColumn); - lastColumn = mapping.column; - buffer += this.encodeVlq(0); - buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine); - lastSourceLine = mapping.sourceLine; - buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn); - lastSourceColumn = mapping.sourceColumn; - needComma = true; - } - } - } - v3 = { - version: 3, - file: options.generatedFile || '', - sourceRoot: options.sourceRoot || '', - sources: options.sourceFiles || [''], - names: [], - mappings: buffer - }; - if (options.inline) { - v3.sourcesContent = [code]; - } - return JSON.stringify(v3, null, 2); - }; - - VLQ_SHIFT = 5; - - VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; - - VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; - - SourceMap.prototype.encodeVlq = function(value) { - var answer, nextChunk, signBit, valueToEncode; - answer = ''; - signBit = value < 0 ? 1 : 0; - valueToEncode = (Math.abs(value) << 1) + signBit; - while (valueToEncode || !answer) { - nextChunk = valueToEncode & VLQ_VALUE_MASK; - valueToEncode = valueToEncode >> VLQ_SHIFT; - if (valueToEncode) { - nextChunk |= VLQ_CONTINUATION_BIT; - } - answer += this.encodeBase64(nextChunk); - } - return answer; - }; - - BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - - SourceMap.prototype.encodeBase64 = function(value) { - return BASE64_CHARS[value] || (function() { - throw new Error("Cannot Base64 encode value: " + value); - })(); - }; - - return SourceMap; - - })(); - - module.exports = SourceMap; - -}).call(this); diff --git a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/package.json b/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/package.json deleted file mode 100644 index 487f0da0..00000000 --- a/node_modules/karma-coffee-preprocessor/node_modules/coffee-script/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "coffee-script", - "description": "Unfancy JavaScript", - "keywords": [ - "javascript", - "language", - "coffeescript", - "compiler" - ], - "author": { - "name": "Jeremy Ashkenas" - }, - "version": "1.6.3", - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE" - } - ], - "engines": { - "node": ">=0.8.0" - }, - "directories": { - "lib": "./lib/coffee-script" - }, - "main": "./lib/coffee-script/coffee-script", - "bin": { - "coffee": "./bin/coffee", - "cake": "./bin/cake" - }, - "scripts": { - "test": "node ./bin/cake test" - }, - "homepage": "http://coffeescript.org", - "bugs": { - "url": "https://github.com/jashkenas/coffee-script/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/jashkenas/coffee-script.git" - }, - "devDependencies": { - "uglify-js": "~2.2", - "jison": ">=0.2.0" - }, - "readme": "\n {\n } } {\n { { } }\n } }{ {\n { }{ } } _____ __ __\n ( }{ }{ { ) / ____| / _|/ _|\n .- { { } { }} -. | | ___ | |_| |_ ___ ___\n ( ( } { } { } } ) | | / _ \\| _| _/ _ \\/ _ \\\n |`-..________ ..-'| | |___| (_) | | | || __/ __/\n | | \\_____\\___/|_| |_| \\___|\\___|\n | ;--.\n | (__ \\ _____ _ _\n | | ) ) / ____| (_) | |\n | |/ / | (___ ___ _ __ _ _ __ | |_\n | ( / \\___ \\ / __| '__| | '_ \\| __|\n | |/ ____) | (__| | | | |_) | |_\n | | |_____/ \\___|_| |_| .__/ \\__|\n `-.._________..-' | |\n |_|\n\n\n CoffeeScript is a little language that compiles into JavaScript.\n\n Install Node.js, and then the CoffeeScript compiler:\n sudo bin/cake install\n\n Or, if you have the Node Package Manager installed:\n npm install -g coffee-script\n (Leave off the -g if you don't wish to install globally.)\n\n Execute a script:\n coffee /path/to/script.coffee\n\n Compile a script:\n coffee -c /path/to/script.coffee\n\n For documentation, usage, and examples, see:\n http://coffeescript.org/\n\n To suggest a feature, report a bug, or general discussion:\n http://github.com/jashkenas/coffee-script/issues/\n\n If you'd like to chat, drop by #coffeescript on Freenode IRC,\n or on webchat.freenode.net.\n\n The source repository:\n git://github.com/jashkenas/coffee-script.git\n\n All contributors are listed here:\n http://github.com/jashkenas/coffee-script/contributors\n", - "readmeFilename": "README", - "_id": "coffee-script@1.6.3", - "_from": "coffee-script@1.6.3" -} diff --git a/node_modules/karma-coffee-preprocessor/package.json b/node_modules/karma-coffee-preprocessor/package.json deleted file mode 100644 index ebedb2a6..00000000 --- a/node_modules/karma-coffee-preprocessor/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "karma-coffee-preprocessor", - "version": "0.1.1", - "description": "A Karma plugin. Compile coffee script on the fly.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-coffee-preprocessor.git" - }, - "keywords": [ - "karma-plugin", - "karma-preprocessor", - "coffee-script", - "coffee" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": { - "coffee-script": "1.6.3" - }, - "peerDependencies": { - "karma": ">=0.9" - }, - "license": "MIT", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.7", - "grunt-auto-release": "~0.0.2" - }, - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - }, - { - "name": "Niall Smart", - "email": "niall@pobox.com" - }, - { - "name": "Zachary Wright Heller", - "email": "zheller@gmail.com" - }, - { - "name": "Anthony Torres", - "email": "anthony.torres@issinc.com" - } - ], - "readme": "# karma-coffee-preprocessor\n\n> Preprocessor to compile CoffeeScript on the fly.\n\n## Installation\n\n**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)**\n\nThe easiest way is to keep `karma-coffee-preprocessor` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-coffee-preprocessor\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-coffee-preprocessor --save-dev\n```\n\n## Configuration\nFollowing code shows the default configuration...\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n preprocessors: {\n '**/*.coffee': ['coffee']\n },\n\n coffeePreprocessor: {\n // options passed to the coffee compiler\n options: {\n bare: true,\n sourceMap: false\n },\n // transforming the filenames\n transformPath: function(path) {\n return path.replace(/\\.js$/, '.coffee');\n }\n }\n });\n};\n```\n\nIf you set the `sourceMap` coffee compiler option to `true` then the generated source map will be inlined as a data-uri.\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-coffee-preprocessor/issues" - }, - "homepage": "https://github.com/karma-runner/karma-coffee-preprocessor", - "_id": "karma-coffee-preprocessor@0.1.1", - "_from": "karma-coffee-preprocessor@*" -} diff --git a/node_modules/karma-firefox-launcher/LICENSE b/node_modules/karma-firefox-launcher/LICENSE deleted file mode 100644 index 40727341..00000000 --- a/node_modules/karma-firefox-launcher/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-firefox-launcher/README.md b/node_modules/karma-firefox-launcher/README.md deleted file mode 100644 index a85c1499..00000000 --- a/node_modules/karma-firefox-launcher/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# karma-firefox-launcher - -> Launcher for Mozilla Firefox. - -## Installation - -The easiest way is to keep `karma-firefox-launcher` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-firefox-launcher": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-firefox-launcher --save-dev -``` - -## Configuration -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - browsers: ['Firefox', 'FirefoxAurora', 'FirefoxNightly'], - }); -}; -``` - -You can pass list of browsers as a CLI argument too: -```bash -karma start --browsers Firefox,Chrome -``` - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com diff --git a/node_modules/karma-firefox-launcher/index.js b/node_modules/karma-firefox-launcher/index.js deleted file mode 100644 index cff53865..00000000 --- a/node_modules/karma-firefox-launcher/index.js +++ /dev/null @@ -1,114 +0,0 @@ -var fs = require('fs'); -var spawn = require('child_process').spawn; - - -var PREFS = - 'user_pref("browser.shell.checkDefaultBrowser", false);\n' + - 'user_pref("browser.bookmarks.restore_default_bookmarks", false);\n' + - 'user_pref("dom.disable_open_during_load", false);\n' + - 'user_pref("dom.max_script_run_time", 0);\n'; - - -// Return location of firefox.exe file for a given Firefox directory -// (available: "Mozilla Firefox", "Aurora", "Nightly"). -var getFirefoxExe = function(firefoxDirName) { - if (process.platform !== 'win32') { - return null; - } - - - var prefix; - var prefixes = [process.env.PROGRAMFILES, process.env['PROGRAMFILES(X86)']]; - var suffix = '\\'+ firefoxDirName + '\\firefox.exe'; - - for (var i = 0; i < prefixes.length; i++) { - prefix = prefixes[i]; - if (fs.existsSync(prefix + suffix)) { - return prefix + suffix; - } - } - - return 'C:\\Program Files' + suffix; -} - -// https://developer.mozilla.org/en-US/docs/Command_Line_Options -var FirefoxBrowser = function(id, baseBrowserDecorator, args, logger) { - baseBrowserDecorator(this); - - var log = logger.create('launcher'); - this._getPrefs = function(prefs) { - if (typeof prefs !== 'object') { - return PREFS; - } - var result = PREFS; - for (var key in prefs) { - result += 'user_pref("' + key + '", ' + JSON.stringify(prefs[key]) + ');\n'; - } - return result; - } - - this._start = function(url) { - var self = this; - var command = this._getCommand(); - - fs.writeFileSync(self._tempDir + '/prefs.js', this._getPrefs(args.prefs)); - self._execCommand(command, [url, '-profile', self._tempDir, '-no-remote']); - }; -}; - - -FirefoxBrowser.prototype = { - name: 'Firefox', - - DEFAULT_CMD: { - linux: 'firefox', - darwin: '/Applications/Firefox.app/Contents/MacOS/firefox-bin', - win32: getFirefoxExe('Mozilla Firefox') - }, - ENV_CMD: 'FIREFOX_BIN' -}; - -FirefoxBrowser.$inject = ['id', 'baseBrowserDecorator', 'args', 'logger']; - - -var FirefoxAuroraBrowser = function(id, baseBrowserDecorator, logger) { - FirefoxBrowser.call(this, id, baseBrowserDecorator, logger); -}; - -FirefoxAuroraBrowser.prototype = { - name: 'FirefoxAurora', - DEFAULT_CMD: { - linux: 'firefox', - darwin: '/Applications/FirefoxAurora.app/Contents/MacOS/firefox-bin', - win32: getFirefoxExe('Aurora') - }, - ENV_CMD: 'FIREFOX_AURORA_BIN' -}; - -FirefoxAuroraBrowser.$inject = ['id', 'baseBrowserDecorator', 'args', 'logger']; - - -var FirefoxNightlyBrowser = function(id, baseBrowserDecorator, logger) { - FirefoxBrowser.call(this, id, baseBrowserDecorator, logger); -}; - -FirefoxNightlyBrowser.prototype = { - name: 'FirefoxNightly', - - DEFAULT_CMD: { - linux: 'firefox', - darwin: '/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin', - win32: getFirefoxExe('Nightly') - }, - ENV_CMD: 'FIREFOX_NIGHTLY_BIN' -}; - -FirefoxNightlyBrowser.$inject = ['id', 'baseBrowserDecorator', 'args', 'logger']; - - -// PUBLISH DI MODULE -module.exports = { - 'launcher:Firefox': ['type', FirefoxBrowser], - 'launcher:FirefoxAurora': ['type', FirefoxAuroraBrowser], - 'launcher:FirefoxNightly': ['type', FirefoxNightlyBrowser] -}; diff --git a/node_modules/karma-firefox-launcher/index.js.orig b/node_modules/karma-firefox-launcher/index.js.orig deleted file mode 100644 index 171c9d4c..00000000 --- a/node_modules/karma-firefox-launcher/index.js.orig +++ /dev/null @@ -1,85 +0,0 @@ -var fs = require('fs'); -var spawn = require('child_process').spawn; - - -var PREFS = - 'user_pref("browser.shell.checkDefaultBrowser", false);\n' + - 'user_pref("browser.bookmarks.restore_default_bookmarks", false);\n' + -<<<<<<< HEAD - 'user_pref("dom.disable_open_during_load", false);\n'; -======= - 'user_pref("dom.max_script_run_time", 0);\n'; ->>>>>>> disable "script not responding" dialog on test run - - -// https://developer.mozilla.org/en-US/docs/Command_Line_Options -var FirefoxBrowser = function(id, baseBrowserDecorator, logger) { - baseBrowserDecorator(this); - - var log = logger.create('launcher'); - - this._start = function(url) { - var self = this; - var command = this._getCommand(); - - fs.createWriteStream(self._tempDir + '/prefs.js', {flags: 'a'}).write(PREFS); - self._execCommand(command, [url, '-profile', self._tempDir, '-no-remote']); - }; -}; - - -FirefoxBrowser.prototype = { - name: 'Firefox', - - DEFAULT_CMD: { - linux: 'firefox', - darwin: '/Applications/Firefox.app/Contents/MacOS/firefox-bin', - win32: process.env.ProgramFiles + '\\Mozilla Firefox\\firefox.exe' - }, - ENV_CMD: 'FIREFOX_BIN' -}; - -FirefoxBrowser.$inject = ['id', 'baseBrowserDecorator', 'logger']; - - -var FirefoxAuroraBrowser = function(id, baseBrowserDecorator, logger) { - FirefoxBrowser.call(this, id, baseBrowserDecorator, logger); -}; - -FirefoxAuroraBrowser.prototype = { - name: 'FirefoxAurora', - DEFAULT_CMD: { - linux: 'firefox', - darwin: '/Applications/FirefoxAurora.app/Contents/MacOS/firefox-bin', - win32: process.env.ProgramFiles + '\\Aurora\\firefox.exe' - }, - ENV_CMD: 'FIREFOX_AURORA_BIN' -}; - -FirefoxAuroraBrowser.$inject = ['id', 'baseBrowserDecorator', 'logger']; - - -var FirefoxNightlyBrowser = function(id, baseBrowserDecorator, logger) { - FirefoxBrowser.call(this, id, baseBrowserDecorator, logger); -}; - -FirefoxNightlyBrowser.prototype = { - name: 'FirefoxNightly', - - DEFAULT_CMD: { - linux: 'firefox', - darwin: '/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin', - win32: process.env.ProgramFiles + '\\Nightly\\firefox.exe' - }, - ENV_CMD: 'FIREFOX_NIGHTLY_BIN' -}; - -FirefoxNightlyBrowser.$inject = ['id', 'baseBrowserDecorator', 'logger']; - - -// PUBLISH DI MODULE -module.exports = { - 'launcher:Firefox': ['type', FirefoxBrowser], - 'launcher:FirefoxAurora': ['type', FirefoxAuroraBrowser], - 'launcher:FirefoxNightly': ['type', FirefoxNightlyBrowser] -}; diff --git a/node_modules/karma-firefox-launcher/package.json b/node_modules/karma-firefox-launcher/package.json deleted file mode 100644 index dea960d8..00000000 --- a/node_modules/karma-firefox-launcher/package.json +++ /dev/null @@ -1,75 +0,0 @@ -{ - "name": "karma-firefox-launcher", - "version": "0.1.2", - "description": "A Karma plugin. Launcher for Firefox.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-firefox-launcher.git" - }, - "keywords": [ - "karma-plugin", - "karma-launcher", - "firefox" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": {}, - "peerDependencies": { - "karma": ">=0.9" - }, - "license": "MIT", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.7", - "grunt-auto-release": "~0.0.2" - }, - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - }, - { - "name": "Žilvinas Urbonas", - "email": "zilvinas.urbon@gmail.com" - }, - { - "name": "Andrei Khveras", - "email": "Andrei_Khveras@epam.com" - }, - { - "name": "Erwann Mest", - "email": "erwann.mest@gmail.com" - }, - { - "name": "Liam Newman", - "email": "lnewman@book.com" - }, - { - "name": "Michał Gołębiowski", - "email": "m.goleb@gmail.com" - }, - { - "name": "Parashuram", - "email": "code@nparashuram.com" - }, - { - "name": "Schaaf, Martin", - "email": "mschaaf@datameer.com" - } - ], - "readme": "# karma-firefox-launcher\n\n> Launcher for Mozilla Firefox.\n\n## Installation\n\nThe easiest way is to keep `karma-firefox-launcher` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-firefox-launcher\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-firefox-launcher --save-dev\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n browsers: ['Firefox', 'FirefoxAurora', 'FirefoxNightly'],\n });\n};\n```\n\nYou can pass list of browsers as a CLI argument too:\n```bash\nkarma start --browsers Firefox,Chrome\n```\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-firefox-launcher/issues" - }, - "homepage": "https://github.com/karma-runner/karma-firefox-launcher", - "_id": "karma-firefox-launcher@0.1.2", - "_from": "karma-firefox-launcher@*" -} diff --git a/node_modules/karma-html2js-preprocessor/LICENSE b/node_modules/karma-html2js-preprocessor/LICENSE deleted file mode 100644 index d5d49248..00000000 --- a/node_modules/karma-html2js-preprocessor/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Vojta Jína and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-html2js-preprocessor/README.md b/node_modules/karma-html2js-preprocessor/README.md deleted file mode 100644 index d096f0c4..00000000 --- a/node_modules/karma-html2js-preprocessor/README.md +++ /dev/null @@ -1,65 +0,0 @@ -# karma-html2js-preprocessor [![Build Status](https://travis-ci.org/karma-runner/karma-html2js-preprocessor.png?branch=master)](https://travis-ci.org/karma-runner/karma-html2js-preprocessor) - -> Preprocessor for converting HTML files into JS strings. - -*Note:* If you are using [AngularJS](http://angularjs.org/), check out [karma-ng-html2js-preprocessor](https://github.com/karma-runner/karma-ng-html2js-preprocessor). - -## Installation - -**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)** - -The easiest way is to keep `karma-html2js-preprocessor` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-html2js-preprocessor": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-html2js-preprocessor --save-dev -``` - -## Configuration -Following code shows the default configuration... -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - preprocessors: { - '**/*.html': ['html2js'] - }, - - files: [ - '*.js', - '*.html' - ] - }); -}; -``` - -## How does it work ? - -This preprocessor converts HTML files into JS strings and publishes them in the global `window.__html__`, so that you can use these for testing DOM operations. - -For instance this `template.html`... -```html -
something
-``` -... will be served as `template.html.js`: -```js -window.__html__ = window.__html__ || {}; -window.__html__['template.html'] = '
something
'; -``` - -See the [end2end test](https://github.com/karma-runner/karma/tree/master/test/e2e/html2js) for a complete example. - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com diff --git a/node_modules/karma-html2js-preprocessor/lib/html2js.js b/node_modules/karma-html2js-preprocessor/lib/html2js.js deleted file mode 100644 index 41142941..00000000 --- a/node_modules/karma-html2js-preprocessor/lib/html2js.js +++ /dev/null @@ -1,27 +0,0 @@ -var util = require('util'); - - -var TEMPLATE = '' + - 'window.__html__ = window.__html__ || {};\n' + - 'window.__html__[\'%s\'] = \'%s\''; - -var escapeContent = function(content) { - return content.replace(/'/g, '\\\'').replace(/\r?\n/g, '\\n\' +\n \''); -}; - -var createHtml2JsPreprocessor = function(logger, basePath) { - var log = logger.create('preprocessor.html2js'); - - return function(content, file, done) { - log.debug('Processing "%s".', file.originalPath); - - var htmlPath = file.originalPath.replace(basePath + '/', ''); - - file.path = file.path + '.js'; - done(util.format(TEMPLATE, htmlPath, escapeContent(content))); - }; -}; - -createHtml2JsPreprocessor.$inject = ['logger', 'config.basePath']; - -module.exports = createHtml2JsPreprocessor; diff --git a/node_modules/karma-html2js-preprocessor/lib/index.js b/node_modules/karma-html2js-preprocessor/lib/index.js deleted file mode 100644 index 73e6a9b5..00000000 --- a/node_modules/karma-html2js-preprocessor/lib/index.js +++ /dev/null @@ -1,4 +0,0 @@ -// PUBLISH DI MODULE -module.exports = { - 'preprocessor:html2js': ['factory', require('./html2js')] -}; diff --git a/node_modules/karma-html2js-preprocessor/package.json b/node_modules/karma-html2js-preprocessor/package.json deleted file mode 100644 index 323a2ed4..00000000 --- a/node_modules/karma-html2js-preprocessor/package.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "karma-html2js-preprocessor", - "version": "0.1.0", - "description": "A Karma plugin. Convert HTML files into JS strings to serve them in a script tag.", - "main": "lib/index.js", - "scripts": { - "test": "grunt test" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-html2js-preprocessor.git" - }, - "keywords": [ - "karma-plugin", - "karma-preprocessor", - "html2js", - "html" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": {}, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-simple-mocha": "~0.4", - "grunt-contrib-jshint": "~0.6", - "chai": "~1.4", - "mocha": "~1.8", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.7", - "grunt-auto-release": "~0.0.2" - }, - "peerDependencies": { - "karma": ">=0.9" - }, - "license": "MIT", - "contributors": [], - "readme": "# karma-html2js-preprocessor [![Build Status](https://travis-ci.org/karma-runner/karma-html2js-preprocessor.png?branch=master)](https://travis-ci.org/karma-runner/karma-html2js-preprocessor)\n\n> Preprocessor for converting HTML files into JS strings.\n\n*Note:* If you are using [AngularJS](http://angularjs.org/), check out [karma-ng-html2js-preprocessor](https://github.com/karma-runner/karma-ng-html2js-preprocessor).\n\n## Installation\n\n**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)**\n\nThe easiest way is to keep `karma-html2js-preprocessor` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-html2js-preprocessor\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-html2js-preprocessor --save-dev\n```\n\n## Configuration\nFollowing code shows the default configuration...\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n preprocessors: {\n '**/*.html': ['html2js']\n },\n\n files: [\n '*.js',\n '*.html'\n ]\n });\n};\n```\n\n## How does it work ?\n\nThis preprocessor converts HTML files into JS strings and publishes them in the global `window.__html__`, so that you can use these for testing DOM operations.\n\nFor instance this `template.html`...\n```html\n
something
\n```\n... will be served as `template.html.js`:\n```js\nwindow.__html__ = window.__html__ || {};\nwindow.__html__['template.html'] = '
something
';\n```\n\nSee the [end2end test](https://github.com/karma-runner/karma/tree/master/test/e2e/html2js) for a complete example.\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-html2js-preprocessor/issues" - }, - "homepage": "https://github.com/karma-runner/karma-html2js-preprocessor", - "_id": "karma-html2js-preprocessor@0.1.0", - "_from": "karma-html2js-preprocessor@*" -} diff --git a/node_modules/karma-jasmine/LICENSE b/node_modules/karma-jasmine/LICENSE deleted file mode 100644 index d5d49248..00000000 --- a/node_modules/karma-jasmine/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Vojta Jína and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-jasmine/README.md b/node_modules/karma-jasmine/README.md deleted file mode 100644 index 205ae26b..00000000 --- a/node_modules/karma-jasmine/README.md +++ /dev/null @@ -1,43 +0,0 @@ -# karma-jasmine [![Build Status](https://travis-ci.org/karma-runner/karma-jasmine.png?branch=master)](https://travis-ci.org/karma-runner/karma-jasmine) - -> Adapter for the [Jasmine](http://pivotal.github.io/jasmine/) testing framework. - -## Installation - -**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)** - -The easiest way is to keep `karma-jasmine` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-jasmine": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-jasmine --save-dev -``` - -## Configuration -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - frameworks: ['jasmine'], - - files: [ - '*.js' - ] - }); -}; -``` - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com diff --git a/node_modules/karma-jasmine/lib/adapter.js b/node_modules/karma-jasmine/lib/adapter.js deleted file mode 100644 index ac235421..00000000 --- a/node_modules/karma-jasmine/lib/adapter.js +++ /dev/null @@ -1,165 +0,0 @@ -(function(window) { - -var formatFailedStep = function(step) { - - var stack = step.trace.stack; - var message = step.message; - if (stack) { - // remove the trailing dot - var firstLine = stack.substring(0, stack.indexOf('\n') - 1); - if (message && message.indexOf(firstLine) === -1) { - stack = message + '\n' + stack; - } - - // remove jasmine stack entries - return stack.replace(/\n.+jasmine\.js\?\d*\:.+(?=(\n|$))/g, ''); - } - - return message; -}; - -var indexOf = function(collection, item) { - if (collection.indexOf) { - return collection.indexOf(item); - } - - for (var i = 0, ii = collection.length; i < ii; i++) { - if (collection[i] === item) { - return i; - } - } - - return -1; -}; - - -// TODO(vojta): Karma might provide this -var getCurrentTransport = function() { - // probably running in debug.html (there's no socket.io) - if (!window.parent.io) { - return null; - } - - var location = window.parent.location; - return window.parent.io.sockets[location.protocol + '//' + location.host].transport.name; -}; - - -/** - * Very simple reporter for jasmine - */ -var KarmaReporter = function(tc) { - - var getAllSpecNames = function(topLevelSuites) { - var specNames = {}; - - var processSuite = function(suite, pointer) { - var childSuite; - var childPointer; - - for (var i = 0; i < suite.suites_.length; i++) { - childSuite = suite.suites_[i]; - childPointer = pointer[childSuite.description] = {}; - processSuite(childSuite, childPointer); - } - - pointer._ = []; - for (var j = 0; j < suite.specs_.length; j++) { - pointer._.push(suite.specs_[j].description); - } - }; - - var suite; - var pointer; - for (var k = 0; k < topLevelSuites.length; k++) { - suite = topLevelSuites[k]; - pointer = specNames[suite.description] = {}; - processSuite(suite, pointer); - } - - return specNames; - }; - - this.reportRunnerStarting = function(runner) { - var transport = getCurrentTransport(); - var specNames = null; - - // This structure can be pretty huge and it blows up socke.io connection, when polling. - // https://github.com/LearnBoost/socket.io-client/issues/569 - if (transport === 'websocket' || transport === 'flashsocket') { - specNames = getAllSpecNames(runner.topLevelSuites()); - } - - tc.info({total: runner.specs().length, specs: specNames}); - }; - - this.reportRunnerResults = function(runner) { - tc.complete({ - coverage: window.__coverage__ - }); - }; - - this.reportSuiteResults = function(suite) { - // memory clean up - suite.after_ = null; - suite.before_ = null; - suite.queue = null; - }; - - this.reportSpecStarting = function(spec) { - spec.results_.time = new Date().getTime(); - }; - - this.reportSpecResults = function(spec) { - var result = { - id: spec.id, - description: spec.description, - suite: [], - success: spec.results_.failedCount === 0, - skipped: spec.results_.skipped, - time: spec.results_.skipped ? 0 : new Date().getTime() - spec.results_.time, - log: [] - }; - - var suitePointer = spec.suite; - while (suitePointer) { - result.suite.unshift(suitePointer.description); - suitePointer = suitePointer.parentSuite; - } - - if (!result.success) { - var steps = spec.results_.items_; - for (var i = 0; i < steps.length; i++) { - if (!steps[i].passed_) { - result.log.push(formatFailedStep(steps[i])); - } - } - } - - tc.result(result); - - // memory clean up - spec.results_ = null; - spec.spies_ = null; - spec.queue = null; - }; - - this.log = function() {}; -}; - - -var createStartFn = function(tc, jasmineEnvPassedIn) { - return function(config) { - // we pass jasmineEnv during testing - // in production we ask for it lazily, so that adapter can be loaded even before jasmine - var jasmineEnv = jasmineEnvPassedIn || window.jasmine.getEnv(); - - jasmineEnv.addReporter(new KarmaReporter(tc)); - jasmineEnv.execute(); - }; -}; - - -window.__karma__.start = createStartFn(window.__karma__); - -})(window); diff --git a/node_modules/karma-jasmine/lib/index.js b/node_modules/karma-jasmine/lib/index.js deleted file mode 100644 index cc0f768e..00000000 --- a/node_modules/karma-jasmine/lib/index.js +++ /dev/null @@ -1,14 +0,0 @@ -var createPattern = function(path) { - return {pattern: path, included: true, served: true, watched: false}; -}; - -var initJasmine = function(files) { - files.unshift(createPattern(__dirname + '/adapter.js')); - files.unshift(createPattern(__dirname + '/jasmine.js')); -}; - -initJasmine.$inject = ['config.files']; - -module.exports = { - 'framework:jasmine': ['factory', initJasmine] -}; diff --git a/node_modules/karma-jasmine/lib/jasmine.js b/node_modules/karma-jasmine/lib/jasmine.js deleted file mode 100644 index 94192ad8..00000000 --- a/node_modules/karma-jasmine/lib/jasmine.js +++ /dev/null @@ -1,2683 +0,0 @@ -var isCommonJS = typeof window == "undefined" && typeof exports == "object"; - -/** - * Top level namespace for Jasmine, a lightweight JavaScript BDD/spec/testing framework. - * - * @namespace - */ -var jasmine = {}; -if (isCommonJS) exports.jasmine = jasmine; -/** - * @private - */ -jasmine.unimplementedMethod_ = function() { - throw new Error("unimplemented method"); -}; - -/** - * Use jasmine.undefined instead of undefined, since undefined is just - * a plain old variable and may be redefined by somebody else. - * - * @private - */ -jasmine.undefined = jasmine.___undefined___; - -/** - * Show diagnostic messages in the console if set to true - * - */ -jasmine.VERBOSE = false; - -/** - * Default interval in milliseconds for event loop yields (e.g. to allow network activity or to refresh the screen with the HTML-based runner). Small values here may result in slow test running. Zero means no updates until all tests have completed. - * - */ -jasmine.DEFAULT_UPDATE_INTERVAL = 250; - -/** - * Maximum levels of nesting that will be included when an object is pretty-printed - */ -jasmine.MAX_PRETTY_PRINT_DEPTH = 40; - -/** - * Default timeout interval in milliseconds for waitsFor() blocks. - */ -jasmine.DEFAULT_TIMEOUT_INTERVAL = 5000; - -/** - * By default exceptions thrown in the context of a test are caught by jasmine so that it can run the remaining tests in the suite. - * Set to false to let the exception bubble up in the browser. - * - */ -jasmine.CATCH_EXCEPTIONS = true; - -jasmine.getGlobal = function() { - function getGlobal() { - return this; - } - - return getGlobal(); -}; - -/** - * Allows for bound functions to be compared. Internal use only. - * - * @ignore - * @private - * @param base {Object} bound 'this' for the function - * @param name {Function} function to find - */ -jasmine.bindOriginal_ = function(base, name) { - var original = base[name]; - if (original.apply) { - return function() { - return original.apply(base, arguments); - }; - } else { - // IE support - return jasmine.getGlobal()[name]; - } -}; - -jasmine.setTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'setTimeout'); -jasmine.clearTimeout = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearTimeout'); -jasmine.setInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'setInterval'); -jasmine.clearInterval = jasmine.bindOriginal_(jasmine.getGlobal(), 'clearInterval'); - -jasmine.MessageResult = function(values) { - this.type = 'log'; - this.values = values; - this.trace = new Error(); // todo: test better -}; - -jasmine.MessageResult.prototype.toString = function() { - var text = ""; - for (var i = 0; i < this.values.length; i++) { - if (i > 0) text += " "; - if (jasmine.isString_(this.values[i])) { - text += this.values[i]; - } else { - text += jasmine.pp(this.values[i]); - } - } - return text; -}; - -jasmine.ExpectationResult = function(params) { - this.type = 'expect'; - this.matcherName = params.matcherName; - this.passed_ = params.passed; - this.expected = params.expected; - this.actual = params.actual; - this.message = this.passed_ ? 'Passed.' : params.message; - - var trace = (params.trace || new Error(this.message)); - this.trace = this.passed_ ? '' : trace; -}; - -jasmine.ExpectationResult.prototype.toString = function () { - return this.message; -}; - -jasmine.ExpectationResult.prototype.passed = function () { - return this.passed_; -}; - -/** - * Getter for the Jasmine environment. Ensures one gets created - */ -jasmine.getEnv = function() { - var env = jasmine.currentEnv_ = jasmine.currentEnv_ || new jasmine.Env(); - return env; -}; - -/** - * @ignore - * @private - * @param value - * @returns {Boolean} - */ -jasmine.isArray_ = function(value) { - return jasmine.isA_("Array", value); -}; - -/** - * @ignore - * @private - * @param value - * @returns {Boolean} - */ -jasmine.isString_ = function(value) { - return jasmine.isA_("String", value); -}; - -/** - * @ignore - * @private - * @param value - * @returns {Boolean} - */ -jasmine.isNumber_ = function(value) { - return jasmine.isA_("Number", value); -}; - -/** - * @ignore - * @private - * @param {String} typeName - * @param value - * @returns {Boolean} - */ -jasmine.isA_ = function(typeName, value) { - return Object.prototype.toString.apply(value) === '[object ' + typeName + ']'; -}; - -/** - * Pretty printer for expecations. Takes any object and turns it into a human-readable string. - * - * @param value {Object} an object to be outputted - * @returns {String} - */ -jasmine.pp = function(value) { - var stringPrettyPrinter = new jasmine.StringPrettyPrinter(); - stringPrettyPrinter.format(value); - return stringPrettyPrinter.string; -}; - -/** - * Returns true if the object is a DOM Node. - * - * @param {Object} obj object to check - * @returns {Boolean} - */ -jasmine.isDomNode = function(obj) { - return obj.nodeType > 0; -}; - -/** - * Returns a matchable 'generic' object of the class type. For use in expecations of type when values don't matter. - * - * @example - * // don't care about which function is passed in, as long as it's a function - * expect(mySpy).toHaveBeenCalledWith(jasmine.any(Function)); - * - * @param {Class} clazz - * @returns matchable object of the type clazz - */ -jasmine.any = function(clazz) { - return new jasmine.Matchers.Any(clazz); -}; - -/** - * Returns a matchable subset of a JSON object. For use in expectations when you don't care about all of the - * attributes on the object. - * - * @example - * // don't care about any other attributes than foo. - * expect(mySpy).toHaveBeenCalledWith(jasmine.objectContaining({foo: "bar"}); - * - * @param sample {Object} sample - * @returns matchable object for the sample - */ -jasmine.objectContaining = function (sample) { - return new jasmine.Matchers.ObjectContaining(sample); -}; - -/** - * Jasmine Spies are test doubles that can act as stubs, spies, fakes or when used in an expecation, mocks. - * - * Spies should be created in test setup, before expectations. They can then be checked, using the standard Jasmine - * expectation syntax. Spies can be checked if they were called or not and what the calling params were. - * - * A Spy has the following fields: wasCalled, callCount, mostRecentCall, and argsForCall (see docs). - * - * Spies are torn down at the end of every spec. - * - * Note: Do not call new jasmine.Spy() directly - a spy must be created using spyOn, jasmine.createSpy or jasmine.createSpyObj. - * - * @example - * // a stub - * var myStub = jasmine.createSpy('myStub'); // can be used anywhere - * - * // spy example - * var foo = { - * not: function(bool) { return !bool; } - * } - * - * // actual foo.not will not be called, execution stops - * spyOn(foo, 'not'); - - // foo.not spied upon, execution will continue to implementation - * spyOn(foo, 'not').andCallThrough(); - * - * // fake example - * var foo = { - * not: function(bool) { return !bool; } - * } - * - * // foo.not(val) will return val - * spyOn(foo, 'not').andCallFake(function(value) {return value;}); - * - * // mock example - * foo.not(7 == 7); - * expect(foo.not).toHaveBeenCalled(); - * expect(foo.not).toHaveBeenCalledWith(true); - * - * @constructor - * @see spyOn, jasmine.createSpy, jasmine.createSpyObj - * @param {String} name - */ -jasmine.Spy = function(name) { - /** - * The name of the spy, if provided. - */ - this.identity = name || 'unknown'; - /** - * Is this Object a spy? - */ - this.isSpy = true; - /** - * The actual function this spy stubs. - */ - this.plan = function() { - }; - /** - * Tracking of the most recent call to the spy. - * @example - * var mySpy = jasmine.createSpy('foo'); - * mySpy(1, 2); - * mySpy.mostRecentCall.args = [1, 2]; - */ - this.mostRecentCall = {}; - - /** - * Holds arguments for each call to the spy, indexed by call count - * @example - * var mySpy = jasmine.createSpy('foo'); - * mySpy(1, 2); - * mySpy(7, 8); - * mySpy.mostRecentCall.args = [7, 8]; - * mySpy.argsForCall[0] = [1, 2]; - * mySpy.argsForCall[1] = [7, 8]; - */ - this.argsForCall = []; - this.calls = []; -}; - -/** - * Tells a spy to call through to the actual implemenatation. - * - * @example - * var foo = { - * bar: function() { // do some stuff } - * } - * - * // defining a spy on an existing property: foo.bar - * spyOn(foo, 'bar').andCallThrough(); - */ -jasmine.Spy.prototype.andCallThrough = function() { - this.plan = this.originalValue; - return this; -}; - -/** - * For setting the return value of a spy. - * - * @example - * // defining a spy from scratch: foo() returns 'baz' - * var foo = jasmine.createSpy('spy on foo').andReturn('baz'); - * - * // defining a spy on an existing property: foo.bar() returns 'baz' - * spyOn(foo, 'bar').andReturn('baz'); - * - * @param {Object} value - */ -jasmine.Spy.prototype.andReturn = function(value) { - this.plan = function() { - return value; - }; - return this; -}; - -/** - * For throwing an exception when a spy is called. - * - * @example - * // defining a spy from scratch: foo() throws an exception w/ message 'ouch' - * var foo = jasmine.createSpy('spy on foo').andThrow('baz'); - * - * // defining a spy on an existing property: foo.bar() throws an exception w/ message 'ouch' - * spyOn(foo, 'bar').andThrow('baz'); - * - * @param {String} exceptionMsg - */ -jasmine.Spy.prototype.andThrow = function(exceptionMsg) { - this.plan = function() { - throw exceptionMsg; - }; - return this; -}; - -/** - * Calls an alternate implementation when a spy is called. - * - * @example - * var baz = function() { - * // do some stuff, return something - * } - * // defining a spy from scratch: foo() calls the function baz - * var foo = jasmine.createSpy('spy on foo').andCall(baz); - * - * // defining a spy on an existing property: foo.bar() calls an anonymnous function - * spyOn(foo, 'bar').andCall(function() { return 'baz';} ); - * - * @param {Function} fakeFunc - */ -jasmine.Spy.prototype.andCallFake = function(fakeFunc) { - this.plan = fakeFunc; - return this; -}; - -/** - * Resets all of a spy's the tracking variables so that it can be used again. - * - * @example - * spyOn(foo, 'bar'); - * - * foo.bar(); - * - * expect(foo.bar.callCount).toEqual(1); - * - * foo.bar.reset(); - * - * expect(foo.bar.callCount).toEqual(0); - */ -jasmine.Spy.prototype.reset = function() { - this.wasCalled = false; - this.callCount = 0; - this.argsForCall = []; - this.calls = []; - this.mostRecentCall = {}; -}; - -jasmine.createSpy = function(name) { - - var spyObj = function() { - spyObj.wasCalled = true; - spyObj.callCount++; - var args = jasmine.util.argsToArray(arguments); - spyObj.mostRecentCall.object = this; - spyObj.mostRecentCall.args = args; - spyObj.argsForCall.push(args); - spyObj.calls.push({object: this, args: args}); - return spyObj.plan.apply(this, arguments); - }; - - var spy = new jasmine.Spy(name); - - for (var prop in spy) { - spyObj[prop] = spy[prop]; - } - - spyObj.reset(); - - return spyObj; -}; - -/** - * Determines whether an object is a spy. - * - * @param {jasmine.Spy|Object} putativeSpy - * @returns {Boolean} - */ -jasmine.isSpy = function(putativeSpy) { - return putativeSpy && putativeSpy.isSpy; -}; - -/** - * Creates a more complicated spy: an Object that has every property a function that is a spy. Used for stubbing something - * large in one call. - * - * @param {String} baseName name of spy class - * @param {Array} methodNames array of names of methods to make spies - */ -jasmine.createSpyObj = function(baseName, methodNames) { - if (!jasmine.isArray_(methodNames) || methodNames.length === 0) { - throw new Error('createSpyObj requires a non-empty array of method names to create spies for'); - } - var obj = {}; - for (var i = 0; i < methodNames.length; i++) { - obj[methodNames[i]] = jasmine.createSpy(baseName + '.' + methodNames[i]); - } - return obj; -}; - -/** - * All parameters are pretty-printed and concatenated together, then written to the current spec's output. - * - * Be careful not to leave calls to jasmine.log in production code. - */ -jasmine.log = function() { - var spec = jasmine.getEnv().currentSpec; - spec.log.apply(spec, arguments); -}; - -/** - * Function that installs a spy on an existing object's method name. Used within a Spec to create a spy. - * - * @example - * // spy example - * var foo = { - * not: function(bool) { return !bool; } - * } - * spyOn(foo, 'not'); // actual foo.not will not be called, execution stops - * - * @see jasmine.createSpy - * @param obj - * @param methodName - * @return {jasmine.Spy} a Jasmine spy that can be chained with all spy methods - */ -var spyOn = function(obj, methodName) { - return jasmine.getEnv().currentSpec.spyOn(obj, methodName); -}; -if (isCommonJS) exports.spyOn = spyOn; - -/** - * Creates a Jasmine spec that will be added to the current suite. - * - * // TODO: pending tests - * - * @example - * it('should be true', function() { - * expect(true).toEqual(true); - * }); - * - * @param {String} desc description of this specification - * @param {Function} func defines the preconditions and expectations of the spec - */ -var it = function(desc, func) { - return jasmine.getEnv().it(desc, func); -}; -if (isCommonJS) exports.it = it; - -/** - * Creates an exclusive Jasmine spec that will be added to the current suite. - * - * If at least one exclusive (iit) spec is registered, only these exclusive specs are run. - * Note, that this behavior works only with the default specFilter. - * Note, that iit has higher priority over ddescribe - * - * @example - * describe('suite', function() { - * iit('should be true', function() { - * // only this spec will be run - * }); - * - * it('should be false', function() { - * // this won't be run - * }); - * }); - * - * @param {String} desc description of this specification - * @param {Function} func defines the preconditions and expectations of the spec - */ -var iit = function(desc, func) { - return jasmine.getEnv().iit(desc, func); -}; -if (isCommonJS) exports.iit = iit; - -/** - * Creates a disabled Jasmine spec. - * - * A convenience method that allows existing specs to be disabled temporarily during development. - * - * @param {String} desc description of this specification - * @param {Function} func defines the preconditions and expectations of the spec - */ -var xit = function(desc, func) { - return jasmine.getEnv().xit(desc, func); -}; -if (isCommonJS) exports.xit = xit; - -/** - * Starts a chain for a Jasmine expectation. - * - * It is passed an Object that is the actual value and should chain to one of the many - * jasmine.Matchers functions. - * - * @param {Object} actual Actual value to test against and expected value - * @return {jasmine.Matchers} - */ -var expect = function(actual) { - return jasmine.getEnv().currentSpec.expect(actual); -}; -if (isCommonJS) exports.expect = expect; - -/** - * Defines part of a jasmine spec. Used in cominbination with waits or waitsFor in asynchrnous specs. - * - * @param {Function} func Function that defines part of a jasmine spec. - */ -var runs = function(func) { - jasmine.getEnv().currentSpec.runs(func); -}; -if (isCommonJS) exports.runs = runs; - -/** - * Waits a fixed time period before moving to the next block. - * - * @deprecated Use waitsFor() instead - * @param {Number} timeout milliseconds to wait - */ -var waits = function(timeout) { - jasmine.getEnv().currentSpec.waits(timeout); -}; -if (isCommonJS) exports.waits = waits; - -/** - * Waits for the latchFunction to return true before proceeding to the next block. - * - * @param {Function} latchFunction - * @param {String} optional_timeoutMessage - * @param {Number} optional_timeout - */ -var waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { - jasmine.getEnv().currentSpec.waitsFor.apply(jasmine.getEnv().currentSpec, arguments); -}; -if (isCommonJS) exports.waitsFor = waitsFor; - -/** - * A function that is called before each spec in a suite. - * - * Used for spec setup, including validating assumptions. - * - * @param {Function} beforeEachFunction - */ -var beforeEach = function(beforeEachFunction) { - jasmine.getEnv().beforeEach(beforeEachFunction); -}; -if (isCommonJS) exports.beforeEach = beforeEach; - -/** - * A function that is called after each spec in a suite. - * - * Used for restoring any state that is hijacked during spec execution. - * - * @param {Function} afterEachFunction - */ -var afterEach = function(afterEachFunction) { - jasmine.getEnv().afterEach(afterEachFunction); -}; -if (isCommonJS) exports.afterEach = afterEach; - -/** - * Defines a suite of specifications. - * - * Stores the description and all defined specs in the Jasmine environment as one suite of specs. Variables declared - * are accessible by calls to beforeEach, it, and afterEach. Describe blocks can be nested, allowing for specialization - * of setup in some tests. - * - * @example - * // TODO: a simple suite - * - * // TODO: a simple suite with a nested describe block - * - * @param {String} description A string, usually the class under test. - * @param {Function} specDefinitions function that defines several specs. - */ -var describe = function(description, specDefinitions) { - return jasmine.getEnv().describe(description, specDefinitions); -}; -if (isCommonJS) exports.describe = describe; - - -/** - * Defines an exclusive suite of specifications. - * - * If at least one exclusive (ddescribe) suite is registered, only these exclusive suites are run. - * Note, that this behavior works only with the default specFilter. - * - * @example - * ddescribe('exclusive suite', function() { - * it('should be true', function() { - * // this spec will be run - * }); - * - * it('should be false', function() { - * // this spec will be run as well - * }); - * }); - * - * describe('normal suite', function() { - * // no spec from this suite will be run - * }); - * - * - * @param {String} description A string, usually the class under test. - * @param {Function} specDefinitions function that defines several specs. - */ -var ddescribe = function(description, specDefinitions) { - return jasmine.getEnv().ddescribe(description, specDefinitions); -}; -if (isCommonJS) exports.ddescribe = ddescribe; - -/** - * Disables a suite of specifications. Used to disable some suites in a file, or files, temporarily during development. - * - * @param {String} description A string, usually the class under test. - * @param {Function} specDefinitions function that defines several specs. - */ -var xdescribe = function(description, specDefinitions) { - return jasmine.getEnv().xdescribe(description, specDefinitions); -}; -if (isCommonJS) exports.xdescribe = xdescribe; - - -// Provide the XMLHttpRequest class for IE 5.x-6.x: -jasmine.XmlHttpRequest = (typeof XMLHttpRequest == "undefined") ? function() { - function tryIt(f) { - try { - return f(); - } catch(e) { - } - return null; - } - - var xhr = tryIt(function() { - return new ActiveXObject("Msxml2.XMLHTTP.6.0"); - }) || - tryIt(function() { - return new ActiveXObject("Msxml2.XMLHTTP.3.0"); - }) || - tryIt(function() { - return new ActiveXObject("Msxml2.XMLHTTP"); - }) || - tryIt(function() { - return new ActiveXObject("Microsoft.XMLHTTP"); - }); - - if (!xhr) throw new Error("This browser does not support XMLHttpRequest."); - - return xhr; -} : XMLHttpRequest; -/** - * @namespace - */ -jasmine.util = {}; - -/** - * Declare that a child class inherit it's prototype from the parent class. - * - * @private - * @param {Function} childClass - * @param {Function} parentClass - */ -jasmine.util.inherit = function(childClass, parentClass) { - /** - * @private - */ - var subclass = function() { - }; - subclass.prototype = parentClass.prototype; - childClass.prototype = new subclass(); -}; - -jasmine.util.formatException = function(e) { - var lineNumber; - if (e.line) { - lineNumber = e.line; - } - else if (e.lineNumber) { - lineNumber = e.lineNumber; - } - - var file; - - if (e.sourceURL) { - file = e.sourceURL; - } - else if (e.fileName) { - file = e.fileName; - } - - var message = (e.name && e.message) ? (e.name + ': ' + e.message) : e.toString(); - - if (file && lineNumber) { - message += ' in ' + file + ' (line ' + lineNumber + ')'; - } - - return message; -}; - -jasmine.util.htmlEscape = function(str) { - if (!str) return str; - return str.replace(/&/g, '&') - .replace(//g, '>'); -}; - -jasmine.util.argsToArray = function(args) { - var arrayOfArgs = []; - for (var i = 0; i < args.length; i++) arrayOfArgs.push(args[i]); - return arrayOfArgs; -}; - -jasmine.util.extend = function(destination, source) { - for (var property in source) destination[property] = source[property]; - return destination; -}; - -/** - * Environment for Jasmine - * - * @constructor - */ -jasmine.Env = function() { - this.currentSpec = null; - this.currentSuite = null; - this.currentRunner_ = new jasmine.Runner(this); - - this.reporter = new jasmine.MultiReporter(); - - this.updateInterval = jasmine.DEFAULT_UPDATE_INTERVAL; - this.defaultTimeoutInterval = jasmine.DEFAULT_TIMEOUT_INTERVAL; - this.lastUpdate = 0; - this.specFilter = function(spec) { - return this.exclusive_ <= spec.exclusive_; - }; - - this.nextSpecId_ = 0; - this.nextSuiteId_ = 0; - this.equalityTesters_ = []; - - // 0 - normal - // 1 - contains some ddescribe - // 2 - contains some iit - this.exclusive_ = 0; - - // wrap matchers - this.matchersClass = function() { - jasmine.Matchers.apply(this, arguments); - }; - jasmine.util.inherit(this.matchersClass, jasmine.Matchers); - - jasmine.Matchers.wrapInto_(jasmine.Matchers.prototype, this.matchersClass); -}; - - -jasmine.Env.prototype.setTimeout = jasmine.setTimeout; -jasmine.Env.prototype.clearTimeout = jasmine.clearTimeout; -jasmine.Env.prototype.setInterval = jasmine.setInterval; -jasmine.Env.prototype.clearInterval = jasmine.clearInterval; - -/** - * @returns an object containing jasmine version build info, if set. - */ -jasmine.Env.prototype.version = function () { - if (jasmine.version_) { - return jasmine.version_; - } else { - throw new Error('Version not set'); - } -}; - -/** - * @returns string containing jasmine version build info, if set. - */ -jasmine.Env.prototype.versionString = function() { - if (!jasmine.version_) { - return "version unknown"; - } - - var version = this.version(); - var versionString = version.major + "." + version.minor + "." + version.build; - if (version.release_candidate) { - versionString += ".rc" + version.release_candidate; - } - versionString += " revision " + version.revision; - return versionString; -}; - -/** - * @returns a sequential integer starting at 0 - */ -jasmine.Env.prototype.nextSpecId = function () { - return this.nextSpecId_++; -}; - -/** - * @returns a sequential integer starting at 0 - */ -jasmine.Env.prototype.nextSuiteId = function () { - return this.nextSuiteId_++; -}; - -/** - * Register a reporter to receive status updates from Jasmine. - * @param {jasmine.Reporter} reporter An object which will receive status updates. - */ -jasmine.Env.prototype.addReporter = function(reporter) { - this.reporter.addReporter(reporter); -}; - -jasmine.Env.prototype.execute = function() { - this.currentRunner_.execute(); -}; - -jasmine.Env.prototype.describe = function(description, specDefinitions) { - var suite = new jasmine.Suite(this, description, null, this.currentSuite); - return this.describe_(suite, specDefinitions); -}; - -jasmine.Env.prototype.describe_ = function(suite, specDefinitions) { - var parentSuite = this.currentSuite; - if (parentSuite) { - parentSuite.add(suite); - } else { - this.currentRunner_.add(suite); - } - - this.currentSuite = suite; - - var declarationError = null; - try { - specDefinitions.call(suite); - } catch(e) { - declarationError = e; - } - - if (declarationError) { - this.it("encountered a declaration exception", function() { - throw declarationError; - }); - } - - this.currentSuite = parentSuite; - - return suite; -}; - -jasmine.Env.prototype.ddescribe = function(description, specDefinitions) { - var suite = new jasmine.Suite(this, description, null, this.currentSuite); - suite.exclusive_ = 1; - this.exclusive_ = Math.max(this.exclusive_, 1); - - return this.describe_(suite, specDefinitions); -}; - -jasmine.Env.prototype.beforeEach = function(beforeEachFunction) { - if (this.currentSuite) { - this.currentSuite.beforeEach(beforeEachFunction); - } else { - this.currentRunner_.beforeEach(beforeEachFunction); - } -}; - -jasmine.Env.prototype.currentRunner = function () { - return this.currentRunner_; -}; - -jasmine.Env.prototype.afterEach = function(afterEachFunction) { - if (this.currentSuite) { - this.currentSuite.afterEach(afterEachFunction); - } else { - this.currentRunner_.afterEach(afterEachFunction); - } - -}; - -jasmine.Env.prototype.xdescribe = function(desc, specDefinitions) { - return { - execute: function() { - } - }; -}; - -jasmine.Env.prototype.it = function(description, func) { - var spec = new jasmine.Spec(this, this.currentSuite, description); - this.currentSuite.add(spec); - this.currentSpec = spec; - - if (func) { - spec.runs(func); - } - - return spec; -}; - -jasmine.Env.prototype.iit = function(description, func) { - var spec = this.it(description, func); - spec.exclusive_ = 2; - this.exclusive_ = 2; - - return spec; -}; - -jasmine.Env.prototype.xit = function(desc, func) { - return { - id: this.nextSpecId(), - runs: function() { - } - }; -}; - -jasmine.Env.prototype.compareRegExps_ = function(a, b, mismatchKeys, mismatchValues) { - if (a.source != b.source) - mismatchValues.push("expected pattern /" + b.source + "/ is not equal to the pattern /" + a.source + "/"); - - if (a.ignoreCase != b.ignoreCase) - mismatchValues.push("expected modifier i was" + (b.ignoreCase ? " " : " not ") + "set and does not equal the origin modifier"); - - if (a.global != b.global) - mismatchValues.push("expected modifier g was" + (b.global ? " " : " not ") + "set and does not equal the origin modifier"); - - if (a.multiline != b.multiline) - mismatchValues.push("expected modifier m was" + (b.multiline ? " " : " not ") + "set and does not equal the origin modifier"); - - if (a.sticky != b.sticky) - mismatchValues.push("expected modifier y was" + (b.sticky ? " " : " not ") + "set and does not equal the origin modifier"); - - return (mismatchValues.length === 0); -}; - -jasmine.Env.prototype.compareObjects_ = function(a, b, mismatchKeys, mismatchValues) { - if (a.__Jasmine_been_here_before__ === b && b.__Jasmine_been_here_before__ === a) { - return true; - } - - a.__Jasmine_been_here_before__ = b; - b.__Jasmine_been_here_before__ = a; - - var hasKey = function(obj, keyName) { - return obj !== null && obj[keyName] !== jasmine.undefined; - }; - - for (var property in b) { - if (!hasKey(a, property) && hasKey(b, property)) { - mismatchKeys.push("expected has key '" + property + "', but missing from actual."); - } - } - for (property in a) { - if (!hasKey(b, property) && hasKey(a, property)) { - mismatchKeys.push("expected missing key '" + property + "', but present in actual."); - } - } - for (property in b) { - if (property == '__Jasmine_been_here_before__') continue; - if (!this.equals_(a[property], b[property], mismatchKeys, mismatchValues)) { - mismatchValues.push("'" + property + "' was '" + (b[property] ? jasmine.util.htmlEscape(b[property].toString()) : b[property]) + "' in expected, but was '" + (a[property] ? jasmine.util.htmlEscape(a[property].toString()) : a[property]) + "' in actual."); - } - } - - if (jasmine.isArray_(a) && jasmine.isArray_(b) && a.length != b.length) { - mismatchValues.push("arrays were not the same length"); - } - - delete a.__Jasmine_been_here_before__; - delete b.__Jasmine_been_here_before__; - return (mismatchKeys.length === 0 && mismatchValues.length === 0); -}; - -jasmine.Env.prototype.equals_ = function(a, b, mismatchKeys, mismatchValues) { - mismatchKeys = mismatchKeys || []; - mismatchValues = mismatchValues || []; - - for (var i = 0; i < this.equalityTesters_.length; i++) { - var equalityTester = this.equalityTesters_[i]; - var result = equalityTester(a, b, this, mismatchKeys, mismatchValues); - if (result !== jasmine.undefined) return result; - } - - if (a === b) return true; - - if (a === jasmine.undefined || a === null || b === jasmine.undefined || b === null) { - return (a == jasmine.undefined && b == jasmine.undefined); - } - - if (jasmine.isDomNode(a) && jasmine.isDomNode(b)) { - return a === b; - } - - if (a instanceof Date && b instanceof Date) { - return a.getTime() == b.getTime(); - } - - if (a.jasmineMatches) { - return a.jasmineMatches(b); - } - - if (b.jasmineMatches) { - return b.jasmineMatches(a); - } - - if (a instanceof jasmine.Matchers.ObjectContaining) { - return a.matches(b); - } - - if (b instanceof jasmine.Matchers.ObjectContaining) { - return b.matches(a); - } - - if (jasmine.isString_(a) && jasmine.isString_(b)) { - return (a == b); - } - - if (jasmine.isNumber_(a) && jasmine.isNumber_(b)) { - return (a == b); - } - - if (a instanceof RegExp && b instanceof RegExp) { - return this.compareRegExps_(a, b, mismatchKeys, mismatchValues); - } - - if (typeof a === "object" && typeof b === "object") { - return this.compareObjects_(a, b, mismatchKeys, mismatchValues); - } - - //Straight check - return (a === b); -}; - -jasmine.Env.prototype.contains_ = function(haystack, needle) { - if (jasmine.isArray_(haystack)) { - for (var i = 0; i < haystack.length; i++) { - if (this.equals_(haystack[i], needle)) return true; - } - return false; - } - return haystack.indexOf(needle) >= 0; -}; - -jasmine.Env.prototype.addEqualityTester = function(equalityTester) { - this.equalityTesters_.push(equalityTester); -}; -/** No-op base class for Jasmine reporters. - * - * @constructor - */ -jasmine.Reporter = function() { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportRunnerStarting = function(runner) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportRunnerResults = function(runner) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportSuiteResults = function(suite) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportSpecStarting = function(spec) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.reportSpecResults = function(spec) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.Reporter.prototype.log = function(str) { -}; - -/** - * Blocks are functions with executable code that make up a spec. - * - * @constructor - * @param {jasmine.Env} env - * @param {Function} func - * @param {jasmine.Spec} spec - */ -jasmine.Block = function(env, func, spec) { - this.env = env; - this.func = func; - this.spec = spec; -}; - -jasmine.Block.prototype.execute = function(onComplete) { - if (!jasmine.CATCH_EXCEPTIONS) { - this.func.apply(this.spec); - } - else { - try { - this.func.apply(this.spec); - } catch (e) { - this.spec.fail(e); - } - } - onComplete(); -}; -/** JavaScript API reporter. - * - * @constructor - */ -jasmine.JsApiReporter = function() { - this.started = false; - this.finished = false; - this.suites_ = []; - this.results_ = {}; -}; - -jasmine.JsApiReporter.prototype.reportRunnerStarting = function(runner) { - this.started = true; - var suites = runner.topLevelSuites(); - for (var i = 0; i < suites.length; i++) { - var suite = suites[i]; - this.suites_.push(this.summarize_(suite)); - } -}; - -jasmine.JsApiReporter.prototype.suites = function() { - return this.suites_; -}; - -jasmine.JsApiReporter.prototype.summarize_ = function(suiteOrSpec) { - var isSuite = suiteOrSpec instanceof jasmine.Suite; - var summary = { - id: suiteOrSpec.id, - name: suiteOrSpec.description, - type: isSuite ? 'suite' : 'spec', - children: [] - }; - - if (isSuite) { - var children = suiteOrSpec.children(); - for (var i = 0; i < children.length; i++) { - summary.children.push(this.summarize_(children[i])); - } - } - return summary; -}; - -jasmine.JsApiReporter.prototype.results = function() { - return this.results_; -}; - -jasmine.JsApiReporter.prototype.resultsForSpec = function(specId) { - return this.results_[specId]; -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.reportRunnerResults = function(runner) { - this.finished = true; -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.reportSuiteResults = function(suite) { -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.reportSpecResults = function(spec) { - this.results_[spec.id] = { - messages: spec.results().getItems(), - result: spec.results().failedCount > 0 ? "failed" : "passed" - }; -}; - -//noinspection JSUnusedLocalSymbols -jasmine.JsApiReporter.prototype.log = function(str) { -}; - -jasmine.JsApiReporter.prototype.resultsForSpecs = function(specIds){ - var results = {}; - for (var i = 0; i < specIds.length; i++) { - var specId = specIds[i]; - results[specId] = this.summarizeResult_(this.results_[specId]); - } - return results; -}; - -jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){ - var summaryMessages = []; - var messagesLength = result.messages.length; - for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) { - var resultMessage = result.messages[messageIndex]; - summaryMessages.push({ - text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined, - passed: resultMessage.passed ? resultMessage.passed() : true, - type: resultMessage.type, - message: resultMessage.message, - trace: { - stack: resultMessage.passed && !resultMessage.passed() ? resultMessage.trace.stack : jasmine.undefined - } - }); - } - - return { - result : result.result, - messages : summaryMessages - }; -}; - -/** - * @constructor - * @param {jasmine.Env} env - * @param actual - * @param {jasmine.Spec} spec - */ -jasmine.Matchers = function(env, actual, spec, opt_isNot) { - this.env = env; - this.actual = actual; - this.spec = spec; - this.isNot = opt_isNot || false; - this.reportWasCalled_ = false; -}; - -// todo: @deprecated as of Jasmine 0.11, remove soon [xw] -jasmine.Matchers.pp = function(str) { - throw new Error("jasmine.Matchers.pp() is no longer supported, please use jasmine.pp() instead!"); -}; - -// todo: @deprecated Deprecated as of Jasmine 0.10. Rewrite your custom matchers to return true or false. [xw] -jasmine.Matchers.prototype.report = function(result, failing_message, details) { - throw new Error("As of jasmine 0.11, custom matchers must be implemented differently -- please see jasmine docs"); -}; - -jasmine.Matchers.wrapInto_ = function(prototype, matchersClass) { - for (var methodName in prototype) { - if (methodName == 'report') continue; - var orig = prototype[methodName]; - matchersClass.prototype[methodName] = jasmine.Matchers.matcherFn_(methodName, orig); - } -}; - -jasmine.Matchers.matcherFn_ = function(matcherName, matcherFunction) { - return function() { - var matcherArgs = jasmine.util.argsToArray(arguments); - var result = matcherFunction.apply(this, arguments); - - if (this.isNot) { - result = !result; - } - - if (this.reportWasCalled_) return result; - - var message; - if (!result) { - if (this.message) { - message = this.message.apply(this, arguments); - if (jasmine.isArray_(message)) { - message = message[this.isNot ? 1 : 0]; - } - } else { - var englishyPredicate = matcherName.replace(/[A-Z]/g, function(s) { return ' ' + s.toLowerCase(); }); - message = "Expected " + jasmine.pp(this.actual) + (this.isNot ? " not " : " ") + englishyPredicate; - if (matcherArgs.length > 0) { - for (var i = 0; i < matcherArgs.length; i++) { - if (i > 0) message += ","; - message += " " + jasmine.pp(matcherArgs[i]); - } - } - message += "."; - } - } - var expectationResult = new jasmine.ExpectationResult({ - matcherName: matcherName, - passed: result, - expected: matcherArgs.length > 1 ? matcherArgs : matcherArgs[0], - actual: this.actual, - message: message - }); - this.spec.addMatcherResult(expectationResult); - return jasmine.undefined; - }; -}; - - - - -/** - * toBe: compares the actual to the expected using === - * @param expected - */ -jasmine.Matchers.prototype.toBe = function(expected) { - return this.actual === expected; -}; - -/** - * toNotBe: compares the actual to the expected using !== - * @param expected - * @deprecated as of 1.0. Use not.toBe() instead. - */ -jasmine.Matchers.prototype.toNotBe = function(expected) { - return this.actual !== expected; -}; - -/** - * toEqual: compares the actual to the expected using common sense equality. Handles Objects, Arrays, etc. - * - * @param expected - */ -jasmine.Matchers.prototype.toEqual = function(expected) { - return this.env.equals_(this.actual, expected); -}; - -/** - * toNotEqual: compares the actual to the expected using the ! of jasmine.Matchers.toEqual - * @param expected - * @deprecated as of 1.0. Use not.toEqual() instead. - */ -jasmine.Matchers.prototype.toNotEqual = function(expected) { - return !this.env.equals_(this.actual, expected); -}; - -/** - * Matcher that compares the actual to the expected using a regular expression. Constructs a RegExp, so takes - * a pattern or a String. - * - * @param expected - */ -jasmine.Matchers.prototype.toMatch = function(expected) { - return new RegExp(expected).test(this.actual); -}; - -/** - * Matcher that compares the actual to the expected using the boolean inverse of jasmine.Matchers.toMatch - * @param expected - * @deprecated as of 1.0. Use not.toMatch() instead. - */ -jasmine.Matchers.prototype.toNotMatch = function(expected) { - return !(new RegExp(expected).test(this.actual)); -}; - -/** - * Matcher that compares the actual to jasmine.undefined. - */ -jasmine.Matchers.prototype.toBeDefined = function() { - return (this.actual !== jasmine.undefined); -}; - -/** - * Matcher that compares the actual to jasmine.undefined. - */ -jasmine.Matchers.prototype.toBeUndefined = function() { - return (this.actual === jasmine.undefined); -}; - -/** - * Matcher that compares the actual to null. - */ -jasmine.Matchers.prototype.toBeNull = function() { - return (this.actual === null); -}; - -/** - * Matcher that compares the actual to NaN. - */ -jasmine.Matchers.prototype.toBeNaN = function() { - this.message = function() { - return [ "Expected " + jasmine.pp(this.actual) + " to be NaN." ]; - }; - - return (this.actual !== this.actual); -}; - -/** - * Matcher that boolean not-nots the actual. - */ -jasmine.Matchers.prototype.toBeTruthy = function() { - return !!this.actual; -}; - - -/** - * Matcher that boolean nots the actual. - */ -jasmine.Matchers.prototype.toBeFalsy = function() { - return !this.actual; -}; - - -/** - * Matcher that checks to see if the actual, a Jasmine spy, was called. - */ -jasmine.Matchers.prototype.toHaveBeenCalled = function() { - if (arguments.length > 0) { - throw new Error('toHaveBeenCalled does not take arguments, use toHaveBeenCalledWith'); - } - - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - - this.message = function() { - return [ - "Expected spy " + this.actual.identity + " to have been called.", - "Expected spy " + this.actual.identity + " not to have been called." - ]; - }; - - return this.actual.wasCalled; -}; - -/** @deprecated Use expect(xxx).toHaveBeenCalled() instead */ -jasmine.Matchers.prototype.wasCalled = jasmine.Matchers.prototype.toHaveBeenCalled; - -/** - * Matcher that checks to see if the actual, a Jasmine spy, was not called. - * - * @deprecated Use expect(xxx).not.toHaveBeenCalled() instead - */ -jasmine.Matchers.prototype.wasNotCalled = function() { - if (arguments.length > 0) { - throw new Error('wasNotCalled does not take arguments'); - } - - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - - this.message = function() { - return [ - "Expected spy " + this.actual.identity + " to not have been called.", - "Expected spy " + this.actual.identity + " to have been called." - ]; - }; - - return !this.actual.wasCalled; -}; - -/** - * Matcher that checks to see if the actual, a Jasmine spy, was called with a set of parameters. - * - * @example - * - */ -jasmine.Matchers.prototype.toHaveBeenCalledWith = function() { - var expectedArgs = jasmine.util.argsToArray(arguments); - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - this.message = function() { - var invertedMessage = "Expected spy " + this.actual.identity + " not to have been called with " + jasmine.pp(expectedArgs) + " but it was."; - var positiveMessage = ""; - if (this.actual.callCount === 0) { - positiveMessage = "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but it was never called."; - } else { - positiveMessage = "Expected spy " + this.actual.identity + " to have been called with " + jasmine.pp(expectedArgs) + " but actual calls were " + jasmine.pp(this.actual.argsForCall).replace(/^\[ | \]$/g, '') - } - return [positiveMessage, invertedMessage]; - }; - - return this.env.contains_(this.actual.argsForCall, expectedArgs); -}; - -/** @deprecated Use expect(xxx).toHaveBeenCalledWith() instead */ -jasmine.Matchers.prototype.wasCalledWith = jasmine.Matchers.prototype.toHaveBeenCalledWith; - -/** @deprecated Use expect(xxx).not.toHaveBeenCalledWith() instead */ -jasmine.Matchers.prototype.wasNotCalledWith = function() { - var expectedArgs = jasmine.util.argsToArray(arguments); - if (!jasmine.isSpy(this.actual)) { - throw new Error('Expected a spy, but got ' + jasmine.pp(this.actual) + '.'); - } - - this.message = function() { - return [ - "Expected spy not to have been called with " + jasmine.pp(expectedArgs) + " but it was", - "Expected spy to have been called with " + jasmine.pp(expectedArgs) + " but it was" - ]; - }; - - return !this.env.contains_(this.actual.argsForCall, expectedArgs); -}; - -/** - * Matcher that checks that the expected item is an element in the actual Array. - * - * @param {Object} expected - */ -jasmine.Matchers.prototype.toContain = function(expected) { - return this.env.contains_(this.actual, expected); -}; - -/** - * Matcher that checks that the expected item is NOT an element in the actual Array. - * - * @param {Object} expected - * @deprecated as of 1.0. Use not.toContain() instead. - */ -jasmine.Matchers.prototype.toNotContain = function(expected) { - return !this.env.contains_(this.actual, expected); -}; - -jasmine.Matchers.prototype.toBeLessThan = function(expected) { - return this.actual < expected; -}; - -jasmine.Matchers.prototype.toBeGreaterThan = function(expected) { - return this.actual > expected; -}; - -/** - * Matcher that checks that the expected item is equal to the actual item - * up to a given level of decimal precision (default 2). - * - * @param {Number} expected - * @param {Number} precision, as number of decimal places - */ -jasmine.Matchers.prototype.toBeCloseTo = function(expected, precision) { - if (!(precision === 0)) { - precision = precision || 2; - } - return Math.abs(expected - this.actual) < (Math.pow(10, -precision) / 2); -}; - -/** - * Matcher that checks that the expected exception was thrown by the actual. - * - * @param {String} [expected] - */ -jasmine.Matchers.prototype.toThrow = function(expected) { - var result = false; - var exception; - if (typeof this.actual != 'function') { - throw new Error('Actual is not a function'); - } - try { - this.actual(); - } catch (e) { - exception = e; - } - if (exception) { - result = (expected === jasmine.undefined || this.env.equals_(exception.message || exception, expected.message || expected)); - } - - var not = this.isNot ? "not " : ""; - - this.message = function() { - if (exception && (expected === jasmine.undefined || !this.env.equals_(exception.message || exception, expected.message || expected))) { - return ["Expected function " + not + "to throw", expected ? expected.message || expected : "an exception", ", but it threw", exception.message || exception].join(' '); - } else { - return "Expected function to throw an exception."; - } - }; - - return result; -}; - -jasmine.Matchers.Any = function(expectedClass) { - this.expectedClass = expectedClass; -}; - -jasmine.Matchers.Any.prototype.jasmineMatches = function(other) { - if (this.expectedClass == String) { - return typeof other == 'string' || other instanceof String; - } - - if (this.expectedClass == Number) { - return typeof other == 'number' || other instanceof Number; - } - - if (this.expectedClass == Function) { - return typeof other == 'function' || other instanceof Function; - } - - if (this.expectedClass == Object) { - return typeof other == 'object'; - } - - return other instanceof this.expectedClass; -}; - -jasmine.Matchers.Any.prototype.jasmineToString = function() { - return ''; -}; - -jasmine.Matchers.ObjectContaining = function (sample) { - this.sample = sample; -}; - -jasmine.Matchers.ObjectContaining.prototype.jasmineMatches = function(other, mismatchKeys, mismatchValues) { - mismatchKeys = mismatchKeys || []; - mismatchValues = mismatchValues || []; - - var env = jasmine.getEnv(); - - var hasKey = function(obj, keyName) { - return obj != null && obj[keyName] !== jasmine.undefined; - }; - - for (var property in this.sample) { - if (!hasKey(other, property) && hasKey(this.sample, property)) { - mismatchKeys.push("expected has key '" + property + "', but missing from actual."); - } - else if (!env.equals_(this.sample[property], other[property], mismatchKeys, mismatchValues)) { - mismatchValues.push("'" + property + "' was '" + (other[property] ? jasmine.util.htmlEscape(other[property].toString()) : other[property]) + "' in expected, but was '" + (this.sample[property] ? jasmine.util.htmlEscape(this.sample[property].toString()) : this.sample[property]) + "' in actual."); - } - } - - return (mismatchKeys.length === 0 && mismatchValues.length === 0); -}; - -jasmine.Matchers.ObjectContaining.prototype.jasmineToString = function () { - return ""; -}; -// Mock setTimeout, clearTimeout -// Contributed by Pivotal Computer Systems, www.pivotalsf.com - -jasmine.FakeTimer = function() { - this.reset(); - - var self = this; - self.setTimeout = function(funcToCall, millis) { - self.timeoutsMade++; - self.scheduleFunction(self.timeoutsMade, funcToCall, millis, false); - return self.timeoutsMade; - }; - - self.setInterval = function(funcToCall, millis) { - self.timeoutsMade++; - self.scheduleFunction(self.timeoutsMade, funcToCall, millis, true); - return self.timeoutsMade; - }; - - self.clearTimeout = function(timeoutKey) { - self.scheduledFunctions[timeoutKey] = jasmine.undefined; - }; - - self.clearInterval = function(timeoutKey) { - self.scheduledFunctions[timeoutKey] = jasmine.undefined; - }; - -}; - -jasmine.FakeTimer.prototype.reset = function() { - this.timeoutsMade = 0; - this.scheduledFunctions = {}; - this.nowMillis = 0; -}; - -jasmine.FakeTimer.prototype.tick = function(millis) { - var oldMillis = this.nowMillis; - var newMillis = oldMillis + millis; - this.runFunctionsWithinRange(oldMillis, newMillis); - this.nowMillis = newMillis; -}; - -jasmine.FakeTimer.prototype.runFunctionsWithinRange = function(oldMillis, nowMillis) { - var scheduledFunc; - var funcsToRun = []; - for (var timeoutKey in this.scheduledFunctions) { - scheduledFunc = this.scheduledFunctions[timeoutKey]; - if (scheduledFunc != jasmine.undefined && - scheduledFunc.runAtMillis >= oldMillis && - scheduledFunc.runAtMillis <= nowMillis) { - funcsToRun.push(scheduledFunc); - this.scheduledFunctions[timeoutKey] = jasmine.undefined; - } - } - - if (funcsToRun.length > 0) { - funcsToRun.sort(function(a, b) { - return a.runAtMillis - b.runAtMillis; - }); - for (var i = 0; i < funcsToRun.length; ++i) { - try { - var funcToRun = funcsToRun[i]; - this.nowMillis = funcToRun.runAtMillis; - funcToRun.funcToCall(); - if (funcToRun.recurring) { - this.scheduleFunction(funcToRun.timeoutKey, - funcToRun.funcToCall, - funcToRun.millis, - true); - } - } catch(e) { - } - } - this.runFunctionsWithinRange(oldMillis, nowMillis); - } -}; - -jasmine.FakeTimer.prototype.scheduleFunction = function(timeoutKey, funcToCall, millis, recurring) { - this.scheduledFunctions[timeoutKey] = { - runAtMillis: this.nowMillis + millis, - funcToCall: funcToCall, - recurring: recurring, - timeoutKey: timeoutKey, - millis: millis - }; -}; - -/** - * @namespace - */ -jasmine.Clock = { - defaultFakeTimer: new jasmine.FakeTimer(), - - reset: function() { - jasmine.Clock.assertInstalled(); - jasmine.Clock.defaultFakeTimer.reset(); - }, - - tick: function(millis) { - jasmine.Clock.assertInstalled(); - jasmine.Clock.defaultFakeTimer.tick(millis); - }, - - runFunctionsWithinRange: function(oldMillis, nowMillis) { - jasmine.Clock.defaultFakeTimer.runFunctionsWithinRange(oldMillis, nowMillis); - }, - - scheduleFunction: function(timeoutKey, funcToCall, millis, recurring) { - jasmine.Clock.defaultFakeTimer.scheduleFunction(timeoutKey, funcToCall, millis, recurring); - }, - - useMock: function() { - if (!jasmine.Clock.isInstalled()) { - var spec = jasmine.getEnv().currentSpec; - spec.after(jasmine.Clock.uninstallMock); - - jasmine.Clock.installMock(); - } - }, - - installMock: function() { - jasmine.Clock.installed = jasmine.Clock.defaultFakeTimer; - }, - - uninstallMock: function() { - jasmine.Clock.assertInstalled(); - jasmine.Clock.installed = jasmine.Clock.real; - }, - - real: { - setTimeout: jasmine.getGlobal().setTimeout, - clearTimeout: jasmine.getGlobal().clearTimeout, - setInterval: jasmine.getGlobal().setInterval, - clearInterval: jasmine.getGlobal().clearInterval - }, - - assertInstalled: function() { - if (!jasmine.Clock.isInstalled()) { - throw new Error("Mock clock is not installed, use jasmine.Clock.useMock()"); - } - }, - - isInstalled: function() { - return jasmine.Clock.installed == jasmine.Clock.defaultFakeTimer; - }, - - installed: null -}; -jasmine.Clock.installed = jasmine.Clock.real; - -//else for IE support -jasmine.getGlobal().setTimeout = function(funcToCall, millis) { - if (jasmine.Clock.installed.setTimeout.apply) { - return jasmine.Clock.installed.setTimeout.apply(this, arguments); - } else { - return jasmine.Clock.installed.setTimeout(funcToCall, millis); - } -}; - -jasmine.getGlobal().setInterval = function(funcToCall, millis) { - if (jasmine.Clock.installed.setInterval.apply) { - return jasmine.Clock.installed.setInterval.apply(this, arguments); - } else { - return jasmine.Clock.installed.setInterval(funcToCall, millis); - } -}; - -jasmine.getGlobal().clearTimeout = function(timeoutKey) { - if (jasmine.Clock.installed.clearTimeout.apply) { - return jasmine.Clock.installed.clearTimeout.apply(this, arguments); - } else { - return jasmine.Clock.installed.clearTimeout(timeoutKey); - } -}; - -jasmine.getGlobal().clearInterval = function(timeoutKey) { - if (jasmine.Clock.installed.clearTimeout.apply) { - return jasmine.Clock.installed.clearInterval.apply(this, arguments); - } else { - return jasmine.Clock.installed.clearInterval(timeoutKey); - } -}; - -/** - * @constructor - */ -jasmine.MultiReporter = function() { - this.subReporters_ = []; -}; -jasmine.util.inherit(jasmine.MultiReporter, jasmine.Reporter); - -jasmine.MultiReporter.prototype.addReporter = function(reporter) { - this.subReporters_.push(reporter); -}; - -(function() { - var functionNames = [ - "reportRunnerStarting", - "reportRunnerResults", - "reportSuiteResults", - "reportSpecStarting", - "reportSpecResults", - "log" - ]; - for (var i = 0; i < functionNames.length; i++) { - var functionName = functionNames[i]; - jasmine.MultiReporter.prototype[functionName] = (function(functionName) { - return function() { - for (var j = 0; j < this.subReporters_.length; j++) { - var subReporter = this.subReporters_[j]; - if (subReporter[functionName]) { - subReporter[functionName].apply(subReporter, arguments); - } - } - }; - })(functionName); - } -})(); -/** - * Holds results for a set of Jasmine spec. Allows for the results array to hold another jasmine.NestedResults - * - * @constructor - */ -jasmine.NestedResults = function() { - /** - * The total count of results - */ - this.totalCount = 0; - /** - * Number of passed results - */ - this.passedCount = 0; - /** - * Number of failed results - */ - this.failedCount = 0; - /** - * Was this suite/spec skipped? - */ - this.skipped = false; - /** - * @ignore - */ - this.items_ = []; -}; - -/** - * Roll up the result counts. - * - * @param result - */ -jasmine.NestedResults.prototype.rollupCounts = function(result) { - this.totalCount += result.totalCount; - this.passedCount += result.passedCount; - this.failedCount += result.failedCount; -}; - -/** - * Adds a log message. - * @param values Array of message parts which will be concatenated later. - */ -jasmine.NestedResults.prototype.log = function(values) { - this.items_.push(new jasmine.MessageResult(values)); -}; - -/** - * Getter for the results: message & results. - */ -jasmine.NestedResults.prototype.getItems = function() { - return this.items_; -}; - -/** - * Adds a result, tracking counts (total, passed, & failed) - * @param {jasmine.ExpectationResult|jasmine.NestedResults} result - */ -jasmine.NestedResults.prototype.addResult = function(result) { - if (result.type != 'log') { - if (result.items_) { - this.rollupCounts(result); - } else { - this.totalCount++; - if (result.passed()) { - this.passedCount++; - } else { - this.failedCount++; - } - } - } - this.items_.push(result); -}; - -/** - * @returns {Boolean} True if everything below passed - */ -jasmine.NestedResults.prototype.passed = function() { - return this.passedCount === this.totalCount; -}; -/** - * Base class for pretty printing for expectation results. - */ -jasmine.PrettyPrinter = function() { - this.ppNestLevel_ = 0; -}; - -/** - * Formats a value in a nice, human-readable string. - * - * @param value - */ -jasmine.PrettyPrinter.prototype.format = function(value) { - this.ppNestLevel_++; - try { - if (value === jasmine.undefined) { - this.emitScalar('undefined'); - } else if (value === null) { - this.emitScalar('null'); - } else if (value === jasmine.getGlobal()) { - this.emitScalar(''); - } else if (value.jasmineToString) { - this.emitScalar(value.jasmineToString()); - } else if (typeof value === 'string') { - this.emitString(value); - } else if (jasmine.isSpy(value)) { - this.emitScalar("spy on " + value.identity); - } else if (value instanceof RegExp) { - this.emitScalar(value.toString()); - } else if (typeof value === 'function') { - this.emitScalar('Function'); - } else if (typeof value.nodeType === 'number') { - this.emitScalar('HTMLNode'); - } else if (value instanceof Date) { - this.emitScalar('Date(' + value + ')'); - } else if (value.__Jasmine_been_here_before__) { - this.emitScalar(''); - } else if (jasmine.isArray_(value) || typeof value == 'object') { - value.__Jasmine_been_here_before__ = true; - if (jasmine.isArray_(value)) { - this.emitArray(value); - } else { - this.emitObject(value); - } - delete value.__Jasmine_been_here_before__; - } else { - this.emitScalar(value.toString()); - } - } finally { - this.ppNestLevel_--; - } -}; - -jasmine.PrettyPrinter.prototype.iterateObject = function(obj, fn) { - for (var property in obj) { - if (!obj.hasOwnProperty(property)) continue; - if (property == '__Jasmine_been_here_before__') continue; - fn(property, obj.__lookupGetter__ ? (obj.__lookupGetter__(property) !== jasmine.undefined && - obj.__lookupGetter__(property) !== null) : false); - } -}; - -jasmine.PrettyPrinter.prototype.emitArray = jasmine.unimplementedMethod_; -jasmine.PrettyPrinter.prototype.emitObject = jasmine.unimplementedMethod_; -jasmine.PrettyPrinter.prototype.emitScalar = jasmine.unimplementedMethod_; -jasmine.PrettyPrinter.prototype.emitString = jasmine.unimplementedMethod_; - -jasmine.StringPrettyPrinter = function() { - jasmine.PrettyPrinter.call(this); - - this.string = ''; -}; -jasmine.util.inherit(jasmine.StringPrettyPrinter, jasmine.PrettyPrinter); - -jasmine.StringPrettyPrinter.prototype.emitScalar = function(value) { - this.append(value); -}; - -jasmine.StringPrettyPrinter.prototype.emitString = function(value) { - this.append("'" + value + "'"); -}; - -jasmine.StringPrettyPrinter.prototype.emitArray = function(array) { - if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) { - this.append("Array"); - return; - } - - this.append('[ '); - for (var i = 0; i < array.length; i++) { - if (i > 0) { - this.append(', '); - } - this.format(array[i]); - } - this.append(' ]'); -}; - -jasmine.StringPrettyPrinter.prototype.emitObject = function(obj) { - if (this.ppNestLevel_ > jasmine.MAX_PRETTY_PRINT_DEPTH) { - this.append("Object"); - return; - } - - var self = this; - this.append('{ '); - var first = true; - - this.iterateObject(obj, function(property, isGetter) { - if (first) { - first = false; - } else { - self.append(', '); - } - - self.append(property); - self.append(' : '); - if (isGetter) { - self.append(''); - } else { - self.format(obj[property]); - } - }); - - this.append(' }'); -}; - -jasmine.StringPrettyPrinter.prototype.append = function(value) { - this.string += value; -}; -jasmine.Queue = function(env) { - this.env = env; - - // parallel to blocks. each true value in this array means the block will - // get executed even if we abort - this.ensured = []; - this.blocks = []; - this.running = false; - this.index = 0; - this.offset = 0; - this.abort = false; -}; - -jasmine.Queue.prototype.addBefore = function(block, ensure) { - if (ensure === jasmine.undefined) { - ensure = false; - } - - this.blocks.unshift(block); - this.ensured.unshift(ensure); -}; - -jasmine.Queue.prototype.add = function(block, ensure) { - if (ensure === jasmine.undefined) { - ensure = false; - } - - this.blocks.push(block); - this.ensured.push(ensure); -}; - -jasmine.Queue.prototype.insertNext = function(block, ensure) { - if (ensure === jasmine.undefined) { - ensure = false; - } - - this.ensured.splice((this.index + this.offset + 1), 0, ensure); - this.blocks.splice((this.index + this.offset + 1), 0, block); - this.offset++; -}; - -jasmine.Queue.prototype.start = function(onComplete) { - this.running = true; - this.onComplete = onComplete; - this.next_(); -}; - -jasmine.Queue.prototype.isRunning = function() { - return this.running; -}; - -jasmine.Queue.LOOP_DONT_RECURSE = true; - -jasmine.Queue.prototype.next_ = function() { - var self = this; - var goAgain = true; - - while (goAgain) { - goAgain = false; - - if (self.index < self.blocks.length && !(this.abort && !this.ensured[self.index])) { - var calledSynchronously = true; - var completedSynchronously = false; - - var onComplete = function () { - if (jasmine.Queue.LOOP_DONT_RECURSE && calledSynchronously) { - completedSynchronously = true; - return; - } - - if (self.blocks[self.index].abort) { - self.abort = true; - } - - self.offset = 0; - self.index++; - - var now = new Date().getTime(); - if (self.env.updateInterval && now - self.env.lastUpdate > self.env.updateInterval) { - self.env.lastUpdate = now; - self.env.setTimeout(function() { - self.next_(); - }, 0); - } else { - if (jasmine.Queue.LOOP_DONT_RECURSE && completedSynchronously) { - goAgain = true; - } else { - self.next_(); - } - } - }; - self.blocks[self.index].execute(onComplete); - - calledSynchronously = false; - if (completedSynchronously) { - onComplete(); - } - - } else { - self.running = false; - if (self.onComplete) { - self.onComplete(); - } - } - } -}; - -jasmine.Queue.prototype.results = function() { - var results = new jasmine.NestedResults(); - for (var i = 0; i < this.blocks.length; i++) { - if (this.blocks[i].results) { - results.addResult(this.blocks[i].results()); - } - } - return results; -}; - - -/** - * Runner - * - * @constructor - * @param {jasmine.Env} env - */ -jasmine.Runner = function(env) { - var self = this; - self.env = env; - self.queue = new jasmine.Queue(env); - self.before_ = []; - self.after_ = []; - self.suites_ = []; -}; - -jasmine.Runner.prototype.execute = function() { - var self = this; - if (self.env.reporter.reportRunnerStarting) { - self.env.reporter.reportRunnerStarting(this); - } - self.queue.start(function () { - self.finishCallback(); - }); -}; - -jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) { - beforeEachFunction.typeName = 'beforeEach'; - this.before_.splice(0,0,beforeEachFunction); -}; - -jasmine.Runner.prototype.afterEach = function(afterEachFunction) { - afterEachFunction.typeName = 'afterEach'; - this.after_.splice(0,0,afterEachFunction); -}; - - -jasmine.Runner.prototype.finishCallback = function() { - this.env.reporter.reportRunnerResults(this); -}; - -jasmine.Runner.prototype.addSuite = function(suite) { - this.suites_.push(suite); -}; - -jasmine.Runner.prototype.add = function(block) { - if (block instanceof jasmine.Suite) { - this.addSuite(block); - } - this.queue.add(block); -}; - -jasmine.Runner.prototype.specs = function () { - var suites = this.suites(); - var specs = []; - for (var i = 0; i < suites.length; i++) { - specs = specs.concat(suites[i].specs()); - } - return specs; -}; - -jasmine.Runner.prototype.suites = function() { - return this.suites_; -}; - -jasmine.Runner.prototype.topLevelSuites = function() { - var topLevelSuites = []; - for (var i = 0; i < this.suites_.length; i++) { - if (!this.suites_[i].parentSuite) { - topLevelSuites.push(this.suites_[i]); - } - } - return topLevelSuites; -}; - -jasmine.Runner.prototype.results = function() { - return this.queue.results(); -}; -/** - * Internal representation of a Jasmine specification, or test. - * - * @constructor - * @param {jasmine.Env} env - * @param {jasmine.Suite} suite - * @param {String} description - */ -jasmine.Spec = function(env, suite, description) { - if (!env) { - throw new Error('jasmine.Env() required'); - } - if (!suite) { - throw new Error('jasmine.Suite() required'); - } - var spec = this; - spec.id = env.nextSpecId ? env.nextSpecId() : null; - spec.env = env; - spec.suite = suite; - spec.description = description; - spec.queue = new jasmine.Queue(env); - - spec.afterCallbacks = []; - spec.spies_ = []; - - spec.results_ = new jasmine.NestedResults(); - spec.results_.description = description; - spec.matchersClass = null; - spec.exclusive_ = suite.exclusive_; -}; - -jasmine.Spec.prototype.getFullName = function() { - return this.suite.getFullName() + ' ' + this.description + '.'; -}; - - -jasmine.Spec.prototype.results = function() { - return this.results_; -}; - -/** - * All parameters are pretty-printed and concatenated together, then written to the spec's output. - * - * Be careful not to leave calls to jasmine.log in production code. - */ -jasmine.Spec.prototype.log = function() { - return this.results_.log(arguments); -}; - -jasmine.Spec.prototype.runs = function (func) { - var block = new jasmine.Block(this.env, func, this); - this.addToQueue(block); - return this; -}; - -jasmine.Spec.prototype.addToQueue = function (block) { - if (this.queue.isRunning()) { - this.queue.insertNext(block); - } else { - this.queue.add(block); - } -}; - -/** - * @param {jasmine.ExpectationResult} result - */ -jasmine.Spec.prototype.addMatcherResult = function(result) { - this.results_.addResult(result); -}; - -jasmine.Spec.prototype.expect = function(actual) { - var positive = new (this.getMatchersClass_())(this.env, actual, this); - positive.not = new (this.getMatchersClass_())(this.env, actual, this, true); - return positive; -}; - -/** - * Waits a fixed time period before moving to the next block. - * - * @deprecated Use waitsFor() instead - * @param {Number} timeout milliseconds to wait - */ -jasmine.Spec.prototype.waits = function(timeout) { - var waitsFunc = new jasmine.WaitsBlock(this.env, timeout, this); - this.addToQueue(waitsFunc); - return this; -}; - -/** - * Waits for the latchFunction to return true before proceeding to the next block. - * - * @param {Function} latchFunction - * @param {String} optional_timeoutMessage - * @param {Number} optional_timeout - */ -jasmine.Spec.prototype.waitsFor = function(latchFunction, optional_timeoutMessage, optional_timeout) { - var latchFunction_ = null; - var optional_timeoutMessage_ = null; - var optional_timeout_ = null; - - for (var i = 0; i < arguments.length; i++) { - var arg = arguments[i]; - switch (typeof arg) { - case 'function': - latchFunction_ = arg; - break; - case 'string': - optional_timeoutMessage_ = arg; - break; - case 'number': - optional_timeout_ = arg; - break; - } - } - - var waitsForFunc = new jasmine.WaitsForBlock(this.env, optional_timeout_, latchFunction_, optional_timeoutMessage_, this); - this.addToQueue(waitsForFunc); - return this; -}; - -jasmine.Spec.prototype.fail = function (e) { - var expectationResult = new jasmine.ExpectationResult({ - passed: false, - message: e ? jasmine.util.formatException(e) : 'Exception', - trace: { stack: e.stack } - }); - this.results_.addResult(expectationResult); -}; - -jasmine.Spec.prototype.getMatchersClass_ = function() { - return this.matchersClass || this.env.matchersClass; -}; - -jasmine.Spec.prototype.addMatchers = function(matchersPrototype) { - var parent = this.getMatchersClass_(); - var newMatchersClass = function() { - parent.apply(this, arguments); - }; - jasmine.util.inherit(newMatchersClass, parent); - jasmine.Matchers.wrapInto_(matchersPrototype, newMatchersClass); - this.matchersClass = newMatchersClass; -}; - -jasmine.Spec.prototype.finishCallback = function() { - this.env.reporter.reportSpecResults(this); -}; - -jasmine.Spec.prototype.finish = function(onComplete) { - this.removeAllSpies(); - this.finishCallback(); - if (onComplete) { - onComplete(); - } -}; - -jasmine.Spec.prototype.after = function(doAfter) { - if (this.queue.isRunning()) { - this.queue.add(new jasmine.Block(this.env, doAfter, this), true); - } else { - this.afterCallbacks.unshift(doAfter); - } -}; - -jasmine.Spec.prototype.execute = function(onComplete) { - var spec = this; - if (!spec.env.specFilter(spec)) { - spec.results_.skipped = true; - spec.finish(onComplete); - return; - } - - this.env.reporter.reportSpecStarting(this); - - spec.env.currentSpec = spec; - - spec.addBeforesAndAftersToQueue(); - - spec.queue.start(function () { - spec.finish(onComplete); - }); -}; - -jasmine.Spec.prototype.addBeforesAndAftersToQueue = function() { - var runner = this.env.currentRunner(); - var i; - - for (var suite = this.suite; suite; suite = suite.parentSuite) { - for (i = 0; i < suite.before_.length; i++) { - this.queue.addBefore(new jasmine.Block(this.env, suite.before_[i], this)); - } - } - for (i = 0; i < runner.before_.length; i++) { - this.queue.addBefore(new jasmine.Block(this.env, runner.before_[i], this)); - } - for (i = 0; i < this.afterCallbacks.length; i++) { - this.queue.add(new jasmine.Block(this.env, this.afterCallbacks[i], this), true); - } - for (suite = this.suite; suite; suite = suite.parentSuite) { - for (i = 0; i < suite.after_.length; i++) { - this.queue.add(new jasmine.Block(this.env, suite.after_[i], this), true); - } - } - for (i = 0; i < runner.after_.length; i++) { - this.queue.add(new jasmine.Block(this.env, runner.after_[i], this), true); - } -}; - -jasmine.Spec.prototype.explodes = function() { - throw 'explodes function should not have been called'; -}; - -jasmine.Spec.prototype.spyOn = function(obj, methodName, ignoreMethodDoesntExist) { - if (obj == jasmine.undefined) { - throw "spyOn could not find an object to spy upon for " + methodName + "()"; - } - - if (!ignoreMethodDoesntExist && obj[methodName] === jasmine.undefined) { - throw methodName + '() method does not exist'; - } - - if (!ignoreMethodDoesntExist && obj[methodName] && obj[methodName].isSpy) { - throw new Error(methodName + ' has already been spied upon'); - } - - var spyObj = jasmine.createSpy(methodName); - - this.spies_.push(spyObj); - spyObj.baseObj = obj; - spyObj.methodName = methodName; - spyObj.originalValue = obj[methodName]; - - obj[methodName] = spyObj; - - return spyObj; -}; - -jasmine.Spec.prototype.removeAllSpies = function() { - for (var i = 0; i < this.spies_.length; i++) { - var spy = this.spies_[i]; - spy.baseObj[spy.methodName] = spy.originalValue; - } - this.spies_ = []; -}; - -/** - * Internal representation of a Jasmine suite. - * - * @constructor - * @param {jasmine.Env} env - * @param {String} description - * @param {Function} specDefinitions - * @param {jasmine.Suite} parentSuite - */ -jasmine.Suite = function(env, description, specDefinitions, parentSuite) { - var self = this; - self.id = env.nextSuiteId ? env.nextSuiteId() : null; - self.description = description; - self.queue = new jasmine.Queue(env); - self.parentSuite = parentSuite; - self.env = env; - self.before_ = []; - self.after_ = []; - self.children_ = []; - self.suites_ = []; - self.specs_ = []; - self.exclusive_ = parentSuite && parentSuite.exclusive_ || 0; -}; - -jasmine.Suite.prototype.getFullName = function() { - var fullName = this.description; - for (var parentSuite = this.parentSuite; parentSuite; parentSuite = parentSuite.parentSuite) { - fullName = parentSuite.description + ' ' + fullName; - } - return fullName; -}; - -jasmine.Suite.prototype.finish = function(onComplete) { - this.env.reporter.reportSuiteResults(this); - this.finished = true; - if (typeof(onComplete) == 'function') { - onComplete(); - } -}; - -jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) { - beforeEachFunction.typeName = 'beforeEach'; - this.before_.unshift(beforeEachFunction); -}; - -jasmine.Suite.prototype.afterEach = function(afterEachFunction) { - afterEachFunction.typeName = 'afterEach'; - this.after_.unshift(afterEachFunction); -}; - -jasmine.Suite.prototype.results = function() { - return this.queue.results(); -}; - -jasmine.Suite.prototype.add = function(suiteOrSpec) { - this.children_.push(suiteOrSpec); - if (suiteOrSpec instanceof jasmine.Suite) { - this.suites_.push(suiteOrSpec); - this.env.currentRunner().addSuite(suiteOrSpec); - } else { - this.specs_.push(suiteOrSpec); - } - this.queue.add(suiteOrSpec); -}; - -jasmine.Suite.prototype.specs = function() { - return this.specs_; -}; - -jasmine.Suite.prototype.suites = function() { - return this.suites_; -}; - -jasmine.Suite.prototype.children = function() { - return this.children_; -}; - -jasmine.Suite.prototype.execute = function(onComplete) { - var self = this; - this.queue.start(function () { - self.finish(onComplete); - }); -}; -jasmine.WaitsBlock = function(env, timeout, spec) { - this.timeout = timeout; - jasmine.Block.call(this, env, null, spec); -}; - -jasmine.util.inherit(jasmine.WaitsBlock, jasmine.Block); - -jasmine.WaitsBlock.prototype.execute = function (onComplete) { - if (jasmine.VERBOSE) { - this.env.reporter.log('>> Jasmine waiting for ' + this.timeout + ' ms...'); - } - this.env.setTimeout(function () { - onComplete(); - }, this.timeout); -}; -/** - * A block which waits for some condition to become true, with timeout. - * - * @constructor - * @extends jasmine.Block - * @param {jasmine.Env} env The Jasmine environment. - * @param {Number} timeout The maximum time in milliseconds to wait for the condition to become true. - * @param {Function} latchFunction A function which returns true when the desired condition has been met. - * @param {String} message The message to display if the desired condition hasn't been met within the given time period. - * @param {jasmine.Spec} spec The Jasmine spec. - */ -jasmine.WaitsForBlock = function(env, timeout, latchFunction, message, spec) { - this.timeout = timeout || env.defaultTimeoutInterval; - this.latchFunction = latchFunction; - this.message = message; - this.totalTimeSpentWaitingForLatch = 0; - jasmine.Block.call(this, env, null, spec); -}; -jasmine.util.inherit(jasmine.WaitsForBlock, jasmine.Block); - -jasmine.WaitsForBlock.TIMEOUT_INCREMENT = 10; - -jasmine.WaitsForBlock.prototype.execute = function(onComplete) { - if (jasmine.VERBOSE) { - this.env.reporter.log('>> Jasmine waiting for ' + (this.message || 'something to happen')); - } - var latchFunctionResult; - try { - latchFunctionResult = this.latchFunction.apply(this.spec); - } catch (e) { - this.spec.fail(e); - onComplete(); - return; - } - - if (latchFunctionResult) { - onComplete(); - } else if (this.totalTimeSpentWaitingForLatch >= this.timeout) { - var message = 'timed out after ' + this.timeout + ' msec waiting for ' + (this.message || 'something to happen'); - this.spec.fail({ - name: 'timeout', - message: message - }); - - this.abort = true; - onComplete(); - } else { - this.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT; - var self = this; - this.env.setTimeout(function() { - self.execute(onComplete); - }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT); - } -}; - -jasmine.version_= { - "major": 1, - "minor": 3, - "build": 1, - "revision": 1354556913 -}; diff --git a/node_modules/karma-jasmine/package.json b/node_modules/karma-jasmine/package.json deleted file mode 100644 index 882f67a8..00000000 --- a/node_modules/karma-jasmine/package.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "karma-jasmine", - "version": "0.1.3", - "description": "A Karma plugin - adapter for Jasmine testing framework.", - "main": "lib/index.js", - "scripts": { - "test": "grunt test" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-jasmine.git" - }, - "keywords": [ - "karma-plugin", - "karma-adapter", - "jasmine" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": {}, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-jshint": "~0.6", - "karma": "~0.9", - "karma-jasmine": "*", - "grunt-karma": "~0.4", - "grunt-auto-release": "~0.0.2", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.7" - }, - "peerDependencies": { - "karma": ">=0.9" - }, - "license": "MIT", - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - } - ], - "readme": "# karma-jasmine [![Build Status](https://travis-ci.org/karma-runner/karma-jasmine.png?branch=master)](https://travis-ci.org/karma-runner/karma-jasmine)\n\n> Adapter for the [Jasmine](http://pivotal.github.io/jasmine/) testing framework.\n\n## Installation\n\n**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)**\n\nThe easiest way is to keep `karma-jasmine` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-jasmine\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-jasmine --save-dev\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n frameworks: ['jasmine'],\n\n files: [\n '*.js'\n ]\n });\n};\n```\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-jasmine/issues" - }, - "homepage": "https://github.com/karma-runner/karma-jasmine", - "_id": "karma-jasmine@0.1.3", - "_from": "karma-jasmine@*" -} diff --git a/node_modules/karma-junit-reporter/LICENSE b/node_modules/karma-junit-reporter/LICENSE deleted file mode 100644 index 40727341..00000000 --- a/node_modules/karma-junit-reporter/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-junit-reporter/README.md b/node_modules/karma-junit-reporter/README.md deleted file mode 100644 index e99bee92..00000000 --- a/node_modules/karma-junit-reporter/README.md +++ /dev/null @@ -1,48 +0,0 @@ -# karma-junit-reporter - -> Reporter for the JUnit XML format. - -## Installation - -The easiest way is to keep `karma-junit-reporter` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-junit-reporter": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-junit-reporter --save-dev -``` - -## Configuration -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - reporters: ['progress', 'junit'], - - // the default configuration - junitReporter: { - outputFile: 'test-results.xml', - suite: '' - } - }); -}; -``` - -You can pass list of reporters as a CLI argument too: -```bash -karma start --reporters junit,dots -``` - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com diff --git a/node_modules/karma-junit-reporter/index.js b/node_modules/karma-junit-reporter/index.js deleted file mode 100644 index 60035d66..00000000 --- a/node_modules/karma-junit-reporter/index.js +++ /dev/null @@ -1,113 +0,0 @@ -var os = require('os'); -var path = require('path'); -var fs = require('fs'); -var builder = require('xmlbuilder'); - - -var JUnitReporter = function(baseReporterDecorator, config, logger, helper, formatError) { - var log = logger.create('reporter.junit'); - var reporterConfig = config.junitReporter || {}; - var pkgName = reporterConfig.suite || ''; - var outputFile = helper.normalizeWinPath(path.resolve(config.basePath, reporterConfig.outputFile - || 'test-results.xml')); - - var xml; - var suites; - var pendingFileWritings = 0; - var fileWritingFinished = function() {}; - var allMessages = []; - - baseReporterDecorator(this); - - this.adapters = [function(msg) { - allMessages.push(msg); - }]; - - var initliazeXmlForBrowser = function(browser) { - var timestamp = (new Date()).toISOString().substr(0, 19); - var suite = suites[browser.id] = xml.ele('testsuite', { - name: browser.name, 'package': pkgName, timestamp: timestamp, id: 0, hostname: os.hostname() - }); - suite.ele('properties').ele('property', {name: 'browser.fullName', value: browser.fullName}); - }; - - this.onRunStart = function(browsers) { - suites = Object.create(null); - xml = builder.create('testsuites'); - - // TODO(vojta): remove once we don't care about Karma 0.10 - browsers.forEach(initliazeXmlForBrowser); - }; - - this.onBrowserStart = function(browser) { - initliazeXmlForBrowser(browser); - }; - - this.onBrowserComplete = function(browser) { - var suite = suites[browser.id]; - var result = browser.lastResult; - - suite.att('tests', result.total); - suite.att('errors', result.disconnected || result.error ? 1 : 0); - suite.att('failures', result.failed); - suite.att('time', (result.netTime || 0) / 1000); - - suite.ele('system-out').dat(allMessages.join() + '\n'); - suite.ele('system-err'); - }; - - this.onRunComplete = function() { - var xmlToOutput = xml; - - pendingFileWritings++; - helper.mkdirIfNotExists(path.dirname(outputFile), function() { - fs.writeFile(outputFile, xmlToOutput.end({pretty: true}), function(err) { - if (err) { - log.warn('Cannot write JUnit xml\n\t' + err.message); - } else { - log.debug('JUnit results written to "%s".', outputFile); - } - - if (!--pendingFileWritings) { - fileWritingFinished(); - } - }); - }); - - suites = xml = null; - allMessages.length = 0; - }; - - this.specSuccess = this.specSkipped = this.specFailure = function(browser, result) { - var spec = suites[browser.id].ele('testcase', { - name: result.description, time: ((result.time || 0) / 1000), - classname: (pkgName ? pkgName + ' ' : '') + browser.name + '.' + result.suite.join(' ').replace(/\./g, '_') - }); - - if (result.skipped) { - spec.ele('skipped'); - } - - if (!result.success) { - result.log.forEach(function(err) { - spec.ele('failure', {type: ''}, formatError(err)); - }); - } - }; - - // wait for writing all the xml files, before exiting - this.onExit = function(done) { - if (pendingFileWritings) { - fileWritingFinished = done; - } else { - done(); - } - }; -}; - -JUnitReporter.$inject = ['baseReporterDecorator', 'config', 'logger', 'helper', 'formatError']; - -// PUBLISH DI MODULE -module.exports = { - 'reporter:junit': ['type', JUnitReporter] -}; diff --git a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/.npmignore b/node_modules/karma-junit-reporter/node_modules/xmlbuilder/.npmignore deleted file mode 100644 index 29db5275..00000000 --- a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/.npmignore +++ /dev/null @@ -1,8 +0,0 @@ -.gitignore -.travis.yml -Makefile -.git/ -src/ -test/ -node_modules/ - diff --git a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/README.md b/node_modules/karma-junit-reporter/node_modules/xmlbuilder/README.md deleted file mode 100644 index 4025ea51..00000000 --- a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# xmlbuilder-js - -An XMLBuilder for [node.js](http://nodejs.org/) similar to -[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/). - -[![Build Status](https://secure.travis-ci.org/oozcitak/xmlbuilder-js.png)](http://travis-ci.org/oozcitak/xmlbuilder-js) - -### Installation: - -``` sh -npm install xmlbuilder -``` - -### Important: - -I had to break compatibility while adding multiple instances in 0.1.3. -As a result, version from v0.1.3 are **not** compatible with previous versions. - -### Usage: - -``` js -var builder = require('xmlbuilder'); -var xml = builder.create('root') - .ele('xmlbuilder', {'for': 'node-js'}) - .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git') - .end({ pretty: true}); - -console.log(xml); -``` - -will result in: - -``` xml - - - - git://github.com/oozcitak/xmlbuilder-js.git - - -``` - -If you need to do some processing: - -``` js -var root = builder.create('squares'); -root.com('f(x) = x^2'); -for(var i = 1; i <= 5; i++) -{ - var item = root.ele('data'); - item.att('x', i); - item.att('y', i * i); -} -``` - -This will result in: - -``` xml - - - - - - - - - -``` - -See the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions. - -### License: - -`xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php). diff --git a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/XMLBuilder.js b/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/XMLBuilder.js deleted file mode 100644 index 2850c8ad..00000000 --- a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/XMLBuilder.js +++ /dev/null @@ -1,119 +0,0 @@ -// Generated by CoffeeScript 1.3.3 -(function() { - var XMLBuilder, XMLFragment; - - XMLFragment = require('./XMLFragment'); - - XMLBuilder = (function() { - - function XMLBuilder(name, xmldec, doctype) { - var att, child, _ref; - this.children = []; - this.rootObject = null; - if (this.is(name, 'Object')) { - _ref = [name, xmldec], xmldec = _ref[0], doctype = _ref[1]; - name = null; - } - if (name != null) { - name = '' + name || ''; - if (xmldec == null) { - xmldec = { - 'version': '1.0' - }; - } - } - if ((xmldec != null) && !(xmldec.version != null)) { - throw new Error("Version number is required"); - } - if (xmldec != null) { - xmldec.version = '' + xmldec.version || ''; - if (!xmldec.version.match(/1\.[0-9]+/)) { - throw new Error("Invalid version number: " + xmldec.version); - } - att = { - version: xmldec.version - }; - if (xmldec.encoding != null) { - xmldec.encoding = '' + xmldec.encoding || ''; - if (!xmldec.encoding.match(/[A-Za-z](?:[A-Za-z0-9._-]|-)*/)) { - throw new Error("Invalid encoding: " + xmldec.encoding); - } - att.encoding = xmldec.encoding; - } - if (xmldec.standalone != null) { - att.standalone = xmldec.standalone ? "yes" : "no"; - } - child = new XMLFragment(this, '?xml', att); - this.children.push(child); - } - if (doctype != null) { - att = {}; - if (name != null) { - att.name = name; - } - if (doctype.ext != null) { - doctype.ext = '' + doctype.ext || ''; - att.ext = doctype.ext; - } - child = new XMLFragment(this, '!DOCTYPE', att); - this.children.push(child); - } - if (name != null) { - this.begin(name); - } - } - - XMLBuilder.prototype.begin = function(name, xmldec, doctype) { - var doc, root; - if (!(name != null)) { - throw new Error("Root element needs a name"); - } - if (this.rootObject) { - this.children = []; - this.rootObject = null; - } - if (xmldec != null) { - doc = new XMLBuilder(name, xmldec, doctype); - return doc.root(); - } - name = '' + name || ''; - root = new XMLFragment(this, name, {}); - root.isRoot = true; - root.documentObject = this; - this.children.push(root); - this.rootObject = root; - return root; - }; - - XMLBuilder.prototype.root = function() { - return this.rootObject; - }; - - XMLBuilder.prototype.end = function(options) { - return toString(options); - }; - - XMLBuilder.prototype.toString = function(options) { - var child, r, _i, _len, _ref; - r = ''; - _ref = this.children; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - child = _ref[_i]; - r += child.toString(options); - } - return r; - }; - - XMLBuilder.prototype.is = function(obj, type) { - var clas; - clas = Object.prototype.toString.call(obj).slice(8, -1); - return (obj != null) && clas === type; - }; - - return XMLBuilder; - - })(); - - module.exports = XMLBuilder; - -}).call(this); diff --git a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/XMLFragment.js b/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/XMLFragment.js deleted file mode 100644 index 7a0fff59..00000000 --- a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/XMLFragment.js +++ /dev/null @@ -1,422 +0,0 @@ -// Generated by CoffeeScript 1.3.3 -(function() { - var XMLFragment, - __hasProp = {}.hasOwnProperty; - - XMLFragment = (function() { - - function XMLFragment(parent, name, attributes, text) { - this.isRoot = false; - this.documentObject = null; - this.parent = parent; - this.name = name; - this.attributes = attributes; - this.value = text; - this.children = []; - } - - XMLFragment.prototype.element = function(name, attributes, text) { - var child, key, val, _ref, _ref1; - if (!(name != null)) { - throw new Error("Missing element name"); - } - name = '' + name || ''; - this.assertLegalChar(name); - if (attributes == null) { - attributes = {}; - } - if (this.is(attributes, 'String') && this.is(text, 'Object')) { - _ref = [text, attributes], attributes = _ref[0], text = _ref[1]; - } else if (this.is(attributes, 'String')) { - _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1]; - } - for (key in attributes) { - if (!__hasProp.call(attributes, key)) continue; - val = attributes[key]; - val = '' + val || ''; - attributes[key] = this.escape(val); - } - child = new XMLFragment(this, name, attributes); - if (text != null) { - text = '' + text || ''; - text = this.escape(text); - this.assertLegalChar(text); - child.raw(text); - } - this.children.push(child); - return child; - }; - - XMLFragment.prototype.insertBefore = function(name, attributes, text) { - var child, i, key, val, _ref, _ref1; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - if (!(name != null)) { - throw new Error("Missing element name"); - } - name = '' + name || ''; - this.assertLegalChar(name); - if (attributes == null) { - attributes = {}; - } - if (this.is(attributes, 'String') && this.is(text, 'Object')) { - _ref = [text, attributes], attributes = _ref[0], text = _ref[1]; - } else if (this.is(attributes, 'String')) { - _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1]; - } - for (key in attributes) { - if (!__hasProp.call(attributes, key)) continue; - val = attributes[key]; - val = '' + val || ''; - attributes[key] = this.escape(val); - } - child = new XMLFragment(this.parent, name, attributes); - if (text != null) { - text = '' + text || ''; - text = this.escape(text); - this.assertLegalChar(text); - child.raw(text); - } - i = this.parent.children.indexOf(this); - this.parent.children.splice(i, 0, child); - return child; - }; - - XMLFragment.prototype.insertAfter = function(name, attributes, text) { - var child, i, key, val, _ref, _ref1; - if (this.isRoot) { - throw new Error("Cannot insert elements at root level"); - } - if (!(name != null)) { - throw new Error("Missing element name"); - } - name = '' + name || ''; - this.assertLegalChar(name); - if (attributes == null) { - attributes = {}; - } - if (this.is(attributes, 'String') && this.is(text, 'Object')) { - _ref = [text, attributes], attributes = _ref[0], text = _ref[1]; - } else if (this.is(attributes, 'String')) { - _ref1 = [{}, attributes], attributes = _ref1[0], text = _ref1[1]; - } - for (key in attributes) { - if (!__hasProp.call(attributes, key)) continue; - val = attributes[key]; - val = '' + val || ''; - attributes[key] = this.escape(val); - } - child = new XMLFragment(this.parent, name, attributes); - if (text != null) { - text = '' + text || ''; - text = this.escape(text); - this.assertLegalChar(text); - child.raw(text); - } - i = this.parent.children.indexOf(this); - this.parent.children.splice(i + 1, 0, child); - return child; - }; - - XMLFragment.prototype.remove = function() { - var i, _ref; - if (this.isRoot) { - throw new Error("Cannot remove the root element"); - } - i = this.parent.children.indexOf(this); - [].splice.apply(this.parent.children, [i, i - i + 1].concat(_ref = [])), _ref; - return this.parent; - }; - - XMLFragment.prototype.text = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing element text"); - } - value = '' + value || ''; - value = this.escape(value); - this.assertLegalChar(value); - child = new XMLFragment(this, '', {}, value); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.cdata = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing CDATA text"); - } - value = '' + value || ''; - this.assertLegalChar(value); - if (value.match(/]]>/)) { - throw new Error("Invalid CDATA text: " + value); - } - child = new XMLFragment(this, '', {}, ''); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.comment = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing comment text"); - } - value = '' + value || ''; - value = this.escape(value); - this.assertLegalChar(value); - if (value.match(/--/)) { - throw new Error("Comment text cannot contain double-hypen: " + value); - } - child = new XMLFragment(this, '', {}, ''); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.raw = function(value) { - var child; - if (!(value != null)) { - throw new Error("Missing raw text"); - } - value = '' + value || ''; - child = new XMLFragment(this, '', {}, value); - this.children.push(child); - return this; - }; - - XMLFragment.prototype.up = function() { - if (this.isRoot) { - throw new Error("This node has no parent. Use doc() if you need to get the document object."); - } - return this.parent; - }; - - XMLFragment.prototype.root = function() { - var child; - if (this.isRoot) { - return this; - } - child = this.parent; - while (!child.isRoot) { - child = child.parent; - } - return child; - }; - - XMLFragment.prototype.document = function() { - return this.root().documentObject; - }; - - XMLFragment.prototype.end = function(options) { - return this.document().toString(options); - }; - - XMLFragment.prototype.prev = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i < 1) { - throw new Error("Already at the first node"); - } - return this.parent.children[i - 1]; - }; - - XMLFragment.prototype.next = function() { - var i; - if (this.isRoot) { - throw new Error("Root node has no siblings"); - } - i = this.parent.children.indexOf(this); - if (i === -1 || i === this.parent.children.length - 1) { - throw new Error("Already at the last node"); - } - return this.parent.children[i + 1]; - }; - - XMLFragment.prototype.clone = function(deep) { - var clonedSelf; - clonedSelf = new XMLFragment(this.parent, this.name, this.attributes, this.value); - if (deep) { - this.children.forEach(function(child) { - var clonedChild; - clonedChild = child.clone(deep); - clonedChild.parent = clonedSelf; - return clonedSelf.children.push(clonedChild); - }); - } - return clonedSelf; - }; - - XMLFragment.prototype.importXMLBuilder = function(xmlbuilder) { - var clonedRoot; - clonedRoot = xmlbuilder.root().clone(true); - clonedRoot.parent = this; - this.children.push(clonedRoot); - clonedRoot.isRoot = false; - return this; - }; - - XMLFragment.prototype.attribute = function(name, value) { - var _ref; - if (!(name != null)) { - throw new Error("Missing attribute name"); - } - if (!(value != null)) { - throw new Error("Missing attribute value"); - } - name = '' + name || ''; - value = '' + value || ''; - if ((_ref = this.attributes) == null) { - this.attributes = {}; - } - this.attributes[name] = this.escape(value); - return this; - }; - - XMLFragment.prototype.removeAttribute = function(name) { - if (!(name != null)) { - throw new Error("Missing attribute name"); - } - name = '' + name || ''; - delete this.attributes[name]; - return this; - }; - - XMLFragment.prototype.toString = function(options, level) { - var attName, attValue, child, indent, newline, pretty, r, space, _i, _len, _ref, _ref1; - pretty = (options != null) && options.pretty || false; - indent = (options != null) && options.indent || ' '; - newline = (options != null) && options.newline || '\n'; - level || (level = 0); - space = new Array(level + 1).join(indent); - r = ''; - if (pretty) { - r += space; - } - if (!(this.value != null)) { - r += '<' + this.name; - } else { - r += '' + this.value; - } - _ref = this.attributes; - for (attName in _ref) { - attValue = _ref[attName]; - if (this.name === '!DOCTYPE') { - r += ' ' + attValue; - } else { - r += ' ' + attName + '="' + attValue + '"'; - } - } - if (this.children.length === 0) { - if (!(this.value != null)) { - r += this.name === '?xml' ? '?>' : this.name === '!DOCTYPE' ? '>' : '/>'; - } - if (pretty) { - r += newline; - } - } else if (pretty && this.children.length === 1 && this.children[0].value) { - r += '>'; - r += this.children[0].value; - r += ''; - r += newline; - } else { - r += '>'; - if (pretty) { - r += newline; - } - _ref1 = this.children; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - child = _ref1[_i]; - r += child.toString(options, level + 1); - } - if (pretty) { - r += space; - } - r += ''; - if (pretty) { - r += newline; - } - } - return r; - }; - - XMLFragment.prototype.escape = function(str) { - return str.replace(/&/g, '&').replace(//g, '>').replace(/'/g, ''').replace(/"/g, '"'); - }; - - XMLFragment.prototype.assertLegalChar = function(str) { - var chars, chr; - chars = /[\u0000-\u0008\u000B-\u000C\u000E-\u001F\uD800-\uDFFF\uFFFE-\uFFFF]/; - chr = str.match(chars); - if (chr) { - throw new Error("Invalid character (" + chr + ") in string: " + str); - } - }; - - XMLFragment.prototype.is = function(obj, type) { - var clas; - clas = Object.prototype.toString.call(obj).slice(8, -1); - return (obj != null) && clas === type; - }; - - XMLFragment.prototype.ele = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLFragment.prototype.txt = function(value) { - return this.text(value); - }; - - XMLFragment.prototype.dat = function(value) { - return this.cdata(value); - }; - - XMLFragment.prototype.att = function(name, value) { - return this.attribute(name, value); - }; - - XMLFragment.prototype.com = function(value) { - return this.comment(value); - }; - - XMLFragment.prototype.doc = function() { - return this.document(); - }; - - XMLFragment.prototype.e = function(name, attributes, text) { - return this.element(name, attributes, text); - }; - - XMLFragment.prototype.t = function(value) { - return this.text(value); - }; - - XMLFragment.prototype.d = function(value) { - return this.cdata(value); - }; - - XMLFragment.prototype.a = function(name, value) { - return this.attribute(name, value); - }; - - XMLFragment.prototype.c = function(value) { - return this.comment(value); - }; - - XMLFragment.prototype.r = function(value) { - return this.raw(value); - }; - - XMLFragment.prototype.u = function() { - return this.up(); - }; - - return XMLFragment; - - })(); - - module.exports = XMLFragment; - -}).call(this); diff --git a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/index.js b/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/index.js deleted file mode 100644 index a930f5b0..00000000 --- a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/lib/index.js +++ /dev/null @@ -1,15 +0,0 @@ -// Generated by CoffeeScript 1.3.3 -(function() { - var XMLBuilder; - - XMLBuilder = require('./XMLBuilder'); - - module.exports.create = function(name, xmldec, doctype) { - if (name != null) { - return new XMLBuilder(name, xmldec, doctype).root(); - } else { - return new XMLBuilder(); - } - }; - -}).call(this); diff --git a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/package.json b/node_modules/karma-junit-reporter/node_modules/xmlbuilder/package.json deleted file mode 100644 index d9db3512..00000000 --- a/node_modules/karma-junit-reporter/node_modules/xmlbuilder/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "xmlbuilder", - "version": "0.4.2", - "keywords": [ - "xml", - "xmlbuilder" - ], - "homepage": "http://github.com/oozcitak/xmlbuilder-js", - "description": "An XML builder for node.js", - "author": { - "name": "Ozgur Ozcitak", - "email": "oozcitak@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://opensource.org/licenses/mit-license.php" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/oozcitak/xmlbuilder-js.git" - }, - "bugs": { - "url": "http://github.com/oozcitak/xmlbuilder-js/issues" - }, - "main": "./lib/index", - "engines": { - "node": ">=0.2.0" - }, - "devDependencies": { - "coffee-script": "1.1.x" - }, - "scripts": { - "test": "make test" - }, - "readme": "# xmlbuilder-js\n\nAn XMLBuilder for [node.js](http://nodejs.org/) similar to \n[java-xmlbuilder](http://code.google.com/p/java-xmlbuilder/).\n\n[![Build Status](https://secure.travis-ci.org/oozcitak/xmlbuilder-js.png)](http://travis-ci.org/oozcitak/xmlbuilder-js)\n\n### Installation:\n\n``` sh\nnpm install xmlbuilder\n```\n\n### Important:\n\nI had to break compatibility while adding multiple instances in 0.1.3. \nAs a result, version from v0.1.3 are **not** compatible with previous versions.\n\n### Usage:\n\n``` js\nvar builder = require('xmlbuilder');\nvar xml = builder.create('root')\n .ele('xmlbuilder', {'for': 'node-js'})\n .ele('repo', {'type': 'git'}, 'git://github.com/oozcitak/xmlbuilder-js.git')\n .end({ pretty: true});\n \nconsole.log(xml);\n```\n\nwill result in:\n\n``` xml\n\n\n \n git://github.com/oozcitak/xmlbuilder-js.git\n \n\n```\n\nIf you need to do some processing:\n\n``` js\nvar root = builder.create('squares');\nroot.com('f(x) = x^2');\nfor(var i = 1; i <= 5; i++)\n{\n var item = root.ele('data');\n item.att('x', i);\n item.att('y', i * i);\n}\n```\n\nThis will result in:\n\n``` xml\n\n\n \n \n \n \n \n \n\n```\n\nSee the [Usage](https://github.com/oozcitak/xmlbuilder-js/wiki/Usage) page in the wiki for more detailed instructions.\n\n### License:\n\n`xmlbuilder-js` is [MIT Licensed](http://opensource.org/licenses/mit-license.php).\n", - "readmeFilename": "README.md", - "_id": "xmlbuilder@0.4.2", - "dist": { - "shasum": "baa20a72d5b4a34bdb25bcc4aa67f2edb3e12777" - }, - "_from": "xmlbuilder@0.4.2", - "_resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-0.4.2.tgz" -} diff --git a/node_modules/karma-junit-reporter/package.json b/node_modules/karma-junit-reporter/package.json deleted file mode 100644 index e498d49d..00000000 --- a/node_modules/karma-junit-reporter/package.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "karma-junit-reporter", - "version": "0.2.1", - "description": "A Karma plugin. Report results in junit xml format.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-junit-reporter.git" - }, - "keywords": [ - "karma-plugin", - "karma-reporter", - "junit" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": { - "xmlbuilder": "0.4.2" - }, - "peerDependencies": { - "karma": ">=0.9" - }, - "license": "MIT", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.7", - "grunt-auto-release": "~0.0.2" - }, - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - }, - { - "name": "Trey Hyde", - "email": "thyde@centraldesktop.com" - } - ], - "readme": "# karma-junit-reporter\n\n> Reporter for the JUnit XML format.\n\n## Installation\n\nThe easiest way is to keep `karma-junit-reporter` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-junit-reporter\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-junit-reporter --save-dev\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n reporters: ['progress', 'junit'],\n\n // the default configuration\n junitReporter: {\n outputFile: 'test-results.xml',\n suite: ''\n }\n });\n};\n```\n\nYou can pass list of reporters as a CLI argument too:\n```bash\nkarma start --reporters junit,dots\n```\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-junit-reporter/issues" - }, - "homepage": "https://github.com/karma-runner/karma-junit-reporter", - "_id": "karma-junit-reporter@0.2.1", - "dist": { - "shasum": "e7abb70b82d2d04fbc5fb9d3ba86a1963828b598" - }, - "_from": "karma-junit-reporter@", - "_resolved": "https://registry.npmjs.org/karma-junit-reporter/-/karma-junit-reporter-0.2.1.tgz" -} diff --git a/node_modules/karma-phantomjs-launcher/LICENSE b/node_modules/karma-phantomjs-launcher/LICENSE deleted file mode 100644 index 40727341..00000000 --- a/node_modules/karma-phantomjs-launcher/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/README.md b/node_modules/karma-phantomjs-launcher/README.md deleted file mode 100644 index a761fa80..00000000 --- a/node_modules/karma-phantomjs-launcher/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# karma-phantomjs-launcher - -> Launcher for [PhantomJS]. - -## Installation - -**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)** - -The easiest way is to keep `karma-phantomjs-launcher` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-phantomjs-launcher": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-phantomjs-launcher --save-dev -``` - -## Configuration -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - browsers: ['PhantomJS', 'PhantomJS_custom'], - - // you can define custom flags - customLaunchers: { - 'PhantomJS_custom': { - base: 'PhantomJS', - options: { - windowName: 'my-window', - settings: { - webSecurityEnabled: false - } - }, - flags: ['--remote-debugger-port=9000'] - } - } - }); -}; -``` - -You can pass list of browsers as a CLI argument too: -```bash -karma start --browsers PhantomJS_custom -``` - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com -[PhantomJS]: http://phantomjs.org/ diff --git a/node_modules/karma-phantomjs-launcher/index.js b/node_modules/karma-phantomjs-launcher/index.js deleted file mode 100644 index 89a66cbf..00000000 --- a/node_modules/karma-phantomjs-launcher/index.js +++ /dev/null @@ -1,51 +0,0 @@ -var fs = require('fs'); - - -var PhantomJSBrowser = function(baseBrowserDecorator, config, args) { - baseBrowserDecorator(this); - - var options = args && args.options || config && config.options || {}; - var flags = args && args.flags || config && config.flags || []; - - this._start = function(url) { - // create the js file that will open karma - var captureFile = this._tempDir + '/capture.js'; - var optionsCode = Object.keys(options).map(function (key) { - if (key !== 'settings') { // settings cannot be overriden, it should be extended! - return 'page.' + key + ' = ' + JSON.stringify(options[key]) + ';'; - } - }); - - if (options.settings) { - optionsCode = optionsCode.concat(Object.keys(options.settings).map(function (key) { - return 'page.settings.' + key + ' = ' + JSON.stringify(options.settings[key]) + ';'; - })); - } - - var captureCode = 'var page = require("webpage").create();\n' + - optionsCode.join('\n') + '\npage.open("' + url + '");\n'; - fs.writeFileSync(captureFile, captureCode); - - // and start phantomjs - this._execCommand(this._getCommand(), flags.concat(captureFile)); - }; -}; - -PhantomJSBrowser.prototype = { - name: 'PhantomJS', - - DEFAULT_CMD: { - linux: require('phantomjs').path, - darwin: require('phantomjs').path, - win32: require('phantomjs').path - }, - ENV_CMD: 'PHANTOMJS_BIN' -}; - -PhantomJSBrowser.$inject = ['baseBrowserDecorator', 'config.phantomjsLauncher', 'args']; - - -// PUBLISH DI MODULE -module.exports = { - 'launcher:PhantomJS': ['type', PhantomJSBrowser] -}; diff --git a/node_modules/karma-phantomjs-launcher/node_modules/.bin/phantomjs b/node_modules/karma-phantomjs-launcher/node_modules/.bin/phantomjs deleted file mode 100755 index 7fe352a3..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/.bin/phantomjs +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node - -/** - * Script that will execute the downloaded phantomjs binary. stdio are - * forwarded to and from the child process. - * - * The following is for an ugly hack to avoid a problem where the installer - * finds the bin script npm creates during global installation. - * - * {NPM_INSTALL_MARKER} - */ - -var path = require('path') -var spawn = require('child_process').spawn - -var binPath = require(path.join(__dirname, '..', 'lib', 'phantomjs')).path - -var args = process.argv.slice(2) - -// For Node 0.6 compatibility, pipe the streams manually, instead of using -// `{ stdio: 'inherit' }`. -var cp = spawn(binPath, args) -cp.stdout.pipe(process.stdout) -cp.stderr.pipe(process.stderr) -process.stdin.pipe(cp.stdin) - -cp.on('error', function (err) { - console.error('Error executing phantom at', binPath) - console.error(err.stack) -}) -cp.on('exit', process.exit) - -process.on('SIGTERM', function() { - cp.kill('SIGTERM') - process.exit(1) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.jshintrc b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.jshintrc deleted file mode 100644 index 1c2f5ea3..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.jshintrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - asi: false -} \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.npmignore deleted file mode 100644 index 3a4f11cf..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -/node_modules -/lib/phantom -/lib/location.js -/tmp -npm-debug.log diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.travis.yml b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.travis.yml deleted file mode 100644 index 0175d822..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.6" - - "0.8" - - "0.10" diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/LICENSE.txt b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/LICENSE.txt deleted file mode 100644 index 55e332a8..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/LICENSE.txt +++ /dev/null @@ -1,194 +0,0 @@ -Copyright 2012 The Obvious Corporation. -http://obvious.com/ - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -------------------------------------------------------------------------- - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/README.md deleted file mode 100644 index 73787a28..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/README.md +++ /dev/null @@ -1,122 +0,0 @@ -phantom -======= - -An NPM wrapper for [PhantomJS](http://phantomjs.org/), headless webkit with JS API. - -Building and Installing ------------------------ - -```shell -npm install phantomjs -``` - -Or grab the source and - -```shell -node ./install.js -``` - -What this is really doing is just grabbing a particular "blessed" (by -this module) version of Phantom. As new versions of Phantom are released -and vetted, this module will be updated accordingly. - -The package has been set up to fetch and run Phantom for MacOS (darwin), -Linux based platforms (as identified by nodejs), and -- as of version 0.2.0 -- -Windows (thanks to [Domenic Denicola](https://github.com/domenic)). If you -spot any platform weirdnesses, let us know or send a patch. - -Running -------- - -```shell -bin/phantom [phantom arguments] -``` - -And npm will install a link to the binary in `node_modules/.bin` as -it is wont to do. - -Running via node ----------------- - -The package exports a `path` string that contains the path to the -phantomjs binary/executable. - -Below is an example of using this package via node. - -```javascript -var childProcess = require('child_process') -var phantomjs = require('phantomjs') -var binPath = phantomjs.path - -var childArgs = [ - path.join(__dirname, 'phantomjs-script.js'), - 'some other argument (passed to phantomjs script)' -] - -childProcess.execFile(binPath, childArgs, function(err, stdout, stderr) { - // handle results -}) - -``` - -Versioning ----------- - -The NPM package version tracks the version of PhantomJS that will be installed, -with an additional build number that is used for revisions to the installer. - -As such `1.8.0-1` will `1.8.0-2` will both install PhantomJs 1.8 but the latter -has newer changes to the installer. - -A Note on PhantomJS -------------------- - -PhantomJS is not a library for NodeJS. It's a separate environment and code -written for node is unlikely to be compatible. In particular PhantomJS does -not expose a Common JS package loader. - -This is an _NPM wrapper_ and can be used to conveniently make Phantom available -It is not a Node JS wrapper. - -I have had reasonable experiences writing standalone Phantom scripts which I -then drive from within a node program by spawning phantom in a child process. - -Read the PhantomJS FAQ for more details: http://phantomjs.org/faq.html - -### Linux Note - -An extra note on Linux usage, from the PhantomJS download page: - - > This package is built on CentOS 5.8. It should run successfully on Lucid or - > more modern systems (including other distributions). There is no requirement - > to install Qt, WebKit, or any other libraries. It is however expected that - > some base libraries necessary for rendering (FreeType, Fontconfig) and the - > basic font files are available in the system. - -Contributing ------------- - -Questions, comments, bug reports, and pull requests are all welcome. Submit them at -[the project on GitHub](https://github.com/Obvious/phantomjs/). If you haven't contributed to an -[Obvious](http://github.com/Obvious/) project before please head over to the -[Open Source Project](https://github.com/Obvious/open-source#note-to-external-contributors) and fill -out an OCLA (it should be pretty painless). - -Bug reports that include steps-to-reproduce (including code) are the -best. Even better, make them in the form of pull requests. - -Author ------- - -[Dan Pupius](https://github.com/dpup) -([personal website](http://pupius.co.uk)), supported by -[The Obvious Corporation](http://obvious.com/). - -License -------- - -Copyright 2012 [The Obvious Corporation](http://obvious.com/). - -Licensed under the Apache License, Version 2.0. -See the top-level file `LICENSE.txt` and -(http://www.apache.org/licenses/LICENSE-2.0). diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/bin/phantomjs b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/bin/phantomjs deleted file mode 100755 index 7fe352a3..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/bin/phantomjs +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env node - -/** - * Script that will execute the downloaded phantomjs binary. stdio are - * forwarded to and from the child process. - * - * The following is for an ugly hack to avoid a problem where the installer - * finds the bin script npm creates during global installation. - * - * {NPM_INSTALL_MARKER} - */ - -var path = require('path') -var spawn = require('child_process').spawn - -var binPath = require(path.join(__dirname, '..', 'lib', 'phantomjs')).path - -var args = process.argv.slice(2) - -// For Node 0.6 compatibility, pipe the streams manually, instead of using -// `{ stdio: 'inherit' }`. -var cp = spawn(binPath, args) -cp.stdout.pipe(process.stdout) -cp.stderr.pipe(process.stderr) -process.stdin.pipe(cp.stdin) - -cp.on('error', function (err) { - console.error('Error executing phantom at', binPath) - console.error(err.stack) -}) -cp.on('exit', process.exit) - -process.on('SIGTERM', function() { - cp.kill('SIGTERM') - process.exit(1) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js deleted file mode 100644 index 1995b7e2..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/install.js +++ /dev/null @@ -1,298 +0,0 @@ -// Copyright 2012 The Obvious Corporation. - -/* - * This simply fetches the right version of phantom for the current platform. - */ - -'use strict' - -var AdmZip = require('adm-zip') -var cp = require('child_process') -var fs = require('fs') -var helper = require('./lib/phantomjs') -var http = require('http') -var kew = require('kew') -var ncp = require('ncp') -var npmconf = require('npmconf') -var mkdirp = require('mkdirp') -var path = require('path') -var rimraf = require('rimraf').sync -var url = require('url') -var util = require('util') -var which = require('which') - -var downloadUrl = 'http://phantomjs.googlecode.com/files/phantomjs-' + helper.version + '-' - -var originalPath = process.env.PATH - -// NPM adds bin directories to the path, which will cause `which` to find the -// bin for this package not the actual phantomjs bin. Also help out people who -// put ./bin on their path -process.env.PATH = helper.cleanPath(originalPath) - -var libPath = path.join(__dirname, 'lib') -var pkgPath = path.join(libPath, 'phantom') -var phantomPath = null -var tmpPath = null - -var whichDeferred = kew.defer() -which('phantomjs', whichDeferred.makeNodeResolver()) -whichDeferred.promise - .then(function (path) { - phantomPath = path - - // Horrible hack to avoid problems during global install. We check to see if - // the file `which` found is our own bin script. - // See: https://github.com/Obvious/phantomjs/issues/85 - if (/NPM_INSTALL_MARKER/.test(fs.readFileSync(phantomPath, 'utf8'))) { - console.log('Looks like an `npm install -g`; unable to check for already installed version.') - throw new Error('Global install') - - } else { - var checkVersionDeferred = kew.defer() - cp.execFile(phantomPath, ['--version'], checkVersionDeferred.makeNodeResolver()) - return checkVersionDeferred.promise - } - }) - .then(function (stdout) { - var version = stdout.trim() - if (helper.version == version) { - writeLocationFile(phantomPath) - console.log('PhantomJS is already installed at', phantomPath + '.') - exit(0) - - } else { - console.log('PhantomJS detected, but wrong version', stdout.trim(), '@', phantomPath + '.') - throw new Error('Wrong version') - } - }) - .fail(function (err) { - // Trying to use a local file failed, so initiate download and install - // steps instead. - var npmconfDeferred = kew.defer() - npmconf.load(npmconfDeferred.makeNodeResolver()) - return npmconfDeferred.promise - }) - .then(function (conf) { - tmpPath = findSuitableTempDirectory(conf) - - // Can't use a global version so start a download. - if (process.platform === 'linux' && process.arch === 'x64') { - downloadUrl += 'linux-x86_64.tar.bz2' - } else if (process.platform === 'linux') { - downloadUrl += 'linux-i686.tar.bz2' - } else if (process.platform === 'darwin' || process.platform === 'openbsd') { - downloadUrl += 'macosx.zip' - } else if (process.platform === 'win32') { - downloadUrl += 'windows.zip' - } else { - console.log('Unexpected platform or architecture:', process.platform, process.arch) - exit(1) - } - - var fileName = downloadUrl.split('/').pop() - var downloadedFile = path.join(tmpPath, fileName) - - // Start the install. - if (!fs.existsSync(downloadedFile)) { - console.log('Downloading', downloadUrl) - console.log('Saving to', downloadedFile) - return requestBinary(getRequestOptions(conf.get('proxy')), downloadedFile) - } else { - console.log('Download already available at', downloadedFile) - return downloadedFile - } - }) - .then(function (downloadedFile) { - return extractDownload(downloadedFile) - }) - .then(function (extractedPath) { - return copyIntoPlace(extractedPath, pkgPath) - }) - .then(function () { - var location = process.platform === 'win32' ? - path.join(pkgPath, 'phantomjs.exe') : - path.join(pkgPath, 'bin' ,'phantomjs') - var relativeLocation = path.relative(libPath, location) - writeLocationFile(relativeLocation) - console.log('Done. Phantomjs binary available at', location) - exit(0) - }) - .fail(function (err) { - console.error('Phantom installation failed', err, err.stack) - exit(1) - }) - - -function writeLocationFile(location) { - console.log('Writing location.js file') - if (process.platform === 'win32') { - location = location.replace(/\\/g, '\\\\') - } - fs.writeFileSync(path.join(libPath, 'location.js'), - 'module.exports.location = "' + location + '"') -} - - -function exit(code) { - process.env.PATH = originalPath - process.exit(code || 0) -} - - -function findSuitableTempDirectory(npmConf) { - var now = Date.now() - var candidateTmpDirs = [ - process.env.TMPDIR || process.env.TEMP || '/tmp', - npmConf.get('tmp'), - path.join(process.cwd(), 'tmp') - ] - - for (var i = 0; i < candidateTmpDirs.length; i++) { - var candidatePath = path.join(candidateTmpDirs[i], 'phantomjs') - - try { - mkdirp.sync(candidatePath, '0777') - // Make double sure we have 0777 permissions; some operating systems - // default umask does not allow write by default. - fs.chmodSync(candidatePath, '0777') - var testFile = path.join(candidatePath, now + '.tmp') - fs.writeFileSync(testFile, 'test') - fs.unlinkSync(testFile) - return candidatePath - } catch (e) { - console.log(candidatePath, 'is not writable:', e.message) - } - } - - console.error('Can not find a writable tmp directory, please report issue ' + - 'on https://github.com/Obvious/phantomjs/issues/59 with as much ' + - 'information as possible.') - exit(1) -} - - -function getRequestOptions(proxyUrl) { - if (proxyUrl) { - var options = url.parse(proxyUrl) - options.path = downloadUrl - options.headers = { Host: url.parse(downloadUrl).host } - // If going through proxy, spoof the User-Agent, since may commerical proxies block blank or unknown agents in headers - options.headers['User-Agent'] = 'curl/7.21.4 (universal-apple-darwin11.0) libcurl/7.21.4 OpenSSL/0.9.8r zlib/1.2.5' - // Turn basic authorization into proxy-authorization. - if (options.auth) { - options.headers['Proxy-Authorization'] = 'Basic ' + new Buffer(options.auth).toString('base64') - delete options.auth - } - - return options - } else { - return url.parse(downloadUrl) - } -} - - -function requestBinary(requestOptions, filePath) { - var deferred = kew.defer() - - var count = 0 - var notifiedCount = 0 - var writePath = filePath + '-download-' + Date.now() - var outFile = fs.openSync(writePath, 'w') - - var client = http.get(requestOptions, function (response) { - var status = response.statusCode - console.log('Receiving...') - - if (status === 200) { - response.addListener('data', function (data) { - fs.writeSync(outFile, data, 0, data.length, null) - count += data.length - if ((count - notifiedCount) > 800000) { - console.log('Received ' + Math.floor(count / 1024) + 'K...') - notifiedCount = count - } - }) - - response.addListener('end', function () { - console.log('Received ' + Math.floor(count / 1024) + 'K total.') - fs.closeSync(outFile) - fs.renameSync(writePath, filePath) - deferred.resolve(filePath) - }) - - } else { - client.abort() - console.error('Error requesting archive') - deferred.reject(new Error('Error with http request: ' + util.inspect(response.headers))) - } - }) - - return deferred.promise -} - - -function extractDownload(filePath) { - var deferred = kew.defer() - // extract to a unique directory in case multiple processes are - // installing and extracting at once - var extractedPath = filePath + '-extract-' + Date.now() - var options = {cwd: extractedPath} - - mkdirp.sync(extractedPath, '0777') - // Make double sure we have 0777 permissions; some operating systems - // default umask does not allow write by default. - fs.chmodSync(extractedPath, '0777') - - if (filePath.substr(-4) === '.zip') { - console.log('Extracting zip contents') - - try { - var zip = new AdmZip(filePath) - zip.extractAllTo(extractedPath, true) - deferred.resolve(extractedPath) - } catch (err) { - console.error('Error extracting archive') - deferred.reject(err) - } - - } else { - console.log('Extracting tar contents (via spawned process)') - cp.execFile('tar', ['jxf', filePath], options, function (err, stdout, stderr) { - if (err) { - console.error('Error extracting archive') - deferred.reject(err) - } else { - deferred.resolve(extractedPath) - } - }) - } - return deferred.promise -} - - -function copyIntoPlace(extractedPath, targetPath) { - rimraf(targetPath) - - var deferred = kew.defer() - // Look for the extracted directory, so we can rename it. - var files = fs.readdirSync(extractedPath) - for (var i = 0; i < files.length; i++) { - var file = path.join(extractedPath, files[i]) - if (fs.statSync(file).isDirectory() && file.indexOf(helper.version) != -1) { - console.log('Copying extracted folder', file, '->', targetPath) - ncp(file, targetPath, deferred.makeNodeResolver()) - break - } - } - - // Cleanup extracted directory after it's been copied - return deferred.promise.then(function() { - try { - return rimraf(extractedPath) - } catch (e) { - console.warn('Unable to remove temporary files at "' + extractedPath + - '", see https://github.com/Obvious/phantomjs/issues/108 for details.') - } - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/location.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/location.js deleted file mode 100644 index 420cdfc9..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/location.js +++ /dev/null @@ -1 +0,0 @@ -module.exports.location = "phantom/bin/phantomjs" \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/ChangeLog b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/ChangeLog deleted file mode 100644 index 603f5eb5..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/ChangeLog +++ /dev/null @@ -1,346 +0,0 @@ -Please see also http://phantomjs.org/releases.html. - -2013-09-06: Version 1.9.2 - - * Fixed graphical artifacts with transparent background on Windows (issue 11276, 11007, 11366) - * Updated GhostDriver to version 1.0.4 (issue 11452) - -2013-06-04: Version 1.9.1 - - Critical bug fixes: - - * Fixed problems with specifying proxy server (issue 10811, 11117) - * Fixed UTF-8 encoding with system.stdout and system.stderr (issue 11162) - * Ensured that onResourceReceived will be always invoked (issue 11163) - * Fixed module loading from an absolute path on Windows (issue 11165) - * Fixed typo in the command-line option for setting the cache size (11219) - * Fixed possible crash when handling network requests (issue 11252, 11388) - -2013-03-20: Version 1.9.0 "Sakura" - - New features - - * Added spawn and execFile to execute external programs (issue 10219) - * Added the ability to abort network requests (issue 10230) - * Added system access to stdin, stdout, and stderr (issue 10333) - * Added support for custom CA certificates location (issue 10916) - * Added seek function to the File stream (issue 10937) - * Implemented file read for a specified number of bytes (issue 10938) - * Added a callback to handle network error (issue 10954, 10997) - * Added custom encoding support when opening a page (issue 11043) - * Implemented require.stub() support for a factory function (issue 11044) - * Added page loading indicator and progress (issue 11091) - * Added a timeout option for network requests (issue 11129) - - Improvements - - * Fixed the build on FreeBSD (issue 10597) - * Ensured a consistent 72 dpi for Linux headless rendering (issue 10659) - * Fixed possible PDF error due to invalid CreationDate field (issue 10663) - * Fixed crash when uploading non existing files (issue 10941) - * Improved the autocomplete internal of the interactive/REPL mode (issue 10943) - * Fixed possible crash when accessing inline frames (issue 10947) - * Changed Linux binary package setup to be built on CentOS 5 (issue 10963) - * Extended SSL ignore setting to synchronous XHR (issue 10985) - * Added convenient constants for modifier keys (issue 11056) - * Fixed incorrect date handling in the cookies (issue 11068) - * Updated GhostDriver to version 1.0.3 (issue 11146) - - Examples - - * Fixed invalid data URI in the netsniff example (issue 10740) - * Implemented a new weather example (issue 10794) - * Fixed rendering issues in render_multi_url (issue 11021) - * Fixed proper event sequence in page_events example (issue 11028) - * Miscellanous tweaks (issue 11082) - -2013-03-02: Version 1.8.2 - - Critical bug fixes: - - * Fixed possible PDF error due to invalid CreationDate field (issue 663) - * Fixed crash when uploading non existing files (issue 941) - * Fixed possible crash when accessing inline frames (issue 947) - * Extended SSL ignore setting to synchronous XHR (issue 985) - * Fixed incorrect date handling in the cookies (issue 1068) - -2013-01-06: Version 1.8.1 - - Critical bug fix: - - * Mac OS X: Fix possible crash when using some TrueType fonts (issue 690) - -2012-12-21: Version 1.8.0 "Blue Winter Rose" - - New features - - * Integrated GhostDriver as the WebDriver implementation (issue 49) - * Added an option to specify the SSL protocol (issue 174) - * Added encoding support for WebServer's response (issue 505) - * Added process ID (PID) to the System module (issue 769) - * Added properties to obtain page and frame title (issue 799) - * Added page navigation methods (issue 808) - * Added support for modifier keys in keyboard events (issue 835) - * Added onFilePicker callback for more generic file upload API (issue 843) - * Added the ability to set the page content and location (issue 909) - - Improvements - - * Fixed date parsing in ISO8601 format (issue 187, 267) - * Fixed window.location (issue 530, 632) - * Deregistered multiple callback handler (issue 807) - * Fixed sending of double-click events (issue 848) - * Increases maximum number of redirects (issue 849) - * Fixed keycodes sent for lowercase characters (issue 852) - * Fixed a regression in table row page break (issue 880) - * Completed the CoffeeScript version of the examples (issue 907) - * Updated Qt to version 4.8.4 (issue 918) - * Fixed potential hang in some example scripts (issue 922) - -2012-09-22: Version 1.7.0 "Blazing Star" - - New features - - * Added a module system modelled after CommonJS/Node.js (issue 47) - * Added support for window pop-up (issue 151) - * Static build on Linux (issue 413) - * Added run-time detection of SSL support (issue 484) - * Added more events support (issue 492, 712) - * Added support for disabling automatic proxy detection (issue 580) - * Provided page closing callback (issue 678) - * Added methods to access URL, frames URL, frame Content (issue 758) - * Added more cookies-related API (issue 761) - - Improvements - - * Refactored command-line options handling (issue 55) - * Improved the workflow for producing release builds (issue 599) - * Improved cookies API and implementation (issue 603, 761) - * Improved frame switching API (issue 654) - * Fixed iframe handling regression (issue 683) - * Fixed OS version number with Windows 8 and Mountain Lion (issue 684, 688) - * Fixed HAR navigation info in the netsniff example (issue 733) - * Fixed compile warnings with Visual Studio (issue 744) - * Removed hacks for static linking on Windows (issue 753) - * Added ICO image handling on Windows (issue 779) - * Fixed font antialiasing on Windows (issue 785) - * Improved Jasmine test runner for Jasmine 1.2 (issue 792) - -2012-07-22: Version 1.6.1 - - Bug fixes - - * Don't build the deploy in debug mode (issue 599) - * Fixed building on Windows (issue 424) - * Fixed remote inspector when building statically (issue 430) - -2012-06-20: Version 1.6.0 "Lavender" - - New features - - * Added support for passing arguments to WebPage's evaluate (issue 132) - * Added callbacks for JavaScript onConfirm and onPrompt (issue 133) - * Added stack trace when error occurs (issue 166) - * Added support for local storage path and quota (issue 300) - * Added initial support for cookies handling (issue 354) - * Added support for header footer when printing the page (issue 410, 512) - * Added headers support in the loading request (issue 452) - * Added support to render the web page as base64-encoded string (issue 547) - * Added hooks for navigation event (issue 562) - * Added command-line option to show debug messages (issue 575) - * Added support for the zoom factor for web page rendering (issue 579) - * Added crash reporter for Mac OS X and Linux, based on Google Breakpad (issue 576) - * Added 'os' object to the system module (issue 585) - * Added support for asynchronous evaluation (issue 593) - - Improvements - - * Fixed remote debugging to work on Mac OS X and Windows (issue 430) - * Fixed web server getting the dropped connection for empty response (issue 451) - * Fixed text rendered as boxes (squares) on headless Linux (issue 460) - * Updated Qt to version 4.8.2 (issue 495) - * Updated CoffeeScript compiler to version 1.3.3 (issue 496) - * Fixed the build script to detect and use MAKEFLAGS (issue 503) - * Fixed the build script to properly pass Qt config flags (issue 507) - * Changed Info.plist to be embedded in Mac OS X executable (issue 528) - * Fixed wrong module require in the imagebin example (issue 536) - * Fixed example scripts to exit with the right exit code (issue 544) - * Fixed build failure with glib 2.31.0+ (issue 559) - * Fixed error handler failures in some cases (issue 589) - * Fixed Twitter-related examples to work with the new site (issue 609) - -2012-03-20: Version 1.5.0 "Ghost Flower" - - New features - - * Added interactive mode, also known as REPL (issue 252) - * Added setting for web security, to allow cross domain XHR (issue 28) - * Added error handler for WebPage object (issue 166) - * Added support for custom HTTP header in the network request (issue 77) - * Added support for read write encoding in the file system module (issue 367) - * Added remote debugging support on Linux (issue 6) - * Added support for proxy authentication (issue 105) - * Added System module, to retrieve environment variables (issue 271) and arguments (issue 276) - * Added fs.readLink function (issue 329) - * Added support for reading and writing binary data (issue 400) - * Added support to retrieve request data in the WebServer? module (issue 340) - * Added support for individual top/bottom/left/right print margins (issue 388) - * Added command-line option --help (issue 347) - * Added short command-line options -v and -h (issue 408) - * Removed support for Flash and other plugins (issue 418) - - Bug fixes - - * Fixed multiple console.log arguments (issue 36) - * Fixed file upload (issue 307) - * Fixed the web server instance to be asynchronous (issue 326) and still support Keep Alive (issue 416) - * Workaround Qt 4.8.0 crash due to empty URL scheme (issue 365) - * Fixed a Content-Type problem where POST does not work (issue 337) - * Fixed reading body request in the web server even without specific Content-Type (issue 439) - * Fixed Jasmine test runner with Jasmine 1.1 (issue 402) - * Fixed request URL formatting in the web server (issue 437) - * Don't display debugging and warning messages (issue 323) - -2011-12-31: Version 1.4.1 - - Bug fixes - - * Fix setting the proxy type (issue 266) - * Workaround for file upload regression (issue 307) - * Fix extraneous messsages in non-debug mode (issue 323) - -2011-12-22: Version 1.4.0 "Glory of the Snow" - - New features - - * Added embedded HTTP server (issue 115) - * Added convenient build script for Linux (issue 197) - * Added support for SOCKS5 proxy (issue 266) - * Updated CoffeeScript compiler to version 1.2 (issue 312) - - Bug fixes - - * Fix potential crash in QUrl with Qt 4.8 (issue 304) - * Fix bug in CookieJar with QSettings and string (PyPhantomJS issue 10) - * Prevent showing the icon on Mac OS X Dock (issue 281) - - Examples - - * Added a new example to detect browsers sniffing (issue 263) - * Added HTTP server example (issue 115) - -2011-09-23: Version 1.3.0 "Water Lily" - - Bug fixes - - * Fixed open() and POST method, without specifying the finished handler - * Fixed script execution warning dialog (issue 165) - * Added WebPage.release() to free the web page from memory (issue 154) - * Added special handling of about:blank (issue 235) - * Made a separate network access manager for each page (issue 190) - - New features - - * Introduced file system API based on CommonJS Filesystem proposal (issue 129) - * Added support for persistent cookies (issue 91) - * Added event handling, currently only for mouse events (issue 234) - * Added page scroll position (issue 162) - * Added HTTP authentication support (issue 45) - * Added callback for page initialization (issue 143) - * Added support to specify script and output encoding (issue 186) - * Added option to allow local content to do cross-domain access (issue 28) - * Added support to apply configurations from a JSON file (issue 180) - * Added a convenient WebPage initialization construction (issue 206) - * Added option to limit the size of disk cache (issue 220) - - Examples - - * Added a new example on using Modernizr to detect features (issue 144) - * Fixed pizza.js example to use Mobile Yelp (issue 200) - * Fixed netsniff.coffee example due to wrong indentation (issue 225) - * Added an example to show live network traffic (issue 227) - * Added an example demonstrating different output encodings (issue 186) - -2011-06-21: Version 1.2.0 "Birds of Paradise" - - Version 1.2.0 is a major update. It introduces a whole set of new API. - - Bug fixes - - * Fixed rendering a very large web page (issue 54) - * Fixed reporting of CoffeeScript compile error (issue 125) - - New features - - * Added callback for console message (issue 12) - * Improved security model via WebPage object (issue 41) - * Added support for POST, HEAD, PUT, and DELETE (issue 88) - * Scripts filename is now passed as phantom.scriptName - * Added callback to capture resource requests and responses (issue 2) - * Added the ability to load external JavaScript (issue 32) - - Examples - - * Ported examples to use WebPage object - * Added a new example to upload an image to imagebin.org - * Added a new example to show HTTP POST feature - * Added a new example to sniff network traffic and save it in HAR format - - -2011-04-27: Version 1.1.0 "Cherry Blossom" - - Fixed the script loading to use UTF-8 encoding (Yasuhiro Matsumoto). - - Added check for system proxy setting (Yasuhiro Matsumoto). - - Fixed building with Cygwin and Qt 4.5 (John Dalton). - - Added a new example: driver for QUnit tests (Łukasz Korecki). - - Fixed issue #20: problem with JPG transparent color (Alessandro Portale). - - Fixed issue #9: ignore first line starting with #! (Matthias, aka fourplusone). - - Fixed issue #7: support for file upload for form submission (Matthias, aka fourplusone). - - Fixed issue #35: support for disabling images loading (Ariya Hidayat). - - Fixed issue #14: enable or disable plugins (Ariya Hidayat). - - Added a new example: using Canvas to produce the color wheel (Ariya Hidayat). - - Added support for rasterizing as GIF image (Ariya Hidayat). - - Added support for CoffeeScript (Ariya Hidayat). - - Fixed issue #19: option for setting the proxy (Clint Berry, Ariya Hidayat). - - Python implementation using PyQt (James Roe). - - Fixed issue #17: Specify paper size for PDF export (Alessandro Portale). - - Fixed issue #60: Win32 and OS/2 icon files (Salvador Parra Camacho). - - Added clipping rectangle to the render function (Wouter de Bie). - - Added an example on sychronous waiting (Gabor Torok). - - Added command line option to use disk cache (Jon Turner). - - Added text extracting example (Weston Ruter). - - Fixed issue #93: Build with Qt < 4.7 (Ariya Hidayat). - - Ported all examples to CoffeeScript (Robert Gieseke). - -2011-01-17: Version 1.0.0 - - Initial launch. - - The API is centralized at the 'phantom' object (as child of - window object) which has the properties: args, content, - loadStatus, state, userAgent, version, viewportSize, and - the following functions: exit, open, render, sleep. - - Several examples are included, among others: web page rasterizer, - weather service, headless test framework driver, and many others. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/LICENSE.BSD b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/LICENSE.BSD deleted file mode 100644 index d5dfdd1f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/LICENSE.BSD +++ /dev/null @@ -1,22 +0,0 @@ -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/README.md deleted file mode 100644 index 752d6fca..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/README.md +++ /dev/null @@ -1,45 +0,0 @@ -# [PhantomJS](http://phantomjs.org) - Scriptable Headless WebKit - -PhantomJS ([www.phantomjs.org](http://phantomjs.org)) is a headless WebKit scriptable with JavaScript or CoffeeScript. It is used by hundreds of [developers](https://github.com/ariya/phantomjs/wiki/Buzz) and dozens of [organizations](https://github.com/ariya/phantomjs/wiki/Users) for web-related development workflow. - -The latest [stable release](http://phantomjs.org/release-1.9.html) is version 1.9 (codenamed "Sakura"). Follow the official Twitter stream [@PhantomJS](http://twitter.com/PhantomJS) to get the frequent development updates. - -**Note**: Please **do not** create a GitHub pull request **without** reading the [Contribution Guide](https://github.com/ariya/phantomjs/blob/master/CONTRIBUTING.md) first. Failure to do so may result in the rejection of the pull request. - -## Use Cases - -- **Headless web testing**. Lightning-fast testing without the browser is now possible! Various [test frameworks](https://github.com/ariya/phantomjs/wiki/Headless-Testing) such as Jasmine, Capybara, QUnit, Mocha, WebDriver, YUI Test, BusterJS, FuncUnit, Robot Framework, and many others are supported. -- **Page automation**. [Access and manipulate](https://github.com/ariya/phantomjs/wiki/Page-Automation) web pages with the standard DOM API, or with usual libraries like jQuery. -- **Screen capture**. Programmatically [capture web contents](https://github.com/ariya/phantomjs/wiki/Screen-Capture), including CSs, SVG and Canvas. Build server-side web graphics apps, from a screenshot service to a vector chart rasterizer. -- **Network monitoring**. Automate performance analysis, track [page loading](https://github.com/ariya/phantomjs/wiki/Network-Monitoring) and export as standard HAR format. - -## Features - -- **Multiplatform**, available on major operating systems: Windows, Mac OS X, Linux, other Unices. -- **Fast and native implementation** of web standards: DOM, CSS, JavaScript, Canvas, SVG. No emulation! -- **Pure headless (no X11) on Linux**, ideal for continuous integration systems. Also runs on Amazon EC2, Heroku, Iron.io. -- **Easy to install**: [Download](http://phantomjs.org/download.html), unpack, and start having fun in just 5 minutes. - -## Ecosystem - -PhantomJS needs not be used only as a stand-alone tool. Check also some excellent related projects: - -- [CasperJS](http://casperjs.org) enables easy navigation scripting and common high-level testing. -- [Poltergeist](https://github.com/jonleighton/poltergeist) allows running Capybara tests headlessly. -- [Guard::Jasmine](https://github.com/netzpirat/guard-jasmine) automatically tests Jasmine specs on Rails when files are modified. -- [GhostDriver](http://github.com/detro/ghostdriver/) complements Selenium tests with a PhantomJS WebDriver implementation. -- [PhantomRobot](https://github.com/datakurre/phantomrobot) runs Robot Framework acceptance tests in the background via PhantomJS. -- [Mocha-PhantomJS](https://github.com/metaskills/mocha-phantomjs) run Mocha tests using PhantomJS. - -and many others [related projects](https://github.com/ariya/phantomjs/wiki/Related-Projects). - -## Questions? - -- Explore the complete [documentation](https://github.com/ariya/phantomjs/wiki) -- Read tons of [user articles](https://github.com/ariya/phantomjs/wiki/Buzz) on using PhantomJS. -- Join the [mailing-list](http://groups.google.com/group/phantomjs) and discuss with other PhantomJS fans. - -PhantomJS is free software/open source, and is distributed under the [BSD license](http://opensource.org/licenses/BSD-3-Clause). It contains third-party code, see the included `third-party.txt` file for the license information on third-party code. - -PhantomJS is created and maintained by [Ariya Hidayat](http://ariya.ofilabs.com/about) (Twitter: [@ariyahidayat](http://twitter.com/ariyahidayat)), with the help of [many contributors](https://github.com/ariya/phantomjs/contributors). - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs deleted file mode 100644 index 8f3991da..00000000 Binary files a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/bin/phantomjs and /dev/null differ diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/arguments.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/arguments.coffee deleted file mode 100644 index 95024393..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/arguments.coffee +++ /dev/null @@ -1,7 +0,0 @@ -system = require 'system' -if system.args.length is 1 - console.log 'Try to pass some args when invoking this script!' -else - for arg, i in system.args - console.log i + ': ' + arg -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/arguments.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/arguments.js deleted file mode 100644 index c6d1ee4c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/arguments.js +++ /dev/null @@ -1,9 +0,0 @@ -var system = require('system'); -if (system.args.length === 1) { - console.log('Try to pass some args when invoking this script!'); -} else { - system.args.forEach(function (arg, i) { - console.log(i + ': ' + arg); - }); -} -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/child_process-examples.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/child_process-examples.coffee deleted file mode 100644 index 47e9b507..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/child_process-examples.coffee +++ /dev/null @@ -1,20 +0,0 @@ -{spawn, execFile} = require "child_process" - -child = spawn "ls", ["-lF", "/rooot"] - -child.stdout.on "data", (data) -> - console.log "spawnSTDOUT:", JSON.stringify data - -child.stderr.on "data", (data) -> - console.log "spawnSTDERR:", JSON.stringify data - -child.on "exit", (code) -> - console.log "spawnEXIT:", code - -#child.kill "SIGKILL" - -execFile "ls", ["-lF", "/usr"], null, (err, stdout, stderr) -> - console.log "execFileSTDOUT:", JSON.stringify stdout - console.log "execFileSTDERR:", JSON.stringify stderr - -setTimeout (-> phantom.exit 0), 2000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/child_process-examples.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/child_process-examples.js deleted file mode 100644 index a4970d13..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/child_process-examples.js +++ /dev/null @@ -1,27 +0,0 @@ -var spawn = require("child_process").spawn -var execFile = require("child_process").execFile - -var child = spawn("ls", ["-lF", "/rooot"]) - -child.stdout.on("data", function (data) { - console.log("spawnSTDOUT:", JSON.stringify(data)) -}) - -child.stderr.on("data", function (data) { - console.log("spawnSTDERR:", JSON.stringify(data)) -}) - -child.on("exit", function (code) { - console.log("spawnEXIT:", code) -}) - -//child.kill("SIGKILL") - -execFile("ls", ["-lF", "/usr"], null, function (err, stdout, stderr) { - console.log("execFileSTDOUT:", JSON.stringify(stdout)) - console.log("execFileSTDERR:", JSON.stringify(stderr)) -}) - -setTimeout(function () { - phantom.exit(0) -}, 2000) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/colorwheel.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/colorwheel.coffee deleted file mode 100644 index 74866e1f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/colorwheel.coffee +++ /dev/null @@ -1,46 +0,0 @@ -page = require('webpage').create() - -page.viewportSize = { width: 400, height : 400 } -page.content = '' - -page.evaluate -> - el = document.getElementById 'surface' - context = el.getContext '2d' - width = window.innerWidth - height = window.innerHeight - cx = width / 2 - cy = height / 2 - radius = width / 2.3 - i = 0 - - el.width = width - el.height = height - imageData = context.createImageData(width, height) - pixels = imageData.data - - for y in [0...height] - for x in [0...width] - i = i + 4 - rx = x - cx - ry = y - cy - d = rx * rx + ry * ry - if d < radius * radius - hue = 6 * (Math.atan2(ry, rx) + Math.PI) / (2 * Math.PI) - sat = Math.sqrt(d) / radius - g = Math.floor(hue) - f = hue - g - u = 255 * (1 - sat) - v = 255 * (1 - sat * f) - w = 255 * (1 - sat * (1 - f)) - pixels[i] = [255, v, u, u, w, 255, 255][g] - pixels[i + 1] = [w, 255, 255, v, u, u, w][g] - pixels[i + 2] = [u, u, w, 255, 255, v, u][g] - pixels[i + 3] = 255 - - context.putImageData imageData, 0, 0 - document.body.style.backgroundColor = 'white' - document.body.style.margin = '0px' - -page.render('colorwheel.png') - -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/colorwheel.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/colorwheel.js deleted file mode 100644 index 44fb7bfa..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/colorwheel.js +++ /dev/null @@ -1,51 +0,0 @@ -var page = require('webpage').create(); -page.viewportSize = { width: 400, height : 400 }; -page.content = ''; -page.evaluate(function() { - var el = document.getElementById('surface'), - context = el.getContext('2d'), - width = window.innerWidth, - height = window.innerHeight, - cx = width / 2, - cy = height / 2, - radius = width / 2.3, - imageData, - pixels, - hue, sat, value, - i = 0, x, y, rx, ry, d, - f, g, p, u, v, w, rgb; - - el.width = width; - el.height = height; - imageData = context.createImageData(width, height); - pixels = imageData.data; - - for (y = 0; y < height; y = y + 1) { - for (x = 0; x < width; x = x + 1, i = i + 4) { - rx = x - cx; - ry = y - cy; - d = rx * rx + ry * ry; - if (d < radius * radius) { - hue = 6 * (Math.atan2(ry, rx) + Math.PI) / (2 * Math.PI); - sat = Math.sqrt(d) / radius; - g = Math.floor(hue); - f = hue - g; - u = 255 * (1 - sat); - v = 255 * (1 - sat * f); - w = 255 * (1 - sat * (1 - f)); - pixels[i] = [255, v, u, u, w, 255, 255][g]; - pixels[i + 1] = [w, 255, 255, v, u, u, w][g]; - pixels[i + 2] = [u, u, w, 255, 255, v, u][g]; - pixels[i + 3] = 255; - } - } - } - - context.putImageData(imageData, 0, 0); - document.body.style.backgroundColor = 'white'; - document.body.style.margin = '0px'; -}); - -page.render('colorwheel.png'); - -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/countdown.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/countdown.coffee deleted file mode 100644 index 821fc9fb..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/countdown.coffee +++ /dev/null @@ -1,8 +0,0 @@ -t = 10 -interval = setInterval -> - if t > 0 - console.log t-- - else - console.log 'BLAST OFF!' - phantom.exit() -, 1000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/countdown.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/countdown.js deleted file mode 100644 index 7f5e1565..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/countdown.js +++ /dev/null @@ -1,9 +0,0 @@ -var t = 10, - interval = setInterval(function(){ - if ( t > 0 ) { - console.log(t--); - } else { - console.log("BLAST OFF!"); - phantom.exit(); - } - }, 1000); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/detectsniff.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/detectsniff.coffee deleted file mode 100644 index b8d27198..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/detectsniff.coffee +++ /dev/null @@ -1,42 +0,0 @@ -page = require('webpage').create() -system = require 'system' - -page.onInitialized = -> - page.evaluate -> - userAgent = window.navigator.userAgent - platform = window.navigator.platform - window.navigator = - appCodeName: 'Mozilla' - appName: 'Netscape' - cookieEnabled: false - sniffed: false - - window.navigator.__defineGetter__ 'userAgent', -> - window.navigator.sniffed = true - userAgent - - window.navigator.__defineGetter__ 'platform', -> - window.navigator.sniffed = true - platform - -if system.args.length is 1 - console.log 'Usage: detectsniff.coffee ' - phantom.exit 1 -else - address = system.args[1] - console.log 'Checking ' + address + '...' - page.open address, (status) -> - if status isnt 'success' - console.log 'FAIL to load the address' - phantom.exit() - else - window.setTimeout -> - sniffed = page.evaluate(-> - navigator.sniffed - ) - if sniffed - console.log 'The page tried to sniff the user agent.' - else - console.log 'The page did not try to sniff the user agent.' - phantom.exit() - , 1500 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/detectsniff.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/detectsniff.js deleted file mode 100644 index e23c4103..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/detectsniff.js +++ /dev/null @@ -1,59 +0,0 @@ -// Detect if a web page sniffs the user agent or not. - -var page = require('webpage').create(), - system = require('system'), - sniffed, - address; - -page.onInitialized = function () { - page.evaluate(function () { - - (function () { - var userAgent = window.navigator.userAgent, - platform = window.navigator.platform; - - window.navigator = { - appCodeName: 'Mozilla', - appName: 'Netscape', - cookieEnabled: false, - sniffed: false - }; - - window.navigator.__defineGetter__('userAgent', function () { - window.navigator.sniffed = true; - return userAgent; - }); - - window.navigator.__defineGetter__('platform', function () { - window.navigator.sniffed = true; - return platform; - }); - })(); - }); -}; - -if (system.args.length === 1) { - console.log('Usage: detectsniff.js '); - phantom.exit(1); -} else { - address = system.args[1]; - console.log('Checking ' + address + '...'); - page.open(address, function (status) { - if (status !== 'success') { - console.log('FAIL to load the address'); - phantom.exit(); - } else { - window.setTimeout(function () { - sniffed = page.evaluate(function () { - return navigator.sniffed; - }); - if (sniffed) { - console.log('The page tried to sniff the user agent.'); - } else { - console.log('The page did not try to sniff the user agent.'); - } - phantom.exit(); - }, 1500); - } - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/direction.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/direction.coffee deleted file mode 100644 index 85a1cff6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/direction.coffee +++ /dev/null @@ -1,30 +0,0 @@ -# Get driving direction using Google Directions API. - -page = require('webpage').create() -system = require 'system' - -if system.args.length < 3 - console.log 'Usage: direction.coffee origin destination' - console.log 'Example: direction.coffee "San Diego" "Palo Alto"' - phantom.exit 1 -else - origin = system.args[1] - dest = system.args[2] - page.open encodeURI('http://maps.googleapis.com/maps/api/directions/xml?origin=' + origin + - '&destination=' + dest + '&units=imperial&mode=driving&sensor=false'), - (status) -> - if status isnt 'success' - console.log 'Unable to access network' - else - steps = page.content.match(/(.*)<\/html_instructions>/ig) - if not steps - console.log 'No data available for ' + origin + ' to ' + dest - else - for ins in steps - ins = ins.replace(/\</ig, '<').replace(/\>/ig, '>') - ins = ins.replace(/\
/g, '') - console.log(ins) - console.log '' - console.log page.content.match(/.*<\/copyrights>/ig).join('').replace(/<.*?>/g, '') - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/direction.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/direction.js deleted file mode 100644 index 77044e3f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/direction.js +++ /dev/null @@ -1,35 +0,0 @@ -// Get driving direction using Google Directions API. - -var page = require('webpage').create(), - system = require('system'), - origin, dest, steps; - -if (system.args.length < 3) { - console.log('Usage: direction.js origin destination'); - console.log('Example: direction.js "San Diego" "Palo Alto"'); - phantom.exit(1); -} else { - origin = system.args[1]; - dest = system.args[2]; - page.open(encodeURI('http://maps.googleapis.com/maps/api/directions/xml?origin=' + origin + - '&destination=' + dest + '&units=imperial&mode=driving&sensor=false'), function (status) { - if (status !== 'success') { - console.log('Unable to access network'); - } else { - steps = page.content.match(/(.*)<\/html_instructions>/ig); - if (steps == null) { - console.log('No data available for ' + origin + ' to ' + dest); - } else { - steps.forEach(function (ins) { - ins = ins.replace(/\</ig, '<').replace(/\>/ig, '>'); - ins = ins.replace(/\
/g, ''); - console.log(ins); - }); - console.log(''); - console.log(page.content.match(/.*<\/copyrights>/ig).join('').replace(/<.*?>/g, '')); - } - } - phantom.exit(); - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/echoToFile.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/echoToFile.coffee deleted file mode 100644 index e886f937..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/echoToFile.coffee +++ /dev/null @@ -1,19 +0,0 @@ -# echoToFile.coffee - Write in a given file all the parameters passed on the CLI -fs = require 'fs' -system = require 'system' - -if system.args.length < 3 - console.log "Usage: echoToFile.coffee DESTINATION_FILE " - phantom.exit 1 -else - content = "" - f = null - i = 2 - while i < system.args.length - content += system.args[i] + (if i == system.args.length - 1 then "" else " ") - ++i - try - fs.write system.args[1], content, "w" - catch e - console.log e - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/echoToFile.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/echoToFile.js deleted file mode 100644 index 924a703e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/echoToFile.js +++ /dev/null @@ -1,23 +0,0 @@ -// echoToFile.js - Write in a given file all the parameters passed on the CLI -var fs = require('fs'), - system = require('system'); - -if (system.args.length < 3) { - console.log("Usage: echoToFile.js DESTINATION_FILE "); - phantom.exit(1); -} else { - var content = '', - f = null, - i; - for ( i= 2; i < system.args.length; ++i ) { - content += system.args[i] + (i === system.args.length-1 ? '' : ' '); - } - - try { - fs.write(system.args[1], content, 'w'); - } catch(e) { - console.log(e); - } - - phantom.exit(); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/features.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/features.coffee deleted file mode 100644 index 829beeb4..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/features.coffee +++ /dev/null @@ -1,23 +0,0 @@ -feature = undefined -supported = [] -unsupported = [] -phantom.injectJs "modernizr.js" -console.log "Detected features (using Modernizr " + Modernizr._version + "):" -for feature of Modernizr - if Modernizr.hasOwnProperty(feature) - if feature[0] isnt "_" and typeof Modernizr[feature] isnt "function" and feature isnt "input" and feature isnt "inputtypes" - if Modernizr[feature] - supported.push feature - else - unsupported.push feature -console.log "" -console.log "Supported:" -supported.forEach (e) -> - console.log " " + e - -console.log "" -console.log "Not supported:" -unsupported.forEach (e) -> - console.log " " + e - -phantom.exit() \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/features.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/features.js deleted file mode 100644 index a60643c8..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/features.js +++ /dev/null @@ -1,30 +0,0 @@ -var feature, supported = [], unsupported = []; - -phantom.injectJs('modernizr.js'); -console.log('Detected features (using Modernizr ' + Modernizr._version + '):'); -for (feature in Modernizr) { - if (Modernizr.hasOwnProperty(feature)) { - if (feature[0] !== '_' && typeof Modernizr[feature] !== 'function' && - feature !== 'input' && feature !== 'inputtypes') { - if (Modernizr[feature]) { - supported.push(feature); - } else { - unsupported.push(feature); - } - } - } -} - -console.log(''); -console.log('Supported:'); -supported.forEach(function (e) { - console.log(' ' + e); -}); - -console.log(''); -console.log('Not supported:'); -unsupported.forEach(function (e) { - console.log(' ' + e); -}); -phantom.exit(); - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/fibo.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/fibo.coffee deleted file mode 100644 index d9f9178a..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/fibo.coffee +++ /dev/null @@ -1,8 +0,0 @@ -fibs = [0, 1] -f = -> - console.log fibs[fibs.length - 1] - fibs.push fibs[fibs.length - 1] + fibs[fibs.length - 2] - if fibs.length > 10 - window.clearInterval ticker - phantom.exit() -ticker = window.setInterval(f, 300) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/fibo.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/fibo.js deleted file mode 100644 index aa5d7ea0..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/fibo.js +++ /dev/null @@ -1,9 +0,0 @@ -var fibs = [0, 1]; -var ticker = window.setInterval(function () { - console.log(fibs[fibs.length - 1]); - fibs.push(fibs[fibs.length - 1] + fibs[fibs.length - 2]); - if (fibs.length > 10) { - window.clearInterval(ticker); - phantom.exit(); - } -}, 300); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/follow.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/follow.coffee deleted file mode 100644 index 4a7fbd4f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/follow.coffee +++ /dev/null @@ -1,33 +0,0 @@ -# List following and followers from several accounts - -users = [ - 'PhantomJS' - 'ariyahidayat' - 'detronizator' - 'KDABQt' - 'lfranchi' - 'jonleighton' - '_jamesmgreene' - 'Vitalliumm' - ] - -follow = (user, callback) -> - page = require('webpage').create() - page.open 'http://mobile.twitter.com/' + user, (status) -> - if status is 'fail' - console.log user + ': ?' - else - data = page.evaluate -> document.querySelector('div.profile td.stat.stat-last div.statnum').innerText; - console.log user + ': ' + data - page.close() - callback.apply() - -process = () -> - if (users.length > 0) - user = users[0] - users.splice(0, 1) - follow(user, process) - else - phantom.exit() - -process() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/follow.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/follow.js deleted file mode 100644 index 7d826f72..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/follow.js +++ /dev/null @@ -1,38 +0,0 @@ -// List following and followers from several accounts - -var users = ['PhantomJS', - 'ariyahidayat', - 'detronizator', - 'KDABQt', - 'lfranchi', - 'jonleighton', - '_jamesmgreene', - 'Vitalliumm']; - -function follow(user, callback) { - var page = require('webpage').create(); - page.open('http://mobile.twitter.com/' + user, function (status) { - if (status === 'fail') { - console.log(user + ': ?'); - } else { - var data = page.evaluate(function () { - return document.querySelector('div.profile td.stat.stat-last div.statnum').innerText; - }); - console.log(user + ': ' + data); - } - page.close(); - callback.apply(); - }); -} - -function process() { - if (users.length > 0) { - var user = users[0]; - users.splice(0, 1); - follow(user, process); - } else { - phantom.exit(); - } -} - -process(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/hello.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/hello.coffee deleted file mode 100644 index 1776a066..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/hello.coffee +++ /dev/null @@ -1,2 +0,0 @@ -console.log 'Hello, world!' -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/hello.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/hello.js deleted file mode 100644 index e273a974..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/hello.js +++ /dev/null @@ -1,2 +0,0 @@ -console.log('Hello, world!'); -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/imagebin.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/imagebin.coffee deleted file mode 100644 index fdd8455e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/imagebin.coffee +++ /dev/null @@ -1,20 +0,0 @@ -# Upload an image to imagebin.org - -page = require('webpage').create() -system = require 'system' - -if system.args.length isnt 2 - console.log 'Usage: imagebin.coffee filename' - phantom.exit 1 -else - fname = system.args[1] - page.open 'http://imagebin.org/index.php?page=add', -> - page.uploadFile 'input[name=image]', fname - page.evaluate -> - document.querySelector('input[name=nickname]').value = 'phantom' - document.querySelector('input[name=disclaimer_agree]').click() - document.querySelector('form').submit() - - window.setTimeout -> - phantom.exit() - , 3000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/imagebin.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/imagebin.js deleted file mode 100644 index 5446b928..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/imagebin.js +++ /dev/null @@ -1,23 +0,0 @@ -// Upload an image to imagebin.org - -var page = require('webpage').create(), - system = require('system'), - fname; - -if (system.args.length !== 2) { - console.log('Usage: imagebin.js filename'); - phantom.exit(1); -} else { - fname = system.args[1]; - page.open("http://imagebin.org/index.php?page=add", function () { - page.uploadFile('input[name=image]', fname); - page.evaluate(function () { - document.querySelector('input[name=nickname]').value = 'phantom'; - document.querySelector('input[name=disclaimer_agree]').click() - document.querySelector('form').submit(); - }); - window.setTimeout(function () { - phantom.exit(); - }, 3000); - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/injectme.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/injectme.coffee deleted file mode 100644 index ae4927d5..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/injectme.coffee +++ /dev/null @@ -1,23 +0,0 @@ -# Use 'page.injectJs()' to load the script itself in the Page context - -if phantom? - page = require('webpage').create() - - # Route "console.log()" calls from within the Page context to the main - # Phantom context (i.e. current "this") - page.onConsoleMessage = (msg) -> console.log(msg) - - page.onAlert = (msg) -> console.log(msg) - - console.log "* Script running in the Phantom context." - console.log "* Script will 'inject' itself in a page..." - page.open "about:blank", (status) -> - if status is "success" - if page.injectJs("injectme.coffee") - console.log "... done injecting itself!" - else - console.log "... fail! Check the $PWD?!" - phantom.exit() -else - alert "* Script running in the Page context." - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/injectme.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/injectme.js deleted file mode 100644 index d1f21b93..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/injectme.js +++ /dev/null @@ -1,25 +0,0 @@ -// Use 'page.injectJs()' to load the script itself in the Page context - -if ( typeof(phantom) !== "undefined" ) { - var page = require('webpage').create(); - - // Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") - page.onConsoleMessage = function(msg) { - console.log(msg); - }; - - page.onAlert = function(msg) { - console.log(msg); - }; - - console.log("* Script running in the Phantom context."); - console.log("* Script will 'inject' itself in a page..."); - page.open("about:blank", function(status) { - if ( status === "success" ) { - console.log(page.injectJs("injectme.js") ? "... done injecting itself!" : "... fail! Check the $PWD?!"); - } - phantom.exit(); - }); -} else { - alert("* Script running in the Page context."); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/ipgeocode.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/ipgeocode.coffee deleted file mode 100644 index d36d6aa9..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/ipgeocode.coffee +++ /dev/null @@ -1,13 +0,0 @@ -# Give the estimated location based on the IP address. - -window.cb = (data) -> - loc = data.city - if data.region_name.length > 0 - loc = loc + ', ' + data.region_name - console.log 'IP address: ' + data.ip - console.log 'Estimated location: ' + loc - phantom.exit() - -el = document.createElement 'script' -el.src = 'http://freegeoip.net/json/?callback=window.cb' -document.body.appendChild el diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/ipgeocode.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/ipgeocode.js deleted file mode 100644 index aff5a209..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/ipgeocode.js +++ /dev/null @@ -1,14 +0,0 @@ -// Give the estimated location based on the IP address. - -cb = function (data) { - var loc = data.city; - if (data.region_name.length > 0) - loc = loc + ', ' + data.region_name; - console.log('IP address: ' + data.ip); - console.log('Estimated location: ' + loc); - phantom.exit(); -}; - -var el = document.createElement('script'); -el.src = 'http://freegeoip.net/json/?callback=cb'; -document.body.appendChild(el); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadspeed.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadspeed.coffee deleted file mode 100644 index a4c6aa7e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadspeed.coffee +++ /dev/null @@ -1,18 +0,0 @@ -page = require('webpage').create() -system = require 'system' - -if system.args.length is 1 - console.log 'Usage: loadspeed.coffee ' - phantom.exit 1 -else - t = Date.now() - address = system.args[1] - page.open address, (status) -> - if status isnt 'success' - console.log('FAIL to load the address') - else - t = Date.now() - t - console.log('Page title is ' + page.evaluate( (-> document.title) )) - console.log('Loading time ' + t + ' msec') - phantom.exit() - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadspeed.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadspeed.js deleted file mode 100644 index a775e77f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadspeed.js +++ /dev/null @@ -1,23 +0,0 @@ -var page = require('webpage').create(), - system = require('system'), - t, address; - -if (system.args.length === 1) { - console.log('Usage: loadspeed.js '); - phantom.exit(1); -} else { - t = Date.now(); - address = system.args[1]; - page.open(address, function (status) { - if (status !== 'success') { - console.log('FAIL to load the address'); - } else { - t = Date.now() - t; - console.log('Page title is ' + page.evaluate(function () { - return document.title; - })); - console.log('Loading time ' + t + ' msec'); - } - phantom.exit(); - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadurlwithoutcss.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadurlwithoutcss.coffee deleted file mode 100644 index 36143c8d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadurlwithoutcss.coffee +++ /dev/null @@ -1,20 +0,0 @@ -page = require("webpage").create() -system = require("system") - -if system.args.length < 2 - console.log "Usage: loadurlwithoutcss.js URL" - phantom.exit() - -address = system.args[1] - -page.onResourceRequested = (requestData, request) -> - if (/http:\/\/.+?\.css/g).test(requestData["url"]) or requestData["Content-Type"] is "text/css" - console.log "The url of the request is matching. Aborting: " + requestData["url"] - request.abort() - -page.open address, (status) -> - if status is "success" - phantom.exit() - else - console.log "Unable to load the address!" - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadurlwithoutcss.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadurlwithoutcss.js deleted file mode 100644 index c7a4733d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/loadurlwithoutcss.js +++ /dev/null @@ -1,25 +0,0 @@ -var page = require('webpage').create(), - system = require('system'); - -if (system.args.length < 2) { - console.log('Usage: loadurlwithoutcss.js URL'); - phantom.exit(); -} - -var address = system.args[1]; - -page.onResourceRequested = function(requestData, request) { - if ((/http:\/\/.+?\.css/gi).test(requestData['url']) || requestData['Content-Type'] == 'text/css') { - console.log('The url of the request is matching. Aborting: ' + requestData['url']); - request.abort(); - } -}; - -page.open(address, function(status) { - if (status === 'success') { - phantom.exit(); - } else { - console.log('Unable to load the address!'); - phantom.exit(); - } -}); \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/modernizr.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/modernizr.js deleted file mode 100644 index f9e57c81..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/modernizr.js +++ /dev/null @@ -1,1116 +0,0 @@ -/*! - * Modernizr v2.0.6 - * http://www.modernizr.com - * - * Copyright (c) 2009-2011 Faruk Ates, Paul Irish, Alex Sexton - * Dual-licensed under the BSD or MIT licenses: www.modernizr.com/license/ - */ - -/* - * Modernizr tests which native CSS3 and HTML5 features are available in - * the current UA and makes the results available to you in two ways: - * as properties on a global Modernizr object, and as classes on the - * element. This information allows you to progressively enhance - * your pages with a granular level of control over the experience. - * - * Modernizr has an optional (not included) conditional resource loader - * called Modernizr.load(), based on Yepnope.js (yepnopejs.com). - * To get a build that includes Modernizr.load(), as well as choosing - * which tests to include, go to www.modernizr.com/download/ - * - * Authors Faruk Ates, Paul Irish, Alex Sexton, - * Contributors Ryan Seddon, Ben Alman - */ - -window.Modernizr = (function( window, document, undefined ) { - - var version = '2.0.6', - - Modernizr = {}, - - // option for enabling the HTML classes to be added - enableClasses = true, - - docElement = document.documentElement, - docHead = document.head || document.getElementsByTagName('head')[0], - - /** - * Create our "modernizr" element that we do most feature tests on. - */ - mod = 'modernizr', - modElem = document.createElement(mod), - mStyle = modElem.style, - - /** - * Create the input element for various Web Forms feature tests. - */ - inputElem = document.createElement('input'), - - smile = ':)', - - toString = Object.prototype.toString, - - // List of property values to set for css tests. See ticket #21 - prefixes = ' -webkit- -moz- -o- -ms- -khtml- '.split(' '), - - // Following spec is to expose vendor-specific style properties as: - // elem.style.WebkitBorderRadius - // and the following would be incorrect: - // elem.style.webkitBorderRadius - - // Webkit ghosts their properties in lowercase but Opera & Moz do not. - // Microsoft foregoes prefixes entirely <= IE8, but appears to - // use a lowercase `ms` instead of the correct `Ms` in IE9 - - // More here: http://github.com/Modernizr/Modernizr/issues/issue/21 - domPrefixes = 'Webkit Moz O ms Khtml'.split(' '), - - ns = {'svg': 'http://www.w3.org/2000/svg'}, - - tests = {}, - inputs = {}, - attrs = {}, - - classes = [], - - featureName, // used in testing loop - - - // Inject element with style element and some CSS rules - injectElementWithStyles = function( rule, callback, nodes, testnames ) { - - var style, ret, node, - div = document.createElement('div'); - - if ( parseInt(nodes, 10) ) { - // In order not to give false positives we create a node for each test - // This also allows the method to scale for unspecified uses - while ( nodes-- ) { - node = document.createElement('div'); - node.id = testnames ? testnames[nodes] : mod + (nodes + 1); - div.appendChild(node); - } - } - - // '].join(''); - div.id = mod; - div.innerHTML += style; - docElement.appendChild(div); - - ret = callback(div, rule); - div.parentNode.removeChild(div); - - return !!ret; - - }, - - - // adapted from matchMedia polyfill - // by Scott Jehl and Paul Irish - // gist.github.com/786768 - testMediaQuery = function( mq ) { - - if ( window.matchMedia ) { - return matchMedia(mq).matches; - } - - var bool; - - injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) { - bool = (window.getComputedStyle ? - getComputedStyle(node, null) : - node.currentStyle)['position'] == 'absolute'; - }); - - return bool; - - }, - - - /** - * isEventSupported determines if a given element supports the given event - * function from http://yura.thinkweb2.com/isEventSupported/ - */ - isEventSupported = (function() { - - var TAGNAMES = { - 'select': 'input', 'change': 'input', - 'submit': 'form', 'reset': 'form', - 'error': 'img', 'load': 'img', 'abort': 'img' - }; - - function isEventSupported( eventName, element ) { - - element = element || document.createElement(TAGNAMES[eventName] || 'div'); - eventName = 'on' + eventName; - - // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those - var isSupported = eventName in element; - - if ( !isSupported ) { - // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element - if ( !element.setAttribute ) { - element = document.createElement('div'); - } - if ( element.setAttribute && element.removeAttribute ) { - element.setAttribute(eventName, ''); - isSupported = is(element[eventName], 'function'); - - // If property was created, "remove it" (by setting value to `undefined`) - if ( !is(element[eventName], undefined) ) { - element[eventName] = undefined; - } - element.removeAttribute(eventName); - } - } - - element = null; - return isSupported; - } - return isEventSupported; - })(); - - // hasOwnProperty shim by kangax needed for Safari 2.0 support - var _hasOwnProperty = ({}).hasOwnProperty, hasOwnProperty; - if ( !is(_hasOwnProperty, undefined) && !is(_hasOwnProperty.call, undefined) ) { - hasOwnProperty = function (object, property) { - return _hasOwnProperty.call(object, property); - }; - } - else { - hasOwnProperty = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ - return ((property in object) && is(object.constructor.prototype[property], undefined)); - }; - } - - /** - * setCss applies given styles to the Modernizr DOM node. - */ - function setCss( str ) { - mStyle.cssText = str; - } - - /** - * setCssAll extrapolates all vendor-specific css strings. - */ - function setCssAll( str1, str2 ) { - return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); - } - - /** - * is returns a boolean for if typeof obj is exactly type. - */ - function is( obj, type ) { - return typeof obj === type; - } - - /** - * contains returns a boolean for if substr is found within str. - */ - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - /** - * testProps is a generic CSS / DOM property test; if a browser supports - * a certain property, it won't return undefined for it. - * A supported CSS property returns empty string when its not yet set. - */ - function testProps( props, prefixed ) { - for ( var i in props ) { - if ( mStyle[ props[i] ] !== undefined ) { - return prefixed == 'pfx' ? props[i] : true; - } - } - return false; - } - - /** - * testPropsAll tests a list of DOM properties we want to check against. - * We specify literally ALL possible (known and/or likely) properties on - * the element including the non-vendor prefixed one, for forward- - * compatibility. - */ - function testPropsAll( prop, prefixed ) { - - var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1), - props = (prop + ' ' + domPrefixes.join(ucProp + ' ') + ucProp).split(' '); - - return testProps(props, prefixed); - } - - /** - * testBundle tests a list of CSS features that require element and style injection. - * By bundling them together we can reduce the need to touch the DOM multiple times. - */ - /*>>testBundle*/ - var testBundle = (function( styles, tests ) { - var style = styles.join(''), - len = tests.length; - - injectElementWithStyles(style, function( node, rule ) { - var style = document.styleSheets[document.styleSheets.length - 1], - // IE8 will bork if you create a custom build that excludes both fontface and generatedcontent tests. - // So we check for cssRules and that there is a rule available - // More here: https://github.com/Modernizr/Modernizr/issues/288 & https://github.com/Modernizr/Modernizr/issues/293 - cssText = style.cssRules && style.cssRules[0] ? style.cssRules[0].cssText : style.cssText || "", - children = node.childNodes, hash = {}; - - while ( len-- ) { - hash[children[len].id] = children[len]; - } - - /*>>touch*/ Modernizr['touch'] = ('ontouchstart' in window) || hash['touch'].offsetTop === 9; /*>>touch*/ - /*>>csstransforms3d*/ Modernizr['csstransforms3d'] = hash['csstransforms3d'].offsetLeft === 9; /*>>csstransforms3d*/ - /*>>generatedcontent*/Modernizr['generatedcontent'] = hash['generatedcontent'].offsetHeight >= 1; /*>>generatedcontent*/ - /*>>fontface*/ Modernizr['fontface'] = /src/i.test(cssText) && - cssText.indexOf(rule.split(' ')[0]) === 0; /*>>fontface*/ - }, len, tests); - - })([ - // Pass in styles to be injected into document - /*>>fontface*/ '@font-face {font-family:"font";src:url("https://")}' /*>>fontface*/ - - /*>>touch*/ ,['@media (',prefixes.join('touch-enabled),('),mod,')', - '{#touch{top:9px;position:absolute}}'].join('') /*>>touch*/ - - /*>>csstransforms3d*/ ,['@media (',prefixes.join('transform-3d),('),mod,')', - '{#csstransforms3d{left:9px;position:absolute}}'].join('')/*>>csstransforms3d*/ - - /*>>generatedcontent*/,['#generatedcontent:after{content:"',smile,'";visibility:hidden}'].join('') /*>>generatedcontent*/ - ], - [ - /*>>fontface*/ 'fontface' /*>>fontface*/ - /*>>touch*/ ,'touch' /*>>touch*/ - /*>>csstransforms3d*/ ,'csstransforms3d' /*>>csstransforms3d*/ - /*>>generatedcontent*/,'generatedcontent' /*>>generatedcontent*/ - - ]);/*>>testBundle*/ - - - /** - * Tests - * ----- - */ - - tests['flexbox'] = function() { - /** - * setPrefixedValueCSS sets the property of a specified element - * adding vendor prefixes to the VALUE of the property. - * @param {Element} element - * @param {string} property The property name. This will not be prefixed. - * @param {string} value The value of the property. This WILL be prefixed. - * @param {string=} extra Additional CSS to append unmodified to the end of - * the CSS string. - */ - function setPrefixedValueCSS( element, property, value, extra ) { - property += ':'; - element.style.cssText = (property + prefixes.join(value + ';' + property)).slice(0, -property.length) + (extra || ''); - } - - /** - * setPrefixedPropertyCSS sets the property of a specified element - * adding vendor prefixes to the NAME of the property. - * @param {Element} element - * @param {string} property The property name. This WILL be prefixed. - * @param {string} value The value of the property. This will not be prefixed. - * @param {string=} extra Additional CSS to append unmodified to the end of - * the CSS string. - */ - function setPrefixedPropertyCSS( element, property, value, extra ) { - element.style.cssText = prefixes.join(property + ':' + value + ';') + (extra || ''); - } - - var c = document.createElement('div'), - elem = document.createElement('div'); - - setPrefixedValueCSS(c, 'display', 'box', 'width:42px;padding:0;'); - setPrefixedPropertyCSS(elem, 'box-flex', '1', 'width:10px;'); - - c.appendChild(elem); - docElement.appendChild(c); - - var ret = elem.offsetWidth === 42; - - c.removeChild(elem); - docElement.removeChild(c); - - return ret; - }; - - // On the S60 and BB Storm, getContext exists, but always returns undefined - // http://github.com/Modernizr/Modernizr/issues/issue/97/ - - tests['canvas'] = function() { - var elem = document.createElement('canvas'); - return !!(elem.getContext && elem.getContext('2d')); - }; - - tests['canvastext'] = function() { - return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')); - }; - - // This WebGL test may false positive. - // But really it's quite impossible to know whether webgl will succeed until after you create the context. - // You might have hardware that can support a 100x100 webgl canvas, but will not support a 1000x1000 webgl - // canvas. So this feature inference is weak, but intentionally so. - - // It is known to false positive in FF4 with certain hardware and the iPad 2. - - tests['webgl'] = function() { - return !!window.WebGLRenderingContext; - }; - - /* - * The Modernizr.touch test only indicates if the browser supports - * touch events, which does not necessarily reflect a touchscreen - * device, as evidenced by tablets running Windows 7 or, alas, - * the Palm Pre / WebOS (touch) phones. - * - * Additionally, Chrome (desktop) used to lie about its support on this, - * but that has since been rectified: http://crbug.com/36415 - * - * We also test for Firefox 4 Multitouch Support. - * - * For more info, see: http://modernizr.github.com/Modernizr/touch.html - */ - - tests['touch'] = function() { - return Modernizr['touch']; - }; - - /** - * geolocation tests for the new Geolocation API specification. - * This test is a standards compliant-only test; for more complete - * testing, including a Google Gears fallback, please see: - * http://code.google.com/p/geo-location-javascript/ - * or view a fallback solution using google's geo API: - * http://gist.github.com/366184 - */ - tests['geolocation'] = function() { - return !!navigator.geolocation; - }; - - // Per 1.6: - // This used to be Modernizr.crosswindowmessaging but the longer - // name has been deprecated in favor of a shorter and property-matching one. - // The old API is still available in 1.6, but as of 2.0 will throw a warning, - // and in the first release thereafter disappear entirely. - tests['postmessage'] = function() { - return !!window.postMessage; - }; - - // Web SQL database detection is tricky: - - // In chrome incognito mode, openDatabase is truthy, but using it will - // throw an exception: http://crbug.com/42380 - // We can create a dummy database, but there is no way to delete it afterwards. - - // Meanwhile, Safari users can get prompted on any database creation. - // If they do, any page with Modernizr will give them a prompt: - // http://github.com/Modernizr/Modernizr/issues/closed#issue/113 - - // We have chosen to allow the Chrome incognito false positive, so that Modernizr - // doesn't litter the web with these test databases. As a developer, you'll have - // to account for this gotcha yourself. - tests['websqldatabase'] = function() { - var result = !!window.openDatabase; - /* if (result){ - try { - result = !!openDatabase( mod + "testdb", "1.0", mod + "testdb", 2e4); - } catch(e) { - } - } */ - return result; - }; - - // Vendors had inconsistent prefixing with the experimental Indexed DB: - // - Webkit's implementation is accessible through webkitIndexedDB - // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB - // For speed, we don't test the legacy (and beta-only) indexedDB - tests['indexedDB'] = function() { - for ( var i = -1, len = domPrefixes.length; ++i < len; ){ - if ( window[domPrefixes[i].toLowerCase() + 'IndexedDB'] ){ - return true; - } - } - return !!window.indexedDB; - }; - - // documentMode logic from YUI to filter out IE8 Compat Mode - // which false positives. - tests['hashchange'] = function() { - return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7); - }; - - // Per 1.6: - // This used to be Modernizr.historymanagement but the longer - // name has been deprecated in favor of a shorter and property-matching one. - // The old API is still available in 1.6, but as of 2.0 will throw a warning, - // and in the first release thereafter disappear entirely. - tests['history'] = function() { - return !!(window.history && history.pushState); - }; - - tests['draganddrop'] = function() { - return isEventSupported('dragstart') && isEventSupported('drop'); - }; - - // Mozilla is targeting to land MozWebSocket for FF6 - // bugzil.la/659324 - tests['websockets'] = function() { - for ( var i = -1, len = domPrefixes.length; ++i < len; ){ - if ( window[domPrefixes[i] + 'WebSocket'] ){ - return true; - } - } - return 'WebSocket' in window; - }; - - - // http://css-tricks.com/rgba-browser-support/ - tests['rgba'] = function() { - // Set an rgba() color and check the returned value - - setCss('background-color:rgba(150,255,150,.5)'); - - return contains(mStyle.backgroundColor, 'rgba'); - }; - - tests['hsla'] = function() { - // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally, - // except IE9 who retains it as hsla - - setCss('background-color:hsla(120,40%,100%,.5)'); - - return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla'); - }; - - tests['multiplebgs'] = function() { - // Setting multiple images AND a color on the background shorthand property - // and then querying the style.background property value for the number of - // occurrences of "url(" is a reliable method for detecting ACTUAL support for this! - - setCss('background:url(https://),url(https://),red url(https://)'); - - // If the UA supports multiple backgrounds, there should be three occurrences - // of the string "url(" in the return value for elemStyle.background - - return /(url\s*\(.*?){3}/.test(mStyle.background); - }; - - - // In testing support for a given CSS property, it's legit to test: - // `elem.style[styleName] !== undefined` - // If the property is supported it will return an empty string, - // if unsupported it will return undefined. - - // We'll take advantage of this quick test and skip setting a style - // on our modernizr element, but instead just testing undefined vs - // empty string. - - - tests['backgroundsize'] = function() { - return testPropsAll('backgroundSize'); - }; - - tests['borderimage'] = function() { - return testPropsAll('borderImage'); - }; - - - // Super comprehensive table about all the unique implementations of - // border-radius: http://muddledramblings.com/table-of-css3-border-radius-compliance - - tests['borderradius'] = function() { - return testPropsAll('borderRadius'); - }; - - // WebOS unfortunately false positives on this test. - tests['boxshadow'] = function() { - return testPropsAll('boxShadow'); - }; - - // FF3.0 will false positive on this test - tests['textshadow'] = function() { - return document.createElement('div').style.textShadow === ''; - }; - - - tests['opacity'] = function() { - // Browsers that actually have CSS Opacity implemented have done so - // according to spec, which means their return values are within the - // range of [0.0,1.0] - including the leading zero. - - setCssAll('opacity:.55'); - - // The non-literal . in this regex is intentional: - // German Chrome returns this value as 0,55 - // https://github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632 - return /^0.55$/.test(mStyle.opacity); - }; - - - tests['cssanimations'] = function() { - return testPropsAll('animationName'); - }; - - - tests['csscolumns'] = function() { - return testPropsAll('columnCount'); - }; - - - tests['cssgradients'] = function() { - /** - * For CSS Gradients syntax, please see: - * http://webkit.org/blog/175/introducing-css-gradients/ - * https://developer.mozilla.org/en/CSS/-moz-linear-gradient - * https://developer.mozilla.org/en/CSS/-moz-radial-gradient - * http://dev.w3.org/csswg/css3-images/#gradients- - */ - - var str1 = 'background-image:', - str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));', - str3 = 'linear-gradient(left top,#9f9, white);'; - - setCss( - (str1 + prefixes.join(str2 + str1) + prefixes.join(str3 + str1)).slice(0, -str1.length) - ); - - return contains(mStyle.backgroundImage, 'gradient'); - }; - - - tests['cssreflections'] = function() { - return testPropsAll('boxReflect'); - }; - - - tests['csstransforms'] = function() { - return !!testProps(['transformProperty', 'WebkitTransform', 'MozTransform', 'OTransform', 'msTransform']); - }; - - - tests['csstransforms3d'] = function() { - - var ret = !!testProps(['perspectiveProperty', 'WebkitPerspective', 'MozPerspective', 'OPerspective', 'msPerspective']); - - // Webkit’s 3D transforms are passed off to the browser's own graphics renderer. - // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in - // some conditions. As a result, Webkit typically recognizes the syntax but - // will sometimes throw a false positive, thus we must do a more thorough check: - if ( ret && 'webkitPerspective' in docElement.style ) { - - // Webkit allows this media query to succeed only if the feature is enabled. - // `@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){ ... }` - ret = Modernizr['csstransforms3d']; - } - return ret; - }; - - - tests['csstransitions'] = function() { - return testPropsAll('transitionProperty'); - }; - - - /*>>fontface*/ - // @font-face detection routine by Diego Perini - // http://javascript.nwbox.com/CSSSupport/ - tests['fontface'] = function() { - return Modernizr['fontface']; - }; - /*>>fontface*/ - - // CSS generated content detection - tests['generatedcontent'] = function() { - return Modernizr['generatedcontent']; - }; - - - - // These tests evaluate support of the video/audio elements, as well as - // testing what types of content they support. - // - // We're using the Boolean constructor here, so that we can extend the value - // e.g. Modernizr.video // true - // Modernizr.video.ogg // 'probably' - // - // Codec values from : http://github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 - // thx to NielsLeenheer and zcorpan - - // Note: in FF 3.5.1 and 3.5.0, "no" was a return value instead of empty string. - // Modernizr does not normalize for that. - - tests['video'] = function() { - var elem = document.createElement('video'), - bool = false; - - // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 - try { - if ( bool = !!elem.canPlayType ) { - bool = new Boolean(bool); - bool.ogg = elem.canPlayType('video/ogg; codecs="theora"'); - - // Workaround required for IE9, which doesn't report video support without audio codec specified. - // bug 599718 @ msft connect - var h264 = 'video/mp4; codecs="avc1.42E01E'; - bool.h264 = elem.canPlayType(h264 + '"') || elem.canPlayType(h264 + ', mp4a.40.2"'); - - bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"'); - } - - } catch(e) { } - - return bool; - }; - - tests['audio'] = function() { - var elem = document.createElement('audio'), - bool = false; - - try { - if ( bool = !!elem.canPlayType ) { - bool = new Boolean(bool); - bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"'); - bool.mp3 = elem.canPlayType('audio/mpeg;'); - - // Mimetypes accepted: - // https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements - // http://bit.ly/iphoneoscodecs - bool.wav = elem.canPlayType('audio/wav; codecs="1"'); - bool.m4a = elem.canPlayType('audio/x-m4a;') || elem.canPlayType('audio/aac;'); - } - } catch(e) { } - - return bool; - }; - - - // Firefox has made these tests rather unfun. - - // In FF4, if disabled, window.localStorage should === null. - - // Normally, we could not test that directly and need to do a - // `('localStorage' in window) && ` test first because otherwise Firefox will - // throw http://bugzil.la/365772 if cookies are disabled - - // However, in Firefox 4 betas, if dom.storage.enabled == false, just mentioning - // the property will throw an exception. http://bugzil.la/599479 - // This looks to be fixed for FF4 Final. - - // Because we are forced to try/catch this, we'll go aggressive. - - // FWIW: IE8 Compat mode supports these features completely: - // http://www.quirksmode.org/dom/html5.html - // But IE8 doesn't support either with local files - - tests['localstorage'] = function() { - try { - return !!localStorage.getItem; - } catch(e) { - return false; - } - }; - - tests['sessionstorage'] = function() { - try { - return !!sessionStorage.getItem; - } catch(e){ - return false; - } - }; - - - tests['webworkers'] = function() { - return !!window.Worker; - }; - - - tests['applicationcache'] = function() { - return !!window.applicationCache; - }; - - - // Thanks to Erik Dahlstrom - tests['svg'] = function() { - return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect; - }; - - // specifically for SVG inline in HTML, not within XHTML - // test page: paulirish.com/demo/inline-svg - tests['inlinesvg'] = function() { - var div = document.createElement('div'); - div.innerHTML = ''; - return (div.firstChild && div.firstChild.namespaceURI) == ns.svg; - }; - - // Thanks to F1lt3r and lucideer, ticket #35 - tests['smil'] = function() { - return !!document.createElementNS && /SVG/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); - }; - - tests['svgclippaths'] = function() { - // Possibly returns a false positive in Safari 3.2? - return !!document.createElementNS && /SVG/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); - }; - - // input features and input types go directly onto the ret object, bypassing the tests loop. - // Hold this guy to execute in a moment. - function webforms() { - // Run through HTML5's new input attributes to see if the UA understands any. - // We're using f which is the element created early on - // Mike Taylr has created a comprehensive resource for testing these attributes - // when applied to all input types: - // http://miketaylr.com/code/input-type-attr.html - // spec: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary - - // Only input placeholder is tested while textarea's placeholder is not. - // Currently Safari 4 and Opera 11 have support only for the input placeholder - // Both tests are available in feature-detects/forms-placeholder.js - Modernizr['input'] = (function( props ) { - for ( var i = 0, len = props.length; i < len; i++ ) { - attrs[ props[i] ] = !!(props[i] in inputElem); - } - return attrs; - })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); - - // Run through HTML5's new input types to see if the UA understands any. - // This is put behind the tests runloop because it doesn't return a - // true/false like all the other tests; instead, it returns an object - // containing each input type with its corresponding true/false value - - // Big thanks to @miketaylr for the html5 forms expertise. http://miketaylr.com/ - Modernizr['inputtypes'] = (function(props) { - - for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) { - - inputElem.setAttribute('type', inputElemType = props[i]); - bool = inputElem.type !== 'text'; - - // We first check to see if the type we give it sticks.. - // If the type does, we feed it a textual value, which shouldn't be valid. - // If the value doesn't stick, we know there's input sanitization which infers a custom UI - if ( bool ) { - - inputElem.value = smile; - inputElem.style.cssText = 'position:absolute;visibility:hidden;'; - - if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) { - - docElement.appendChild(inputElem); - defaultView = document.defaultView; - - // Safari 2-4 allows the smiley as a value, despite making a slider - bool = defaultView.getComputedStyle && - defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && - // Mobile android web browser has false positive, so must - // check the height to see if the widget is actually there. - (inputElem.offsetHeight !== 0); - - docElement.removeChild(inputElem); - - } else if ( /^(search|tel)$/.test(inputElemType) ){ - // Spec doesnt define any special parsing or detectable UI - // behaviors so we pass these through as true - - // Interestingly, opera fails the earlier test, so it doesn't - // even make it here. - - } else if ( /^(url|email)$/.test(inputElemType) ) { - // Real url and email support comes with prebaked validation. - bool = inputElem.checkValidity && inputElem.checkValidity() === false; - - } else if ( /^color$/.test(inputElemType) ) { - // chuck into DOM and force reflow for Opera bug in 11.00 - // github.com/Modernizr/Modernizr/issues#issue/159 - docElement.appendChild(inputElem); - docElement.offsetWidth; - bool = inputElem.value != smile; - docElement.removeChild(inputElem); - - } else { - // If the upgraded input compontent rejects the :) text, we got a winner - bool = inputElem.value != smile; - } - } - - inputs[ props[i] ] = !!bool; - } - return inputs; - })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); - } - - - // End of test definitions - // ----------------------- - - - - // Run through all tests and detect their support in the current UA. - // todo: hypothetically we could be doing an array of tests and use a basic loop here. - for ( var feature in tests ) { - if ( hasOwnProperty(tests, feature) ) { - // run the test, throw the return value into the Modernizr, - // then based on that boolean, define an appropriate className - // and push it into an array of classes we'll join later. - featureName = feature.toLowerCase(); - Modernizr[featureName] = tests[feature](); - - classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); - } - } - - // input tests need to run. - Modernizr.input || webforms(); - - - /** - * addTest allows the user to define their own feature tests - * the result will be added onto the Modernizr object, - * as well as an appropriate className set on the html element - * - * @param feature - String naming the feature - * @param test - Function returning true if feature is supported, false if not - */ - Modernizr.addTest = function ( feature, test ) { - if ( typeof feature == "object" ) { - for ( var key in feature ) { - if ( hasOwnProperty( feature, key ) ) { - Modernizr.addTest( key, feature[ key ] ); - } - } - } else { - - feature = feature.toLowerCase(); - - if ( Modernizr[feature] !== undefined ) { - // we're going to quit if you're trying to overwrite an existing test - // if we were to allow it, we'd do this: - // var re = new RegExp("\\b(no-)?" + feature + "\\b"); - // docElement.className = docElement.className.replace( re, '' ); - // but, no rly, stuff 'em. - return; - } - - test = typeof test == "boolean" ? test : !!test(); - - docElement.className += ' ' + (test ? '' : 'no-') + feature; - Modernizr[feature] = test; - - } - - return Modernizr; // allow chaining. - }; - - - // Reset modElem.cssText to nothing to reduce memory footprint. - setCss(''); - modElem = inputElem = null; - - //>>BEGIN IEPP - // Enable HTML 5 elements for styling (and printing) in IE. - if ( window.attachEvent && (function(){ var elem = document.createElement('div'); - elem.innerHTML = ''; - return elem.childNodes.length !== 1; })() ) { - - // iepp v2 by @jon_neal & afarkas : github.com/aFarkas/iepp/ - (function(win, doc) { - win.iepp = win.iepp || {}; - var iepp = win.iepp, - elems = iepp.html5elements || 'abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video', - elemsArr = elems.split('|'), - elemsArrLen = elemsArr.length, - elemRegExp = new RegExp('(^|\\s)('+elems+')', 'gi'), - tagRegExp = new RegExp('<(\/*)('+elems+')', 'gi'), - filterReg = /^\s*[\{\}]\s*$/, - ruleRegExp = new RegExp('(^|[^\\n]*?\\s)('+elems+')([^\\n]*)({[\\n\\w\\W]*?})', 'gi'), - docFrag = doc.createDocumentFragment(), - html = doc.documentElement, - head = html.firstChild, - bodyElem = doc.createElement('body'), - styleElem = doc.createElement('style'), - printMedias = /print|all/, - body; - function shim(doc) { - var a = -1; - while (++a < elemsArrLen) - // Use createElement so IE allows HTML5-named elements in a document - doc.createElement(elemsArr[a]); - } - - iepp.getCSS = function(styleSheetList, mediaType) { - if(styleSheetList+'' === undefined){return '';} - var a = -1, - len = styleSheetList.length, - styleSheet, - cssTextArr = []; - while (++a < len) { - styleSheet = styleSheetList[a]; - //currently no test for disabled/alternate stylesheets - if(styleSheet.disabled){continue;} - mediaType = styleSheet.media || mediaType; - // Get css from all non-screen stylesheets and their imports - if (printMedias.test(mediaType)) cssTextArr.push(iepp.getCSS(styleSheet.imports, mediaType), styleSheet.cssText); - //reset mediaType to all with every new *not imported* stylesheet - mediaType = 'all'; - } - return cssTextArr.join(''); - }; - - iepp.parseCSS = function(cssText) { - var cssTextArr = [], - rule; - while ((rule = ruleRegExp.exec(cssText)) != null){ - // Replace all html5 element references with iepp substitute classnames - cssTextArr.push(( (filterReg.exec(rule[1]) ? '\n' : rule[1]) +rule[2]+rule[3]).replace(elemRegExp, '$1.iepp_$2')+rule[4]); - } - return cssTextArr.join('\n'); - }; - - iepp.writeHTML = function() { - var a = -1; - body = body || doc.body; - while (++a < elemsArrLen) { - var nodeList = doc.getElementsByTagName(elemsArr[a]), - nodeListLen = nodeList.length, - b = -1; - while (++b < nodeListLen) - if (nodeList[b].className.indexOf('iepp_') < 0) - // Append iepp substitute classnames to all html5 elements - nodeList[b].className += ' iepp_'+elemsArr[a]; - } - docFrag.appendChild(body); - html.appendChild(bodyElem); - // Write iepp substitute print-safe document - bodyElem.className = body.className; - bodyElem.id = body.id; - // Replace HTML5 elements with which is print-safe and shouldn't conflict since it isn't part of html5 - bodyElem.innerHTML = body.innerHTML.replace(tagRegExp, '<$1font'); - }; - - - iepp._beforePrint = function() { - // Write iepp custom print CSS - styleElem.styleSheet.cssText = iepp.parseCSS(iepp.getCSS(doc.styleSheets, 'all')); - iepp.writeHTML(); - }; - - iepp.restoreHTML = function(){ - // Undo everything done in onbeforeprint - bodyElem.innerHTML = ''; - html.removeChild(bodyElem); - html.appendChild(body); - }; - - iepp._afterPrint = function(){ - // Undo everything done in onbeforeprint - iepp.restoreHTML(); - styleElem.styleSheet.cssText = ''; - }; - - - - // Shim the document and iepp fragment - shim(doc); - shim(docFrag); - - // - if(iepp.disablePP){return;} - - // Add iepp custom print style element - head.insertBefore(styleElem, head.firstChild); - styleElem.media = 'print'; - styleElem.className = 'iepp-printshim'; - win.attachEvent( - 'onbeforeprint', - iepp._beforePrint - ); - win.attachEvent( - 'onafterprint', - iepp._afterPrint - ); - })(window, document); - } - //>>END IEPP - - // Assign private properties to the return object with prefix - Modernizr._version = version; - - // expose these for the plugin API. Look in the source for how to join() them against your input - Modernizr._prefixes = prefixes; - Modernizr._domPrefixes = domPrefixes; - - // Modernizr.mq tests a given media query, live against the current state of the window - // A few important notes: - // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false - // * A max-width or orientation query will be evaluated against the current state, which may change later. - // * You must specify values. Eg. If you are testing support for the min-width media query use: - // Modernizr.mq('(min-width:0)') - // usage: - // Modernizr.mq('only screen and (max-width:768)') - Modernizr.mq = testMediaQuery; - - // Modernizr.hasEvent() detects support for a given event, with an optional element to test on - // Modernizr.hasEvent('gesturestart', elem) - Modernizr.hasEvent = isEventSupported; - - // Modernizr.testProp() investigates whether a given style property is recognized - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testProp('pointerEvents') - Modernizr.testProp = function(prop){ - return testProps([prop]); - }; - - // Modernizr.testAllProps() investigates whether a given style property, - // or any of its vendor-prefixed variants, is recognized - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testAllProps('boxSizing') - Modernizr.testAllProps = testPropsAll; - - - - // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards - // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... }) - Modernizr.testStyles = injectElementWithStyles; - - - // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input - // Modernizr.prefixed('boxSizing') // 'MozBoxSizing' - - // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style. - // Return values will also be the camelCase variant, if you need to translate that to hypenated style use: - // - // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); - - // If you're trying to ascertain which transition end event to bind to, you might do something like... - // - // var transEndEventNames = { - // 'WebkitTransition' : 'webkitTransitionEnd', - // 'MozTransition' : 'transitionend', - // 'OTransition' : 'oTransitionEnd', - // 'msTransition' : 'msTransitionEnd', // maybe? - // 'transition' : 'transitionEnd' - // }, - // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; - - Modernizr.prefixed = function(prop){ - return testPropsAll(prop, 'pfx'); - }; - - - - // Remove "no-js" class from element, if it exists: - docElement.className = docElement.className.replace(/\bno-js\b/, '') - - // Add the new classes to the element. - + (enableClasses ? ' js ' + classes.join(' ') : ''); - - return Modernizr; - -})(this, this.document); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/module.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/module.coffee deleted file mode 100644 index 5278b513..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/module.coffee +++ /dev/null @@ -1,4 +0,0 @@ -universe = require './universe' -universe.start() -console.log 'The answer is' + universe.answer -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/module.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/module.js deleted file mode 100644 index 82e1c64d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/module.js +++ /dev/null @@ -1,4 +0,0 @@ -var universe = require('./universe'); -universe.start(); -console.log('The answer is' + universe.answer); -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/movies.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/movies.coffee deleted file mode 100644 index 86fb5b0c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/movies.coffee +++ /dev/null @@ -1,13 +0,0 @@ -# List movies from kids-in-mind.com - -window.cbfunc = (data) -> - globaldata = data - list = data.query.results.movie - for item in list - console.log item.title + ' [' + item.rating.MPAA.content + ']' - phantom.exit() - -el = document.createElement 'script' -el.src = -"http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20movies.kids-in-mind&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=window.cbfunc" -document.body.appendChild el diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/movies.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/movies.js deleted file mode 100644 index 73c61a7e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/movies.js +++ /dev/null @@ -1,14 +0,0 @@ -// List movies from kids-in-mind.com - -var cbfunc = function (data) { - globaldata= data; - var list = data.query.results.movie; - list.forEach(function (item) { - console.log(item.title + ' [' + item.rating.MPAA.content + ']'); - }); - phantom.exit(); -}; - -var el = document.createElement('script'); -el.src = 'http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20movies.kids-in-mind&format=json&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=cbfunc'; -document.body.appendChild(el); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netlog.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netlog.coffee deleted file mode 100644 index d6e5c352..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netlog.coffee +++ /dev/null @@ -1,18 +0,0 @@ -page = require('webpage').create() -system = require 'system' - -if system.args.length is 1 - console.log 'Usage: netlog.coffee ' - phantom.exit 1 -else - address = system.args[1] - page.onResourceRequested = (req) -> - console.log 'requested ' + JSON.stringify(req, undefined, 4) - - page.onResourceReceived = (res) -> - console.log 'received ' + JSON.stringify(res, undefined, 4) - - page.open address, (status) -> - if status isnt 'success' - console.log 'FAIL to load the address' - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netlog.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netlog.js deleted file mode 100644 index 4f83f4d7..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netlog.js +++ /dev/null @@ -1,25 +0,0 @@ -var page = require('webpage').create(), - system = require('system'), - address; - -if (system.args.length === 1) { - console.log('Usage: netlog.js '); - phantom.exit(1); -} else { - address = system.args[1]; - - page.onResourceRequested = function (req) { - console.log('requested: ' + JSON.stringify(req, undefined, 4)); - }; - - page.onResourceReceived = function (res) { - console.log('received: ' + JSON.stringify(res, undefined, 4)); - }; - - page.open(address, function (status) { - if (status !== 'success') { - console.log('FAIL to load the address'); - } - phantom.exit(); - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netsniff.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netsniff.coffee deleted file mode 100644 index 092f2d20..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netsniff.coffee +++ /dev/null @@ -1,114 +0,0 @@ -if not Date::toISOString - Date::toISOString = -> - pad = (n) -> - if n < 10 then '0' + n else n - ms = (n) -> - if n < 10 then '00' + n else (if n < 100 then '0' + n else n) - @getFullYear() + '-' + - pad(@getMonth() + 1) + '-' + - pad(@getDate()) + 'T' + - pad(@getHours()) + ':' + - pad(@getMinutes()) + ':' + - pad(@getSeconds()) + '.' + - ms(@getMilliseconds()) + 'Z' - -createHAR = (address, title, startTime, resources) -> - entries = [] - - resources.forEach (resource) -> - request = resource.request - startReply = resource.startReply - endReply = resource.endReply - - if not request or not startReply or not endReply - return - - entries.push - startedDateTime: request.time.toISOString() - time: endReply.time - request.time - request: - method: request.method - url: request.url - httpVersion: 'HTTP/1.1' - cookies: [] - headers: request.headers - queryString: [] - headersSize: -1 - bodySize: -1 - - response: - status: endReply.status - statusText: endReply.statusText - httpVersion: 'HTTP/1.1' - cookies: [] - headers: endReply.headers - redirectURL: '' - headersSize: -1 - bodySize: startReply.bodySize - content: - size: startReply.bodySize - mimeType: endReply.contentType - - cache: {} - timings: - blocked: 0 - dns: -1 - connect: -1 - send: 0 - wait: startReply.time - request.time - receive: endReply.time - startReply.time - ssl: -1 - pageref: address - - log: - version: '1.2' - creator: - name: 'PhantomJS' - version: phantom.version.major + '.' + phantom.version.minor + '.' + phantom.version.patch - - pages: [ - startedDateTime: startTime.toISOString() - id: address - title: title - pageTimings: - onLoad: page.endTime - page.startTime - ] - entries: entries - -page = require('webpage').create() -system = require 'system' - -if system.args.length is 1 - console.log 'Usage: netsniff.coffee ' - phantom.exit 1 -else - page.address = system.args[1] - page.resources = [] - - page.onLoadStarted = -> - page.startTime = new Date() - - page.onResourceRequested = (req) -> - page.resources[req.id] = - request: req - startReply: null - endReply: null - - page.onResourceReceived = (res) -> - if res.stage is 'start' - page.resources[res.id].startReply = res - if res.stage is 'end' - page.resources[res.id].endReply = res - - page.open page.address, (status) -> - if status isnt 'success' - console.log 'FAIL to load the address' - phantom.exit(1) - else - page.endTime = new Date() - page.title = page.evaluate -> - document.title - - har = createHAR page.address, page.title, page.startTime, page.resources - console.log JSON.stringify har, undefined, 4 - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netsniff.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netsniff.js deleted file mode 100644 index b702543e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/netsniff.js +++ /dev/null @@ -1,143 +0,0 @@ -if (!Date.prototype.toISOString) { - Date.prototype.toISOString = function () { - function pad(n) { return n < 10 ? '0' + n : n; } - function ms(n) { return n < 10 ? '00'+ n : n < 100 ? '0' + n : n } - return this.getFullYear() + '-' + - pad(this.getMonth() + 1) + '-' + - pad(this.getDate()) + 'T' + - pad(this.getHours()) + ':' + - pad(this.getMinutes()) + ':' + - pad(this.getSeconds()) + '.' + - ms(this.getMilliseconds()) + 'Z'; - } -} - -function createHAR(address, title, startTime, resources) -{ - var entries = []; - - resources.forEach(function (resource) { - var request = resource.request, - startReply = resource.startReply, - endReply = resource.endReply; - - if (!request || !startReply || !endReply) { - return; - } - - // Exclude Data URI from HAR file because - // they aren't included in specification - if (request.url.match(/(^data:image\/.*)/i)) { - return; - } - - entries.push({ - startedDateTime: request.time.toISOString(), - time: endReply.time - request.time, - request: { - method: request.method, - url: request.url, - httpVersion: "HTTP/1.1", - cookies: [], - headers: request.headers, - queryString: [], - headersSize: -1, - bodySize: -1 - }, - response: { - status: endReply.status, - statusText: endReply.statusText, - httpVersion: "HTTP/1.1", - cookies: [], - headers: endReply.headers, - redirectURL: "", - headersSize: -1, - bodySize: startReply.bodySize, - content: { - size: startReply.bodySize, - mimeType: endReply.contentType - } - }, - cache: {}, - timings: { - blocked: 0, - dns: -1, - connect: -1, - send: 0, - wait: startReply.time - request.time, - receive: endReply.time - startReply.time, - ssl: -1 - }, - pageref: address - }); - }); - - return { - log: { - version: '1.2', - creator: { - name: "PhantomJS", - version: phantom.version.major + '.' + phantom.version.minor + - '.' + phantom.version.patch - }, - pages: [{ - startedDateTime: startTime.toISOString(), - id: address, - title: title, - pageTimings: { - onLoad: page.endTime - page.startTime - } - }], - entries: entries - } - }; -} - -var page = require('webpage').create(), - system = require('system'); - -if (system.args.length === 1) { - console.log('Usage: netsniff.js '); - phantom.exit(1); -} else { - - page.address = system.args[1]; - page.resources = []; - - page.onLoadStarted = function () { - page.startTime = new Date(); - }; - - page.onResourceRequested = function (req) { - page.resources[req.id] = { - request: req, - startReply: null, - endReply: null - }; - }; - - page.onResourceReceived = function (res) { - if (res.stage === 'start') { - page.resources[res.id].startReply = res; - } - if (res.stage === 'end') { - page.resources[res.id].endReply = res; - } - }; - - page.open(page.address, function (status) { - var har; - if (status !== 'success') { - console.log('FAIL to load the address'); - phantom.exit(1); - } else { - page.endTime = new Date(); - page.title = page.evaluate(function () { - return document.title; - }); - har = createHAR(page.address, page.title, page.startTime, page.resources); - console.log(JSON.stringify(har, undefined, 4)); - phantom.exit(); - } - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/outputEncoding.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/outputEncoding.coffee deleted file mode 100644 index 9d212caf..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/outputEncoding.coffee +++ /dev/null @@ -1,12 +0,0 @@ -helloWorld = () -> console.log phantom.outputEncoding + ": こんにちは、世界!" - -console.log "Using default encoding..." -helloWorld() - -console.log "\nUsing other encodings..." -for enc in ["euc-jp", "sjis", "utf8", "System"] - do (enc) -> - phantom.outputEncoding = enc - helloWorld() - -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js deleted file mode 100644 index 968a6ee2..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/outputEncoding.js +++ /dev/null @@ -1,16 +0,0 @@ -function helloWorld() { - console.log(phantom.outputEncoding + ": こんにちは、世界!"); -} - -console.log("Using default encoding..."); -helloWorld(); - -console.log("\nUsing other encodings..."); - -var encodings = ["euc-jp", "sjis", "utf8", "System"]; -for (var i = 0; i < encodings.length; i++) { - phantom.outputEncoding = encodings[i]; - helloWorld(); -} - -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/page_events.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/page_events.coffee deleted file mode 100644 index 87e433b0..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/page_events.coffee +++ /dev/null @@ -1,132 +0,0 @@ -# The purpose of this is to show how and when events fire, considering 5 steps -# happening as follows: -# -# 1. Load URL -# 2. Load same URL, but adding an internal FRAGMENT to it -# 3. Click on an internal Link, that points to another internal FRAGMENT -# 4. Click on an external Link, that will send the page somewhere else -# 5. Close page -# -# Take particular care when going through the output, to understand when -# things happen (and in which order). Particularly, notice what DOESN'T -# happen during step 3. -# -# If invoked with "-v" it will print out the Page Resources as they are -# Requested and Received. -# -# NOTE.1: The "onConsoleMessage/onAlert/onPrompt/onConfirm" events are -# registered but not used here. This is left for you to have fun with. -# NOTE.2: This script is not here to teach you ANY JavaScript. It's aweful! -# NOTE.3: Main audience for this are people new to PhantomJS. -printArgs = -> - i = undefined - ilen = undefined - i = 0 - ilen = arguments_.length - - while i < ilen - console.log " arguments[" + i + "] = " + JSON.stringify(arguments_[i]) - ++i - console.log "" -sys = require("system") -page = require("webpage").create() -logResources = false -step1url = "http://en.wikipedia.org/wiki/DOM_events" -step2url = "http://en.wikipedia.org/wiki/DOM_events#Event_flow" -logResources = true if sys.args.length > 1 and sys.args[1] is "-v" - -#////////////////////////////////////////////////////////////////////////////// -page.onInitialized = -> - console.log "page.onInitialized" - printArgs.apply this, arguments_ - -page.onLoadStarted = -> - console.log "page.onLoadStarted" - printArgs.apply this, arguments_ - -page.onLoadFinished = -> - console.log "page.onLoadFinished" - printArgs.apply this, arguments_ - -page.onUrlChanged = -> - console.log "page.onUrlChanged" - printArgs.apply this, arguments_ - -page.onNavigationRequested = -> - console.log "page.onNavigationRequested" - printArgs.apply this, arguments_ - -if logResources is true - page.onResourceRequested = -> - console.log "page.onResourceRequested" - printArgs.apply this, arguments_ - - page.onResourceReceived = -> - console.log "page.onResourceReceived" - printArgs.apply this, arguments_ -page.onClosing = -> - console.log "page.onClosing" - printArgs.apply this, arguments_ - - -# window.console.log(msg); -page.onConsoleMessage = -> - console.log "page.onConsoleMessage" - printArgs.apply this, arguments_ - - -# window.alert(msg); -page.onAlert = -> - console.log "page.onAlert" - printArgs.apply this, arguments_ - - -# var confirmed = window.confirm(msg); -page.onConfirm = -> - console.log "page.onConfirm" - printArgs.apply this, arguments_ - - -# var user_value = window.prompt(msg, default_value); -page.onPrompt = -> - console.log "page.onPrompt" - printArgs.apply this, arguments_ - - -#////////////////////////////////////////////////////////////////////////////// -setTimeout (-> - console.log "" - console.log "### STEP 1: Load '" + step1url + "'" - page.open step1url -), 0 -setTimeout (-> - console.log "" - console.log "### STEP 2: Load '" + step2url + "' (load same URL plus FRAGMENT)" - page.open step2url -), 5000 -setTimeout (-> - console.log "" - console.log "### STEP 3: Click on page internal link (aka FRAGMENT)" - page.evaluate -> - ev = document.createEvent("MouseEvents") - ev.initEvent "click", true, true - document.querySelector("a[href='#Event_object']").dispatchEvent ev - -), 10000 -setTimeout (-> - console.log "" - console.log "### STEP 4: Click on page external link" - page.evaluate -> - ev = document.createEvent("MouseEvents") - ev.initEvent "click", true, true - document.querySelector("a[title='JavaScript']").dispatchEvent ev - -), 15000 -setTimeout (-> - console.log "" - console.log "### STEP 5: Close page and shutdown (with a delay)" - page.close() - setTimeout (-> - phantom.exit() - ), 100 -), 20000 \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/page_events.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/page_events.js deleted file mode 100644 index 266b4048..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/page_events.js +++ /dev/null @@ -1,142 +0,0 @@ -// The purpose of this is to show how and when events fire, considering 5 steps -// happening as follows: -// -// 1. Load URL -// 2. Load same URL, but adding an internal FRAGMENT to it -// 3. Click on an internal Link, that points to another internal FRAGMENT -// 4. Click on an external Link, that will send the page somewhere else -// 5. Close page -// -// Take particular care when going through the output, to understand when -// things happen (and in which order). Particularly, notice what DOESN'T -// happen during step 3. -// -// If invoked with "-v" it will print out the Page Resources as they are -// Requested and Received. -// -// NOTE.1: The "onConsoleMessage/onAlert/onPrompt/onConfirm" events are -// registered but not used here. This is left for you to have fun with. -// NOTE.2: This script is not here to teach you ANY JavaScript. It's aweful! -// NOTE.3: Main audience for this are people new to PhantomJS. - -var sys = require("system"), - page = require("webpage").create(), - logResources = false, - step1url = "http://en.wikipedia.org/wiki/DOM_events", - step2url = "http://en.wikipedia.org/wiki/DOM_events#Event_flow"; - -if (sys.args.length > 1 && sys.args[1] === "-v") { - logResources = true; -} - -function printArgs() { - var i, ilen; - for (i = 0, ilen = arguments.length; i < ilen; ++i) { - console.log(" arguments[" + i + "] = " + JSON.stringify(arguments[i])); - } - console.log(""); -} - -//////////////////////////////////////////////////////////////////////////////// - -page.onInitialized = function() { - console.log("page.onInitialized"); - printArgs.apply(this, arguments); -}; -page.onLoadStarted = function() { - console.log("page.onLoadStarted"); - printArgs.apply(this, arguments); -}; -page.onLoadFinished = function() { - console.log("page.onLoadFinished"); - printArgs.apply(this, arguments); -}; -page.onUrlChanged = function() { - console.log("page.onUrlChanged"); - printArgs.apply(this, arguments); -}; -page.onNavigationRequested = function() { - console.log("page.onNavigationRequested"); - printArgs.apply(this, arguments); -}; - -if (logResources === true) { - page.onResourceRequested = function() { - console.log("page.onResourceRequested"); - printArgs.apply(this, arguments); - }; - page.onResourceReceived = function() { - console.log("page.onResourceReceived"); - printArgs.apply(this, arguments); - }; -} - -page.onClosing = function() { - console.log("page.onClosing"); - printArgs.apply(this, arguments); -}; - -// window.console.log(msg); -page.onConsoleMessage = function() { - console.log("page.onConsoleMessage"); - printArgs.apply(this, arguments); -}; - -// window.alert(msg); -page.onAlert = function() { - console.log("page.onAlert"); - printArgs.apply(this, arguments); -}; -// var confirmed = window.confirm(msg); -page.onConfirm = function() { - console.log("page.onConfirm"); - printArgs.apply(this, arguments); -}; -// var user_value = window.prompt(msg, default_value); -page.onPrompt = function() { - console.log("page.onPrompt"); - printArgs.apply(this, arguments); -}; - -//////////////////////////////////////////////////////////////////////////////// - -setTimeout(function() { - console.log(""); - console.log("### STEP 1: Load '" + step1url + "'"); - page.open(step1url); -}, 0); - -setTimeout(function() { - console.log(""); - console.log("### STEP 2: Load '" + step2url + "' (load same URL plus FRAGMENT)"); - page.open(step2url); -}, 5000); - -setTimeout(function() { - console.log(""); - console.log("### STEP 3: Click on page internal link (aka FRAGMENT)"); - page.evaluate(function() { - var ev = document.createEvent("MouseEvents"); - ev.initEvent("click", true, true); - document.querySelector("a[href='#Event_object']").dispatchEvent(ev); - }); -}, 10000); - -setTimeout(function() { - console.log(""); - console.log("### STEP 4: Click on page external link"); - page.evaluate(function() { - var ev = document.createEvent("MouseEvents"); - ev.initEvent("click", true, true); - document.querySelector("a[title='JavaScript']").dispatchEvent(ev); - }); -}, 15000); - -setTimeout(function() { - console.log(""); - console.log("### STEP 5: Close page and shutdown (with a delay)"); - page.close(); - setTimeout(function(){ - phantom.exit(); - }, 100); -}, 20000); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pagecallback.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pagecallback.coffee deleted file mode 100644 index 1af7a792..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pagecallback.coffee +++ /dev/null @@ -1,16 +0,0 @@ -p = require("webpage").create() - -p.onConsoleMessage = (msg) -> - console.log msg - -# Calls to "callPhantom" within the page 'p' arrive here -p.onCallback = (msg) -> - console.log "Received by the 'phantom' main context: " + msg - "Hello there, I'm coming to you from the 'phantom' context instead" - -p.evaluate -> - # Return-value of the "onCallback" handler arrive here - callbackResponse = window.callPhantom "Hello, I'm coming to you from the 'page' context" - console.log "Received by the 'page' context: " + callbackResponse - -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pagecallback.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pagecallback.js deleted file mode 100644 index 20c13b65..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pagecallback.js +++ /dev/null @@ -1,17 +0,0 @@ -var p = require("webpage").create(); - -p.onConsoleMessage = function(msg) { console.log(msg); }; - -// Calls to "callPhantom" within the page 'p' arrive here -p.onCallback = function(msg) { - console.log("Received by the 'phantom' main context: "+msg); - return "Hello there, I'm coming to you from the 'phantom' context instead"; -}; - -p.evaluate(function() { - // Return-value of the "onCallback" handler arrive here - var callbackResponse = window.callPhantom("Hello, I'm coming to you from the 'page' context"); - console.log("Received by the 'page' context: "+callbackResponse); -}); - -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee deleted file mode 100644 index 0c89ca78..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.coffee +++ /dev/null @@ -1,13 +0,0 @@ -# Read the Phantom webpage '#intro' element text using jQuery and "includeJs" - -page = require('webpage').create() - -page.onConsoleMessage = (msg) -> console.log msg - -page.open "http://www.phantomjs.org", (status) -> - if status is "success" - page.includeJs "http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", -> - page.evaluate -> - console.log "$(\"#intro\").text() -> " + $("#intro").text() - phantom.exit() - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.js deleted file mode 100644 index 6bf5a9fc..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/phantomwebintro.js +++ /dev/null @@ -1,19 +0,0 @@ -// Read the Phantom webpage '#intro' element text using jQuery and "includeJs" - -var page = require('webpage').create(); - -page.onConsoleMessage = function(msg) { - console.log(msg); -}; - -page.open("http://www.phantomjs.org", function(status) { - if ( status === "success" ) { - page.includeJs("http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js", function() { - page.evaluate(function() { - console.log("$(\"#intro\").text() -> " + $("#intro").text()); - }); - phantom.exit(); - }); - } -}); - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pizza.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pizza.coffee deleted file mode 100644 index 6e97db75..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pizza.coffee +++ /dev/null @@ -1,18 +0,0 @@ -# Find pizza in Mountain View using Yelp - -page = require('webpage').create() -url = 'http://lite.yelp.com/search?find_desc=pizza&find_loc=94040&find_submit=Search' - -page.open url, - (status) -> - if status isnt 'success' - console.log 'Unable to access network' - else - results = page.evaluate -> - pizza = [] - list = document.querySelectorAll 'address' - for item in list - pizza.push(item.innerText) - return pizza - console.log results.join('\n') - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pizza.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pizza.js deleted file mode 100644 index 3e1af155..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/pizza.js +++ /dev/null @@ -1,20 +0,0 @@ -// Find pizza in Mountain View using Yelp - -var page = require('webpage').create(), - url = 'http://lite.yelp.com/search?find_desc=pizza&find_loc=94040&find_submit=Search'; - -page.open(url, function (status) { - if (status !== 'success') { - console.log('Unable to access network'); - } else { - var results = page.evaluate(function() { - var list = document.querySelectorAll('address'), pizza = [], i; - for (i = 0; i < list.length; i++) { - pizza.push(list[i].innerText); - } - return pizza; - }); - console.log(results.join('\n')); - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/post.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/post.coffee deleted file mode 100644 index c3c5787b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/post.coffee +++ /dev/null @@ -1,12 +0,0 @@ -# Example using HTTP POST operation - -page = require('webpage').create() -server = 'http://posttestserver.com/post.php?dump' -data = 'universe=expanding&answer=42' - -page.open server, 'post', data, (status) -> - if status isnt 'success' - console.log 'Unable to post!' - else - console.log page.content - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/post.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/post.js deleted file mode 100644 index 3868915c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/post.js +++ /dev/null @@ -1,14 +0,0 @@ -// Example using HTTP POST operation - -var page = require('webpage').create(), - server = 'http://posttestserver.com/post.php?dump', - data = 'universe=expanding&answer=42'; - -page.open(server, 'post', data, function (status) { - if (status !== 'success') { - console.log('Unable to post!'); - } else { - console.log(page.content); - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/postserver.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/postserver.coffee deleted file mode 100644 index 2dcd5075..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/postserver.coffee +++ /dev/null @@ -1,25 +0,0 @@ -# Example using HTTP POST operation -page = require("webpage").create() -server = require("webserver").create() -system = require("system") -data = "universe=expanding&answer=42" -if system.args.length isnt 2 - console.log "Usage: postserver.js " - phantom.exit 1 -port = system.args[1] -service = server.listen(port, (request, response) -> - console.log "Request received at " + new Date() - response.statusCode = 200 - response.headers = - Cache: "no-cache" - "Content-Type": "text/plain;charset=utf-8" - - response.write JSON.stringify(request, null, 4) - response.close() -) -page.open "http://localhost:" + port + "/", "post", data, (status) -> - if status isnt "success" - console.log "Unable to post!" - else - console.log page.plainText - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/postserver.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/postserver.js deleted file mode 100644 index e3dd19fa..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/postserver.js +++ /dev/null @@ -1,34 +0,0 @@ -// Example using HTTP POST operation - -var page = require('webpage').create(), - server = require('webserver').create(), - system = require('system'), - data = 'universe=expanding&answer=42'; - -if (system.args.length !== 2) { - console.log('Usage: postserver.js '); - phantom.exit(1); -} - -var port = system.args[1]; - -service = server.listen(port, function (request, response) { - console.log('Request received at ' + new Date()); - - response.statusCode = 200; - response.headers = { - 'Cache': 'no-cache', - 'Content-Type': 'text/plain;charset=utf-8' - }; - response.write(JSON.stringify(request, null, 4)); - response.close(); -}); - -page.open('http://localhost:' + port + '/', 'post', data, function (status) { - if (status !== 'success') { - console.log('Unable to post!'); - } else { - console.log(page.plainText); - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printenv.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printenv.coffee deleted file mode 100644 index 80ec5f06..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printenv.coffee +++ /dev/null @@ -1,6 +0,0 @@ -system = require("system") -env = system.env -key = undefined -for key of env - console.log key + "=" + env[key] if env.hasOwnProperty(key) -phantom.exit() \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printenv.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printenv.js deleted file mode 100644 index 6baea038..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printenv.js +++ /dev/null @@ -1,10 +0,0 @@ -var system = require('system'), - env = system.env, - key; - -for (key in env) { - if (env.hasOwnProperty(key)) { - console.log(key + '=' + env[key]); - } -} -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printheaderfooter.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printheaderfooter.coffee deleted file mode 100644 index fd82b340..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printheaderfooter.coffee +++ /dev/null @@ -1,88 +0,0 @@ -someCallback = (pageNum, numPages) -> - "

someCallback: " + pageNum + " / " + numPages + "

" -page = require("webpage").create() -system = require("system") -if system.args.length < 3 - console.log "Usage: printheaderfooter.js URL filename" - phantom.exit 1 -else - address = system.args[1] - output = system.args[2] - page.viewportSize = - width: 600 - height: 600 - - page.paperSize = - format: "A4" - margin: "1cm" - - # default header/footer for pages that don't have custom overwrites (see below) - header: - height: "1cm" - contents: phantom.callback((pageNum, numPages) -> - return "" if pageNum is 1 - "

Header " + pageNum + " / " + numPages + "

" - ) - - footer: - height: "1cm" - contents: phantom.callback((pageNum, numPages) -> - return "" if pageNum is numPages - "

Footer " + pageNum + " / " + numPages + "

" - ) - - page.open address, (status) -> - if status isnt "success" - console.log "Unable to load the address!" - else - - # check whether the loaded page overwrites the header/footer setting, - # i.e. whether a PhantomJSPriting object exists. Use that then instead - # of our defaults above. - # - # example: - # - # - # - # - #

asdfadsf

asdfadsfycvx

- # - # - if page.evaluate(-> - typeof PhantomJSPrinting is "object" - ) - paperSize = page.paperSize - paperSize.header.height = page.evaluate(-> - PhantomJSPrinting.header.height - ) - paperSize.header.contents = phantom.callback((pageNum, numPages) -> - page.evaluate ((pageNum, numPages) -> - PhantomJSPrinting.header.contents pageNum, numPages - ), pageNum, numPages - ) - paperSize.footer.height = page.evaluate(-> - PhantomJSPrinting.footer.height - ) - paperSize.footer.contents = phantom.callback((pageNum, numPages) -> - page.evaluate ((pageNum, numPages) -> - PhantomJSPrinting.footer.contents pageNum, numPages - ), pageNum, numPages - ) - page.paperSize = paperSize - console.log page.paperSize.header.height - console.log page.paperSize.footer.height - window.setTimeout (-> - page.render output - phantom.exit() - ), 200 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printheaderfooter.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printheaderfooter.js deleted file mode 100644 index 01f8a01a..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printheaderfooter.js +++ /dev/null @@ -1,89 +0,0 @@ -var page = require('webpage').create(), - system = require('system'); - -function someCallback(pageNum, numPages) { - return "

someCallback: " + pageNum + " / " + numPages + "

"; -} - -if (system.args.length < 3) { - console.log('Usage: printheaderfooter.js URL filename'); - phantom.exit(1); -} else { - var address = system.args[1]; - var output = system.args[2]; - page.viewportSize = { width: 600, height: 600 }; - page.paperSize = { - format: 'A4', - margin: "1cm", - /* default header/footer for pages that don't have custom overwrites (see below) */ - header: { - height: "1cm", - contents: phantom.callback(function(pageNum, numPages) { - if (pageNum == 1) { - return ""; - } - return "

Header " + pageNum + " / " + numPages + "

"; - }) - }, - footer: { - height: "1cm", - contents: phantom.callback(function(pageNum, numPages) { - if (pageNum == numPages) { - return ""; - } - return "

Footer " + pageNum + " / " + numPages + "

"; - }) - } - }; - page.open(address, function (status) { - if (status !== 'success') { - console.log('Unable to load the address!'); - } else { - /* check whether the loaded page overwrites the header/footer setting, - i.e. whether a PhantomJSPriting object exists. Use that then instead - of our defaults above. - - example: - - - - -

asdfadsf

asdfadsfycvx

- - */ - if (page.evaluate(function(){return typeof PhantomJSPrinting == "object";})) { - paperSize = page.paperSize; - paperSize.header.height = page.evaluate(function() { - return PhantomJSPrinting.header.height; - }); - paperSize.header.contents = phantom.callback(function(pageNum, numPages) { - return page.evaluate(function(pageNum, numPages){return PhantomJSPrinting.header.contents(pageNum, numPages);}, pageNum, numPages); - }); - paperSize.footer.height = page.evaluate(function() { - return PhantomJSPrinting.footer.height; - }); - paperSize.footer.contents = phantom.callback(function(pageNum, numPages) { - return page.evaluate(function(pageNum, numPages){return PhantomJSPrinting.footer.contents(pageNum, numPages);}, pageNum, numPages); - }); - page.paperSize = paperSize; - console.log(page.paperSize.header.height); - console.log(page.paperSize.footer.height); - } - window.setTimeout(function () { - page.render(output); - phantom.exit(); - }, 200); - } - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printmargins.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printmargins.coffee deleted file mode 100644 index 5be7ceda..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printmargins.coffee +++ /dev/null @@ -1,33 +0,0 @@ -page = require("webpage").create() -system = require("system") -if system.args.length < 7 - console.log "Usage: printmargins.js URL filename LEFT TOP RIGHT BOTTOM" - console.log " margin examples: \"1cm\", \"10px\", \"7mm\", \"5in\"" - phantom.exit 1 -else - address = system.args[1] - output = system.args[2] - marginLeft = system.args[3] - marginTop = system.args[4] - marginRight = system.args[5] - marginBottom = system.args[6] - page.viewportSize = - width: 600 - height: 600 - - page.paperSize = - format: "A4" - margin: - left: marginLeft - top: marginTop - right: marginRight - bottom: marginBottom - - page.open address, (status) -> - if status isnt "success" - console.log "Unable to load the address!" - else - window.setTimeout (-> - page.render output - phantom.exit() - ), 200 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printmargins.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printmargins.js deleted file mode 100644 index 89b48b42..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/printmargins.js +++ /dev/null @@ -1,35 +0,0 @@ -var page = require('webpage').create(), - system = require('system'); - -if (system.args.length < 7) { - console.log('Usage: printmargins.js URL filename LEFT TOP RIGHT BOTTOM'); - console.log(' margin examples: "1cm", "10px", "7mm", "5in"'); - phantom.exit(1); -} else { - var address = system.args[1]; - var output = system.args[2]; - var marginLeft = system.args[3]; - var marginTop = system.args[4]; - var marginRight = system.args[5]; - var marginBottom = system.args[6]; - page.viewportSize = { width: 600, height: 600 }; - page.paperSize = { - format: 'A4', - margin: { - left: marginLeft, - top: marginTop, - right: marginRight, - bottom: marginBottom - } - }; - page.open(address, function (status) { - if (status !== 'success') { - console.log('Unable to load the address!'); - } else { - window.setTimeout(function () { - page.render(output); - phantom.exit(); - }, 200); - } - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/rasterize.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/rasterize.coffee deleted file mode 100644 index aa06dbda..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/rasterize.coffee +++ /dev/null @@ -1,23 +0,0 @@ -page = require('webpage').create() -system = require 'system' - -if system.args.length < 3 or system.args.length > 4 - console.log 'Usage: rasterize.coffee URL filename [paperwidth*paperheight|paperformat]' - console.log ' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"' - phantom.exit 1 -else - address = system.args[1] - output = system.args[2] - page.viewportSize = { width: 600, height: 600 } - if system.args.length is 4 and system.args[2].substr(-4) is ".pdf" - size = system.args[3].split '*' - if size.length is 2 - page.paperSize = { width: size[0], height: size[1], border: '0px' } - else - page.paperSize = { format: system.args[3], orientation: 'portrait', border: '1cm' } - page.open address, (status) -> - if status isnt 'success' - console.log 'Unable to load the address!' - phantom.exit() - else - window.setTimeout (-> page.render output; phantom.exit()), 200 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/rasterize.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/rasterize.js deleted file mode 100644 index 165bcfa7..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/rasterize.js +++ /dev/null @@ -1,32 +0,0 @@ -var page = require('webpage').create(), - system = require('system'), - address, output, size; - -if (system.args.length < 3 || system.args.length > 5) { - console.log('Usage: rasterize.js URL filename [paperwidth*paperheight|paperformat] [zoom]'); - console.log(' paper (pdf output) examples: "5in*7.5in", "10cm*20cm", "A4", "Letter"'); - phantom.exit(1); -} else { - address = system.args[1]; - output = system.args[2]; - page.viewportSize = { width: 600, height: 600 }; - if (system.args.length > 3 && system.args[2].substr(-4) === ".pdf") { - size = system.args[3].split('*'); - page.paperSize = size.length === 2 ? { width: size[0], height: size[1], margin: '0px' } - : { format: system.args[3], orientation: 'portrait', margin: '1cm' }; - } - if (system.args.length > 4) { - page.zoomFactor = system.args[4]; - } - page.open(address, function (status) { - if (status !== 'success') { - console.log('Unable to load the address!'); - phantom.exit(); - } else { - window.setTimeout(function () { - page.render(output); - phantom.exit(); - }, 200); - } - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/render_multi_url.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/render_multi_url.coffee deleted file mode 100644 index 29afa48f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/render_multi_url.coffee +++ /dev/null @@ -1,60 +0,0 @@ -# Render Multiple URLs to file - -system = require("system") - -# Render given urls -# @param array of URLs to render -# @param callbackPerUrl Function called after finishing each URL, including the last URL -# @param callbackFinal Function called after finishing everything -RenderUrlsToFile = (urls, callbackPerUrl, callbackFinal) -> - urlIndex = 0 # only for easy file naming - webpage = require("webpage") - page = null - getFilename = -> - "rendermulti-" + urlIndex + ".png" - - next = (status, url, file) -> - page.close() - callbackPerUrl status, url, file - retrieve() - - retrieve = -> - if urls.length > 0 - url = urls.shift() - urlIndex++ - page = webpage.create() - page.viewportSize = - width: 800 - height: 600 - - page.settings.userAgent = "Phantom.js bot" - page.open "http://" + url, (status) -> - file = getFilename() - if status is "success" - window.setTimeout (-> - page.render file - next status, url, file - ), 200 - else - next status, url, file - - else - callbackFinal() - - retrieve() -arrayOfUrls = null -if system.args.length > 1 - arrayOfUrls = Array::slice.call(system.args, 1) -else - # Default (no args passed) - console.log "Usage: phantomjs render_multi_url.js [domain.name1, domain.name2, ...]" - arrayOfUrls = ["www.google.com", "www.bbc.co.uk", "www.phantomjs.org"] - -RenderUrlsToFile arrayOfUrls, ((status, url, file) -> - if status isnt "success" - console.log "Unable to render '" + url + "'" - else - console.log "Rendered '" + url + "' at '" + file + "'" -), -> - phantom.exit() - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/render_multi_url.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/render_multi_url.js deleted file mode 100644 index df098137..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/render_multi_url.js +++ /dev/null @@ -1,73 +0,0 @@ -// Render Multiple URLs to file - -var RenderUrlsToFile, arrayOfUrls, system; - -system = require("system"); - -/* -Render given urls -@param array of URLs to render -@param callbackPerUrl Function called after finishing each URL, including the last URL -@param callbackFinal Function called after finishing everything -*/ -RenderUrlsToFile = function(urls, callbackPerUrl, callbackFinal) { - var getFilename, next, page, retrieve, urlIndex, webpage; - urlIndex = 0; - webpage = require("webpage"); - page = null; - getFilename = function() { - return "rendermulti-" + urlIndex + ".png"; - }; - next = function(status, url, file) { - page.close(); - callbackPerUrl(status, url, file); - return retrieve(); - }; - retrieve = function() { - var url; - if (urls.length > 0) { - url = urls.shift(); - urlIndex++; - page = webpage.create(); - page.viewportSize = { - width: 800, - height: 600 - }; - page.settings.userAgent = "Phantom.js bot"; - return page.open("http://" + url, function(status) { - var file; - file = getFilename(); - if (status === "success") { - return window.setTimeout((function() { - page.render(file); - return next(status, url, file); - }), 200); - } else { - return next(status, url, file); - } - }); - } else { - return callbackFinal(); - } - }; - return retrieve(); -}; - -arrayOfUrls = null; - -if (system.args.length > 1) { - arrayOfUrls = Array.prototype.slice.call(system.args, 1); -} else { - console.log("Usage: phantomjs render_multi_url.js [domain.name1, domain.name2, ...]"); - arrayOfUrls = ["www.google.com", "www.bbc.co.uk", "www.phantomjs.org"]; -} - -RenderUrlsToFile(arrayOfUrls, (function(status, url, file) { - if (status !== "success") { - return console.log("Unable to render '" + url + "'"); - } else { - return console.log("Rendered '" + url + "' at '" + file + "'"); - } -}), function() { - return phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-jasmine.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-jasmine.coffee deleted file mode 100644 index 22fb9323..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-jasmine.coffee +++ /dev/null @@ -1,61 +0,0 @@ -system = require 'system' - -## -# Wait until the test condition is true or a timeout occurs. Useful for waiting -# on a server response or for a ui change (fadeIn, etc.) to occur. -# -# @param testFx javascript condition that evaluates to a boolean, -# it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or -# as a callback function. -# @param onReady what to do when testFx condition is fulfilled, -# it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or -# as a callback function. -# @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. -## -waitFor = (testFx, onReady, timeOutMillis=3000) -> - start = new Date().getTime() - condition = false - f = -> - if (new Date().getTime() - start < timeOutMillis) and not condition - # If not time-out yet and condition not yet fulfilled - condition = (if typeof testFx is 'string' then eval testFx else testFx()) #< defensive code - else - if not condition - # If condition still not fulfilled (timeout but condition is 'false') - console.log "'waitFor()' timeout" - phantom.exit 1 - else - # Condition fulfilled (timeout and/or condition is 'true') - console.log "'waitFor()' finished in #{new Date().getTime() - start}ms." - if typeof onReady is 'string' then eval onReady else onReady() #< Do what it's supposed to do once the condition is fulfilled - clearInterval interval #< Stop this interval - interval = setInterval f, 100 #< repeat check every 100ms - -if system.args.length isnt 2 - console.log 'Usage: run-jasmine.coffee URL' - phantom.exit 1 - -page = require('webpage').create() - -# Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") -page.onConsoleMessage = (msg) -> - console.log msg - -page.open system.args[1], (status) -> - if status isnt 'success' - console.log 'Unable to access network' - phantom.exit() - else - waitFor -> - page.evaluate -> - if document.body.querySelector '.finished-at' - return true - return false - , -> - page.evaluate -> - console.log document.body.querySelector('.description').innerText - list = document.body.querySelectorAll('.failed > .description, .failed > .messages > .resultMessage') - for el in list - console.log el.innerText - - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-jasmine.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-jasmine.js deleted file mode 100644 index 3872824d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-jasmine.js +++ /dev/null @@ -1,86 +0,0 @@ -var system = require('system'); - -/** - * Wait until the test condition is true or a timeout occurs. Useful for waiting - * on a server response or for a ui change (fadeIn, etc.) to occur. - * - * @param testFx javascript condition that evaluates to a boolean, - * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or - * as a callback function. - * @param onReady what to do when testFx condition is fulfilled, - * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or - * as a callback function. - * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. - */ -function waitFor(testFx, onReady, timeOutMillis) { - var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001, //< Default Max Timeout is 3s - start = new Date().getTime(), - condition = false, - interval = setInterval(function() { - if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { - // If not time-out yet and condition not yet fulfilled - condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code - } else { - if(!condition) { - // If condition still not fulfilled (timeout but condition is 'false') - console.log("'waitFor()' timeout"); - phantom.exit(1); - } else { - // Condition fulfilled (timeout and/or condition is 'true') - console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); - typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled - clearInterval(interval); //< Stop this interval - } - } - }, 100); //< repeat check every 100ms -}; - - -if (system.args.length !== 2) { - console.log('Usage: run-jasmine.js URL'); - phantom.exit(1); -} - -var page = require('webpage').create(); - -// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") -page.onConsoleMessage = function(msg) { - console.log(msg); -}; - -page.open(system.args[1], function(status){ - if (status !== "success") { - console.log("Unable to access network"); - phantom.exit(); - } else { - waitFor(function(){ - return page.evaluate(function(){ - return document.body.querySelector('.symbolSummary .pending') === null - }); - }, function(){ - var exitCode = page.evaluate(function(){ - console.log(''); - console.log(document.body.querySelector('.description').innerText); - var list = document.body.querySelectorAll('.results > #details > .specDetail.failed'); - if (list && list.length > 0) { - console.log(''); - console.log(list.length + ' test(s) FAILED:'); - for (i = 0; i < list.length; ++i) { - var el = list[i], - desc = el.querySelector('.description'), - msg = el.querySelector('.resultMessage.fail'); - console.log(''); - console.log(desc.innerText); - console.log(msg.innerText); - console.log(''); - } - return 1; - } else { - console.log(document.body.querySelector('.alert > .passingAlert.bar').innerText); - return 0; - } - }); - phantom.exit(exitCode); - }); - } -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-qunit.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-qunit.coffee deleted file mode 100644 index dcb24b93..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-qunit.coffee +++ /dev/null @@ -1,64 +0,0 @@ -system = require 'system' - -## -# Wait until the test condition is true or a timeout occurs. Useful for waiting -# on a server response or for a ui change (fadeIn, etc.) to occur. -# -# @param testFx javascript condition that evaluates to a boolean, -# it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or -# as a callback function. -# @param onReady what to do when testFx condition is fulfilled, -# it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or -# as a callback function. -# @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. -## -waitFor = (testFx, onReady, timeOutMillis=3000) -> - start = new Date().getTime() - condition = false - f = -> - if (new Date().getTime() - start < timeOutMillis) and not condition - # If not time-out yet and condition not yet fulfilled - condition = (if typeof testFx is 'string' then eval testFx else testFx()) #< defensive code - else - if not condition - # If condition still not fulfilled (timeout but condition is 'false') - console.log "'waitFor()' timeout" - phantom.exit 1 - else - # Condition fulfilled (timeout and/or condition is 'true') - console.log "'waitFor()' finished in #{new Date().getTime() - start}ms." - if typeof onReady is 'string' then eval onReady else onReady() #< Do what it's supposed to do once the condition is fulfilled - clearInterval interval #< Stop this interval - interval = setInterval f, 100 #< repeat check every 100ms - -if system.args.length isnt 2 - console.log 'Usage: run-qunit.coffee URL' - phantom.exit 1 - -page = require('webpage').create() - -# Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") -page.onConsoleMessage = (msg) -> - console.log msg - -page.open system.args[1], (status) -> - if status isnt 'success' - console.log 'Unable to access network' - phantom.exit 1 - else - waitFor -> - page.evaluate -> - el = document.getElementById 'qunit-testresult' - if el and el.innerText.match 'completed' - return true - return false - , -> - failedNum = page.evaluate -> - el = document.getElementById 'qunit-testresult' - console.log el.innerText - try - return el.getElementsByClassName('failed')[0].innerHTML - catch e - return 10000 - - phantom.exit if parseInt(failedNum, 10) > 0 then 1 else 0 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-qunit.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-qunit.js deleted file mode 100644 index d7df0c3c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/run-qunit.js +++ /dev/null @@ -1,76 +0,0 @@ -var system = require('system'); - -/** - * Wait until the test condition is true or a timeout occurs. Useful for waiting - * on a server response or for a ui change (fadeIn, etc.) to occur. - * - * @param testFx javascript condition that evaluates to a boolean, - * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or - * as a callback function. - * @param onReady what to do when testFx condition is fulfilled, - * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or - * as a callback function. - * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. - */ -function waitFor(testFx, onReady, timeOutMillis) { - var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3001, //< Default Max Timout is 3s - start = new Date().getTime(), - condition = false, - interval = setInterval(function() { - if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { - // If not time-out yet and condition not yet fulfilled - condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code - } else { - if(!condition) { - // If condition still not fulfilled (timeout but condition is 'false') - console.log("'waitFor()' timeout"); - phantom.exit(1); - } else { - // Condition fulfilled (timeout and/or condition is 'true') - console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); - typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled - clearInterval(interval); //< Stop this interval - } - } - }, 100); //< repeat check every 250ms -}; - - -if (system.args.length !== 2) { - console.log('Usage: run-qunit.js URL'); - phantom.exit(1); -} - -var page = require('webpage').create(); - -// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") -page.onConsoleMessage = function(msg) { - console.log(msg); -}; - -page.open(system.args[1], function(status){ - if (status !== "success") { - console.log("Unable to access network"); - phantom.exit(1); - } else { - waitFor(function(){ - return page.evaluate(function(){ - var el = document.getElementById('qunit-testresult'); - if (el && el.innerText.match('completed')) { - return true; - } - return false; - }); - }, function(){ - var failedNum = page.evaluate(function(){ - var el = document.getElementById('qunit-testresult'); - console.log(el.innerText); - try { - return el.getElementsByClassName('failed')[0].innerHTML; - } catch (e) { } - return 10000; - }); - phantom.exit((parseInt(failedNum, 10) > 0) ? 1 : 0); - }); - } -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/scandir.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/scandir.coffee deleted file mode 100644 index 0ee4ffc2..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/scandir.coffee +++ /dev/null @@ -1,16 +0,0 @@ -# List all the files in a Tree of Directories -system = require 'system' - -if system.args.length != 2 - console.log "Usage: phantomjs scandir.coffee DIRECTORY_TO_SCAN" - phantom.exit 1 -scanDirectory = (path) -> - fs = require 'fs' - if fs.exists(path) and fs.isFile(path) - console.log path - else if fs.isDirectory(path) - fs.list(path).forEach (e) -> - scanDirectory path + "/" + e if e != "." and e != ".." - -scanDirectory system.args[1] -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/scandir.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/scandir.js deleted file mode 100644 index 0b9f9e1b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/scandir.js +++ /dev/null @@ -1,22 +0,0 @@ -// List all the files in a Tree of Directories -var system = require('system'); - -if (system.args.length !== 2) { - console.log("Usage: phantomjs scandir.js DIRECTORY_TO_SCAN"); - phantom.exit(1); -} - -var scanDirectory = function (path) { - var fs = require('fs'); - if (fs.exists(path) && fs.isFile(path)) { - console.log(path); - } else if (fs.isDirectory(path)) { - fs.list(path).forEach(function (e) { - if ( e !== "." && e !== ".." ) { //< Avoid loops - scanDirectory(path + '/' + e); - } - }); - } -}; -scanDirectory(system.args[1]); -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/seasonfood.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/seasonfood.coffee deleted file mode 100644 index 5228c26f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/seasonfood.coffee +++ /dev/null @@ -1,17 +0,0 @@ -# Show BBC seasonal food list. - -window.cbfunc = (data) -> - list = data.query.results.results.result - names = ['January', 'February', 'March', - 'April', 'May', 'June', - 'July', 'August', 'September', - 'October', 'November', 'December'] - for item in list - console.log [item.name.replace(/\s/ig, ' '), ':', - names[item.atItsBestUntil], 'to', - names[item.atItsBestFrom]].join(' ') - phantom.exit() - -el = document.createElement 'script' -el.src = 'http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20bbc.goodfood.seasonal%3B&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=window.cbfunc' -document.body.appendChild el diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/seasonfood.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/seasonfood.js deleted file mode 100644 index f827d461..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/seasonfood.js +++ /dev/null @@ -1,19 +0,0 @@ -// Show BBC seasonal food list. - -var cbfunc = function (data) { - var list = data.query.results.results.result, - names = ['January', 'February', 'March', - 'April', 'May', 'June', - 'July', 'August', 'September', - 'October', 'November', 'December']; - list.forEach(function (item) { - console.log([item.name.replace(/\s/ig, ' '), ':', - names[item.atItsBestUntil], 'to', - names[item.atItsBestFrom]].join(' ')); - }); - phantom.exit(); -}; - -var el = document.createElement('script'); -el.src = 'http://query.yahooapis.com/v1/public/yql?q=SELECT%20*%20FROM%20bbc.goodfood.seasonal%3B&format=json&diagnostics=true&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=cbfunc'; -document.body.appendChild(el); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/server.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/server.coffee deleted file mode 100644 index 96abdb92..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/server.coffee +++ /dev/null @@ -1,45 +0,0 @@ -page = require("webpage").create() -server = require("webserver").create() -system = require("system") -host = undefined -port = undefined -if system.args.length isnt 2 - console.log "Usage: server.js " - phantom.exit 1 -else - port = system.args[1] - listening = server.listen(port, (request, response) -> - console.log "GOT HTTP REQUEST" - console.log JSON.stringify(request, null, 4) - - # we set the headers here - response.statusCode = 200 - response.headers = - Cache: "no-cache" - "Content-Type": "text/html" - - - # this is also possible: - response.setHeader "foo", "bar" - - # now we write the body - # note: the headers above will now be sent implictly - response.write "YES!" - - # note: writeBody can be called multiple times - response.write "

pretty cool :)" - response.close() - ) - unless listening - console.log "could not create web server listening on port " + port - phantom.exit() - url = "http://localhost:" + port + "/foo/bar.php?asdf=true" - console.log "SENDING REQUEST TO:" - console.log url - page.open url, (status) -> - if status isnt "success" - console.log "FAIL to load the address" - else - console.log "GOT REPLY FROM SERVER:" - console.log page.content - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/server.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/server.js deleted file mode 100644 index fd725d7a..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/server.js +++ /dev/null @@ -1,43 +0,0 @@ -var page = require('webpage').create(); -var server = require('webserver').create(); -var system = require('system'); -var host, port; - -if (system.args.length !== 2) { - console.log('Usage: server.js '); - phantom.exit(1); -} else { - port = system.args[1]; - var listening = server.listen(port, function (request, response) { - console.log("GOT HTTP REQUEST"); - console.log(JSON.stringify(request, null, 4)); - - // we set the headers here - response.statusCode = 200; - response.headers = {"Cache": "no-cache", "Content-Type": "text/html"}; - // this is also possible: - response.setHeader("foo", "bar"); - // now we write the body - // note: the headers above will now be sent implictly - response.write("YES!"); - // note: writeBody can be called multiple times - response.write("

pretty cool :)"); - response.close(); - }); - if (!listening) { - console.log("could not create web server listening on port " + port); - phantom.exit(); - } - var url = "http://localhost:" + port + "/foo/bar.php?asdf=true"; - console.log("SENDING REQUEST TO:"); - console.log(url); - page.open(url, function (status) { - if (status !== 'success') { - console.log('FAIL to load the address'); - } else { - console.log("GOT REPLY FROM SERVER:"); - console.log(page.content); - } - phantom.exit(); - }); -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/serverkeepalive.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/serverkeepalive.coffee deleted file mode 100644 index ed332247..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/serverkeepalive.coffee +++ /dev/null @@ -1,32 +0,0 @@ -port = undefined -server = undefined -service = undefined -system = require("system") -if system.args.length isnt 2 - console.log "Usage: serverkeepalive.js " - phantom.exit 1 -else - port = system.args[1] - server = require("webserver").create() - service = server.listen(port, - keepAlive: true - , (request, response) -> - console.log "Request at " + new Date() - console.log JSON.stringify(request, null, 4) - body = JSON.stringify(request, null, 4) - response.statusCode = 200 - response.headers = - Cache: "no-cache" - "Content-Type": "text/plain" - Connection: "Keep-Alive" - "Keep-Alive": "timeout=5, max=100" - "Content-Length": body.length - - response.write body - response.close() - ) - if service - console.log "Web server running on port " + port - else - console.log "Error: Could not create web server listening on port " + port - phantom.exit() \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/serverkeepalive.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/serverkeepalive.js deleted file mode 100644 index ed474d86..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/serverkeepalive.js +++ /dev/null @@ -1,34 +0,0 @@ -var port, server, service, - system = require('system'); - -if (system.args.length !== 2) { - console.log('Usage: serverkeepalive.js '); - phantom.exit(1); -} else { - port = system.args[1]; - server = require('webserver').create(); - - service = server.listen(port, { keepAlive: true }, function (request, response) { - console.log('Request at ' + new Date()); - console.log(JSON.stringify(request, null, 4)); - - var body = JSON.stringify(request, null, 4); - response.statusCode = 200; - response.headers = { - 'Cache': 'no-cache', - 'Content-Type': 'text/plain', - 'Connection': 'Keep-Alive', - 'Keep-Alive': 'timeout=5, max=100', - 'Content-Length': body.length - }; - response.write(body); - response.close(); - }); - - if (service) { - console.log('Web server running on port ' + port); - } else { - console.log('Error: Could not create web server listening on port ' + port); - phantom.exit(); - } -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/simpleserver.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/simpleserver.coffee deleted file mode 100644 index 9b4cf7aa..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/simpleserver.coffee +++ /dev/null @@ -1,38 +0,0 @@ -system = require 'system' - -if system.args.length is 1 - console.log "Usage: simpleserver.coffee " - phantom.exit 1 -else - port = system.args[1] - server = require("webserver").create() - - service = server.listen(port, (request, response) -> - - console.log "Request at " + new Date() - console.log JSON.stringify(request, null, 4) - - response.statusCode = 200 - response.headers = - Cache: "no-cache" - "Content-Type": "text/html" - - response.write "" - response.write "" - response.write "Hello, world!" - response.write "" - response.write "" - response.write "

This is from PhantomJS web server.

" - response.write "

Request data:

" - response.write "
"
-    response.write JSON.stringify(request, null, 4)
-    response.write "
" - response.write "" - response.write "" - response.close() - ) - if service - console.log "Web server running on port " + port - else - console.log "Error: Could not create web server listening on port " + port - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/simpleserver.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/simpleserver.js deleted file mode 100644 index d1eb8456..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/simpleserver.js +++ /dev/null @@ -1,42 +0,0 @@ -var port, server, service, - system = require('system'); - -if (system.args.length !== 2) { - console.log('Usage: simpleserver.js '); - phantom.exit(1); -} else { - port = system.args[1]; - server = require('webserver').create(); - - service = server.listen(port, function (request, response) { - - console.log('Request at ' + new Date()); - console.log(JSON.stringify(request, null, 4)); - - response.statusCode = 200; - response.headers = { - 'Cache': 'no-cache', - 'Content-Type': 'text/html' - }; - response.write(''); - response.write(''); - response.write('Hello, world!'); - response.write(''); - response.write(''); - response.write('

This is from PhantomJS web server.

'); - response.write('

Request data:

'); - response.write('
');
-        response.write(JSON.stringify(request, null, 4));
-        response.write('
'); - response.write(''); - response.write(''); - response.close(); - }); - - if (service) { - console.log('Web server running on port ' + port); - } else { - console.log('Error: Could not create web server listening on port ' + port); - phantom.exit(); - } -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/sleepsort.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/sleepsort.coffee deleted file mode 100644 index 863ad14a..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/sleepsort.coffee +++ /dev/null @@ -1,20 +0,0 @@ -### -Sort integers from the command line in a very ridiculous way: leveraging timeouts :P -### - -system = require 'system' - -if system.args.length < 2 - console.log "Usage: phantomjs sleepsort.coffee PUT YOUR INTEGERS HERE SEPARATED BY SPACES" - phantom.exit 1 -else - sortedCount = 0 - args = Array.prototype.slice.call(system.args, 1) - for int in args - setTimeout (do (int) -> - -> - console.log int - ++sortedCount - phantom.exit() if sortedCount is args.length), - int - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/sleepsort.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/sleepsort.js deleted file mode 100644 index 6f0f9a32..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/sleepsort.js +++ /dev/null @@ -1,25 +0,0 @@ -// sleepsort.js - Sort integers from the commandline in a very ridiculous way: leveraging timeouts :P -var system = require('system'); - -function sleepSort(array, callback) { - var sortedCount = 0, - i, len; - for ( i = 0, len = array.length; i < len; ++i ) { - setTimeout((function(j){ - return function() { - console.log(array[j]); - ++sortedCount; - (len === sortedCount) && callback(); - }; - }(i)), array[i]); - } -} - -if ( system.args < 2 ) { - console.log("Usage: phantomjs sleepsort.js PUT YOUR INTEGERS HERE SEPARATED BY SPACES"); - phantom.exit(1); -} else { - sleepSort(Array.prototype.slice.call(system.args, 1), function() { - phantom.exit(); - }); -} \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.coffee deleted file mode 100644 index 60723e01..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.coffee +++ /dev/null @@ -1,18 +0,0 @@ -system = require 'system' - -system.stdout.write 'Hello, system.stdout.write!' -system.stdout.writeLine '\nHello, system.stdout.writeLine!' - -system.stderr.write 'Hello, system.stderr.write!' -system.stderr.writeLine '\nHello, system.stderr.writeLine!' - -system.stdout.writeLine 'system.stdin.readLine(): ' -line = system.stdin.readLine() -system.stdout.writeLine JSON.stringify line - -# This is essentially a `readAll` -system.stdout.writeLine 'system.stdin.read(5): (ctrl+D to end)' -input = system.stdin.read 5 -system.stdout.writeLine JSON.stringify input - -phantom.exit 0 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js deleted file mode 100644 index 80a43d38..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/stdin-stdout-stderr.js +++ /dev/null @@ -1,18 +0,0 @@ -var system = require('system'); - -system.stdout.write('Hello, system.stdout.write!'); -system.stdout.writeLine('\nHello, system.stdout.writeLine!'); - -system.stderr.write('Hello, system.stderr.write!'); -system.stderr.writeLine('\nHello, system.stderr.writeLine!'); - -system.stdout.writeLine('system.stdin.readLine(): '); -var line = system.stdin.readLine(); -system.stdout.writeLine(JSON.stringify(line)); - -// This is essentially a `readAll` -system.stdout.writeLine('system.stdin.read(5): (ctrl+D to end)'); -var input = system.stdin.read(5); -system.stdout.writeLine(JSON.stringify(input)); - -phantom.exit(0); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/technews.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/technews.coffee deleted file mode 100644 index 7a9807eb..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/technews.coffee +++ /dev/null @@ -1,17 +0,0 @@ -page = require('webpage').create() - -page.viewportSize = { width: 320, height: 480 } - -page.open 'http://news.google.com/news/i/section?&topic=t', - (status) -> - if status isnt 'success' - console.log 'Unable to access the network!' - else - page.evaluate -> - body = document.body - body.style.backgroundColor = '#fff' - body.querySelector('div#title-block').style.display = 'none' - body.querySelector('form#edition-picker-form') - .parentElement.parentElement.style.display = 'none' - page.render 'technews.png' - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/technews.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/technews.js deleted file mode 100644 index ba7cd94e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/technews.js +++ /dev/null @@ -1,16 +0,0 @@ -var page = require('webpage').create(); -page.viewportSize = { width: 320, height: 480 }; -page.open('http://news.google.com/news/i/section?&topic=t', function (status) { - if (status !== 'success') { - console.log('Unable to access the network!'); - } else { - page.evaluate(function () { - var body = document.body; - body.style.backgroundColor = '#fff'; - body.querySelector('div#title-block').style.display = 'none'; - body.querySelector('form#edition-picker-form').parentElement.parentElement.style.display = 'none'; - }); - page.render('technews.png'); - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/tweets.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/tweets.coffee deleted file mode 100644 index a6c064cd..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/tweets.coffee +++ /dev/null @@ -1,31 +0,0 @@ -# Get twitter status for given account (or for the default one, "PhantomJS") - -page = require('webpage').create() -system = require 'system' -twitterId = 'PhantomJS' #< default value - -# Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") -page.onConsoleMessage = (msg) -> - console.log msg - -# Print usage message, if no twitter ID is passed -if system.args.length < 2 - console.log 'Usage: tweets.coffee [twitter ID]' -else - twitterId = system.args[1] - -# Heading -console.log "*** Latest tweets from @#{twitterId} ***\n" - -# Open Twitter Mobile and, onPageLoad, do... -page.open encodeURI("http://mobile.twitter.com/#{twitterId}"), (status) -> - # Check for page load success - if status isnt 'success' - console.log 'Unable to access network' - else - # Execute some DOM inspection within the page context - page.evaluate -> - list = document.querySelectorAll 'div.tweet-text' - for i, j in list - console.log "#{j + 1}: #{i.innerText}" - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/tweets.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/tweets.js deleted file mode 100644 index d3f18c58..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/tweets.js +++ /dev/null @@ -1,37 +0,0 @@ -// Get twitter status for given account (or for the default one, "PhantomJS") - -var page = require('webpage').create(), - system = require('system'), - twitterId = "PhantomJS"; //< default value - -// Route "console.log()" calls from within the Page context to the main Phantom context (i.e. current "this") -page.onConsoleMessage = function(msg) { - console.log(msg); -}; - -// Print usage message, if no twitter ID is passed -if (system.args.length < 2) { - console.log("Usage: tweets.js [twitter ID]"); -} else { - twitterId = system.args[1]; -} - -// Heading -console.log("*** Latest tweets from @" + twitterId + " ***\n"); - -// Open Twitter Mobile and, onPageLoad, do... -page.open(encodeURI("http://mobile.twitter.com/" + twitterId), function (status) { - // Check for page load success - if (status !== "success") { - console.log("Unable to access network"); - } else { - // Execute some DOM inspection within the page context - page.evaluate(function() { - var list = document.querySelectorAll('div.tweet-text'); - for (var i = 0; i < list.length; ++i) { - console.log((i + 1) + ": " + list[i].innerText); - } - }); - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/universe.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/universe.js deleted file mode 100644 index 214dbc98..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/universe.js +++ /dev/null @@ -1,10 +0,0 @@ -// This is to be used by "module.js" (and "module.coffee") example(s). -// There should NOT be a "universe.coffee" as only 1 of the 2 would -// ever be loaded unless the file extension was specified. - -exports.answer = 42; - -exports.start = function () { - console.log('Starting the universe....'); -} - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/unrandomize.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/unrandomize.coffee deleted file mode 100644 index 841ffc73..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/unrandomize.coffee +++ /dev/null @@ -1,18 +0,0 @@ -# Modify global object at the page initialization. -# In this example, effectively Math.random() always returns 0.42. - -page = require('webpage').create() -page.onInitialized = -> - page.evaluate -> - Math.random = -> - 42 / 100 - -page.open "http://ariya.github.com/js/random/", (status) -> - if status != "success" - console.log "Network error." - else - console.log page.evaluate(-> - document.getElementById("numbers").textContent - ) - phantom.exit() - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/unrandomize.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/unrandomize.js deleted file mode 100644 index 2aa2f818..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/unrandomize.js +++ /dev/null @@ -1,24 +0,0 @@ -// Modify global object at the page initialization. -// In this example, effectively Math.random() always returns 0.42. - -var page = require('webpage').create(); - -page.onInitialized = function () { - page.evaluate(function () { - Math.random = function() { - return 42 / 100; - }; - }); -}; - -page.open('http://ariya.github.com/js/random/', function (status) { - var result; - if (status !== 'success') { - console.log('Network error.'); - } else { - console.log(page.evaluate(function () { - return document.getElementById('numbers').textContent; - })); - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/useragent.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/useragent.coffee deleted file mode 100644 index d401c7f5..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/useragent.coffee +++ /dev/null @@ -1,11 +0,0 @@ -page = require('webpage').create() - -console.log 'The default user agent is ' + page.settings.userAgent - -page.settings.userAgent = 'SpecialAgent' -page.open 'http://www.httpuseragent.org', (status) -> - if status isnt 'success' - console.log 'Unable to access network' - else - console.log page.evaluate -> document.getElementById('myagent').innerText - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/useragent.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/useragent.js deleted file mode 100644 index 60f537e1..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/useragent.js +++ /dev/null @@ -1,14 +0,0 @@ -var page = require('webpage').create(); -console.log('The default user agent is ' + page.settings.userAgent); -page.settings.userAgent = 'SpecialAgent'; -page.open('http://www.httpuseragent.org', function (status) { - if (status !== 'success') { - console.log('Unable to access network'); - } else { - var ua = page.evaluate(function () { - return document.getElementById('myagent').innerText; - }); - console.log(ua); - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/version.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/version.coffee deleted file mode 100644 index ce20269b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/version.coffee +++ /dev/null @@ -1,5 +0,0 @@ -console.log 'using PhantomJS version ' + - phantom.version.major + '.' + - phantom.version.minor + '.' + - phantom.version.patch -phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/version.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/version.js deleted file mode 100644 index 49e41ed3..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/version.js +++ /dev/null @@ -1,5 +0,0 @@ -console.log('using PhantomJS version ' + - phantom.version.major + '.' + - phantom.version.minor + '.' + - phantom.version.patch); -phantom.exit(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/waitfor.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/waitfor.coffee deleted file mode 100644 index 90773c65..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/waitfor.coffee +++ /dev/null @@ -1,48 +0,0 @@ -## -# Wait until the test condition is true or a timeout occurs. Useful for waiting -# on a server response or for a ui change (fadeIn, etc.) to occur. -# -# @param testFx javascript condition that evaluates to a boolean, -# it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or -# as a callback function. -# @param onReady what to do when testFx condition is fulfilled, -# it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or -# as a callback function. -# @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. -## -waitFor = (testFx, onReady, timeOutMillis=3000) -> - start = new Date().getTime() - condition = false - f = -> - if (new Date().getTime() - start < timeOutMillis) and not condition - # If not time-out yet and condition not yet fulfilled - condition = (if typeof testFx is 'string' then eval testFx else testFx()) #< defensive code - else - if not condition - # If condition still not fulfilled (timeout but condition is 'false') - console.log "'waitFor()' timeout" - phantom.exit 1 - else - # Condition fulfilled (timeout and/or condition is 'true') - console.log "'waitFor()' finished in #{new Date().getTime() - start}ms." - if typeof onReady is 'string' then eval onReady else onReady() #< Do what it's supposed to do once the condition is fulfilled - clearInterval interval #< Stop this interval - interval = setInterval f, 250 #< repeat check every 250ms - - -page = require('webpage').create() - -# Open Twitter on 'sencha' profile and, onPageLoad, do... -page.open 'http://twitter.com/#!/sencha', (status) -> - # Check for page load success - if status isnt 'success' - console.log 'Unable to access network' - else - # Wait for 'signin-dropdown' to be visible - waitFor -> - # Check in the page if a specific element is now visible - page.evaluate -> - $('#signin-dropdown').is ':visible' - , -> - console.log 'The sign-in dialog should be visible now.' - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/waitfor.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/waitfor.js deleted file mode 100644 index 6c5ecb80..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/waitfor.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Wait until the test condition is true or a timeout occurs. Useful for waiting - * on a server response or for a ui change (fadeIn, etc.) to occur. - * - * @param testFx javascript condition that evaluates to a boolean, - * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or - * as a callback function. - * @param onReady what to do when testFx condition is fulfilled, - * it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or - * as a callback function. - * @param timeOutMillis the max amount of time to wait. If not specified, 3 sec is used. - */ -function waitFor(testFx, onReady, timeOutMillis) { - var maxtimeOutMillis = timeOutMillis ? timeOutMillis : 3000, //< Default Max Timout is 3s - start = new Date().getTime(), - condition = false, - interval = setInterval(function() { - if ( (new Date().getTime() - start < maxtimeOutMillis) && !condition ) { - // If not time-out yet and condition not yet fulfilled - condition = (typeof(testFx) === "string" ? eval(testFx) : testFx()); //< defensive code - } else { - if(!condition) { - // If condition still not fulfilled (timeout but condition is 'false') - console.log("'waitFor()' timeout"); - phantom.exit(1); - } else { - // Condition fulfilled (timeout and/or condition is 'true') - console.log("'waitFor()' finished in " + (new Date().getTime() - start) + "ms."); - typeof(onReady) === "string" ? eval(onReady) : onReady(); //< Do what it's supposed to do once the condition is fulfilled - clearInterval(interval); //< Stop this interval - } - } - }, 250); //< repeat check every 250ms -}; - - -var page = require('webpage').create(); - -// Open Twitter on 'sencha' profile and, onPageLoad, do... -page.open("http://twitter.com/#!/sencha", function (status) { - // Check for page load success - if (status !== "success") { - console.log("Unable to access network"); - } else { - // Wait for 'signin-dropdown' to be visible - waitFor(function() { - // Check in the page if a specific element is now visible - return page.evaluate(function() { - return $("#signin-dropdown").is(":visible"); - }); - }, function() { - console.log("The sign-in dialog should be visible now."); - phantom.exit(); - }); - } -}); - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/walk_through_frames.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/walk_through_frames.coffee deleted file mode 100644 index 1838fa27..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/walk_through_frames.coffee +++ /dev/null @@ -1,66 +0,0 @@ -pageTitle = (page) -> - page.evaluate -> - window.document.title -setPageTitle = (page, newTitle) -> - page.evaluate ((newTitle) -> - window.document.title = newTitle - ), newTitle -p = require("webpage").create() -p.open "../test/webpage-spec-frames/index.html", (status) -> - console.log "pageTitle(): " + pageTitle(p) - console.log "currentFrameName(): " + p.currentFrameName() - console.log "childFramesCount(): " + p.childFramesCount() - console.log "childFramesName(): " + p.childFramesName() - console.log "setPageTitle(CURRENT TITLE+'-visited')" - setPageTitle p, pageTitle(p) + "-visited" - console.log "" - console.log "p.switchToChildFrame(\"frame1\"): " + p.switchToChildFrame("frame1") - console.log "pageTitle(): " + pageTitle(p) - console.log "currentFrameName(): " + p.currentFrameName() - console.log "childFramesCount(): " + p.childFramesCount() - console.log "childFramesName(): " + p.childFramesName() - console.log "setPageTitle(CURRENT TITLE+'-visited')" - setPageTitle p, pageTitle(p) + "-visited" - console.log "" - console.log "p.switchToChildFrame(\"frame1-2\"): " + p.switchToChildFrame("frame1-2") - console.log "pageTitle(): " + pageTitle(p) - console.log "currentFrameName(): " + p.currentFrameName() - console.log "childFramesCount(): " + p.childFramesCount() - console.log "childFramesName(): " + p.childFramesName() - console.log "setPageTitle(CURRENT TITLE+'-visited')" - setPageTitle p, pageTitle(p) + "-visited" - console.log "" - console.log "p.switchToParentFrame(): " + p.switchToParentFrame() - console.log "pageTitle(): " + pageTitle(p) - console.log "currentFrameName(): " + p.currentFrameName() - console.log "childFramesCount(): " + p.childFramesCount() - console.log "childFramesName(): " + p.childFramesName() - console.log "setPageTitle(CURRENT TITLE+'-visited')" - setPageTitle p, pageTitle(p) + "-visited" - console.log "" - console.log "p.switchToChildFrame(0): " + p.switchToChildFrame(0) - console.log "pageTitle(): " + pageTitle(p) - console.log "currentFrameName(): " + p.currentFrameName() - console.log "childFramesCount(): " + p.childFramesCount() - console.log "childFramesName(): " + p.childFramesName() - console.log "setPageTitle(CURRENT TITLE+'-visited')" - setPageTitle p, pageTitle(p) + "-visited" - console.log "" - console.log "p.switchToMainFrame()" - p.switchToMainFrame() - console.log "pageTitle(): " + pageTitle(p) - console.log "currentFrameName(): " + p.currentFrameName() - console.log "childFramesCount(): " + p.childFramesCount() - console.log "childFramesName(): " + p.childFramesName() - console.log "setPageTitle(CURRENT TITLE+'-visited')" - setPageTitle p, pageTitle(p) + "-visited" - console.log "" - console.log "p.switchToChildFrame(\"frame2\"): " + p.switchToChildFrame("frame2") - console.log "pageTitle(): " + pageTitle(p) - console.log "currentFrameName(): " + p.currentFrameName() - console.log "childFramesCount(): " + p.childFramesCount() - console.log "childFramesName(): " + p.childFramesName() - console.log "setPageTitle(CURRENT TITLE+'-visited')" - setPageTitle p, pageTitle(p) + "-visited" - console.log "" - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/walk_through_frames.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/walk_through_frames.js deleted file mode 100644 index 35c2bb9b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/walk_through_frames.js +++ /dev/null @@ -1,73 +0,0 @@ -var p = require("webpage").create(); - -function pageTitle(page) { - return page.evaluate(function(){ - return window.document.title; - }); -} - -function setPageTitle(page, newTitle) { - page.evaluate(function(newTitle){ - window.document.title = newTitle; - }, newTitle); -} - -p.open("../test/webpage-spec-frames/index.html", function(status) { - console.log("pageTitle(): " + pageTitle(p)); - console.log("currentFrameName(): "+p.currentFrameName()); - console.log("childFramesCount(): "+p.childFramesCount()); - console.log("childFramesName(): "+p.childFramesName()); - console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); - console.log(""); - - console.log("p.switchToChildFrame(\"frame1\"): "+p.switchToChildFrame("frame1")); - console.log("pageTitle(): " + pageTitle(p)); - console.log("currentFrameName(): "+p.currentFrameName()); - console.log("childFramesCount(): "+p.childFramesCount()); - console.log("childFramesName(): "+p.childFramesName()); - console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); - console.log(""); - - console.log("p.switchToChildFrame(\"frame1-2\"): "+p.switchToChildFrame("frame1-2")); - console.log("pageTitle(): " + pageTitle(p)); - console.log("currentFrameName(): "+p.currentFrameName()); - console.log("childFramesCount(): "+p.childFramesCount()); - console.log("childFramesName(): "+p.childFramesName()); - console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); - console.log(""); - - console.log("p.switchToParentFrame(): "+p.switchToParentFrame()); - console.log("pageTitle(): " + pageTitle(p)); - console.log("currentFrameName(): "+p.currentFrameName()); - console.log("childFramesCount(): "+p.childFramesCount()); - console.log("childFramesName(): "+p.childFramesName()); - console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); - console.log(""); - - console.log("p.switchToChildFrame(0): "+p.switchToChildFrame(0)); - console.log("pageTitle(): " + pageTitle(p)); - console.log("currentFrameName(): "+p.currentFrameName()); - console.log("childFramesCount(): "+p.childFramesCount()); - console.log("childFramesName(): "+p.childFramesName()); - console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); - console.log(""); - - console.log("p.switchToMainFrame()"); p.switchToMainFrame(); - console.log("pageTitle(): " + pageTitle(p)); - console.log("currentFrameName(): "+p.currentFrameName()); - console.log("childFramesCount(): "+p.childFramesCount()); - console.log("childFramesName(): "+p.childFramesName()); - console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); - console.log(""); - - console.log("p.switchToChildFrame(\"frame2\"): "+p.switchToChildFrame("frame2")); - console.log("pageTitle(): " + pageTitle(p)); - console.log("currentFrameName(): "+p.currentFrameName()); - console.log("childFramesCount(): "+p.childFramesCount()); - console.log("childFramesName(): "+p.childFramesName()); - console.log("setPageTitle(CURRENT TITLE+'-visited')"); setPageTitle(p, pageTitle(p) + "-visited"); - console.log(""); - - phantom.exit(); -}); - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/weather.coffee b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/weather.coffee deleted file mode 100644 index d8da90df..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/weather.coffee +++ /dev/null @@ -1,29 +0,0 @@ -page = require('webpage').create() -system = require 'system' - -city = 'Mountain View, California'; # default -if system.args.length > 1 - city = Array.prototype.slice.call(system.args, 1).join(' ') -url = encodeURI 'http://api.openweathermap.org/data/2.1/find/name?q=' + city - -console.log 'Checking weather condition for', city, '...' - -page.open url, (status) -> - if status isnt 'success' - console.log 'Error: Unable to access network!' - else - result = page.evaluate -> - return document.body.innerText - try - data = JSON.parse result - data = data.list[0] - console.log '' - console.log 'City:', data.name - console.log 'Condition:', data.weather.map (entry) -> - return entry.main - console.log 'Temperature:', Math.round(data.main.temp - 273.15), 'C' - console.log 'Humidity:', Math.round(data.main.humidity), '%' - catch e - console.log 'Error:', e.toString() - - phantom.exit() diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/weather.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/weather.js deleted file mode 100644 index 2b4e611b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/examples/weather.js +++ /dev/null @@ -1,37 +0,0 @@ -var page = require('webpage').create(), - system = require('system'), - city, - url; - -city = 'Mountain View, California'; // default -if (system.args.length > 1) { - city = Array.prototype.slice.call(system.args, 1).join(' '); -} -url = encodeURI('http://api.openweathermap.org/data/2.1/find/name?q=' + city); - -console.log('Checking weather condition for', city, '...'); - -page.open(url, function(status) { - var result, data; - if (status !== 'success') { - console.log('Error: Unable to access network!'); - } else { - result = page.evaluate(function () { - return document.body.innerText; - }); - try { - data = JSON.parse(result); - data = data.list[0]; - console.log(''); - console.log('City:', data.name); - console.log('Condition:', data.weather.map(function(entry) { - return entry.main; - }).join(', ')); - console.log('Temperature:', Math.round(data.main.temp - 273.15), 'C'); - console.log('Humidity:', Math.round(data.main.humidity), '%'); - } catch (e) { - console.log('Error:', e.toString()); - } - } - phantom.exit(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/third-party.txt b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/third-party.txt deleted file mode 100644 index 3b377f35..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantom/third-party.txt +++ /dev/null @@ -1,48 +0,0 @@ -This document contains the list of Third Party Software included with -PhantomJS, along with the license information. - -Third Party Software may impose additional restrictions and it is the -user's responsibility to ensure that they have met the licensing -requirements of PhantomJS and the relevant license of the Third Party -Software they are using. - -Qt - http://qt-project.org/ -License: GNU Lesser General Public License (LGPL) version 2.1. -Reference: http://qt-project.org/doc/qt-4.8/lgpl.html. - -WebKit - http://www.webkit.org/ -License: GNU Lesser General Public License (LGPL) version 2.1 and BSD. -Reference: http://www.webkit.org/coding/lgpl-license.html and -http://www.webkit.org/coding/bsd-license.html. - -Mongoose - https://github.com/valenok/mongoose -License: MIT -Reference: https://github.com/valenok/mongoose/blob/master/LICENSE - -Breakpad - http://code.google.com/p/google-breakpad/ -License: BSD. -Reference: http://code.google.com/p/google-breakpad/source/browse/trunk/COPYING. - -OpenSSL - http://www.openssl.org/ -License: OpenSSL License, SSLeay License. -Reference: http://www.openssl.org/source/license.html. - -Linenoise - https://github.com/tadmarshall/linenoise -License: BSD. -Reference: https://github.com/tadmarshall/linenoise/blob/master/linenoise.h. - -QCommandLine - http://xf.iksaif.net/dev/qcommandline.html -License: GNU Lesser General Public License (LGPL) version 2.1. -Reference: http://dev.iksaif.net/projects/qcommandline/repository/revisions/master/entry/COPYING - -CoffeeScript - http://coffeescript.org/ -License: MIT. -Reference: https://github.com/jashkenas/coffee-script/blob/master/README. - -GIFLIB - http://giflib.sourceforge.net/ -License: MIT -Reference: http://giflib.cvs.sourceforge.net/viewvc/giflib/giflib/COPYING - -wkhtmlpdf - http://code.google.com/p/wkhtmltopdf/ -License: GNU Lesser General Public License (LGPL) -Reference: http://code.google.com/p/wkhtmltopdf/ diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantomjs.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantomjs.js deleted file mode 100644 index 19382ca9..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/lib/phantomjs.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright 2013 The Obvious Corporation. - -/** - * @fileoverview Helpers made available via require('phantomjs') once package is - * installed. - */ - -var fs = require('fs') -var path = require('path') -var which = require('which') - - -/** - * Where the phantom binary can be found. - * @type {string} - */ -try { - exports.path = path.resolve(__dirname, require('./location').location) -} catch(e) { - // Must be running inside install script. - exports.path = null -} - - -/** - * The version of phantomjs installed by this package. - * @type {number} - */ -exports.version = '1.9.2' - - -/** - * Returns a clean path that helps avoid `which` finding bin files installed - * by NPM for this repo. - * @param {string} path - * @return {string} - */ -exports.cleanPath = function (path) { - return path - .replace(/:[^:]*node_modules[^:]*/g, '') - .replace(/(^|:)\.\/bin(\:|$)/g, ':') - .replace(/^:+/, '') - .replace(/:+$/, '') -} - - -// Make sure the binary is executable. For some reason doing this inside -// install does not work correctly, likely due to some NPM step. -if (exports.path) { - try { - fs.chmodSync(exports.path, '755') - } catch (e) { - // Just ignore error if we don't have permission. - // We did our best. Likely because phantomjs was already installed. - } -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/ncp b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/ncp deleted file mode 100755 index 388eaba6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/ncp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - - - - -var ncp = require('../lib/ncp'), - args = process.argv.slice(2), - source, dest; - -if (args.length < 2) { - console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); - process.exit(1); -} - -// parse arguments the hard way -function startsWith(str, prefix) { - return str.substr(0, prefix.length) == prefix; -} - -var options = {}; -args.forEach(function (arg) { - if (startsWith(arg, "--limit=")) { - options.limit = parseInt(arg.split('=', 2)[1], 10); - } - if (startsWith(arg, "--filter=")) { - options.filter = new RegExp(arg.split('=', 2)[1]); - } - if (startsWith(arg, "--stoponerr")) { - options.stopOnErr = true; - } -}); - -ncp.ncp(args[0], args[1], options, function (err) { - if (Array.isArray(err)) { - console.error('There were errors during the copy.'); - err.forEach(function (err) { - console.error(err.stack || err.message); - }); - process.exit(1); - } - else if (err) { - console.error('An error has occurred.'); - console.error(err.stack || err.message); - process.exit(1); - } -}); - - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/rimraf b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/rimraf deleted file mode 100755 index 29bfa8a6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/rimraf +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf ') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/which b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/which deleted file mode 100755 index 8432ce2f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/.bin/which +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) { - console.error("Usage: which ") - process.exit(1) -} - -which(process.argv[2], function (er, thing) { - if (er) { - console.error(er.message) - process.exit(er.errno || 127) - } - console.log(thing) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/.travis.yml b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/.travis.yml deleted file mode 100644 index 90afc1ed..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/MIT-LICENSE.txt b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/MIT-LICENSE.txt deleted file mode 100644 index 14c3ee5c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/MIT-LICENSE.txt +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) 2012 Another-D-Mention Software and other contributors, -http://www.another-d-mention.ro/ - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/README.md deleted file mode 100644 index 84296fbb..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/README.md +++ /dev/null @@ -1,64 +0,0 @@ -# ADM-ZIP for NodeJS - -ADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). - -# Installation - -With [npm](http://npmjs.org) do: - - $ npm install adm-zip - -## What is it good for? -The library allows you to: - -* decompress zip files directly to disk or in memory buffers -* compress files and store them to disk in .zip format or in compressed buffers -* update content of/add new/delete files from an existing .zip - -# Dependencies -There are no other nodeJS libraries that ADM-ZIP is dependent of - -# Examples - -## Basic usage -```javascript - - var AdmZip = require('adm-zip'); - - // reading archives - var zip = new AdmZip("./my_file.zip"); - var zipEntries = zip.getEntries(); // an array of ZipEntry records - - zipEntries.forEach(function(zipEntry) { - console.log(zipEntry.toString()); // outputs zip entries information - if (zipEntry.entryName == "my_file.txt") { - console.log(zipEntry.data.toString('utf8')); - } - }); - // outputs the content of some_folder/my_file.txt - console.log(zip.readAsText("some_folder/my_file.txt")); - // extracts the specified file to the specified location - zip.extractEntryTo(/*entry name*/"some_folder/my_file.txt", /*target path*/"/home/me/tempfolder", /*overwrite*/true) - // extracts everything - zip.extractAllTo(/*target path*/"/home/me/zipcontent/", /*overwrite*/true); - - - // creating archives - var zip = new AdmZip(); - - // add file directly - zip.addFile("test.txt", new Buffer("inner content of the file"), "entry comment goes here"); - // add local file - zip.addLocalFile("/home/me/some_picture.png"); - // get everything as a buffer - var willSendthis = zip.toBuffer(); - // or write everything to disk - zip.writeZip(/*target file name*/"/home/me/files.zip"); - - - // ... more examples in the wiki -``` - -For more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki). - -[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip) \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/adm-zip.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/adm-zip.js deleted file mode 100644 index 5d962b51..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/adm-zip.js +++ /dev/null @@ -1,405 +0,0 @@ -var fs = require("fs"), - buffer = require("buffer"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -var ZipEntry = require("./zipEntry"), - ZipFile = require("./zipFile"), - Utils = require("./util"); - -module.exports = function(/*String*/inPath) { - var _zip = undefined, - _filename = ""; - - if (inPath && typeof inPath === "string") { // load zip file - if (fs.existsSync(inPath)) { - _filename = inPath; - _zip = new ZipFile(fs.readFileSync(inPath)); - } else { - throw Utils.Errors.INVALID_FILENAME; - } - } else if(inPath && Buffer.isBuffer(inPath)) { // load buffer - _zip = new ZipFile(inPath); - } else { // create new zip file - _zip = new ZipFile(); - } - - function getEntry(/*Object*/entry) { - if (entry && _zip) { - var item; - // If entry was given as a file name - if (typeof entry === "string") - item = _zip.getEntry(entry); - // if entry was given as a ZipEntry object - if (typeof entry === "object" && entry.entryName != undefined && entry.header != undefined) - item = _zip.getEntry(entry.entryName); - - if (item) { - return item; - } - } - return null; - } - - //process.on('uncaughtException', function (err) { - // console.log('Caught exception: ' + err); - //}); - - return { - /** - * Extracts the given entry from the archive and returns the content as a Buffer object - * @param entry ZipEntry object or String with the full path of the entry - * - * @return Buffer or Null in case of error - */ - readFile : function(/*Object*/entry) { - var item = getEntry(entry); - return item && item.getData() || null; - }, - /** - * Asynchronous readFile - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * - * @return Buffer or Null in case of error - */ - readFileAsync : function(/*Object*/entry, /*Function*/callback) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(callback); - } else { - callback(null,"getEntry failed for:" + entry) - } - }, - /** - * Extracts the given entry from the archive and returns the content as plain text in the given encoding - * @param entry ZipEntry object or String with the full path of the entry - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsText : function(/*Object*/entry, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - var data = item.getData(); - if (data && data.length) { - return data.toString(encoding || "utf8"); - } - } - return ""; - }, - /** - * Asynchronous readAsText - * @param entry ZipEntry object or String with the full path of the entry - * @param callback - * @param encoding Optional. If no encoding is specified utf8 is used - * - * @return String - */ - readAsTextAsync : function(/*Object*/entry, /*Function*/callback, /*String - Optional*/encoding) { - var item = getEntry(entry); - if (item) { - item.getDataAsync(function(data) { - if (data && data.length) { - callback(data.toString(encoding || "utf8")); - } else { - callback(""); - } - }) - } else { - callback(""); - } - }, - - /** - * Remove the entry from the file or the entry and all it's nested directories and files if the given entry is a directory - * - * @param entry - */ - deleteFile : function(/*Object*/entry) { // @TODO: test deleteFile - var item = getEntry(entry); - if (item) { - _zip.deleteEntry(item.entryName); - } - }, - - /** - * Adds a comment to the zip. The zip must be rewritten after adding the comment. - * - * @param comment - */ - addZipComment : function(/*String*/comment) { // @TODO: test addZipComment - _zip.comment = comment; - }, - - /** - * Returns the zip comment - * - * @return String - */ - getZipComment : function() { - return _zip.comment || ''; - }, - - /** - * Adds a comment to a specified zipEntry. The zip must be rewritten after adding the comment - * The comment cannot exceed 65535 characters in length - * - * @param entry - * @param comment - */ - addZipEntryComment : function(/*Object*/entry,/*String*/comment) { - var item = getEntry(entry); - if (item) { - item.comment = comment; - } - }, - - /** - * Returns the comment of the specified entry - * - * @param entry - * @return String - */ - getZipEntryComment : function(/*Object*/entry) { - var item = getEntry(entry); - if (item) { - return item.comment || ''; - } - return '' - }, - - /** - * Updates the content of an existing entry inside the archive. The zip must be rewritten after updating the content - * - * @param entry - * @param content - */ - updateFile : function(/*Object*/entry, /*Buffer*/content) { - var item = getEntry(entry); - if (item) { - item.setData(content); - } - }, - - /** - * Adds a file from the disk to the archive - * - * @param localPath - */ - addLocalFile : function(/*String*/localPath) { - if (fs.existsSync(localPath)) { - var entry = new ZipEntry(); - entry.entryName = localPath.split("\\").join("/"); //windows fix - var stats = fs.statSync(localPath); - entry.setData(fs.readFileSync(localPath)); - entry.header.inAttr = stats.mode; - entry.header.attr = stats.mode; - entry.attr = stats.mode; - entry.header.time = stats.mtime; - _zip.setEntry(entry); - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Adds a local directory and all its nested files and directories to the archive - * - * @param localPath - */ - addLocalFolder : function(/*String*/localPath) { - localPath = localPath.split("\\").join("/"); //windows fix - if (localPath.charAt(localPath.length - 1) != "/") - localPath += "/"; - - if (fs.existsSync(localPath)) { - var items = Utils.findFiles(localPath); - if (items.length) { - items.forEach(function(path) { - var entry = new ZipEntry(); - entry.entryName = path.split("\\").join("/").replace(localPath, ""); //windows fix - var stats = fs.statSync(path); - if (stats.isDirectory()) { - entry.setData(""); - entry.header.inAttr = stats.mode; - entry.header.attr = stats.mode - } else { - entry.setData(fs.readFileSync(path)); - entry.header.inAttr = stats.mode; - entry.header.attr = stats.mode - } - entry.attr = stats.mode; - entry.header.time = stats.mtime; - _zip.setEntry(entry); - }); - } - } else { - throw Utils.Errors.FILE_NOT_FOUND.replace("%s", localPath); - } - }, - - /** - * Allows you to create a entry (file or directory) in the zip file. - * If you want to create a directory the entryName must end in / and a null buffer should be provided. - * Comment and attributes are optional - * - * @param entryName - * @param content - * @param comment - * @param attr - */ - addFile : function(/*String*/entryName, /*Buffer*/content, /*String*/comment, /*Number*/attr) { - var entry = new ZipEntry(); - entry.entryName = entryName; - entry.comment = comment || ""; - entry.attr = attr || 0666; - if (entry.isDirectory && content.length) { - throw Utils.Errors.DIRECTORY_CONTENT_ERROR; - } - entry.setData(content); - entry.header.time = new Date(); - _zip.setEntry(entry); - }, - - /** - * Returns an array of ZipEntry objects representing the files and folders inside the archive - * - * @return Array - */ - getEntries : function() { - if (_zip) { - return _zip.entries; - } else { - return []; - } - }, - - /** - * Returns a ZipEntry object representing the file or folder specified by ``name``. - * - * @param name - * @return ZipEntry - */ - getEntry : function(/*String*/name) { - return getEntry(name); - }, - - /** - * Extracts the given entry to the given targetPath - * If the entry is a directory inside the archive, the entire directory and it's subdirectories will be extracted - * - * @param entry ZipEntry object or String with the full path of the entry - * @param targetPath Target folder where to write the file - * @param maintainEntryPath If maintainEntryPath is true and the entry is inside a folder, the entry folder - * will be created in targetPath as well. Default is TRUE - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - * - * @return Boolean - */ - extractEntryTo : function(/*Object*/entry, /*String*/targetPath, /*Boolean*/maintainEntryPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - maintainEntryPath = typeof maintainEntryPath == "undefined" ? true : maintainEntryPath; - - var item = getEntry(entry); - if (!item) { - throw Utils.Errors.NO_ENTRY; - } - - var target = pth.resolve(targetPath, maintainEntryPath ? item.entryName : pth.basename(item.entryName)); - - if (item.isDirectory) { - target = pth.resolve(target, ".."); - var children = _zip.getEntryChildren(item); - children.forEach(function(child) { - if (child.isDirectory) return; - var content = child.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE; - } - Utils.writeFileTo(pth.resolve(targetPath, maintainEntryPath ? child.entryName : child.entryName.substr(item.entryName.length)), content, overwrite); - }); - return true; - } - - var content = item.getData(); - if (!content) throw Utils.Errors.CANT_EXTRACT_FILE; - - if (fs.existsSync(targetPath) && !overwrite) { - throw Utils.Errors.CANT_OVERRIDE; - } - Utils.writeFileTo(target, content, overwrite); - - return true; - }, - - /** - * Extracts the entire archive to the given location - * - * @param targetPath Target location - * @param overwrite If the file already exists at the target path, the file will be overwriten if this is true. - * Default is FALSE - */ - extractAllTo : function(/*String*/targetPath, /*Boolean*/overwrite) { - overwrite = overwrite || false; - if (!_zip) { - throw Utils.Errors.NO_ZIP; - } - - _zip.entries.forEach(function(entry) { - if (entry.isDirectory) return; - var content = entry.getData(); - if (!content) { - throw Utils.Errors.CANT_EXTRACT_FILE + "2"; - } - Utils.writeFileTo(pth.resolve(targetPath, entry.entryName), content, overwrite); - }) - }, - - /** - * Writes the newly created zip file to disk at the specified location or if a zip was opened and no ``targetFileName`` is provided, it will overwrite the opened zip - * - * @param targetFileName - */ - writeZip : function(/*String*/targetFileName, /*Function*/callback) { - if (arguments.length == 1) { - if (typeof targetFileName == "function") { - callback = targetFileName; - targetFileName = ""; - } - } - - if (!targetFileName && _filename) { - targetFileName = _filename; - } - if (!targetFileName) return; - - var zipData = _zip.toBuffer(); - if (zipData) { - Utils.writeFileTo(targetFileName, zipData, true); - } - }, - - /** - * Returns the content of the entire zip file as a Buffer object - * - * @return Buffer - */ - toBuffer : function(/*Function*/callback) { - this.valueOf = 2; - if (typeof callback == "function") { - _zip.toAsyncBuffer(callback); - return null; - } - return _zip.toBuffer() - } - - /*get lastError () { - var x = function() { console.log("2", arguments); }; - x.prototype = 2 - return x; // - } */ - } -}; diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/dataHeader.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/dataHeader.js deleted file mode 100644 index 92036118..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/dataHeader.js +++ /dev/null @@ -1,133 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The local file header */ -module.exports = function () { - var _version = 0x0A, - _flags = 0, - _method = 0, - _time = 0, - _crc = 0, - _compressedSize = 0, - _size = 0, - _fnameLen = 0, - _extraLen = 0; - - return { - get version () { return _version; }, - set version (val) { _version = 0x0A }, - - get flags () { return _flags }, - set flags (val) { _flags = val; }, - - get method () { return _method; }, - set method (val) { _method = val; }, - - get time () { - return new Date( - ((_time >> 25) & 0x7f) + 1980, - ((_time >> 21) & 0x0f) - 1, - (_time >> 16) & 0x1f, - (_time >> 11) & 0x1f, - (_time >> 5) & 0x3f, - (_time & 0x1f) << 1 - ); - }, - set time (val) { - val = new Date(val); - _time = (val.getFullYear() - 1980 & 0x7f) << 25 - | (val.getMonth() + 1) << 21 - | val.getDay() << 16 - | val.getHours() << 11 - | val.getMinutes() << 5 - | val.getSeconds() >> 1; - }, - - get crc () { return _crc; }, - set crc (val) { _crc = val; }, - - get compressedSize () { return _compressedSize; }, - set compressedSize (val) { _compressedSize = val; }, - - get size () { return _size; }, - set size (val) { _size = val; }, - - get fileNameLength () { return _fnameLen; }, - set fileNameLenght (val) { _fnameLen = val; }, - - get extraLength () { return _extraLen }, - set extraLength (val) { _extraLen = val; }, - - get encripted () { return (_flags & 1) == 1 }, - - get fileHeaderSize () { - return Constants.LOCHDR + _fnameLen + _extraLen; - }, - - loadFromBinary : function(/*Buffer*/data) { - // 30 bytes and should start with "PK\003\004" - if (data.length != Constants.LOCHDR || data.readUInt32LE(0) != Constants.LOCSIG) { - throw Utils.Errors.INVALID_LOC; - } - // version needed to extract - _version = data.readUInt16LE(Constants.LOCVER); - // general purpose bit flag - _flags = data.readUInt16LE(Constants.LOCFLG); - // compression method - _method = data.readUInt16LE(Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - _time = data.readUInt32LE(Constants.LOCTIM); - // uncompressed file crc-32 value - _crc = data.readUInt32LE(Constants.LOCCRC); - // compressed size - _compressedSize = data.readUInt32LE(Constants.LOCSIZ); - // uncompressed size - _size = data.readUInt32LE(Constants.LOCLEN); - // filename length - _fnameLen = data.readUInt16LE(Constants.LOCNAM); - // extra field length - _extraLen = data.readUInt16LE(Constants.LOCEXT); - }, - - toBinary : function() { - // LOC header size (30 bytes) - var data = new Buffer(Constants.LOCHDR); - // "PK\003\004" - data.writeUInt32LE(Constants.LOCSIG, 0); - // version needed to extract - data.writeUInt16LE(_version, Constants.LOCVER); - // general purpose bit flag - data.writeUInt16LE(_flags, Constants.LOCFLG); - // compression method - data.writeUInt16LE(_method, Constants.LOCHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.LOCTIM); - // uncompressed file crc-32 value - data.writeUInt32LE(_crc, Constants.LOCCRC); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.LOCSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.LOCLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.LOCNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.LOCEXT); - return data; - }, - - toString : function() { - return '{\n' + - '\t"version" : ' + _version + ",\n" + - '\t"flags" : ' + _flags + ",\n" + - '\t"method" : ' + Utils.methodToString(_method) + ",\n" + - '\t"time" : ' + _time + ",\n" + - '\t"crc" : 0x' + _crc.toString(16).toUpperCase() + ",\n" + - '\t"compressedSize" : ' + _compressedSize + " bytes,\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"fnameLen" : ' + _fnameLen + ",\n" + - '\t"extraLen" : ' + _extraLen + " bytes,\n" + - '\t"fileHeaderSize" : ' + (Constants.LOCHDR + _fnameLen + _extraLen) + " bytes\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/entryHeader.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/entryHeader.js deleted file mode 100644 index 56fee207..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/entryHeader.js +++ /dev/null @@ -1,187 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The central directory file header */ -module.exports = function () { - var _verMade = 0x0A, - _version = 10, - _flags = 0, - _method = 0, - _time = 0, - _crc = 0, - _compressedSize = 0, - _size = 0, - _fnameLen = 0, - _extraLen = 0, - _comLen = 0, - _diskStart = 0, - _inattr = 438, - _attr = 438, - _offset = 0; - - return { - get made () { return _verMade; }, - set made (val) { _verMade = val; }, - - get version () { return _version; }, - set version (val) { _version = val }, - - get flags () { return _flags }, - set flags (val) { _flags = val; }, - - get method () { return _method; }, - set method (val) { _method = val; }, - - get time () { return new Date( - ((_time >> 25) & 0x7f) + 1980, - ((_time >> 21) & 0x0f) - 1, - (_time >> 16) & 0x1f, - (_time >> 11) & 0x1f, - (_time >> 5) & 0x3f, - (_time & 0x1f) << 1 - ); - }, - set time (val) { val = new Date(val); - _time = (val.getFullYear() - 1980 & 0x7f) << 25 - | (val.getMonth() + 1) << 21 - | val.getDay() << 16 - | val.getHours() << 11 - | val.getMinutes() << 5 - | val.getSeconds() >> 1; - }, - - get crc () { return _crc; }, - set crc (val) { _crc = val; }, - - get compressedSize () { return _compressedSize; }, - set compressedSize (val) { _compressedSize = val; }, - - get size () { return _size; }, - set size (val) { _size = val; }, - - get fileNameLength () { return _fnameLen; }, - set fileNameLength (val) { _fnameLen = val; }, - - get extraLength () { return _extraLen }, - set extraLength (val) { _extraLen = val; }, - - get commentLength () { return _comLen }, - set commentLength (val) { _comLen = val }, - - get diskNumStart () { return _diskStart }, - set diskNumStart (val) { _diskStart = val }, - - get inAttr () { return _inattr }, - set inAttr (val) { _inattr = val }, - - get attr () { return _attr }, - set attr (val) { _attr = val }, - - get offset () { return _offset }, - set offset (val) { _offset = val }, - - get encripted () { return (_flags & 1) == 1 }, - - get entryHeaderSize () { - return Constants.CENHDR + _fnameLen + _extraLen + _comLen; - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 46 bytes and start with "PK 01 02" - if (data.length != Constants.CENHDR || data.readUInt32LE(0) != Constants.CENSIG) { - throw Utils.Errors.INVALID_CEN; - } - // version made by - _verMade = data.readUInt16LE(Constants.CENVEM); - // version needed to extract - _version = data.readUInt16LE(Constants.CENVER); - // encrypt, decrypt flags - _flags = data.readUInt16LE(Constants.CENFLG); - // compression method - _method = data.readUInt16LE(Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - _time = data.readUInt32LE(Constants.CENTIM); - // uncompressed file crc-32 value - _crc = data.readUInt32LE(Constants.CENCRC); - // compressed size - _compressedSize = data.readUInt32LE(Constants.CENSIZ); - // uncompressed size - _size = data.readUInt32LE(Constants.CENLEN); - // filename length - _fnameLen = data.readUInt16LE(Constants.CENNAM); - // extra field length - _extraLen = data.readUInt16LE(Constants.CENEXT); - // file comment length - _comLen = data.readUInt16LE(Constants.CENCOM); - // volume number start - _diskStart = data.readUInt16LE(Constants.CENDSK); - // internal file attributes - _inattr = data.readUInt16LE(Constants.CENATT); - // external file attributes - _attr = data.readUInt32LE(Constants.CENATX); - // LOC header offset - _offset = data.readUInt32LE(Constants.CENOFF); - }, - - toBinary : function() { - // CEN header size (46 bytes) - var data = new Buffer(Constants.CENHDR + _fnameLen + _extraLen + _comLen); - // "PK\001\002" - data.writeUInt32LE(Constants.CENSIG, 0); - // version made by - data.writeUInt16LE(_verMade, Constants.CENVEM); - // version needed to extract - data.writeUInt16LE(_version, Constants.CENVER); - // encrypt, decrypt flags - data.writeUInt16LE(_flags, Constants.CENFLG); - // compression method - data.writeUInt16LE(_method, Constants.CENHOW); - // modification time (2 bytes time, 2 bytes date) - data.writeUInt32LE(_time, Constants.CENTIM); - // uncompressed file crc-32 value - data.writeInt32LE(_crc, Constants.CENCRC, true); - // compressed size - data.writeUInt32LE(_compressedSize, Constants.CENSIZ); - // uncompressed size - data.writeUInt32LE(_size, Constants.CENLEN); - // filename length - data.writeUInt16LE(_fnameLen, Constants.CENNAM); - // extra field length - data.writeUInt16LE(_extraLen, Constants.CENEXT); - // file comment length - data.writeUInt16LE(_comLen, Constants.CENCOM); - // volume number start - data.writeUInt16LE(_diskStart, Constants.CENDSK); - // internal file attributes - data.writeUInt16LE(_inattr, Constants.CENATT); - // external file attributes - data.writeUInt32LE(_attr, Constants.CENATX); - // LOC header offset - data.writeUInt32LE(_offset, Constants.CENOFF); - // fill all with - data.fill(0x00, Constants.CENHDR); - return data; - }, - - toString : function() { - return '{\n' + - '\t"made" : ' + _verMade + ",\n" + - '\t"version" : ' + _version + ",\n" + - '\t"flags" : ' + _flags + ",\n" + - '\t"method" : ' + Utils.methodToString(_method) + ",\n" + - '\t"time" : ' + _time + ",\n" + - '\t"crc" : 0x' + _crc.toString(16).toUpperCase() + ",\n" + - '\t"compressedSize" : ' + _compressedSize + " bytes,\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"fileNameLength" : ' + _fnameLen + ",\n" + - '\t"extraLength" : ' + _extraLen + " bytes,\n" + - '\t"commentLength" : ' + _comLen + " bytes,\n" + - '\t"diskNumStart" : ' + _diskStart + ",\n" + - '\t"inAttr" : ' + _inattr + ",\n" + - '\t"attr" : ' + _attr + ",\n" + - '\t"offset" : ' + _offset + ",\n" + - '\t"entryHeaderSize" : ' + (Constants.CENHDR + _fnameLen + _extraLen + _comLen) + " bytes\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/index.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/index.js deleted file mode 100644 index 932a98cc..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/index.js +++ /dev/null @@ -1,3 +0,0 @@ -exports.EntryHeader = require("./entryHeader"); -exports.DataHeader = require("./dataHeader"); -exports.MainHeader = require("./mainHeader"); \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/mainHeader.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/mainHeader.js deleted file mode 100644 index de8ae1a9..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/headers/mainHeader.js +++ /dev/null @@ -1,80 +0,0 @@ -var Utils = require("../util"), - Constants = Utils.Constants; - -/* The entries in the end of central directory */ -module.exports = function () { - var _volumeEntries = 0, - _totalEntries = 0, - _size = 0, - _offset = 0, - _commentLength = 0; - - return { - get diskEntries () { return _volumeEntries }, - set diskEntries (/*Number*/val) { _volumeEntries = _totalEntries = val; }, - - get totalEntries () { return _totalEntries }, - set totalEntries (/*Number*/val) { _totalEntries = _volumeEntries = val; }, - - get size () { return _size }, - set size (/*Number*/val) { _size = val; }, - - get offset () { return _offset }, - set offset (/*Number*/val) { _offset = val; }, - - get commentLength () { return _commentLength }, - set commentLength (/*Number*/val) { _commentLength = val; }, - - get mainHeaderSize () { - return Constants.ENDHDR + _commentLength; - }, - - loadFromBinary : function(/*Buffer*/data) { - // data should be 22 bytes and start with "PK 05 06" - if (data.length != Constants.ENDHDR || data.readUInt32LE(0) != Constants.ENDSIG) - throw Utils.Errors.INVALID_END; - - // number of entries on this volume - _volumeEntries = data.readUInt16LE(Constants.ENDSUB); - // total number of entries - _totalEntries = data.readUInt16LE(Constants.ENDTOT); - // central directory size in bytes - _size = data.readUInt32LE(Constants.ENDSIZ); - // offset of first CEN header - _offset = data.readUInt32LE(Constants.ENDOFF); - // zip file comment length - _commentLength = data.readUInt16LE(Constants.ENDCOM); - }, - - toBinary : function() { - var b = new Buffer(Constants.ENDHDR + _commentLength); - // "PK 05 06" signature - b.writeUInt32LE(Constants.ENDSIG, 0); - b.writeUInt32LE(0, 4); - // number of entries on this volume - b.writeUInt16LE(_volumeEntries, Constants.ENDSUB); - // total number of entries - b.writeUInt16LE(_totalEntries, Constants.ENDTOT); - // central directory size in bytes - b.writeUInt32LE(_size, Constants.ENDSIZ); - // offset of first CEN header - b.writeUInt32LE(_offset, Constants.ENDOFF); - // zip file comment length - b.writeUInt16LE(_commentLength, Constants.ENDCOM); - // fill comment memory with spaces so no garbage is left there - b.fill(" ", Constants.ENDHDR); - - return b; - }, - - toString : function() { - return '{\n' + - '\t"diskEntries" : ' + _volumeEntries + ",\n" + - '\t"totalEntries" : ' + _totalEntries + ",\n" + - '\t"size" : ' + _size + " bytes,\n" + - '\t"offset" : 0x' + _offset.toString(16).toUpperCase() + ",\n" + - '\t"commentLength" : 0x' + _commentLength + "\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/deflater.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/deflater.js deleted file mode 100644 index b126d465..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/deflater.js +++ /dev/null @@ -1,1051 +0,0 @@ -function JSDeflater(/*inbuff*/inbuf) { - - var WSIZE = 0x8000, // Sliding Window size - WINDOW_SIZE = 0x10000, - - /* for deflate */ - MIN_MATCH = 0x03, - MAX_MATCH = 0x102, - LIT_BUFSIZE = 0x2000, - MAX_DIST = 0x7EFA, - MAX_BITS = 0x0F, - MAX_BL_BITS = 0x07, - L_CODES = 0x11E, - D_CODES = 0x1E, - BL_CODES = 0x13, - REP_3_6 = 0x10, - REPZ_3_10 = 0x11, - REPZ_11_138 = 0x12, - HEAP_SIZE = 2 * L_CODES + 1, - H_SHIFT = parseInt((0x10 + MIN_MATCH - 1) / MIN_MATCH), - - /* variables */ - freeQueue, - qHead, qTail, - initFlag, - outbuf = null, - outcnt, outoff, - complete, - window, - dBuf, - lBuf, - prev, - biBuf, - biValid, - blockStart, - zip_ins_h, - hashHead, - prevMatch, - matchAvailable, - matchLength, - matchStart, - prevLength, - dataStart, - eofile, - lookahead, - maxChainLength, - maxLazyMatch, - compression_level, - goodMatch, - dynLTree = [], - dynDTree = [], - staticLTree = [], - staticDTree = [], - blTree = [], - lDesc, - dDesc, - blDesc, - blCount, - zip_heap, - heapLen, - heapMax, - depth, - lengthCode, - distCode, - baseLength, - baseDist, - flagBuf, - lastLit, - lastDist, - lastFlags, - flags, - flagBit, - optLen, - staticLen, - deflateData, - deflatePos, - - elbits = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], - edbits = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - eblbits = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], - blorder = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - function deflateTreeDesc() { - return { - dyn_tree : null, // the dynamic tree - static_tree : null, // corresponding static tree or NULL - extra_bits : null, // extra bits for each code or NULL - extra_base : 0, // base index for extra_bits - elems : 0, // max number of elements in the tree - max_length : 0, // max bit length for the codes - max_code : 0 - } - } - - function deflateStart(level) { - var i; - compression_level = !level && 9 || level > 9 && 9 || level; - initFlag = false; - eofile = false; - - if(outbuf != null) - return; - - freeQueue = qHead = qTail = null; - outbuf = new Buffer(LIT_BUFSIZE); - window = new Buffer(WINDOW_SIZE); - - dBuf = new Array(LIT_BUFSIZE); - lBuf = new Array(inbuf.length + 0x64); // 0x64 extra buffer length - prev = new Array(0x10000); - - for(i = 0; i < HEAP_SIZE; i++) dynLTree[i] = {fc:0, dl:0}; - for(i = 0; i < 2 * D_CODES + 1; i++) dynDTree[i] = {fc:0, dl:0}; - for(i = 0; i < L_CODES + 2; i++) staticLTree[i] = {fc:0, dl:0}; - for(i = 0; i < D_CODES; i++) staticDTree[i] = {fc:0, dl:0}; - for(i = 0; i < 2 * BL_CODES + 1; i++) blTree[i] = {fc:0, dl:0}; - - lDesc = deflateTreeDesc(); - dDesc = deflateTreeDesc(); - blDesc = deflateTreeDesc(); - - blCount = new Buffer(MAX_BITS + 1); - zip_heap = new Array(2 * L_CODES + 1); - depth = new Buffer(2 * L_CODES + 1); - lengthCode = new Buffer(MAX_MATCH - MIN_MATCH + 1); - distCode = new Buffer(0x200); - baseLength = new Buffer(0x1D); - baseDist = new Buffer(D_CODES); - flagBuf = new Buffer(parseInt(LIT_BUFSIZE / 8)); - } - - function cleanup() { - freeQueue = qHead = qTail = null; - outbuf = null; - window = null; - dBuf = null; - lBuf = null; - prev = null; - dynLTree = null; - dynDTree = null; - staticLTree = null; - staticDTree = null; - blTree = null; - lDesc = null; - dDesc = null; - blDesc = null; - blCount = null; - zip_heap = null; - depth = null; - lengthCode = null; - distCode = null; - baseLength = null; - baseDist = null; - flagBuf = null; - } - - function writeByte(c) { - outbuf[outoff + outcnt++] = c; - if(outoff + outcnt == LIT_BUFSIZE) { - if(outcnt != 0) { - var q, i; - if (freeQueue != null) { - q = freeQueue; - freeQueue = freeQueue.next; - } else { - q = { - "next" : null, - "len" : 0, - "ptr" : new Buffer(LIT_BUFSIZE), - "off" : 0 - } - } - q.next = null; - q.len = q.off = 0; - - if(qHead == null) - qHead = qTail = q; - else - qTail = qTail.next = q; - - q.len = outcnt - outoff; - for(i = 0; i < q.len; i++) - q.ptr[i] = outbuf[outoff + i]; - outcnt = outoff = 0; - } - } - } - - function writeShort(w) { - w &= 0xffff; - if(outoff + outcnt < LIT_BUFSIZE - 2) { - outbuf[outoff + outcnt++] = (w & 0xff); - outbuf[outoff + outcnt++] = (w >>> 8); - } else { - writeByte(w & 0xff); - writeByte(w >>> 8); - } - return true; - } - - function insertString() { - zip_ins_h = ((zip_ins_h << H_SHIFT) ^ (window[dataStart + MIN_MATCH - 1] & 0xff)) & 0x1FFF; - hashHead = prev[WSIZE + zip_ins_h]; - prev[dataStart & 0x7FFF] = hashHead; - prev[WSIZE + zip_ins_h] = dataStart; - } - - function sendCode(c, tree) { - sendBits(tree[c].fc, tree[c].dl); - } - - function zip_D_CODE(dist) { - return (dist < 256 ? distCode[dist] - : distCode[256 + (dist>>7)]) & 0xff; - } - - function smaller(tree, n, m) { - return tree[n].fc < tree[m].fc || - (tree[n].fc == tree[m].fc && depth[n] <= depth[m]); - } - - function readBuff(buff, offset, n) { - var i, len = deflateData.length; - for(i = 0; i < n && deflatePos < len; i++) { - buff[offset + i] = deflateData[deflatePos++]; - } - return i; - } - - function lmInit() { - var j; - - for(j = 0; j < 0x2000; j++) prev[WSIZE + j] = 0; - - goodMatch = [0x0, 0x4, 0x4, 0x4, 0x4, 0x8, 0x8, 0x8, 0x20, 0x20][compression_level]; - maxLazyMatch = [0x0, 0x4, 0x5, 0x6, 0x4, 0x10, 0x10, 0x20, 0x80, 0x102][compression_level]; - maxChainLength = [0x0, 0x4, 0x8, 0x20, 0x10, 0x20, 0x80, 0x100, 0x400, 0x1000][compression_level]; - - dataStart = 0; - blockStart = 0; - - lookahead = readBuff(window, 0, 2 * WSIZE); - if(lookahead <= 0) { - eofile = true; - lookahead = 0; - return; - } - eofile = false; - - while(lookahead < 0x106 && !eofile) - fillWindow(); - - zip_ins_h = 0; - for(j = 0; j < MIN_MATCH - 1; j++) { - zip_ins_h = ((zip_ins_h << H_SHIFT) ^ (window[j] & 0xFF)) & 0x1FFF; - } - } - - function longestMatch(cur_match) { - var chain_length = maxChainLength, // max hash chain length - scanp = dataStart, // current string - matchp, // matched string - len, // length of current match - best_len = prevLength, // best match length so far - limit = (dataStart > MAX_DIST ? dataStart - MAX_DIST : 0), - strendp = dataStart + MAX_MATCH, - scan_end1 = window[scanp + best_len - 1], - scan_end = window[scanp + best_len]; - - prevLength >= goodMatch && (chain_length >>= 2); - do { - matchp = cur_match; - if(window[matchp + best_len] != scan_end || - window[matchp + best_len - 1] != scan_end1 || - window[matchp] != window[scanp] || - window[++matchp] != window[scanp + 1]) { - continue; - } - - scanp += 2; - matchp++; - - do {} while(window[++scanp] == window[++matchp] && - window[++scanp] == window[++matchp] && - window[++scanp] == window[++matchp] && - window[++scanp] == window[++matchp] && - window[++scanp] == window[++matchp] && - window[++scanp] == window[++matchp] && - window[++scanp] == window[++matchp] && - window[++scanp] == window[++matchp] && - scanp < strendp); - - len = MAX_MATCH - (strendp - scanp); - scanp = strendp - MAX_MATCH; - - if(len > best_len) { - matchStart = cur_match; - best_len = len; - if(len >= MAX_MATCH) break; - - scan_end1 = window[scanp + best_len-1]; - scan_end = window[scanp + best_len]; - } - } while((cur_match = prev[cur_match & 0x7FFF]) > limit && --chain_length != 0); - - return best_len; - } - - function fillWindow() { - var n, m, - more = WINDOW_SIZE - lookahead - dataStart; - - if(more == -1) { - more--; - } else if(dataStart >= WSIZE + MAX_DIST) { - - for(n = 0; n < WSIZE; n++) - window[n] = window[n + WSIZE]; - - matchStart -= WSIZE; - dataStart -= WSIZE; - blockStart -= WSIZE; - - for(n = 0; n < 0x2000; n++) { - m = prev[WSIZE + n]; - prev[WSIZE + n] = m >= WSIZE ? m - WSIZE : 0; - } - for(n = 0; n < WSIZE; n++) { - m = prev[n]; - prev[n] = (m >= WSIZE ? m - WSIZE : 0); - } - more += WSIZE; - } - if(!eofile) { - n = readBuff(window, dataStart + lookahead, more); - n <= 0 && (eofile = true) || (lookahead += n); - } - } - - function deflateFast() { - while(lookahead != 0 && qHead == null) { - var flush; // set if current block must be flushed - - insertString(); - - if(hashHead != 0 && dataStart - hashHead <= MAX_DIST) { - matchLength = longestMatch(hashHead); - matchLength > lookahead && (matchLength = lookahead); - } - if(matchLength >= MIN_MATCH) { - flush = ctTally(dataStart - matchStart, matchLength - MIN_MATCH); - lookahead -= matchLength; - - if(matchLength <= maxLazyMatch) { - matchLength--; - do { - dataStart++; - insertString(); - } while(--matchLength != 0); - dataStart++; - } else { - dataStart += matchLength; - matchLength = 0; - zip_ins_h = (((window[dataStart] & 0xFF) << H_SHIFT) ^ (window[dataStart + 1] & 0xFF)) & 0x1FFF; - } - } else { - flush = ctTally(0, window[dataStart] & 0xFF); - lookahead--; - dataStart++; - } - if(flush) { - flushBlock(0); - blockStart = dataStart; - } - - while(lookahead < 0x106 && !eofile) - fillWindow(); - } - } - - function deflateBetter() { - while(lookahead != 0 && qHead == null) { - insertString(); - prevLength = matchLength; - prevMatch = matchStart; - matchLength = MIN_MATCH - 1; - - if(hashHead != 0 && prevLength < maxLazyMatch && dataStart - hashHead <= MAX_DIST) { - matchLength = longestMatch(hashHead); - matchLength > lookahead && (matchLength = lookahead); - (matchLength == MIN_MATCH && dataStart - matchStart > 0x1000) && matchLength--; - } - if(prevLength >= MIN_MATCH && matchLength <= prevLength) { - var flush; // set if current block must be flushed - flush = ctTally(dataStart - 1 - prevMatch, prevLength - MIN_MATCH); - lookahead -= prevLength - 1; - prevLength -= 2; - do { - dataStart++; - insertString(); - } while(--prevLength != 0); - matchAvailable = 0; - matchLength = MIN_MATCH - 1; - dataStart++; - if(flush) { - flushBlock(0); - blockStart = dataStart; - } - } else if( matchAvailable != 0) { - if(ctTally(0, window[dataStart - 1] & 0xff)) { - flushBlock(0); - blockStart = dataStart; - } - dataStart++; - lookahead--; - } else { - matchAvailable = 1; - dataStart++; - lookahead--; - } - - while(lookahead < 0x106 && !eofile) - fillWindow(); - } - } - - function initDeflate() { - if(eofile) return; - - biBuf = 0; - biValid = 0; - ctInit(); - lmInit(); - - qHead = null; - outcnt = 0; - outoff = 0; - - if(compression_level <= 3) { - prevLength = MIN_MATCH - 1; - matchLength = 0; - } else { - matchLength = MIN_MATCH - 1; - matchAvailable = 0; - } - - complete = false; - } - - function internalDeflate(buff, off, buff_size) { - var n; - if(!initFlag) { - initDeflate(); - initFlag = true; - if(lookahead == 0) { // empty - complete = true; - return 0; - } - } - if((n = qCopy(buff, off, buff_size)) == buff_size) return buff_size; - if(complete) return n; - if(compression_level <= 3) // optimized for speed - deflateFast(); - else - deflateBetter(); - if(lookahead == 0) { - matchAvailable != 0 && ctTally(0, window[dataStart - 1] & 0xff); - flushBlock(1); - complete = true; - } - return n + qCopy(buff, n + off, buff_size - n); - } - - function qCopy(buff, off, buff_size) { - var n = 0, i, j; - - while(qHead != null && n < buff_size) { - i = buff_size - n; - i > qHead.len && (i = qHead.len); - for(j = 0; j < i; j++) buff[off + n + j] = qHead.ptr[qHead.off + j]; - qHead.off += i; - qHead.len -= i; - n += i; - if(qHead.len == 0) { - var p; - p = qHead; - qHead = qHead.next; - p.next = freeQueue; - freeQueue = p; - } - } - - if(n == buff_size) return n; - - if(outoff < outcnt) { - i = buff_size - n; - if(i > outcnt - outoff) - i = outcnt - outoff; - for(j = 0; j < i; j++) - buff[off + n + j] = outbuf[outoff + j]; - outoff += i; - n += i; - if(outcnt == outoff) - outcnt = outoff = 0; - } - return n; - } - - function ctInit() { - var n, // iterates over tree elements - bits, // bit counter - length, // length value - code, // code value - dist; // distance index - - if(staticDTree[0].dl != 0) return; // ct_init already called - - lDesc.dyn_tree = dynLTree; - lDesc.static_tree = staticLTree; - lDesc.extra_bits = elbits; - lDesc.extra_base = 0x101; - lDesc.elems = L_CODES; - lDesc.max_length = MAX_BITS; - lDesc.max_code = 0; - - dDesc.dyn_tree = dynDTree; - dDesc.static_tree = staticDTree; - dDesc.extra_bits = edbits; - dDesc.extra_base = 0; - dDesc.elems = D_CODES; - dDesc.max_length = MAX_BITS; - dDesc.max_code = 0; - - blDesc.dyn_tree = blTree; - blDesc.static_tree = null; - blDesc.extra_bits = eblbits; - blDesc.extra_base = 0; - blDesc.elems = BL_CODES; - blDesc.max_length = MAX_BL_BITS; - blDesc.max_code = 0; - - // Initialize the mapping length (0..255) -> length code (0..28) - length = 0; - for(code = 0; code < 0x1E; code++) { - baseLength[code] = length; - for(n = 0; n < (1 << elbits[code]); n++) - lengthCode[length++] = code; - } - lengthCode[length - 1] = code; - dist = 0; - for(code = 0 ; code < 16; code++) { - baseDist[code] = dist; - for(n = 0; n < (1 << edbits[code]); n++) - distCode[dist++] = code; - } - dist >>= 7; // from now on, all distances are divided by 128 - for( ; code < D_CODES; code++) { - baseDist[code] = dist << 7; - for(n = 0; n < (1<<(edbits[code]-7)); n++) - distCode[256 + dist++] = code; - } - for(bits = 0; bits <= MAX_BITS; bits++) blCount[bits] = 0; - - n = 0; - while(n <= 143) { staticLTree[n++].dl = 8; blCount[8]++; } - while(n <= 255) { staticLTree[n++].dl = 9; blCount[9]++; } - while(n <= 279) { staticLTree[n++].dl = 7; blCount[7]++; } - while(n <= 287) { staticLTree[n++].dl = 8; blCount[8]++; } - - genCodes(staticLTree, L_CODES + 1); - - for(n = 0; n < D_CODES; n++) { - staticDTree[n].dl = 5; - staticDTree[n].fc = reverse(n, 5); - } - initBlock(); - } - - function initBlock() { - var n; - - for(n = 0; n < L_CODES; n++) dynLTree[n].fc = 0; - for(n = 0; n < D_CODES; n++) dynDTree[n].fc = 0; - for(n = 0; n < BL_CODES; n++) blTree[n].fc = 0; - - dynLTree[0x100].fc = flagBit = 1; // end block - flags = optLen = staticLen = lastLit = lastDist = lastFlags = 0; - } - - function pqDownHeap(tree, k) { - var v = zip_heap[k], - j = k << 1; - - while(j <= heapLen) { - (j < heapLen && smaller(tree, zip_heap[j + 1], zip_heap[j])) && j++; - if(smaller(tree, v, zip_heap[j])) break; - zip_heap[k] = zip_heap[j]; - k = j; - j <<= 1; - } - zip_heap[k] = v; - } - - - function genBitLen(desc) { - var tree = desc.dyn_tree, - extra = desc.extra_bits, - base = desc.extra_base, - max_code = desc.max_code, - max_length = desc.max_length, - stree = desc.static_tree, - h, // heap index - n, m, // iterate over the tree elements - bits, // bit length - xbits, // extra bits - f, // frequency - overflow = 0; // number of elements with bit length too large - - for(bits = 0; bits <= MAX_BITS; bits++) - blCount[bits] = 0; - - tree[zip_heap[heapMax]].dl = 0; // root of the heap - - for(h = heapMax + 1; h < HEAP_SIZE; h++) { - n = zip_heap[h]; - bits = tree[tree[n].dl].dl + 1; - if(bits > max_length) { - bits = max_length; - overflow++; - } - tree[n].dl = bits; - - if(n > max_code) continue; // not a leaf node - - blCount[bits]++; - xbits = 0; - n >= base && (xbits = extra[n - base]); - f = tree[n].fc; - optLen += f * (bits + xbits); - stree != null && (staticLen += f * (stree[n].dl + xbits)); - } - if (!overflow) return; - do { - bits = max_length - 1; - while(blCount[bits] == 0) bits--; - blCount[bits]--; // move one leaf down the tree - blCount[bits + 1] += 2; // move one overflow item as its brother - blCount[max_length]--; - overflow -= 2; - } while(overflow > 0); - - for(bits = max_length; bits != 0; bits--) { - n = blCount[bits]; - while(n != 0) { - m = zip_heap[--h]; - if(m > max_code) continue; - if(tree[m].dl != bits) { - optLen += (bits - tree[m].dl) * tree[m].fc; - tree[m].fc = bits; - } - n--; - } - } - } - - function genCodes(tree, max_code) { - var next_code = new Array(MAX_BITS + 1), // next code value for each bit length - code = 0, // running code value - bits, // bit index - n; // code index - - for(bits = 1; bits <= MAX_BITS; bits++) { - code = ((code + blCount[bits-1]) << 1); - next_code[bits] = code; - } - - for(n = 0; n <= max_code; n++) { - var len = tree[n].dl; - if (len == 0) - continue; - tree[n].fc = reverse(next_code[len]++, len); - } - } - - function buildTree(desc) { // the tree descriptor - var tree = desc.dyn_tree, - stree = desc.static_tree, - elems = desc.elems, - n, m, // iterate over heap elements - max_code = -1, // largest code with non zero frequency - node = elems; // next internal node of the tree - heapLen = 0; - heapMax = HEAP_SIZE; - - for(n = 0; n < elems; n++) { - if(tree[n].fc != 0) { - zip_heap[++heapLen] = max_code = n; - depth[n] = 0; - } else - tree[n].dl = 0; - } - - while(heapLen < 2) { - var xnew = zip_heap[++heapLen] = (max_code < 2 ? ++max_code : 0); - tree[xnew].fc = 1; - depth[xnew] = 0; - optLen--; - stree != null && (staticLen -= stree[xnew].dl); - } - desc.max_code = max_code; - - for(n = heapLen >> 1; n >= 1; n--) pqDownHeap(tree, n); - - do { - n = zip_heap[1]; - zip_heap[1] = zip_heap[heapLen--]; - pqDownHeap(tree, 1); - - m = zip_heap[1]; // m = node of next least frequency - - // keep the nodes sorted by frequency - zip_heap[--heapMax] = n; - zip_heap[--heapMax] = m; - - // Create a new node father of n and m - tree[node].fc = tree[n].fc + tree[m].fc; - - if(depth[n] > depth[m] + 1) - depth[node] = depth[n]; - else - depth[node] = depth[m] + 1; - - tree[n].dl = tree[m].dl = node; - - // and insert the new node in the heap - zip_heap[1] = node++; - pqDownHeap(tree, 1); - - } while(heapLen >= 2); - - zip_heap[--heapMax] = zip_heap[1]; - - genBitLen(desc); - genCodes(tree, max_code); - } - - function scanTree(tree, max_code) { - var n, // iterates over all tree elements - prevlen = -1, // last emitted length - curlen, // length of current code - nextlen = tree[0].dl, // length of next code - count = 0, // repeat count of the current code - max_count = 7, // max repeat count - min_count = 4; // min repeat count - - if(nextlen == 0) { - max_count = 138; - min_count = 3; - } - tree[max_code + 1].dl = 0xffff; // guard - - for(n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n + 1].dl; - if(++count < max_count && curlen == nextlen) - continue; - else if(count < min_count) - blTree[curlen].fc += count; - else if(curlen != 0) { - if(curlen != prevlen) - blTree[curlen].fc++; - blTree[REP_3_6].fc++; - } else if(count <= 10) - blTree[REPZ_3_10].fc++; - else - blTree[REPZ_11_138].fc++; - count = 0; prevlen = curlen; - if(nextlen == 0) { - max_count = 138; - min_count = 3; - } else if(curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - function sendTree(tree, max_code) { - var n, // iterates over all tree elements - prevlen = -1, // last emitted length - curlen, // length of current code - nextlen = tree[0].dl, // length of next code - count = 0, // repeat count of the current code - max_count = 7, // max repeat count - min_count = 4; // min repeat count - - if(nextlen == 0) { - max_count = 138; - min_count = 3; - } - - for(n = 0; n <= max_code; n++) { - curlen = nextlen; - nextlen = tree[n+1].dl; - if(++count < max_count && curlen == nextlen) { - continue; - } else if(count < min_count) { - do { sendCode(curlen, blTree); } while(--count != 0); - } else if(curlen != 0) { - if(curlen != prevlen) { - sendCode(curlen, blTree); - count--; - } - sendCode(REP_3_6, blTree); - sendBits(count - 3, 2); - } else if(count <= 10) { - sendCode(REPZ_3_10, blTree); - sendBits(count-3, 3); - } else { - sendCode(REPZ_11_138, blTree); - sendBits(count-11, 7); - } - count = 0; - prevlen = curlen; - if(nextlen == 0) { - max_count = 138; - min_count = 3; - } else if(curlen == nextlen) { - max_count = 6; - min_count = 3; - } else { - max_count = 7; - min_count = 4; - } - } - } - - function buildBLTree() { - var max_blindex; // index of last bit length code of non zero freq - scanTree(dynLTree, lDesc.max_code); - scanTree(dynDTree, dDesc.max_code); - buildTree(blDesc); - for(max_blindex = BL_CODES-1; max_blindex >= 3; max_blindex--) { - if(blTree[blorder[max_blindex]].dl != 0) break; - } - /* Update opt_len to include the bit length tree and counts */ - optLen += 3 * (max_blindex + 1) + 0xE; - - return max_blindex; - } - - function sendTrees(lcodes, dcodes, blcodes) { - var rank; // index in bl_order - sendBits(lcodes - 0x101, 5); - sendBits(dcodes - 1, 5); - sendBits(blcodes - 4, 4); - for(rank = 0; rank < blcodes; rank++) - sendBits(blTree[blorder[rank]].dl, 3); - - sendTree(dynLTree, lcodes - 1); - sendTree(dynDTree, dcodes - 1); - } - - function flushBlock(eof) { // true if this is the last block for a file - var opt_lenb, static_lenb, // opt_len and static_len in bytes - max_blindex, // index of last bit length code of non zero freq - stored_len = dataStart - blockStart; // length of input block - - flagBuf[lastFlags] = flags; // Save the flags for the last 8 items - - buildTree(lDesc); - buildTree(dDesc); - - max_blindex = buildBLTree(); - - // Determine the best encoding. Compute first the block length in bytes - opt_lenb = (optLen + 3 + 7) >> 3; - static_lenb = (staticLen + 3 + 7) >> 3; - - static_lenb <= opt_lenb && (opt_lenb = static_lenb); - - if(stored_len + 4 <= opt_lenb && blockStart >= 0) { - var i; - sendBits(eof, 3); /* send block type */ - biValid && writeShort(biBuf) && (biBuf = biValid = 0); /* align on byte boundary */ - writeShort(stored_len); - writeShort(~stored_len); - for(i = 0; i < stored_len; i++) writeByte(window[blockStart + i]); - - } else if(static_lenb == opt_lenb) { - sendBits(eof + 2, 3); - compress(staticLTree, staticDTree); - } else { - sendBits(eof + 4, 3); - sendTrees(lDesc.max_code + 1, dDesc.max_code + 1, max_blindex + 1); - compress(dynLTree, dynDTree); - } - - initBlock(); - - (eof != 0) && (biValid && writeShort(biBuf) && (biBuf = biValid = 0)); - } - - function ctTally(dist, lc) { - lBuf[lastLit++] = lc; - if(dist == 0) { - dynLTree[lc].fc++; - } else { - dist--; - dynLTree[lengthCode[lc] + 0x101].fc++; - dynDTree[zip_D_CODE(dist)].fc++; - dBuf[lastDist++] = dist; - flags |= flagBit; - } - flagBit <<= 1; - if((lastLit & 7) == 0) { - flagBuf[lastFlags++] = flags; - flags = 0; - flagBit = 1; - } - if(compression_level > 2 && (lastLit & 0xfff) == 0) { - var out_length = lastLit * 8, - in_length = dataStart - blockStart, - dcode; - - for(dcode = 0; dcode < D_CODES; dcode++) { - out_length += dynDTree[dcode].fc * (5 + edbits[dcode]); - } - out_length >>= 3; - if(lastDist < parseInt(lastLit / 2) && out_length < parseInt(in_length / 2)) - return true; - } - return (lastLit == LIT_BUFSIZE - 1 || lastDist == LIT_BUFSIZE); - } - - function compress(ltree, dtree) { - var dist, // distance of matched string - lc, // match length or unmatched char (if dist == 0) - lx = 0, // running index in l_buf - dx = 0, // running index in d_buf - fx = 0, // running index in flag_buf - flag = 0, // current flags - code, // the code to send - extra; // number of extra bits to send - - if (lastLit != 0) do { - (lx & 7) == 0 && (flag = flagBuf[fx++]); - lc = lBuf[lx++] & 0xff; - if ((flag & 1) == 0) { - sendCode(lc, ltree); /* send a literal byte */ - } else { - code = lengthCode[lc]; - sendCode(code + 0x101, ltree); // send the length code - extra = elbits[code]; - if(extra != 0) { - lc -= baseLength[code]; - sendBits(lc, extra); // send the extra length bits - } - dist = dBuf[dx++]; - code = zip_D_CODE(dist); - sendCode(code, dtree); // send the distance code - extra = edbits[code]; - if(extra != 0) { - dist -= baseDist[code]; - sendBits(dist, extra); // send the extra distance bits - } - } // literal or match pair ? - flag >>= 1; - } while(lx < lastLit); - - sendCode(0x100, ltree); // end block - } - - function sendBits(value, length) { - if(biValid > 0x10 - length) { - biBuf |= (value << biValid); - writeShort(biBuf); - biBuf = (value >> (0x10 - biValid)); - biValid += length - 0x10; - } else { - biBuf |= value << biValid; - biValid += length; - } - } - - function reverse(code, len) { - var res = 0; - do { - res |= code & 1; - code >>= 1; - res <<= 1; - } while(--len > 0); - return res >> 1; - } - - function deflate(buffData, level) { - deflateData = buffData; - deflatePos = 0; - deflateStart(level); - - var buff = new Array(1024), - pages = [], - totalSize = 0, - i; - - for (i = 0; i < 1024; i++) buff[i] = 0; - - while((i = internalDeflate(buff, 0, buff.length)) > 0) { - var buf = new Buffer(buff.slice(0, i)); - pages.push(buf); - totalSize += buf.length; - } - var result = new Buffer(totalSize), - index = 0; - - for (i = 0; i < pages.length; i++) { - pages[i].copy(result, index); - index = index + pages[i].length - } - - return result; - } - - return { - deflate : function() { - return deflate(inbuf, 8); - } - } -} - -module.exports = function(/*Buffer*/inbuf) { - - var zlib = require("zlib"); - - return { - deflate : function() { - return new JSDeflater(inbuf).deflate(); - }, - - deflateAsync : function(/*Function*/callback) { - var tmp = zlib.createDeflateRaw(); - tmp.on('data', function(data) { - callback(data); - }); - tmp.end(inbuf) - } - } -}; diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/index.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/index.js deleted file mode 100644 index ddcbba60..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.Deflater = require("./deflater"); -exports.Inflater = require("./inflater"); \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/inflater.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/inflater.js deleted file mode 100644 index 075e09a0..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/methods/inflater.js +++ /dev/null @@ -1,446 +0,0 @@ -var Buffer = require("buffer").Buffer; - -function JSInflater(/*Buffer*/input) { - - var WSIZE = 0x8000, - slide = new Buffer(0x10000), - windowPos = 0, - fixedTableList = null, - fixedTableDist, - fixedLookup, - bitBuf = 0, - bitLen = 0, - method = -1, - eof = false, - copyLen = 0, - copyDist = 0, - tblList, tblDist, bitList, bitdist, - - inputPosition = 0, - - MASK_BITS = [0x0000, 0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff, 0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff], - LENS = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], - LEXT = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 99, 99], - DISTS = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577], - DEXT = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], - BITORDER = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]; - - function HuffTable(clen, cnum, cval, blist, elist, lookupm) { - - this.status = 0; - this.root = null; - this.maxbit = 0; - - var el, f, tail, - offsets = [], - countTbl = [], - sTbl = [], - values = [], - tentry = {extra: 0, bitcnt: 0, lbase: 0, next: null}; - - tail = this.root = null; - for(var i = 0; i < 0x11; i++) { countTbl[i] = 0; sTbl[i] = 0; offsets[i] = 0; } - for(i = 0; i < 0x120; i++) values[i] = 0; - - el = cnum > 256 ? clen[256] : 16; - - var pidx = -1; - while (++pidx < cnum) countTbl[clen[pidx]]++; - - if(countTbl[0] == cnum) return; - - for(var j = 1; j <= 16; j++) if(countTbl[j] != 0) break; - var bitLen = j; - for(i = 16; i != 0; i--) if(countTbl[i] != 0) break; - var maxLen = i; - - lookupm < j && (lookupm = j); - - var dCodes = 1 << j; - for(; j < i; j++, dCodes <<= 1) - if((dCodes -= countTbl[j]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - if((dCodes -= countTbl[i]) < 0) { - this.status = 2; - this.maxbit = lookupm; - return; - } - - countTbl[i] += dCodes; - offsets[1] = j = 0; - pidx = 1; - var xp = 2; - while(--i > 0) offsets[xp++] = (j += countTbl[pidx++]); - pidx = 0; - i = 0; - do { - (j = clen[pidx++]) && (values[offsets[j]++] = i); - } while(++i < cnum); - cnum = offsets[maxLen]; - offsets[0] = i = 0; - pidx = 0; - - var level = -1, - w = sTbl[0] = 0, - cnode = null, - tblCnt = 0, - tblStack = []; - - for(; bitLen <= maxLen; bitLen++) { - var kccnt = countTbl[bitLen]; - while(kccnt-- > 0) { - while(bitLen > w + sTbl[1 + level]) { - w += sTbl[1 + level]; - level++; - tblCnt = (tblCnt = maxLen - w) > lookupm ? lookupm : tblCnt; - if((f = 1 << (j = bitLen - w)) > kccnt + 1) { - f -= kccnt + 1; - xp = bitLen; - while(++j < tblCnt) { - if((f <<= 1) <= countTbl[++xp]) break; - f -= countTbl[xp]; - } - } - if(w + j > el && w < el) j = el - w; - tblCnt = 1 << j; - sTbl[1 + level] = j; - cnode = []; - while (cnode.length < tblCnt) cnode.push({extra: 0, bitcnt: 0, lbase: 0, next: null}); - if (tail == null) { - tail = this.root = {next:null, list:null}; - } else { - tail = tail.next = {next:null, list:null} - } - tail.next = null; - tail.list = cnode; - - tblStack[level] = cnode; - - if(level > 0) { - offsets[level] = i; - tentry.bitcnt = sTbl[level]; - tentry.extra = 16 + j; - tentry.next = cnode; - j = (i & ((1 << w) - 1)) >> (w - sTbl[level]); - - tblStack[level-1][j].extra = tentry.extra; - tblStack[level-1][j].bitcnt = tentry.bitcnt; - tblStack[level-1][j].lbase = tentry.lbase; - tblStack[level-1][j].next = tentry.next; - } - } - tentry.bitcnt = bitLen - w; - if(pidx >= cnum) - tentry.extra = 99; - else if(values[pidx] < cval) { - tentry.extra = (values[pidx] < 256 ? 16 : 15); - tentry.lbase = values[pidx++]; - } else { - tentry.extra = elist[values[pidx] - cval]; - tentry.lbase = blist[values[pidx++] - cval]; - } - - f = 1 << (bitLen - w); - for(j = i >> w; j < tblCnt; j += f) { - cnode[j].extra = tentry.extra; - cnode[j].bitcnt = tentry.bitcnt; - cnode[j].lbase = tentry.lbase; - cnode[j].next = tentry.next; - } - for(j = 1 << (bitLen - 1); (i & j) != 0; j >>= 1) - i ^= j; - i ^= j; - while((i & ((1 << w) - 1)) != offsets[level]) { - w -= sTbl[level]; - level--; - } - } - } - - this.maxbit = sTbl[1]; - this.status = ((dCodes != 0 && maxLen != 1) ? 1 : 0); - } - - function addBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - return bitBuf; - } - - function cutBits(n) { - bitLen -= n; - return bitBuf >>= n; - } - - function maskBits(n) { - while(bitLen < n) { - bitBuf |= input[inputPosition++] << bitLen; - bitLen += 8; - } - var res = bitBuf & MASK_BITS[n]; - bitBuf >>= n; - bitLen -= n; - return res; - } - - function codes(buff, off, size) { - var e, t; - if(size == 0) return 0; - - var n = 0; - for(;;) { - t = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - e = t.extra; - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra; - } - cutBits(t.bitcnt); - if(e == 16) { - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = t.lbase; - if(n == size) return size; - continue; - } - if(e == 15) break; - - copyLen = t.lbase + maskBits(e); - t = tblDist.list[addBits(bitdist) & MASK_BITS[bitdist]]; - e = t.extra; - - while(e > 16) { - if(e == 99) return -1; - cutBits(t.bitcnt); - e -= 16; - t = t.next[addBits(e) & MASK_BITS[e]]; - e = t.extra - } - cutBits(t.bitcnt); - copyDist = windowPos - t.lbase - maskBits(e); - - while(copyLen > 0 && n < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = slide[copyDist++]; - } - - if(n == size) return size; - } - - method = -1; // done - return n; - } - - function stored(buff, off, size) { - cutBits(bitLen & 7); - var n = maskBits(0x10); - if(n != ((~maskBits(0x10)) & 0xffff)) return -1; - copyLen = n; - - n = 0; - while(copyLen > 0 && n < size) { - copyLen--; - windowPos &= WSIZE - 1; - buff[off + n++] = slide[windowPos++] = maskBits(8); - } - - if(copyLen == 0) method = -1; - return n; - } - - function fixed(buff, off, size) { - var fixed_bd = 0; - if(fixedTableList == null) { - var lengths = []; - - for(var symbol = 0; symbol < 144; symbol++) lengths[symbol] = 8; - for(; symbol < 256; symbol++) lengths[symbol] = 9; - for(; symbol < 280; symbol++) lengths[symbol] = 7; - for(; symbol < 288; symbol++) lengths[symbol] = 8; - - fixedLookup = 7; - - var htbl = new HuffTable(lengths, 288, 257, LENS, LEXT, fixedLookup); - - if(htbl.status != 0) return -1; - - fixedTableList = htbl.root; - fixedLookup = htbl.maxbit; - - for(symbol = 0; symbol < 30; symbol++) lengths[symbol] = 5; - fixed_bd = 5; - - htbl = new HuffTable(lengths, 30, 0, DISTS, DEXT, fixed_bd); - if(htbl.status > 1) { - fixedTableList = null; - return -1; - } - fixedTableDist = htbl.root; - fixed_bd = htbl.maxbit; - } - - tblList = fixedTableList; - tblDist = fixedTableDist; - bitList = fixedLookup; - bitdist = fixed_bd; - return codes(buff, off, size); - } - - function dynamic(buff, off, size) { - var ll = new Array(0x023C); - - for (var m = 0; m < 0x023C; m++) ll[m] = 0; - - var llencnt = 257 + maskBits(5), - dcodescnt = 1 + maskBits(5), - bitlencnt = 4 + maskBits(4); - - if(llencnt > 286 || dcodescnt > 30) return -1; - - for(var j = 0; j < bitlencnt; j++) ll[BITORDER[j]] = maskBits(3); - for(; j < 19; j++) ll[BITORDER[j]] = 0; - - // build decoding table for trees--single level, 7 bit lookup - bitList = 7; - var hufTable = new HuffTable(ll, 19, 19, null, null, bitList); - if(hufTable.status != 0) - return -1; // incomplete code set - - tblList = hufTable.root; - bitList = hufTable.maxbit; - var lencnt = llencnt + dcodescnt, - i = 0, - lastLen = 0; - while(i < lencnt) { - var hufLcode = tblList.list[addBits(bitList) & MASK_BITS[bitList]]; - j = hufLcode.bitcnt; - cutBits(j); - j = hufLcode.lbase; - if(j < 16) - ll[i++] = lastLen = j; - else if(j == 16) { - j = 3 + maskBits(2); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = lastLen; - } else if(j == 17) { - j = 3 + maskBits(3); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } else { - j = 11 + maskBits(7); - if(i + j > lencnt) return -1; - while(j-- > 0) ll[i++] = 0; - lastLen = 0; - } - } - bitList = 9; - hufTable = new HuffTable(ll, llencnt, 257, LENS, LEXT, bitList); - bitList == 0 && (hufTable.status = 1); - - if (hufTable.status != 0) return -1; - - tblList = hufTable.root; - bitList = hufTable.maxbit; - - for(i = 0; i < dcodescnt; i++) ll[i] = ll[i + llencnt]; - bitdist = 6; - hufTable = new HuffTable(ll, dcodescnt, 0, DISTS, DEXT, bitdist); - tblDist = hufTable.root; - bitdist = hufTable.maxbit; - - if((bitdist == 0 && llencnt > 257) || hufTable.status != 0) return -1; - - return codes(buff, off, size); - } - - return { - inflate : function(/*Buffer*/outputBuffer) { - tblList = null; - - var size = outputBuffer.length, - offset = 0, i; - - while(offset < size) { - if(eof && method == -1) return; - if(copyLen > 0) { - if(method != 0) { - while(copyLen > 0 && offset < size) { - copyLen--; - copyDist &= WSIZE - 1; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = slide[windowPos++] = slide[copyDist++]; - } - } else { - while(copyLen > 0 && offset < size) { - copyLen--; - windowPos &= WSIZE - 1; - outputBuffer[offset++] = slide[windowPos++] = maskBits(8); - } - copyLen == 0 && (method = -1); // done - } - if (offset == size) return; - } - - if(method == -1) { - if(eof) break; - eof = maskBits(1) != 0; - method = maskBits(2); - tblList = null; - copyLen = 0; - } - switch(method) { - case 0: i = stored(outputBuffer, offset, size - offset); break; - case 1: i = tblList != null ? codes(outputBuffer, offset, size - offset) : fixed(outputBuffer, offset, size - offset); break; - case 2: i = tblList != null ? codes(outputBuffer, offset, size - offset) : dynamic(outputBuffer, offset, size - offset); break; - default: i = -1; break; - } - - if(i == -1) return; - offset += i; - } - } - }; -} - -module.exports = function(/*Buffer*/inbuf) { - var zlib = require("zlib"); - return { - inflateAsync : function(/*Function*/callback) { - var tmp = zlib.createInflateRaw(), - parts = [], total = 0; - tmp.on('data', function(data) { - parts.push(data); - total += data.length; - }); - tmp.on('end', function() { - var buf = new Buffer(total), written = 0; - buf.fill(0); - - for (var i = 0; i < parts.length; i++) { - var part = parts[i]; - part.copy(buf, written); - written += part.length; - } - callback && callback(buf); - }); - tmp.end(inbuf) - }, - - inflate : function(/*Buffer*/outputBuffer) { - var x = new JSInflater(inbuf); - x.inflate(outputBuffer); - delete(x); - } - } -}; \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/package.json deleted file mode 100644 index 26a1aa17..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "adm-zip", - "version": "0.2.1", - "description": "A Javascript implementation of zip for nodejs. Allows user to create or extract zip files both in memory or to/from disk", - "keywords": [ - "zip", - "methods", - "archive", - "unzip" - ], - "homepage": "http://github.com/cthackers/adm-zip", - "author": { - "name": "Nasca Iacob", - "email": "sy@another-d-mention.ro", - "url": "https://github.com/cthackers" - }, - "bugs": { - "url": "https://github.com/cthackers/adm-zip/issues", - "email": "sy@another-d-mention.ro" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/kriskowal/zip/raw/master/LICENSE" - } - ], - "main": "adm-zip.js", - "repository": { - "type": "git", - "url": "git://github.com/git@github.com:cthackers/adm-zip.git" - }, - "engines": { - "node": ">=0.3.0" - }, - "readme": "# ADM-ZIP for NodeJS\r\n\r\nADM-ZIP is a pure JavaScript implementation for zip data compression for [NodeJS](http://nodejs.org/). \r\n\r\n# Installation\r\n\r\nWith [npm](http://npmjs.org) do:\r\n\r\n $ npm install adm-zip\r\n\t\r\n## What is it good for?\r\nThe library allows you to:\r\n\r\n* decompress zip files directly to disk or in memory buffers\r\n* compress files and store them to disk in .zip format or in compressed buffers\r\n* update content of/add new/delete files from an existing .zip\r\n\r\n# Dependencies\r\nThere are no other nodeJS libraries that ADM-ZIP is dependent of\r\n\r\n# Examples\r\n\r\n## Basic usage\r\n```javascript\r\n\r\n\tvar AdmZip = require('adm-zip');\r\n\r\n\t// reading archives\r\n\tvar zip = new AdmZip(\"./my_file.zip\");\r\n\tvar zipEntries = zip.getEntries(); // an array of ZipEntry records\r\n\r\n\tzipEntries.forEach(function(zipEntry) {\r\n\t console.log(zipEntry.toString()); // outputs zip entries information\r\n\t\tif (zipEntry.entryName == \"my_file.txt\") {\r\n\t\t console.log(zipEntry.data.toString('utf8')); \r\n\t\t}\r\n\t});\r\n\t// outputs the content of some_folder/my_file.txt\r\n\tconsole.log(zip.readAsText(\"some_folder/my_file.txt\")); \r\n\t// extracts the specified file to the specified location\r\n\tzip.extractEntryTo(/*entry name*/\"some_folder/my_file.txt\", /*target path*/\"/home/me/tempfolder\", /*overwrite*/true)\r\n\t// extracts everything\r\n\tzip.extractAllTo(/*target path*/\"/home/me/zipcontent/\", /*overwrite*/true);\r\n\t\r\n\t\r\n\t// creating archives\r\n\tvar zip = new AdmZip();\r\n\t\r\n\t// add file directly\r\n\tzip.addFile(\"test.txt\", new Buffer(\"inner content of the file\"), \"entry comment goes here\");\r\n\t// add local file\r\n\tzip.addLocalFile(\"/home/me/some_picture.png\");\r\n\t// get everything as a buffer\r\n\tvar willSendthis = zip.toBuffer();\r\n\t// or write everything to disk\r\n\tzip.writeZip(/*target file name*/\"/home/me/files.zip\");\r\n\t\r\n\t\r\n\t// ... more examples in the wiki\r\n```\r\n\r\nFor more detailed information please check out the [wiki](https://github.com/cthackers/adm-zip/wiki).\n\n[![build status](https://secure.travis-ci.org/cthackers/adm-zip.png)](http://travis-ci.org/cthackers/adm-zip)", - "readmeFilename": "README.md", - "_id": "adm-zip@0.2.1", - "_from": "adm-zip@0.2.1" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/sandbox.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/sandbox.js deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/constants.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/constants.js deleted file mode 100644 index ecd226c8..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/constants.js +++ /dev/null @@ -1,53 +0,0 @@ -module.exports = { - /* The local file header */ - LOCHDR : 30, // LOC header size - LOCSIG : 0x04034b50, // "PK\003\004" - LOCVER : 4, // version needed to extract - LOCFLG : 6, // general purpose bit flag - LOCHOW : 8, // compression method - LOCTIM : 10, // modification time (2 bytes time, 2 bytes date) - LOCCRC : 14, // uncompressed file crc-32 value - LOCSIZ : 18, // compressed size - LOCLEN : 22, // uncompressed size - LOCNAM : 26, // filename length - LOCEXT : 28, // extra field length - - /* The Data descriptor */ - EXTSIG : 0x08074b50, // "PK\007\008" - EXTHDR : 16, // EXT header size - EXTCRC : 4, // uncompressed file crc-32 value - EXTSIZ : 8, // compressed size - EXTLEN : 12, // uncompressed size - - /* The central directory file header */ - CENHDR : 46, // CEN header size - CENSIG : 0x02014b50, // "PK\001\002" - CENVEM : 4, // version made by - CENVER : 6, // version needed to extract - CENFLG : 8, // encrypt, decrypt flags - CENHOW : 10, // compression method - CENTIM : 12, // modification time (2 bytes time, 2 bytes date) - CENCRC : 16, // uncompressed file crc-32 value - CENSIZ : 20, // compressed size - CENLEN : 24, // uncompressed size - CENNAM : 28, // filename length - CENEXT : 30, // extra field length - CENCOM : 32, // file comment length - CENDSK : 34, // volume number start - CENATT : 36, // internal file attributes - CENATX : 38, // external file attributes - CENOFF : 42, // LOC header offset - - /* The entries in the end of central directory */ - ENDHDR : 22, // END header size - ENDSIG : 0x06054b50, // "PK\005\006" - ENDSUB : 8, // number of entries on this disk - ENDTOT : 10, // total number of entries - ENDSIZ : 12, // central directory size in bytes - ENDOFF : 16, // offset of first CEN header - ENDCOM : 20, // zip file comment length - - /* Compression methods */ - STORED : 0, - DEFLATED : 8 -}; \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/errors.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/errors.js deleted file mode 100644 index db5d69e9..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/errors.js +++ /dev/null @@ -1,35 +0,0 @@ -module.exports = { - /* Header error messages */ - "INVALID_LOC" : "Invalid LOC header (bad signature)", - "INVALID_CEN" : "Invalid CEN header (bad signature)", - "INVALID_END" : "Invalid END header (bad signature)", - - /* ZipEntry error messages*/ - "NO_DATA" : "Nothing to decompress", - "BAD_CRC" : "CRC32 checksum failed", - "FILE_IN_THE_WAY" : "There is a file in the way: %s", - "UNKNOWN_METHOD" : "Invalid/unsupported compression method", - - /* Inflater error messages */ - "AVAIL_DATA" : "inflate::Available inflate data did not terminate", - "INVALID_DISTANCE" : "inflate::Invalid literal/length or distance code in fixed or dynamic block", - "TO_MANY_CODES" : "inflate::Dynamic block code description: too many length or distance codes", - "INVALID_REPEAT_LEN" : "inflate::Dynamic block code description: repeat more than specified lengths", - "INVALID_REPEAT_FIRST" : "inflate::Dynamic block code description: repeat lengths with no first length", - "INCOMPLETE_CODES" : "inflate::Dynamic block code description: code lengths codes incomplete", - "INVALID_DYN_DISTANCE": "inflate::Dynamic block code description: invalid distance code lengths", - "INVALID_CODES_LEN": "inflate::Dynamic block code description: invalid literal/length code lengths", - "INVALID_STORE_BLOCK" : "inflate::Stored block length did not match one's complement", - "INVALID_BLOCK_TYPE" : "inflate::Invalid block type (type == 3)", - - /* ADM-ZIP error messages */ - "CANT_EXTRACT_FILE" : "Could not extract the file", - "CANT_OVERRIDE" : "Target file already exists", - "NO_ZIP" : "No zip file was loaded", - "NO_ENTRY" : "Entry doesn't exist", - "DIRECTORY_CONTENT_ERROR" : "A directory cannot have content", - "FILE_NOT_FOUND" : "File not found: %s", - "NOT_IMPLEMENTED" : "Not implemented", - "INVALID_FILENAME" : "Invalid filename", - "INVALID_FORMAT" : "Invalid or unsupported zip format. No END header found" -}; \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/fattr.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/fattr.js deleted file mode 100644 index 2191ec1c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/fattr.js +++ /dev/null @@ -1,84 +0,0 @@ -var fs = require("fs"), - pth = require("path"); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = function(/*String*/path) { - - var _path = path || "", - _permissions = 0, - _obj = newAttr(), - _stat = null; - - function newAttr() { - return { - directory : false, - readonly : false, - hidden : false, - executable : false, - mtime : 0, - atime : 0 - } - } - - if (_path && fs.existsSync(_path)) { - _stat = fs.statSync(_path); - _obj.directory = _stat.isDirectory(); - _obj.mtime = _stat.mtime; - _obj.atime = _stat.atime; - _obj.executable = !!(1 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.readonly = !!(2 & parseInt ((_stat.mode & parseInt ("777", 8)).toString (8)[0])); - _obj.hidden = pth.basename(_path)[0] === "."; - } else { - console.warn("Invalid path: " + _path) - } - - return { - - get directory () { - return _obj.directory; - }, - - get readOnly () { - return _obj.readonly; - }, - - get hidden () { - return _obj.hidden; - }, - - get mtime () { - return _obj.mtime; - }, - - get atime () { - return _obj.atime; - }, - - - get executable () { - return _obj.executable; - }, - - decodeAttributes : function(val) { - - }, - - encodeAttributes : function (val) { - - }, - - toString : function() { - return '{\n' + - '\t"path" : "' + _path + ",\n" + - '\t"isDirectory" : ' + _obj.directory + ",\n" + - '\t"isReadOnly" : ' + _obj.readonly + ",\n" + - '\t"isHidden" : ' + _obj.hidden + ",\n" + - '\t"isExecutable" : ' + _obj.executable + ",\n" + - '\t"mTime" : ' + _obj.mtime + "\n" + - '\t"aTime" : ' + _obj.atime + "\n" + - '}'; - } - } - -}; diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/index.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/index.js deleted file mode 100644 index 935fc1a4..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/index.js +++ /dev/null @@ -1,4 +0,0 @@ -module.exports = require("./utils"); -module.exports.Constants = require("./constants"); -module.exports.Errors = require("./errors"); -module.exports.FileAttr = require("./fattr"); \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/utils.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/utils.js deleted file mode 100644 index 1a4b19e5..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/util/utils.js +++ /dev/null @@ -1,134 +0,0 @@ -var fs = require("fs"), - pth = require('path'); - -fs.existsSync = fs.existsSync || pth.existsSync; - -module.exports = (function() { - - var crcTable = [], - Constants = require('./constants'), - Errors = require('./errors'), - - PATH_SEPARATOR = pth.normalize("/"); - - - function mkdirSync(/*String*/path) { - var resolvedPath = path.split(PATH_SEPARATOR)[0]; - path.split(PATH_SEPARATOR).forEach(function(name) { - if (!name || name.substr(-1,1) == ":") return; - resolvedPath += PATH_SEPARATOR + name; - var stat; - try { - stat = fs.statSync(resolvedPath); - } catch (e) { - fs.mkdirSync(resolvedPath); - } - if (stat && stat.isFile()) - throw Errors.FILE_IN_THE_WAY.replace("%s", resolvedPath); - }); - } - - function findSync(/*String*/root, /*RegExp*/pattern, /*Boolean*/recoursive) { - if (typeof pattern === 'boolean') { - recoursive = pattern; - pattern = undefined; - } - var files = []; - fs.readdirSync(root).forEach(function(file) { - var path = pth.join(root, file); - - if (fs.statSync(path).isDirectory() && recoursive) - files = files.concat(findSync(path, pattern, recoursive)); - - if (!pattern || pattern.test(path)) { - files.push(pth.normalize(path) + (fs.statSync(path).isDirectory() ? PATH_SEPARATOR : "")); - } - - }); - return files; - } - - return { - makeDir : function(/*String*/path) { - mkdirSync(path); - }, - - crc32 : function(buf) { - var b = new Buffer(4); - if (!crcTable.length) { - for (var n = 0; n < 256; n++) { - var c = n; - for (var k = 8; --k >= 0;) // - if ((c & 1) != 0) { c = 0xedb88320 ^ (c >>> 1); } else { c = c >>> 1; } - if (c < 0) { - b.writeInt32LE(c, 0); - c = b.readUInt32LE(0); - } - crcTable[n] = c; - } - } - var crc = 0, off = 0, len = buf.length, c1 = ~crc; - while(--len >= 0) c1 = crcTable[(c1 ^ buf[off++]) & 0xff] ^ (c1 >>> 8); - crc = ~c1; - b.writeInt32LE(crc & 0xffffffff, 0); - return b.readUInt32LE(0); - }, - - methodToString : function(/*Number*/method) { - switch (method) { - case Constants.STORED: - return 'STORED (' + method + ')'; - case Constants.DEFLATED: - return 'DEFLATED (' + method + ')'; - default: - return 'UNSUPPORTED (' + method + ')' - } - - }, - - writeFileTo : function(/*String*/path, /*Buffer*/content, /*Boolean*/overwrite, /*Number*/attr) { - if (fs.existsSync(path)) { - if (!overwrite) - return false; // cannot overwite - - var stat = fs.statSync(path); - if (stat.isDirectory()) { - return false; - } - } - var folder = pth.dirname(path); - if (!fs.existsSync(folder)) { - mkdirSync(folder); - } - - var fd; - try { - fd = fs.openSync(path, 'w', 0666); - } catch(e) { - fs.chmodSync(path, 0666); - fd = fs.openSync(path, 'w', 0666); - } - if (fd) { - fs.writeSync(fd, content, 0, content.length, 0); - fs.closeSync(fd); - } - fs.chmodSync(path, attr || 0666); - return true; - }, - - findFiles : function(/*String*/path) { - return findSync(path, true); - }, - - getAttributes : function(/*String*/path) { - - }, - - setAttributes : function(/*String*/path) { - - }, - - Constants : Constants, - Errors : Errors - } -})(); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/zipEntry.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/zipEntry.js deleted file mode 100644 index 3b7eeaf6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/zipEntry.js +++ /dev/null @@ -1,245 +0,0 @@ -var Utils = require("./util"), - Headers = require("./headers"), - Methods = require("./methods"); - -module.exports = function () { - - var _entryHeader = new Headers.EntryHeader(), - _dataHeader = new Headers.DataHeader(), - - _entryName = "", - _isDirectory = false, - _extra = null, - _compressedData = null, - _data = null, - _comment = "", - _needDeflate = false; - - function decompress(/*Boolean*/async, /*Function*/callback) { - // if (_data == null) { - if (true) { - if (_compressedData == null) { - if (_isDirectory) { - if (async && callback) { - callback(new Buffer(), "directory"); //si added error. - } - return; - } - //throw 'Noting to decompress'; - callback(new Buffer(), "Nothing to decompress");//si added error. - } - switch (_dataHeader.method) { - case Utils.Constants.STORED: - _data = new Buffer(_dataHeader.size); - _compressedData.copy(_data, 0, _dataHeader.fileHeaderSize); - if (Utils.crc32(_data) != _dataHeader.crc) { - //throw Utils.Errors.BAD_CRC - callback(_data, Utils.Errors.BAD_CRC);//si added error - return Utils.Errors.BAD_CRC; - } else {//si added otherwise did not seem to return data. - if (callback) callback(_data); - return 'ok'; - } - break; - case Utils.Constants.DEFLATED: - var inflater = new Methods.Inflater(_compressedData.slice(_dataHeader.fileHeaderSize)); - if (!async) { - _data = new Buffer(_entryHeader.size); - _data.fill(0); - inflater.inflate(_data); - if (Utils.crc32(_data) != _dataHeader.crc) { - console.warn( Utils.Errors.BAD_CRC + " " + _entryName) - } - } else { - inflater.inflateAsync(function(data) { - _data = new Buffer(_entryHeader.size); - _data.fill(0); - data.copy(_data, 0); - if (Utils.crc32(_data) != _dataHeader.crc) { - //throw Utils.Errors.BAD_CRC - callback(_data,Utils.Errors.BAD_CRC); //avoid throw it would bring down node. - return Utils.Errors.BAD_CRC - } else { - callback(_data); - return 'ok'; - } - }) - } - break; - default: - // throw Utils.Errors.UNKNOWN_METHOD; - callback(new Buffer(),Utils.Errors.BAD_CRC); //avoid throw it would bring down node. - return Utils.Errors.UNKNOWN_METHOD; - } - } else { - if (async && callback) { - callback(_data); - } - } - } - - function compress(/*Boolean*/async, /*Function*/callback) { - if ( _needDeflate) { - _compressedData = null; - } - if (_compressedData == null) { - if (_isDirectory || !_data) { - _data = new Buffer(0); - _compressedData = new Buffer(0); - return; - } - // Local file header - _dataHeader.version = 10; - _dataHeader.flags = 0; - _dataHeader.time = _entryHeader.time; - _dataHeader.compressedSize = _data.length; - _dataHeader.fileNameLength = _entryName.length; - _dataHeader.method = 8; - switch (_dataHeader.method) { - case Utils.Constants.STORED: - _dataHeader.method = Utils.Constants.STORED; - _compressedData = new Buffer(Utils.Constants.LOCHDR + _entryName.length + _data.length); - _dataHeader.toBinary().copy(_compressedData); - _compressedData.write(_entryName, Utils.Constants.LOCHDR); - _data.copy(_compressedData, Utils.Constants.LOCHDR + _entryName.length); - break; - default: - case Utils.Constants.DEFLATED: - _dataHeader.method = Utils.Constants.DEFLATED; - _entryHeader.method = Utils.Constants.DEFLATED; - - var deflater = new Methods.Deflater(_data); - if (!async) { - var deflated = deflater.deflate(); - _compressedData = new Buffer(deflated.length + Utils.Constants.LOCHDR + _entryName.length); - _compressedData.fill(0); - - _dataHeader.toBinary().copy(_compressedData); - _compressedData.write(_entryName, Utils.Constants.LOCHDR); - deflated.copy(_compressedData, Utils.Constants.LOCHDR + _entryName.length); - - deflated = null; - } else { - deflater.deflateAsync(function(data) { - _compressedData = new Buffer(data.length + Utils.Constants.LOCHDR + _entryName.length); - _dataHeader.toBinary().copy(_compressedData); - _compressedData.write(_entryName, Utils.Constants.LOCHDR); - data.copy(_compressedData, Utils.Constants.LOCHDR + _entryName.length); - callback(_compressedData); - }) - } - deflater = null; - break; - } - _needDeflate = false; - } else { - if (async && callback) { - callback(_compressedData); - } - } - } - - return { - get entryName () { return _entryName; }, - set entryName (val) { - _compressedData && (_needDeflate = true); - _entryName = val; - _isDirectory = val.charAt(_entryName.length - 1) == "/"; - _entryHeader.fileNameLength = val.length; - _dataHeader.fileNameLenght = val.length; - }, - - get extra () { return _extra; }, - set extra (val) { - _extra = val; - _entryHeader.extraLength = val.length; - }, - - get comment () { return _comment; }, - set comment (val) { - _comment = val; - _entryHeader.commentLength = val.length; - }, - - get name () { return _entryName.split("/").pop(); }, - get isDirectory () { return _isDirectory }, - - setCompressedData : function(value) { - _compressedData = value; - _dataHeader.loadFromBinary(_compressedData.slice(0, Utils.Constants.LOCHDR)); - _data = null; - _needDeflate = false; - }, - - getCompressedData : function() { - compress(false, null); - return _compressedData - }, - getCompressedDataAsync : function(/*Function*/callback) { - compress(true, callback) - }, - - setData : function(value) { - if (typeof value == "string") { - value = new Buffer(value); - } - _needDeflate = true; - _compressedData = null; - _dataHeader.time = +new Date(); - _entryHeader.size = _dataHeader.size; - - if (value && value.length) { - _dataHeader.compressedSize = value.length; - _entryHeader.compressedSize = _dataHeader.compressedSize; - _dataHeader.size = value.length; - _entryHeader.size = value.length; - _dataHeader.crc = Utils.crc32(value); - _entryHeader.crc = _dataHeader.crc; - } - //_entryHeader.method = _dataHeader.method; - - _data = value; - }, - - getData : function() { - decompress(false, null); - return _data - }, - - getDataAsync : function(/*Function*/callback) { - decompress(true, callback) - }, - - set header(/*Buffer*/data) { - _entryHeader.loadFromBinary(data); - }, - - get header() { - return _entryHeader; - }, - - packHeader : function() { - var header = _entryHeader.toBinary(); - header.write(_entryName, Utils.Constants.CENHDR); - if (_entryHeader.extraLength) { - _extra.copy(header, Utils.Constants.CENHDR + _entryName.length) - } - if (_entryHeader.commentLength) { - header.write(_comment, Utils.Constants.CENHDR + _entryName.length + _entryHeader.extraLength, _comment.length, 'utf8'); - } - return header; - }, - - toString : function() { - return '{\n' + - '\t"entryName" : "' + _entryName + "\",\n" + - '\t"name" : "' + _entryName.split("/").pop() + "\",\n" + - '\t"comment" : "' + _comment + "\",\n" + - '\t"isDirectory" : ' + _isDirectory + ",\n" + - '\t"header" : ' + _entryHeader.toString().replace(/\t/mg, "\t\t") + ",\n" + - '\t"compressedData" : <' + (_compressedData && _compressedData.length + " bytes buffer" || "null") + ">\n" + - '\t"data" : <' + (_data && _data.length + " bytes buffer" || "null") + ">\n" + - '}'; - } - } -}; \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/zipFile.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/zipFile.js deleted file mode 100644 index eda7f8bf..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/adm-zip/zipFile.js +++ /dev/null @@ -1,214 +0,0 @@ -var ZipEntry = require("./zipEntry"), - Headers = require("./headers"); - Utils = require("./util"); - -module.exports = function(/*Buffer*/buf) { - var entryList = [], - entryTable = {}, - _comment = '', - endHeader = new Headers.MainHeader(); - - if (buf) { - readMainHeader(); - } - - function readEntries() { - entryTable = {}; - entryList = new Array(endHeader.diskEntries); // total number of entries - var index = endHeader.offset; // offset of first CEN header - for(var i = 0; i < entryList.length; i++) { - - var tmp = index, - entry = new ZipEntry(); - - entry.header = buf.slice(tmp, tmp += Utils.Constants.CENHDR); - entry.entryName = buf.toString('utf8', tmp, tmp += entry.header.fileNameLength); - - if (entry.header.extraLength) - entry.extra = buf.slice(tmp, tmp += entry.header.extraLength); - - if (entry.header.commentLength) - entry.comment = buf.toString('utf8', tmp, tmp + entry.header.commentLength); - - index += entry.header.entryHeaderSize; - - if (!entry.isDirectory) { - // read data - //entry.setCompressedData(buf.slice(entry.header.offset, entry.header.offset + Utils.Constants.LOCHDR + entry.header.compressedSize + entry.entryName.length)); - entry.setCompressedData(buf.slice(entry.header.offset, entry.header.offset + Utils.Constants.LOCHDR + entry.header.compressedSize + entry.entryName.length + buf.readUInt16LE(entry.header.offset + Utils.Constants.LOCEXT))); - } - - entryList[i] = entry; - entryTable[entry.entryName] = entry; - } - } - - function readMainHeader() { - var i = buf.length - Utils.Constants.ENDHDR, // END header size - n = Math.max(0, i - 0xFFFF), // 0xFFFF is the max zip file comment length - endOffset = 0; // Start offset of the END header - - for (i; i >= n; i--) { - if (buf[i] != 0x50) continue; // quick check that the byte is 'P' - if (buf.readUInt32LE(i) == Utils.Constants.ENDSIG) { // "PK\005\006" - endOffset = i; - break; - } - } - if (!endOffset) - throw Utils.Errors.INVALID_FORMAT; - - endHeader.loadFromBinary(buf.slice(endOffset, endOffset + Utils.Constants.ENDHDR)); - if (endHeader.commentLength) { - _comment = buf.toString('utf8', endOffset + Utils.Constants.ENDHDR); - } - readEntries(); - } - - return { - /** - * Returns an array of ZipEntry objects existent in the current opened archive - * @return Array - */ - get entries () { - return entryList; - }, - - /** - * Archive comment - * @return {String} - */ - get comment () { return _comment; }, - set comment(val) { - endHeader.commentLength = val.length; - _comment = val; - }, - - /** - * Returns a reference to the entry with the given name or null if entry is inexistent - * - * @param entryName - * @return ZipEntry - */ - getEntry : function(/*String*/entryName) { - return entryTable[entryName] || null; - }, - - /** - * Adds the given entry to the entry list - * - * @param entry - */ - setEntry : function(/*ZipEntry*/entry) { - entryList.push(entry); - entryTable[entry.entryName] = entry; - endHeader.totalEntries = entryList.length; - }, - - /** - * Removes the entry with the given name from the entry list. - * - * If the entry is a directory, then all nested files and directories will be removed - * @param entryName - */ - deleteEntry : function(/*String*/entryName) { - var entry = entryTable[entryName]; - if (entry && entry.isDirectory) { - var _self = this; - this.getEntryChildren(entry).forEach(function(child) { - if (child.entryName != entryName) { - _self.deleteEntry(child.entryName) - } - }) - } - entryList.slice(entryList.indexOf(entry), 1); - delete(entryTable[entryName]); - endHeader.totalEntries = entryList.length; - }, - - /** - * Iterates and returns all nested files and directories of the given entry - * - * @param entry - * @return Array - */ - getEntryChildren : function(/*ZipEntry*/entry) { - if (entry.isDirectory) { - var list = [], - name = entry.entryName, - len = name.length; - - entryList.forEach(function(zipEntry) { - if (zipEntry.entryName.substr(0, len) == name) { - list.push(zipEntry); - } - }); - return list; - } - return [] - }, - - /** - * Returns the zip file - * - * @return Buffer - */ - toBuffer : function() { - entryList.sort(function(a, b) { - var nameA = a.entryName.toLowerCase( ); - var nameB = b.entryName.toLowerCase( ); - if (nameA < nameB) {return -1} - if (nameA > nameB) {return 1} - return 0; - }); - - var totalSize = 0, - data = [], - header = [], - dindex = 0; - - endHeader.size = 0; - endHeader.offset = 0; - - entryList.forEach(function(entry) { - entry.header.offset = dindex; - var compressedData = entry.getCompressedData(); - dindex += compressedData.length; - data.push(compressedData); - - var headerData = entry.packHeader(); - header.push(headerData); - endHeader.size += headerData.length; - totalSize += compressedData.length + headerData.length; - }); - - totalSize += endHeader.mainHeaderSize; - // point to end of data and begining of central directory first record - endHeader.offset = dindex; - - dindex = 0; - var outBuffer = new Buffer(totalSize); - data.forEach(function(content) { - content.copy(outBuffer, dindex); // write data - dindex += content.length; - }); - header.forEach(function(content) { - content.copy(outBuffer, dindex); // write data - dindex += content.length; - }); - - var mainHeader = endHeader.toBinary(); - if (_comment) { - mainHeader.write(_comment, Utils.Constants.ENDHDR); - } - - mainHeader.copy(outBuffer, dindex); - - return outBuffer - }, - - toAsyncBuffer : function(/*Function*/callback) { - - } - } -}; diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/.npmignore deleted file mode 100644 index 7dccd970..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/.npmignore +++ /dev/null @@ -1,15 +0,0 @@ -lib-cov -*.seed -*.log -*.csv -*.dat -*.out -*.pid -*.gz - -pids -logs -results - -node_modules -npm-debug.log \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/LICENSE.TXT b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/LICENSE.TXT deleted file mode 100644 index 55e332a8..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/LICENSE.TXT +++ /dev/null @@ -1,194 +0,0 @@ -Copyright 2012 The Obvious Corporation. -http://obvious.com/ - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -------------------------------------------------------------------------- - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/README.md deleted file mode 100644 index 254a355a..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/README.md +++ /dev/null @@ -1,249 +0,0 @@ -kew: a lightweight (and super fast) promise/deferred framework for node.js -================================== - -**kew** is a lightweight promise framework with an aim of providing a base set of functionality similar to that provided by the [Q library](https://github.com/kriskowal/q "Q"). - -A few answers (for a few questions) -------- - -*Why'd we write it?* - -During our initial usage of **Q** we found that it was consuming 80% of the cpu under load (primarily in chained database callbacks). We spent some time looking at patching **Q** and ultimately found that creating our own lightweight library for server-usage would suit our needs better than figuring out how to make a large cross-platform library more performant on one very specific platform. - -*So this does everything Q does?* - -Nope! **Q** is still an awesome library and does *way* more than **kew**. We support a tiny subset of the **Q** functionality (the subset that we happen to use in our actual use cases). - -What are Promises? -------- - -At its core, a *Promise* is a promise to return a value at some point in the future. A *Promise* represents a value that will be (or may return an error if something goes wrong). *Promises* heavily reduce the complexity of asynchronous coding in node.js-like environments. Example: - -```javascript -// assuming the getUrlContent() function exists and retrieves the content of a url -var htmlPromise = getUrlContent(myUrl) - -// we can then filter that through an http parser (our imaginary parseHtml() function) asynchronously (or maybe synchronously, who knows) -var tagsPromise = htmlPromise.then(parseHtml) - -// and then filter it through another function (getLinks()) which retrieves only the link tags -var linksPromise = tagsPromise.then(getLinks) - -// and then parses the actual urls from the links (using parseUrlsFromLinks()) -var urlsPromise = linksPromise.then(linksPromise) - -// finally, we have a promise that should only provide us with the urls and will run once all the previous steps have ran -urlsPromise.then(function (urls) { - // do something with the urls -}) -``` - -How do I use **kew**? -------- - -As a precursor to all the examples, the following code must be at the top of your page: - -```javascript -var Q = require('kew') -``` - -### Convert a literal into a promise - -The easiest way to start a promise chain is by creating a new promise with a specified literal using Q.resolve() or Q.reject() - -```javascript -// create a promise which passes a value to the next then() call -var successPromise = Q.resolve(val) - -// create a promise which throws an error to be caught by the next fail() call -var failPromise = Q.reject(err) -``` - -In addition, you can create deferreds which can be used if you need to create a promise but resolve it later: - -```javascript -// create the deferreds -var successDefer = Q.defer() -var failDefer = Q.defer() - -// resolve or reject the defers in 1 second -setTimeout(function () { - successDefer.resolve("ok") - failDefer.reject(new Error("this failed")) -}, 1000) - -// extract promises from the deferreds -var successPromise = successDefer.promise -var failPromise = failDefer.promise -``` - -If you have a node-style callback (taking an **Error** as the first parameter and a response as the second), you can call the magic `makeNodeResolver()` function on a defer to allow the defer to handle the callbacks: - -```javascript -// create the deferred -var defer = Q.defer() - -// some node-style function -getObjectFromDatabase(myObjectId, defer.makeNodeResolver()) - -// grab the output -defer.promise - .then(function (obj) { - // successfully retrieved the object - }) - .fail(function (e) { - // failed retrieving the object - }) -``` - -### Handling successful results with `.then()` - -When a promise is resolved, you may call the `.then()` method to retrieve the value of the promise: - -```javascript -promise.then(function (result) { - // do something with the result here -}) -``` - -`.then()` will in turn return a promise which will return the results of whatever it returns (asynchronously or not), allowing it to be chained indefinitely: - -```javascript -Q.resolve('a') - .then(function (result) { - return result + 'b' - }) - .then(function (result) { - return result + 'c' - }) - .then(function (result) { - // result should be 'abc' - }) -``` - -In addition, `.then()` calls may return promises themselves, allowing for complex nesting of asynchronous calls in a flat manner: - -```javascript -var htmlPromise = getUrlContent(myUrl) - -var tagsPromise = htmlPromise.then(function (html) { - if (!validHtml(html)) throw new Error("Invalid HTML") - - // pretend that parseHtml() returns a promise and is asynchronous - return parseHtml(html) -}) -``` - -### Handling errors with `.fail()` - -If a promise is rejected for some reason, you may handle the failure case with the `.fail()` function: - -```javascript -getObjectPromise - .fail(function (e) { - console.error("Failed to retrieve object", e) - }) -``` - -Like `.then()`, `.fail()` also returns a promise. If the `.fail()` call does not throw an error, it will pass the return value of the `.fail()` handler to any `.then()` calls chained to it: - -```javascript -getObjectPromise - .fail(function (e) { - return retryGetObject(objId) - }) - .then(function (obj) { - // yay, we received an object - }) - .fail(function (e) { - // the retry failed :( - console.error("Retrieving the object '" + objId + "' failed") - }) -}) -``` - -If you've reached the end of your promise chain, you may call `.end()` which signifies that the promise chain is ended and any errors should be thrown in whatever scope the code is currently in: - -```javascript -getObjectPromise - // this will throw an error to the uncaught exception handler if the getObjectPromise call is asynchronous - .end() -``` - -### `.fin()` when things are finished - -You may attach a handler to a promise which will be ran regardless of whether the promise was resolved or rejected (but will only run upon completion). This is useful in the cases where you may have set up resources to run a request and wish to tear them down afterwards. `.fin()` will return the promise it is called upon: - -```javascript -var connection = db.connect() - -var itemPromise = db.getItem(itemId) - .fin(function () { - db.close() - }) -``` - -Other utility methods -------- - -There's only one utility method as of now: - -### `.all()` for many things - -If you're waiting for multiple promises to return, you may pass them (mixed in with literals if you desire) into `.all()` which will create a promise that resolves successfully with an array of the results of the promises: - -```javascript -var promises = [] -promises.push(getUrlContent(url1)) -promises.push(getUrlContent(url2)) -promises.push(getUrlContent(url3)) - -Q.all(promises) - .then(function (content) { - // content[0] === content for url 1 - // content[1] === content for url 2 - // content[2] === content for url 3 - }) -``` - -If any of the promises fail, Q.all will fail as well (so make sure to guard your promises with a `.fail()` call beforehand if you don't care whether they succeed or not): - -```javascript -var promises = [] -promises.push(getUrlContent(url1)) -promises.push(getUrlContent(url2)) -promises.push(getUrlContent(url3)) - -Q.all(promises) - .fail(function (e) { - console.log("Failed retrieving a url", e) - }) -``` - -Contributing ------------- - -Questions, comments, bug reports, and pull requests are all welcome. -Submit them at [the project on GitHub](https://github.com/Obvious/kew/). - -Bug reports that include steps-to-reproduce (including code) are the -best. Even better, make them in the form of pull requests that update -the test suite. Thanks! - - -Author ------- - -[Jeremy Stanley](https://github.com/azulus) -supported by -[The Obvious Corporation](http://obvious.com/). - - -License -------- - -Copyright 2013 [The Obvious Corporation](http://obvious.com/). - -Licensed under the Apache License, Version 2.0. -See the top-level file `LICENSE.TXT` and -(http://www.apache.org/licenses/LICENSE-2.0). diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js deleted file mode 100644 index de7ab02c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/kew.js +++ /dev/null @@ -1,426 +0,0 @@ -/** - * An object representing a "promise" for a future value - * - * @param {function(Object)} onSuccess a function to handle successful - * resolution of this promise - * @param {function(Error)} onFail a function to handle failed - * resolution of this promise - * @constructor - */ -function Promise(onSuccess, onFail) { - this.promise = this - this._isPromise = true - this._successFn = onSuccess - this._failFn = onFail - this._hasContext = false - this._nextContext = undefined - this._currentContext = undefined -} - -/** - * Specify that the current promise should have a specified context - * @param {Object} context context - */ -Promise.prototype._useContext = function (context) { - this._nextContext = this._currentContext = context - this._hasContext = true - return this -} - -Promise.prototype.clearContext = function () { - this._hasContext = false - this._nextContext = undefined - return this -} - -/** - * Set the context for all promise handlers to follow - * @param {context} context An arbitrary context - */ -Promise.prototype.setContext = function (context) { - this._nextContext = context - this._hasContext = true - return this -} - -/** - * Get the context for a promise - * @return {Object} the context set by setContext - */ -Promise.prototype.getContext = function () { - return this._nextContext -} - -/** - * Resolve this promise with a specified value - * - * @param {Object} data - */ -Promise.prototype.resolve = function (data) { - if (this._error || this._hasData) throw new Error("Unable to resolve or reject the same promise twice") - - var i - if (data && data._isPromise) { - this._child = data - if (this._promises) { - for (var i = 0; i < this._promises.length; i += 1) { - data._chainPromise(this._promises[i]) - } - delete this._promises - } - - if (this._onComplete) { - for (var i = 0; i < this._onComplete.length; i+= 1) { - data.fin(this._onComplete[i]) - } - delete this._onComplete - } - return - } - - this._hasData = true - this._data = data - - if (this._onComplete) { - for (i = 0; i < this._onComplete.length; i++) { - this._onComplete[i]() - } - } - - if (this._promises) { - for (i = 0; i < this._promises.length; i += 1) { - this._promises[i]._withInput(data) - } - delete this._promises - } -} - -/** - * Reject this promise with an error - * - * @param {Error} e - */ -Promise.prototype.reject = function (e) { - if (this._error || this._hasData) throw new Error("Unable to resolve or reject the same promise twice") - - var i - this._error = e - - if (this._ended) { - process.nextTick(function onPromiseThrow() { - throw e - }) - } - - if (this._onComplete) { - for (i = 0; i < this._onComplete.length; i++) { - this._onComplete[i]() - } - } - - if (this._promises) { - for (i = 0; i < this._promises.length; i += 1) { - this._promises[i]._withError(e) - } - delete this._promises - } -} - -/** - * Provide a callback to be called whenever this promise successfully - * resolves. Allows for an optional second callback to handle the failure - * case. - * - * @param {function(Object)} onSuccess - * @param {?function(Error)} onFail - * @return {Promise} returns a new promise with the output of the onSuccess or - * onFail handler - */ -Promise.prototype.then = function (onSuccess, onFail) { - var promise = new Promise(onSuccess, onFail) - if (this._nextContext) promise._useContext(this._nextContext) - - if (this._child) this._child._chainPromise(promise) - else this._chainPromise(promise) - - return promise -} - -/** - * Provide a callback to be called whenever this promise is rejected - * - * @param {function(Error)} onFail - * @return {Promise} returns a new promise with the output of the onFail handler - */ -Promise.prototype.fail = function (onFail) { - return this.then(null, onFail) -} - -/** - * Provide a callback to be called whenever this promise is either resolved - * or rejected. - * - * @param {function()} onComplete - * @return {Promise} returns the current promise - */ -Promise.prototype.fin = function (onComplete) { - if (this._hasData || this._error) { - onComplete() - return this - } - - if (this._child) { - this._child.fin(onComplete) - } else { - if (!this._onComplete) this._onComplete = [onComplete] - else this._onComplete.push(onComplete) - } - - return this -} - -/** - * Mark this promise as "ended". If the promise is rejected, this will throw an - * error in whatever scope it happens to be in - * - * @return {Promise} returns the current promise - */ -Promise.prototype.end = function () { - if (this._error) { - throw this._error - } - this._ended = true - return this -} - -/** - * Attempt to resolve this promise with the specified input - * - * @param {Object} data the input - */ -Promise.prototype._withInput = function (data) { - if (this._successFn) { - try { - this.resolve(this._successFn(data, this._currentContext)) - } catch (e) { - this.reject(e) - } - } else this.resolve(data) - - // context is no longer needed - delete this._currentContext -} - -/** - * Attempt to reject this promise with the specified error - * - * @param {Error} e - */ -Promise.prototype._withError = function (e) { - if (this._failFn) { - try { - this.resolve(this._failFn(e, this._currentContext)) - } catch (e) { - this.reject(e) - } - } else this.reject(e) - - // context is no longer needed - delete this._currentContext -} - -/** - * Chain a promise to the current promise - * - * @param {Promise} the promise to chain - */ -Promise.prototype._chainPromise = function (promise) { - var i - if (this._hasContext) promise._useContext(this._nextContext) - - if (this._child) { - this._child._chainPromise(promise) - } else if (this._hasData) { - promise._withInput(this._data) - } else if (this._error) { - promise._withError(this._error) - } else if (!this._promises) { - this._promises = [promise] - } else { - this._promises.push(promise) - } -} - -/** - * Utility function used for creating a node-style resolver - * for deferreds - * - * @param {Promise} deferred a promise that looks like a deferred - * @param {Error} err an optional error - * @param {Object} data optional data - */ -function resolver(deferred, err, data) { - if (err) deferred.reject(err) - else deferred.resolve(data) -} - -/** - * Creates a node-style resolver for a deferred by wrapping - * resolver() - * - * @return {function(Error, Object)} node-style callback - */ -Promise.prototype.makeNodeResolver = function () { - return resolver.bind(null, this) -} - -/** - * Static function which creates and resolves a promise immediately - * - * @param {Object} data data to resolve the promise with - * @return {Promise} - */ -function resolve(data) { - var promise = new Promise() - promise.resolve(data) - return promise -} - -/** - * Static function which creates and rejects a promise immediately - * - * @param {Error} e error to reject the promise with - * @return {Promise} - */ -function reject(e) { - var promise = new Promise() - promise.reject(e) - return promise -} - -/** - * Replace an element in an array with a new value. Used by .all() to - * call from .then() - * - * @param {Array.} arr - * @param {number} idx - * @param {Object} val - * @return {Object} the val that's being injected into the array - */ -function replaceEl(arr, idx, val) { - arr[idx] = val - return val -} - -/** - * Takes in an array of promises or literals and returns a promise which returns - * an array of values when all have resolved. If any fail, the promise fails. - * - * @param {Array.} promises - * @return {Promise.>} - */ -function all(promises) { - if (arguments.length != 1 || !Array.isArray(promises)) { - promises = Array.prototype.slice.call(arguments, 0) - } - if (!promises.length) return resolve([]) - - var outputs = [] - var counter = 0 - var finished = false - var promise = new Promise() - var counter = promises.length - - for (var i = 0; i < promises.length; i += 1) { - if (!promises[i] || !promises[i]._isPromise) { - outputs[i] = promises[i] - counter -= 1 - } else { - promises[i].then(replaceEl.bind(null, outputs, i)) - .then(function decrementAllCounter() { - counter-- - if (!finished && counter === 0) { - finished = true - promise.resolve(outputs) - } - }, function onAllError(e) { - if (!finished) { - finished = true - promise.reject(e) - } - }) - } - } - - if (counter === 0 && !finished) { - finished = true - promise.resolve(outputs) - } - - return promise -} - -/** - * Create a new Promise which looks like a deferred - * - * @return {Promise} - */ -function defer() { - return new Promise() -} - -/** - * Return a promise which will wait a specified number of ms to resolve - * - * @param {number} delayMs - * @param {Object} returnVal - * @return {Promise.} returns returnVal - */ -function delay(delayMs, returnVal) { - var defer = new Promise() - setTimeout(function onDelay() { - defer.resolve(returnVal) - }, delayMs) - return defer -} - -/** - * Return a promise which will evaluate the function fn with the provided args - * - * @param {function} fn - * @param {Object} var_args a variable number of arguments - * @return {Promise} - */ -function fcall(fn, var_args) { - var defer = new Promise() - defer.resolve(fn.apply(null, Array.prototype.slice.call(arguments, 1))) - return defer -} - -/** - * Binds a function to a scope with an optional number of curried arguments. Attaches - * a node style callback as the last argument and returns a promise - * - * @param {function} fn - * @param {Object} scope - * @param {Object} var_args a variable number of arguments - * @return {Promise} - */ -function bindPromise(fn, scope, var_args) { - var rootArgs = Array.prototype.slice.call(arguments, 2) - return function onBoundPromise(var_args) { - var defer = new Promise() - fn.apply(scope, rootArgs.concat(Array.prototype.slice.call(arguments, 0), defer.makeNodeResolver())) - return defer - } -} - -module.exports = { - all: all - , bindPromise: bindPromise - , defer: defer - , delay: delay - , fcall: fcall - , resolve: resolve - , reject: reject -} \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/package.json deleted file mode 100644 index 6842dcdc..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "kew", - "description": "a lightweight promise library for node", - "version": "0.1.7", - "homepage": "https://github.com/Obvious/kew", - "authors": [ - "Jeremy Stanley (https://github.com/azulus)" - ], - "contributors": [], - "keywords": [ - "kew", - "promises" - ], - "main": "./kew.js", - "repository": { - "type": "git", - "url": "https://github.com/Obvious/kew.git" - }, - "dependencies": {}, - "devDependencies": { - "nodeunit": "0.7.4" - }, - "scripts": { - "test": "./node_modules/nodeunit/bin/nodeunit test" - }, - "readme": "kew: a lightweight (and super fast) promise/deferred framework for node.js\n==================================\n\n**kew** is a lightweight promise framework with an aim of providing a base set of functionality similar to that provided by the [Q library](https://github.com/kriskowal/q \"Q\").\n\nA few answers (for a few questions)\n-------\n\n*Why'd we write it?*\n\nDuring our initial usage of **Q** we found that it was consuming 80% of the cpu under load (primarily in chained database callbacks). We spent some time looking at patching **Q** and ultimately found that creating our own lightweight library for server-usage would suit our needs better than figuring out how to make a large cross-platform library more performant on one very specific platform.\n\n*So this does everything Q does?*\n\nNope! **Q** is still an awesome library and does *way* more than **kew**. We support a tiny subset of the **Q** functionality (the subset that we happen to use in our actual use cases).\n\nWhat are Promises?\n-------\n\nAt its core, a *Promise* is a promise to return a value at some point in the future. A *Promise* represents a value that will be (or may return an error if something goes wrong). *Promises* heavily reduce the complexity of asynchronous coding in node.js-like environments. Example:\n\n```javascript\n// assuming the getUrlContent() function exists and retrieves the content of a url\nvar htmlPromise = getUrlContent(myUrl)\n\n// we can then filter that through an http parser (our imaginary parseHtml() function) asynchronously (or maybe synchronously, who knows)\nvar tagsPromise = htmlPromise.then(parseHtml)\n\n// and then filter it through another function (getLinks()) which retrieves only the link tags\nvar linksPromise = tagsPromise.then(getLinks)\n\n// and then parses the actual urls from the links (using parseUrlsFromLinks())\nvar urlsPromise = linksPromise.then(linksPromise)\n\n// finally, we have a promise that should only provide us with the urls and will run once all the previous steps have ran\nurlsPromise.then(function (urls) {\n // do something with the urls\n})\n```\n\nHow do I use **kew**?\n-------\n\nAs a precursor to all the examples, the following code must be at the top of your page:\n\n```javascript\nvar Q = require('kew')\n```\n\n### Convert a literal into a promise\n\nThe easiest way to start a promise chain is by creating a new promise with a specified literal using Q.resolve() or Q.reject()\n\n```javascript\n// create a promise which passes a value to the next then() call\nvar successPromise = Q.resolve(val)\n\n// create a promise which throws an error to be caught by the next fail() call\nvar failPromise = Q.reject(err)\n```\n\nIn addition, you can create deferreds which can be used if you need to create a promise but resolve it later:\n\n```javascript\n// create the deferreds\nvar successDefer = Q.defer()\nvar failDefer = Q.defer()\n\n// resolve or reject the defers in 1 second\nsetTimeout(function () {\n successDefer.resolve(\"ok\")\n failDefer.reject(new Error(\"this failed\"))\n}, 1000)\n\n// extract promises from the deferreds\nvar successPromise = successDefer.promise\nvar failPromise = failDefer.promise\n```\n\nIf you have a node-style callback (taking an **Error** as the first parameter and a response as the second), you can call the magic `makeNodeResolver()` function on a defer to allow the defer to handle the callbacks:\n\n```javascript\n// create the deferred\nvar defer = Q.defer()\n\n// some node-style function\ngetObjectFromDatabase(myObjectId, defer.makeNodeResolver())\n\n// grab the output\ndefer.promise\n .then(function (obj) {\n // successfully retrieved the object\n })\n .fail(function (e) {\n // failed retrieving the object\n })\n```\n\n### Handling successful results with `.then()`\n\nWhen a promise is resolved, you may call the `.then()` method to retrieve the value of the promise:\n\n```javascript\npromise.then(function (result) {\n // do something with the result here\n})\n```\n\n`.then()` will in turn return a promise which will return the results of whatever it returns (asynchronously or not), allowing it to be chained indefinitely:\n\n```javascript\nQ.resolve('a')\n .then(function (result) {\n return result + 'b'\n })\n .then(function (result) {\n return result + 'c'\n })\n .then(function (result) {\n // result should be 'abc'\n })\n```\n\nIn addition, `.then()` calls may return promises themselves, allowing for complex nesting of asynchronous calls in a flat manner:\n\n```javascript\nvar htmlPromise = getUrlContent(myUrl)\n\nvar tagsPromise = htmlPromise.then(function (html) {\n if (!validHtml(html)) throw new Error(\"Invalid HTML\")\n\n // pretend that parseHtml() returns a promise and is asynchronous\n return parseHtml(html)\n})\n```\n\n### Handling errors with `.fail()`\n\nIf a promise is rejected for some reason, you may handle the failure case with the `.fail()` function:\n\n```javascript\ngetObjectPromise\n .fail(function (e) {\n console.error(\"Failed to retrieve object\", e)\n })\n```\n\nLike `.then()`, `.fail()` also returns a promise. If the `.fail()` call does not throw an error, it will pass the return value of the `.fail()` handler to any `.then()` calls chained to it:\n\n```javascript\ngetObjectPromise\n .fail(function (e) {\n return retryGetObject(objId)\n })\n .then(function (obj) {\n // yay, we received an object\n })\n .fail(function (e) {\n // the retry failed :(\n console.error(\"Retrieving the object '\" + objId + \"' failed\")\n })\n})\n```\n\nIf you've reached the end of your promise chain, you may call `.end()` which signifies that the promise chain is ended and any errors should be thrown in whatever scope the code is currently in:\n\n```javascript\ngetObjectPromise\n // this will throw an error to the uncaught exception handler if the getObjectPromise call is asynchronous\n .end()\n```\n\n### `.fin()` when things are finished\n\nYou may attach a handler to a promise which will be ran regardless of whether the promise was resolved or rejected (but will only run upon completion). This is useful in the cases where you may have set up resources to run a request and wish to tear them down afterwards. `.fin()` will return the promise it is called upon:\n\n```javascript\nvar connection = db.connect()\n\nvar itemPromise = db.getItem(itemId)\n .fin(function () {\n db.close()\n })\n```\n\nOther utility methods\n-------\n\nThere's only one utility method as of now:\n\n### `.all()` for many things\n\nIf you're waiting for multiple promises to return, you may pass them (mixed in with literals if you desire) into `.all()` which will create a promise that resolves successfully with an array of the results of the promises:\n\n```javascript\nvar promises = []\npromises.push(getUrlContent(url1))\npromises.push(getUrlContent(url2))\npromises.push(getUrlContent(url3))\n\nQ.all(promises)\n .then(function (content) {\n // content[0] === content for url 1\n // content[1] === content for url 2\n // content[2] === content for url 3\n })\n```\n\nIf any of the promises fail, Q.all will fail as well (so make sure to guard your promises with a `.fail()` call beforehand if you don't care whether they succeed or not):\n\n```javascript\nvar promises = []\npromises.push(getUrlContent(url1))\npromises.push(getUrlContent(url2))\npromises.push(getUrlContent(url3))\n\nQ.all(promises)\n .fail(function (e) {\n console.log(\"Failed retrieving a url\", e)\n })\n```\n\nContributing\n------------\n\nQuestions, comments, bug reports, and pull requests are all welcome.\nSubmit them at [the project on GitHub](https://github.com/Obvious/kew/).\n\nBug reports that include steps-to-reproduce (including code) are the\nbest. Even better, make them in the form of pull requests that update\nthe test suite. Thanks!\n\n\nAuthor\n------\n\n[Jeremy Stanley](https://github.com/azulus)\nsupported by\n[The Obvious Corporation](http://obvious.com/).\n\n\nLicense\n-------\n\nCopyright 2013 [The Obvious Corporation](http://obvious.com/).\n\nLicensed under the Apache License, Version 2.0.\nSee the top-level file `LICENSE.TXT` and\n(http://www.apache.org/licenses/LICENSE-2.0).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/Obvious/kew/issues" - }, - "_id": "kew@0.1.7", - "_from": "kew@~0.1.7" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/chain.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/chain.js deleted file mode 100644 index 985b597d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/chain.js +++ /dev/null @@ -1,337 +0,0 @@ -var Q = require('../kew') - -// test that fin() works with a synchronous resolve -exports.testSynchronousThenAndFin = function (test) { - var vals = ['a', 'b'] - var counter = 0 - - var promise1 = Q.resolve(vals[0]) - var promise2 = promise1.fin(function () { - counter++ - }) - var promise3 = promise2.then(function (data) { - if (data === vals[0]) return vals[1] - }) - var promise4 = promise3.fin(function () { - counter++ - }) - - Q.all([promise2, promise4]) - .then(function (data) { - test.equal(counter, 2, "fin() should have been called twice") - test.equal(data[0], vals[0], "first fin() should return the first val") - test.equal(data[1], vals[1], "second fin() should return the second val") - test.done() - }) -} - -// test that fin() works with a synchronous reject -exports.testSynchronousFailAndFin = function (test) { - var errs = [] - errs.push(new Error('nope 1')) - errs.push(new Error('nope 2')) - var counter = 0 - - var promise1 = Q.reject(errs[0]) - var promise2 = promise1.fin(function () { - counter++ - }) - var promise3 = promise2.fail(function (e) { - if (e === errs[0]) throw errs[1] - }) - var promise4 = promise3.fin(function () { - counter++ - }) - - Q.all([ - promise2.fail(function (e) { - return e === errs[0] - }), - promise4.fail(function (e) { - return e === errs[1] - }) - ]) - .then(function (data) { - test.equal(counter, 2, "fin() should have been called twice") - test.equal(data[0] && data[1], true, "all promises should return true") - test.done() - }) -} - -// test that fin() works with an asynchrnous resolve -exports.testAsynchronousThenAndFin = function (test) { - var vals = ['a', 'b'] - var counter = 0 - - var defer = Q.defer() - setTimeout(function () { - defer.resolve(vals[0]) - }) - var promise1 = defer.promise - var promise2 = promise1.fin(function () { - counter++ - }) - var promise3 = promise2.then(function (data) { - if (data !== vals[0]) return - - var defer = Q.defer() - setTimeout(function () { - defer.resolve(vals[1]) - }) - return defer.promise - }) - var promise4 = promise3.fin(function () { - counter++ - }) - - Q.all([promise2, promise4]) - .then(function (data) { - test.equal(counter, 2, "fin() should have been called twice") - test.equal(data[0], vals[0], "first fin() should return the first val") - test.equal(data[1], vals[1], "second fin() should return the second val") - test.done() - }) -} - -// test that fin() works with an asynchronous reject -exports.testAsynchronousFailAndFin = function (test) { - var errs = [] - errs.push(new Error('nope 1')) - errs.push(new Error('nope 2')) - var counter = 0 - - var defer = Q.defer() - setTimeout(function () { - defer.reject(errs[0]) - }, 10) - var promise1 = defer.promise - var promise2 = promise1.fin(function () { - counter++ - }) - var promise3 = promise2.fail(function (e) { - if (e !== errs[0]) return - - var defer = Q.defer() - setTimeout(function () { - defer.reject(errs[1]) - }, 10) - - return defer.promise - }) - var promise4 = promise3.fin(function () { - counter++ - }) - - Q.all([ - promise2.fail(function (e) { - return e === errs[0] - }), - promise4.fail(function (e) { - return e === errs[1] - }) - ]) - .then(function (data) { - test.equal(counter, 2, "fin() should have been called twice") - test.equal(data[0] && data[1], true, "all promises should return true") - test.done() - }) -} - -// test several thens chaining -exports.testChainedThens = function (test) { - var promise1 = Q.resolve('a') - var promise2 = promise1.then(function(data) { - return data + 'b' - }) - var promise3 = promise2.then(function (data) { - return data + 'c' - }) - // testing the same promise again to make sure they can run side by side - var promise4 = promise2.then(function (data) { - return data + 'c' - }) - - Q.all([promise1, promise2, promise3, promise4]) - .then(function (data) { - test.equal(data[0], 'a') - test.equal(data[1], 'ab') - test.equal(data[2], 'abc') - test.equal(data[3], 'abc') - test.done() - }) -} - -// test several fails chaining -exports.testChainedFails = function (test) { - var errs = [] - errs.push(new Error("first err")) - errs.push(new Error("second err")) - errs.push(new Error("third err")) - - var promise1 = Q.reject(errs[0]) - var promise2 = promise1.fail(function (e) { - if (e === errs[0]) throw errs[1] - }) - var promise3 = promise2.fail(function (e) { - if (e === errs[1]) throw errs[2] - }) - var promise4 = promise2.fail(function (e) { - if (e === errs[1]) throw errs[2] - }) - - Q.all([ - promise1.fail(function (e) { - return e === errs[0] - }), - promise2.fail(function (e) { - return e === errs[1] - }), - promise3.fail(function (e) { - return e === errs[2] - }), - promise4.fail(function (e) { - return e === errs[2] - }) - ]) - .then(function (data) { - test.equal(data[0] && data[1] && data[2] && data[3], true) - test.done() - }) -} - -// test that we can call end without callbacks and not fail -exports.testEndNoCallbacks = function (test) { - Q.resolve(true).end() - test.ok("Ended successfully") - test.done() -} - -// test that we can call end with callbacks and fail -exports.testEndNoCallbacksThrows = function (test) { - var testError = new Error('Testing') - try { - Q.reject(testError).end() - test.fail("Should throw an error") - } catch (e) { - test.equal(e, testError, "Should throw the correct error") - } - test.done() -} - -// test chaining when a promise returns a promise -exports.testChainedPromises = function (test) { - var err = new Error('nope') - var val = 'ok' - - var shouldFail = Q.reject(err) - var shouldSucceed = Q.resolve(val) - - Q.resolve("start") - .then(function () { - return shouldFail - }) - .fail(function (e) { - if (e === err) return shouldSucceed - else throw e - }) - .then(function (data) { - test.equal(data, val, "val should be returned") - test.done() - }) -} - -// test .end() is called with no parent scope (causing an uncaught exception) -exports.testChainedEndUncaught = function (test) { - var errs = [] - errs.push(new Error('nope 1')) - errs.push(new Error('nope 2')) - errs.push(new Error('nope 3')) - - process.on('uncaughtException', function (e) { - test.equal(e, errs.shift(), "Error should be uncaught") - if (errs.length === 0) test.done() - }) - - var defer = Q.defer() - defer.promise.end() - - var promise1 = defer.promise - var promise2 = promise1.fail(function (e) { - if (e === errs[0]) throw errs[1] - }) - var promise3 = promise2.fail(function (e) { - if (e === errs[1]) throw errs[2] - }) - - promise1.end() - promise2.end() - promise3.end() - - setTimeout(function () { - defer.reject(errs[0]) - }, 10) -} - -// test .end() is called with a parent scope and is caught -exports.testChainedCaught = function (test) { - var err = new Error('nope') - - try { - Q.reject(err).end() - } catch (e) { - test.equal(e, err, "Error should be caught") - test.done() - } -} - -// test a mix of fails and thens -exports.testChainedMixed = function (test) { - var errs = [] - errs.push(new Error('nope 1')) - errs.push(new Error('nope 2')) - errs.push(new Error('nope 3')) - - var vals = [3, 2, 1] - - var promise1 = Q.reject(errs[0]) - var promise2 = promise1.fail(function (e) { - if (e === errs[0]) return vals[0] - }) - var promise3 = promise2.then(function (data) { - if (data === vals[0]) throw errs[1] - }) - var promise4 = promise3.fail(function (e) { - if (e === errs[1]) return vals[1] - }) - var promise5 = promise4.then(function (data) { - if (data === vals[1]) throw errs[2] - }) - var promise6 = promise5.fail(function (e) { - if (e === errs[2]) return vals[2] - }) - - Q.all([ - promise1.fail(function (e) { - return e === errs[0] - }), - promise2.then(function (data) { - return data === vals[0] - }), - promise3.fail(function (e) { - return e === errs[1] - }), - promise4.then(function (data) { - return data === vals[1] - }), - promise5.fail(function (e) { - return e === errs[2] - }), - promise6.then(function (data) { - return data === vals[2] - }) - ]) - .then(function (data) { - test.equal(data[0] && data[1] && data[2] && data[3] && data[4] && data[5], true, "All values should return true") - test.done() - }) -} \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/context.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/context.js deleted file mode 100644 index b4166816..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/context.js +++ /dev/null @@ -1,89 +0,0 @@ -var Q = require('../kew') - -// test that contexts are propogated based on position -exports.testContextWithDelay = function (test) { - - Q.resolve(true) - .setContext({id: 1}) - .then(function (val, context) { - test.equal(context.id, 1, 'Should return the first context') - return Q.delay(500) - }) - .setContext({id: 2}) - .then(function (val, context) { - test.equal(context.id, 2, 'Should return the second context') - return Q.delay(500) - }) - .clearContext() - .then(function (val, context) { - test.equal(typeof context, 'undefined', 'Should return an undefined context') - return Q.delay(500) - }) - .setContext({id: 3}) - .fin(test.done) -} - -// test adding and removing contexts -exports.testGeneralContextFlow = function (test) { - Q.resolve(true) - // test no context exists - .then(function (val, context) { - test.equal(typeof context, 'undefined', 'Context should be undefined') - throw new Error() - }) - .fail(function (e, context) { - test.equal(typeof context, 'undefined', 'Context should be undefined') - }) - - // set the context and mutate it - .setContext({counter: 1}) - .then(function (val, context) { - test.equal(context.counter, 1, 'Counter should be 1') - context.counter++ - }) - .then(function (val, context) { - test.equal(context.counter, 2, 'Counter should be 2') - context.counter++ - throw new Error() - }) - .fail(function (e, context) { - test.equal(context.counter, 3, 'Counter should be 3') - }) - - // return a context - .then(function (val, context) { - return Q.resolve(false) - .setContext({counter: 0}) - }) - .then(function (val, context) { - test.equal(context.counter, 0, 'Counter should be 0') - throw new Error() - }) - .fail(function (e, context) { - test.equal(context.counter, 0, 'Counter should be 0') - }) - - // returning a promise with a cleared context won't clear the parent context - .then(function (val, context) { - return Q.resolve(false).clearContext() - }) - .then(function (val, context) { - test.equal(context.counter, 0, 'Counter should be 0') - throw new Error() - }) - .fail(function (e, context) { - test.equal(context.counter, 0, 'Counter should be 0') - }) - - // test that clearing the context works - .clearContext() - .then(function (val, context) { - test.equal(typeof context, 'undefined', 'Context should be undefined') - throw new Error() - }) - .fail(function (e, context) { - test.equal(typeof context, 'undefined', 'Context should be undefined') - }) - - .fin(test.done) -} \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/defer.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/defer.js deleted file mode 100644 index 3684f79f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/defer.js +++ /dev/null @@ -1,120 +0,0 @@ -var Q = require('../kew') - -// create a deferred which returns a promise -exports.testDeferredResolve = function (test) { - var val = "ok" - var defer = Q.defer() - - defer.promise - .then(function (data) { - test.equal(data, val, "Promise successfully returned") - test.done() - }) - - setTimeout(function () { - defer.resolve(val) - }, 50) -} - -// make sure a deferred can only resolve once -exports.testDeferredResolveOnce = function (test) { - var defer = Q.defer() - - try { - defer.resolve(true) - defer.resolve(true) - test.fail("Unable to resolve the same deferred twice") - } catch (e) { - } - - test.done() -} - -// create a deferred which returns a failed promise -exports.testDeferredReject = function (test) { - var err = new Error("hello") - var defer = Q.defer() - - defer.promise - .fail(function (e) { - test.equal(e, err, "Promise successfully failed") - test.done() - }) - - setTimeout(function () { - defer.reject(err) - }, 50) -} - -// make sure a deferred can only reject once -exports.testDeferredRejectOnce = function (test) { - var defer = Q.defer() - - try { - defer.reject(new Error("nope 1")) - defer.reject(new Error("nope 2")) - test.fail("Unable to reject the same deferred twice") - } catch (e) { - } - - test.done() -} - -// make sure a deferred can only reject once -exports.testDeferAndRejectFail = function (test) { - var defer - - try { - defer = Q.defer() - defer.reject(new Error("nope 1")) - defer.resolve(true) - test.fail("Unable to reject and resolve the same deferred") - } catch (e) { - test.ok(true, "Unable to reject and resolve same deferred") - } - - try { - defer = Q.defer() - defer.resolve(true) - defer.reject(new Error("nope 1")) - test.fail("Unable to reject and resolve the same deferred") - } catch (e) { - test.ok(true, "Unable to reject and resolve same deferred") - } - - test.done() -} - -// create a deferred which resolves with a node-standard callback -exports.testDeferredResolverSuccess = function (test) { - var val = "ok" - var defer = Q.defer() - var callback = defer.makeNodeResolver() - - defer.promise - .then(function (data) { - test.equal(data, val, "Promise successfully returned") - test.done() - }) - - setTimeout(function () { - callback(null, val) - }, 50) -} - -// create a deferred which rejects with a node-standard callback -exports.testDeferredResolverSuccess = function (test) { - var err = new Error("hello") - var defer = Q.defer() - var callback = defer.makeNodeResolver() - - defer.promise - .fail(function (e) { - test.equal(e, err, "Promise successfully failed") - test.done() - }) - - setTimeout(function () { - callback(err) - }, 50) -} \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/static.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/static.js deleted file mode 100644 index e4b4b0d5..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/kew/test/static.js +++ /dev/null @@ -1,187 +0,0 @@ -var Q = require('../kew') - -// create a promise from a literal -exports.testQResolve = function (test) { - var val = "ok" - - Q.resolve(val) - .then(function (data) { - test.equal(data, val, "Promise successfully returned") - test.done() - }) -} - -// create a failed promise from an error literal -exports.testQReject = function (test) { - var err = new Error("hello") - - Q.reject(err) - .fail(function (e) { - test.equal(e, err, "Promise successfully failed") - test.done() - }) -} - -// test Q.all with an empty array -exports.testQEmptySuccess = function (test) { - var promises = [] - - // make sure all results come back - Q.all(promises) - .then(function (data) { - test.equal(data.length, 0, "No records should be returned") - test.done() - }) -} - -// test Q.all with only literals -exports.testQAllLiteralsSuccess = function (test) { - var vals = [3, 2, 1] - var promises = [] - - promises.push(vals[0]) - promises.push(vals[1]) - promises.push(vals[2]) - - // make sure all results come back - Q.all(promises) - .then(function (data) { - test.equal(data[0], vals[0], "First val should be returned") - test.equal(data[1], vals[1], "Second val should be returned") - test.equal(data[2], vals[2], "Third val should be returned") - test.done() - }) -} - -// test Q.all with only promises -exports.testQAllPromisesSuccess = function (test) { - var vals = [3, 2, 1] - var promises = [] - - promises.push(Q.resolve(vals[0])) - promises.push(Q.resolve(vals[1])) - promises.push(Q.resolve(vals[2])) - - // make sure all results come back - Q.all(promises) - .then(function (data) { - test.equal(data[0], vals[0], "First val should be returned") - test.equal(data[1], vals[1], "Second val should be returned") - test.equal(data[2], vals[2], "Third val should be returned") - test.done() - }) -} - -// create a promise which waits for other promises -exports.testQAllAssortedSuccess = function (test) { - var vals = [3, 2, 1] - var promises = [] - - // a promise that returns the value immediately - promises.push(Q.resolve(vals[0])) - - // the value itself - promises.push(vals[1]) - - // a promise which returns in 10ms - var defer = Q.defer() - promises.push(defer.promise) - setTimeout(function () { - defer.resolve(vals[2]) - }, 10) - - // make sure all results come back - Q.all(promises) - .then(function (data) { - test.equal(data[0], vals[0], "First val should be returned") - test.equal(data[1], vals[1], "Second val should be returned") - test.equal(data[2], vals[2], "Third val should be returned") - test.done() - }) -} - -// test Q.all with a failing promise -exports.testQAllError = function (test) { - var vals = [3, 2, 1] - var err = new Error("hello") - var promises = [] - - promises.push(vals[0]) - promises.push(vals[1]) - - var defer = Q.defer() - promises.push(defer.promise) - defer.reject(err) - - // make sure all results come back - Q.all(promises) - .fail(function (e) { - test.equal(e, err) - test.done() - }) -} - -// test all var_args -exports.testAllVarArgs = function (test) { - var promises = ['a', 'b'] - - Q.all.apply(Q, promises) - .then(function (results) { - test.equal(promises[0], results[0], "First element should be returned") - test.equal(promises[1], results[1], "Second element should be returned") - test.done() - }) -} - -// test all array -exports.testAllArray = function (test) { - var promises = ['a', 'b'] - - Q.all(promises) - .then(function (results) { - test.equal(promises[0], results[0], "First element should be returned") - test.equal(promises[1], results[1], "Second element should be returned") - test.done() - }) -} - -// test delay -exports.testDelay = function (test) { - var val = "Hello, there" - var startTime = Date.now() - - Q.resolve(val) - .then(Q.delay.bind(Q, 1000)) - .then(function (returnVal) { - test.equal(returnVal, val, "Val should be passed through") - test.equal(Date.now() - startTime >= 1000, true, "Should have waited a second") - test.done() - }) -} - -// test fcall -exports.testFcall = function (test) { - var adder = function (a, b) { - return a + b - } - - Q.fcall(adder, 2, 3) - .then(function (val) { - test.equal(val, 5, "Val should be 2 + 3") - test.done() - }) -} - -// test binding a callback function with a promise -exports.testBindPromise = function (test) { - var adder = function (a, b, callback) { - callback(null, a + b) - } - - var boundAdder = Q.bindPromise(adder, null, 2) - boundAdder(3) - .then(function (val) { - test.equal(val, 5, "Val should be 2 + 3") - test.done() - }) -} \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/.travis.yml b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/examples/pow.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/index.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/package.json deleted file mode 100644 index a71d8b77..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@0.3.5" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/readme.markdown b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/chmod.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/clobber.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/mkdirp.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/perm.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/perm_sync.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/race.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/rel.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/return.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/return_sync.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/root.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/sync.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/umask.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/umask_sync.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/.npmignore deleted file mode 100644 index 9ecd205c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.*.sw[op] -.DS_Store -test/fixtures/out diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/.travis.yml b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/.travis.yml deleted file mode 100644 index f686c49b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/.travis.yml +++ /dev/null @@ -1,7 +0,0 @@ -language: node_js - -node_js: - - 0.4 - - 0.6 - - 0.7 - - 0.8 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/LICENSE.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/LICENSE.md deleted file mode 100644 index e2b9b413..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -###Copyright (C) 2011 by Charlie McConnell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/README.md deleted file mode 100644 index 79ad086c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# ncp - Asynchronous recursive file & directory copying - -[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp) - -Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically. - -## Command Line usage - -Usage is simple: `ncp [source] [dest] [--limit=concurrency limit] -[--filter=filter] --stopOnErr` - -The 'filter' is a Regular Expression - matched files will be copied. - -The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time. - -'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any -errors arise, rather than attempting to continue while logging errors. - -If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue. - -## Programmatic usage - -Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. - -```javascript -var ncp = require('ncp').ncp; - -ncp.limit = 16; - -ncp(source, destination, function (err) { - if (err) { - return console.error(err); - } - console.log('done!'); -}); -``` - -You can also call ncp like `ncp(source, destination, options, callback)`. -`options` should be a dictionary. Currently, such options are available: - - * `options.filter` - a `RegExp` instance, against which each file name is - tested to determine whether to copy it or not, or a function taking single - parameter: copied file name, returning `true` or `false`, determining - whether to copy file or not. - - * `options.transform` - a function: `function (read, write) { read.pipe(write) }` - used to apply streaming transforms while copying. - - * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite - destination files that already exist. - -Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/bin/ncp b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/bin/ncp deleted file mode 100755 index 388eaba6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/bin/ncp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - - - - -var ncp = require('../lib/ncp'), - args = process.argv.slice(2), - source, dest; - -if (args.length < 2) { - console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); - process.exit(1); -} - -// parse arguments the hard way -function startsWith(str, prefix) { - return str.substr(0, prefix.length) == prefix; -} - -var options = {}; -args.forEach(function (arg) { - if (startsWith(arg, "--limit=")) { - options.limit = parseInt(arg.split('=', 2)[1], 10); - } - if (startsWith(arg, "--filter=")) { - options.filter = new RegExp(arg.split('=', 2)[1]); - } - if (startsWith(arg, "--stoponerr")) { - options.stopOnErr = true; - } -}); - -ncp.ncp(args[0], args[1], options, function (err) { - if (Array.isArray(err)) { - console.error('There were errors during the copy.'); - err.forEach(function (err) { - console.error(err.stack || err.message); - }); - process.exit(1); - } - else if (err) { - console.error('An error has occurred.'); - console.error(err.stack || err.message); - process.exit(1); - } -}); - - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/lib/ncp.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/lib/ncp.js deleted file mode 100644 index d871e009..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/lib/ncp.js +++ /dev/null @@ -1,222 +0,0 @@ -var fs = require('fs'), - path = require('path'); - -module.exports = ncp -ncp.ncp = ncp - -function ncp (source, dest, options, callback) { - if (!callback) { - callback = options; - options = {}; - } - - var basePath = process.cwd(), - currentPath = path.resolve(basePath, source), - targetPath = path.resolve(basePath, dest), - filter = options.filter, - transform = options.transform, - clobber = options.clobber !== false, - errs = null, - started = 0, - finished = 0, - running = 0, - limit = options.limit || ncp.limit || 16; - - limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit; - - startCopy(currentPath); - - function startCopy(source) { - started++; - if (filter) { - if (filter instanceof RegExp) { - if (!filter.test(source)) { - return cb(true); - } - } - else if (typeof filter === 'function') { - if (!filter(source)) { - return cb(true); - } - } - } - return getStats(source); - } - - function defer(fn) { - if (typeof(setImmediate) === 'function') - return setImmediate(fn); - return process.nextTick(fn); - } - - function getStats(source) { - if (running >= limit) { - return defer(function () { - getStats(source); - }); - } - running++; - fs.lstat(source, function (err, stats) { - var item = {}; - if (err) { - return onError(err); - } - - // We need to get the mode from the stats object and preserve it. - item.name = source; - item.mode = stats.mode; - - if (stats.isDirectory()) { - return onDir(item); - } - else if (stats.isFile()) { - return onFile(item); - } - else if (stats.isSymbolicLink()) { - // Symlinks don't really need to know about the mode. - return onLink(source); - } - }); - } - - function onFile(file) { - var target = file.name.replace(currentPath, targetPath); - isWritable(target, function (writable) { - if (writable) { - return copyFile(file, target); - } - if(clobber) - rmFile(target, function () { - copyFile(file, target); - }); - }); - } - - function copyFile(file, target) { - var readStream = fs.createReadStream(file.name), - writeStream = fs.createWriteStream(target, { mode: file.mode }); - if(transform) { - transform(readStream, writeStream,file); - } else { - readStream.pipe(writeStream); - } - readStream.once('end', cb); - } - - function rmFile(file, done) { - fs.unlink(file, function (err) { - if (err) { - return onError(err); - } - return done(); - }); - } - - function onDir(dir) { - var target = dir.name.replace(currentPath, targetPath); - isWritable(target, function (writable) { - if (writable) { - return mkDir(dir, target); - } - copyDir(dir.name); - }); - } - - function mkDir(dir, target) { - fs.mkdir(target, dir.mode, function (err) { - if (err) { - return onError(err); - } - copyDir(dir.name); - }); - } - - function copyDir(dir) { - fs.readdir(dir, function (err, items) { - if (err) { - return onError(err); - } - items.forEach(function (item) { - startCopy(dir + '/' + item); - }); - return cb(); - }); - } - - function onLink(link) { - var target = link.replace(currentPath, targetPath); - fs.readlink(link, function (err, resolvedPath) { - if (err) { - return onError(err); - } - checkLink(resolvedPath, target); - }); - } - - function checkLink(resolvedPath, target) { - isWritable(target, function (writable) { - if (writable) { - return makeLink(resolvedPath, target); - } - fs.readlink(target, function (err, targetDest) { - if (err) { - return onError(err); - } - if (targetDest === resolvedPath) { - return cb(); - } - return rmFile(target, function () { - makeLink(resolvedPath, target); - }); - }); - }); - } - - function makeLink(linkPath, target) { - fs.symlink(linkPath, target, function (err) { - if (err) { - return onError(err); - } - return cb(); - }); - } - - function isWritable(path, done) { - fs.lstat(path, function (err, stats) { - if (err) { - if (err.code === 'ENOENT') return done(true); - return done(false); - } - return done(false); - }); - } - - function onError(err) { - if (options.stopOnError) { - return callback(err); - } - else if (!errs && options.errs) { - errs = fs.createWriteStream(options.errs); - } - else if (!errs) { - errs = []; - } - if (typeof errs.write === 'undefined') { - errs.push(err); - } - else { - errs.write(err.stack + '\n\n'); - } - return cb(); - } - - function cb(skipped) { - if (!skipped) running--; - finished++; - if ((started === finished) && (running === 0)) { - return errs ? callback(errs) : callback(null); - } - } -}; - - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/package.json deleted file mode 100644 index fc7f91bd..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "ncp", - "version": "0.4.2", - "author": { - "name": "AvianFlu", - "email": "charlie@charlieistheman.com" - }, - "description": "Asynchronous recursive file copy utility.", - "bin": { - "ncp": "./bin/ncp" - }, - "devDependencies": { - "vows": "0.6.x", - "rimraf": "1.0.x", - "read-dir-files": "0.0.x" - }, - "main": "./lib/ncp.js", - "repository": { - "type": "git", - "url": "https://github.com/AvianFlu/ncp.git" - }, - "keywords": [ - "cli", - "copy" - ], - "license": "MIT", - "engine": { - "node": ">=0.4" - }, - "scripts": { - "test": "vows --isolate --spec" - }, - "readme": "# ncp - Asynchronous recursive file & directory copying\n\n[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)\n\nThink `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.\n\n## Command Line usage\n\nUsage is simple: `ncp [source] [dest] [--limit=concurrency limit]\n[--filter=filter] --stopOnErr`\n\nThe 'filter' is a Regular Expression - matched files will be copied.\n\nThe 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.\n\n'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any\nerrors arise, rather than attempting to continue while logging errors.\n\nIf there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.\n\n## Programmatic usage\n\nProgrammatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. \n\n```javascript\nvar ncp = require('ncp').ncp;\n\nncp.limit = 16;\n\nncp(source, destination, function (err) {\n if (err) {\n return console.error(err);\n }\n console.log('done!');\n});\n```\n\nYou can also call ncp like `ncp(source, destination, options, callback)`. \n`options` should be a dictionary. Currently, such options are available:\n\n * `options.filter` - a `RegExp` instance, against which each file name is\n tested to determine whether to copy it or not, or a function taking single\n parameter: copied file name, returning `true` or `false`, determining\n whether to copy file or not.\n\n * `options.transform` - a function: `function (read, write) { read.pipe(write) }`\n used to apply streaming transforms while copying.\n\n * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite \n destination files that already exist.\n\nPlease open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/AvianFlu/ncp/issues" - }, - "homepage": "https://github.com/AvianFlu/ncp", - "_id": "ncp@0.4.2", - "_from": "ncp@0.4.2" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/a b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/a deleted file mode 100644 index 802992c4..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/a +++ /dev/null @@ -1 +0,0 @@ -Hello world diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/b b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/b deleted file mode 100644 index 9f6bb185..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/b +++ /dev/null @@ -1 +0,0 @@ -Hello ncp diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/c b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/c deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/d b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/d deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/e b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/e deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/f b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/f deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/sub/a b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/sub/a deleted file mode 100644 index cf291b5e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/sub/a +++ /dev/null @@ -1 +0,0 @@ -Hello nodejitsu diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/sub/b b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/fixtures/src/sub/b deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/ncp-test.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/ncp-test.js deleted file mode 100644 index 3c613f77..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/ncp/test/ncp-test.js +++ /dev/null @@ -1,86 +0,0 @@ -var assert = require('assert'), - path = require('path'), - rimraf = require('rimraf'), - vows = require('vows'), - readDirFiles = require('read-dir-files'), - ncp = require('../').ncp; - -var fixtures = path.join(__dirname, 'fixtures'), - src = path.join(fixtures, 'src'), - out = path.join(fixtures, 'out'); - -vows.describe('ncp').addBatch({ - 'When copying a directory of files': { - topic: function () { - var cb = this.callback; - rimraf(out, function () { - ncp(src, out, cb); - }); - }, - 'files should be copied': { - topic: function () { - var cb = this.callback; - - readDirFiles(src, 'utf8', function (srcErr, srcFiles) { - readDirFiles(out, 'utf8', function (outErr, outFiles) { - cb(outErr, srcFiles, outFiles); - }); - }); - }, - 'and the destination should match the source': function (err, srcFiles, outFiles) { - assert.isNull(err); - assert.deepEqual(srcFiles, outFiles); - } - } - } -}).addBatch({ - 'When copying files using filter': { - topic: function() { - var cb = this.callback; - var filter = function(name) { - return name.substr(name.length - 1) != 'a' - } - rimraf(out, function () { - ncp(src, out, {filter: filter}, cb); - }); - }, - 'it should copy files': { - topic: function () { - var cb = this.callback; - - readDirFiles(src, 'utf8', function (srcErr, srcFiles) { - function filter(files) { - for (var fileName in files) { - var curFile = files[fileName]; - if (curFile instanceof Object) - return filter(curFile); - if (fileName.substr(fileName.length - 1) == 'a') - delete files[fileName]; - } - } - filter(srcFiles); - readDirFiles(out, 'utf8', function (outErr, outFiles) { - cb(outErr, srcFiles, outFiles); - }); - }); - }, - 'and destination files should match source files that pass filter': function (err, srcFiles, outFiles) { - assert.isNull(err); - assert.deepEqual(srcFiles, outFiles); - } - } - } -}).addBatch({ - 'When copying files using transform': { - 'it should pass file descriptors along to transform functions': function() { - ncp(src, out, { - transform: function(read,write,file) { - assert.notEqual(file.name, undefined); - assert.strictEqual(typeof file.mode,'number'); - read.pipe(write); - } - }, function(){}); - } - } -}).export(module); - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/.npmignore deleted file mode 100644 index baa471ca..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/test/fixtures/userconfig-with-gc diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/README.md deleted file mode 100644 index afc995d1..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# npmconf - -The config thing npm uses - -If you are interested in interacting with the config settings that npm -uses, then use this module. - -However, if you are writing a new Node.js program, and want -configuration functionality similar to what npm has, but for your -own thing, then I'd recommend using [rc](https://github.com/dominictarr/rc), -which is probably what you want. - -If I were to do it all over again, that's what I'd do for npm. But, -alas, there are many systems depending on many of the particulars of -npm's configuration setup, so it's not worth the cost of changing. - -## USAGE - -```javascript -var npmconf = require('npmconf') - -// pass in the cli options that you read from the cli -// or whatever top-level configs you want npm to use for now. -npmconf.load({some:'configs'}, function (er, conf) { - // do stuff with conf - conf.get('some', 'cli') // 'configs' - conf.get('username') // 'joebobwhatevers' - conf.set('foo', 'bar', 'user') - conf.save('user', function (er) { - // foo = bar is now saved to ~/.npmrc or wherever - }) -}) -``` diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/config-defs.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/config-defs.js deleted file mode 100644 index bbada56d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/config-defs.js +++ /dev/null @@ -1,396 +0,0 @@ -// defaults, types, and shorthands. - - -var path = require("path") - , url = require("url") - , Stream = require("stream").Stream - , semver = require("semver") - , stableFamily = semver.parse(process.version) - , nopt = require("nopt") - , osenv = require("osenv") - -try { - var log = require("npmlog") -} catch (er) { - var util = require('util') - var log = { warn: function (m) { - console.warn(m + util.format.apply(util, [].slice.call(arguments, 1))) - } } -} - -exports.Octal = Octal -function Octal () {} -function validateOctal (data, k, val) { - // must be either an integer or an octal string. - if (typeof val === "number") { - data[k] = val - return true - } - - if (typeof val === "string") { - if (val.charAt(0) !== "0" || isNaN(val)) return false - data[k] = parseInt(val, 8).toString(8) - } -} - -function validateSemver (data, k, val) { - if (!semver.valid(val)) return false - data[k] = semver.valid(val) -} - -function validateStream (data, k, val) { - if (!(val instanceof Stream)) return false - data[k] = val -} - -nopt.typeDefs.semver = { type: semver, validate: validateSemver } -nopt.typeDefs.Octal = { type: Octal, validate: validateOctal } -nopt.typeDefs.Stream = { type: Stream, validate: validateStream } - -nopt.invalidHandler = function (k, val, type, data) { - log.warn("invalid config", k + "=" + JSON.stringify(val)) - - if (Array.isArray(type)) { - if (type.indexOf(url) !== -1) type = url - else if (type.indexOf(path) !== -1) type = path - } - - switch (type) { - case Octal: - log.warn("invalid config", "Must be octal number, starting with 0") - break - case url: - log.warn("invalid config", "Must be a full url with 'http://'") - break - case path: - log.warn("invalid config", "Must be a valid filesystem path") - break - case Number: - log.warn("invalid config", "Must be a numeric value") - break - case Stream: - log.warn("invalid config", "Must be an instance of the Stream class") - break - } -} - -if (!stableFamily || (+stableFamily[2] % 2)) stableFamily = null -else stableFamily = stableFamily[1] + "." + stableFamily[2] - -var defaults - -var temp = osenv.tmpdir() -var home = osenv.home() - -var uidOrPid = process.getuid ? process.getuid() : process.pid - -if (home) process.env.HOME = home -else home = path.resolve(temp, "npm-" + uidOrPid) - -var cacheExtra = process.platform === "win32" ? "npm-cache" : ".npm" -var cacheRoot = process.platform === "win32" && process.env.APPDATA || home -var cache = path.resolve(cacheRoot, cacheExtra) - - -var globalPrefix -Object.defineProperty(exports, "defaults", {get: function () { - if (defaults) return defaults - - if (process.env.PREFIX) { - globalPrefix = process.env.PREFIX - } else if (process.platform === "win32") { - // c:\node\node.exe --> prefix=c:\node\ - globalPrefix = path.dirname(process.execPath) - } else { - // /usr/local/bin/node --> prefix=/usr/local - globalPrefix = path.dirname(path.dirname(process.execPath)) - - // destdir only is respected on Unix - if (process.env.DESTDIR) { - globalPrefix = path.join(process.env.DESTDIR, globalPrefix) - } - } - - return defaults = - { "always-auth" : false - , "bin-links" : true - , browser : null - - , ca : // the npm CA certificate. - [ "-----BEGIN CERTIFICATE-----\n"+ - "MIIChzCCAfACCQDauvz/KHp8ejANBgkqhkiG9w0BAQUFADCBhzELMAkGA1UEBhMC\n"+ - "VVMxCzAJBgNVBAgTAkNBMRAwDgYDVQQHEwdPYWtsYW5kMQwwCgYDVQQKEwNucG0x\n"+ - "IjAgBgNVBAsTGW5wbSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkxDjAMBgNVBAMTBW5w\n"+ - "bUNBMRcwFQYJKoZIhvcNAQkBFghpQGl6cy5tZTAeFw0xMTA5MDUwMTQ3MTdaFw0y\n"+ - "MTA5MDIwMTQ3MTdaMIGHMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExEDAOBgNV\n"+ - "BAcTB09ha2xhbmQxDDAKBgNVBAoTA25wbTEiMCAGA1UECxMZbnBtIENlcnRpZmlj\n"+ - "YXRlIEF1dGhvcml0eTEOMAwGA1UEAxMFbnBtQ0ExFzAVBgkqhkiG9w0BCQEWCGlA\n"+ - "aXpzLm1lMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDLI4tIqPpRW+ACw9GE\n"+ - "OgBlJZwK5f8nnKCLK629Pv5yJpQKs3DENExAyOgDcyaF0HD0zk8zTp+ZsLaNdKOz\n"+ - "Gn2U181KGprGKAXP6DU6ByOJDWmTlY6+Ad1laYT0m64fERSpHw/hjD3D+iX4aMOl\n"+ - "y0HdbT5m1ZGh6SJz3ZqxavhHLQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAC4ySDbC\n"+ - "l7W1WpLmtLGEQ/yuMLUf6Jy/vr+CRp4h+UzL+IQpCv8FfxsYE7dhf/bmWTEupBkv\n"+ - "yNL18lipt2jSvR3v6oAHAReotvdjqhxddpe5Holns6EQd1/xEZ7sB1YhQKJtvUrl\n"+ - "ZNufy1Jf1r0ldEGeA+0ISck7s+xSh9rQD2Op\n"+ - "-----END CERTIFICATE-----\n", - - // "GlobalSign Root CA" - "-----BEGIN CERTIFICATE-----\n"+ - "MIIDdTCCAl2gAwIBAgILBAAAAAABFUtaw5QwDQYJKoZIhvcNAQEFBQAwVzELMAkGA1UEBhMCQkUx\n"+ - "GTAXBgNVBAoTEEdsb2JhbFNpZ24gbnYtc2ExEDAOBgNVBAsTB1Jvb3QgQ0ExGzAZBgNVBAMTEkds\n"+ - "b2JhbFNpZ24gUm9vdCBDQTAeFw05ODA5MDExMjAwMDBaFw0yODAxMjgxMjAwMDBaMFcxCzAJBgNV\n"+ - "BAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMRAwDgYDVQQLEwdSb290IENBMRswGQYD\n"+ - "VQQDExJHbG9iYWxTaWduIFJvb3QgQ0EwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDa\n"+ - "DuaZjc6j40+Kfvvxi4Mla+pIH/EqsLmVEQS98GPR4mdmzxzdzxtIK+6NiY6arymAZavpxy0Sy6sc\n"+ - "THAHoT0KMM0VjU/43dSMUBUc71DuxC73/OlS8pF94G3VNTCOXkNz8kHp1Wrjsok6Vjk4bwY8iGlb\n"+ - "Kk3Fp1S4bInMm/k8yuX9ifUSPJJ4ltbcdG6TRGHRjcdGsnUOhugZitVtbNV4FpWi6cgKOOvyJBNP\n"+ - "c1STE4U6G7weNLWLBYy5d4ux2x8gkasJU26Qzns3dLlwR5EiUWMWea6xrkEmCMgZK9FGqkjWZCrX\n"+ - "gzT/LCrBbBlDSgeF59N89iFo7+ryUp9/k5DPAgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNV\n"+ - "HRMBAf8EBTADAQH/MB0GA1UdDgQWBBRge2YaRQ2XyolQL30EzTSo//z9SzANBgkqhkiG9w0BAQUF\n"+ - "AAOCAQEA1nPnfE920I2/7LqivjTFKDK1fPxsnCwrvQmeU79rXqoRSLblCKOzyj1hTdNGCbM+w6Dj\n"+ - "Y1Ub8rrvrTnhQ7k4o+YviiY776BQVvnGCv04zcQLcFGUl5gE38NflNUVyRRBnMRddWQVDf9VMOyG\n"+ - "j/8N7yy5Y0b2qvzfvGn9LhJIZJrglfCm7ymPAbEVtQwdpf5pLGkkeB6zpxxxYu7KyJesF12KwvhH\n"+ - "hm4qxFYxldBniYUr+WymXUadDKqC5JlR3XC321Y9YeRq4VzW9v493kHMB65jUr9TU/Qr6cf9tveC\n"+ - "X4XSQRjbgbMEHMUfpIBvFSDJ3gyICh3WZlXi/EjJKSZp4A==\n"+ - "-----END CERTIFICATE-----\n", - - // "GlobalSign Root CA - R2" - "-----BEGIN CERTIFICATE-----\n"+ - "MIIDujCCAqKgAwIBAgILBAAAAAABD4Ym5g0wDQYJKoZIhvcNAQEFBQAwTDEgMB4GA1UECxMXR2xv\n"+ - "YmFsU2lnbiBSb290IENBIC0gUjIxEzARBgNVBAoTCkdsb2JhbFNpZ24xEzARBgNVBAMTCkdsb2Jh\n"+ - "bFNpZ24wHhcNMDYxMjE1MDgwMDAwWhcNMjExMjE1MDgwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxT\n"+ - "aWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2ln\n"+ - "bjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKbPJA6+Lm8omUVCxKs+IVSbC9N/hHD6\n"+ - "ErPLv4dfxn+G07IwXNb9rfF73OX4YJYJkhD10FPe+3t+c4isUoh7SqbKSaZeqKeMWhG8eoLrvozp\n"+ - "s6yWJQeXSpkqBy+0Hne/ig+1AnwblrjFuTosvNYSuetZfeLQBoZfXklqtTleiDTsvHgMCJiEbKjN\n"+ - "S7SgfQx5TfC4LcshytVsW33hoCmEofnTlEnLJGKRILzdC9XZzPnqJworc5HGnRusyMvo4KD0L5CL\n"+ - "TfuwNhv2GXqF4G3yYROIXJ/gkwpRl4pazq+r1feqCapgvdzZX99yqWATXgAByUr6P6TqBwMhAo6C\n"+ - "ygPCm48CAwEAAaOBnDCBmTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4E\n"+ - "FgQUm+IHV2ccHsBqBt5ZtJot39wZhi4wNgYDVR0fBC8wLTAroCmgJ4YlaHR0cDovL2NybC5nbG9i\n"+ - "YWxzaWduLm5ldC9yb290LXIyLmNybDAfBgNVHSMEGDAWgBSb4gdXZxwewGoG3lm0mi3f3BmGLjAN\n"+ - "BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp\n"+ - "9Z8FHSbBuOmDAGJFtqkIk7mpM0sYmsL4h4hO291xNBrBVNpGP+DTKqttVCL1OmLNIG+6KYnX3ZHu\n"+ - "01yiPqFbQfXf5WRDLenVOavSot+3i9DAgBkcRcAtjOj4LaR0VknFBbVPFd5uRHg5h6h+u/N5GJG7\n"+ - "9G+dwfCMNYxdAfvDbbnvRG15RjF+Cv6pgsH/76tuIMRQyV+dTZsXjAzlAcmgQWpzU/qlULRuJQ/7\n"+ - "TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg==\n"+ - "-----END CERTIFICATE-----\n" ] - - - , cache : cache - - , "cache-lock-stale": 60000 - , "cache-lock-retries": 10 - , "cache-lock-wait": 10000 - - , "cache-max": Infinity - , "cache-min": 10 - - , color : true - , coverage: false - , depth: Infinity - , description : true - , dev : false - , editor : osenv.editor() - , "engine-strict": false - , force : false - - , "fetch-retries": 2 - , "fetch-retry-factor": 10 - , "fetch-retry-mintimeout": 10000 - , "fetch-retry-maxtimeout": 60000 - - , git: "git" - - , global : false - , globalconfig : path.resolve(globalPrefix, "etc", "npmrc") - , globalignorefile : path.resolve( globalPrefix, "etc", "npmignore") - , group : process.platform === "win32" ? 0 - : process.env.SUDO_GID || (process.getgid && process.getgid()) - , ignore: "" - , "init-module": path.resolve(home, '.npm-init.js') - , "init.version" : "0.0.0" - , "init.author.name" : "" - , "init.author.email" : "" - , "init.author.url" : "" - , json: false - , link: false - , loglevel : "http" - , logstream : process.stderr - , long : false - , message : "%s" - , "node-version" : process.version - , npaturl : "http://npat.npmjs.org/" - , npat : false - , "onload-script" : false - , optional: true - , parseable : false - , pre: false - , prefix : globalPrefix - , production: process.env.NODE_ENV === "production" - , "proprietary-attribs": true - , proxy : process.env.HTTP_PROXY || process.env.http_proxy || null - , "https-proxy" : process.env.HTTPS_PROXY || process.env.https_proxy || - process.env.HTTP_PROXY || process.env.http_proxy || null - , "user-agent" : "node/" + process.version - + ' ' + process.platform - + ' ' + process.arch - , "rebuild-bundle" : true - , registry : "https://registry.npmjs.org/" - , rollback : true - , save : false - , "save-bundle": false - , "save-dev" : false - , "save-optional" : false - , searchopts: "" - , searchexclude: null - , searchsort: "name" - , shell : osenv.shell() - , "sign-git-tag": false - , "strict-ssl": true - , tag : "latest" - , tmp : temp - , unicode : true - , "unsafe-perm" : process.platform === "win32" - || process.platform === "cygwin" - || !( process.getuid && process.setuid - && process.getgid && process.setgid ) - || process.getuid() !== 0 - , usage : false - , user : process.platform === "win32" ? 0 : "nobody" - , username : "" - , userconfig : path.resolve(home, ".npmrc") - , userignorefile : path.resolve(home, ".npmignore") - , umask: 022 - , version : false - , versions : false - , viewer: process.platform === "win32" ? "browser" : "man" - , yes: null - - , _exit : true - } -}}) - -exports.types = - { "always-auth" : Boolean - , "bin-links": Boolean - , browser : [null, String] - , ca: [null, String, Array] - , cache : path - , "cache-lock-stale": Number - , "cache-lock-retries": Number - , "cache-lock-wait": Number - , "cache-max": Number - , "cache-min": Number - , color : ["always", Boolean] - , coverage: Boolean - , depth : Number - , description : Boolean - , dev : Boolean - , editor : String - , "engine-strict": Boolean - , force : Boolean - , "fetch-retries": Number - , "fetch-retry-factor": Number - , "fetch-retry-mintimeout": Number - , "fetch-retry-maxtimeout": Number - , git: String - , global : Boolean - , globalconfig : path - , globalignorefile: path - , group : [Number, String] - , "https-proxy" : [null, url] - , "user-agent" : String - , ignore : String - , "init-module": path - , "init.version" : [null, semver] - , "init.author.name" : String - , "init.author.email" : String - , "init.author.url" : ["", url] - , json: Boolean - , link: Boolean - , loglevel : ["silent","win","error","warn","http","info","verbose","silly"] - , logstream : Stream - , long : Boolean - , message: String - , "node-version" : [null, semver] - , npaturl : url - , npat : Boolean - , "onload-script" : [null, String] - , optional: Boolean - , parseable : Boolean - , pre: Boolean - , prefix: path - , production: Boolean - , "proprietary-attribs": Boolean - , proxy : [null, url] - , "rebuild-bundle" : Boolean - , registry : [null, url] - , rollback : Boolean - , save : Boolean - , "save-bundle": Boolean - , "save-dev" : Boolean - , "save-optional" : Boolean - , searchopts : String - , searchexclude: [null, String] - , searchsort: [ "name", "-name" - , "description", "-description" - , "author", "-author" - , "date", "-date" - , "keywords", "-keywords" ] - , shell : String - , "sign-git-tag": Boolean - , "strict-ssl": Boolean - , tag : String - , tmp : path - , unicode : Boolean - , "unsafe-perm" : Boolean - , usage : Boolean - , user : [Number, String] - , username : String - , userconfig : path - , userignorefile : path - , umask: Octal - , version : Boolean - , versions : Boolean - , viewer: String - , yes: [false, null, Boolean] - , _exit : Boolean - , _password: String - } - -exports.shorthands = - { s : ["--loglevel", "silent"] - , d : ["--loglevel", "info"] - , dd : ["--loglevel", "verbose"] - , ddd : ["--loglevel", "silly"] - , noreg : ["--no-registry"] - , N : ["--no-registry"] - , reg : ["--registry"] - , "no-reg" : ["--no-registry"] - , silent : ["--loglevel", "silent"] - , verbose : ["--loglevel", "verbose"] - , quiet: ["--loglevel", "warn"] - , q: ["--loglevel", "warn"] - , h : ["--usage"] - , H : ["--usage"] - , "?" : ["--usage"] - , help : ["--usage"] - , v : ["--version"] - , f : ["--force"] - , gangster : ["--force"] - , gangsta : ["--force"] - , desc : ["--description"] - , "no-desc" : ["--no-description"] - , "local" : ["--no-global"] - , l : ["--long"] - , m : ["--message"] - , p : ["--parseable"] - , porcelain : ["--parseable"] - , g : ["--global"] - , S : ["--save"] - , D : ["--save-dev"] - , O : ["--save-optional"] - , y : ["--yes"] - , n : ["--no-yes"] - , B : ["--save-bundle"] - } diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/.bin/nopt b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/.bin/nopt deleted file mode 100755 index 30e9fdba..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/.bin/nopt +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env node -var nopt = require("../lib/nopt") - , types = { num: Number - , bool: Boolean - , help: Boolean - , list: Array - , "num-list": [Number, Array] - , "str-list": [String, Array] - , "bool-list": [Boolean, Array] - , str: String - , clear: Boolean - , config: Boolean - , length: Number - } - , shorthands = { s: [ "--str", "astring" ] - , b: [ "--bool" ] - , nb: [ "--no-bool" ] - , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] - , "?": ["--help"] - , h: ["--help"] - , H: ["--help"] - , n: [ "--num", "125" ] - , c: ["--config"] - , l: ["--length"] - } - , parsed = nopt( types - , shorthands - , process.argv - , 2 ) - -console.log("parsed", parsed) - -if (parsed.help) { - console.log("") - console.log("nopt cli tester") - console.log("") - console.log("types") - console.log(Object.keys(types).map(function M (t) { - var type = types[t] - if (Array.isArray(type)) { - return [t, type.map(function (type) { return type.name })] - } - return [t, type && type.name] - }).reduce(function (s, i) { - s[i[0]] = i[1] - return s - }, {})) - console.log("") - console.log("shorthands") - console.log(shorthands) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/.bin/semver b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/.bin/semver deleted file mode 100755 index d4e637e6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/.bin/semver +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , semver = require("../semver") - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a - switch (a = argv.shift()) { - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.filter(semver.valid) - if (!versions.length) return fail() - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i]) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function fail () { process.exit(1) } - -function success () { - versions.sort(semver.compare) - .map(semver.clean) - .forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["Usage: semver -v [-r ]" - ,"Test if version(s) satisfy the supplied range(s)," - ,"and sort them." - ,"" - ,"Multiple versions or ranges may be supplied." - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no versions are valid, or ranges are not satisfied," - ,"then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} - - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/.npmignore deleted file mode 100644 index 13abef4f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -node_modules/* -npm_debug.log diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/LICENCE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/LICENCE deleted file mode 100644 index 171dd970..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/LICENCE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2011 Dominic Tarr - -Permission is hereby granted, free of charge, -to any person obtaining a copy of this software and -associated documentation files (the "Software"), to -deal in the Software without restriction, including -without limitation the rights to use, copy, modify, -merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom -the Software is furnished to do so, -subject to the following conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR -ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/index.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/index.js deleted file mode 100755 index 0ef3a91f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/index.js +++ /dev/null @@ -1,282 +0,0 @@ -var ProtoList = require('proto-list') - , path = require('path') - , fs = require('fs') - , ini = require('ini') - , EE = require('events').EventEmitter - , url = require('url') - , http = require('http') - -var exports = module.exports = function () { - var args = [].slice.call(arguments) - , conf = new ConfigChain() - - while(args.length) { - var a = args.shift() - if(a) conf.push - ( 'string' === typeof a - ? json(a) - : a ) - } - - return conf -} - -//recursively find a file... - -var find = exports.find = function () { - var rel = path.join.apply(null, [].slice.call(arguments)) - - function find(start, rel) { - var file = path.join(start, rel) - try { - fs.statSync(file) - return file - } catch (err) { - if(path.dirname(start) !== start) // root - return find(path.dirname(start), rel) - } - } - return find(__dirname, rel) -} - -var parse = exports.parse = function (content, file, type) { - content = '' + content - // if we don't know what it is, try json and fall back to ini - // if we know what it is, then it must be that. - if (!type) { - try { return JSON.parse(content) } - catch (er) { return ini.parse(content) } - } else if (type === 'json') { - if (this.emit) { - try { return JSON.parse(content) } - catch (er) { this.emit('error', er) } - } else { - return JSON.parse(content) - } - } else { - return ini.parse(content) - } -} - -var json = exports.json = function () { - var args = [].slice.call(arguments).filter(function (arg) { return arg != null }) - var file = path.join.apply(null, args) - var content - try { - content = fs.readFileSync(file,'utf-8') - } catch (err) { - return - } - return parse(content, file, 'json') -} - -var env = exports.env = function (prefix, env) { - env = env || process.env - var obj = {} - var l = prefix.length - for(var k in env) { - if(k.indexOf(prefix) === 0) - obj[k.substring(l)] = env[k] - } - - return obj -} - -exports.ConfigChain = ConfigChain -function ConfigChain () { - EE.apply(this) - ProtoList.apply(this, arguments) - this._awaiting = 0 - this._saving = 0 - this.sources = {} -} - -// multi-inheritance-ish -var extras = { - constructor: { value: ConfigChain } -} -Object.keys(EE.prototype).forEach(function (k) { - extras[k] = Object.getOwnPropertyDescriptor(EE.prototype, k) -}) -ConfigChain.prototype = Object.create(ProtoList.prototype, extras) - -ConfigChain.prototype.del = function (key, where) { - // if not specified where, then delete from the whole chain, scorched - // earth style - if (where) { - var target = this.sources[where] - target = target && target.data - if (!target) { - return this.emit('error', new Error('not found '+where)) - } - delete target[key] - } else { - for (var i = 0, l = this.list.length; i < l; i ++) { - delete this.list[i][key] - } - } - return this -} - -ConfigChain.prototype.set = function (key, value, where) { - var target - - if (where) { - target = this.sources[where] - target = target && target.data - if (!target) { - return this.emit('error', new Error('not found '+where)) - } - } else { - target = this.list[0] - if (!target) { - return this.emit('error', new Error('cannot set, no confs!')) - } - } - target[key] = value - return this -} - -ConfigChain.prototype.get = function (key, where) { - if (where) { - where = this.sources[where] - if (where) where = where.data - if (where && Object.hasOwnProperty.call(where, key)) return where[key] - return undefined - } - return this.list[0][key] -} - -ConfigChain.prototype.save = function (where, type, cb) { - if (typeof type === 'function') cb = type, type = null - var target = this.sources[where] - if (!target || !(target.path || target.source) || !target.data) { - // TODO: maybe save() to a url target could be a PUT or something? - // would be easy to swap out with a reddis type thing, too - return this.emit('error', new Error('bad save target: '+where)) - } - - if (target.source) { - var pref = target.prefix || '' - Object.keys(target.data).forEach(function (k) { - target.source[pref + k] = target.data[k] - }) - return this - } - - var type = type || target.type - var data = target.data - if (target.type === 'json') { - data = JSON.stringify(data) - } else { - data = ini.stringify(data) - } - - this._saving ++ - fs.writeFile(target.path, data, 'utf8', function (er) { - this._saving -- - if (er) { - if (cb) return cb(er) - else return this.emit('error', er) - } - if (this._saving === 0) { - if (cb) cb() - this.emit('save') - } - }.bind(this)) - return this -} - -ConfigChain.prototype.addFile = function (file, type, name) { - name = name || file - var marker = {__source__:name} - this.sources[name] = { path: file, type: type } - this.push(marker) - this._await() - fs.readFile(file, 'utf8', function (er, data) { - if (er) this.emit('error', er) - this.addString(data, file, type, marker) - }.bind(this)) - return this -} - -ConfigChain.prototype.addEnv = function (prefix, env, name) { - name = name || 'env' - var data = exports.env(prefix, env) - this.sources[name] = { data: data, source: env, prefix: prefix } - return this.add(data, name) -} - -ConfigChain.prototype.addUrl = function (req, type, name) { - this._await() - var href = url.format(req) - name = name || href - var marker = {__source__:name} - this.sources[name] = { href: href, type: type } - this.push(marker) - http.request(req, function (res) { - var c = [] - var ct = res.headers['content-type'] - if (!type) { - type = ct.indexOf('json') !== -1 ? 'json' - : ct.indexOf('ini') !== -1 ? 'ini' - : href.match(/\.json$/) ? 'json' - : href.match(/\.ini$/) ? 'ini' - : null - marker.type = type - } - - res.on('data', c.push.bind(c)) - .on('end', function () { - this.addString(Buffer.concat(c), href, type, marker) - }.bind(this)) - .on('error', this.emit.bind(this, 'error')) - - }.bind(this)) - .on('error', this.emit.bind(this, 'error')) - .end() - - return this -} - -ConfigChain.prototype.addString = function (data, file, type, marker) { - data = this.parse(data, file, type) - this.add(data, marker) - return this -} - -ConfigChain.prototype.add = function (data, marker) { - if (marker && typeof marker === 'object') { - var i = this.list.indexOf(marker) - if (i === -1) { - return this.emit('error', new Error('bad marker')) - } - this.splice(i, 1, data) - marker = marker.__source__ - this.sources[marker] = this.sources[marker] || {} - this.sources[marker].data = data - // we were waiting for this. maybe emit 'load' - this._resolve() - } else { - if (typeof marker === 'string') { - this.sources[marker] = this.sources[marker] || {} - this.sources[marker].data = data - } - // trigger the load event if nothing was already going to do so. - this._await() - this.push(data) - process.nextTick(this._resolve.bind(this)) - } - return this -} - -ConfigChain.prototype.parse = exports.parse - -ConfigChain.prototype._await = function () { - this._awaiting++ -} - -ConfigChain.prototype._resolve = function () { - this._awaiting-- - if (this._awaiting === 0) this.emit('load', this) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md deleted file mode 100644 index 43cfa358..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/README.md +++ /dev/null @@ -1,3 +0,0 @@ -A list of objects, bound by their prototype chain. - -Used in npm's config stuff. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json deleted file mode 100644 index 1d73d658..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "proto-list", - "version": "1.2.2", - "description": "A utility for managing a prototype chain", - "main": "./proto-list.js", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "https://github.com/isaacs/proto-list" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/proto-list/blob/master/LICENSE" - }, - "devDependencies": { - "tap": "0" - }, - "readme": "A list of objects, bound by their prototype chain.\n\nUsed in npm's config stuff.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/proto-list/issues" - }, - "homepage": "https://github.com/isaacs/proto-list", - "_id": "proto-list@1.2.2", - "_from": "proto-list@~1.2.1" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js deleted file mode 100644 index 67d25038..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/proto-list.js +++ /dev/null @@ -1,81 +0,0 @@ - -module.exports = ProtoList - -function ProtoList () { - this.list = [] - var root = null - Object.defineProperty(this, 'root', { - get: function () { return root }, - set: function (r) { - root = r - if (this.list.length) { - this.list[this.list.length - 1].__proto__ = r - } - }, - enumerable: true, - configurable: true - }) -} - -ProtoList.prototype = - { get length () { return this.list.length } - , get keys () { - var k = [] - for (var i in this.list[0]) k.push(i) - return k - } - , get snapshot () { - var o = {} - this.keys.forEach(function (k) { o[k] = this.get(k) }, this) - return o - } - , get store () { - return this.list[0] - } - , push : function (obj) { - if (typeof obj !== "object") obj = {valueOf:obj} - if (this.list.length >= 1) { - this.list[this.list.length - 1].__proto__ = obj - } - obj.__proto__ = this.root - return this.list.push(obj) - } - , pop : function () { - if (this.list.length >= 2) { - this.list[this.list.length - 2].__proto__ = this.root - } - return this.list.pop() - } - , unshift : function (obj) { - obj.__proto__ = this.list[0] || this.root - return this.list.unshift(obj) - } - , shift : function () { - if (this.list.length === 1) { - this.list[0].__proto__ = this.root - } - return this.list.shift() - } - , get : function (key) { - return this.list[0][key] - } - , set : function (key, val, save) { - if (!this.length) this.push({}) - if (save && this.list[0].hasOwnProperty(key)) this.push({}) - return this.list[0][key] = val - } - , forEach : function (fn, thisp) { - for (var key in this.list[0]) fn.call(thisp, key, this.list[0][key]) - } - , slice : function () { - return this.list.slice.apply(this.list, arguments) - } - , splice : function () { - // handle injections - var ret = this.list.splice.apply(this.list, arguments) - for (var i = 0, l = this.list.length; i < l; i++) { - this.list[i].__proto__ = this.list[i + 1] || this.root - } - return ret - } - } diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js deleted file mode 100644 index 5cd66bef..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/node_modules/proto-list/test/basic.js +++ /dev/null @@ -1,61 +0,0 @@ -var tap = require("tap") - , test = tap.test - , ProtoList = require("../proto-list.js") - -tap.plan(1) - -tap.test("protoList tests", function (t) { - var p = new ProtoList - p.push({foo:"bar"}) - p.push({}) - p.set("foo", "baz") - t.equal(p.get("foo"), "baz") - - var p = new ProtoList - p.push({foo:"bar"}) - p.set("foo", "baz") - t.equal(p.get("foo"), "baz") - t.equal(p.length, 1) - p.pop() - t.equal(p.length, 0) - p.set("foo", "asdf") - t.equal(p.length, 1) - t.equal(p.get("foo"), "asdf") - p.push({bar:"baz"}) - t.equal(p.length, 2) - t.equal(p.get("foo"), "asdf") - p.shift() - t.equal(p.length, 1) - t.equal(p.get("foo"), undefined) - - - p.unshift({foo:"blo", bar:"rab"}) - p.unshift({foo:"boo"}) - t.equal(p.length, 3) - t.equal(p.get("foo"), "boo") - t.equal(p.get("bar"), "rab") - - var ret = p.splice(1, 1, {bar:"bar"}) - t.same(ret, [{foo:"blo", bar:"rab"}]) - t.equal(p.get("bar"), "bar") - - // should not inherit default object properties - t.equal(p.get('hasOwnProperty'), undefined) - - // unless we give it those. - p.root = {} - t.equal(p.get('hasOwnProperty'), {}.hasOwnProperty) - - p.root = {default:'monkey'} - t.equal(p.get('default'), 'monkey') - - p.push({red:'blue'}) - p.push({red:'blue'}) - p.push({red:'blue'}) - while (p.length) { - t.equal(p.get('default'), 'monkey') - p.shift() - } - - t.end() -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/package.json deleted file mode 100644 index ad68251c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "config-chain", - "version": "1.1.8", - "description": "HANDLE CONFIGURATION ONCE AND FOR ALL", - "homepage": "http://github.com/dominictarr/config-chain", - "repository": { - "type": "git", - "url": "https://github.com/dominictarr/config-chain.git" - }, - "dependencies": { - "proto-list": "~1.2.1", - "ini": "1" - }, - "devDependencies": { - "tap": "0.3.0" - }, - "author": { - "name": "Dominic Tarr", - "email": "dominic.tarr@gmail.com", - "url": "http://dominictarr.com" - }, - "scripts": { - "test": "tap test/" - }, - "readme": "#config-chain\n\nUSE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS\n\n``` js\n\n //npm install config-chain\n\n var cc = require('config-chain')\n , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS.\n , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS.\n\n // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN\n // EARLIER ITEMS OVERIDE LATER ITEMS\n // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST!\n\n //strings are interpereted as filenames.\n //will be loaded synchronously\n\n var conf =\n cc(\n //OVERRIDE SETTINGS WITH COMMAND LINE OPTS\n opts,\n\n //ENV VARS IF PREFIXED WITH 'myApp_'\n\n cc.env('myApp_'), //myApp_foo = 'like this'\n\n //FILE NAMED BY ENV\n path.join(__dirname, 'config.' + env + '.json'),\n\n //IF `env` is PRODUCTION\n env === 'prod'\n ? path.join(__dirname, 'special.json') //load a special file\n : null //NULL IS IGNORED!\n\n //SUBDIR FOR ENV CONFIG\n path.join(__dirname, 'config', env, 'config.json'),\n\n //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE\n cc.find('config.json'),\n\n //PUT DEFAULTS LAST\n {\n host: 'localhost'\n port: 8000\n })\n\n var host = conf.get('host')\n\n // or\n\n var host = conf.store.host\n\n```\n\nFINALLY, EASY FLEXIBLE CONFIGURATIONS!\n\n##see also: [proto-list](https://github.com/isaacs/proto-list/)\n\nWHATS THAT YOU SAY?\n\nYOU WANT A \"CLASS\" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS?\n\nEXTEND WITH YOUR OWN FUNCTIONALTY!?\n\n## CONFIGCHAIN LIVES TO SERVE ONLY YOU!\n\n```javascript\nvar cc = require('config-chain')\n\n// all the stuff you did before\nvar config = cc({\n some: 'object'\n },\n cc.find('config.json'),\n cc.env('myApp_')\n )\n // CONFIGS AS A SERVICE, aka \"CaaS\", aka EVERY DEVOPS DREAM OMG!\n .addUrl('http://configurator:1234/my-configs')\n // ASYNC FTW!\n .addFile('/path/to/file.json')\n\n // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT\n // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST\n // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE\n .add({ another: 'object' })\n\n // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!!\n .on('error', function (er) {\n // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW\n // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\\\n throw er\n })\n\n // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!!\n .on('load', function (config) {\n console.awesome('HOLY SHIT!')\n })\n```\n\n# BORING API DOCS\n\n## cc(...args)\n\nMAKE A CHAIN AND ADD ALL THE ARGS.\n\nIf the arg is a STRING, then it shall be a JSON FILENAME.\n\nSYNC I/O!\n\nRETURN THE CHAIN!\n\n## cc.json(...args)\n\nJoin the args INTO A JSON FILENAME!\n\nSYNC I/O!\n\n## cc.find(relativePath)\n\nSEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES.\n\nRETURN THE FOUND PATH!\n\nSYNC I/O!\n\n## cc.parse(content, file, type)\n\nParse the content string, and guess the type from either the\nspecified type or the filename.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.env(prefix, env=process.env)\n\nGet all the keys on the provided env object (or process.env) which are\nprefixed by the specified prefix, and put the values on a new object.\n\nRETURN THE RESULTING OBJECT!\n\nNO I/O!\n\n## cc.ConfigChain()\n\nThe ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING!\n\nOne of these is returned by the main exported function, as well.\n\nIt inherits (prototypically) from\n[ProtoList](https://github.com/isaacs/proto-list/), and also inherits\n(parasitically) from\n[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter)\n\nIt has all the methods from both, and except where noted, they are\nunchanged.\n\n### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain.\n\n## chain.sources\n\nA list of all the places where it got stuff. The keys are the names\npassed to addFile or addUrl etc, and the value is an object with some\ninfo about the data source.\n\n## chain.addFile(filename, type, [name=filename])\n\nFilename is the name of the file. Name is an arbitrary string to be\nused later if you desire. Type is either 'ini' or 'json', and will\ntry to guess intelligently if omitted.\n\nLoaded files can be saved later.\n\n## chain.addUrl(url, type, [name=url])\n\nSame as the filename thing, but with a url.\n\nCan't be saved later.\n\n## chain.addEnv(prefix, env, [name='env'])\n\nAdd all the keys from the env object that start with the prefix.\n\n## chain.addString(data, file, type, [name])\n\nParse the string and add it to the set. (Mainly used internally.)\n\n## chain.add(object, [name])\n\nAdd the object to the set.\n\n## chain.root {Object}\n\nThe root from which all the other config objects in the set descend\nprototypically.\n\nPut your defaults here.\n\n## chain.set(key, value, name)\n\nSet the key to the value on the named config object. If name is\nunset, then set it on the first config object in the set. (That is,\nthe one with the highest priority, which was added first.)\n\n## chain.get(key, [name])\n\nGet the key from the named config object explicitly, or from the\nresolved configs if not specified.\n\n## chain.save(name, type)\n\nWrite the named config object back to its origin.\n\nCurrently only supported for env and file config types.\n\nFor files, encode the data according to the type.\n\n## chain.on('save', function () {})\n\nWhen one or more files are saved, emits `save` event when they're all\nsaved.\n\n## chain.on('load', function (chain) {})\n\nWhen the config chain has loaded all the specified files and urls and\nsuch, the 'load' event fires.\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/dominictarr/config-chain/issues" - }, - "_id": "config-chain@1.1.8", - "_from": "config-chain@~1.1.1" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/readme.markdown b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/readme.markdown deleted file mode 100644 index c83a4306..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/readme.markdown +++ /dev/null @@ -1,228 +0,0 @@ -#config-chain - -USE THIS MODULE TO LOAD ALL YOUR CONFIGURATIONS - -``` js - - //npm install config-chain - - var cc = require('config-chain') - , opts = require('optimist').argv //ALWAYS USE OPTIMIST FOR COMMAND LINE OPTIONS. - , env = opts.env || process.env.YOUR_APP_ENV || 'dev' //SET YOUR ENV LIKE THIS. - - // EACH ARG TO CONFIGURATOR IS LOADED INTO CONFIGURATION CHAIN - // EARLIER ITEMS OVERIDE LATER ITEMS - // PUTS COMMAND LINE OPTS FIRST, AND DEFAULTS LAST! - - //strings are interpereted as filenames. - //will be loaded synchronously - - var conf = - cc( - //OVERRIDE SETTINGS WITH COMMAND LINE OPTS - opts, - - //ENV VARS IF PREFIXED WITH 'myApp_' - - cc.env('myApp_'), //myApp_foo = 'like this' - - //FILE NAMED BY ENV - path.join(__dirname, 'config.' + env + '.json'), - - //IF `env` is PRODUCTION - env === 'prod' - ? path.join(__dirname, 'special.json') //load a special file - : null //NULL IS IGNORED! - - //SUBDIR FOR ENV CONFIG - path.join(__dirname, 'config', env, 'config.json'), - - //SEARCH PARENT DIRECTORIES FROM CURRENT DIR FOR FILE - cc.find('config.json'), - - //PUT DEFAULTS LAST - { - host: 'localhost' - port: 8000 - }) - - var host = conf.get('host') - - // or - - var host = conf.store.host - -``` - -FINALLY, EASY FLEXIBLE CONFIGURATIONS! - -##see also: [proto-list](https://github.com/isaacs/proto-list/) - -WHATS THAT YOU SAY? - -YOU WANT A "CLASS" SO THAT YOU CAN DO CRAYCRAY JQUERY CRAPS? - -EXTEND WITH YOUR OWN FUNCTIONALTY!? - -## CONFIGCHAIN LIVES TO SERVE ONLY YOU! - -```javascript -var cc = require('config-chain') - -// all the stuff you did before -var config = cc({ - some: 'object' - }, - cc.find('config.json'), - cc.env('myApp_') - ) - // CONFIGS AS A SERVICE, aka "CaaS", aka EVERY DEVOPS DREAM OMG! - .addUrl('http://configurator:1234/my-configs') - // ASYNC FTW! - .addFile('/path/to/file.json') - - // OBJECTS ARE OK TOO, they're SYNC but they still ORDER RIGHT - // BECAUSE PROMISES ARE USED BUT NO, NOT *THOSE* PROMISES, JUST - // ACTUAL PROMISES LIKE YOU MAKE TO YOUR MOM, KEPT OUT OF LOVE - .add({ another: 'object' }) - - // DIE A THOUSAND DEATHS IF THIS EVER HAPPENS!! - .on('error', function (er) { - // IF ONLY THERE WAS SOMETHIGN HARDER THAN THROW - // MY SORROW COULD BE ADEQUATELY EXPRESSED. /o\ - throw er - }) - - // THROW A PARTY IN YOUR FACE WHEN ITS ALL LOADED!! - .on('load', function (config) { - console.awesome('HOLY SHIT!') - }) -``` - -# BORING API DOCS - -## cc(...args) - -MAKE A CHAIN AND ADD ALL THE ARGS. - -If the arg is a STRING, then it shall be a JSON FILENAME. - -SYNC I/O! - -RETURN THE CHAIN! - -## cc.json(...args) - -Join the args INTO A JSON FILENAME! - -SYNC I/O! - -## cc.find(relativePath) - -SEEK the RELATIVE PATH by climbing the TREE OF DIRECTORIES. - -RETURN THE FOUND PATH! - -SYNC I/O! - -## cc.parse(content, file, type) - -Parse the content string, and guess the type from either the -specified type or the filename. - -RETURN THE RESULTING OBJECT! - -NO I/O! - -## cc.env(prefix, env=process.env) - -Get all the keys on the provided env object (or process.env) which are -prefixed by the specified prefix, and put the values on a new object. - -RETURN THE RESULTING OBJECT! - -NO I/O! - -## cc.ConfigChain() - -The ConfigChain class for CRAY CRAY JQUERY STYLE METHOD CHAINING! - -One of these is returned by the main exported function, as well. - -It inherits (prototypically) from -[ProtoList](https://github.com/isaacs/proto-list/), and also inherits -(parasitically) from -[EventEmitter](http://nodejs.org/api/events.html#events_class_events_eventemitter) - -It has all the methods from both, and except where noted, they are -unchanged. - -### LET IT BE KNOWN THAT chain IS AN INSTANCE OF ConfigChain. - -## chain.sources - -A list of all the places where it got stuff. The keys are the names -passed to addFile or addUrl etc, and the value is an object with some -info about the data source. - -## chain.addFile(filename, type, [name=filename]) - -Filename is the name of the file. Name is an arbitrary string to be -used later if you desire. Type is either 'ini' or 'json', and will -try to guess intelligently if omitted. - -Loaded files can be saved later. - -## chain.addUrl(url, type, [name=url]) - -Same as the filename thing, but with a url. - -Can't be saved later. - -## chain.addEnv(prefix, env, [name='env']) - -Add all the keys from the env object that start with the prefix. - -## chain.addString(data, file, type, [name]) - -Parse the string and add it to the set. (Mainly used internally.) - -## chain.add(object, [name]) - -Add the object to the set. - -## chain.root {Object} - -The root from which all the other config objects in the set descend -prototypically. - -Put your defaults here. - -## chain.set(key, value, name) - -Set the key to the value on the named config object. If name is -unset, then set it on the first config object in the set. (That is, -the one with the highest priority, which was added first.) - -## chain.get(key, [name]) - -Get the key from the named config object explicitly, or from the -resolved configs if not specified. - -## chain.save(name, type) - -Write the named config object back to its origin. - -Currently only supported for env and file config types. - -For files, encode the data according to the type. - -## chain.on('save', function () {}) - -When one or more files are saved, emits `save` event when they're all -saved. - -## chain.on('load', function (chain) {}) - -When the config chain has loaded all the specified files and urls and -such, the 'load' event fires. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/broken.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/broken.js deleted file mode 100644 index 101a3e4f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/broken.js +++ /dev/null @@ -1,10 +0,0 @@ - - -var cc = require('..') -var assert = require('assert') - - -//throw on invalid json -assert.throws(function () { - cc(__dirname + '/broken.json') -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/broken.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/broken.json deleted file mode 100644 index 2107ac18..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/broken.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "name": "config-chain", - "version": "0.3.0", - "description": "HANDLE CONFIGURATION ONCE AND FOR ALL", - "homepage": "http://github.com/dominictarr/config-chain", - "repository": { - "type": "git", - "url": "https://github.com/dominictarr/config-chain.git" - } - //missing , and then this comment. this json is intensionally invalid - "dependencies": { - "proto-list": "1", - "ini": "~1.0.2" - }, - "bundleDependencies": ["ini"], - "REM": "REMEMBER TO REMOVE BUNDLING WHEN/IF ISAACS MERGES ini#7", - "author": "Dominic Tarr (http://dominictarr.com)", - "scripts": { - "test": "node test/find-file.js && node test/ini.js && node test/env.js" - } -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/chain-class.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/chain-class.js deleted file mode 100644 index bbc0d4cb..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/chain-class.js +++ /dev/null @@ -1,100 +0,0 @@ -var test = require('tap').test -var CC = require('../index.js').ConfigChain - -var env = { foo_blaz : 'blzaa', foo_env : 'myenv' } -var jsonObj = { blaz: 'json', json: true } -var iniObj = { 'x.y.z': 'xyz', blaz: 'ini' } - -var fs = require('fs') -var ini = require('ini') - -fs.writeFileSync('/tmp/config-chain-class.json', JSON.stringify(jsonObj)) -fs.writeFileSync('/tmp/config-chain-class.ini', ini.stringify(iniObj)) - -var http = require('http') -var reqs = 0 -http.createServer(function (q, s) { - if (++reqs === 2) this.close() - if (q.url === '/json') { - // make sure that the requests come back from the server - // out of order. they should still be ordered properly - // in the resulting config object set. - setTimeout(function () { - s.setHeader('content-type', 'application/json') - s.end(JSON.stringify({ - blaz: 'http', - http: true, - json: true - })) - }, 200) - } else { - s.setHeader('content-type', 'application/ini') - s.end(ini.stringify({ - blaz: 'http', - http: true, - ini: true, - json: false - })) - } -}).listen(1337) - -test('basic class test', function (t) { - var cc = new CC() - var expectlist = - [ { blaz: 'json', json: true }, - { 'x.y.z': 'xyz', blaz: 'ini' }, - { blaz: 'blzaa', env: 'myenv' }, - { blaz: 'http', http: true, json: true }, - { blaz: 'http', http: true, ini: true, json: false } ] - - cc.addFile('/tmp/config-chain-class.json') - .addFile('/tmp/config-chain-class.ini') - .addEnv('foo_', env) - .addUrl('http://localhost:1337/json') - .addUrl('http://localhost:1337/ini') - .on('load', function () { - t.same(cc.list, expectlist) - t.same(cc.snapshot, { blaz: 'json', - json: true, - 'x.y.z': 'xyz', - env: 'myenv', - http: true, - ini: true }) - - cc.del('blaz', '/tmp/config-chain-class.json') - t.same(cc.snapshot, { blaz: 'ini', - json: true, - 'x.y.z': 'xyz', - env: 'myenv', - http: true, - ini: true }) - cc.del('blaz') - t.same(cc.snapshot, { json: true, - 'x.y.z': 'xyz', - env: 'myenv', - http: true, - ini: true }) - cc.shift() - t.same(cc.snapshot, { 'x.y.z': 'xyz', - env: 'myenv', - http: true, - json: true, - ini: true }) - cc.shift() - t.same(cc.snapshot, { env: 'myenv', - http: true, - json: true, - ini: true }) - cc.shift() - t.same(cc.snapshot, { http: true, - json: true, - ini: true }) - cc.shift() - t.same(cc.snapshot, { http: true, - ini: true, - json: false }) - cc.shift() - t.same(cc.snapshot, {}) - t.end() - }) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/env.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/env.js deleted file mode 100644 index fb718f32..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/env.js +++ /dev/null @@ -1,10 +0,0 @@ -var cc = require('..') -var assert = require('assert') - -assert.deepEqual({ - hello: true -}, cc.env('test_', { - 'test_hello': true, - 'ignore_this': 4, - 'ignore_test_this_too': [] -})) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/find-file.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/find-file.js deleted file mode 100644 index 23cde52e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/find-file.js +++ /dev/null @@ -1,13 +0,0 @@ - -var fs = require('fs') - , assert = require('assert') - , objx = { - rand: Math.random() - } - -fs.writeFileSync('/tmp/random-test-config.json', JSON.stringify(objx)) - -var cc = require('../') -var path = cc.find('tmp/random-test-config.json') - -assert.equal(path, '/tmp/random-test-config.json') \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/get.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/get.js deleted file mode 100644 index d6fd79f7..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/get.js +++ /dev/null @@ -1,15 +0,0 @@ -var cc = require("../"); - -var chain = cc() - , name = "forFun"; - -chain - .add({ - __sample:"for fun only" - }, name) - .on("load", function() { - //It throw exception here - console.log(chain.get("__sample", name)); - //But if I drop the name param, it run normally and return as expected: "for fun only" - //console.log(chain.get("__sample")); - }); diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js deleted file mode 100644 index d742b82b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/ignore-unfound-file.js +++ /dev/null @@ -1,5 +0,0 @@ - -var cc = require('..') - -//should not throw -cc(__dirname, 'non_existing_file') diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/ini.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/ini.js deleted file mode 100644 index 5572a6ed..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/ini.js +++ /dev/null @@ -1,18 +0,0 @@ - - -var cc =require('..') -var INI = require('ini') -var assert = require('assert') - -function test(obj) { - - var _json, _ini - var json = cc.parse (_json = JSON.stringify(obj)) - var ini = cc.parse (_ini = INI.stringify(obj)) -console.log(_ini, _json) - assert.deepEqual(json, ini) -} - - -test({hello: true}) - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/save.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/save.js deleted file mode 100644 index 78346131..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/config-chain/test/save.js +++ /dev/null @@ -1,59 +0,0 @@ -var CC = require('../index.js').ConfigChain -var test = require('tap').test - -var f1 = '/tmp/f1.ini' -var f2 = '/tmp/f2.json' - -var ini = require('ini') - -var f1data = {foo: {bar: 'baz'}, bloo: 'jaus'} -var f2data = {oof: {rab: 'zab'}, oolb: 'suaj'} - -var fs = require('fs') - -fs.writeFileSync(f1, ini.stringify(f1data), 'utf8') -fs.writeFileSync(f2, JSON.stringify(f2data), 'utf8') - -test('test saving and loading ini files', function (t) { - new CC() - .add({grelb:'blerg'}, 'opt') - .addFile(f1, 'ini', 'inifile') - .addFile(f2, 'json', 'jsonfile') - .on('load', function (cc) { - - t.same(cc.snapshot, { grelb: 'blerg', - bloo: 'jaus', - foo: { bar: 'baz' }, - oof: { rab: 'zab' }, - oolb: 'suaj' }) - - t.same(cc.list, [ { grelb: 'blerg' }, - { bloo: 'jaus', foo: { bar: 'baz' } }, - { oof: { rab: 'zab' }, oolb: 'suaj' } ]) - - cc.set('grelb', 'brelg', 'opt') - .set('foo', 'zoo', 'inifile') - .set('oof', 'ooz', 'jsonfile') - .save('inifile') - .save('jsonfile') - .on('save', function () { - t.equal(fs.readFileSync(f1, 'utf8'), - "bloo = jaus\nfoo = zoo\n") - t.equal(fs.readFileSync(f2, 'utf8'), - "{\"oof\":\"ooz\",\"oolb\":\"suaj\"}") - - t.same(cc.snapshot, { grelb: 'brelg', - bloo: 'jaus', - foo: 'zoo', - oof: 'ooz', - oolb: 'suaj' }) - - t.same(cc.list, [ { grelb: 'brelg' }, - { bloo: 'jaus', foo: 'zoo' }, - { oof: 'ooz', oolb: 'suaj' } ]) - - t.pass('ok') - t.end() - }) - }) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/README.md deleted file mode 100644 index b2beaed9..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/README.md +++ /dev/null @@ -1,51 +0,0 @@ -A dead simple way to do inheritance in JS. - - var inherits = require("inherits") - - function Animal () { - this.alive = true - } - Animal.prototype.say = function (what) { - console.log(what) - } - - inherits(Dog, Animal) - function Dog () { - Dog.super.apply(this) - } - Dog.prototype.sniff = function () { - this.say("sniff sniff") - } - Dog.prototype.bark = function () { - this.say("woof woof") - } - - inherits(Chihuahua, Dog) - function Chihuahua () { - Chihuahua.super.apply(this) - } - Chihuahua.prototype.bark = function () { - this.say("yip yip") - } - - // also works - function Cat () { - Cat.super.apply(this) - } - Cat.prototype.hiss = function () { - this.say("CHSKKSS!!") - } - inherits(Cat, Animal, { - meow: function () { this.say("miao miao") } - }) - Cat.prototype.purr = function () { - this.say("purr purr") - } - - - var c = new Chihuahua - assert(c instanceof Chihuahua) - assert(c instanceof Dog) - assert(c instanceof Animal) - -The actual function is laughably small. 10-lines small. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/inherits.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/inherits.js deleted file mode 100644 index 061b3962..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/inherits.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = inherits - -function inherits (c, p, proto) { - proto = proto || {} - var e = {} - ;[c.prototype, proto].forEach(function (s) { - Object.getOwnPropertyNames(s).forEach(function (k) { - e[k] = Object.getOwnPropertyDescriptor(s, k) - }) - }) - c.prototype = Object.create(p.prototype, e) - c.super = p -} - -//function Child () { -// Child.super.call(this) -// console.error([this -// ,this.constructor -// ,this.constructor === Child -// ,this.constructor.super === Parent -// ,Object.getPrototypeOf(this) === Child.prototype -// ,Object.getPrototypeOf(Object.getPrototypeOf(this)) -// === Parent.prototype -// ,this instanceof Child -// ,this instanceof Parent]) -//} -//function Parent () {} -//inherits(Child, Parent) -//new Child diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/package.json deleted file mode 100644 index 0bed9928..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/inherits/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "inherits", - "description": "A tiny simple way to do classic inheritance in js", - "version": "1.0.0", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented" - ], - "main": "./inherits.js", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/inherits" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "readme": "A dead simple way to do inheritance in JS.\n\n var inherits = require(\"inherits\")\n\n function Animal () {\n this.alive = true\n }\n Animal.prototype.say = function (what) {\n console.log(what)\n }\n\n inherits(Dog, Animal)\n function Dog () {\n Dog.super.apply(this)\n }\n Dog.prototype.sniff = function () {\n this.say(\"sniff sniff\")\n }\n Dog.prototype.bark = function () {\n this.say(\"woof woof\")\n }\n\n inherits(Chihuahua, Dog)\n function Chihuahua () {\n Chihuahua.super.apply(this)\n }\n Chihuahua.prototype.bark = function () {\n this.say(\"yip yip\")\n }\n\n // also works\n function Cat () {\n Cat.super.apply(this)\n }\n Cat.prototype.hiss = function () {\n this.say(\"CHSKKSS!!\")\n }\n inherits(Cat, Animal, {\n meow: function () { this.say(\"miao miao\") }\n })\n Cat.prototype.purr = function () {\n this.say(\"purr purr\")\n }\n\n\n var c = new Chihuahua\n assert(c instanceof Chihuahua)\n assert(c instanceof Dog)\n assert(c instanceof Animal)\n\nThe actual function is laughably small. 10-lines small.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits", - "_id": "inherits@1.0.0", - "_from": "inherits@~1.0.0", - "scripts": {} -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/README.md deleted file mode 100644 index acbe8ec8..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/README.md +++ /dev/null @@ -1,79 +0,0 @@ -An ini format parser and serializer for node. - -Sections are treated as nested objects. Items before the first heading -are saved on the object directly. - -## Usage - -Consider an ini-file `config.ini` that looks like this: - - ; this comment is being ignored - scope = global - - [database] - user = dbuser - password = dbpassword - database = use_this_database - - [paths.default] - datadir = /var/lib/data - array[] = first value - array[] = second value - array[] = third value - -You can read, manipulate and write the ini-file like so: - - var fs = require('fs') - , ini = require('ini') - - var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8')) - - config.scope = 'local' - config.database.database = 'use_another_database' - config.paths.default.tmpdir = '/tmp' - delete config.paths.default.datadir - config.paths.default.array.push('fourth value') - - fs.writeFileSync('./config_modified.ini', ini.stringify(config, 'section')) - -This will result in a file called `config_modified.ini` being written to the filesystem with the following content: - - [section] - scope = local - [section.database] - user = dbuser - password = dbpassword - database = use_another_database - [section.paths.default] - tmpdir = /tmp - array[] = first value - array[] = second value - array[] = third value - array[] = fourth value - - -## API - -### decode(inistring) -Decode the ini-style formatted `inistring` into a nested object. - -### parse(inistring) -Alias for `decode(inistring)` - -### encode(object, [section]) -Encode the object `object` into an ini-style formatted string. If the optional parameter `section` is given, then all top-level properties of the object are put into this section and the `section`-string is prepended to all sub-sections, see the usage example above. - -### stringify(object, [section]) -Alias for `encode(object, [section])` - -### safe(val) -Escapes the string `val` such that it is safe to be used as a key or value in an ini-file. Basically escapes quotes. For example - - ini.safe('"unsafe string"') - -would result in - - "\"unsafe string\"" - -### unsafe(val) -Unescapes the string `val` diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/ini.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/ini.js deleted file mode 100644 index eaf32093..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/ini.js +++ /dev/null @@ -1,166 +0,0 @@ - -exports.parse = exports.decode = decode -exports.stringify = exports.encode = encode - -exports.safe = safe -exports.unsafe = unsafe - -var eol = process.platform === "win32" ? "\r\n" : "\n" - -function encode (obj, section) { - var children = [] - , out = "" - - Object.keys(obj).forEach(function (k, _, __) { - var val = obj[k] - if (val && Array.isArray(val)) { - val.forEach(function(item) { - out += safe(k + "[]") + " = " + safe(item) + "\n" - }) - } - else if (val && typeof val === "object") { - children.push(k) - } else { - out += safe(k) + " = " + safe(val) + eol - } - }) - - if (section && out.length) { - out = "[" + safe(section) + "]" + eol + out - } - - children.forEach(function (k, _, __) { - var nk = dotSplit(k).join('\\.') - var child = encode(obj[k], (section ? section + "." : "") + nk) - if (out.length && child.length) { - out += eol - } - out += child - }) - - return out -} - -function dotSplit (str) { - return str.replace(/\1/g, '\2LITERAL\\1LITERAL\2') - .replace(/\\\./g, '\1') - .split(/\./).map(function (part) { - return part.replace(/\1/g, '\\.') - .replace(/\2LITERAL\\1LITERAL\2/g, '\1') - }) -} - -function decode (str) { - var out = {} - , p = out - , section = null - , state = "START" - // section |key = value - , re = /^\[([^\]]*)\]$|^([^=]+)(=(.*))?$/i - , lines = str.split(/[\r\n]+/g) - , section = null - - lines.forEach(function (line, _, __) { - if (!line || line.match(/^\s*;/)) return - var match = line.match(re) - if (!match) return - if (match[1] !== undefined) { - section = unsafe(match[1]) - p = out[section] = out[section] || {} - return - } - var key = unsafe(match[2]) - , value = match[3] ? unsafe((match[4] || "")) : true - switch (value) { - case 'true': - case 'false': - case 'null': value = JSON.parse(value) - } - - // Convert keys with '[]' suffix to an array - if (key.length > 2 && key.slice(-2) === "[]") { - key = key.substring(0, key.length - 2) - if (!p[key]) { - p[key] = [] - } - else if (!Array.isArray(p[key])) { - p[key] = [p[key]] - } - } - - // safeguard against resetting a previously defined - // array by accidentally forgetting the brackets - if (Array.isArray(p[key])) { - p[key].push(value) - } - else { - p[key] = value - } - }) - - // {a:{y:1},"a.b":{x:2}} --> {a:{y:1,b:{x:2}}} - // use a filter to return the keys that have to be deleted. - Object.keys(out).filter(function (k, _, __) { - if (!out[k] || typeof out[k] !== "object" || Array.isArray(out[k])) return false - // see if the parent section is also an object. - // if so, add it to that, and mark this one for deletion - var parts = dotSplit(k) - , p = out - , l = parts.pop() - , nl = l.replace(/\\\./g, '.') - parts.forEach(function (part, _, __) { - if (!p[part] || typeof p[part] !== "object") p[part] = {} - p = p[part] - }) - if (p === out && nl === l) return false - p[nl] = out[k] - return true - }).forEach(function (del, _, __) { - delete out[del] - }) - - return out -} - -function safe (val) { - return ( typeof val !== "string" - || val.match(/[\r\n]/) - || val.match(/^\[/) - || (val.length > 1 - && val.charAt(0) === "\"" - && val.slice(-1) === "\"") - || val !== val.trim() ) - ? JSON.stringify(val) - : val.replace(/;/g, '\\;') -} - -function unsafe (val, doUnesc) { - val = (val || "").trim() - if (val.charAt(0) === "\"" && val.slice(-1) === "\"") { - try { val = JSON.parse(val) } catch (_) {} - } else { - // walk the val to find the first not-escaped ; character - var esc = false - var unesc = ""; - for (var i = 0, l = val.length; i < l; i++) { - var c = val.charAt(i) - if (esc) { - if (c === "\\" || c === ";") - unesc += c - else - unesc += "\\" + c - esc = false - } else if (c === ";") { - break - } else if (c === "\\") { - esc = true - } else { - unesc += c - } - } - if (esc) - unesc += "\\" - return unesc - } - return val -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/package.json deleted file mode 100644 index d30ca087..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "ini", - "description": "An ini encoder/decoder for node", - "version": "1.1.0", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/ini.git" - }, - "main": "ini.js", - "scripts": { - "test": "tap test/*.js" - }, - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.0.9" - }, - "readme": "An ini format parser and serializer for node.\n\nSections are treated as nested objects. Items before the first heading\nare saved on the object directly.\n\n## Usage\n\nConsider an ini-file `config.ini` that looks like this:\n\n ; this comment is being ignored\n scope = global\n\n [database]\n user = dbuser\n password = dbpassword\n database = use_this_database\n\n [paths.default]\n datadir = /var/lib/data\n array[] = first value\n array[] = second value\n array[] = third value\n\nYou can read, manipulate and write the ini-file like so:\n\n var fs = require('fs')\n , ini = require('ini')\n\n var config = ini.parse(fs.readFileSync('./config.ini', 'utf-8'))\n\n config.scope = 'local'\n config.database.database = 'use_another_database'\n config.paths.default.tmpdir = '/tmp'\n delete config.paths.default.datadir\n config.paths.default.array.push('fourth value')\n\n fs.writeFileSync('./config_modified.ini', ini.stringify(config, 'section'))\n\nThis will result in a file called `config_modified.ini` being written to the filesystem with the following content:\n\n [section]\n scope = local\n [section.database]\n user = dbuser\n password = dbpassword\n database = use_another_database\n [section.paths.default]\n tmpdir = /tmp\n array[] = first value\n array[] = second value\n array[] = third value\n array[] = fourth value\n\n\n## API\n\n### decode(inistring)\nDecode the ini-style formatted `inistring` into a nested object.\n\n### parse(inistring)\nAlias for `decode(inistring)`\n\n### encode(object, [section])\nEncode the object `object` into an ini-style formatted string. If the optional parameter `section` is given, then all top-level properties of the object are put into this section and the `section`-string is prepended to all sub-sections, see the usage example above.\n\n### stringify(object, [section])\nAlias for `encode(object, [section])`\n\n### safe(val)\nEscapes the string `val` such that it is safe to be used as a key or value in an ini-file. Basically escapes quotes. For example\n\n ini.safe('\"unsafe string\"')\n\nwould result in\n\n \"\\\"unsafe string\\\"\"\n\n### unsafe(val)\nUnescapes the string `val`\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/ini/issues" - }, - "homepage": "https://github.com/isaacs/ini", - "_id": "ini@1.1.0", - "_from": "ini@~1.1.0" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/bar.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/bar.js deleted file mode 100644 index cb16176e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/bar.js +++ /dev/null @@ -1,23 +0,0 @@ -//test that parse(stringify(obj) deepEqu - -var ini = require('../') -var test = require('tap').test - -var data = { - 'number': {count: 10}, - 'string': {drink: 'white russian'}, - 'boolean': {isTrue: true}, - 'nested boolean': {theDude: {abides: true, rugCount: 1}} -} - - -test('parse(stringify(x)) deepEqual x', function (t) { - - for (var k in data) { - var s = ini.stringify(data[k]) - console.log(s, data[k]) - t.deepEqual(ini.parse(s), data[k]) - } - - t.end() -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/fixtures/foo.ini b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/fixtures/foo.ini deleted file mode 100644 index 1d81378f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/fixtures/foo.ini +++ /dev/null @@ -1,47 +0,0 @@ -o = p - - a with spaces = b c - -; wrap in quotes to JSON-decode and preserve spaces -" xa n p " = "\"\r\nyoyoyo\r\r\n" - -; wrap in quotes to get a key with a bracket, not a section. -"[disturbing]" = hey you never know - -; Test arrays -zr[] = deedee -ar[] = one -ar[] = three -; This should be included in the array -ar = this is included - -; Test resetting of a value (and not turn it into an array) -br = cold -br = warm - -; a section -[a] -av = a val -e = { o: p, a: { av: a val, b: { c: { e: "this [value]" } } } } -j = "{ o: "p", a: { av: "a val", b: { c: { e: "this [value]" } } } }" -"[]" = a square? - -; Nested array -cr[] = four -cr[] = eight - -; nested child without middle parent -; should create otherwise-empty a.b -[a.b.c] -e = 1 -j = 2 - -; dots in the section name should be literally interpreted -[x\.y\.z] -x.y.z = xyz - -[x\.y\.z.a\.b\.c] -a.b.c = abc - -; this next one is not a comment! it's escaped! -nocomment = this\; this is not a comment diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/foo.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/foo.js deleted file mode 100644 index 3a05eaf3..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/ini/test/foo.js +++ /dev/null @@ -1,71 +0,0 @@ -var i = require("../") - , tap = require("tap") - , test = tap.test - , fs = require("fs") - , path = require("path") - , fixture = path.resolve(__dirname, "./fixtures/foo.ini") - , data = fs.readFileSync(fixture, "utf8") - , d - , expectE = 'o = p\n' - + 'a with spaces = b c\n' - + '" xa n p " = "\\"\\r\\nyoyoyo\\r\\r\\n"\n' - + '"[disturbing]" = hey you never know\n' - + 'zr[] = deedee\n' - + 'ar[] = one\n' - + 'ar[] = three\n' - + 'ar[] = this is included\n' - + 'br = warm\n' - + '\n' - + '[a]\n' - + 'av = a val\n' - + 'e = { o: p, a: ' - + '{ av: a val, b: { c: { e: "this [value]" ' - + '} } } }\nj = "\\"{ o: \\"p\\", a: { av:' - + ' \\"a val\\", b: { c: { e: \\"this [value]' - + '\\" } } } }\\""\n"[]" = a square?\n' - + 'cr[] = four\ncr[] = eight\n\n' - +'[a.b.c]\ne = 1\n' - + 'j = 2\n\n[x\\.y\\.z]\nx.y.z = xyz\n\n' - + '[x\\.y\\.z.a\\.b\\.c]\na.b.c = abc\n' - + 'nocomment = this\\; this is not a comment\n' - , expectD = - { o: 'p', - 'a with spaces': 'b c', - " xa n p ":'"\r\nyoyoyo\r\r\n', - '[disturbing]': 'hey you never know', - 'zr': ['deedee'], - 'ar': ['one', 'three', 'this is included'], - 'br': 'warm', - a: - { av: 'a val', - e: '{ o: p, a: { av: a val, b: { c: { e: "this [value]" } } } }', - j: '"{ o: "p", a: { av: "a val", b: { c: { e: "this [value]" } } } }"', - "[]": "a square?", - cr: ['four', 'eight'], - b: { c: { e: '1', j: '2' } } }, - 'x.y.z': { - 'x.y.z': 'xyz', - 'a.b.c': { - 'a.b.c': 'abc', - 'nocomment': 'this\; this is not a comment' - } - } - } - -test("decode from file", function (t) { - var d = i.decode(data) - t.deepEqual(d, expectD) - t.end() -}) - -test("encode from data", function (t) { - var e = i.encode(expectD) - t.deepEqual(e, expectE) - - var obj = {log: { type:'file', level: {label:'debug', value:10} } } - e = i.encode(obj) - t.notEqual(e.slice(0, 1), '\n', 'Never a blank first line') - t.notEqual(e.slice(-2), '\n\n', 'Never a blank final line') - - t.end() -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/README.md deleted file mode 100644 index f290da8f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/README.md +++ /dev/null @@ -1,210 +0,0 @@ -If you want to write an option parser, and have it be good, there are -two ways to do it. The Right Way, and the Wrong Way. - -The Wrong Way is to sit down and write an option parser. We've all done -that. - -The Right Way is to write some complex configurable program with so many -options that you go half-insane just trying to manage them all, and put -it off with duct-tape solutions until you see exactly to the core of the -problem, and finally snap and write an awesome option parser. - -If you want to write an option parser, don't write an option parser. -Write a package manager, or a source control system, or a service -restarter, or an operating system. You probably won't end up with a -good one of those, but if you don't give up, and you are relentless and -diligent enough in your procrastination, you may just end up with a very -nice option parser. - -## USAGE - - // my-program.js - var nopt = require("nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - , "many" : [String, Array] - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag"] - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - console.log(parsed) - -This would give you support for any of the following: - -```bash -$ node my-program.js --foo "blerp" --no-flag -{ "foo" : "blerp", "flag" : false } - -$ node my-program.js ---bar 7 --foo "Mr. Hand" --flag -{ bar: 7, foo: "Mr. Hand", flag: true } - -$ node my-program.js --foo "blerp" -f -----p -{ foo: "blerp", flag: true, pick: true } - -$ node my-program.js -fp --foofoo -{ foo: "Mr. Foo", flag: true, pick: true } - -$ node my-program.js --foofoo -- -fp # -- stops the flag parsing. -{ foo: "Mr. Foo", argv: { remain: ["-fp"] } } - -$ node my-program.js --blatzk 1000 -fp # unknown opts are ok. -{ blatzk: 1000, flag: true, pick: true } - -$ node my-program.js --blatzk true -fp # but they need a value -{ blatzk: true, flag: true, pick: true } - -$ node my-program.js --no-blatzk -fp # unless they start with "no-" -{ blatzk: false, flag: true, pick: true } - -$ node my-program.js --baz b/a/z # known paths are resolved. -{ baz: "/Users/isaacs/b/a/z" } - -# if Array is one of the types, then it can take many -# values, and will always be an array. The other types provided -# specify what types are allowed in the list. - -$ node my-program.js --many 1 --many null --many foo -{ many: ["1", "null", "foo"] } - -$ node my-program.js --many foo -{ many: ["foo"] } -``` - -Read the tests at the bottom of `lib/nopt.js` for more examples of -what this puppy can do. - -## Types - -The following types are supported, and defined on `nopt.typeDefs` - -* String: A normal string. No parsing is done. -* path: A file system path. Gets resolved against cwd if not absolute. -* url: A url. If it doesn't parse, it isn't accepted. -* Number: Must be numeric. -* Date: Must parse as a date. If it does, and `Date` is one of the options, - then it will return a Date object, not a string. -* Boolean: Must be either `true` or `false`. If an option is a boolean, - then it does not need a value, and its presence will imply `true` as - the value. To negate boolean flags, do `--no-whatever` or `--whatever - false` -* NaN: Means that the option is strictly not allowed. Any value will - fail. -* Stream: An object matching the "Stream" class in node. Valuable - for use when validating programmatically. (npm uses this to let you - supply any WriteStream on the `outfd` and `logfd` config options.) -* Array: If `Array` is specified as one of the types, then the value - will be parsed as a list of options. This means that multiple values - can be specified, and that the value will always be an array. - -If a type is an array of values not on this list, then those are -considered valid values. For instance, in the example above, the -`--bloo` option can only be one of `"big"`, `"medium"`, or `"small"`, -and any other value will be rejected. - -When parsing unknown fields, `"true"`, `"false"`, and `"null"` will be -interpreted as their JavaScript equivalents, and numeric values will be -interpreted as a number. - -You can also mix types and values, or multiple types, in a list. For -instance `{ blah: [Number, null] }` would allow a value to be set to -either a Number or null. When types are ordered, this implies a -preference, and the first type that can be used to properly interpret -the value will be used. - -To define a new type, add it to `nopt.typeDefs`. Each item in that -hash is an object with a `type` member and a `validate` method. The -`type` member is an object that matches what goes in the type list. The -`validate` method is a function that gets called with `validate(data, -key, val)`. Validate methods should assign `data[key]` to the valid -value of `val` if it can be handled properly, or return boolean -`false` if it cannot. - -You can also call `nopt.clean(data, types, typeDefs)` to clean up a -config object and remove its invalid properties. - -## Error Handling - -By default, nopt outputs a warning to standard error when invalid -options are found. You can change this behavior by assigning a method -to `nopt.invalidHandler`. This method will be called with -the offending `nopt.invalidHandler(key, val, types)`. - -If no `nopt.invalidHandler` is assigned, then it will console.error -its whining. If it is assigned to boolean `false` then the warning is -suppressed. - -## Abbreviations - -Yes, they are supported. If you define options like this: - -```javascript -{ "foolhardyelephants" : Boolean -, "pileofmonkeys" : Boolean } -``` - -Then this will work: - -```bash -node program.js --foolhar --pil -node program.js --no-f --pileofmon -# etc. -``` - -## Shorthands - -Shorthands are a hash of shorter option names to a snippet of args that -they expand to. - -If multiple one-character shorthands are all combined, and the -combination does not unambiguously match any other option or shorthand, -then they will be broken up into their constituent parts. For example: - -```json -{ "s" : ["--loglevel", "silent"] -, "g" : "--global" -, "f" : "--force" -, "p" : "--parseable" -, "l" : "--long" -} -``` - -```bash -npm ls -sgflp -# just like doing this: -npm ls --loglevel silent --global --force --long --parseable -``` - -## The Rest of the args - -The config object returned by nopt is given a special member called -`argv`, which is an object with the following fields: - -* `remain`: The remaining args after all the parsing has occurred. -* `original`: The args as they originally appeared. -* `cooked`: The args after flags and shorthands are expanded. - -## Slicing - -Node programs are called with more or less the exact argv as it appears -in C land, after the v8 and node-specific options have been plucked off. -As such, `argv[0]` is always `node` and `argv[1]` is always the -JavaScript program being run. - -That's usually not very useful to you. So they're sliced off by -default. If you want them, then you can pass in `0` as the last -argument, or any other number that you'd like to slice off the start of -the list. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/bin/nopt.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/bin/nopt.js deleted file mode 100755 index 30e9fdba..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/bin/nopt.js +++ /dev/null @@ -1,51 +0,0 @@ -#!/usr/bin/env node -var nopt = require("../lib/nopt") - , types = { num: Number - , bool: Boolean - , help: Boolean - , list: Array - , "num-list": [Number, Array] - , "str-list": [String, Array] - , "bool-list": [Boolean, Array] - , str: String - , clear: Boolean - , config: Boolean - , length: Number - } - , shorthands = { s: [ "--str", "astring" ] - , b: [ "--bool" ] - , nb: [ "--no-bool" ] - , tft: [ "--bool-list", "--no-bool-list", "--bool-list", "true" ] - , "?": ["--help"] - , h: ["--help"] - , H: ["--help"] - , n: [ "--num", "125" ] - , c: ["--config"] - , l: ["--length"] - } - , parsed = nopt( types - , shorthands - , process.argv - , 2 ) - -console.log("parsed", parsed) - -if (parsed.help) { - console.log("") - console.log("nopt cli tester") - console.log("") - console.log("types") - console.log(Object.keys(types).map(function M (t) { - var type = types[t] - if (Array.isArray(type)) { - return [t, type.map(function (type) { return type.name })] - } - return [t, type && type.name] - }).reduce(function (s, i) { - s[i[0]] = i[1] - return s - }, {})) - console.log("") - console.log("shorthands") - console.log(shorthands) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/examples/my-program.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/examples/my-program.js deleted file mode 100755 index 142447e1..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/examples/my-program.js +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -//process.env.DEBUG_NOPT = 1 - -// my-program.js -var nopt = require("../lib/nopt") - , Stream = require("stream").Stream - , path = require("path") - , knownOpts = { "foo" : [String, null] - , "bar" : [Stream, Number] - , "baz" : path - , "bloo" : [ "big", "medium", "small" ] - , "flag" : Boolean - , "pick" : Boolean - } - , shortHands = { "foofoo" : ["--foo", "Mr. Foo"] - , "b7" : ["--bar", "7"] - , "m" : ["--bloo", "medium"] - , "p" : ["--pick"] - , "f" : ["--flag", "true"] - , "g" : ["--flag"] - , "s" : "--flag" - } - // everything is optional. - // knownOpts and shorthands default to {} - // arg list defaults to process.argv - // slice defaults to 2 - , parsed = nopt(knownOpts, shortHands, process.argv, 2) - -console.log("parsed =\n"+ require("util").inspect(parsed)) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/lib/nopt.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/lib/nopt.js deleted file mode 100644 index 20f3b5b1..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/lib/nopt.js +++ /dev/null @@ -1,612 +0,0 @@ -// info about each config option. - -var debug = process.env.DEBUG_NOPT || process.env.NOPT_DEBUG - ? function () { console.error.apply(console, arguments) } - : function () {} - -var url = require("url") - , path = require("path") - , Stream = require("stream").Stream - , abbrev = require("abbrev") - -module.exports = exports = nopt -exports.clean = clean - -exports.typeDefs = - { String : { type: String, validate: validateString } - , Boolean : { type: Boolean, validate: validateBoolean } - , url : { type: url, validate: validateUrl } - , Number : { type: Number, validate: validateNumber } - , path : { type: path, validate: validatePath } - , Stream : { type: Stream, validate: validateStream } - , Date : { type: Date, validate: validateDate } - } - -function nopt (types, shorthands, args, slice) { - args = args || process.argv - types = types || {} - shorthands = shorthands || {} - if (typeof slice !== "number") slice = 2 - - debug(types, shorthands, args, slice) - - args = args.slice(slice) - var data = {} - , key - , remain = [] - , cooked = args - , original = args.slice(0) - - parse(args, data, remain, types, shorthands) - // now data is full - clean(data, types, exports.typeDefs) - data.argv = {remain:remain,cooked:cooked,original:original} - Object.defineProperty(data.argv, 'toString', { value: function () { - return this.original.map(JSON.stringify).join(" ") - }, enumerable: false }) - return data -} - -function clean (data, types, typeDefs) { - typeDefs = typeDefs || exports.typeDefs - var remove = {} - , typeDefault = [false, true, null, String, Number, Array] - - Object.keys(data).forEach(function (k) { - if (k === "argv") return - var val = data[k] - , isArray = Array.isArray(val) - , type = types[k] - if (!isArray) val = [val] - if (!type) type = typeDefault - if (type === Array) type = typeDefault.concat(Array) - if (!Array.isArray(type)) type = [type] - - debug("val=%j", val) - debug("types=", type) - val = val.map(function (val) { - // if it's an unknown value, then parse false/true/null/numbers/dates - if (typeof val === "string") { - debug("string %j", val) - val = val.trim() - if ((val === "null" && ~type.indexOf(null)) - || (val === "true" && - (~type.indexOf(true) || ~type.indexOf(Boolean))) - || (val === "false" && - (~type.indexOf(false) || ~type.indexOf(Boolean)))) { - val = JSON.parse(val) - debug("jsonable %j", val) - } else if (~type.indexOf(Number) && !isNaN(val)) { - debug("convert to number", val) - val = +val - } else if (~type.indexOf(Date) && !isNaN(Date.parse(val))) { - debug("convert to date", val) - val = new Date(val) - } - } - - if (!types.hasOwnProperty(k)) { - return val - } - - // allow `--no-blah` to set 'blah' to null if null is allowed - if (val === false && ~type.indexOf(null) && - !(~type.indexOf(false) || ~type.indexOf(Boolean))) { - val = null - } - - var d = {} - d[k] = val - debug("prevalidated val", d, val, types[k]) - if (!validate(d, k, val, types[k], typeDefs)) { - if (exports.invalidHandler) { - exports.invalidHandler(k, val, types[k], data) - } else if (exports.invalidHandler !== false) { - debug("invalid: "+k+"="+val, types[k]) - } - return remove - } - debug("validated val", d, val, types[k]) - return d[k] - }).filter(function (val) { return val !== remove }) - - if (!val.length) delete data[k] - else if (isArray) { - debug(isArray, data[k], val) - data[k] = val - } else data[k] = val[0] - - debug("k=%s val=%j", k, val, data[k]) - }) -} - -function validateString (data, k, val) { - data[k] = String(val) -} - -function validatePath (data, k, val) { - data[k] = path.resolve(String(val)) - return true -} - -function validateNumber (data, k, val) { - debug("validate Number %j %j %j", k, val, isNaN(val)) - if (isNaN(val)) return false - data[k] = +val -} - -function validateDate (data, k, val) { - debug("validate Date %j %j %j", k, val, Date.parse(val)) - var s = Date.parse(val) - if (isNaN(s)) return false - data[k] = new Date(val) -} - -function validateBoolean (data, k, val) { - if (val instanceof Boolean) val = val.valueOf() - else if (typeof val === "string") { - if (!isNaN(val)) val = !!(+val) - else if (val === "null" || val === "false") val = false - else val = true - } else val = !!val - data[k] = val -} - -function validateUrl (data, k, val) { - val = url.parse(String(val)) - if (!val.host) return false - data[k] = val.href -} - -function validateStream (data, k, val) { - if (!(val instanceof Stream)) return false - data[k] = val -} - -function validate (data, k, val, type, typeDefs) { - // arrays are lists of types. - if (Array.isArray(type)) { - for (var i = 0, l = type.length; i < l; i ++) { - if (type[i] === Array) continue - if (validate(data, k, val, type[i], typeDefs)) return true - } - delete data[k] - return false - } - - // an array of anything? - if (type === Array) return true - - // NaN is poisonous. Means that something is not allowed. - if (type !== type) { - debug("Poison NaN", k, val, type) - delete data[k] - return false - } - - // explicit list of values - if (val === type) { - debug("Explicitly allowed %j", val) - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - return true - } - - // now go through the list of typeDefs, validate against each one. - var ok = false - , types = Object.keys(typeDefs) - for (var i = 0, l = types.length; i < l; i ++) { - debug("test type %j %j %j", k, val, types[i]) - var t = typeDefs[types[i]] - if (t && type === t.type) { - var d = {} - ok = false !== t.validate(d, k, val) - val = d[k] - if (ok) { - // if (isArray) (data[k] = data[k] || []).push(val) - // else data[k] = val - data[k] = val - break - } - } - } - debug("OK? %j (%j %j %j)", ok, k, val, types[i]) - - if (!ok) delete data[k] - return ok -} - -function parse (args, data, remain, types, shorthands) { - debug("parse", args, data, remain) - - var key = null - , abbrevs = abbrev(Object.keys(types)) - , shortAbbr = abbrev(Object.keys(shorthands)) - - for (var i = 0; i < args.length; i ++) { - var arg = args[i] - debug("arg", arg) - - if (arg.match(/^-{2,}$/)) { - // done with keys. - // the rest are args. - remain.push.apply(remain, args.slice(i + 1)) - args[i] = "--" - break - } - var hadEq = false - if (arg.charAt(0) === "-" && arg.length > 1) { - if (arg.indexOf("=") !== -1) { - hadEq = true - var v = arg.split("=") - arg = v.shift() - v = v.join("=") - args.splice.apply(args, [i, 1].concat([arg, v])) - } - - // see if it's a shorthand - // if so, splice and back up to re-parse it. - var shRes = resolveShort(arg, shorthands, shortAbbr, abbrevs) - debug("arg=%j shRes=%j", arg, shRes) - if (shRes) { - debug(arg, shRes) - args.splice.apply(args, [i, 1].concat(shRes)) - if (arg !== shRes[0]) { - i -- - continue - } - } - arg = arg.replace(/^-+/, "") - var no = null - while (arg.toLowerCase().indexOf("no-") === 0) { - no = !no - arg = arg.substr(3) - } - - if (abbrevs[arg]) arg = abbrevs[arg] - - var isArray = types[arg] === Array || - Array.isArray(types[arg]) && types[arg].indexOf(Array) !== -1 - - // allow unknown things to be arrays if specified multiple times. - if (!types.hasOwnProperty(arg) && data.hasOwnProperty(arg)) { - if (!Array.isArray(data[arg])) - data[arg] = [data[arg]] - isArray = true - } - - var val - , la = args[i + 1] - - var isBool = typeof no === 'boolean' || - types[arg] === Boolean || - Array.isArray(types[arg]) && types[arg].indexOf(Boolean) !== -1 || - (typeof types[arg] === 'undefined' && !hadEq) || - (la === "false" && - (types[arg] === null || - Array.isArray(types[arg]) && ~types[arg].indexOf(null))) - - if (isBool) { - // just set and move along - val = !no - // however, also support --bool true or --bool false - if (la === "true" || la === "false") { - val = JSON.parse(la) - la = null - if (no) val = !val - i ++ - } - - // also support "foo":[Boolean, "bar"] and "--foo bar" - if (Array.isArray(types[arg]) && la) { - if (~types[arg].indexOf(la)) { - // an explicit type - val = la - i ++ - } else if ( la === "null" && ~types[arg].indexOf(null) ) { - // null allowed - val = null - i ++ - } else if ( !la.match(/^-{2,}[^-]/) && - !isNaN(la) && - ~types[arg].indexOf(Number) ) { - // number - val = +la - i ++ - } else if ( !la.match(/^-[^-]/) && ~types[arg].indexOf(String) ) { - // string - val = la - i ++ - } - } - - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - continue - } - - if (la && la.match(/^-{2,}$/)) { - la = undefined - i -- - } - - val = la === undefined ? true : la - if (isArray) (data[arg] = data[arg] || []).push(val) - else data[arg] = val - - i ++ - continue - } - remain.push(arg) - } -} - -function resolveShort (arg, shorthands, shortAbbr, abbrevs) { - // handle single-char shorthands glommed together, like - // npm ls -glp, but only if there is one dash, and only if - // all of the chars are single-char shorthands, and it's - // not a match to some other abbrev. - arg = arg.replace(/^-+/, '') - - // if it's an exact known option, then don't go any further - if (abbrevs[arg] === arg) - return null - - // if it's an exact known shortopt, same deal - if (shorthands[arg]) { - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] - } - - // first check to see if this arg is a set of single-char shorthands - var singles = shorthands.___singles - if (!singles) { - singles = Object.keys(shorthands).filter(function (s) { - return s.length === 1 - }).reduce(function (l,r) { - l[r] = true - return l - }, {}) - shorthands.___singles = singles - debug('shorthand singles', singles) - } - - var chrs = arg.split("").filter(function (c) { - return singles[c] - }) - - if (chrs.join("") === arg) return chrs.map(function (c) { - return shorthands[c] - }).reduce(function (l, r) { - return l.concat(r) - }, []) - - - // if it's an arg abbrev, and not a literal shorthand, then prefer the arg - if (abbrevs[arg] && !shorthands[arg]) - return null - - // if it's an abbr for a shorthand, then use that - if (shortAbbr[arg]) - arg = shortAbbr[arg] - - // make it an array, if it's a list of words - if (shorthands[arg] && !Array.isArray(shorthands[arg])) - shorthands[arg] = shorthands[arg].split(/\s+/) - - return shorthands[arg] -} - -if (module === require.main) { -var assert = require("assert") - , util = require("util") - - , shorthands = - { s : ["--loglevel", "silent"] - , d : ["--loglevel", "info"] - , dd : ["--loglevel", "verbose"] - , ddd : ["--loglevel", "silly"] - , noreg : ["--no-registry"] - , reg : ["--registry"] - , "no-reg" : ["--no-registry"] - , silent : ["--loglevel", "silent"] - , verbose : ["--loglevel", "verbose"] - , h : ["--usage"] - , H : ["--usage"] - , "?" : ["--usage"] - , help : ["--usage"] - , v : ["--version"] - , f : ["--force"] - , desc : ["--description"] - , "no-desc" : ["--no-description"] - , "local" : ["--no-global"] - , l : ["--long"] - , p : ["--parseable"] - , porcelain : ["--parseable"] - , g : ["--global"] - } - - , types = - { aoa: Array - , nullstream: [null, Stream] - , date: Date - , str: String - , browser : String - , cache : path - , color : ["always", Boolean] - , depth : Number - , description : Boolean - , dev : Boolean - , editor : path - , force : Boolean - , global : Boolean - , globalconfig : path - , group : [String, Number] - , gzipbin : String - , logfd : [Number, Stream] - , loglevel : ["silent","win","error","warn","info","verbose","silly"] - , long : Boolean - , "node-version" : [false, String] - , npaturl : url - , npat : Boolean - , "onload-script" : [false, String] - , outfd : [Number, Stream] - , parseable : Boolean - , pre: Boolean - , prefix: path - , proxy : url - , "rebuild-bundle" : Boolean - , registry : url - , searchopts : String - , searchexclude: [null, String] - , shell : path - , t: [Array, String] - , tag : String - , tar : String - , tmp : path - , "unsafe-perm" : Boolean - , usage : Boolean - , user : String - , username : String - , userconfig : path - , version : Boolean - , viewer: path - , _exit : Boolean - } - -; [["-v", {version:true}, []] - ,["---v", {version:true}, []] - ,["ls -s --no-reg connect -d", - {loglevel:"info",registry:null},["ls","connect"]] - ,["ls ---s foo",{loglevel:"silent"},["ls","foo"]] - ,["ls --registry blargle", {}, ["ls"]] - ,["--no-registry", {registry:null}, []] - ,["--no-color true", {color:false}, []] - ,["--no-color false", {color:true}, []] - ,["--no-color", {color:false}, []] - ,["--color false", {color:false}, []] - ,["--color --logfd 7", {logfd:7,color:true}, []] - ,["--color=true", {color:true}, []] - ,["--logfd=10", {logfd:10}, []] - ,["--tmp=/tmp -tar=gtar",{tmp:"/tmp",tar:"gtar"},[]] - ,["--tmp=tmp -tar=gtar", - {tmp:path.resolve(process.cwd(), "tmp"),tar:"gtar"},[]] - ,["--logfd x", {}, []] - ,["a -true -- -no-false", {true:true},["a","-no-false"]] - ,["a -no-false", {false:false},["a"]] - ,["a -no-no-true", {true:true}, ["a"]] - ,["a -no-no-no-false", {false:false}, ["a"]] - ,["---NO-no-No-no-no-no-nO-no-no"+ - "-No-no-no-no-no-no-no-no-no"+ - "-no-no-no-no-NO-NO-no-no-no-no-no-no"+ - "-no-body-can-do-the-boogaloo-like-I-do" - ,{"body-can-do-the-boogaloo-like-I-do":false}, []] - ,["we are -no-strangers-to-love "+ - "--you-know=the-rules --and=so-do-i "+ - "---im-thinking-of=a-full-commitment "+ - "--no-you-would-get-this-from-any-other-guy "+ - "--no-gonna-give-you-up "+ - "-no-gonna-let-you-down=true "+ - "--no-no-gonna-run-around false "+ - "--desert-you=false "+ - "--make-you-cry false "+ - "--no-tell-a-lie "+ - "--no-no-and-hurt-you false" - ,{"strangers-to-love":false - ,"you-know":"the-rules" - ,"and":"so-do-i" - ,"you-would-get-this-from-any-other-guy":false - ,"gonna-give-you-up":false - ,"gonna-let-you-down":false - ,"gonna-run-around":false - ,"desert-you":false - ,"make-you-cry":false - ,"tell-a-lie":false - ,"and-hurt-you":false - },["we", "are"]] - ,["-t one -t two -t three" - ,{t: ["one", "two", "three"]} - ,[]] - ,["-t one -t null -t three four five null" - ,{t: ["one", "null", "three"]} - ,["four", "five", "null"]] - ,["-t foo" - ,{t:["foo"]} - ,[]] - ,["--no-t" - ,{t:["false"]} - ,[]] - ,["-no-no-t" - ,{t:["true"]} - ,[]] - ,["-aoa one -aoa null -aoa 100" - ,{aoa:["one", null, 100]} - ,[]] - ,["-str 100" - ,{str:"100"} - ,[]] - ,["--color always" - ,{color:"always"} - ,[]] - ,["--no-nullstream" - ,{nullstream:null} - ,[]] - ,["--nullstream false" - ,{nullstream:null} - ,[]] - ,["--notadate=2011-01-25" - ,{notadate: "2011-01-25"} - ,[]] - ,["--date 2011-01-25" - ,{date: new Date("2011-01-25")} - ,[]] - ,["-cl 1" - ,{config: true, length: 1} - ,[] - ,{config: Boolean, length: Number, clear: Boolean} - ,{c: "--config", l: "--length"}] - ,["--acount bla" - ,{"acount":true} - ,["bla"] - ,{account: Boolean, credentials: Boolean, options: String} - ,{a:"--account", c:"--credentials",o:"--options"}] - ,["--clear" - ,{clear:true} - ,[] - ,{clear:Boolean,con:Boolean,len:Boolean,exp:Boolean,add:Boolean,rep:Boolean} - ,{c:"--con",l:"--len",e:"--exp",a:"--add",r:"--rep"}] - ,["--file -" - ,{"file":"-"} - ,[] - ,{file:String} - ,{}] - ,["--file -" - ,{"file":true} - ,["-"] - ,{file:Boolean} - ,{}] - ].forEach(function (test) { - var argv = test[0].split(/\s+/) - , opts = test[1] - , rem = test[2] - , actual = nopt(test[3] || types, test[4] || shorthands, argv, 0) - , parsed = actual.argv - delete actual.argv - console.log(util.inspect(actual, false, 2, true), parsed.remain) - for (var i in opts) { - var e = JSON.stringify(opts[i]) - , a = JSON.stringify(actual[i] === undefined ? null : actual[i]) - if (e && typeof e === "object") { - assert.deepEqual(e, a) - } else { - assert.equal(e, a) - } - } - assert.deepEqual(rem, parsed.remain) - }) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/README.md deleted file mode 100644 index 99746fe6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/README.md +++ /dev/null @@ -1,23 +0,0 @@ -# abbrev-js - -Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). - -Usage: - - var abbrev = require("abbrev"); - abbrev("foo", "fool", "folding", "flop"); - - // returns: - { fl: 'flop' - , flo: 'flop' - , flop: 'flop' - , fol: 'folding' - , fold: 'folding' - , foldi: 'folding' - , foldin: 'folding' - , folding: 'folding' - , foo: 'foo' - , fool: 'fool' - } - -This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/lib/abbrev.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/lib/abbrev.js deleted file mode 100644 index bee4132c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/lib/abbrev.js +++ /dev/null @@ -1,111 +0,0 @@ - -module.exports = exports = abbrev.abbrev = abbrev - -abbrev.monkeyPatch = monkeyPatch - -function monkeyPatch () { - Object.defineProperty(Array.prototype, 'abbrev', { - value: function () { return abbrev(this) }, - enumerable: false, configurable: true, writable: true - }) - - Object.defineProperty(Object.prototype, 'abbrev', { - value: function () { return abbrev(Object.keys(this)) }, - enumerable: false, configurable: true, writable: true - }) -} - -function abbrev (list) { - if (arguments.length !== 1 || !Array.isArray(list)) { - list = Array.prototype.slice.call(arguments, 0) - } - for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { - args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) - } - - // sort them lexicographically, so that they're next to their nearest kin - args = args.sort(lexSort) - - // walk through each, seeing how much it has in common with the next and previous - var abbrevs = {} - , prev = "" - for (var i = 0, l = args.length ; i < l ; i ++) { - var current = args[i] - , next = args[i + 1] || "" - , nextMatches = true - , prevMatches = true - if (current === next) continue - for (var j = 0, cl = current.length ; j < cl ; j ++) { - var curChar = current.charAt(j) - nextMatches = nextMatches && curChar === next.charAt(j) - prevMatches = prevMatches && curChar === prev.charAt(j) - if (!nextMatches && !prevMatches) { - j ++ - break - } - } - prev = current - if (j === cl) { - abbrevs[current] = current - continue - } - for (var a = current.substr(0, j) ; j <= cl ; j ++) { - abbrevs[a] = current - a += current.charAt(j) - } - } - return abbrevs -} - -function lexSort (a, b) { - return a === b ? 0 : a > b ? 1 : -1 -} - - -// tests -if (module === require.main) { - -var assert = require("assert") -var util = require("util") - -console.log("running tests") -function test (list, expect) { - var actual = abbrev(list) - assert.deepEqual(actual, expect, - "abbrev("+util.inspect(list)+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) - actual = abbrev.apply(exports, list) - assert.deepEqual(abbrev.apply(exports, list), expect, - "abbrev("+list.map(JSON.stringify).join(",")+") === " + util.inspect(expect) + "\n"+ - "actual: "+util.inspect(actual)) -} - -test([ "ruby", "ruby", "rules", "rules", "rules" ], -{ rub: 'ruby' -, ruby: 'ruby' -, rul: 'rules' -, rule: 'rules' -, rules: 'rules' -}) -test(["fool", "foom", "pool", "pope"], -{ fool: 'fool' -, foom: 'foom' -, poo: 'pool' -, pool: 'pool' -, pop: 'pope' -, pope: 'pope' -}) -test(["a", "ab", "abc", "abcd", "abcde", "acde"], -{ a: 'a' -, ab: 'ab' -, abc: 'abc' -, abcd: 'abcd' -, abcde: 'abcde' -, ac: 'acde' -, acd: 'acde' -, acde: 'acde' -}) - -console.log("pass") - -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/package.json deleted file mode 100644 index 2190dd4b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/node_modules/abbrev/package.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "abbrev", - "version": "1.0.4", - "description": "Like ruby's abbrev module, but in js", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "main": "./lib/abbrev.js", - "scripts": { - "test": "node lib/abbrev.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/isaacs/abbrev-js" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/abbrev-js/raw/master/LICENSE" - }, - "readme": "# abbrev-js\n\nJust like [ruby's Abbrev](http://apidock.com/ruby/Abbrev).\n\nUsage:\n\n var abbrev = require(\"abbrev\");\n abbrev(\"foo\", \"fool\", \"folding\", \"flop\");\n \n // returns:\n { fl: 'flop'\n , flo: 'flop'\n , flop: 'flop'\n , fol: 'folding'\n , fold: 'folding'\n , foldi: 'folding'\n , foldin: 'folding'\n , folding: 'folding'\n , foo: 'foo'\n , fool: 'fool'\n }\n\nThis is handy for command-line scripts, or other cases where you want to be able to accept shorthands.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/abbrev-js/issues" - }, - "homepage": "https://github.com/isaacs/abbrev-js", - "_id": "abbrev@1.0.4", - "_from": "abbrev@1" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/package.json deleted file mode 100644 index 97dc13f4..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/nopt/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "nopt", - "version": "2.1.2", - "description": "Option parsing for Node, supporting types, shorthands, etc. Used by npm.", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "main": "lib/nopt.js", - "scripts": { - "test": "node lib/nopt.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/isaacs/nopt" - }, - "bin": { - "nopt": "./bin/nopt.js" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/nopt/raw/master/LICENSE" - }, - "dependencies": { - "abbrev": "1" - }, - "readme": "If you want to write an option parser, and have it be good, there are\ntwo ways to do it. The Right Way, and the Wrong Way.\n\nThe Wrong Way is to sit down and write an option parser. We've all done\nthat.\n\nThe Right Way is to write some complex configurable program with so many\noptions that you go half-insane just trying to manage them all, and put\nit off with duct-tape solutions until you see exactly to the core of the\nproblem, and finally snap and write an awesome option parser.\n\nIf you want to write an option parser, don't write an option parser.\nWrite a package manager, or a source control system, or a service\nrestarter, or an operating system. You probably won't end up with a\ngood one of those, but if you don't give up, and you are relentless and\ndiligent enough in your procrastination, you may just end up with a very\nnice option parser.\n\n## USAGE\n\n // my-program.js\n var nopt = require(\"nopt\")\n , Stream = require(\"stream\").Stream\n , path = require(\"path\")\n , knownOpts = { \"foo\" : [String, null]\n , \"bar\" : [Stream, Number]\n , \"baz\" : path\n , \"bloo\" : [ \"big\", \"medium\", \"small\" ]\n , \"flag\" : Boolean\n , \"pick\" : Boolean\n , \"many\" : [String, Array]\n }\n , shortHands = { \"foofoo\" : [\"--foo\", \"Mr. Foo\"]\n , \"b7\" : [\"--bar\", \"7\"]\n , \"m\" : [\"--bloo\", \"medium\"]\n , \"p\" : [\"--pick\"]\n , \"f\" : [\"--flag\"]\n }\n // everything is optional.\n // knownOpts and shorthands default to {}\n // arg list defaults to process.argv\n // slice defaults to 2\n , parsed = nopt(knownOpts, shortHands, process.argv, 2)\n console.log(parsed)\n\nThis would give you support for any of the following:\n\n```bash\n$ node my-program.js --foo \"blerp\" --no-flag\n{ \"foo\" : \"blerp\", \"flag\" : false }\n\n$ node my-program.js ---bar 7 --foo \"Mr. Hand\" --flag\n{ bar: 7, foo: \"Mr. Hand\", flag: true }\n\n$ node my-program.js --foo \"blerp\" -f -----p\n{ foo: \"blerp\", flag: true, pick: true }\n\n$ node my-program.js -fp --foofoo\n{ foo: \"Mr. Foo\", flag: true, pick: true }\n\n$ node my-program.js --foofoo -- -fp # -- stops the flag parsing.\n{ foo: \"Mr. Foo\", argv: { remain: [\"-fp\"] } }\n\n$ node my-program.js --blatzk 1000 -fp # unknown opts are ok.\n{ blatzk: 1000, flag: true, pick: true }\n\n$ node my-program.js --blatzk true -fp # but they need a value\n{ blatzk: true, flag: true, pick: true }\n\n$ node my-program.js --no-blatzk -fp # unless they start with \"no-\"\n{ blatzk: false, flag: true, pick: true }\n\n$ node my-program.js --baz b/a/z # known paths are resolved.\n{ baz: \"/Users/isaacs/b/a/z\" }\n\n# if Array is one of the types, then it can take many\n# values, and will always be an array. The other types provided\n# specify what types are allowed in the list.\n\n$ node my-program.js --many 1 --many null --many foo\n{ many: [\"1\", \"null\", \"foo\"] }\n\n$ node my-program.js --many foo\n{ many: [\"foo\"] }\n```\n\nRead the tests at the bottom of `lib/nopt.js` for more examples of\nwhat this puppy can do.\n\n## Types\n\nThe following types are supported, and defined on `nopt.typeDefs`\n\n* String: A normal string. No parsing is done.\n* path: A file system path. Gets resolved against cwd if not absolute.\n* url: A url. If it doesn't parse, it isn't accepted.\n* Number: Must be numeric.\n* Date: Must parse as a date. If it does, and `Date` is one of the options,\n then it will return a Date object, not a string.\n* Boolean: Must be either `true` or `false`. If an option is a boolean,\n then it does not need a value, and its presence will imply `true` as\n the value. To negate boolean flags, do `--no-whatever` or `--whatever\n false`\n* NaN: Means that the option is strictly not allowed. Any value will\n fail.\n* Stream: An object matching the \"Stream\" class in node. Valuable\n for use when validating programmatically. (npm uses this to let you\n supply any WriteStream on the `outfd` and `logfd` config options.)\n* Array: If `Array` is specified as one of the types, then the value\n will be parsed as a list of options. This means that multiple values\n can be specified, and that the value will always be an array.\n\nIf a type is an array of values not on this list, then those are\nconsidered valid values. For instance, in the example above, the\n`--bloo` option can only be one of `\"big\"`, `\"medium\"`, or `\"small\"`,\nand any other value will be rejected.\n\nWhen parsing unknown fields, `\"true\"`, `\"false\"`, and `\"null\"` will be\ninterpreted as their JavaScript equivalents, and numeric values will be\ninterpreted as a number.\n\nYou can also mix types and values, or multiple types, in a list. For\ninstance `{ blah: [Number, null] }` would allow a value to be set to\neither a Number or null. When types are ordered, this implies a\npreference, and the first type that can be used to properly interpret\nthe value will be used.\n\nTo define a new type, add it to `nopt.typeDefs`. Each item in that\nhash is an object with a `type` member and a `validate` method. The\n`type` member is an object that matches what goes in the type list. The\n`validate` method is a function that gets called with `validate(data,\nkey, val)`. Validate methods should assign `data[key]` to the valid\nvalue of `val` if it can be handled properly, or return boolean\n`false` if it cannot.\n\nYou can also call `nopt.clean(data, types, typeDefs)` to clean up a\nconfig object and remove its invalid properties.\n\n## Error Handling\n\nBy default, nopt outputs a warning to standard error when invalid\noptions are found. You can change this behavior by assigning a method\nto `nopt.invalidHandler`. This method will be called with\nthe offending `nopt.invalidHandler(key, val, types)`.\n\nIf no `nopt.invalidHandler` is assigned, then it will console.error\nits whining. If it is assigned to boolean `false` then the warning is\nsuppressed.\n\n## Abbreviations\n\nYes, they are supported. If you define options like this:\n\n```javascript\n{ \"foolhardyelephants\" : Boolean\n, \"pileofmonkeys\" : Boolean }\n```\n\nThen this will work:\n\n```bash\nnode program.js --foolhar --pil\nnode program.js --no-f --pileofmon\n# etc.\n```\n\n## Shorthands\n\nShorthands are a hash of shorter option names to a snippet of args that\nthey expand to.\n\nIf multiple one-character shorthands are all combined, and the\ncombination does not unambiguously match any other option or shorthand,\nthen they will be broken up into their constituent parts. For example:\n\n```json\n{ \"s\" : [\"--loglevel\", \"silent\"]\n, \"g\" : \"--global\"\n, \"f\" : \"--force\"\n, \"p\" : \"--parseable\"\n, \"l\" : \"--long\"\n}\n```\n\n```bash\nnpm ls -sgflp\n# just like doing this:\nnpm ls --loglevel silent --global --force --long --parseable\n```\n\n## The Rest of the args\n\nThe config object returned by nopt is given a special member called\n`argv`, which is an object with the following fields:\n\n* `remain`: The remaining args after all the parsing has occurred.\n* `original`: The args as they originally appeared.\n* `cooked`: The args after flags and shorthands are expanded.\n\n## Slicing\n\nNode programs are called with more or less the exact argv as it appears\nin C land, after the v8 and node-specific options have been plucked off.\nAs such, `argv[0]` is always `node` and `argv[1]` is always the\nJavaScript program being run.\n\nThat's usually not very useful to you. So they're sliced off by\ndefault. If you want them, then you can pass in `0` as the last\nargument, or any other number that you'd like to slice off the start of\nthe list.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/nopt/issues" - }, - "homepage": "https://github.com/isaacs/nopt", - "_id": "nopt@2.1.2", - "_from": "nopt@2" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/README.md deleted file mode 100644 index e833b83d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# once - -Only call a function once. - -## usage - -```javascript -var once = require('once') - -function load (file, cb) { - cb = once(cb) - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Or add to the Function.prototype in a responsible way: - -```javascript -// only has to be done once -require('once').proto() - -function load (file, cb) { - cb = cb.once() - loader.load('file') - loader.once('load', cb) - loader.once('error', cb) -} -``` - -Ironically, the prototype feature makes this module twice as -complicated as necessary. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/once.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/once.js deleted file mode 100644 index effc50a4..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/once.js +++ /dev/null @@ -1,19 +0,0 @@ -module.exports = once - -once.proto = once(function () { - Object.defineProperty(Function.prototype, 'once', { - value: function () { - return once(this) - }, - configurable: true - }) -}) - -function once (fn) { - var called = false - return function () { - if (called) return - called = true - return fn.apply(this, arguments) - } -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/package.json deleted file mode 100644 index 71c7ba7b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "once", - "version": "1.1.1", - "description": "Run a function exactly one time", - "main": "once.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/once" - }, - "keywords": [ - "once", - "function", - "one", - "single" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# once\n\nOnly call a function once.\n\n## usage\n\n```javascript\nvar once = require('once')\n\nfunction load (file, cb) {\n cb = once(cb)\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nOr add to the Function.prototype in a responsible way:\n\n```javascript\n// only has to be done once\nrequire('once').proto()\n\nfunction load (file, cb) {\n cb = cb.once()\n loader.load('file')\n loader.once('load', cb)\n loader.once('error', cb)\n}\n```\n\nIronically, the prototype feature makes this module twice as\ncomplicated as necessary.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/once/issues" - }, - "homepage": "https://github.com/isaacs/once", - "_id": "once@1.1.1", - "_from": "once@~1.1.1" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/test/once.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/test/once.js deleted file mode 100644 index f0291a44..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/once/test/once.js +++ /dev/null @@ -1,18 +0,0 @@ -var test = require('tap').test -var once = require('../once.js') - -test('once', function (t) { - var f = 0 - var foo = once(function (g) { - t.equal(f, 0) - f ++ - return f + g + this - }) - for (var i = 0; i < 1E3; i++) { - t.same(f, i === 0 ? 0 : 1) - var g = foo.call(1, 1) - t.same(g, i === 0 ? 3 : undefined) - t.same(f, 1) - } - t.end() -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/LICENSE deleted file mode 100644 index 74489e2e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/LICENSE +++ /dev/null @@ -1,25 +0,0 @@ -Copyright (c) Isaac Z. Schlueter -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS -``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/README.md deleted file mode 100644 index 08fd9002..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/README.md +++ /dev/null @@ -1,63 +0,0 @@ -# osenv - -Look up environment settings specific to different operating systems. - -## Usage - -```javascript -var osenv = require('osenv') -var path = osenv.path() -var user = osenv.user() -// etc. - -// Some things are not reliably in the env, and have a fallback command: -var h = osenv.hostname(function (er, hostname) { - h = hostname -}) -// This will still cause it to be memoized, so calling osenv.hostname() -// is now an immediate operation. - -// You can always send a cb, which will get called in the nextTick -// if it's been memoized, or wait for the fallback data if it wasn't -// found in the environment. -osenv.hostname(function (er, hostname) { - if (er) console.error('error looking up hostname') - else console.log('this machine calls itself %s', hostname) -}) -``` - -## osenv.hostname() - -The machine name. Calls `hostname` if not found. - -## osenv.user() - -The currently logged-in user. Calls `whoami` if not found. - -## osenv.prompt() - -Either PS1 on unix, or PROMPT on Windows. - -## osenv.tmpdir() - -The place where temporary files should be created. - -## osenv.home() - -No place like it. - -## osenv.path() - -An array of the places that the operating system will search for -executables. - -## osenv.editor() - -Return the executable name of the editor program. This uses the EDITOR -and VISUAL environment variables, and falls back to `vi` on Unix, or -`notepad.exe` on Windows. - -## osenv.shell() - -The SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash' -or 'cmd'. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/osenv.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/osenv.js deleted file mode 100644 index e3367a77..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/osenv.js +++ /dev/null @@ -1,80 +0,0 @@ -var isWindows = process.platform === 'win32' -var windir = isWindows ? process.env.windir || 'C:\\Windows' : null -var path = require('path') -var exec = require('child_process').exec - -// looking up envs is a bit costly. -// Also, sometimes we want to have a fallback -// Pass in a callback to wait for the fallback on failures -// After the first lookup, always returns the same thing. -function memo (key, lookup, fallback) { - var fell = false - var falling = false - exports[key] = function (cb) { - var val = lookup() - if (!val && !fell && !falling && fallback) { - fell = true - falling = true - exec(fallback, function (er, output, stderr) { - falling = false - if (er) return // oh well, we tried - val = output.trim() - }) - } - exports[key] = function (cb) { - if (cb) process.nextTick(cb.bind(null, null, val)) - return val - } - if (cb && !falling) process.nextTick(cb.bind(null, null, val)) - return val - } -} - -memo('user', function () { - return ( isWindows - ? process.env.USERDOMAIN + '\\' + process.env.USERNAME - : process.env.USER - ) -}, 'whoami') - -memo('prompt', function () { - return isWindows ? process.env.PROMPT : process.env.PS1 -}) - -memo('hostname', function () { - return isWindows ? process.env.COMPUTERNAME : process.env.HOSTNAME -}, 'hostname') - -memo('tmpdir', function () { - var t = isWindows ? 'temp' : 'tmp' - return process.env.TMPDIR || - process.env.TMP || - process.env.TEMP || - ( exports.home() ? path.resolve(exports.home(), t) - : isWindows ? path.resolve(windir, t) - : '/tmp' - ) -}) - -memo('home', function () { - return ( isWindows ? process.env.USERPROFILE - : process.env.HOME - ) -}) - -memo('path', function () { - return (process.env.PATH || - process.env.Path || - process.env.path).split(isWindows ? ';' : ':') -}) - -memo('editor', function () { - return process.env.EDITOR || - process.env.VISUAL || - (isWindows ? 'notepad.exe' : 'vi') -}) - -memo('shell', function () { - return isWindows ? process.env.ComSpec || 'cmd' - : process.env.SHELL || 'bash' -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/package.json deleted file mode 100644 index 01c503d3..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "osenv", - "version": "0.0.3", - "main": "osenv.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.5" - }, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/osenv" - }, - "keywords": [ - "environment", - "variable", - "home", - "tmpdir", - "path", - "prompt", - "ps1" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "description": "Look up environment settings specific to different operating systems", - "readme": "# osenv\n\nLook up environment settings specific to different operating systems.\n\n## Usage\n\n```javascript\nvar osenv = require('osenv')\nvar path = osenv.path()\nvar user = osenv.user()\n// etc.\n\n// Some things are not reliably in the env, and have a fallback command:\nvar h = osenv.hostname(function (er, hostname) {\n h = hostname\n})\n// This will still cause it to be memoized, so calling osenv.hostname()\n// is now an immediate operation.\n\n// You can always send a cb, which will get called in the nextTick\n// if it's been memoized, or wait for the fallback data if it wasn't\n// found in the environment.\nosenv.hostname(function (er, hostname) {\n if (er) console.error('error looking up hostname')\n else console.log('this machine calls itself %s', hostname)\n})\n```\n\n## osenv.hostname()\n\nThe machine name. Calls `hostname` if not found.\n\n## osenv.user()\n\nThe currently logged-in user. Calls `whoami` if not found.\n\n## osenv.prompt()\n\nEither PS1 on unix, or PROMPT on Windows.\n\n## osenv.tmpdir()\n\nThe place where temporary files should be created.\n\n## osenv.home()\n\nNo place like it.\n\n## osenv.path()\n\nAn array of the places that the operating system will search for\nexecutables.\n\n## osenv.editor() \n\nReturn the executable name of the editor program. This uses the EDITOR\nand VISUAL environment variables, and falls back to `vi` on Unix, or\n`notepad.exe` on Windows.\n\n## osenv.shell()\n\nThe SHELL on Unix, which Windows calls the ComSpec. Defaults to 'bash'\nor 'cmd'.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/osenv/issues" - }, - "homepage": "https://github.com/isaacs/osenv", - "_id": "osenv@0.0.3", - "_from": "osenv@0.0.3" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/test/unix.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/test/unix.js deleted file mode 100644 index b72eb0b3..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/test/unix.js +++ /dev/null @@ -1,76 +0,0 @@ -// only run this test on windows -// pretending to be another platform is too hacky, since it breaks -// how the underlying system looks up module paths and runs -// child processes, and all that stuff is cached. -if (process.platform === 'win32') { - console.log('TAP Version 13\n' + - '1..0\n' + - '# Skip unix tests, this is not unix\n') - return -} -var tap = require('tap') - -// like unix, but funny -process.env.USER = 'sirUser' -process.env.HOME = '/home/sirUser' -process.env.HOSTNAME = 'my-machine' -process.env.TMPDIR = '/tmpdir' -process.env.TMP = '/tmp' -process.env.TEMP = '/temp' -process.env.PATH = '/opt/local/bin:/usr/local/bin:/usr/bin/:bin' -process.env.PS1 = '(o_o) $ ' -process.env.EDITOR = 'edit' -process.env.VISUAL = 'visualedit' -process.env.SHELL = 'zsh' - - -tap.test('basic unix sanity test', function (t) { - var osenv = require('../osenv.js') - - t.equal(osenv.user(), process.env.USER) - t.equal(osenv.home(), process.env.HOME) - t.equal(osenv.hostname(), process.env.HOSTNAME) - t.same(osenv.path(), process.env.PATH.split(':')) - t.equal(osenv.prompt(), process.env.PS1) - t.equal(osenv.tmpdir(), process.env.TMPDIR) - - // mildly evil, but it's for a test. - process.env.TMPDIR = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.tmpdir(), process.env.TMP) - - process.env.TMP = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.tmpdir(), process.env.TEMP) - - process.env.TEMP = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.tmpdir(), '/home/sirUser/tmp') - - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - osenv.home = function () { return null } - t.equal(osenv.tmpdir(), '/tmp') - - t.equal(osenv.editor(), 'edit') - process.env.EDITOR = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.editor(), 'visualedit') - - process.env.VISUAL = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.editor(), 'vi') - - t.equal(osenv.shell(), 'zsh') - process.env.SHELL = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.shell(), 'bash') - - t.end() -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/test/windows.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/test/windows.js deleted file mode 100644 index dd3fe807..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/osenv/test/windows.js +++ /dev/null @@ -1,82 +0,0 @@ -// only run this test on windows -// pretending to be another platform is too hacky, since it breaks -// how the underlying system looks up module paths and runs -// child processes, and all that stuff is cached. -if (process.platform !== 'win32') { - console.log('TAP Version 13\n' + - '1..0\n' + - '# Skip windows tests, this is not windows\n') - return -} - -// load this before clubbing the platform name. -var tap = require('tap') - -process.env.windir = 'C:\\windows' -process.env.USERDOMAIN = 'some-domain' -process.env.USERNAME = 'sirUser' -process.env.USERPROFILE = 'C:\\Users\\sirUser' -process.env.COMPUTERNAME = 'my-machine' -process.env.TMPDIR = 'C:\\tmpdir' -process.env.TMP = 'C:\\tmp' -process.env.TEMP = 'C:\\temp' -process.env.Path = 'C:\\Program Files\\;C:\\Binary Stuff\\bin' -process.env.PROMPT = '(o_o) $ ' -process.env.EDITOR = 'edit' -process.env.VISUAL = 'visualedit' -process.env.ComSpec = 'some-com' - -tap.test('basic windows sanity test', function (t) { - var osenv = require('../osenv.js') - - var osenv = require('../osenv.js') - - t.equal(osenv.user(), - process.env.USERDOMAIN + '\\' + process.env.USERNAME) - t.equal(osenv.home(), process.env.USERPROFILE) - t.equal(osenv.hostname(), process.env.COMPUTERNAME) - t.same(osenv.path(), process.env.Path.split(';')) - t.equal(osenv.prompt(), process.env.PROMPT) - t.equal(osenv.tmpdir(), process.env.TMPDIR) - - // mildly evil, but it's for a test. - process.env.TMPDIR = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.tmpdir(), process.env.TMP) - - process.env.TMP = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.tmpdir(), process.env.TEMP) - - process.env.TEMP = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.tmpdir(), 'C:\\Users\\sirUser\\temp') - - process.env.TEMP = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - osenv.home = function () { return null } - t.equal(osenv.tmpdir(), 'C:\\windows\\temp') - - t.equal(osenv.editor(), 'edit') - process.env.EDITOR = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.editor(), 'visualedit') - - process.env.VISUAL = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.editor(), 'notepad.exe') - - t.equal(osenv.shell(), 'some-com') - process.env.ComSpec = '' - delete require.cache[require.resolve('../osenv.js')] - var osenv = require('../osenv.js') - t.equal(osenv.shell(), 'cmd') - - t.end() -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/README.md deleted file mode 100644 index 21930096..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/README.md +++ /dev/null @@ -1,119 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Usage - - $ npm install semver - - semver.valid('1.2.3') // '1.2.3' - semver.valid('a.b.c') // null - semver.clean(' =v1.2.3 ') // '1.2.3' - semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true - semver.gt('1.2.3', '9.8.7') // false - semver.lt('1.2.3', '9.8.7') // true - -As a command-line utility: - - $ semver -h - - Usage: semver -v [-r ] - Test if version(s) satisfy the supplied range(s), - and sort them. - - Multiple versions or ranges may be supplied. - - Program exits successfully if any valid version satisfies - all supplied ranges, and prints all satisfying versions. - - If no versions are valid, or ranges are not satisfied, - then exits failure. - - Versions are printed in ascending order, so supplying - multiple versions to the utility will just sort them. - -## Versions - -A version is the following things, in this order: - -* a number (Major) -* a period -* a number (minor) -* a period -* a number (patch) -* OPTIONAL: a hyphen, followed by a number (build) -* OPTIONAL: a collection of pretty much any non-whitespace characters - (tag) - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Comparisons - -The ordering of versions is done using the following algorithm, given -two versions and asked to find the greater of the two: - -* If the majors are numerically different, then take the one - with a bigger major number. `2.3.4 > 1.3.4` -* If the minors are numerically different, then take the one - with the bigger minor number. `2.3.4 > 2.2.4` -* If the patches are numerically different, then take the one with the - bigger patch number. `2.3.4 > 2.3.3` -* If only one of them has a build number, then take the one with the - build number. `2.3.4-0 > 2.3.4` -* If they both have build numbers, and the build numbers are numerically - different, then take the one with the bigger build number. - `2.3.4-10 > 2.3.4-9` -* If only one of them has a tag, then take the one without the tag. - `2.3.4 > 2.3.4-beta` -* If they both have tags, then take the one with the lexicographically - larger tag. `2.3.4-beta > 2.3.4-alpha` -* At this point, they're equal. - -## Ranges - -The following range styles are supported: - -* `>1.2.3` Greater than a specific version. -* `<1.2.3` Less than -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` -* `~1.2.3` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.3.0` -* `~1` := `>=1.0.0 <2.0.0` -* `1.2.x` := `>=1.2.0 <1.3.0` -* `1.x` := `>=1.0.0 <2.0.0` - -Ranges can be joined with either a space (which implies "and") or a -`||` (which implies "or"). - -## Functions - -* valid(v): Return the parsed version, or null if it's not valid. -* inc(v, release): Return the version incremented by the release type - (major, minor, patch, or build), or null if it's not valid. - -### Comparison - -* gt(v1, v2): `v1 > v2` -* gte(v1, v2): `v1 >= v2` -* lt(v1, v2): `v1 < v2` -* lte(v1, v2): `v1 <= v2` -* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* neq(v1, v2): `v1 != v2` The opposite of eq. -* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if - v2 is greater. Sorts in ascending order if passed to Array.sort(). -* rcompare(v1, v2): The reverse of compare. Sorts an array of versions - in descending order when passed to Array.sort(). - - -### Ranges - -* validRange(range): Return the valid range or null if it's not valid -* satisfies(version, range): Return true if the version satisfies the - range. -* maxSatisfying(versions, range): Return the highest version in the list - that satisfies the range, or null if none of them do. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/bin/semver b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/bin/semver deleted file mode 100755 index d4e637e6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/bin/semver +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , semver = require("../semver") - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a - switch (a = argv.shift()) { - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.filter(semver.valid) - if (!versions.length) return fail() - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i]) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function fail () { process.exit(1) } - -function success () { - versions.sort(semver.compare) - .map(semver.clean) - .forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["Usage: semver -v [-r ]" - ,"Test if version(s) satisfy the supplied range(s)," - ,"and sort them." - ,"" - ,"Multiple versions or ranges may be supplied." - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no versions are valid, or ranges are not satisfied," - ,"then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} - - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/package.json deleted file mode 100644 index 20a296ad..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "semver", - "version": "1.1.4", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "0.x >=0.0.4" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/semver/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-semver.git" - }, - "bin": { - "semver": "./bin/semver" - }, - "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v [-r ]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <1.3.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-semver/issues" - }, - "homepage": "https://github.com/isaacs/node-semver", - "_id": "semver@1.1.4", - "_from": "semver@~1.1.0" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/semver.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/semver.js deleted file mode 100644 index cebfe6fd..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/semver.js +++ /dev/null @@ -1,306 +0,0 @@ -;(function (exports) { // nothing in here is node-specific. - -// See http://semver.org/ -// This implementation is a *hair* less strict in that it allows -// v1.2.3 things, and also tags that don't begin with a char. - -var semver = "\\s*[v=]*\\s*([0-9]+)" // major - + "\\.([0-9]+)" // minor - + "\\.([0-9]+)" // patch - + "(-[0-9]+-?)?" // build - + "([a-zA-Z-+][a-zA-Z0-9-\.:]*)?" // tag - , exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$" - , xRangePlain = "[v=]*([0-9]+|x|X|\\*)" - + "(?:\\.([0-9]+|x|X|\\*)" - + "(?:\\.([0-9]+|x|X|\\*)" - + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?)?)?" - , xRange = "((?:<|>)=?)?\\s*" + xRangePlain - , exprLoneSpermy = "(?:~>?)" - , exprSpermy = exprLoneSpermy + xRange - , expressions = exports.expressions = - { parse : new RegExp("^\\s*"+semver+"\\s*$") - , parsePackage : new RegExp("^\\s*([^\/]+)[-@](" +semver+")\\s*$") - , parseRange : new RegExp( - "^\\s*(" + semver + ")\\s+-\\s+(" + semver + ")\\s*$") - , validComparator : new RegExp("^"+exprComparator+"$") - , parseXRange : new RegExp("^"+xRange+"$") - , parseSpermy : new RegExp("^"+exprSpermy+"$") - } - - -Object.getOwnPropertyNames(expressions).forEach(function (i) { - exports[i] = function (str) { - return ("" + (str || "")).match(expressions[i]) - } -}) - -exports.rangeReplace = ">=$1 <=$7" -exports.clean = clean -exports.compare = compare -exports.rcompare = rcompare -exports.satisfies = satisfies -exports.gt = gt -exports.gte = gte -exports.lt = lt -exports.lte = lte -exports.eq = eq -exports.neq = neq -exports.cmp = cmp -exports.inc = inc - -exports.valid = valid -exports.validPackage = validPackage -exports.validRange = validRange -exports.maxSatisfying = maxSatisfying - -exports.replaceStars = replaceStars -exports.toComparators = toComparators - -function stringify (version) { - var v = version - return [v[1]||'', v[2]||'', v[3]||''].join(".") + (v[4]||'') + (v[5]||'') -} - -function clean (version) { - version = exports.parse(version) - if (!version) return version - return stringify(version) -} - -function valid (version) { - if (typeof version !== "string") return null - return exports.parse(version) && version.trim().replace(/^[v=]+/, '') -} - -function validPackage (version) { - if (typeof version !== "string") return null - return version.match(expressions.parsePackage) && version.trim() -} - -// range can be one of: -// "1.0.3 - 2.0.0" range, inclusive, like ">=1.0.3 <=2.0.0" -// ">1.0.2" like 1.0.3 - 9999.9999.9999 -// ">=1.0.2" like 1.0.2 - 9999.9999.9999 -// "<2.0.0" like 0.0.0 - 1.9999.9999 -// ">1.0.2 <2.0.0" like 1.0.3 - 1.9999.9999 -var starExpression = /(<|>)?=?\s*\*/g - , starReplace = "" - , compTrimExpression = new RegExp("((<|>)?=|<|>)\\s*(" - +semver+"|"+xRangePlain+")", "g") - , compTrimReplace = "$1$3" - -function toComparators (range) { - var ret = (range || "").trim() - .replace(expressions.parseRange, exports.rangeReplace) - .replace(compTrimExpression, compTrimReplace) - .split(/\s+/) - .join(" ") - .split("||") - .map(function (orchunk) { - return orchunk - .replace(new RegExp("(" + exprLoneSpermy + ")\\s+"), "$1") - .split(" ") - .map(replaceXRanges) - .map(replaceSpermies) - .map(replaceStars) - .join(" ").trim() - }) - .map(function (orchunk) { - return orchunk - .trim() - .split(/\s+/) - .filter(function (c) { return c.match(expressions.validComparator) }) - }) - .filter(function (c) { return c.length }) - return ret -} - -function replaceStars (stars) { - return stars.trim().replace(starExpression, starReplace) -} - -// "2.x","2.x.x" --> ">=2.0.0- <2.1.0-" -// "2.3.x" --> ">=2.3.0- <2.4.0-" -function replaceXRanges (ranges) { - return ranges.split(/\s+/) - .map(replaceXRange) - .join(" ") -} - -function replaceXRange (version) { - return version.trim().replace(expressions.parseXRange, - function (v, gtlt, M, m, p, t) { - var anyX = !M || M.toLowerCase() === "x" || M === "*" - || !m || m.toLowerCase() === "x" || m === "*" - || !p || p.toLowerCase() === "x" || p === "*" - , ret = v - - if (gtlt && anyX) { - // just replace x'es with zeroes - ;(!M || M === "*" || M.toLowerCase() === "x") && (M = 0) - ;(!m || m === "*" || m.toLowerCase() === "x") && (m = 0) - ;(!p || p === "*" || p.toLowerCase() === "x") && (p = 0) - ret = gtlt + M+"."+m+"."+p+"-" - } else if (!M || M === "*" || M.toLowerCase() === "x") { - ret = "*" // allow any - } else if (!m || m === "*" || m.toLowerCase() === "x") { - // append "-" onto the version, otherwise - // "1.x.x" matches "2.0.0beta", since the tag - // *lowers* the version value - ret = ">="+M+".0.0- <"+(+M+1)+".0.0-" - } else if (!p || p === "*" || p.toLowerCase() === "x") { - ret = ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-" - } - return ret - }) -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceSpermies (version) { - return version.trim().replace(expressions.parseSpermy, - function (v, gtlt, M, m, p, t) { - if (gtlt) throw new Error( - "Using '"+gtlt+"' with ~ makes no sense. Don't do it.") - - if (!M || M.toLowerCase() === "x") { - return "" - } - // ~1 == >=1.0.0- <2.0.0- - if (!m || m.toLowerCase() === "x") { - return ">="+M+".0.0- <"+(+M+1)+".0.0-" - } - // ~1.2 == >=1.2.0- <1.3.0- - if (!p || p.toLowerCase() === "x") { - return ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-" - } - // ~1.2.3 == >=1.2.3- <1.3.0- - t = t || "-" - return ">="+M+"."+m+"."+p+t+" <"+M+"."+(+m+1)+".0-" - }) -} - -function validRange (range) { - range = replaceStars(range) - var c = toComparators(range) - return (c.length === 0) - ? null - : c.map(function (c) { return c.join(" ") }).join("||") -} - -// returns the highest satisfying version in the list, or undefined -function maxSatisfying (versions, range) { - return versions - .filter(function (v) { return satisfies(v, range) }) - .sort(compare) - .pop() -} -function satisfies (version, range) { - version = valid(version) - if (!version) return false - range = toComparators(range) - for (var i = 0, l = range.length ; i < l ; i ++) { - var ok = false - for (var j = 0, ll = range[i].length ; j < ll ; j ++) { - var r = range[i][j] - , gtlt = r.charAt(0) === ">" ? gt - : r.charAt(0) === "<" ? lt - : false - , eq = r.charAt(!!gtlt) === "=" - , sub = (!!eq) + (!!gtlt) - if (!gtlt) eq = true - r = r.substr(sub) - r = (r === "") ? r : valid(r) - ok = (r === "") || (eq && r === version) || (gtlt && gtlt(version, r)) - if (!ok) break - } - if (ok) return true - } - return false -} - -// return v1 > v2 ? 1 : -1 -function compare (v1, v2) { - var g = gt(v1, v2) - return g === null ? 0 : g ? 1 : -1 -} - -function rcompare (v1, v2) { - return compare(v2, v1) -} - -function lt (v1, v2) { return gt(v2, v1) } -function gte (v1, v2) { return !lt(v1, v2) } -function lte (v1, v2) { return !gt(v1, v2) } -function eq (v1, v2) { return gt(v1, v2) === null } -function neq (v1, v2) { return gt(v1, v2) !== null } -function cmp (v1, c, v2) { - switch (c) { - case ">": return gt(v1, v2) - case "<": return lt(v1, v2) - case ">=": return gte(v1, v2) - case "<=": return lte(v1, v2) - case "==": return eq(v1, v2) - case "!=": return neq(v1, v2) - case "===": return v1 === v2 - case "!==": return v1 !== v2 - default: throw new Error("Y U NO USE VALID COMPARATOR!? "+c) - } -} - -// return v1 > v2 -function num (v) { - return v === undefined ? -1 : parseInt((v||"0").replace(/[^0-9]+/g, ''), 10) -} -function gt (v1, v2) { - v1 = exports.parse(v1) - v2 = exports.parse(v2) - if (!v1 || !v2) return false - - for (var i = 1; i < 5; i ++) { - v1[i] = num(v1[i]) - v2[i] = num(v2[i]) - if (v1[i] > v2[i]) return true - else if (v1[i] !== v2[i]) return false - } - // no tag is > than any tag, or use lexicographical order. - var tag1 = v1[5] || "" - , tag2 = v2[5] || "" - - // kludge: null means they were equal. falsey, and detectable. - // embarrassingly overclever, though, I know. - return tag1 === tag2 ? null - : !tag1 ? true - : !tag2 ? false - : tag1 > tag2 -} - -function inc (version, release) { - version = exports.parse(version) - if (!version) return null - - var parsedIndexLookup = - { 'major': 1 - , 'minor': 2 - , 'patch': 3 - , 'build': 4 } - var incIndex = parsedIndexLookup[release] - if (incIndex === undefined) return null - - var current = num(version[incIndex]) - version[incIndex] = current === -1 ? 1 : current + 1 - - for (var i = incIndex + 1; i < 5; i ++) { - if (num(version[i]) !== -1) version[i] = "0" - } - - if (version[4]) version[4] = "-" + version[4] - version[5] = "" - - return stringify(version) -} -})(typeof exports === "object" ? exports : semver = {}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/test.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/test.js deleted file mode 100644 index 475b77bb..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/node_modules/semver/test.js +++ /dev/null @@ -1,436 +0,0 @@ -var tap = require("tap") - , test = tap.test - , semver = require("./semver.js") - , eq = semver.eq - , gt = semver.gt - , lt = semver.lt - , neq = semver.neq - , cmp = semver.cmp - , gte = semver.gte - , lte = semver.lte - , satisfies = semver.satisfies - , validRange = semver.validRange - , inc = semver.inc - , replaceStars = semver.replaceStars - , toComparators = semver.toComparators - -tap.plan(8) - -test("\ncomparison tests", function (t) { -// [version1, version2] -// version1 should be greater than version2 -; [ ["0.0.0", "0.0.0foo"] - , ["0.0.1", "0.0.0"] - , ["1.0.0", "0.9.9"] - , ["0.10.0", "0.9.0"] - , ["0.99.0", "0.10.0"] - , ["2.0.0", "1.2.3"] - , ["v0.0.0", "0.0.0foo"] - , ["v0.0.1", "0.0.0"] - , ["v1.0.0", "0.9.9"] - , ["v0.10.0", "0.9.0"] - , ["v0.99.0", "0.10.0"] - , ["v2.0.0", "1.2.3"] - , ["0.0.0", "v0.0.0foo"] - , ["0.0.1", "v0.0.0"] - , ["1.0.0", "v0.9.9"] - , ["0.10.0", "v0.9.0"] - , ["0.99.0", "v0.10.0"] - , ["2.0.0", "v1.2.3"] - , ["1.2.3", "1.2.3-asdf"] - , ["1.2.3-4", "1.2.3"] - , ["1.2.3-4-foo", "1.2.3"] - , ["1.2.3-5", "1.2.3-5-foo"] - , ["1.2.3-5", "1.2.3-4"] - , ["1.2.3-5-foo", "1.2.3-5-Foo"] - , ["3.0.0", "2.7.2+"] - ].forEach(function (v) { - var v0 = v[0] - , v1 = v[1] - t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')") - t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')") - t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')") - t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')") - t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')") - t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')") - t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')") - t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')") - t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')") - t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')") - t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')") - }) - t.end() -}) - -test("\nequality tests", function (t) { -// [version1, version2] -// version1 should be equivalent to version2 -; [ ["1.2.3", "v1.2.3"] - , ["1.2.3", "=1.2.3"] - , ["1.2.3", "v 1.2.3"] - , ["1.2.3", "= 1.2.3"] - , ["1.2.3", " v1.2.3"] - , ["1.2.3", " =1.2.3"] - , ["1.2.3", " v 1.2.3"] - , ["1.2.3", " = 1.2.3"] - , ["1.2.3-0", "v1.2.3-0"] - , ["1.2.3-0", "=1.2.3-0"] - , ["1.2.3-0", "v 1.2.3-0"] - , ["1.2.3-0", "= 1.2.3-0"] - , ["1.2.3-0", " v1.2.3-0"] - , ["1.2.3-0", " =1.2.3-0"] - , ["1.2.3-0", " v 1.2.3-0"] - , ["1.2.3-0", " = 1.2.3-0"] - , ["1.2.3-01", "v1.2.3-1"] - , ["1.2.3-01", "=1.2.3-1"] - , ["1.2.3-01", "v 1.2.3-1"] - , ["1.2.3-01", "= 1.2.3-1"] - , ["1.2.3-01", " v1.2.3-1"] - , ["1.2.3-01", " =1.2.3-1"] - , ["1.2.3-01", " v 1.2.3-1"] - , ["1.2.3-01", " = 1.2.3-1"] - , ["1.2.3beta", "v1.2.3beta"] - , ["1.2.3beta", "=1.2.3beta"] - , ["1.2.3beta", "v 1.2.3beta"] - , ["1.2.3beta", "= 1.2.3beta"] - , ["1.2.3beta", " v1.2.3beta"] - , ["1.2.3beta", " =1.2.3beta"] - , ["1.2.3beta", " v 1.2.3beta"] - , ["1.2.3beta", " = 1.2.3beta"] - ].forEach(function (v) { - var v0 = v[0] - , v1 = v[1] - t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')") - t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')") - t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")") - t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")") - t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")") - t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")") - t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')") - t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')") - t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')") - t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')") - }) - t.end() -}) - - -test("\nrange tests", function (t) { -// [range, version] -// version should be included by range -; [ ["1.0.0 - 2.0.0", "1.2.3"] - , ["1.0.0", "1.0.0"] - , [">=*", "0.2.4"] - , ["", "1.0.0"] - , ["*", "1.2.3"] - , ["*", "v1.2.3-foo"] - , [">=1.0.0", "1.0.0"] - , [">=1.0.0", "1.0.1"] - , [">=1.0.0", "1.1.0"] - , [">1.0.0", "1.0.1"] - , [">1.0.0", "1.1.0"] - , ["<=2.0.0", "2.0.0"] - , ["<=2.0.0", "1.9999.9999"] - , ["<=2.0.0", "0.2.9"] - , ["<2.0.0", "1.9999.9999"] - , ["<2.0.0", "0.2.9"] - , [">= 1.0.0", "1.0.0"] - , [">= 1.0.0", "1.0.1"] - , [">= 1.0.0", "1.1.0"] - , ["> 1.0.0", "1.0.1"] - , ["> 1.0.0", "1.1.0"] - , ["<= 2.0.0", "2.0.0"] - , ["<= 2.0.0", "1.9999.9999"] - , ["<= 2.0.0", "0.2.9"] - , ["< 2.0.0", "1.9999.9999"] - , ["<\t2.0.0", "0.2.9"] - , [">=0.1.97", "v0.1.97"] - , [">=0.1.97", "0.1.97"] - , ["0.1.20 || 1.2.4", "1.2.4"] - , [">=0.2.3 || <0.0.1", "0.0.0"] - , [">=0.2.3 || <0.0.1", "0.2.3"] - , [">=0.2.3 || <0.0.1", "0.2.4"] - , ["||", "1.3.4"] - , ["2.x.x", "2.1.3"] - , ["1.2.x", "1.2.3"] - , ["1.2.x || 2.x", "2.1.3"] - , ["1.2.x || 2.x", "1.2.3"] - , ["x", "1.2.3"] - , ["2.*.*", "2.1.3"] - , ["1.2.*", "1.2.3"] - , ["1.2.* || 2.*", "2.1.3"] - , ["1.2.* || 2.*", "1.2.3"] - , ["*", "1.2.3"] - , ["2", "2.1.2"] - , ["2.3", "2.3.1"] - , ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0 - , ["~2.4", "2.4.5"] - , ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0 - , ["~1", "1.2.3"] // >=1.0.0 <2.0.0 - , ["~>1", "1.2.3"] - , ["~> 1", "1.2.3"] - , ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0 - , ["~ 1.0", "1.0.2"] - , ["~ 1.0.3", "1.0.12"] - , [">=1", "1.0.0"] - , [">= 1", "1.0.0"] - , ["<1.2", "1.1.1"] - , ["< 1.2", "1.1.1"] - , ["1", "1.0.0beta"] - , ["~v0.5.4-pre", "0.5.5"] - , ["~v0.5.4-pre", "0.5.4"] - , ["=0.7.x", "0.7.2"] - , [">=0.7.x", "0.7.2"] - , ["=0.7.x", "0.7.0-asdf"] - , [">=0.7.x", "0.7.0-asdf"] - , ["<=0.7.x", "0.6.2"] - , ["~1.2.1 >=1.2.3", "1.2.3"] - , ["~1.2.1 =1.2.3", "1.2.3"] - , ["~1.2.1 1.2.3", "1.2.3"] - , ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'] - , ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'] - , ['~1.2.1 1.2.3', '1.2.3'] - , ['>=1.2.1 1.2.3', '1.2.3'] - , ['1.2.3 >=1.2.1', '1.2.3'] - , ['>=1.2.3 >=1.2.1', '1.2.3'] - , ['>=1.2.1 >=1.2.3', '1.2.3'] - ].forEach(function (v) { - t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1]) - }) - t.end() -}) - -test("\nnegative range tests", function (t) { -// [range, version] -// version should not be included by range -; [ ["1.0.0 - 2.0.0", "2.2.3"] - , ["1.0.0", "1.0.1"] - , [">=1.0.0", "0.0.0"] - , [">=1.0.0", "0.0.1"] - , [">=1.0.0", "0.1.0"] - , [">1.0.0", "0.0.1"] - , [">1.0.0", "0.1.0"] - , ["<=2.0.0", "3.0.0"] - , ["<=2.0.0", "2.9999.9999"] - , ["<=2.0.0", "2.2.9"] - , ["<2.0.0", "2.9999.9999"] - , ["<2.0.0", "2.2.9"] - , [">=0.1.97", "v0.1.93"] - , [">=0.1.97", "0.1.93"] - , ["0.1.20 || 1.2.4", "1.2.3"] - , [">=0.2.3 || <0.0.1", "0.0.3"] - , [">=0.2.3 || <0.0.1", "0.2.2"] - , ["2.x.x", "1.1.3"] - , ["2.x.x", "3.1.3"] - , ["1.2.x", "1.3.3"] - , ["1.2.x || 2.x", "3.1.3"] - , ["1.2.x || 2.x", "1.1.3"] - , ["2.*.*", "1.1.3"] - , ["2.*.*", "3.1.3"] - , ["1.2.*", "1.3.3"] - , ["1.2.* || 2.*", "3.1.3"] - , ["1.2.* || 2.*", "1.1.3"] - , ["2", "1.1.2"] - , ["2.3", "2.4.1"] - , ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0 - , ["~2.4", "2.3.9"] - , ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0 - , ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0 - , ["~1", "0.2.3"] // >=1.0.0 <2.0.0 - , ["~>1", "2.2.3"] - , ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0 - , ["<1", "1.0.0"] - , [">=1.2", "1.1.1"] - , ["1", "2.0.0beta"] - , ["~v0.5.4-beta", "0.5.4-alpha"] - , ["<1", "1.0.0beta"] - , ["< 1", "1.0.0beta"] - , ["=0.7.x", "0.8.2"] - , [">=0.7.x", "0.6.2"] - , ["<=0.7.x", "0.7.2"] - ].forEach(function (v) { - t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1]) - }) - t.end() -}) - -test("\nincrement versions test", function (t) { -// [version, inc, result] -// inc(version, inc) -> result -; [ [ "1.2.3", "major", "2.0.0" ] - , [ "1.2.3", "minor", "1.3.0" ] - , [ "1.2.3", "patch", "1.2.4" ] - , [ "1.2.3", "build", "1.2.3-1" ] - , [ "1.2.3-4", "build", "1.2.3-5" ] - , [ "1.2.3tag", "major", "2.0.0" ] - , [ "1.2.3-tag", "major", "2.0.0" ] - , [ "1.2.3tag", "build", "1.2.3-1" ] - , [ "1.2.3-tag", "build", "1.2.3-1" ] - , [ "1.2.3-4-tag", "build", "1.2.3-5" ] - , [ "1.2.3-4tag", "build", "1.2.3-5" ] - , [ "1.2.3", "fake", null ] - , [ "fake", "major", null ] - ].forEach(function (v) { - t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2]) - }) - - t.end() -}) - -test("\nreplace stars test", function (t) { -// replace stars with "" -; [ [ "", "" ] - , [ "*", "" ] - , [ "> *", "" ] - , [ "<*", "" ] - , [ " >= *", "" ] - , [ "* || 1.2.3", " || 1.2.3" ] - ].forEach(function (v) { - t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1]) - }) - - t.end() -}) - -test("\nvalid range test", function (t) { -// [range, result] -// validRange(range) -> result -// translate ranges into their canonical form -; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"] - , ["1.0.0", "1.0.0"] - , [">=*", ""] - , ["", ""] - , ["*", ""] - , ["*", ""] - , [">=1.0.0", ">=1.0.0"] - , [">1.0.0", ">1.0.0"] - , ["<=2.0.0", "<=2.0.0"] - , ["1", ">=1.0.0- <2.0.0-"] - , ["<=2.0.0", "<=2.0.0"] - , ["<=2.0.0", "<=2.0.0"] - , ["<2.0.0", "<2.0.0"] - , ["<2.0.0", "<2.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , ["> 1.0.0", ">1.0.0"] - , ["> 1.0.0", ">1.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["< 2.0.0", "<2.0.0"] - , ["< 2.0.0", "<2.0.0"] - , [">=0.1.97", ">=0.1.97"] - , [">=0.1.97", ">=0.1.97"] - , ["0.1.20 || 1.2.4", "0.1.20||1.2.4"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , ["||", "||"] - , ["2.x.x", ">=2.0.0- <3.0.0-"] - , ["1.2.x", ">=1.2.0- <1.3.0-"] - , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"] - , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"] - , ["x", ""] - , ["2.*.*", null] - , ["1.2.*", null] - , ["1.2.* || 2.*", null] - , ["1.2.* || 2.*", null] - , ["*", ""] - , ["2", ">=2.0.0- <3.0.0-"] - , ["2.3", ">=2.3.0- <2.4.0-"] - , ["~2.4", ">=2.4.0- <2.5.0-"] - , ["~2.4", ">=2.4.0- <2.5.0-"] - , ["~>3.2.1", ">=3.2.1- <3.3.0-"] - , ["~1", ">=1.0.0- <2.0.0-"] - , ["~>1", ">=1.0.0- <2.0.0-"] - , ["~> 1", ">=1.0.0- <2.0.0-"] - , ["~1.0", ">=1.0.0- <1.1.0-"] - , ["~ 1.0", ">=1.0.0- <1.1.0-"] - , ["<1", "<1.0.0-"] - , ["< 1", "<1.0.0-"] - , [">=1", ">=1.0.0-"] - , [">= 1", ">=1.0.0-"] - , ["<1.2", "<1.2.0-"] - , ["< 1.2", "<1.2.0-"] - , ["1", ">=1.0.0- <2.0.0-"] - ].forEach(function (v) { - t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1]) - }) - - t.end() -}) - -test("\ncomparators test", function (t) { -// [range, comparators] -// turn range into a set of individual comparators -; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ] - , ["1.0.0", [["1.0.0"]] ] - , [">=*", [[">=0.0.0-"]] ] - , ["", [[""]]] - , ["*", [[""]] ] - , ["*", [[""]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">1.0.0", [[">1.0.0"]] ] - , [">1.0.0", [[">1.0.0"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["<2.0.0", [["<2.0.0"]] ] - , ["<2.0.0", [["<2.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , ["> 1.0.0", [[">1.0.0"]] ] - , ["> 1.0.0", [[">1.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["< 2.0.0", [["<2.0.0"]] ] - , ["<\t2.0.0", [["<2.0.0"]] ] - , [">=0.1.97", [[">=0.1.97"]] ] - , [">=0.1.97", [[">=0.1.97"]] ] - , ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , ["||", [[""], [""]] ] - , ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ] - , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["x", [[""]] ] - , ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ] - , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["*", [[""]] ] - , ["2", [[">=2.0.0-", "<3.0.0-"]] ] - , ["2.3", [[">=2.3.0-", "<2.4.0-"]] ] - , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ] - , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ] - , ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ] - , ["~1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~>1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ] - , ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ] - , ["~ 1.0.3", [[">=1.0.3-", "<1.1.0-"]] ] - , ["~> 1.0.3", [[">=1.0.3-", "<1.1.0-"]] ] - , ["<1", [["<1.0.0-"]] ] - , ["< 1", [["<1.0.0-"]] ] - , [">=1", [[">=1.0.0-"]] ] - , [">= 1", [[">=1.0.0-"]] ] - , ["<1.2", [["<1.2.0-"]] ] - , ["< 1.2", [["<1.2.0-"]] ] - , ["1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["1 2", [[">=1.0.0-", "<2.0.0-", ">=2.0.0-", "<3.0.0-"]] ] - ].forEach(function (v) { - t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1])) - }) - - t.end() -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/npmconf.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/npmconf.js deleted file mode 100644 index 46ff2b81..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/npmconf.js +++ /dev/null @@ -1,338 +0,0 @@ - -var CC = require('config-chain').ConfigChain -var inherits = require('inherits') -var configDefs = require('./config-defs.js') -var types = configDefs.types -var once = require('once') -var fs = require('fs') -var path = require('path') -var nopt = require('nopt') -var ini = require('ini') -var Octal = configDefs.Octal -var mkdirp = require('mkdirp') - -exports.load = load -exports.Conf = Conf -exports.loaded = false -exports.rootConf = null -exports.usingBuiltin = false -exports.defs = configDefs -Object.defineProperty(exports, 'defaults', { get: function () { - return configDefs.defaults -}, enumerable: true }) -Object.defineProperty(exports, 'types', { get: function () { - return configDefs.types -}, enumerable: true }) - -exports.validate = validate - -var myUid = process.env.SUDO_UID !== undefined - ? process.env.SUDO_UID : (process.getuid && process.getuid()) -var myGid = process.env.SUDO_GID !== undefined - ? process.env.SUDO_GID : (process.getgid && process.getgid()) - - -var loading = false -var loadCbs = [] -function load (cli_, builtin_, cb_) { - var cli, builtin, cb - for (var i = 0; i < arguments.length; i++) - switch (typeof arguments[i]) { - case 'string': builtin = arguments[i]; break - case 'object': cli = arguments[i]; break - case 'function': cb = arguments[i]; break - } - - if (!cb) - cb = function () {} - - if (exports.loaded) { - var ret = exports.loaded - if (cli) { - ret = new Conf(ret) - ret.unshift(cli) - } - return process.nextTick(cb.bind(null, null, ret)) - } - - // either a fresh object, or a clone of the passed in obj - if (!cli) - cli = {} - else - cli = Object.keys(cli).reduce(function (c, k) { - c[k] = cli[k] - return c - }, {}) - - loadCbs.push(cb) - if (loading) - return - loading = true - - cb = once(function (er, conf) { - if (!er) - exports.loaded = conf - loadCbs.forEach(function (fn) { - fn(er, conf) - }) - loadCbs.length = 0 - }) - - // check for a builtin if provided. - exports.usingBuiltin = !!builtin - var rc = exports.rootConf = new Conf() - var defaults = configDefs.defaults - if (builtin) - rc.addFile(builtin, 'builtin') - else - rc.add({}, 'builtin') - - rc.on('load', function () { - var conf = new Conf(rc) - conf.usingBuiltin = !!builtin - conf.add(cli, 'cli') - conf.addEnv() - conf.addFile(conf.get('userconfig'), 'user') - conf.once('error', cb) - conf.once('load', function () { - // globalconfig and globalignorefile defaults - // need to respond to the "prefix" setting up to this point. - // Eg, `npm config get globalconfig --prefix ~/local` should - // return `~/local/etc/npmrc` - // annoying humans and their expectations! - if (conf.get('prefix')) { - var etc = path.resolve(conf.get("prefix"), "etc") - defaults.globalconfig = path.resolve(etc, "npmrc") - defaults.globalignorefile = path.resolve(etc, "npmignore") - } - conf.addFile(conf.get('globalconfig'), 'global') - - // move the builtin into the conf stack now. - conf.root = defaults - conf.add(rc.shift(), 'builtin') - conf.once('load', function () { - // warn about invalid bits. - validate(conf) - exports.loaded = conf - cb(null, conf) - }) - }) - }) -} - - -// Basically the same as CC, but: -// 1. Always ini -// 2. Parses environment variable names in field values -// 3. Field values that start with ~/ are replaced with process.env.HOME -// 4. Can inherit from another Conf object, using it as the base. -inherits(Conf, CC) -function Conf (base) { - if (!(this instanceof Conf)) - return new Conf(base) - - CC.apply(this) - - if (base) - if (base instanceof Conf) - this.root = base.list[0] || base.root - else - this.root = base - else - this.root = configDefs.defaults -} - -Conf.prototype.save = function (where, cb) { - var target = this.sources[where] - if (!target || !(target.path || target.source) || !target.data) { - if (where !== 'builtin') - var er = new Error('bad save target: '+where) - if (cb) { - process.nextTick(cb.bind(null, er)) - return this - } - return this.emit('error', er) - } - - if (target.source) { - var pref = target.prefix || '' - Object.keys(target.data).forEach(function (k) { - target.source[pref + k] = target.data[k] - }) - if (cb) process.nextTick(cb) - return this - } - - var data = target.data - - if (typeof data._password === 'string' && - typeof data.username === 'string') { - var auth = data.username + ':' + data._password - data = Object.keys(data).reduce(function (c, k) { - if (k === 'username' || k === '_password') - return c - c[k] = data[k] - return c - }, { _auth: new Buffer(auth, 'utf8').toString('base64') }) - delete data.username - delete data._password - } - - data = ini.stringify(data) - - then = then.bind(this) - done = done.bind(this) - this._saving ++ - - var mode = where === 'user' ? 0600 : 0666 - if (!data.trim()) - fs.unlink(target.path, done) - else { - mkdirp(path.dirname(target.path), function (er) { - if (er) - return then(er) - fs.writeFile(target.path, data, 'utf8', function (er) { - if (er) - return then(er) - if (where === 'user' && myUid && myGid) - fs.chown(target.path, +myUid, +myGid, then) - else - then() - }) - }) - } - - function then (er) { - if (er) - return done(er) - fs.chmod(target.path, mode, done) - } - - function done (er) { - if (er) { - if (cb) return cb(er) - else return this.emit('error', er) - } - this._saving -- - if (this._saving === 0) { - if (cb) cb() - this.emit('save') - } - } - - return this -} - -Conf.prototype.addFile = function (file, name) { - name = name || file - var marker = {__source__:name} - this.sources[name] = { path: file, type: 'ini' } - this.push(marker) - this._await() - fs.readFile(file, 'utf8', function (er, data) { - if (er) // just ignore missing files. - return this.add({}, marker) - this.addString(data, file, 'ini', marker) - }.bind(this)) - return this -} - -// always ini files. -Conf.prototype.parse = function (content, file) { - return CC.prototype.parse.call(this, content, file, 'ini') -} - -Conf.prototype.add = function (data, marker) { - Object.keys(data).forEach(function (k) { - data[k] = parseField(data[k], k) - }) - if (Object.prototype.hasOwnProperty.call(data, '_auth')) { - var auth = new Buffer(data._auth, 'base64').toString('utf8').split(':') - var username = auth.shift() - var password = auth.join(':') - data.username = username - data._password = password - } - return CC.prototype.add.call(this, data, marker) -} - -Conf.prototype.addEnv = function (env) { - env = env || process.env - var conf = {} - Object.keys(env) - .filter(function (k) { return k.match(/^npm_config_[^_]/i) }) - .forEach(function (k) { - if (!env[k]) - return - - conf[k.replace(/^npm_config_/i, '') - .toLowerCase() - .replace(/_/g, '-')] = env[k] - }) - return CC.prototype.addEnv.call(this, '', conf, 'env') -} - -function parseField (f, k, emptyIsFalse) { - if (typeof f !== 'string' && !(f instanceof String)) - return f - - // type can be an array or single thing. - var typeList = [].concat(types[k]) - var isPath = -1 !== typeList.indexOf(path) - var isBool = -1 !== typeList.indexOf(Boolean) - var isString = -1 !== typeList.indexOf(String) - var isOctal = -1 !== typeList.indexOf(Octal) - var isNumber = isOctal || (-1 !== typeList.indexOf(Number)) - - f = (''+f).trim() - - if (f.match(/^".*"$/)) - f = JSON.parse(f) - - if (isBool && !isString && f === '') - return true - - switch (f) { - case 'true': return true - case 'false': return false - case 'null': return null - case 'undefined': return undefined - } - - f = envReplace(f) - - if (isPath) { - var homePattern = process.platform === 'win32' ? /^~(\/|\\)/ : /^~\// - if (f.match(homePattern) && process.env.HOME) { - f = path.resolve(process.env.HOME, f.substr(2)) - } - f = path.resolve(f) - } - - if (isNumber && !isNaN(f)) - f = isOctal ? parseInt(f, 8) : +f - - return f -} - -function envReplace (f) { - if (typeof f !== "string" || !f) return f - - // replace any ${ENV} values with the appropriate environ. - var envExpr = /(\\*)\$\{([^}]+)\}/g - return f.replace(envExpr, function (orig, esc, name, i, s) { - esc = esc.length && esc.length % 2 - if (esc) - return orig - if (undefined === process.env[name]) - throw new Error("Failed to replace env in config: "+orig) - return process.env[name] - }) -} - -function validate (cl) { - // warn about invalid configs at every level. - cl.list.forEach(function (conf, level) { - nopt.clean(conf, configDefs.types) - }) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/package.json deleted file mode 100644 index afc7c507..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "npmconf", - "version": "0.0.24", - "description": "The config thing npm uses", - "main": "npmconf.js", - "directories": { - "test": "test" - }, - "dependencies": { - "config-chain": "~1.1.1", - "inherits": "~1.0.0", - "once": "~1.1.1", - "mkdirp": "~0.3.3", - "osenv": "0.0.3", - "nopt": "2", - "semver": "~1.1.0", - "ini": "~1.1.0" - }, - "devDependencies": {}, - "scripts": { - "test": "tap test/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/npmconf" - }, - "keywords": [ - "npm", - "config", - "config-chain", - "conf", - "ini" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "license": "BSD", - "readme": "# npmconf\n\nThe config thing npm uses\n\nIf you are interested in interacting with the config settings that npm\nuses, then use this module.\n\nHowever, if you are writing a new Node.js program, and want\nconfiguration functionality similar to what npm has, but for your\nown thing, then I'd recommend using [rc](https://github.com/dominictarr/rc),\nwhich is probably what you want.\n\nIf I were to do it all over again, that's what I'd do for npm. But,\nalas, there are many systems depending on many of the particulars of\nnpm's configuration setup, so it's not worth the cost of changing.\n\n## USAGE\n\n```javascript\nvar npmconf = require('npmconf')\n\n// pass in the cli options that you read from the cli\n// or whatever top-level configs you want npm to use for now.\nnpmconf.load({some:'configs'}, function (er, conf) {\n // do stuff with conf\n conf.get('some', 'cli') // 'configs'\n conf.get('username') // 'joebobwhatevers'\n conf.set('foo', 'bar', 'user')\n conf.save('user', function (er) {\n // foo = bar is now saved to ~/.npmrc or wherever\n })\n})\n```\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/npmconf/issues" - }, - "homepage": "https://github.com/isaacs/npmconf", - "_id": "npmconf@0.0.24", - "_from": "npmconf@0.0.24" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/00-setup.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/00-setup.js deleted file mode 100644 index 79cbbb12..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/00-setup.js +++ /dev/null @@ -1,27 +0,0 @@ -var path = require('path') -var userconfigSrc = path.resolve(__dirname, 'fixtures', 'userconfig') -exports.userconfig = userconfigSrc + '-with-gc' -exports.globalconfig = path.resolve(__dirname, 'fixtures', 'globalconfig') -exports.builtin = path.resolve(__dirname, 'fixtures', 'builtin') - -// set the userconfig in the env -// unset anything else that npm might be trying to foist on us -Object.keys(process.env).forEach(function (k) { - if (k.match(/^npm_config_/i)) { - delete process.env[k] - } -}) -process.env.npm_config_userconfig = exports.userconfig -process.env.npm_config_other_env_thing = 1000 -process.env.random_env_var = 'asdf' - -if (module === require.main) { - // set the globalconfig in the userconfig - var fs = require('fs') - var uc = fs.readFileSync(userconfigSrc) - var gcini = 'globalconfig = ' + exports.globalconfig + '\n' - fs.writeFileSync(exports.userconfig, gcini + uc) - - console.log('0..1') - console.log('ok 1 setup done') -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/basic.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/basic.js deleted file mode 100644 index 5f276f1f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/basic.js +++ /dev/null @@ -1,73 +0,0 @@ -var test = require('tap').test -var npmconf = require('../npmconf.js') -var common = require('./00-setup.js') - -var ucData = - { globalconfig: common.globalconfig, - email: 'i@izs.me', - 'env-thing': 'asdf', - 'init.author.name': 'Isaac Z. Schlueter', - 'init.author.email': 'i@izs.me', - 'init.author.url': 'http://blog.izs.me/', - 'proprietary-attribs': false, - 'npm:publishtest': true, - '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry', - _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=', - 'npm-www:nocache': '1', - nodedir: '/Users/isaacs/dev/js/node-v0.8', - 'sign-git-tag': true, - message: 'v%s', - 'strict-ssl': false, - 'tmp': process.env.HOME + '/.tmp', - username : "username", - _password : "password", - _token: - { AuthSession: 'yabba-dabba-doodle', - version: '1', - expires: '1345001053415', - path: '/', - httponly: true } } - -var envData = { userconfig: common.userconfig, 'other-env-thing': '1000' } - -var gcData = { 'package-config:foo': 'boo' } - -var biData = {} - -var cli = { foo: 'bar', umask: 022 } - -var expectList = -[ cli, - envData, - ucData, - gcData, - biData ] - -var expectSources = -{ cli: { data: cli }, - env: - { data: envData, - source: envData, - prefix: '' }, - user: - { path: common.userconfig, - type: 'ini', - data: ucData }, - global: - { path: common.globalconfig, - type: 'ini', - data: gcData }, - builtin: { data: biData } } - -test('no builtin', function (t) { - npmconf.load(cli, function (er, conf) { - if (er) throw er - t.same(conf.list, expectList) - t.same(conf.sources, expectSources) - t.same(npmconf.rootConf.list, []) - t.equal(npmconf.rootConf.root, npmconf.defs.defaults) - t.equal(conf.root, npmconf.defs.defaults) - t.equal(conf.get('umask'), 022) - t.end() - }) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/builtin.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/builtin.js deleted file mode 100644 index 81425949..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/builtin.js +++ /dev/null @@ -1,72 +0,0 @@ -var test = require('tap').test -var npmconf = require('../npmconf.js') -var common = require('./00-setup.js') - -var ucData = - { globalconfig: common.globalconfig, - email: 'i@izs.me', - 'env-thing': 'asdf', - 'init.author.name': 'Isaac Z. Schlueter', - 'init.author.email': 'i@izs.me', - 'init.author.url': 'http://blog.izs.me/', - 'proprietary-attribs': false, - 'npm:publishtest': true, - '_npmjs.org:couch': 'https://admin:password@localhost:5984/registry', - _auth: 'dXNlcm5hbWU6cGFzc3dvcmQ=', - 'npm-www:nocache': '1', - nodedir: '/Users/isaacs/dev/js/node-v0.8', - 'sign-git-tag': true, - message: 'v%s', - 'strict-ssl': false, - 'tmp': process.env.HOME + '/.tmp', - username : "username", - _password : "password", - _token: - { AuthSession: 'yabba-dabba-doodle', - version: '1', - expires: '1345001053415', - path: '/', - httponly: true } } - -var envData = { userconfig: common.userconfig, 'other-env-thing': '1000' } - -var gcData = { 'package-config:foo': 'boo' } - -var biData = { 'builtin-config': true } - -var cli = { foo: 'bar' } - -var expectList = -[ cli, - envData, - ucData, - gcData, - biData ] - -var expectSources = -{ cli: { data: cli }, - env: - { data: envData, - source: envData, - prefix: '' }, - user: - { path: common.userconfig, - type: 'ini', - data: ucData }, - global: - { path: common.globalconfig, - type: 'ini', - data: gcData }, - builtin: { data: biData } } - -test('with builtin', function (t) { - npmconf.load(cli, common.builtin, function (er, conf) { - if (er) throw er - t.same(conf.list, expectList) - t.same(conf.sources, expectSources) - t.same(npmconf.rootConf.list, []) - t.equal(npmconf.rootConf.root, npmconf.defs.defaults) - t.equal(conf.root, npmconf.defs.defaults) - t.end() - }) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/builtin b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/builtin deleted file mode 100644 index dcd542c0..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/builtin +++ /dev/null @@ -1 +0,0 @@ -builtin-config = true diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/globalconfig b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/globalconfig deleted file mode 100644 index 41c0b70c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/globalconfig +++ /dev/null @@ -1 +0,0 @@ -package-config:foo = boo diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/userconfig b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/userconfig deleted file mode 100644 index bda1eb82..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/fixtures/userconfig +++ /dev/null @@ -1,22 +0,0 @@ -email = i@izs.me -env-thing = ${random_env_var} -init.author.name = Isaac Z. Schlueter -init.author.email = i@izs.me -init.author.url = http://blog.izs.me/ -proprietary-attribs = false -npm:publishtest = true -_npmjs.org:couch = https://admin:password@localhost:5984/registry -_auth = dXNlcm5hbWU6cGFzc3dvcmQ= -npm-www:nocache = 1 -nodedir = /Users/isaacs/dev/js/node-v0.8 -sign-git-tag = true -message = v%s -strict-ssl = false -tmp = ~/.tmp - -[_token] -AuthSession = yabba-dabba-doodle -version = 1 -expires = 1345001053415 -path = / -httponly = true diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/save.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/save.js deleted file mode 100644 index 05230cd0..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/npmconf/test/save.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require('tap').test -var npmconf = require('../npmconf.js') -var common = require('./00-setup.js') -var fs = require('fs') -var ini = require('ini') -var expectConf = - [ 'globalconfig = ' + common.globalconfig, - 'email = i@izs.me', - 'env-thing = asdf', - 'init.author.name = Isaac Z. Schlueter', - 'init.author.email = i@izs.me', - 'init.author.url = http://blog.izs.me/', - 'proprietary-attribs = false', - 'npm:publishtest = true', - '_npmjs.org:couch = https://admin:password@localhost:5984/registry', - '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=', - 'npm-www:nocache = 1', - 'sign-git-tag = false', - 'message = v%s', - 'strict-ssl = false', - 'username = username', - '_password = password', - '', - '[_token]', - 'AuthSession = yabba-dabba-doodle', - 'version = 1', - 'expires = 1345001053415', - 'path = /', - 'httponly = true', - '' ].join('\n') -var expectFile = - [ 'globalconfig = ' + common.globalconfig, - 'email = i@izs.me', - 'env-thing = asdf', - 'init.author.name = Isaac Z. Schlueter', - 'init.author.email = i@izs.me', - 'init.author.url = http://blog.izs.me/', - 'proprietary-attribs = false', - 'npm:publishtest = true', - '_npmjs.org:couch = https://admin:password@localhost:5984/registry', - '_auth = dXNlcm5hbWU6cGFzc3dvcmQ=', - 'npm-www:nocache = 1', - 'sign-git-tag = false', - 'message = v%s', - 'strict-ssl = false', - '', - '[_token]', - 'AuthSession = yabba-dabba-doodle', - 'version = 1', - 'expires = 1345001053415', - 'path = /', - 'httponly = true', - '' ].join('\n') - -test('saving configs', function (t) { - npmconf.load(function (er, conf) { - if (er) - throw er - conf.set('sign-git-tag', false, 'user') - conf.del('nodedir') - conf.del('tmp') - var foundConf = ini.stringify(conf.sources.user.data) - t.same(ini.parse(foundConf), ini.parse(expectConf)) - fs.unlinkSync(common.userconfig) - conf.save('user', function (er) { - if (er) - throw er - var uc = fs.readFileSync(conf.get('userconfig'), 'utf8') - t.same(ini.parse(uc), ini.parse(expectFile)) - t.end() - }) - }) -}) - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/AUTHORS b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/AUTHORS deleted file mode 100644 index 247b7543..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter (http://blog.izs.me) -Wayne Larsen (http://github.com/wvl) -ritch -Marcel Laverdet -Yosef Dinerstein diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/README.md deleted file mode 100644 index cd123b65..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/README.md +++ /dev/null @@ -1,30 +0,0 @@ -`rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of - `opts.maxBusyTries` times before giving up. -* `ENOENT` - If the file doesn't exist, rimraf will return - successfully, since your desired outcome is already the case. - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. - -## CLI - -If installed with `npm install rimraf -g` it can be used as a global -command `rimraf ` which is useful for cross platform support. - -## mkdirp - -If you need to create a directory recursively, check out -[mkdirp](https://github.com/substack/node-mkdirp). diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/bin.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/bin.js deleted file mode 100755 index 29bfa8a6..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/bin.js +++ /dev/null @@ -1,33 +0,0 @@ -#!/usr/bin/env node - -var rimraf = require('./') - -var help = false -var dashdash = false -var args = process.argv.slice(2).filter(function(arg) { - if (dashdash) - return !!arg - else if (arg === '--') - dashdash = true - else if (arg.match(/^(-+|\/)(h(elp)?|\?)$/)) - help = true - else - return !!arg -}); - -if (help || args.length === 0) { - // If they didn't ask for help, then this is not a "success" - var log = help ? console.log : console.error - log('Usage: rimraf ') - log('') - log(' Deletes all files and folders at "path" recursively.') - log('') - log('Options:') - log('') - log(' -h, --help Display this usage info') - process.exit(help ? 0 : 1) -} else { - args.forEach(function(arg) { - rimraf.sync(arg) - }) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/.npmignore b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/README.md deleted file mode 100644 index eb1a1093..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over fs module - -graceful-fs: - -* Queues up `open` and `readdir` calls, and retries them once - something closes if there is an EMFILE error from too many file - descriptors. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index 1865f92c..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,159 +0,0 @@ -// Monkey-patching the fs module. -// It's ugly, but there is simply no other way to do this. -var fs = module.exports = require('fs') - -var assert = require('assert') - -// fix up some busted stuff, mostly on windows and old nodes -require('./polyfills.js') - -// The EMFILE enqueuing stuff - -var util = require('util') - -function noop () {} - -var debug = noop -var util = require('util') -if (util.debuglog) - debug = util.debuglog('gfs') -else if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) - debug = function() { - var m = util.format.apply(util, arguments) - m = 'GFS: ' + m.split(/\n/).join('\nGFS: ') - console.error(m) - } - -if (/\bgfs\b/i.test(process.env.NODE_DEBUG || '')) { - process.on('exit', function() { - debug('fds', fds) - debug(queue) - assert.equal(queue.length, 0) - }) -} - - -var originalOpen = fs.open -fs.open = open - -function open(path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - new OpenReq(path, flags, mode, cb) -} - -function OpenReq(path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb - Req.call(this) -} - -util.inherits(OpenReq, Req) - -OpenReq.prototype.process = function() { - originalOpen.call(fs, this.path, this.flags, this.mode, this.done) -} - -var fds = {} -OpenReq.prototype.done = function(er, fd) { - debug('open done', er, fd) - if (fd) - fds['fd' + fd] = this.path - Req.prototype.done.call(this, er, fd) -} - - -var originalReaddir = fs.readdir -fs.readdir = readdir - -function readdir(path, cb) { - if (typeof cb !== "function") cb = noop - new ReaddirReq(path, cb) -} - -function ReaddirReq(path, cb) { - this.path = path - this.cb = cb - Req.call(this) -} - -util.inherits(ReaddirReq, Req) - -ReaddirReq.prototype.process = function() { - originalReaddir.call(fs, this.path, this.done) -} - -ReaddirReq.prototype.done = function(er, files) { - Req.prototype.done.call(this, er, files) - onclose() -} - - -var originalClose = fs.close -fs.close = close - -function close (fd, cb) { - debug('close', fd) - if (typeof cb !== "function") cb = noop - delete fds['fd' + fd] - originalClose.call(fs, fd, function(er) { - onclose() - cb(er) - }) -} - - -var originalCloseSync = fs.closeSync -fs.closeSync = closeSync - -function closeSync (fd) { - try { - return originalCloseSync(fd) - } finally { - onclose() - } -} - - -// Req class -function Req () { - // start processing - this.done = this.done.bind(this) - this.failures = 0 - this.process() -} - -Req.prototype.done = function (er, result) { - var tryAgain = false - if (er) { - var code = er.code - var tryAgain = code === "EMFILE" - if (process.platform === "win32") - tryAgain = tryAgain || code === "OK" - } - - if (tryAgain) { - this.failures ++ - enqueue(this) - } else { - var cb = this.cb - cb(er, result) - } -} - -var queue = [] - -function enqueue(req) { - queue.push(req) - debug('enqueue %d %s', queue.length, req.constructor.name, req) -} - -function onclose() { - var req = queue.shift() - if (req) { - debug('process', req.constructor.name, req) - req.process() - } -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/package.json deleted file mode 100644 index 1d20311f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "main": "graceful-fs.js", - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "tap test/*.js" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "BSD", - "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* Queues up `open` and `readdir` calls, and retries them once\n something closes if there is an EMFILE error from too many file\n descriptors.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "homepage": "https://github.com/isaacs/node-graceful-fs", - "_id": "graceful-fs@2.0.1", - "_from": "graceful-fs@~2" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/polyfills.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/polyfills.js deleted file mode 100644 index afc83b3f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/polyfills.js +++ /dev/null @@ -1,228 +0,0 @@ -var fs = require('fs') -var constants = require('constants') - -var origCwd = process.cwd -var cwd = null -process.cwd = function() { - if (!cwd) - cwd = origCwd.call(process) - return cwd -} -var chdir = process.chdir -process.chdir = function(d) { - cwd = null - chdir.call(process, d) -} - -// (re-)implement some things that are known busted or missing. - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -function chownErOk (er) { - // if there's no getuid, or if getuid() is something other than 0, - // and the error is EINVAL or EPERM, then just ignore it. - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // When running as root, or if other types of errors are encountered, - // then it's strict. - if (!er || (!process.getuid || process.getuid() !== 0) - && (er.code === "EINVAL" || er.code === "EPERM")) return true -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} - diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/test/open.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 104f36b0..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,39 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is monkeypatched fs', function (t) { - t.equal(fs, require('fs')) - t.end() -}) - -test('open an existing file works', function (t) { - var fd = fs.openSync(__filename, 'r') - fs.closeSync(fd) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - fs.close(fd, function (er) { - if (er) throw er - t.pass('works') - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.end() - }) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/package.json deleted file mode 100644 index 87a7f3cf..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.4", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "optionalDependencies": { - "graceful-fs": "~2" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": { - "rimraf": "./bin.js" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - }, - { - "name": "Yosef Dinerstein", - "email": "yosefd@microsoft.com" - } - ], - "readme": "`rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* Windows: `EBUSY` and `ENOTEMPTY` - rimraf will back off a maximum of\n `opts.maxBusyTries` times before giving up.\n* `ENOENT` - If the file doesn't exist, rimraf will return\n successfully, since your desired outcome is already the case.\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n\n## CLI\n\nIf installed with `npm install rimraf -g` it can be used as a global\ncommand `rimraf ` which is useful for cross platform support.\n\n## mkdirp\n\nIf you need to create a directory recursively, check out\n[mkdirp](https://github.com/substack/node-mkdirp).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "dependencies": { - "graceful-fs": "~2" - }, - "_id": "rimraf@2.2.4", - "_from": "rimraf@~2.2.2" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/package/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/package/package.json deleted file mode 100644 index a70145d9..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/package/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "rimraf", - "version": "2.2.2", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "optionalDependencies": { - "graceful-fs": "~2" - }, - "repository": "git://github.com/isaacs/rimraf.git", - "scripts": { - "test": "cd test && bash run.sh" - }, - "bin": "./bin.js" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/rimraf.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/rimraf.js deleted file mode 100644 index c7689845..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,185 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") - , fs - -try { - // optional dependency - fs = require("graceful-fs") -} catch (er) { - fs = require("fs") -} - -// for EMFILE handling -var timeout = 0 -exports.EMFILE_MAX = 1000 -exports.BUSYTRIES_MAX = 3 - -var isWindows = (process.platform === "win32") - -function rimraf (p, cb) { - if (!cb) throw new Error("No callback passed to rimraf()") - - var busyTries = 0 - rimraf_(p, function CB (er) { - if (er) { - if (isWindows && (er.code === "EBUSY" || er.code === "ENOTEMPTY") && - busyTries < exports.BUSYTRIES_MAX) { - busyTries ++ - var time = busyTries * 100 - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, CB) - }, time) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < exports.EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -// Two possible strategies. -// 1. Assume it's a file. unlink it, then do the dir stuff on EPERM or EISDIR -// 2. Assume it's a directory. readdir, then do the file stuff on ENOTDIR -// -// Both result in an extra syscall when you guess wrong. However, there -// are likely far more normal files in the world than directories. This -// is based on the assumption that a the average number of files per -// directory is >= 1. -// -// If anyone ever complains about this, then I guess the strategy could -// be made configurable somehow. But until then, YAGNI. -function rimraf_ (p, cb) { - fs.unlink(p, function (er) { - if (er) { - if (er.code === "ENOENT") - return cb(null) - if (er.code === "EPERM") - return (isWindows) ? fixWinEPERM(p, er, cb) : rmdir(p, er, cb) - if (er.code === "EISDIR") - return rmdir(p, er, cb) - } - return cb(er) - }) -} - -function fixWinEPERM (p, er, cb) { - fs.chmod(p, 666, function (er2) { - if (er2) - cb(er2.code === "ENOENT" ? null : er) - else - fs.stat(p, function(er3, stats) { - if (er3) - cb(er3.code === "ENOENT" ? null : er) - else if (stats.isDirectory()) - rmdir(p, er, cb) - else - fs.unlink(p, cb) - }) - }) -} - -function fixWinEPERMSync (p, er, cb) { - try { - fs.chmodSync(p, 666) - } catch (er2) { - if (er2.code !== "ENOENT") - throw er - } - - try { - var stats = fs.statSync(p) - } catch (er3) { - if (er3 !== "ENOENT") - throw er - } - - if (stats.isDirectory()) - rmdirSync(p, er) - else - fs.unlinkSync(p) -} - -function rmdir (p, originalEr, cb) { - // try to rmdir first, and only readdir on ENOTEMPTY or EEXIST (SunOS) - // if we guessed wrong, and it's not a directory, then - // raise the original error. - fs.rmdir(p, function (er) { - if (er && (er.code === "ENOTEMPTY" || er.code === "EEXIST")) - rmkids(p, cb) - else if (er && er.code === "ENOTDIR") - cb(originalEr) - else - cb(er) - }) -} - -function rmkids(p, cb) { - fs.readdir(p, function (er, files) { - if (er) - return cb(er) - var n = files.length - if (n === 0) - return fs.rmdir(p, cb) - var errState - files.forEach(function (f) { - rimraf(path.join(p, f), function (er) { - if (errState) - return - if (er) - return cb(errState = er) - if (--n === 0) - fs.rmdir(p, cb) - }) - }) - }) -} - -// this looks simpler, and is strictly *faster*, but will -// tie up the JavaScript thread and fail on excessively -// deep directory trees. -function rimrafSync (p) { - try { - fs.unlinkSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "EPERM") - return isWindows ? fixWinEPERMSync(p, er) : rmdirSync(p, er) - if (er.code !== "EISDIR") - throw er - rmdirSync(p, er) - } -} - -function rmdirSync (p, originalEr) { - try { - fs.rmdirSync(p) - } catch (er) { - if (er.code === "ENOENT") - return - if (er.code === "ENOTDIR") - throw originalEr - if (er.code === "ENOTEMPTY" || er.code === "EEXIST") - rmkidsSync(p) - } -} - -function rmkidsSync (p) { - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/run.sh b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/setup.sh b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/test-async.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7b..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/test-sync.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f104..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/LICENSE b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/README.md b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/README.md deleted file mode 100644 index ff1eb531..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The "which" util from npm's guts. - -Finds the first instance of a specified executable in the PATH -environment variable. Does not cache the results, so `hash -r` is not -needed when the PATH changes. diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/bin/which b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/bin/which deleted file mode 100755 index 8432ce2f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/bin/which +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env node -var which = require("../") -if (process.argv.length < 3) { - console.error("Usage: which ") - process.exit(1) -} - -which(process.argv[2], function (er, thing) { - if (er) { - console.error(er.message) - process.exit(er.errno || 127) - } - console.log(thing) -}) diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/package.json deleted file mode 100644 index 37965061..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "which", - "description": "Like which(1) unix command. Find the first instance of an executable in the PATH.", - "version": "1.0.5", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-which.git" - }, - "main": "which.js", - "bin": { - "which": "./bin/which" - }, - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": {}, - "readme": "The \"which\" util from npm's guts.\n\nFinds the first instance of a specified executable in the PATH\nenvironment variable. Does not cache the results, so `hash -r` is not\nneeded when the PATH changes.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-which/issues" - }, - "homepage": "https://github.com/isaacs/node-which", - "_id": "which@1.0.5", - "_from": "which@~1.0.5" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/which.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/which.js deleted file mode 100644 index db7e8f74..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/node_modules/which/which.js +++ /dev/null @@ -1,104 +0,0 @@ -module.exports = which -which.sync = whichSync - -var path = require("path") - , fs - , COLON = process.platform === "win32" ? ";" : ":" - , isExe - -try { - fs = require("graceful-fs") -} catch (ex) { - fs = require("fs") -} - -if (process.platform == "win32") { - // On windows, there is no good way to check that a file is executable - isExe = function isExe () { return true } -} else { - isExe = function isExe (mod, uid, gid) { - //console.error(mod, uid, gid); - //console.error("isExe?", (mod & 0111).toString(8)) - var ret = (mod & 0001) - || (mod & 0010) && process.getgid && gid === process.getgid() - || (mod & 0100) && process.getuid && uid === process.getuid() - //console.error("isExe?", ret) - return ret - } -} - - - -function which (cmd, cb) { - if (isAbsolute(cmd)) return cb(null, cmd) - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - //console.error("pathEnv", pathEnv) - ;(function F (i, l) { - if (i === l) return cb(new Error("not found: "+cmd)) - var p = path.resolve(pathEnv[i], cmd) - ;(function E (ii, ll) { - if (ii === ll) return F(i + 1, l) - var ext = pathExt[ii] - //console.error(p + ext) - fs.stat(p + ext, function (er, stat) { - if (!er && - stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) { - //console.error("yes, exe!", p + ext) - return cb(null, p + ext) - } - return E(ii + 1, ll) - }) - })(0, pathExt.length) - })(0, pathEnv.length) -} - -function whichSync (cmd) { - if (isAbsolute(cmd)) return cmd - var pathEnv = (process.env.PATH || "").split(COLON) - , pathExt = [""] - if (process.platform === "win32") { - pathEnv.push(process.cwd()) - pathExt = (process.env.PATHEXT || ".EXE").split(COLON) - if (cmd.indexOf(".") !== -1) pathExt.unshift("") - } - for (var i = 0, l = pathEnv.length; i < l; i ++) { - var p = path.join(pathEnv[i], cmd) - for (var j = 0, ll = pathExt.length; j < ll; j ++) { - var cur = p + pathExt[j] - var stat - try { stat = fs.statSync(cur) } catch (ex) {} - if (stat && - stat.isFile() && - isExe(stat.mode, stat.uid, stat.gid)) return cur - } - } - throw new Error("not found: "+cmd) -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?([\\\/])?/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/package.json b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/package.json deleted file mode 100644 index e2aaed4e..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/package.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "phantomjs", - "version": "1.9.2-4", - "keywords": [ - "phantomjs", - "headless", - "webkit" - ], - "description": "Headless WebKit with JS API", - "homepage": "https://github.com/Obvious/phantomjs", - "repository": { - "type": "git", - "url": "git://github.com/Obvious/phantomjs.git" - }, - "licenses": [ - { - "type": "Apache 2.0", - "url": "http://www.apache.org/licenses/LICENSE-2.0.html" - } - ], - "author": { - "name": "Dan Pupius", - "email": "dan@obvious.com", - "url": "http://pupius.co.uk" - }, - "maintainers": [ - { - "name": "Dan Pupius", - "email": "dan@obvious.com", - "url": "http://pupius.co.uk/" - } - ], - "main": "lib/phantomjs", - "bin": { - "phantomjs": "./bin/phantomjs" - }, - "scripts": { - "install": "node install.js", - "test": "nodeunit --reporter=minimal test/tests.js" - }, - "dependencies": { - "adm-zip": "0.2.1", - "kew": "~0.1.7", - "ncp": "0.4.2", - "npmconf": "0.0.24", - "mkdirp": "0.3.5", - "rimraf": "~2.2.2", - "which": "~1.0.5" - }, - "devDependencies": { - "nodeunit": "~0.7.4" - }, - "readme": "phantom\n=======\n\nAn NPM wrapper for [PhantomJS](http://phantomjs.org/), headless webkit with JS API.\n\nBuilding and Installing\n-----------------------\n\n```shell\nnpm install phantomjs\n```\n\nOr grab the source and\n\n```shell\nnode ./install.js\n```\n\nWhat this is really doing is just grabbing a particular \"blessed\" (by\nthis module) version of Phantom. As new versions of Phantom are released\nand vetted, this module will be updated accordingly.\n\nThe package has been set up to fetch and run Phantom for MacOS (darwin),\nLinux based platforms (as identified by nodejs), and -- as of version 0.2.0 --\nWindows (thanks to [Domenic Denicola](https://github.com/domenic)). If you\nspot any platform weirdnesses, let us know or send a patch.\n\nRunning\n-------\n\n```shell\nbin/phantom [phantom arguments]\n```\n\nAnd npm will install a link to the binary in `node_modules/.bin` as\nit is wont to do.\n\nRunning via node\n----------------\n\nThe package exports a `path` string that contains the path to the\nphantomjs binary/executable.\n\nBelow is an example of using this package via node.\n\n```javascript\nvar childProcess = require('child_process')\nvar phantomjs = require('phantomjs')\nvar binPath = phantomjs.path\n\nvar childArgs = [\n path.join(__dirname, 'phantomjs-script.js'),\n 'some other argument (passed to phantomjs script)'\n]\n\nchildProcess.execFile(binPath, childArgs, function(err, stdout, stderr) {\n // handle results\n})\n\n```\n\nVersioning\n----------\n\nThe NPM package version tracks the version of PhantomJS that will be installed,\nwith an additional build number that is used for revisions to the installer.\n\nAs such `1.8.0-1` will `1.8.0-2` will both install PhantomJs 1.8 but the latter\nhas newer changes to the installer.\n\nA Note on PhantomJS\n-------------------\n\nPhantomJS is not a library for NodeJS. It's a separate environment and code\nwritten for node is unlikely to be compatible. In particular PhantomJS does\nnot expose a Common JS package loader.\n\nThis is an _NPM wrapper_ and can be used to conveniently make Phantom available\nIt is not a Node JS wrapper.\n\nI have had reasonable experiences writing standalone Phantom scripts which I\nthen drive from within a node program by spawning phantom in a child process.\n\nRead the PhantomJS FAQ for more details: http://phantomjs.org/faq.html\n\n### Linux Note\n\nAn extra note on Linux usage, from the PhantomJS download page:\n\n > This package is built on CentOS 5.8. It should run successfully on Lucid or\n > more modern systems (including other distributions). There is no requirement\n > to install Qt, WebKit, or any other libraries. It is however expected that\n > some base libraries necessary for rendering (FreeType, Fontconfig) and the\n > basic font files are available in the system.\n\nContributing\n------------\n\nQuestions, comments, bug reports, and pull requests are all welcome. Submit them at\n[the project on GitHub](https://github.com/Obvious/phantomjs/). If you haven't contributed to an\n[Obvious](http://github.com/Obvious/) project before please head over to the\n[Open Source Project](https://github.com/Obvious/open-source#note-to-external-contributors) and fill\nout an OCLA (it should be pretty painless).\n\nBug reports that include steps-to-reproduce (including code) are the\nbest. Even better, make them in the form of pull requests.\n\nAuthor\n------\n\n[Dan Pupius](https://github.com/dpup)\n([personal website](http://pupius.co.uk)), supported by\n[The Obvious Corporation](http://obvious.com/).\n\nLicense\n-------\n\nCopyright 2012 [The Obvious Corporation](http://obvious.com/).\n\nLicensed under the Apache License, Version 2.0.\nSee the top-level file `LICENSE.txt` and\n(http://www.apache.org/licenses/LICENSE-2.0).\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/Obvious/phantomjs/issues" - }, - "_id": "phantomjs@1.9.2-4", - "_from": "phantomjs@~1.9" -} diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/test/loadspeed.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/test/loadspeed.js deleted file mode 100644 index 8fc54369..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/test/loadspeed.js +++ /dev/null @@ -1,25 +0,0 @@ -// phantomjs test script -// opens url and reports time to load -// requires an active internet connection -var page = require('webpage').create() -var system = require('system') -var t -var address - -if (system.args.length === 1) { - console.log('Usage: loadspeed.js ') - phantom.exit() -} - -t = Date.now() -address = system.args[1] -page.open(address, function (status) { - if (status !== 'success') { - console.log('FAIL to load the address') - } else { - t = Date.now() - t - console.log('Loading time ' + t + ' msec') - } - - phantom.exit() -}) \ No newline at end of file diff --git a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/test/tests.js b/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/test/tests.js deleted file mode 100644 index bfba187f..00000000 --- a/node_modules/karma-phantomjs-launcher/node_modules/phantomjs/test/tests.js +++ /dev/null @@ -1,57 +0,0 @@ -/** - * Nodeunit functional tests. Requires internet connection to validate phantom - * functions correctly. - */ - -var childProcess = require('child_process') -var fs = require('fs') -var path = require('path') -var phantomjs = require('../lib/phantomjs') - - -exports.testDownload = function (test) { - test.expect(1) - test.ok(fs.existsSync(phantomjs.path), 'Binary file should have been downloaded') - test.done() -} - - -exports.testPhantomExecutesTestScript = function (test) { - test.expect(1) - - var childArgs = [ - path.join(__dirname, 'loadspeed.js'), - 'http://www.google.com/' - ] - - childProcess.execFile(phantomjs.path, childArgs, function (err, stdout, stderr) { - var value = (stdout.indexOf('msec') !== -1) - test.ok(value, 'Test script should have executed and returned run time') - test.done() - }) -} - - -exports.testBinFile = function (test) { - test.expect(1) - - var binPath = process.platform === 'win32' ? - path.join(__dirname, '..', 'lib', 'phantom', 'phantomjs.exe') : - path.join(__dirname, '..', 'bin', 'phantomjs') - - childProcess.execFile(binPath, ['--version'], function (err, stdout, stderr) { - test.equal(phantomjs.version, stdout.trim(), 'Version should be match') - test.done() - }) -} - - -exports.testCleanPath = function (test) { - test.expect(5) - test.equal('/Users/dan/bin', phantomjs.cleanPath('/Users/dan/bin:./bin')) - test.equal('/Users/dan/bin:/usr/bin', phantomjs.cleanPath('/Users/dan/bin:./bin:/usr/bin')) - test.equal('/usr/bin', phantomjs.cleanPath('./bin:/usr/bin')) - test.equal('', phantomjs.cleanPath('./bin')) - test.equal('/Work/bin:/usr/bin', phantomjs.cleanPath('/Work/bin:/Work/phantomjs/node_modules/.bin:/usr/bin')) - test.done() -} diff --git a/node_modules/karma-phantomjs-launcher/package.json b/node_modules/karma-phantomjs-launcher/package.json deleted file mode 100644 index 57c810d5..00000000 --- a/node_modules/karma-phantomjs-launcher/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "karma-phantomjs-launcher", - "version": "0.1.1", - "description": "A Karma plugin. Launcher for PhantomJS.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-phantomjs-launcher.git" - }, - "keywords": [ - "karma-plugin", - "karma-launcher", - "phantomjs" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": { - "phantomjs": "~1.9" - }, - "peerDependencies": { - "karma": ">=0.9" - }, - "license": "MIT", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.7", - "grunt-auto-release": "~0.0.2" - }, - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - }, - { - "name": "Edward Hutchins", - "email": "eahutchins@gmail.com" - }, - { - "name": "Eryk Napierała", - "email": "eryk.piast@gmail.com" - }, - { - "name": "Jason Dobry", - "email": "jason.dobry@gmail.com" - }, - { - "name": "Rob Barreca", - "email": "rob.barreca@inmobi.com" - }, - { - "name": "nherzing", - "email": "nherzing@gmail.com" - } - ], - "readme": "# karma-phantomjs-launcher\n\n> Launcher for [PhantomJS].\n\n## Installation\n\n**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)**\n\nThe easiest way is to keep `karma-phantomjs-launcher` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-phantomjs-launcher\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-phantomjs-launcher --save-dev\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n browsers: ['PhantomJS', 'PhantomJS_custom'],\n\n // you can define custom flags\n customLaunchers: {\n 'PhantomJS_custom': {\n base: 'PhantomJS',\n options: {\n windowName: 'my-window',\n settings: {\n webSecurityEnabled: false\n }\n },\n flags: ['--remote-debugger-port=9000']\n }\n }\n });\n};\n```\n\nYou can pass list of browsers as a CLI argument too:\n```bash\nkarma start --browsers PhantomJS_custom\n```\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n[PhantomJS]: http://phantomjs.org/\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-phantomjs-launcher/issues" - }, - "homepage": "https://github.com/karma-runner/karma-phantomjs-launcher", - "_id": "karma-phantomjs-launcher@0.1.1", - "_from": "karma-phantomjs-launcher@*" -} diff --git a/node_modules/karma-requirejs/LICENSE b/node_modules/karma-requirejs/LICENSE deleted file mode 100644 index 40727341..00000000 --- a/node_modules/karma-requirejs/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Google, Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-requirejs/README.md b/node_modules/karma-requirejs/README.md deleted file mode 100644 index 3e773c47..00000000 --- a/node_modules/karma-requirejs/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# karma-requirejs [![Build Status](https://travis-ci.org/karma-runner/karma-requirejs.png?branch=master)](https://travis-ci.org/karma-runner/karma-requirejs) - -> Adapter for the [RequireJS](http://requirejs.org/) framework. - -**This plugin ships with Karma by default, so you don't need to install it.** - -Check out examples on how to configure RequireJS with Karma: -- Karma's e2e test https://github.com/karma-runner/karma/tree/master/test/e2e/requirejs -- Karma's docs http://karma-runner.github.io/0.8/plus/RequireJS.html -- Kim's example project https://github.com/kjbekkelund/karma-requirejs - - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.io/ diff --git a/node_modules/karma-requirejs/lib/adapter.js b/node_modules/karma-requirejs/lib/adapter.js deleted file mode 100644 index 6dac7ea7..00000000 --- a/node_modules/karma-requirejs/lib/adapter.js +++ /dev/null @@ -1,47 +0,0 @@ -(function(karma, requirejs) { - -// monkey patch requirejs, to use append timestamps to sources -// to take advantage of karma's heavy caching -// it would work even without this hack, but with reloading all the files all the time - -var normalizePath = function(path) { - var normalized = []; - var parts = path.split('/'); - - for (var i = 0; i < parts.length; i++) { - if (parts[i] === '.') { - continue; - } - - if (parts[i] === '..' && normalized.length && normalized[normalized.length - 1] !== '..') { - normalized.pop(); - continue; - } - - normalized.push(parts[i]); - } - - return normalized.join('/'); -}; - -var createPatchedLoad = function(files, originalLoadFn) { - return function (context, moduleName, url) { - url = normalizePath(url); - - if (files.hasOwnProperty(url)) { - url = url + '?' + files[url]; - } else { - console.error('There is no timestamp for ' + url + '!'); - } - - return originalLoadFn.call(this, context, moduleName, url); - }; -}; - -// make it async -karma.loaded = function() {}; - -// patch require.js -requirejs.load = createPatchedLoad(karma.files, requirejs.load); - -})(window.__karma__, window.requirejs); diff --git a/node_modules/karma-requirejs/lib/index.js b/node_modules/karma-requirejs/lib/index.js deleted file mode 100644 index 41cd42cf..00000000 --- a/node_modules/karma-requirejs/lib/index.js +++ /dev/null @@ -1,18 +0,0 @@ -var requirejsPath, createPattern; - -createPattern = function(path) { - return {pattern: path, included: true, served: true, watched: false}; -}; - -requirejsPath = require('path').dirname(require.resolve('requirejs')) + '/../require.js'; - -var initRequireJs = function(files) { - files.unshift(createPattern(__dirname + '/adapter.js')); - files.unshift(createPattern(requirejsPath)); -}; - -initRequireJs.$inject = ['config.files']; - -module.exports = { - 'framework:requirejs': ['factory', initRequireJs] -}; diff --git a/node_modules/karma-requirejs/package.json b/node_modules/karma-requirejs/package.json deleted file mode 100644 index b2508196..00000000 --- a/node_modules/karma-requirejs/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "karma-requirejs", - "version": "0.2.0", - "description": "A Karma plugin. Adapter for RequireJS framework.", - "main": "lib/index.js", - "scripts": { - "test": "grunt test" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-requirejs.git" - }, - "keywords": [ - "karma-plugin", - "karma-adapter", - "requirejs" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": {}, - "devDependencies": { - "grunt": "~0.4.1", - "grunt-contrib-jshint": "~0.6", - "grunt-karma": "~0.3", - "grunt-bump": "~0.0.7", - "grunt-npm": "~0.0.2", - "grunt-auto-release": "~0.0.2" - }, - "peerDependencies": { - "karma": ">=0.9", - "requirejs": "~2.1" - }, - "license": "MIT", - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - }, - { - "name": "Janusz Jablonski", - "email": "januszjablonski.pl@gmail.com" - }, - { - "name": "Sven Ambros", - "email": "thered87@googlemail.com" - } - ], - "readme": "# karma-requirejs [![Build Status](https://travis-ci.org/karma-runner/karma-requirejs.png?branch=master)](https://travis-ci.org/karma-runner/karma-requirejs)\n\n> Adapter for the [RequireJS](http://requirejs.org/) framework.\n\n**This plugin ships with Karma by default, so you don't need to install it.**\n\nCheck out examples on how to configure RequireJS with Karma:\n- Karma's e2e test https://github.com/karma-runner/karma/tree/master/test/e2e/requirejs\n- Karma's docs http://karma-runner.github.io/0.8/plus/RequireJS.html\n- Kim's example project https://github.com/kjbekkelund/karma-requirejs\n\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.io/\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-requirejs/issues" - }, - "homepage": "https://github.com/karma-runner/karma-requirejs", - "_id": "karma-requirejs@0.2.0", - "_from": "karma-requirejs@*" -} diff --git a/node_modules/karma-script-launcher/LICENSE b/node_modules/karma-script-launcher/LICENSE deleted file mode 100644 index d5d49248..00000000 --- a/node_modules/karma-script-launcher/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Vojta Jína and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma-script-launcher/README.md b/node_modules/karma-script-launcher/README.md deleted file mode 100644 index 05d2a35e..00000000 --- a/node_modules/karma-script-launcher/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# karma-scripts-launcher - -> Launcher for a shell script. - -This plugin allows you to use a shell script as a browser launcher. The script has to accept -a single argument - the url that the browser should open. - -## Installation - -**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)** - -The easiest way is to keep `karma-scripts-launcher` as a devDependency in your `package.json`. -```json -{ - "devDependencies": { - "karma": "~0.10", - "karma-scripts-launcher": "~0.1" - } -} -``` - -You can simple do it by: -```bash -npm install karma-scripts-launcher --save-dev -``` - -## Configuration -```js -// karma.conf.js -module.exports = function(config) { - config.set({ - browsers: ['/usr/local/bin/my-custom.sh'], - }); -}; -``` - -You can pass list of browsers as a CLI argument too: -```bash -karma start --browsers /some/custom/script.sh -``` - ----- - -For more information on Karma see the [homepage]. - - -[homepage]: http://karma-runner.github.com diff --git a/node_modules/karma-script-launcher/index.js b/node_modules/karma-script-launcher/index.js deleted file mode 100644 index 08996ae0..00000000 --- a/node_modules/karma-script-launcher/index.js +++ /dev/null @@ -1,17 +0,0 @@ -var ScriptBrowser = function(baseBrowserDecorator, script) { - baseBrowserDecorator(this); - - this.name = script; - - this._getCommand = function() { - return script; - }; -}; - -ScriptBrowser.$inject = ['baseBrowserDecorator', 'name']; - - -// PUBLISH DI MODULE -module.exports = { - 'launcher:Script': ['type', ScriptBrowser] -}; diff --git a/node_modules/karma-script-launcher/package.json b/node_modules/karma-script-launcher/package.json deleted file mode 100644 index 2c9fb0bd..00000000 --- a/node_modules/karma-script-launcher/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "karma-script-launcher", - "version": "0.1.0", - "description": "A Karma plugin. Launcher for shell scripts.", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma-script-launcher.git" - }, - "keywords": [ - "karma-plugin", - "karma-launcher", - "script" - ], - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "dependencies": {}, - "peerDependencies": { - "karma": ">=0.9" - }, - "license": "MIT", - "devDependencies": { - "grunt": "~0.4.1", - "grunt-npm": "~0.0.2", - "grunt-bump": "~0.0.7", - "grunt-auto-release": "~0.0.2" - }, - "contributors": [], - "readme": "# karma-scripts-launcher\n\n> Launcher for a shell script.\n\nThis plugin allows you to use a shell script as a browser launcher. The script has to accept\na single argument - the url that the browser should open.\n\n## Installation\n\n**This plugin ships with Karma by default, so you don't need to install it, it should just work ;-)**\n\nThe easiest way is to keep `karma-scripts-launcher` as a devDependency in your `package.json`.\n```json\n{\n \"devDependencies\": {\n \"karma\": \"~0.10\",\n \"karma-scripts-launcher\": \"~0.1\"\n }\n}\n```\n\nYou can simple do it by:\n```bash\nnpm install karma-scripts-launcher --save-dev\n```\n\n## Configuration\n```js\n// karma.conf.js\nmodule.exports = function(config) {\n config.set({\n browsers: ['/usr/local/bin/my-custom.sh'],\n });\n};\n```\n\nYou can pass list of browsers as a CLI argument too:\n```bash\nkarma start --browsers /some/custom/script.sh\n```\n\n----\n\nFor more information on Karma see the [homepage].\n\n\n[homepage]: http://karma-runner.github.com\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/karma-runner/karma-script-launcher/issues" - }, - "homepage": "https://github.com/karma-runner/karma-script-launcher", - "_id": "karma-script-launcher@0.1.0", - "_from": "karma-script-launcher@*" -} diff --git a/node_modules/karma/CHANGELOG.md b/node_modules/karma/CHANGELOG.md deleted file mode 100644 index c55ba783..00000000 --- a/node_modules/karma/CHANGELOG.md +++ /dev/null @@ -1,626 +0,0 @@ - -### v0.10.6 (2013-11-26) - - -#### Bug Fixes - -* **browser:** reply "start" event ([8c1feae1](http://github.com/karma-runner/karma/commit/8c1feae1c0c60077365ca977fcf96640da449bee)) - - -#### Features - -* **launcher:** send SIGKILL if SIGINT does not kill the browser ([eefcf00d](http://github.com/karma-runner/karma/commit/eefcf00dd869c7fce4da86064c2f063b5db39372)) - - -### v0.10.5 (2013-11-20) - - -#### Bug Fixes - -* **config:** not append empty module if no custom launcher/rep/prep ([c025cdcd](http://github.com/karma-runner/karma/commit/c025cdcdd97b8b9efc0c0dc1086b6c3a31aadebc)) -* **watcher:** allow parentheses in a pattern ([8eaa0562](http://github.com/karma-runner/karma/commit/8eaa0562e07e8ab06fea04f134bdfbdffc2e84f6), closes [#728](http://github.com/karma-runner/karma/issues/728)) - - -#### Features - -* **config:** log if no config file is specified ([27a07912](http://github.com/karma-runner/karma/commit/27a079129f5adcc0478b6006ee69d3323faa4431)) - - -### v0.10.4 (2013-10-25) - - -### v0.10.3 (2013-10-25) - - -#### Bug Fixes - -* **static:** Use full height for the iFrame. Fix based on PR #714. ([ca98f3a4](http://github.com/karma-runner/karma/commit/ca98f3a4eafaf9aa3e84636364d108ffa49bc9e3)) -* **watcher:** - * ignore double "add" events ([8a55901b](http://github.com/karma-runner/karma/commit/8a55901be322586b3a747be7c36b2dd6f6dd9923)) - * improve watching efficiency ([1e4a66d3](http://github.com/karma-runner/karma/commit/1e4a66d33aeaec7900baeee0867679b9cbc3e535), closes [#616](http://github.com/karma-runner/karma/issues/616)) - - -#### Features - -* **watcher:** ignore initial "add" events ([7ab9e7bd](http://github.com/karma-runner/karma/commit/7ab9e7bd442ac4fdad6eadb37dbb69f1837c6434)) - - -### v0.10.2 (2013-08-21) - - -#### Bug Fixes - -* don't mark a browser captured if already being killed/timeouted ([21230979](http://github.com/karma-runner/karma/commit/212309795861cf599dbcc0ed60fff612ccf25cf5), closes [#88](http://github.com/karma-runner/karma/issues/88)) - - -#### Features - -* sync page unload (disconnect) ([ac9b3f01](http://github.com/karma-runner/karma/commit/ac9b3f01e88ce2cf91fc86aca9cecfdb8177a6fa)) -* buffer result messages when polling ([c4ad6970](http://github.com/karma-runner/karma/commit/c4ad69709103110a066ae1d9652af69e42434c6b)) -* allow browser to reconnect during the test run ([cbe2851b](http://github.com/karma-runner/karma/commit/cbe2851baa55312f00be420e0345283b33326266), closes [#82](http://github.com/karma-runner/karma/issues/82), [#590](http://github.com/karma-runner/karma/issues/590)) - - -### v0.10.1 (2013-08-06) - - -#### Bug Fixes - -* **cli:** Always pass an instance of fs to processArgs. ([06532b70](http://github.com/karma-runner/karma/commit/06532b7042371f270c227a1a7f859f2dab5afac1), closes [#677](http://github.com/karma-runner/karma/issues/677)) -* **init:** set default filename ([34d49b13](http://github.com/karma-runner/karma/commit/34d49b138f3bee8f17e1e9e343012d82887f906b), closes [#680](http://github.com/karma-runner/karma/issues/680), [#681](http://github.com/karma-runner/karma/issues/681)) - - -## v0.10.0 (2013-08-06) - - -### v0.9.8 (2013-08-05) - - -#### Bug Fixes - -* **init:** install plugin as dev dependency ([46b7a402](http://github.com/karma-runner/karma/commit/46b7a402fb8d700b10e2d72908c309d27212b5a0)) -* **runner:** do not confuse client args with the config file ([6f158aba](http://github.com/karma-runner/karma/commit/6f158abaf923dad6878a64da2d8a3c2c56ae604f)) - - -#### Features - -* **config:** default config can be karma.conf.js or karma.conf.coffee ([d4a06f29](http://github.com/karma-runner/karma/commit/d4a06f296c4d805f2dccd85b4898766593af4d66)) -* **runner:** - * support config files ([449e4a1a](http://github.com/karma-runner/karma/commit/449e4a1ad8b8543f84f1953c875cfbdf5692caa7), closes [#625](http://github.com/karma-runner/karma/issues/625)) - * add --no-refresh to disable re-globbing ([b9c670ac](http://github.com/karma-runner/karma/commit/b9c670accbde8d027bdc3e09a4080c546b05853c)) - - -### v0.9.7 (2013-07-31) - - -#### Bug Fixes - -* **init:** trim the inputs ([b72355cb](http://github.com/karma-runner/karma/commit/b72355cbeadc8e907e48bbd7d9a11e6de17343f7), closes [#663](http://github.com/karma-runner/karma/issues/663)) -* **web-server:** correct urlRegex in custom handlers ([a641c2c1](http://github.com/karma-runner/karma/commit/a641c2c1dd0f5f1e0045e7cff1516d2820a8204e)) - - -#### Features - -* basic bash/zsh completion ([9dc1cf6a](http://github.com/karma-runner/karma/commit/9dc1cf6a6e095653fed6c79c4896c71af8af1953)) -* **runner:** allow passing changed/added/removed files ([b598106d](http://github.com/karma-runner/karma/commit/b598106de1295f3e1e58338a8eca2b60f99175c3)) -* **watcher:** make the batching delay configurable ([fa139312](http://github.com/karma-runner/karma/commit/fa139312a0fff981f11182c17ba6979dccca1105)) - - -### v0.9.6 (2013-07-28) - - -#### Features - -* pass command line opts through to browser ([00d63d0b](http://github.com/karma-runner/karma/commit/00d63d0b965a998b04d1917d4c4421abc24cec18)) -* **web-server:** compress responses (gzip/deflate) ([8e8a2d44](http://github.com/karma-runner/karma/commit/8e8a2d4418e7abef7dca42e58bf09c95b07687b2)) - - -#### Breaking Changes - -* `runnerPort` is merged with `port` -if you are using `karma run` with custom `--runer-port`, please change that to `--port`. - ([ca4c4d88](http://github.com/karma-runner/karma/commit/ca4c4d88b9a4a1992f7975aa32b37a008394847b)) - - -### v0.9.5 (2013-07-21) - - -#### Bug Fixes - -* detect a full page reload, show error and recover ([15d80f47](http://github.com/karma-runner/karma/commit/15d80f47a227839e9b0d54aeddf49b9aa9afe8aa), closes [#27](http://github.com/karma-runner/karma/issues/27)) -* better serialization in dump/console.log ([fd46365d](http://github.com/karma-runner/karma/commit/fd46365d1fd3a9bea15c04abeb7df33a3a2d96a4), closes [#640](http://github.com/karma-runner/karma/issues/640)) -* browsers_change event always has collection as arg ([42bf787f](http://github.com/karma-runner/karma/commit/42bf787f87304e6be23dd3dac893b3c3f77d6764)) -* **init:** generate config with the new syntax ([6b27fee5](http://github.com/karma-runner/karma/commit/6b27fee5a43a7d02e706355f62fe5105b4966c43)) -* **reporter:** prevent throwing exception when null is sent to formatter ([3b49c385](http://github.com/karma-runner/karma/commit/3b49c385fcc8ef96e72be390df058bd278b40c17)) -* **watcher:** ignore fs.stat errors ([74ccc9a8](http://github.com/karma-runner/karma/commit/74ccc9a8017f869bd7bbbf8831415964110a7073)) - - -#### Features - -* capture window.alert ([284c4f5c](http://github.com/karma-runner/karma/commit/284c4f5c9c481759fe564627a00d72ba5c54e433)) -* ship html2js preprocessor as a default plugin ([37ecf416](http://github.com/karma-runner/karma/commit/37ecf41600a9b255ab3d57327cc83d64751642f5)) -* fail if zero tests executed ([5670415e](http://github.com/karma-runner/karma/commit/5670415ecdc5e54902b479c78df5c3c422855e5c), closes [#468](http://github.com/karma-runner/karma/issues/468)) -* **launcher:** normalize quoted paths ([f2155e0c](http://github.com/karma-runner/karma/commit/f2155e0c3305538c0fb95791e56f34743977a865), closes [#491](http://github.com/karma-runner/karma/issues/491)) -* **web-server:** serve css files ([4e305545](http://github.com/karma-runner/karma/commit/4e305545ddf2726c1fe65c46efd5e7c1045ac041), closes [#431](http://github.com/karma-runner/karma/issues/431)) - - -### v0.9.4 (2013-06-28) - - -#### Bug Fixes - -* **config:** - * make the config changes backwards compatible ([593ad853](https://github.com/karma-runner/karma/commit/593ad853c330a7856f2112db2bfb288f67948fa6)) - * better errors if file invalid or does not exist ([74b533be](https://github.com/karma-runner/karma/commit/74b533beb34c115f5080d412a03573d269d540aa)) - * allow parsing the config multiple times ([78a7094e](https://github.com/karma-runner/karma/commit/78a7094e0f262c431e904f99cf356be53eee3510)) -* **launcher:** better errors when loading launchers ([504e848c](https://github.com/karma-runner/karma/commit/504e848cf66b065380fa72e07f5337ae2d6e35b5)) -* **preprocessor:** - * do not show duplicate warnings ([47c641f7](https://github.com/karma-runner/karma/commit/47c641f7560d28e0d9eac7ae010566d296d5b628)) - * better errors when loading preprocessors ([3390a00b](https://github.com/karma-runner/karma/commit/3390a00b49c513a6da60f48044462118436130f8)) -* **reporter:** better errors when loading reporters ([c645c060](https://github.com/karma-runner/karma/commit/c645c060c4f381902c2005eefe5b3a7bfa63cdcc)) - - -#### Features - -* **config:** pass the config object rather than a wrapper ([d2a3c854](https://github.com/karma-runner/karma/commit/d2a3c8546dc4b10bb9194047a1c11963639f3730)) - - -#### Breaking Changes - -* please update your karma.conf.js as follows ([d2a3c854](https://github.com/karma-runner/karma/commit/d2a3c8546dc4b10bb9194047a1c11963639f3730)): - -```javascript -// before: -module.exports = function(karma) { - karma.configure({port: 123}); - karma.defineLauncher('x', 'Chrome', { - flags: ['--disable-web-security'] - }); - karma.definePreprocessor('y', 'coffee', { - bare: false - }); - karma.defineReporter('z', 'coverage', { - type: 'html' - }); -}; - -// after: -module.exports = function(config) { - config.set({ - port: 123, - customLaunchers: { - 'x': { - base: 'Chrome', - flags: ['--disable-web-security'] - } - }, - customPreprocessors: { - 'y': { - base: 'coffee', - bare: false - } - }, - customReporters: { - 'z': { - base: 'coverage', - type: 'html' - } - } - }); -}; -``` - - -### v0.9.3 (2013-06-16) - - -#### Bug Fixes - -* capturing console.log on IE ([fa4b686a](https://github.com/karma-runner/karma/commit/fa4b686a81ad826f256a4ca63c772af7ad6e411e), closes [#329](https://github.com/karma-runner/karma/issues/329)) -* **config:** fix the warning when using old syntax ([5e55d797](https://github.com/karma-runner/karma/commit/5e55d797f7544a45c3042e301bbf71e8b830daf3)) -* **init:** generate correct indentation ([5fc17957](https://github.com/karma-runner/karma/commit/5fc17957be761c06f6ae120c5d3ba800dba8d3a4)) -* **launcher:** - * ignore exit code when killing/timeouting ([1029bf2d](https://github.com/karma-runner/karma/commit/1029bf2d7d3d22986aa41439d2ce4115770f4dbd), closes [#444](https://github.com/karma-runner/karma/issues/444)) - * handle ENOENT error, do not retry ([7d790b29](https://github.com/karma-runner/karma/commit/7d790b29c09c1f3784fe648b7d5ed16add10b4ca), closes [#452](https://github.com/karma-runner/karma/issues/452)) -* **logger:** configure the logger as soon as possible ([0607d67c](https://github.com/karma-runner/karma/commit/0607d67c15eab58ce83cce14ada70a1e2a9f17e9)) -* **preprocessor:** use graceful-fs to prevent EACCESS errors ([279bcab5](https://github.com/karma-runner/karma/commit/279bcab54019a0f0af72c7c08017cf4cdefebe46), closes [#566](https://github.com/karma-runner/karma/issues/566)) -* **watcher:** watch files that match watched directory ([39401175](https://github.com/karma-runner/karma/commit/394011753b918b8db807f31da9f5c316e296cf32), closes [#521](https://github.com/karma-runner/karma/issues/521)) - - -#### Features - -* simplify loading plugins using patterns like `karma-*` ([405a5a62](https://github.com/karma-runner/karma/commit/405a5a62d2ecc47a46b2ff069bfeb624f0b06982)) -* **client:** capture all `console.*` log methods ([683e6dcb](https://github.com/karma-runner/karma/commit/683e6dcb9132de3caee39c809b5b58efe8236564)) -* **config:** - * make socket.io transports configurable ([bbd5eb86](https://github.com/karma-runner/karma/commit/bbd5eb8688b2bc1e3dd04910aa68fd19c5036b31)) - * allow configurable launchers, preprocessors, reporters ([76bdac16](https://github.com/karma-runner/karma/commit/76bdac1681f012749648f5a76b4a9d96c7a5ef20), closes [#317](https://github.com/karma-runner/karma/issues/317)) - * add warning if old constants are used ([7233c5fb](https://github.com/karma-runner/karma/commit/7233c5fb9e1c105032000bbcb9afaddf72ccbc97)) - * require config as a regular module ([a37fd6f7](https://github.com/karma-runner/karma/commit/a37fd6f7d28036b8da5fe98634cf711cebafc1ff), closes [#304](https://github.com/karma-runner/karma/issues/304)) -* **helper:** improve useragent detection ([eb58768e](https://github.com/karma-runner/karma/commit/eb58768e32baf13b45d9649743d7ef45798ffb27)) -* **init:** - * generate coffee config files ([d2173717](https://github.com/karma-runner/karma/commit/d21737176c1d866a11249d626a75440b398171ce)) - * improve the questions a bit ([baecadb2](https://github.com/karma-runner/karma/commit/baecadb2f1a8f31c233edacafb1f8a4b736ea243)) -* **proxy:** add https proxy support ([be878dc5](https://github.com/karma-runner/karma/commit/be878dc545a0dd266d5686387c976ce70f1a095c)) - - -#### Breaking Changes - -* Update your karma.conf.js to export a config function ([a37fd6f7](https://github.com/karma-runner/karma/commit/a37fd6f7d28036b8da5fe98634cf711cebafc1ff)): - -```javascript -module.exports = function(karma) { - karma.configure({ - autoWatch: true, - // ... - }); -}; -``` - - -### v0.9.2 (2013-04-16) - - -#### Bug Fixes - -* better error reporting when loading plugins ([d9078a8e](https://github.com/karma-runner/karma/commit/d9078a8eca41df15f26b53e2375f722a48d0992d)) -* **config:** - * Separate ENOENT error handler from others ([e49dabe7](https://github.com/karma-runner/karma/commit/e49dabe783d6cfb2ee97b70ac01953e82f70f831)) - * ensure basePath is always resolved ([2e5c5aaa](https://github.com/karma-runner/karma/commit/2e5c5aaaddc4ad4e1ee9c8fa0388d3916827f403)) - - -#### Features - -* allow inlined plugins ([3034bcf9](https://github.com/karma-runner/karma/commit/3034bcf9b074b693afab9c62856346d6f305d0c0)) -* **debug:** show skipped specs and failure details in the console ([42ab936b](https://github.com/karma-runner/karma/commit/42ab936b254983faa8ab0ee76a6278fb3aff7fa2)) - - -### v0.9.1 (2013-04-04) - - -#### Bug Fixes - -* **init:** to not give false warning about missing requirejs ([562607a1](https://github.com/karma-runner/karma/commit/562607a16221b256c6e92ad2029154aac88eec8d)) - - -#### Features - -* ship coffee-preprocessor and requirejs as default plugins ([f34e30db](https://github.com/karma-runner/karma/commit/f34e30db4d25d484a30d12e3cb1c41069c0b263a)) - - -## v0.9.0 (2013-04-03) - - -#### Bug Fixes - -* global error handler should propagate errors ([dec0c196](https://github.com/karma-runner/karma/commit/dec0c19651c251dcbc16c44a57775bcb37f78cf1), closes [#368](https://github.com/karma-runner/karma/issues/368)) -* **config:** - * Check if configFilePath is a string. Fixes #447. ([98724b6e](https://github.com/karma-runner/karma/commit/98724b6ef5a6ba60d487e7b774056832c6ca9d8c)) - * do not change urlRoot even if proxied ([8c138b50](https://github.com/karma-runner/karma/commit/8c138b504046a3aeb230b71e1049aa60ee46905d)) -* **coverage:** always send a result object ([62c3c679](https://github.com/karma-runner/karma/commit/62c3c6790659f8f82f8a2ca5646aa424eeb28842), closes [#365](https://github.com/karma-runner/karma/issues/365)) -* **init:** - * generate plugins and frameworks config ([17798d55](https://github.com/karma-runner/karma/commit/17798d55988d61070f2b9f59574217208f2b497e)) - * fix for failing "testacular init" on Windows ([0b5b3853](https://github.com/karma-runner/karma/commit/0b5b385383f13ac8f29fa6e591a8634eefa04ab7)) -* **preprocessor:** resolve relative patterns to basePath ([c608a9e5](https://github.com/karma-runner/karma/commit/c608a9e5a34a49da2971add8759a9422b74fa6fd), closes [#382](https://github.com/karma-runner/karma/issues/382)) -* **runner:** send exit code as string ([ca75aafd](https://github.com/karma-runner/karma/commit/ca75aafdf6b7b425ee151c2ae4ede37933befe1f), closes [#403](https://github.com/karma-runner/karma/issues/403)) - - -#### Features - -* display the version when starting ([39617395](https://github.com/karma-runner/karma/commit/396173952addce3f6e904310686a42b102aa53f8), closes [#391](https://github.com/karma-runner/karma/issues/391)) -* allow multiple preprocessors ([1d17c1aa](https://github.com/karma-runner/karma/commit/1d17c1aacf607d6c4269f05df97d024bc9ca994e)) -* allow plugins ([125ab4f8](https://github.com/karma-runner/karma/commit/125ab4f88a7cf49fd7df32264a9847847e2326ca)) -* **config:** - * always ignore the config file itself ([103bc0f8](https://github.com/karma-runner/karma/commit/103bc0f878a8870770c8a8afce0a3fbf8a516ea7)) - * normalize string preprocessors into an array ([4dde1608](https://github.com/karma-runner/karma/commit/4dde16087d0a704a47528d44e23ace0c536d8c72)) -* **web-server:** allow custom file handlers and mime types ([2df88287](https://github.com/karma-runner/karma/commit/2df8828742041fd09c0b45d6a62ebd7552116589)) - - -#### Breaking Changes - -* reporters, launchers, preprocessors, adapters are separate plugins now, in order to use them, you need to install the npm package (probably add it as a `devDependency` into your `package.json`) and load in the `karma.conf.js` with `plugins = ['karma-jasmine', ...]`. Karma ships with couple of default plugins (karma-jasmine, karma-chrome-launcher, karma-phantomjs-launcher). - -* frameworks (such as jasmine, mocha, qunit) are configured using `frameworks = ['jasmine'];` instead of prepending `JASMINE_ADAPTER` into files. - - - -## v0.8.0 (2013-03-18) - - -#### Breaking Changes - -* rename the project to "Karma": -- whenever you call the "testacular" binary, change it to "karma", eg. `testacular start` becomes `karma start`. -- if you rely on default name of the config file, change it to `karma.conf.js`. -- if you access `__testacular__` object in the client code, change it to `__karma__`, eg. `window.__testacular__.files` becomes `window.__karma__.files`. ([026a20f7](https://github.com/karma-runner/karma/commit/026a20f7b467eb3b39c68ed509acc06e5dad58e6)) - - -### v0.6.1 (2013-03-18) - - -#### Bug Fixes - -* **config:** do not change urlRoot even if proxied ([1be1ae1d](https://github.com/karma-runner/karma/commit/1be1ae1dc7ff7314f4ac2854815cb39d31362f14)) -* **coverage:** always send a result object ([2d210aa6](https://github.com/karma-runner/karma/commit/2d210aa6697991f2eba05de58a696c5210485c88), closes [#365](https://github.com/karma-runner/karma/issues/365)) -* **reporter.teamcity:** report spec names and proper browser name ([c8f6f5ea](https://github.com/karma-runner/karma/commit/c8f6f5ea0c5c40d37b511d51b49bd22c9da5ea86)) - - -## v0.6.0 (2013-02-22) - - -### v0.5.11 (2013-02-21) - - -#### Bug Fixes - -* **adapter.requirejs:** do not configure baseUrl automatically ([63f3f409](https://github.com/karma-runner/karma/commit/63f3f409ae85a5137396a7ed6537bedfe4437cb3), closes [#291](https://github.com/karma-runner/karma/issues/291)) -* **init:** add missing browsers (Opera, IE) ([f39e5645](https://github.com/karma-runner/karma/commit/f39e5645ec561c2681d907f7c1611f01911ee8fd)) -* **reporter.junit:** Add browser log output to JUnit.xml ([f108799a](https://github.com/karma-runner/karma/commit/f108799a4d8fd95b8c0250ee83c23ada25d026b9), closes [#302](https://github.com/karma-runner/karma/issues/302)) - - -#### Features - -* add Teamcity reporter ([03e700ae](https://github.com/karma-runner/karma/commit/03e700ae2234ca7ddb8f9235343e3b0c80868bbd)) -* **adapter.jasmine:** remove only last failed specs anti-feature ([435bf72c](https://github.com/karma-runner/karma/commit/435bf72cb12112462940c8114fbaa19f9de38531), closes [#148](https://github.com/karma-runner/karma/issues/148)) -* **config:** allow empty config file when called programmatically ([f3d77424](https://github.com/karma-runner/karma/commit/f3d77424009f621e1fb9d60eeec7f052ebb3c585), closes [#358](https://github.com/karma-runner/karma/issues/358)) - - -### v0.5.10 (2013-02-14) - - -#### Bug Fixes - -* **init:** fix the logger configuration ([481dc3fd](https://github.com/karma-runner/karma/commit/481dc3fd75f45a0efa8aabdb1c71e8234b9e8a06), closes [#340](https://github.com/karma-runner/karma/issues/340)) -* **proxy:** fix crashing proxy when browser hangs connection ([1c78a01a](https://github.com/karma-runner/karma/commit/1c78a01a19411accb86f0bde9e040e5088752575)) - - -#### Features - -* set urlRoot to /__karma__/ when proxying the root ([8b4fd64d](https://github.com/karma-runner/karma/commit/8b4fd64df6b7d07b5479e43dcd8cd2aa5e1efc9c)) -* **adapter.requirejs:** normalize paths before appending timestamp ([94889e7d](https://github.com/karma-runner/karma/commit/94889e7d2de701c67a2612e3fc6a51bfae891d36)) -* update dependencies to the latest ([93f96278](https://github.com/karma-runner/karma/commit/93f9627817f2d5d9446de9935930ca85cfa7df7f), [e34d8834](https://github.com/karma-runner/karma/commit/e34d8834d69ec4e022fcd6e1be4055add96d693c)) - - - -### v0.5.9 (2013-02-06) - - -#### Bug Fixes - -* **adapter.requirejs:** show error if no timestamp defined for a file ([59dbdbd1](https://github.com/karma-runner/karma/commit/59dbdbd136baa87467b9b9a4cb6ce226ae87bbef)) -* **init:** fix logger configuration ([557922d7](https://github.com/karma-runner/karma/commit/557922d71941e0929f9cdc0d3794424a1f27b311)) -* **reporter:** remove newline from base reporter browser dump ([dfae18b6](https://github.com/karma-runner/karma/commit/dfae18b63b413a1e6240d00b9dc0521ac0386ec5), closes [#297](https://github.com/karma-runner/karma/issues/297)) -* **reporter.dots:** only add newline to message when needed ([dbe1155c](https://github.com/karma-runner/karma/commit/dbe1155cb57fc4caa792f83f45288238db0fc7e0) - -#### Features - -* add "debug" button to easily open debugging window ([da85aab9](https://github.com/karma-runner/karma/commit/da85aab927edd1614e4e05b136dee834344aa3cb)) -* **config:** support running on a custom hostname ([b8c5fe85](https://github.com/karma-runner/karma/commit/b8c5fe8533b13fd59cbf48972d2021069a84ae5b)) -* **reporter.junit:** add a 'skipped' tag for skipped testcases ([6286406e](https://github.com/karma-runner/karma/commit/6286406e0a36a61125ea16d6f49be07030164cb0), closes [#321](https://github.com/karma-runner/karma/issues/321)) - - -### v0.5.8 -* Fix #283 -* Suppress global leak for istanbul -* Fix growl reporter to work with `testacular run` -* Upgrade jasmine to 1.3.1 -* Fix file sorting -* Fix #265 -* Support for more mime-types on served static files -* Fix opening Chrome on Windows -* Upgrade growly to 1.1.0 - -### v0.5.7 -* Support code coverage for qunit. -* Rename port-runner option in cli to runner-port -* Fix proxy handler (when no proxy defined) -* Fix #65 - -### v0.5.6 -* Growl reporter ! -* Batch changes (eg. `git checkout` causes only single run now) -* Handle uncaught errors and disconnect all browsers -* Global binary prefers local versions - -### v0.5.5 -* Add QUnit adapter -* Report console.log() - -### v0.5.4 -* Fix PhantomJS launcher -* Fix html2js preprocessor -* NG scenario adapter: show html output - -### v0.5.3 -* Add code coverage ! - -### v0.5.2 -* Init: ask about using Require.js - -### v0.5.1 -* Support for Require.js -* Fix testacular init basePath - -## v0.5.0 -* Add preprocessor for LiveScript -* Fix JUnit reporter -* Enable process global in config file -* Add OS name in the browser name -* NG scenario adapter: hide other outputs to make it faster -* Allow config to be written in CoffeeScript -* Allow espaced characters in served urls - -## v0.4.0 (stable) - -### v0.3.12 -* Allow calling run() pragmatically from JS - -### v0.3.11 -* Fix runner to wait for stdout, stderr -* Make routing proxy always changeOrigin - -### v0.3.10 -* Fix angular-scenario adapter + junit reporter -* Use flash socket if web socket not available - -### v0.3.9 -* Retry starting a browser if it does not capture -* Update mocha to 1.5.0 -* Handle mocha's xit - -### v0.3.8 -* Kill browsers that don't capture in captureTimeout ms -* Abort build if any browser fails to capture -* Allow multiple profiles of Firefox - -### v0.3.7 -* Remove Travis hack -* Fix Safari launcher - -### v0.3.6 -* Remove custom launcher (constructor) -* Launcher - use random id to allow multiple instances of the same browser -* Fix Firefox launcher (creating profile) -* Fix killing browsers on Linux and Windows - -### v0.3.5 -* Fix opera launcher to create new prefs with disabling all pop-ups - -### v0.3.4 -* Change "reporter" config to "reporters" -* Allow multiple reporters -* Fix angular-scenario adapter to report proper description -* Add JUnit xml reporter -* Fix loading files from multiple drives on Windows -* Fix angular-scenario adapter to report total number of tests - -### v0.3.3 -* Allow proxying files, not only directories - -### v0.3.2 -* Disable autoWatch if singleRun -* Add custom script browser launcher -* Fix cleaning temp folders - -### v0.3.1 -* Run tests on start (if watching enabled) -* Add launcher for IE8, IE9 - -## v0.3.0 -* Change browser binaries on linux to relative -* Add report-slower-than to CLI options -* Fix PhantomJS binary on Travis CI - -## v0.2.0 (stable) - -### v0.1.3 -* Launch Canary with crankshaft disabled -* Make the captured page nicer - -### v0.1.2 -* Fix jasmine memory leaks -* support __filename and __dirname in config files - -### v0.1.1 -* Report slow tests (add `reportSlowerThan` config option) -* Report time in minutes if it's over 60 seconds -* Mocha adapter: add ability to fail during beforeEach/afterEach hooks -* Mocha adapter: add dump() -* NG scenario adapter: failure includes step name -* Redirect /urlRoot to /urlRoot/ -* Fix serving with urlRoot - -## v0.1.0 -* Adapter for AngularJS scenario runner -* Allow serving Testacular from a subpath -* Fix race condition in testacular run -* Make testacular one binary (remove `testacular-run`, use `testacular run`) -* Add support for proxies -* Init script for generating config files (`testacular init`) -* Start Firefox without custom profile if it fails -* Preserve order of watched paths for easier debugging -* Change default port to 9876 -* Require node v0.8.4+ - -### v0.0.17 -* Fix race condition in manually triggered run -* Fix autoWatch config - -### v0.0.16 -* Mocha adapter -* Fix watching/resolving on Windows -* Allow glob patterns -* Watch new files -* Watch removed files -* Remove unused config (autoWatchInterval) - -### v0.0.15 -* Remove absolute paths from urls (fixes Windows issue with C:\\) -* Add browser launcher for PhantomJS -* Fix some more windows issues - -### v0.0.14 -* Allow require() inside config file -* Allow custom browser launcher -* Add browser launcher for Opera, Safari -* Ignore signals on windows (not supported yet) - -### v0.0.13 -* Single run mode (capture browsers, run tests, exit) -* Start browser automatically (chrome, canary, firefox) -* Allow loading external files (urls) - -### v0.0.12 -* Allow console in config -* Warning if pattern does not match any file - -### v0.0.11 -* Add timing (total / net - per specs) -* Dots reporter - wrap at 80 - -### v0.0.10 -* Add DOTS reporter -* Add no-colors option for reporters -* Fix web server to expose only specified files - -### v0.0.9 -* Proper exit code for runner -* Dynamic port asigning (if port already in use) -* Add log-leve, log-colors cli arguments + better --help -* Fix some IE errors (indexOf, forEach fallbacks) - -### v0.0.8 -* Allow overriding configuration by cli arguments (+ --version, --help) -* Persuade IE8 to not cache context.html -* Exit runner if no captured browser -* Fix delayed execution (streaming to runner) -* Complete run if browser disconnects -* Ignore results from previous run (after server reconnecting) -* Server disconnects - cancel execution, clear browser info - -### v0.0.7 -* Rename to Testacular - -### v0.0.6 -* Better debug mode (no caching, no timestamps) -* Make dump() a bit better -* Disconnect browsers on SIGTERM (kill, killall default) - -### v0.0.5 -* Fix memory (some :-D) leaks -* Add dump support -* Add runner.html - -### v0.0.4 -* Progress bar reporting -* Improve error formatting -* Add Jasmine lib (with iit, ddescribe) -* Reconnect client each 2sec, remove exponential growing - -### v0.0.3 -* Jasmine adapter: ignore last failed filter in exclusive mode -* Jasmine adapter: add build (no global space pollution) - -### 0.0.2 -* Run only last failed tests (jasmine adapter) - -### 0.0.1 -* Initial version with only very basic features diff --git a/node_modules/karma/LICENSE b/node_modules/karma/LICENSE deleted file mode 100644 index cbdecd3a..00000000 --- a/node_modules/karma/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2011-2013 Vojta Jína and contributors. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/README.md b/node_modules/karma/README.md deleted file mode 100644 index 91df39d8..00000000 --- a/node_modules/karma/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# Karma [![Build Status](https://secure.travis-ci.org/karma-runner/karma.png?branch=master)](http://travis-ci.org/karma-runner/karma) - -A simple tool that allows you to execute JavaScript code in multiple -_real_ browsers, powered by [Node.js] and [Socket.io]. - -> The main purpose of Karma is to make your TDD development easy, -> fast, and fun. - -## When should I use Karma? - -* You want to test code in *real* browsers. -* You want to test code in multiple browsers (desktop, mobile, - tablets, etc.). -* You want to execute your tests locally during development. -* You want to execute your tests on a continuous integration server. -* You want to execute your tests on every save. -* You love your terminal. -* You don't want your (testing) life to suck. -* You want to use [Istanbul] to automagically generate coverage - reports. -* You want to use [RequireJS] for your source files. - - -## But I still want to use \_insert testing library\_ - -Karma is not a testing framework, neither an assertion library, -so for that you can use pretty much anything you like. Right now out -of the box there is support for - -* [Mocha] -* [Jasmine] -* [QUnit] -* \_anything else\_ Write your own adapter. It's not that hard. And we - are here to help. - - -## Which Browsers can I use? - -All the major browsers are supported, if you want to know more see the -[Browsers] page. - - -## I want to use it. Where do I sign? - -You don't need to sign anything but here are some resources to help -you to get started. And if you need even more infos have a look at our -great [website]. - -### Obligatory Screencast. - -Every serious project has a screencast, so here is ours. Just click -[here] and let the show begin. - -### NPM Installation. - -If you have [Node.js] installed, it's as simple as - -```bash -$ npm install -g karma -``` - -This will give you the latest stable version available on npm. If you -want to live life on the edge you can do so by - -```bash -$ npm install -g karma@canary -``` - -The curious can have a look at the documentation articles for -[Getting Started] and [Versioning]. - -### Using it. - -Go into your project and create a Karma configuration. That is -just a simple JavaScript or CoffeeScript file that tells Karma -where all the awesomeness of your project are. - -You can find a simple example in -[test/client/karma.conf.js](https://github.com/karma-runner/karma/blob/master/test/client/karma.conf.js) -which contains most of the options. - -To create your own from scratch there is the `init` command, which -will be named `karma.conf.js` by default: - -```bash -$ karma init -``` -This will ask you many questions and if you answered them all correct -you will be allowed to use Karma. - -For more information on the configuration options see -[Configuration File Overview]. - -Now that you have your configuration all that is left to do is to -start Karma: -```bash -$ karma start -``` - -If you want to run tests manually (without auto watching file changes), you can: -```bash -$ karma run -``` -But only if you have started the Karma server before. - - -## Why did you create this? - -Throughout the development of [AngularJS], we've been using [JSTD] for -testing. I really think that JSTD is a great idea. Unfortunately, we -had many problems with JSTD, so we decided to write our own test -runner based on the same idea. We wanted a simple tool just for -executing JavaScript tests that is both stable and fast. That's why we -use the awesome [Socket.io] library and [Node.js]. - - -## I still don't get it. Where can I get help? - -* [Docs] -* [Mailing List] -* [Issuetracker] -* [@JsKarma] on Twitter - -## This is so great. I want to help. - -See -[Contributing.md](https://github.com/karma-runner/karma/blob/master/CONTRIBUTING.md) -or the [docs] for more information. - - -## My boss wants a license. So where is it? - -### The MIT License - -> Copyright (C) 2011-2013 Vojta Jína. -> -> Permission is hereby granted, free of charge, to any person -> obtaining a copy of this software and associated documentation files -> (the "Software"), to deal in the Software without restriction, -> including without limitation the rights to use, copy, modify, merge, -> publish, distribute, sublicense, and/or sell copies of the Software, -> and to permit persons to whom the Software is furnished to do so, -> subject to the following conditions: -> -> The above copyright notice and this permission notice shall be -> included in all copies or substantial portions of the Software. -> -> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS -> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -> ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -> SOFTWARE. - - - -[AngularJS]: http://angularjs.org/ -[JSTD]: http://code.google.com/p/js-test-driver/ -[Socket.io]: http://socket.io/ -[Node.js]: http://nodejs.org/ -[Jasmine]: http://pivotal.github.io/jasmine/ -[Mocha]: http://visionmedia.github.io/mocha/ -[QUnit]: http://qunitjs.com/ -[here]: http://www.youtube.com/watch?v=MVw8N3hTfCI -[Mailing List]: https://groups.google.com/forum/#!forum/karma-users -[Issuetracker]: https://github.com/karma-runner/karma/issues -[@JsKarma]: http://twitter.com/JsKarma -[RequireJS]: http://requirejs.org/ -[Istanbul]: https://github.com/gotwarlost/istanbul - -[Browsers]: http://karma-runner.github.io/0.8/config/browsers.html -[Versioning]: http://karma-runner.github.io/0.8/about/versioning.html -[Configuration File Overview]: http://karma-runner.github.io/0.8/config/configuration-file.html -[docs]: http://karma-runner.github.io -[Docs]: http://karma-runner.github.io -[website]: http://karma-runner.github.io diff --git a/node_modules/karma/bin/karma b/node_modules/karma/bin/karma deleted file mode 100755 index 5c55decf..00000000 --- a/node_modules/karma/bin/karma +++ /dev/null @@ -1,30 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); - -// Try to find a local install -var dir = path.resolve(process.cwd(), 'node_modules', 'karma', 'lib'); - -// Check if the local install exists else we use the install we are in -if (!fs.existsSync(dir)) { - dir = path.join('..', 'lib'); -} - -var cli = require(path.join(dir, 'cli')); -var config = cli.process(); - -switch (config.cmd) { - case 'start': - require(path.join(dir, 'server')).start(config); - break; - case 'run': - require(path.join(dir, 'runner')).run(config); - break; - case 'init': - require(path.join(dir, 'init')).init(config); - break; - case 'completion': - require(path.join(dir, 'completion')).completion(config); - break; -} diff --git a/node_modules/karma/config.tpl.coffee b/node_modules/karma/config.tpl.coffee deleted file mode 100644 index 9004ed97..00000000 --- a/node_modules/karma/config.tpl.coffee +++ /dev/null @@ -1,55 +0,0 @@ -# Karma configuration -# Generated on %DATE% - -module.exports = (config) -> - config.set - - # base path, that will be used to resolve all patterns, eg. files, exclude - basePath: '%BASE_PATH%' - - # frameworks to use - frameworks: [%FRAMEWORKS%] - - # list of files / patterns to load in the browser - files: [ - %FILES% - ] - - # list of files to exclude - exclude: [ - %EXCLUDE% - ] - - # test results reporter to use - # possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' - reporters: ['progress'] - - # web server port - port: 9876 - - # enable / disable colors in the output (reporters and logs) - colors: true - - # level of logging - # possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO - - # enable / disable watching file and executing tests whenever any file changes - autoWatch: %AUTO_WATCH% - - # Start these browsers, currently available: - # - Chrome - # - ChromeCanary - # - Firefox - # - Opera (has to be installed with `npm install karma-opera-launcher`) - # - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) - # - PhantomJS - # - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) - browsers: [%BROWSERS%] - - # If browser does not capture in given timeout [ms], kill it - captureTimeout: 60000 - - # Continuous Integration mode - # if true, it capture browsers, run tests and exit - singleRun: false diff --git a/node_modules/karma/config.tpl.js b/node_modules/karma/config.tpl.js deleted file mode 100644 index 080bdbcf..00000000 --- a/node_modules/karma/config.tpl.js +++ /dev/null @@ -1,68 +0,0 @@ -// Karma configuration -// Generated on %DATE% - -module.exports = function(config) { - config.set({ - - // base path, that will be used to resolve files and exclude - basePath: '%BASE_PATH%', - - - // frameworks to use - frameworks: [%FRAMEWORKS%], - - - // list of files / patterns to load in the browser - files: [ - %FILES% - ], - - - // list of files to exclude - exclude: [ - %EXCLUDE% - ], - - - // test results reporter to use - // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' - reporters: ['progress'], - - - // web server port - port: 9876, - - - // enable / disable colors in the output (reporters and logs) - colors: true, - - - // level of logging - // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG - logLevel: config.LOG_INFO, - - - // enable / disable watching file and executing tests whenever any file changes - autoWatch: %AUTO_WATCH%, - - - // Start these browsers, currently available: - // - Chrome - // - ChromeCanary - // - Firefox - // - Opera (has to be installed with `npm install karma-opera-launcher`) - // - Safari (only Mac; has to be installed with `npm install karma-safari-launcher`) - // - PhantomJS - // - IE (only Windows; has to be installed with `npm install karma-ie-launcher`) - browsers: [%BROWSERS%], - - - // If browser does not capture in given timeout [ms], kill it - captureTimeout: 60000, - - - // Continuous Integration mode - // if true, it capture browsers, run tests and exit - singleRun: false - }); -}; diff --git a/node_modules/karma/karma-completion.sh b/node_modules/karma/karma-completion.sh deleted file mode 100644 index fc683540..00000000 --- a/node_modules/karma/karma-completion.sh +++ /dev/null @@ -1,50 +0,0 @@ -###-begin-karma-completion-### -# -# karma command completion script -# This is stolen from NPM. Thanks @isaac! -# -# Installation: karma completion >> ~/.bashrc (or ~/.zshrc) -# Or, maybe: karma completion > /usr/local/etc/bash_completion.d/npm -# - -if type complete &>/dev/null; then - __karma_completion () { - local si="$IFS" - IFS=$'\n' COMPREPLY=($(COMP_CWORD="$COMP_CWORD" \ - COMP_LINE="$COMP_LINE" \ - COMP_POINT="$COMP_POINT" \ - karma completion -- "${COMP_WORDS[@]}" \ - 2>/dev/null)) || return $? - IFS="$si" - } - complete -F __karma_completion karma -elif type compdef &>/dev/null; then - __karma_completion() { - si=$IFS - compadd -- $(COMP_CWORD=$((CURRENT-1)) \ - COMP_LINE=$BUFFER \ - COMP_POINT=0 \ - karma completion -- "${words[@]}" \ - 2>/dev/null) - IFS=$si - } - compdef __karma_completion karma -elif type compctl &>/dev/null; then - __karma_completion () { - local cword line point words si - read -Ac words - read -cn cword - let cword-=1 - read -l line - read -ln point - si="$IFS" - IFS=$'\n' reply=($(COMP_CWORD="$cword" \ - COMP_LINE="$line" \ - COMP_POINT="$point" \ - karma completion -- "${words[@]}" \ - 2>/dev/null)) || return $? - IFS="$si" - } - compctl -K __karma_completion karma -fi -###-end-karma-completion-### diff --git a/node_modules/karma/lib/browser.js b/node_modules/karma/lib/browser.js deleted file mode 100644 index 0d727ad3..00000000 --- a/node_modules/karma/lib/browser.js +++ /dev/null @@ -1,299 +0,0 @@ -var helper = require('./helper'); -var events = require('./events'); -var logger = require('./logger'); - - -var Result = function() { - var startTime = Date.now(); - - this.total = this.skipped = this.failed = this.success = 0; - this.netTime = this.totalTime = 0; - this.disconnected = this.error = false; - - this.totalTimeEnd = function() { - this.totalTime = Date.now() - startTime; - }; -}; - - -// The browser is ready to execute tests. -var READY = 1; - -// The browser is executing the tests/ -var EXECUTING = 2; - -// The browser is not executing, but temporarily disconnected (waiting for reconnecting). -var READY_DISCONNECTED = 3; - -// The browser is executing the tests, but temporarily disconnect (waiting for reconnecting). -var EXECUTING_DISCONNECTED = 4; - -// The browser got permanently disconnected (being removed from the collection and destroyed). -var DISCONNECTED = 5; - - -var Browser = function(id, fullName, /* capturedBrowsers */ collection, emitter, socket, timer, - /* config.browserDisconnectTimeout */ disconnectDelay) { - - var name = helper.browserFullNameToShort(fullName); - var log = logger.create(name); - - this.id = id; - this.fullName = fullName; - this.name = name; - this.state = READY; - this.lastResult = new Result(); - - this.init = function() { - collection.add(this); - - events.bindAll(this, socket); - - log.info('Connected on socket %s', socket.id); - - // TODO(vojta): remove launchId, - // it's here just for WebStorm B-C. - this.launchId = this.id; - this.id = socket.id; - - // TODO(vojta): move to collection - emitter.emit('browsers_change', collection); - - emitter.emit('browser_register', this); - }; - - this.isReady = function() { - return this.state === READY; - }; - - this.toString = function() { - return this.name; - }; - - this.onError = function(error) { - if (this.isReady()) { - return; - } - - this.lastResult.error = true; - emitter.emit('browser_error', this, error); - }; - - this.onInfo = function(info) { - if (this.isReady()) { - return; - } - - // TODO(vojta): remove - if (helper.isDefined(info.dump)) { - emitter.emit('browser_log', this, info.dump, 'dump'); - } - - if (helper.isDefined(info.log)) { - emitter.emit('browser_log', this, info.log, info.type); - } - - if (helper.isDefined(info.total)) { - this.lastResult.total = info.total; - } - }; - - this.onComplete = function(result) { - if (this.isReady()) { - return; - } - - this.state = READY; - this.lastResult.totalTimeEnd(); - - if (!this.lastResult.success) { - this.lastResult.error = true; - } - - emitter.emit('browsers_change', collection); - emitter.emit('browser_complete', this, result); - }; - - var self = this; - var disconnect = function() { - self.state = DISCONNECTED; - log.warn('Disconnected'); - collection.remove(self); - }; - - var pendingDisconnect; - this.onDisconnect = function() { - if (this.state === READY) { - disconnect(); - } else if (this.state === EXECUTING) { - log.debug('Disconnected during run, waiting for reconnecting.'); - this.state = EXECUTING_DISCONNECTED; - - pendingDisconnect = timer.setTimeout(function() { - self.lastResult.totalTimeEnd(); - self.lastResult.disconnected = true; - disconnect(); - emitter.emit('browser_complete', self); - }, disconnectDelay); - } - }; - - this.onReconnect = function(newSocket) { - if (this.state === EXECUTING_DISCONNECTED) { - this.state = EXECUTING; - log.debug('Reconnected.'); - } else if (this.state === EXECUTING || this.state === READY) { - log.debug('New connection, forgetting the old one.'); - // TODO(vojta): this should only remove this browser.onDisconnect listener - socket.removeAllListeners('disconnect'); - } - - socket = newSocket; - events.bindAll(this, newSocket); - if (pendingDisconnect) { - timer.clearTimeout(pendingDisconnect); - } - }; - - this.onResult = function(result) { - if (result.length) { - return result.forEach(this.onResult, this); - } - - // ignore - probably results from last run (after server disconnecting) - if (this.isReady()) { - return; - } - - if (result.skipped) { - this.lastResult.skipped++; - } else if (result.success) { - this.lastResult.success++; - } else { - this.lastResult.failed++; - } - - this.lastResult.netTime += result.time; - emitter.emit('spec_complete', this, result); - }; - - this.serialize = function() { - return { - id: this.id, - name: this.name, - isReady: this.state === READY - }; - }; -}; - -Browser.STATE_READY = READY; -Browser.STATE_EXECUTING = EXECUTING; -Browser.STATE_READY_DISCONNECTED = READY_DISCONNECTED; -Browser.STATE_EXECUTING_DISCONNECTED = EXECUTING_DISCONNECTED; -Browser.STATE_DISCONNECTED = DISCONNECTED; - - -var Collection = function(emitter, browsers) { - browsers = browsers || []; - - this.add = function(browser) { - browsers.push(browser); - emitter.emit('browsers_change', this); - }; - - this.remove = function(browser) { - var index = browsers.indexOf(browser); - - if (index === -1) { - return false; - } - - browsers.splice(index, 1); - emitter.emit('browsers_change', this); - - return true; - }; - - this.getById = function(browserId) { - for (var i = 0; i < browsers.length; i++) { - // TODO(vojta): use id, once we fix WebStorm plugin - if (browsers[i].launchId === browserId) { - return browsers[i]; - } - } - - return null; - }; - - this.setAllToExecuting = function() { - browsers.forEach(function(browser) { - browser.state = EXECUTING; - }); - - emitter.emit('browsers_change', this); - }; - - this.areAllReady = function(nonReadyList) { - nonReadyList = nonReadyList || []; - - browsers.forEach(function(browser) { - if (!browser.isReady()) { - nonReadyList.push(browser); - } - }); - - return nonReadyList.length === 0; - }; - - this.serialize = function() { - return browsers.map(function(browser) { - return browser.serialize(); - }); - }; - - this.getResults = function() { - var results = browsers.reduce(function(previous, current) { - previous.success += current.lastResult.success; - previous.failed += current.lastResult.failed; - previous.error = previous.error || current.lastResult.error; - previous.disconnected = previous.disconnected || current.lastResult.disconnected; - return previous; - }, {success: 0, failed: 0, error: false, disconnected: false, exitCode: 0}); - - // compute exit status code - results.exitCode = results.failed || results.error || results.disconnected ? 1 : 0; - - return results; - }; - - this.clearResults = function() { - browsers.forEach(function(browser) { - browser.lastResult = new Result(); - }); - }; - - this.clone = function() { - return new Collection(emitter, browsers.slice()); - }; - - // Array APIs - this.map = function(callback, context) { - return browsers.map(callback, context); - }; - - this.forEach = function(callback, context) { - return browsers.forEach(callback, context); - }; - - // this.length - Object.defineProperty(this, 'length', { - get: function() { - return browsers.length; - } - }); -}; -Collection.$inject = ['emitter']; - -exports.Result = Result; -exports.Browser = Browser; -exports.Collection = Collection; diff --git a/node_modules/karma/lib/cli.js b/node_modules/karma/lib/cli.js deleted file mode 100644 index 6bed21c1..00000000 --- a/node_modules/karma/lib/cli.js +++ /dev/null @@ -1,221 +0,0 @@ -var path = require('path'); -var optimist = require('optimist'); -var helper = require('./helper'); -var constant = require('./constants'); -var fs = require('fs'); - -var processArgs = function(argv, options, fs, path) { - - if (argv.help) { - console.log(optimist.help()); - process.exit(0); - } - - if (argv.version) { - console.log('Karma version: ' + constant.VERSION); - process.exit(0); - } - - // TODO(vojta): warn/throw when unknown argument (probably mispelled) - Object.getOwnPropertyNames(argv).forEach(function(name) { - if (name !== '_' && name !== '$0') { - options[helper.dashToCamel(name)] = argv[name]; - } - }); - - if (helper.isString(options.autoWatch)) { - options.autoWatch = options.autoWatch === 'true'; - } - - if (helper.isString(options.colors)) { - options.colors = options.colors === 'true'; - } - - if (helper.isString(options.logLevel)) { - options.logLevel = constant['LOG_' + options.logLevel.toUpperCase()] || constant.LOG_DISABLE; - } - - if (helper.isString(options.singleRun)) { - options.singleRun = options.singleRun === 'true'; - } - - if (helper.isString(options.browsers)) { - options.browsers = options.browsers.split(','); - } - - if (options.reportSlowerThan === false) { - options.reportSlowerThan = 0; - } - - if (helper.isString(options.reporters)) { - options.reporters = options.reporters.split(','); - } - - if (helper.isString(options.removedFiles)) { - options.removedFiles = options.removedFiles.split(','); - } - - if (helper.isString(options.addedFiles)) { - options.addedFiles = options.addedFiles.split(','); - } - - if (helper.isString(options.changedFiles)) { - options.changedFiles = options.changedFiles.split(','); - } - - if (helper.isString(options.refresh)) { - options.refresh = options.refresh === 'true'; - } - - var configFile = argv._.shift(); - - if (!configFile) { - // default config file (if exists) - if (fs.existsSync('./karma.conf.js')) { - configFile = './karma.conf.js'; - } else if (fs.existsSync('./karma.conf.coffee')) { - configFile = './karma.conf.coffee'; - } - } - - options.configFile = configFile ? path.resolve(configFile) : null; - - return options; -}; - -var parseClientArgs = function(argv) { - // extract any args after '--' as clientArgs - var clientArgs = []; - argv = argv.slice(2); - var idx = argv.indexOf('--'); - if (idx !== -1) { - clientArgs = argv.slice(idx + 1); - } - return clientArgs; -}; - -// return only args that occur before `--` -var argsBeforeDoubleDash = function(argv) { - var idx = argv.indexOf('--'); - - return idx === -1 ? argv : argv.slice(0, idx); -}; - - -var describeShared = function() { - optimist - .usage('Karma - Spectacular Test Runner for JavaScript.\n\n' + - 'Usage:\n' + - ' $0 \n\n' + - 'Commands:\n' + - ' start [] [] Start the server / do single run.\n' + - ' init [] Initialize a config file.\n' + - ' run [] [ -- ] Trigger a test run.\n' + - ' completion Shell completion for karma.\n\n' + - 'Run --help with particular command to see its description and available options.') - .describe('help', 'Print usage and options.') - .describe('version', 'Print current version.'); -}; - - -var describeInit = function() { - optimist - .usage('Karma - Spectacular Test Runner for JavaScript.\n\n' + - 'INIT - Initialize a config file.\n\n' + - 'Usage:\n' + - ' $0 init []') - .describe('log-level', ' Level of logging.') - .describe('colors', 'Use colors when reporting and printing logs.') - .describe('no-colors', 'Do not use colors when reporting or printing logs.') - .describe('help', 'Print usage and options.'); -}; - - -var describeStart = function() { - optimist - .usage('Karma - Spectacular Test Runner for JavaScript.\n\n' + - 'START - Start the server / do a single run.\n\n' + - 'Usage:\n' + - ' $0 start [] []') - .describe('port', ' Port where the server is running.') - .describe('auto-watch', 'Auto watch source files and run on change.') - .describe('no-auto-watch', 'Do not watch source files.') - .describe('log-level', ' Level of logging.') - .describe('colors', 'Use colors when reporting and printing logs.') - .describe('no-colors', 'Do not use colors when reporting or printing logs.') - .describe('reporters', 'List of reporters (available: dots, progress, junit, growl, coverage).') - .describe('browsers', 'List of browsers to start (eg. --browsers Chrome,ChromeCanary,Firefox).') - .describe('capture-timeout', ' Kill browser if does not capture in given time [ms].') - .describe('single-run', 'Run the test when browsers captured and exit.') - .describe('no-single-run', 'Disable single-run.') - .describe('report-slower-than', ' Report tests that are slower than given time [ms].') - .describe('help', 'Print usage and options.'); -}; - - -var describeRun = function() { - optimist - .usage('Karma - Spectacular Test Runner for JavaScript.\n\n' + - 'RUN - Run the tests (requires running server).\n\n' + - 'Usage:\n' + - ' $0 run [] [] [ -- ]') - .describe('port', ' Port where the server is listening.') - .describe('no-refresh', 'Do not re-glob all the patterns.') - .describe('help', 'Print usage.'); -}; - - -var describeCompletion = function() { - optimist - .usage('Karma - Spectacular Test Runner for JavaScript.\n\n' + - 'COMPLETION - Bash/ZSH completion for karma.\n\n' + - 'Installation:\n' + - ' $0 completion >> ~/.bashrc\n') - .describe('help', 'Print usage.'); -}; - - -exports.process = function() { - - var argv = optimist.parse(argsBeforeDoubleDash(process.argv.slice(2))); - var options = { - cmd: argv._.shift() - }; - - switch (options.cmd) { - case 'start': - describeStart(); - break; - - case 'run': - describeRun(); - options.clientArgs = parseClientArgs(process.argv); - break; - - case 'init': - describeInit(); - break; - - case 'completion': - describeCompletion(); - break; - - default: - describeShared(); - if (!options.cmd) { - processArgs(argv, options, fs, path); - console.error('Command not specified.'); - } else { - console.error('Unknown command "' + options.cmd + '".'); - } - optimist.showHelp(); - process.exit(1); - } - - return processArgs(argv, options, fs, path); -}; - -// just for testing -exports.processArgs = processArgs; -exports.parseClientArgs = parseClientArgs; -exports.argsBeforeDoubleDash = argsBeforeDoubleDash; diff --git a/node_modules/karma/lib/completion.js b/node_modules/karma/lib/completion.js deleted file mode 100644 index 5e8ccb61..00000000 --- a/node_modules/karma/lib/completion.js +++ /dev/null @@ -1,162 +0,0 @@ -var CUSTOM = ['']; -var BOOLEAN = false; - -var options = { - start: { - '--port': CUSTOM, - '--auto-watch': BOOLEAN, - '--no-auto-watch': BOOLEAN, - '--log-level': ['disable', 'debug', 'info', 'warn', 'error'], - '--colors': BOOLEAN, - '--no-colors': BOOLEAN, - '--reporters': ['dots', 'progress'], - '--no-reporters': BOOLEAN, - '--browsers': ['Chrome', 'ChromeCanary', 'Firefox', 'PhantomJS', 'Safari', 'Opera'], - '--no-browsers': BOOLEAN, - '--single-run': BOOLEAN, - '--no-single-run': BOOLEAN, - '--help': BOOLEAN - }, - init: { - '--colors': BOOLEAN, - '--no-colors': BOOLEAN, - '--help': BOOLEAN - }, - run: { - '--no-refresh': BOOLEAN, - '--port': CUSTOM, - '--help': BOOLEAN - } -}; - -var parseEnv = function(argv, env) { - var words = argv.slice(5); - - return { - words: words, - count: parseInt(env.COMP_CWORD, 10), - last: words[words.length - 1], - prev: words[words.length - 2] - }; -}; - -var opositeWord = function(word) { - if (word.charAt(0) !== '-') { - return null; - } - - return word.substr(0, 5) === '--no-' ? '--' + word.substr(5) : '--no-' + word.substr(2); -}; - -var sendCompletionNoOptions = function() {}; - -var sendCompletion = function(possibleWords, env) { - var regexp = new RegExp('^' + env.last); - var filteredWords = possibleWords.filter(function(word) { - return regexp.test(word) && env.words.indexOf(word) === -1 && - env.words.indexOf(opositeWord(word)) === -1; - }); - - if (!filteredWords.length) { - return sendCompletionNoOptions(env); - } - - filteredWords.forEach(function(word) { - console.log(word); - }); -}; - - -var glob = require('glob'); -var globOpts = { - mark: true, - nocase: true -}; - -var sendCompletionFiles = function(env) { - glob(env.last + '*', globOpts, function(err, files) { - if (files.length === 1 && files[0].charAt(files[0].length - 1) === '/') { - sendCompletionFiles({last: files[0]}); - } else { - console.log(files.join('\n')); - } - }); -}; - -var sendCompletionConfirmLast = function(env) { - console.log(env.last); -}; - -var complete = function(env) { - if (env.count === 1) { - if (env.words[0].charAt(0) === '-') { - return sendCompletion(['--help', '--version'], env); - } - - return sendCompletion(Object.keys(options), env); - } - - if (env.count === 2 && env.words[1].charAt(0) !== '-') { - // complete files (probably karma.conf.js) - return sendCompletionFiles(env); - } - - var cmdOptions = options[env.words[0]]; - var previousOption = cmdOptions[env.prev]; - - if (!cmdOptions) { - // no completion, wrong command - return sendCompletionNoOptions(); - } - - if (previousOption === CUSTOM && env.last) { - // custom value with already filled something - return sendCompletionConfirmLast(env); - } - - if (previousOption) { - // custom options - return sendCompletion(previousOption, env); - } - - return sendCompletion(Object.keys(cmdOptions), env); -}; - - -var completion = function() { - if (process.argv[3] === '--') { - return complete(parseEnv(process.argv, process.env)); - } - - // just print out the karma-completion.sh - var fs = require('fs'); - var path = require('path'); - - fs.readFile(path.resolve(__dirname, '../karma-completion.sh'), 'utf8', function (err, data) { - process.stdout.write(data); - process.stdout.on('error', function (error) { - // Darwin is a real dick sometimes. - // - // This is necessary because the "source" or "." program in - // bash on OS X closes its file argument before reading - // from it, meaning that you get exactly 1 write, which will - // work most of the time, and will always raise an EPIPE. - // - // Really, one should not be tossing away EPIPE errors, or any - // errors, so casually. But, without this, `. <(karma completion)` - // can never ever work on OS X. - if (error.errno === 'EPIPE') { - error = null; - } - }); - }); -}; - - -// PUBLIC API -exports.completion = completion; - -// for testing -exports.opositeWord = opositeWord; -exports.sendCompletion = sendCompletion; -exports.complete = complete; diff --git a/node_modules/karma/lib/config.js b/node_modules/karma/lib/config.js deleted file mode 100644 index 41f41897..00000000 --- a/node_modules/karma/lib/config.js +++ /dev/null @@ -1,352 +0,0 @@ -var path = require('path'); - -var logger = require('./logger'); -var log = logger.create('config'); -var helper = require('./helper'); -var constant = require('./constants'); - -// Coffee is required here to enable config files written in coffee-script. -// It's not directly used in this file. -require('coffee-script'); - - -var Pattern = function(pattern, served, included, watched) { - this.pattern = pattern; - this.served = helper.isDefined(served) ? served : true; - this.included = helper.isDefined(included) ? included : true; - this.watched = helper.isDefined(watched) ? watched : true; -}; - -var UrlPattern = function(url) { - Pattern.call(this, url, false, true, false); -}; - - -var createPatternObject = function(pattern) { - if (helper.isString(pattern)) { - return helper.isUrlAbsolute(pattern) ? new UrlPattern(pattern) : new Pattern(pattern); - } - - if (helper.isObject(pattern)) { - if (!helper.isDefined(pattern.pattern)) { - log.warn('Invalid pattern %s!\n\tObject is missing "pattern" property".', pattern); - } - - return helper.isUrlAbsolute(pattern.pattern) ? - new UrlPattern(pattern.pattern) : - new Pattern(pattern.pattern, pattern.served, pattern.included, pattern.watched); - } - - log.warn('Invalid pattern %s!\n\tExpected string or object with "pattern" property.', pattern); - return new Pattern(null, false, false, false); -}; - -var normalizeConfig = function(config, configFilePath) { - - var basePathResolve = function(relativePath) { - if (helper.isUrlAbsolute(relativePath)) { - return relativePath; - } - - if (!helper.isDefined(config.basePath) || !helper.isDefined(relativePath)) { - return ''; - } - return path.resolve(config.basePath, relativePath); - }; - - var createPatternMapper = function(resolve) { - return function(objectPattern) { - objectPattern.pattern = resolve(objectPattern.pattern); - - return objectPattern; - }; - }; - - if (helper.isString(configFilePath)) { - // resolve basePath - config.basePath = path.resolve(path.dirname(configFilePath), config.basePath); - - // always ignore the config file itself - config.exclude.push(configFilePath); - } else { - config.basePath = path.resolve(config.basePath || '.'); - } - - config.files = config.files.map(createPatternObject).map(createPatternMapper(basePathResolve)); - config.exclude = config.exclude.map(basePathResolve); - config.junitReporter.outputFile = basePathResolve(config.junitReporter.outputFile); - config.coverageReporter.dir = basePathResolve(config.coverageReporter.dir); - - // normalize paths on windows - config.basePath = helper.normalizeWinPath(config.basePath); - config.files = config.files.map(createPatternMapper(helper.normalizeWinPath)); - config.exclude = config.exclude.map(helper.normalizeWinPath); - config.junitReporter.outputFile = helper.normalizeWinPath(config.junitReporter.outputFile); - config.coverageReporter.dir = helper.normalizeWinPath(config.coverageReporter.dir); - - // normalize urlRoot - var urlRoot = config.urlRoot; - if (urlRoot.charAt(0) !== '/') { - urlRoot = '/' + urlRoot; - } - - if (urlRoot.charAt(urlRoot.length - 1) !== '/') { - urlRoot = urlRoot + '/'; - } - - if (urlRoot !== config.urlRoot) { - log.warn('urlRoot normalized to "%s"', urlRoot); - config.urlRoot = urlRoot; - } - - if (config.proxies && config.proxies.hasOwnProperty(config.urlRoot)) { - log.warn('"%s" is proxied, you should probably change urlRoot to avoid conflicts', - config.urlRoot); - } - - if (config.singleRun && config.autoWatch) { - log.debug('autoWatch set to false, because of singleRun'); - config.autoWatch = false; - } - - if (helper.isString(config.reporters)) { - config.reporters = config.reporters.split(','); - } - - // TODO(vojta): remove - if (helper.isDefined(config.reporter)) { - log.warn('"reporter" is deprecated, use "reporters" instead'); - } - - // normalize preprocessors - var preprocessors = config.preprocessors || {}; - var normalizedPreprocessors = config.preprocessors = Object.create(null); - - Object.keys(preprocessors).forEach(function(pattern) { - var normalizedPattern = helper.normalizeWinPath(basePathResolve(pattern)); - - normalizedPreprocessors[normalizedPattern] = helper.isString(preprocessors[pattern]) ? - [preprocessors[pattern]] : preprocessors[pattern]; - }); - - - // define custom launchers/preprocessors/reporters - create an inlined plugin - var module = Object.create(null); - var hasSomeInlinedPlugin = false; - ['launcher', 'preprocessor', 'reporter'].forEach(function(type) { - var definitions = config['custom' + helper.ucFirst(type) + 's'] || {}; - - Object.keys(definitions).forEach(function(name) { - var definition = definitions[name]; - - if (!helper.isObject(definition)) { - return log.warn('Can not define %s %s. Definition has to be an object.', type, name); - } - - if (!helper.isString(definition.base)) { - return log.warn('Can not define %s %s. Missing base %s.', type, name, type); - } - - var token = type + ':' + definition.base; - var locals = { - args: ['value', definition] - }; - - module[type + ':' + name] = ['factory', function(injector) { - return injector.createChild([locals], [token]).get(token); - }]; - hasSomeInlinedPlugin = true; - }); - }); - - if (hasSomeInlinedPlugin) { - config.plugins.push(module); - } - - return config; -}; - -// TODO(vojta): remove in 0.11 -var CONFIG_SYNTAX_FRAMEWORKS_HELP = ' module.exports = function(config) {\n' + - ' config.set({\n' + - ' // your config\n' + - ' frameworks: ["%s"]\n' + - ' });\n' + - ' };\n'; - -var CONST_ERR = '%s is not supported anymore. Please use:\n'+CONFIG_SYNTAX_FRAMEWORKS_HELP; -['JASMINE', 'MOCHA', 'QUNIT'].forEach(function(framework) { - [framework, framework + '_ADAPTER'].forEach(function(name) { - Object.defineProperty(global, name, {configurable: true, get: function() { - log.warn(CONST_ERR, name, framework.toLowerCase()); - return __dirname + '/../../karma-' + framework.toLowerCase() + '/lib/' + - (framework === name ? framework.toLowerCase() : 'adapter') + '.js'; - }}); - }); -}); - -['REQUIRE', 'REQUIRE_ADAPTER'].forEach(function(name) { - Object.defineProperty(global, name, {configurable: true, get: function() { - log.warn(CONST_ERR, name, 'requirejs'); - return __dirname + '/../../karma-requirejs/lib/' + - (name === 'REQUIRE' ? 'require' : 'adapter') + '.js'; - }}); -}); - -['ANGULAR_SCENARIO', 'ANGULAR_SCENARIO_ADAPTER'].forEach(function(name) { - Object.defineProperty(global, name, {configurable: true, get: function() { - log.warn(CONST_ERR, name, 'ng-scenario'); - return __dirname + '/../../karma-ng-scenario/lib/' + - (name === 'ANGULAR_SCENARIO' ? 'angular-scenario' : 'adapter') + '.js'; - }}); -}); - -['LOG_DISABLE', 'LOG_INFO', 'LOG_DEBUG', 'LOG_WARN', 'LOG_ERROR'].forEach(function(name) { - Object.defineProperty(global, name, {configurable: true, get: function() { - log.warn('%s is not supported anymore.\n Please use `config.%s` instead.', name, name); - return constant[name]; - }}); -}); - -var Config = function() { - var config = this; - - this.LOG_DISABLE = constant.LOG_DISABLE; - this.LOG_ERROR = constant.LOG_ERROR; - this.LOG_WARN = constant.LOG_WARN; - this.LOG_INFO = constant.LOG_INFO; - this.LOG_DEBUG = constant.LOG_DEBUG; - - this.set = function(newConfig) { - Object.keys(newConfig).forEach(function(key) { - config[key] = newConfig[key]; - }); - }; - - // TODO(vojta): remove this in 0.10 - this.configure = function(newConfig) { - log.warn('config.configure() is deprecated, please use config.set() instead.'); - this.set(newConfig); - }; - - // TODO(vojta): remove this in 0.10 - ['launcher', 'reporter', 'preprocessor'].forEach(function(type) { - var methodName = 'define' + helper.ucFirst(type); - var propertyName = 'custom' + helper.ucFirst(type) + 's'; - - config[methodName] = function(name, base, options) { - log.warn('config.%s is deprecated, please use "%s" instead.', methodName, propertyName); - - if (!helper.isString(name)) { - return log.warn('Can not define %s. Name has to be a string.', type); - } - - if (!helper.isString(base)) { - return log.warn('Can not define %s %s. Missing parent %s.', type, name, type); - } - - if (!helper.isObject(options)) { - return log.warn('Can not define %s %s. Arguments has to be an object.', type, name); - } - - config[propertyName] = config[propertyName] || {}; - config[propertyName][name] = options; - options.base = base; - }; - }); - - - // DEFAULT CONFIG - this.frameworks = []; - this.port = constant.DEFAULT_PORT; - this.hostname = constant.DEFAULT_HOSTNAME; - this.basePath = ''; - this.files = []; - this.exclude = []; - this.logLevel = constant.LOG_INFO; - this.colors = true; - this.autoWatch = false; - this.autoWatchBatchDelay = 250; - this.reporters = ['progress']; - this.singleRun = false; - this.browsers = []; - this.captureTimeout = 60000; - this.proxies = {}; - this.proxyValidateSSL = true; - this.preprocessors = {'**/*.coffee': 'coffee', '**/*.html': 'html2js'}; - this.urlRoot = '/'; - this.reportSlowerThan = 0; - this.loggers = [constant.CONSOLE_APPENDER]; - this.transports = ['websocket', 'flashsocket', 'xhr-polling', 'jsonp-polling']; - this.plugins = ['karma-*']; - this.client = { - args: [] - }; - this.browserDisconnectTimeout = 2000; - - // TODO(vojta): remove in 0.10 - this.junitReporter = { - outputFile: 'test-results.xml', - suite: '' - }; - - // TODO(vojta): remove in 0.10 - this.coverageReporter = { - type: 'html', - dir: 'coverage' - }; -}; - -var CONFIG_SYNTAX_HELP = ' module.exports = function(config) {\n' + - ' config.set({\n' + - ' // your config\n' + - ' });\n' + - ' };\n'; - -var parseConfig = function(configFilePath, cliOptions) { - var configModule; - if (configFilePath) { - log.debug('Loading config %s', configFilePath); - - try { - configModule = require(configFilePath); - } catch(e) { - if (e.code === 'MODULE_NOT_FOUND' && e.message.indexOf(configFilePath) !== -1) { - log.error('File %s does not exist!', configFilePath); - } else { - log.error('Invalid config file!\n ' + e.stack); - } - return process.exit(1); - } - if (!helper.isFunction(configModule)) { - log.error('Config file must export a function!\n' + CONFIG_SYNTAX_HELP); - return process.exit(1); - } - } else { - log.debug('No config file specified.'); - // if no config file path is passed, we define a dummy config module. - configModule = function() {}; - } - - var config = new Config(); - - try { - configModule(config); - } catch(e) { - log.error('Error in config file!\n', e); - return process.exit(1); - } - - // merge the config from config file and cliOptions (precendense) - config.set(cliOptions); - - // configure the logger as soon as we can - logger.setup(config.logLevel, config.colors, config.loggers); - - return normalizeConfig(config, configFilePath); -}; - -// PUBLIC API -exports.parseConfig = parseConfig; -exports.Pattern = Pattern; -exports.createPatternObject = createPatternObject; diff --git a/node_modules/karma/lib/constants.js b/node_modules/karma/lib/constants.js deleted file mode 100644 index 49e38030..00000000 --- a/node_modules/karma/lib/constants.js +++ /dev/null @@ -1,30 +0,0 @@ -var fs = require('fs'); - -var pkg = JSON.parse(fs.readFileSync(__dirname + '/../package.json').toString()); - -exports.VERSION = pkg.version; - -exports.DEFAULT_PORT = 9876; -exports.DEFAULT_HOSTNAME = 'localhost'; - -// log levels -exports.LOG_DISABLE = 'OFF'; -exports.LOG_ERROR = 'ERROR'; -exports.LOG_WARN = 'WARN'; -exports.LOG_INFO = 'INFO'; -exports.LOG_DEBUG = 'DEBUG'; - -// Default patterns for the pattern layout. -exports.COLOR_PATTERN = '%[%p [%c]: %]%m'; -exports.NO_COLOR_PATTERN = '%p [%c]: %m'; - -// Default console appender -exports.CONSOLE_APPENDER = { - type: 'console', - layout: { - type: 'pattern', - pattern: exports.COLOR_PATTERN - } -}; - -exports.EXIT_CODE = '\x1FEXIT'; diff --git a/node_modules/karma/lib/events.js b/node_modules/karma/lib/events.js deleted file mode 100644 index eedc3627..00000000 --- a/node_modules/karma/lib/events.js +++ /dev/null @@ -1,80 +0,0 @@ -var events = require('events'); -var util = require('util'); -var Q = require('q'); - -var helper = require('./helper'); - - -var bindAllEvents = function(object, context) { - context = context || this; - - for (var method in object) { - if (helper.isFunction(object[method]) && method.substr(0, 2) === 'on') { - context.on(helper.camelToSnake(method.substr(2)), object[method].bind(object)); - } - } -}; - - -var bufferEvents = function(emitter, eventsToBuffer) { - var listeners = []; - var eventsToReply = []; - var genericListener = function() { - eventsToReply.push(Array.prototype.slice.call(arguments)); - }; - - eventsToBuffer.forEach(function(eventName) { - var listener = genericListener.bind(null, eventName); - listeners.push(listener); - emitter.on(eventName, listener); - }); - - return function() { - if (!eventsToReply) { - return; - } - - // remove all buffering listeners - listeners.forEach(function(listener, i) { - emitter.removeListener(eventsToBuffer[i], listener); - }); - - // reply - eventsToReply.forEach(function(args) { - events.EventEmitter.prototype.emit.apply(emitter, args); - }); - - // free-up - listeners = eventsToReply = null; - }; -}; - - -// TODO(vojta): log.debug all events -var EventEmitter = function() { - this.bind = bindAllEvents; - - this.emitAsync = function(name) { - // TODO(vojta): allow passing args - // TODO(vojta): ignore/throw if listener call done() multiple times - var pending = this.listeners(name).length; - var deferred = Q.defer(); - var done = function() { - if (!--pending) { - deferred.resolve(); - } - }; - - this.emit(name, done); - - return deferred.promise; - }; -}; - -util.inherits(EventEmitter, events.EventEmitter); - - -// PUBLISH -exports.EventEmitter = EventEmitter; -exports.bindAll = bindAllEvents; -exports.bufferEvents = bufferEvents; diff --git a/node_modules/karma/lib/executor.js b/node_modules/karma/lib/executor.js deleted file mode 100644 index 6eaf747f..00000000 --- a/node_modules/karma/lib/executor.js +++ /dev/null @@ -1,56 +0,0 @@ -var log = require('./logger').create(); - -var Executor = function(capturedBrowsers, config, emitter) { - var self = this; - var executionScheduled = false; - var pendingCount = 0; - var runningBrowsers; - - var schedule = function() { - var nonReady = []; - - if (!capturedBrowsers.length) { - log.warn('No captured browser, open http://%s:%s%s', config.hostname, config.port, - config.urlRoot); - return false; - } - - if (capturedBrowsers.areAllReady(nonReady)) { - log.debug('All browsers are ready, executing'); - executionScheduled = false; - capturedBrowsers.clearResults(); - capturedBrowsers.setAllToExecuting(); - pendingCount = capturedBrowsers.length; - runningBrowsers = capturedBrowsers.clone(); - emitter.emit('run_start', runningBrowsers); - self.socketIoSockets.emit('execute', config.client); - return true; - } - - log.info('Delaying execution, these browsers are not ready: ' + nonReady.join(', ')); - executionScheduled = true; - return false; - }; - - this.schedule = schedule; - - this.onRunComplete = function() { - if (executionScheduled) { - schedule(); - } - }; - - this.onBrowserComplete = function() { - pendingCount--; - - if (!pendingCount) { - emitter.emit('run_complete', runningBrowsers, runningBrowsers.getResults()); - } - }; - - // bind all the events - emitter.bind(this); -}; - - -module.exports = Executor; diff --git a/node_modules/karma/lib/file-list.js b/node_modules/karma/lib/file-list.js deleted file mode 100644 index 954b5c52..00000000 --- a/node_modules/karma/lib/file-list.js +++ /dev/null @@ -1,383 +0,0 @@ -var fs = require('fs'); -var glob = require('glob'); -var mm = require('minimatch'); -var q = require('q'); - -var helper = require('./helper'); -var log = require('./logger').create('watcher'); - - -var createWinGlob = function(realGlob) { - return function(pattern, options, done) { - realGlob(pattern, options, function(err, results) { - done(err, results.map(helper.normalizeWinPath)); - }); - }; -}; - -if (process.platform === 'win32') { - glob = createWinGlob(glob); -} - - -var File = function(path, mtime) { - // used for serving (processed path, eg some/file.coffee -> some/file.coffee.js) - this.path = path; - - // original absolute path, id of the file - this.originalPath = path; - - // where the content is stored (processed) - this.contentPath = path; - - this.mtime = mtime; - this.isUrl = false; -}; - -var Url = function(path) { - this.path = path; - this.isUrl = true; -}; - -Url.prototype.toString = File.prototype.toString = function() { - return this.path; -}; - - -var GLOB_OPTS = { - // globDebug: true, - cwd: '/' -}; - - -var byPath = function(a, b) { - if (a.path > b.path) { - return 1; - } - if (a.path < b.path) { - return -1; - } - return 0; -}; - - -// TODO(vojta): ignore changes (add/change/remove) when in the middle of refresh -// TODO(vojta): do not glob patterns that are watched (both on init and refresh) -var List = function(patterns, excludes, emitter, preprocess, batchInterval) { - var self = this; - var pendingDeferred; - var pendingTimeout; - - var resolveFiles = function(buckets) { - var uniqueMap = {}; - var files = { - served: [], - included: [] - }; - - buckets.forEach(function(bucket, idx) { - bucket.sort(byPath).forEach(function(file) { - if (!uniqueMap[file.path]) { - if (patterns[idx].served) { - files.served.push(file); - } - - if (patterns[idx].included) { - files.included.push(file); - } - - uniqueMap[file.path] = true; - } - }); - }); - - return files; - }; - - var resolveDeferred = function(files) { - if (pendingTimeout) { - clearTimeout(pendingTimeout); - } - - pendingDeferred.resolve(files || resolveFiles(self.buckets)); - pendingDeferred = pendingTimeout = null; - }; - - var fireEventAndDefer = function() { - if (pendingTimeout) { - clearTimeout(pendingTimeout); - } - - if (!pendingDeferred) { - pendingDeferred = q.defer(); - emitter.emit('file_list_modified', pendingDeferred.promise); - } - - pendingTimeout = setTimeout(resolveDeferred, batchInterval); - }; - - - // re-glob all the patterns - this.refresh = function() { - // TODO(vojta): cancel refresh if another refresh starts - var buckets = self.buckets = new Array(patterns.length); - - var complete = function() { - if (buckets !== self.buckets) { - return; - } - - var files = resolveFiles(buckets); - - resolveDeferred(files); - log.debug('Resolved files:\n\t' + files.served.join('\n\t')); - }; - - // TODO(vojta): use some async helper library for this - var pending = 0; - var finish = function() { - pending--; - - if (!pending) { - complete(); - } - }; - - if (!pendingDeferred) { - pendingDeferred = q.defer(); - emitter.emit('file_list_modified', pendingDeferred.promise); - } - - if (pendingTimeout) { - clearTimeout(pendingTimeout); - } - - patterns.forEach(function(patternObject, i) { - var pattern = patternObject.pattern; - - if (helper.isUrlAbsolute(pattern)) { - buckets[i] = [new Url(pattern)]; - return; - } - - pending++; - glob(pattern, GLOB_OPTS, function(err, resolvedFiles) { - var matchedAndNotIgnored = 0; - - buckets[i] = []; - - if (!resolvedFiles.length) { - log.warn('Pattern "%s" does not match any file.', pattern); - return finish(); - } - - // stat each file to get mtime and isDirectory - resolvedFiles.forEach(function(path) { - var matchExclude = function(excludePattern) { - return mm(path, excludePattern); - }; - - if (excludes.some(matchExclude)) { - log.debug('Excluded file "%s"', path); - return; - } - - pending++; - matchedAndNotIgnored++; - fs.stat(path, function(error, stat) { - if (error) { - log.debug('An error occured while reading "%s"', path); - finish(); - } else { - if (!stat.isDirectory()) { - // TODO(vojta): reuse file objects - var file = new File(path, stat.mtime); - - preprocess(file, function() { - buckets[i].push(file); - finish(); - }); - } else { - log.debug('Ignored directory "%s"', path); - finish(); - } - } - }); - }); - - if (!matchedAndNotIgnored) { - log.warn('All files matched by "%s" were excluded.', pattern); - } - - finish(); - }); - }); - - if (!pending) { - process.nextTick(complete); - } - - return pendingDeferred.promise; - }; - - - // set new patterns and excludes - // and re-glob - this.reload = function(newPatterns, newExcludes) { - patterns = newPatterns; - excludes = newExcludes; - - return this.refresh(); - }; - - - /** - * Adds a new file into the list (called by watcher) - * - ignore excluded files - * - ignore files that are already in the list - * - get mtime (by stat) - * - fires "file_list_modified" - */ - this.addFile = function(path, done) { - var buckets = this.buckets; - var i, j; - - // sorry, this callback is just for easier testing - done = done || function() {}; - - // check excludes - for (i = 0; i < excludes.length; i++) { - if (mm(path, excludes[i])) { - log.debug('Add file "%s" ignored. Excluded by "%s".', path, excludes[i]); - return done(); - } - } - - for (i = 0; i < patterns.length; i++) { - if (mm(path, patterns[i].pattern)) { - for (j = 0; j < buckets[i].length; j++) { - if (buckets[i][j].originalPath === path) { - log.debug('Add file "%s" ignored. Already in the list.', path); - return done(); - } - } - - break; - } - } - - if (i >= patterns.length) { - log.debug('Add file "%s" ignored. Does not match any pattern.', path); - return done(); - } - - var addedFile = new File(path); - buckets[i].push(addedFile); - - return fs.stat(path, function(err, stat) { - // in the case someone refresh() the list before stat callback - if (self.buckets === buckets) { - addedFile.mtime = stat.mtime; - - return preprocess(addedFile, function() { - // TODO(vojta): ignore if refresh/reload happens - log.info('Added file "%s".', path); - fireEventAndDefer(); - done(); - }); - } - - return done(); - }); - }; - - - /** - * Update mtime of a file (called by watcher) - * - ignore if file is not in the list - * - ignore if mtime has not changed - * - fire "file_list_modified" - */ - this.changeFile = function(path, done) { - var buckets = this.buckets; - var i, j; - - // sorry, this callback is just for easier testing - done = done || function() {}; - - outer: - for (i = 0; i < buckets.length; i++) { - for (j = 0; j < buckets[i].length; j++) { - if (buckets[i][j].originalPath === path) { - break outer; - } - } - } - - if (!buckets[i]) { - log.debug('Changed file "%s" ignored. Does not match any file in the list.', path); - return done(); - } - - var changedFile = buckets[i][j]; - return fs.stat(path, function(err, stat) { - // https://github.com/paulmillr/chokidar/issues/11 - if (err || !stat) { - return self.removeFile(path, done); - } - - if (self.buckets === buckets && stat.mtime > changedFile.mtime) { - log.info('Changed file "%s".', path); - changedFile.mtime = stat.mtime; - // TODO(vojta): THIS CAN MAKE FILES INCONSISTENT - // if batched change is resolved before preprocessing is finished, the file can be in - // inconsistent state, when the promise is resolved. - // Solutions: - // 1/ the preprocessor should not change the object in place, but create a copy that would - // be eventually merged into the original file, here in the callback, synchronously. - // 2/ delay the promise resolution - wait for any changeFile operations to finish - return preprocess(changedFile, function() { - // TODO(vojta): ignore if refresh/reload happens - fireEventAndDefer(); - done(); - }); - } - - return done(); - }); - }; - - - /** - * Remove a file from the list (called by watcher) - * - ignore if file is not in the list - * - fire "file_list_modified" - */ - this.removeFile = function(path, done) { - var buckets = this.buckets; - - // sorry, this callback is just for easier testing - done = done || function() {}; - - for (var i = 0; i < buckets.length; i++) { - for (var j = 0; j < buckets[i].length; j++) { - if (buckets[i][j].originalPath === path) { - buckets[i].splice(j, 1); - log.info('Removed file "%s".', path); - fireEventAndDefer(); - return done(); - } - } - } - - log.debug('Removed file "%s" ignored. Does not match any file in the list.', path); - return done(); - }; -}; -List.$inject = ['config.files', 'config.exclude', 'emitter', 'preprocess', - 'config.autoWatchBatchDelay']; - -// PUBLIC -exports.List = List; -exports.File = File; -exports.Url = Url; diff --git a/node_modules/karma/lib/helper.js b/node_modules/karma/lib/helper.js deleted file mode 100644 index 30fc409e..00000000 --- a/node_modules/karma/lib/helper.js +++ /dev/null @@ -1,97 +0,0 @@ -var fs = require('fs'); -var path = require('path'); -var _ = require('lodash'); -var useragent = require('useragent'); - - -exports.browserFullNameToShort = function(fullName) { - var agent = useragent.parse(fullName); - return agent.toAgent() + ' (' + agent.os + ')'; -}; - - -exports.isDefined = function(value) { - return !_.isUndefined(value); -}; - -exports.isFunction = _.isFunction; -exports.isString = _.isString; -exports.isObject = _.isObject; -exports.isArray = _.isArray; - -var ABS_URL = /^https?:\/\//; -exports.isUrlAbsolute = function(url) { - return ABS_URL.test(url); -}; - - -exports.camelToSnake = function(camelCase) { - return camelCase.replace(/[A-Z]/g, function(match, pos) { - return (pos > 0 ? '_' : '') + match.toLowerCase(); - }); -}; - - -exports.ucFirst = function(word) { - return word.charAt(0).toUpperCase() + word.substr(1); -}; - - -exports.dashToCamel = function(dash) { - var words = dash.split('-'); - return words.shift() + words.map(exports.ucFirst).join(''); -}; - - -exports.arrayRemove = function(collection, item) { - var idx = collection.indexOf(item); - - if (idx !== -1) { - collection.splice(idx, 1); - return true; - } - - return false; -}; - - -exports.merge = function() { - var args = Array.prototype.slice.call(arguments, 0); - args.unshift({}); - return _.merge.apply({}, args); -}; - - -exports.formatTimeInterval = function(time) { - var mins = Math.floor(time / 60000); - var secs = (time - mins * 60000) / 1000; - var str = secs + (secs === 1 ? ' sec' : ' secs'); - - if (mins) { - str = mins + (mins === 1 ? ' min ' : ' mins ') + str; - } - - return str; -}; - -var replaceWinPath = function(path) { - return exports.isDefined(path) ? path.replace(/\\/g, '/') : path; -}; - -exports.normalizeWinPath = process.platform === 'win32' ? replaceWinPath : _.identity; - -exports.mkdirIfNotExists = function mkdir(directory, done) { - // TODO(vojta): handle if it's a file - fs.stat(directory, function(err, stat) { - if (stat && stat.isDirectory()) { - done(); - } else { - mkdir(path.dirname(directory), function() { - fs.mkdir(directory, done); - }); - } - }); -}; - -// export lodash -exports._ = _; diff --git a/node_modules/karma/lib/index.js b/node_modules/karma/lib/index.js deleted file mode 100644 index 75a39fa3..00000000 --- a/node_modules/karma/lib/index.js +++ /dev/null @@ -1,6 +0,0 @@ -// index module -exports.VERSION = require('./constants').VERSION; -exports.server = require('./server'); -exports.runner = require('./runner'); -exports.launcher = require('./launcher'); - diff --git a/node_modules/karma/lib/init.js b/node_modules/karma/lib/init.js deleted file mode 100755 index d4cbee2f..00000000 --- a/node_modules/karma/lib/init.js +++ /dev/null @@ -1,366 +0,0 @@ -var readline = require('readline'); -var fs = require('fs'); -var util = require('util'); -var path = require('path'); -var glob = require('glob'); - -var helper = require('./helper'); -var logger = require('./logger'); -var constant = require('./constants'); - -var log = logger.create('init'); - -var JS_TPL_PATH = __dirname + '/../config.tpl.js'; -var COFFEE_TPL_PATH = __dirname + '/../config.tpl.coffee'; - - -var COLORS_ON = { - END: '\x1B[39m', - NYAN: '\x1B[36m', - GREEN: '\x1B[32m', - BOLD: '\x1B[1m', - bold: function(str) { - return this.BOLD + str + '\x1B[22m'; - }, - green: function(str) { - return this.GREEN + str + this.END; - } -}; - -// nasty global -var colors = COLORS_ON; - -var COLORS_OFF = { - END: '', - NYAN: '', - GREEN: '', - BOLD: '', - bold: function(str) { - return str; - }, - green: function(str) { - return str; - } -}; - -var validatePattern = function(value) { - if (!glob.sync(value).length) { - log.warn('There is no file matching this pattern.\n' + colors.NYAN); - } -}; - - -var validateBrowser = function(name) { - var moduleName = 'karma-' + name.toLowerCase().replace('canary', '') + '-launcher'; - - try { - require(moduleName); - } catch (e) { - log.warn('Missing "%s" plugin.\n npm install %s --save-dev' + colors.NYAN, moduleName, - moduleName); - } - - // TODO(vojta): check if the path resolves to a binary -}; - -var validateFramework = function(name) { - try { - require('karma-' + name); - } catch (e) { - log.warn('Missing "karma-%s" plugin.\n npm install karma-%s --save-dev' + colors.NYAN, name, - name); - } -}; - -var validateRequireJs = function(useRequire) { - if (useRequire) { - validateFramework('requirejs'); - } -}; - - -var questions = [{ - id: 'framework', - question: 'Which testing framework do you want to use ?', - hint: 'Press tab to list possible options. Enter to move to the next question.', - options: ['jasmine', 'mocha', 'qunit', ''], - validate: validateFramework -}, { - id: 'requirejs', - question: 'Do you want to use Require.js ?', - hint: 'This will add Require.js plugin.\n' + - 'Press tab to list possible options. Enter to move to the next question.', - options: ['no', 'yes'], - validate: validateRequireJs, - boolean: true -}, { - id: 'browsers', - question: 'Do you want to capture a browser automatically ?', - hint: 'Press tab to list possible options. Enter empty string to move to the next question.', - options: ['Chrome', 'ChromeCanary', 'Firefox', 'Safari', 'PhantomJS', 'Opera', 'IE', ''], - validate: validateBrowser, - multiple: true -}, { - id: 'files', - question: 'What is the location of your source and test files ?', - hint: 'You can use glob patterns, eg. "js/*.js" or "test/**/*Spec.js".\n' + - 'Enter empty string to move to the next question.', - multiple: true, - validate: validatePattern -}, { - id: 'exclude', - question: 'Should any of the files included by the previous patterns be excluded ?', - hint: 'You can use glob patterns, eg. "**/*.swp".\n' + - 'Enter empty string to move to the next question.', - multiple: true, - validate: validatePattern -}, { - id: 'includedFiles', - question: 'Which files do you want to include with '; -var LINK_TAG = ''; -var SCRIPT_TYPE = { - '.js': 'text/javascript', - '.dart': 'application/dart' -}; - - -var filePathToUrlPath = function(filePath, basePath) { - if (filePath.indexOf(basePath) === 0) { - return '/base' + filePath.substr(basePath.length); - } - - return '/absolute' + filePath; -}; - -var createKarmaMiddleware = function(filesPromise, serveStaticFile, - /* config.basePath */ basePath, /* config.urlRoot */ urlRoot) { - - return function(request, response, next) { - var requestUrl = request.url.replace(/\?.*/, ''); - - // redirect /__karma__ to /__karma__ (trailing slash) - if (requestUrl === urlRoot.substr(0, urlRoot.length - 1)) { - response.setHeader('Location', urlRoot); - response.writeHead(301); - return response.end('MOVED PERMANENTLY'); - } - - // ignore urls outside urlRoot - if (requestUrl.indexOf(urlRoot) !== 0) { - return next(); - } - - // remove urlRoot prefix - requestUrl = requestUrl.substr(urlRoot.length - 1); - - // serve client.html - if (requestUrl === '/') { - return serveStaticFile('/client.html', response); - } - - // serve karma.js - if (requestUrl === '/karma.js') { - return serveStaticFile(requestUrl, response, function(data) { - return data.replace('%KARMA_URL_ROOT%', urlRoot) - .replace('%KARMA_VERSION%', VERSION); - }); - } - - // serve context.html - execution context within the iframe - // or debug.html - execution context without channel to the server - if (requestUrl === '/context.html' || requestUrl === '/debug.html') { - return filesPromise.then(function(files) { - serveStaticFile(requestUrl, response, function(data) { - common.setNoCacheHeaders(response); - - var scriptTags = files.included.map(function(file) { - var filePath = file.path; - var fileExt = path.extname(filePath); - - if (!file.isUrl) { - // TODO(vojta): serve these files from within urlRoot as well - filePath = filePathToUrlPath(filePath, basePath); - - if (requestUrl === '/context.html') { - filePath += '?' + file.mtime.getTime(); - } - } - - if (fileExt === '.css') { - return util.format(LINK_TAG, filePath); - } - - return util.format(SCRIPT_TAG, SCRIPT_TYPE[fileExt] || 'text/javascript', filePath); - }); - - // TODO(vojta): don't compute if it's not in the template - var mappings = files.served.map(function(file) { - var filePath = filePathToUrlPath(file.path, basePath); - - return util.format(' \'%s\': \'%d\'', filePath, file.mtime.getTime()); - }); - - mappings = 'window.__karma__.files = {\n' + mappings.join(',\n') + '\n};\n'; - - return data.replace('%SCRIPTS%', scriptTags.join('\n')).replace('%MAPPINGS%', mappings); - }); - }); - } - - return next(); - }; -}; - - -// PUBLIC API -exports.create = createKarmaMiddleware; diff --git a/node_modules/karma/lib/middleware/proxy.js b/node_modules/karma/lib/middleware/proxy.js deleted file mode 100644 index 2fc1b5f9..00000000 --- a/node_modules/karma/lib/middleware/proxy.js +++ /dev/null @@ -1,100 +0,0 @@ -var url = require('url'); -var httpProxy = require('http-proxy'); - -var log = require('../logger').create('proxy'); - - -var parseProxyConfig = function(proxies) { - var proxyConfig = {}; - var endsWithSlash = function(str) { - return str.substr(-1) === '/'; - }; - - if (!proxies) { - return proxyConfig; - } - - Object.keys(proxies).forEach(function(proxyPath) { - var proxyUrl = proxies[proxyPath]; - var proxyDetails = url.parse(proxyUrl); - var pathname = proxyDetails.pathname; - - // normalize the proxies config - // should we move this to lib/config.js ? - if (endsWithSlash(proxyPath) && !endsWithSlash(proxyUrl)) { - log.warn('proxy "%s" normalized to "%s"', proxyUrl, proxyUrl + '/'); - proxyUrl += '/'; - } - - if (!endsWithSlash(proxyPath) && endsWithSlash(proxyUrl)) { - log.warn('proxy "%s" normalized to "%s"', proxyPath, proxyPath + '/'); - proxyPath += '/'; - } - - if (pathname === '/' && !endsWithSlash(proxyUrl)) { - pathname = ''; - } - - proxyConfig[proxyPath] = { - host: proxyDetails.hostname, - port: proxyDetails.port, - baseProxyUrl: pathname, - https: proxyDetails.protocol === 'https:' - }; - - if (!proxyConfig[proxyPath].port) { - proxyConfig[proxyPath].port = proxyConfig[proxyPath].https ? '443' : '80'; - } - }); - - return proxyConfig; -}; - - -/** - * Returns a handler which understands the proxies and its redirects, along with the proxy to use - * @param proxy A http-proxy.RoutingProxy object with the proxyRequest method - * @param proxies a map of routes to proxy url - * @return {Function} handler function - */ -var createProxyHandler = function(proxy, proxyConfig, proxyValidateSSL) { - var proxies = parseProxyConfig(proxyConfig); - var proxiesList = Object.keys(proxies).sort().reverse(); - - if (!proxiesList.length) { - return function(request, response, next) { - return next(); - }; - } - proxy.on('proxyError', function(err, req) { - if (err.code === 'ECONNRESET' && req.socket.destroyed) { - log.debug('failed to proxy %s (browser hung up the socket)', req.url); - } else { - log.warn('failed to proxy %s (%s)', req.url, err); - } - }); - - return function(request, response, next) { - for (var i = 0; i < proxiesList.length; i++) { - if (request.url.indexOf(proxiesList[i]) === 0) { - var proxiedUrl = proxies[proxiesList[i]]; - - log.debug('proxying request - %s to %s:%s', request.url, proxiedUrl.host, proxiedUrl.port); - request.url = request.url.replace(proxiesList[i], proxiedUrl.baseProxyUrl); - proxy.proxyRequest(request, response, { - host: proxiedUrl.host, - port: proxiedUrl.port, - target: { https: proxiedUrl.https, rejectUnauthorized: proxyValidateSSL } - }); - return; - } - } - - return next(); - }; -}; - - -exports.create = function(/* config.proxies */ proxies, /* config.proxyValidateSSL */ validateSSL) { - return createProxyHandler(new httpProxy.RoutingProxy({changeOrigin: true}), proxies, validateSSL); -}; diff --git a/node_modules/karma/lib/middleware/runner.js b/node_modules/karma/lib/middleware/runner.js deleted file mode 100644 index a318ce90..00000000 --- a/node_modules/karma/lib/middleware/runner.js +++ /dev/null @@ -1,92 +0,0 @@ -/** - * Runner middleware is reponsible for communication with `karma run`. - * - * It basically triggers a test run and streams stdout back. - */ - -var path = require('path'); -var helper = require('../helper'); -var log = require('../logger').create(); -var constant = require('../constants'); -var json = require('connect').json(); - -// TODO(vojta): disable when single-run mode -var createRunnerMiddleware = function(emitter, fileList, capturedBrowsers, reporter, executor, - /* config.hostname */ hostname, /* config.port */ port, /* config.urlRoot */ urlRoot, config) { - - return function(request, response, next) { - - if (request.url !== '/__run__' && request.url !== urlRoot + 'run') { - return next(); - } - - log.debug('Execution (fired by runner)'); - response.writeHead(200); - - if (!capturedBrowsers.length) { - var url = 'http://' + hostname + ':' + port + urlRoot; - - return response.end('No captured browser, open ' + url + '\n'); - } - - json(request, response, function() { - if (!capturedBrowsers.areAllReady([])) { - response.write('Waiting for previous execution...\n'); - } - - emitter.once('run_start', function() { - var responseWrite = response.write.bind(response); - - reporter.addAdapter(responseWrite); - - // clean up, close runner response - emitter.once('run_complete', function(browsers, results) { - reporter.removeAdapter(responseWrite); - response.end(constant.EXIT_CODE + results.exitCode); - }); - }); - - var data = request.body; - log.debug('Setting client.args to ', data.args); - config.client.args = data.args; - - var fullRefresh = true; - - if (helper.isArray(data.changedFiles)) { - data.changedFiles.forEach(function(filepath) { - fileList.changeFile(path.resolve(config.basePath, filepath)); - fullRefresh = false; - }); - } - - if (helper.isArray(data.addedFiles)) { - data.addedFiles.forEach(function(filepath) { - fileList.addFile(path.resolve(config.basePath, filepath)); - fullRefresh = false; - }); - } - - if (helper.isArray(data.removedFiles)) { - data.removedFiles.forEach(function(filepath) { - fileList.removeFile(path.resolve(config.basePath, filepath)); - fullRefresh = false; - }); - } - - if (fullRefresh && data.refresh !== false) { - log.debug('Refreshing all the files / patterns'); - fileList.refresh(); - - if (!config.autoWatch) { - executor.schedule(); - } - } else { - executor.schedule(); - } - }); - }; -}; - - -// PUBLIC API -exports.create = createRunnerMiddleware; diff --git a/node_modules/karma/lib/middleware/source-files.js b/node_modules/karma/lib/middleware/source-files.js deleted file mode 100644 index 551ce772..00000000 --- a/node_modules/karma/lib/middleware/source-files.js +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Source Files middleware is responsible for serving all the source files under the test. - */ - -var querystring = require('querystring'); -var common = require('./common'); -var pause = require('connect').utils.pause; - - -var findByPath = function(files, path) { - for (var i = 0; i < files.length; i++) { - if (files[i].path === path) { - return files[i]; - } - } - - return null; -}; - - -var createSourceFilesMiddleware = function(filesPromise, serveFile, - /* config.basePath */ basePath) { - - return function(request, response, next) { - var requestedFilePath = querystring.unescape(request.url) - .replace(/\?.*/, '') - .replace(/^\/absolute/, '') - .replace(/^\/base/, basePath); - - // Need to pause the request because of proxying, see: - // https://groups.google.com/forum/#!topic/q-continuum/xr8znxc_K5E/discussion - // TODO(vojta): remove once we don't care about Node 0.8 - var pausedRequest = pause(request); - - return filesPromise.then(function(files) { - // TODO(vojta): change served to be a map rather then an array - var file = findByPath(files.served, requestedFilePath); - - if (file) { - serveFile(file.contentPath, response, function() { - if (/\?\d+/.test(request.url)) { - // files with timestamps - cache one year, rely on timestamps - common.setHeavyCacheHeaders(response); - } else { - // without timestamps - no cache (debug) - common.setNoCacheHeaders(response); - } - }); - } else { - next(); - } - - pausedRequest.resume(); - }); - }; -}; - - -// PUBLIC API -exports.create = createSourceFilesMiddleware; diff --git a/node_modules/karma/lib/plugin.js b/node_modules/karma/lib/plugin.js deleted file mode 100644 index d9131014..00000000 --- a/node_modules/karma/lib/plugin.js +++ /dev/null @@ -1,49 +0,0 @@ -var fs = require('fs'); -var path = require('path'); - -var helper = require('./helper'); -var log = require('./logger').create('plugin'); - - -exports.resolve = function(plugins) { - var modules = []; - - var requirePlugin = function(name) { - log.debug('Loading plugin %s.', name); - try { - modules.push(require(name)); - } catch (e) { - if (e.code === 'MODULE_NOT_FOUND' && e.message.indexOf(name) !== -1) { - log.warn('Cannot find plugin "%s".\n Did you forget to install it ?\n' + - ' npm install %s --save-dev', name, name); - } else { - log.warn('Error during loading "%s" plugin:\n %s', name, e.message); - } - } - }; - - plugins.forEach(function(plugin) { - if (helper.isString(plugin)) { - if (plugin.indexOf('*') !== -1) { - var pluginDirectory = path.normalize(__dirname + '/../..'); - var regexp = new RegExp('^' + plugin.replace('*', '.*')); - - log.debug('Loading %s from %s', plugin, pluginDirectory); - fs.readdirSync(pluginDirectory).filter(function(pluginName) { - return regexp.test(pluginName); - }).forEach(function(pluginName) { - requirePlugin(pluginDirectory + '/' + pluginName); - }); - } else { - requirePlugin(plugin); - } - } else if (helper.isObject(plugin)) { - log.debug('Loading inlined plugin (defining %s).', Object.keys(plugin).join(', ')); - modules.push(plugin); - } else { - log.warn('Invalid plugin %s', plugin); - } - }); - - return modules; -}; diff --git a/node_modules/karma/lib/preprocessor.js b/node_modules/karma/lib/preprocessor.js deleted file mode 100644 index b7b1a41b..00000000 --- a/node_modules/karma/lib/preprocessor.js +++ /dev/null @@ -1,73 +0,0 @@ -var fs = require('graceful-fs'); -var crypto = require('crypto'); -var mm = require('minimatch'); - -var log = require('./logger').create('preprocess'); - - -var sha1 = function(data) { - var hash = crypto.createHash('sha1'); - hash.update(data); - return hash.digest('hex'); -}; - -// TODO(vojta): instantiate preprocessors at the start to show warnings immediately -var createPreprocessor = function(config, basePath, injector) { - var patterns = Object.keys(config); - var alreadyDisplayedWarnings = Object.create(null); - - return function(file, done) { - var preprocessors = []; - var nextPreprocessor = function(content) { - if (!preprocessors.length) { - return fs.writeFile(file.contentPath, content, function() { - done(); - }); - } - - preprocessors.shift()(content, file, nextPreprocessor); - }; - var instantiatePreprocessor = function(name) { - if (alreadyDisplayedWarnings[name]) { - return; - } - - try { - preprocessors.push(injector.get('preprocessor:' + name)); - } catch (e) { - if (e.message.indexOf('No provider for "preprocessor:' + name + '"') !== -1) { - log.warn('Can not load "%s", it is not registered!\n ' + - 'Perhaps you are missing some plugin?', name); - } else { - log.warn('Can not load "%s"!\n ' + e.stack, name); - } - - alreadyDisplayedWarnings[name] = true; - } - }; - - // collects matching preprocessors - // TODO(vojta): should we cache this ? - for (var i = 0; i < patterns.length; i++) { - if (mm(file.originalPath, patterns[i])) { - config[patterns[i]].forEach(instantiatePreprocessor); - } - } - - if (preprocessors.length) { - return fs.readFile(file.originalPath, function(err, buffer) { - // TODO(vojta): extract get/create temp dir somewhere else (use the same for launchers etc) - var env = process.env; - var tmp = env.TMPDIR || env.TMP || env.TEMP || '/tmp'; - file.contentPath = tmp + '/' + sha1(file.originalPath) + '.js'; - - nextPreprocessor(buffer.toString()); - }); - } - - return process.nextTick(done); - }; -}; -createPreprocessor.$inject = ['config.preprocessors', 'config.basePath', 'injector']; - -exports.createPreprocessor = createPreprocessor; diff --git a/node_modules/karma/lib/reporter.js b/node_modules/karma/lib/reporter.js deleted file mode 100644 index 342162ce..00000000 --- a/node_modules/karma/lib/reporter.js +++ /dev/null @@ -1,73 +0,0 @@ -var helper = require('./helper'); -var log = require('./logger').create('reporter'); -var MultiReporter = require('./reporters/Multi'); -var baseReporterDecoratorFactory = require('./reporters/Base').decoratorFactory; - -var createErrorFormatter = function(basePath, urlRoot) { - var URL_REGEXP = new RegExp('http:\\/\\/[^\\/]*' + urlRoot.replace(/\//g, '\\/') + - '(base|absolute)([^\\?\\s]*)(\\?[0-9]*)?', 'g'); - - return function(msg, indentation) { - // remove domain and timestamp from source files - // and resolve base path / absolute path urls into absolute path - msg = (msg || '').replace(URL_REGEXP, function(full, prefix, path) { - if (prefix === 'base') { - return basePath + path; - } else if (prefix === 'absolute') { - return path; - } - }); - - // indent every line - if (indentation) { - msg = indentation + msg.replace(/\n/g, '\n' + indentation); - } - - return msg + '\n'; - }; -}; - -createErrorFormatter.$inject = ['config.basePath', 'config.urlRoot']; - - -var createReporters = function(names, config, emitter, injector) { - var errorFormatter = createErrorFormatter(config.basePath, config.urlRoot); - var reporters = []; - - // TODO(vojta): instantiate all reporters through DI - names.forEach(function(name) { - if (['dots', 'progress'].indexOf(name) !== -1) { - var Cls = require('./reporters/' + helper.ucFirst(name) + (config.colors ? 'Color' : '')); - return reporters.push(new Cls(errorFormatter, config.reportSlowerThan)); - } - - var locals = { - baseReporterDecorator: ['factory', baseReporterDecoratorFactory], - formatError: ['factory', createErrorFormatter] - }; - - try { - reporters.push(injector.createChild([locals], ['reporter:' + name]).get('reporter:' + name)); - } catch(e) { - if (e.message.indexOf('No provider for "reporter:' + name + '"') !== -1) { - log.warn('Can not load "%s", it is not registered!\n ' + - 'Perhaps you are missing some plugin?', name); - } else { - log.warn('Can not load "%s"!\n ' + e.stack, name); - } - } - }); - - // bind all reporters - reporters.forEach(function(reporter) { - emitter.bind(reporter); - }); - - return new MultiReporter(reporters); -}; - -createReporters.$inject = ['config.reporters', 'config', 'emitter', 'injector']; - - -// PUBLISH -exports.createReporters = createReporters; diff --git a/node_modules/karma/lib/reporters/Base.js b/node_modules/karma/lib/reporters/Base.js deleted file mode 100644 index c81acca9..00000000 --- a/node_modules/karma/lib/reporters/Base.js +++ /dev/null @@ -1,148 +0,0 @@ -var util = require('util'); - -var helper = require('../helper'); - - -var BaseReporter = function(formatError, reportSlow, adapter) { - this.adapters = [adapter || process.stdout.write.bind(process.stdout)]; - - this.onRunStart = function(browsers) { - this._browsers = browsers; - }; - - - this.renderBrowser = function(browser) { - var results = browser.lastResult; - var totalExecuted = results.success + results.failed; - var msg = util.format('%s: Executed %d of %d', browser, totalExecuted, results.total); - - if (results.failed) { - msg += util.format(this.X_FAILED, results.failed); - } - - if (results.skipped) { - msg += util.format(' (skipped %d)', results.skipped); - } - - if (browser.isReady) { - if (results.disconnected) { - msg += this.FINISHED_DISCONNECTED; - } else if (results.error) { - msg += this.FINISHED_ERROR; - } else if (!results.failed) { - msg += this.FINISHED_SUCCESS; - } - - msg += util.format(' (%s / %s)', helper.formatTimeInterval(results.totalTime), - helper.formatTimeInterval(results.netTime)); - } - - return msg; - }; - - this.renderBrowser = this.renderBrowser.bind(this); - - - this.write = function() { - var msg = util.format.apply(null, Array.prototype.slice.call(arguments)); - - this.adapters.forEach(function(adapter) { - adapter(msg); - }); - }; - - this.writeCommonMsg = this.write; - - - this.onBrowserError = function(browser, error) { - this.writeCommonMsg(util.format(this.ERROR, browser) + formatError(error, '\t')); - }; - - - this.onBrowserLog = function(browser, log, type) { - if (!helper.isString(log)) { - // TODO(vojta): change util to new syntax (config object) - log = util.inspect(log, false, undefined, this.USE_COLORS); - } - - if (this._browsers && this._browsers.length === 1) { - this.writeCommonMsg(util.format(this.LOG_SINGLE_BROWSER, type.toUpperCase(), log)); - } else { - this.writeCommonMsg(util.format(this.LOG_MULTI_BROWSER, browser, type.toUpperCase(), log)); - } - }; - - - this.onSpecComplete = function(browser, result) { - if (result.skipped) { - this.specSkipped(browser, result); - } else if (result.success) { - this.specSuccess(browser, result); - } else { - this.specFailure(browser, result); - } - - if (reportSlow && result.time > reportSlow) { - var specName = result.suite.join(' ') + ' ' + result.description; - var time = helper.formatTimeInterval(result.time); - - this.writeCommonMsg(util.format(this.SPEC_SLOW, browser, time, specName)); - } - }; - - - this.specSuccess = this.specSkipped = function() {}; - - - this.specFailure = function(browser, result) { - var specName = result.suite.join(' ') + ' ' + result.description; - var msg = util.format(this.SPEC_FAILURE, browser, specName); - - result.log.forEach(function(log) { - msg += formatError(log, '\t'); - }); - - this.writeCommonMsg(msg); - }; - - - this.onRunComplete = function(browsers, results) { - if (browsers.length > 1 && !results.error && !results.disconnected) { - if (!results.failed) { - this.write(this.TOTAL_SUCCESS, results.success); - } else { - this.write(this.TOTAL_FAILED, results.failed, results.success); - } - } - }; - - this.USE_COLORS = false; - - this.LOG_SINGLE_BROWSER = 'LOG: %s\n'; - this.LOG_MULTI_BROWSER = '%s LOG: %s\n'; - - this.SPEC_FAILURE = '%s %s FAILED' + '\n'; - this.SPEC_SLOW = '%s SLOW %s: %s\n'; - this.ERROR = '%s ERROR\n'; - - this.FINISHED_ERROR = ' ERROR'; - this.FINISHED_SUCCESS = ' SUCCESS'; - this.FINISHED_DISCONNECTED = ' DISCONNECTED'; - - this.X_FAILED = ' (%d FAILED)'; - - this.TOTAL_SUCCESS = 'TOTAL: %d SUCCESS\n'; - this.TOTAL_FAILED = 'TOTAL: %d FAILED, %d SUCCESS\n'; -}; - -BaseReporter.decoratorFactory = function(formatError, reportSlow) { - return function(self) { - BaseReporter.call(self, formatError, reportSlow); - }; -}; - -BaseReporter.decoratorFactory.$inject = ['formatError', 'config.reportSlowerThan']; - - -// PUBLISH -module.exports = BaseReporter; diff --git a/node_modules/karma/lib/reporters/BaseColor.js b/node_modules/karma/lib/reporters/BaseColor.js deleted file mode 100644 index b1aa8d6b..00000000 --- a/node_modules/karma/lib/reporters/BaseColor.js +++ /dev/null @@ -1,25 +0,0 @@ -require('colors'); - -var BaseColorReporter = function() { - this.USE_COLORS = true; - - this.LOG_SINGLE_BROWSER = '%s: ' + '%s'.cyan + '\n'; - this.LOG_MULTI_BROWSER = '%s %s: ' + '%s'.cyan + '\n'; - - this.SPEC_FAILURE = '%s %s FAILED'.red + '\n'; - this.SPEC_SLOW = '%s SLOW %s: %s'.yellow + '\n'; - this.ERROR = '%s ERROR'.red + '\n'; - - this.FINISHED_ERROR = ' ERROR'.red; - this.FINISHED_SUCCESS = ' SUCCESS'.green; - this.FINISHED_DISCONNECTED = ' DISCONNECTED'.red; - - this.X_FAILED = ' (%d FAILED)'.red; - - this.TOTAL_SUCCESS = 'TOTAL: %d SUCCESS'.green + '\n'; - this.TOTAL_FAILED = 'TOTAL: %d FAILED, %d SUCCESS'.red + '\n'; -}; - - -// PUBLISH -module.exports = BaseColorReporter; diff --git a/node_modules/karma/lib/reporters/Dots.js b/node_modules/karma/lib/reporters/Dots.js deleted file mode 100644 index 77a2bb97..00000000 --- a/node_modules/karma/lib/reporters/Dots.js +++ /dev/null @@ -1,45 +0,0 @@ -var BaseReporter = require('./Base'); - - -var DotsReporter = function(formatError, reportSlow) { - BaseReporter.call(this, formatError, reportSlow); - - var DOTS_WRAP = 80; - - this.onRunStart = function(browsers) { - this._browsers = browsers; - this._dotsCount = 0; - }; - - this.writeCommonMsg = function(msg) { - if (this._dotsCount) { - this._dotsCount = 0; - msg = '\n' + msg; - } - - this.write(msg); - - }; - - - this.specSuccess = function() { - this._dotsCount = (this._dotsCount + 1) % DOTS_WRAP; - this.write(this._dotsCount ? '.' : '.\n'); - }; - - this.onRunComplete = function(browsers, results) { - this.writeCommonMsg(browsers.map(this.renderBrowser).join('\n') + '\n'); - - if (browsers.length > 1 && !results.disconnected && !results.error) { - if (!results.failed) { - this.write(this.TOTAL_SUCCESS, results.success); - } else { - this.write(this.TOTAL_FAILED, results.failed, results.success); - } - } - }; -}; - - -// PUBLISH -module.exports = DotsReporter; diff --git a/node_modules/karma/lib/reporters/DotsColor.js b/node_modules/karma/lib/reporters/DotsColor.js deleted file mode 100644 index c6654ca3..00000000 --- a/node_modules/karma/lib/reporters/DotsColor.js +++ /dev/null @@ -1,12 +0,0 @@ -var DotsReporter = require('./Dots'); -var BaseColorReporter = require('./BaseColor'); - - -var DotsColorReporter = function(formatError, reportSlow) { - DotsReporter.call(this, formatError, reportSlow); - BaseColorReporter.call(this); -}; - - -// PUBLISH -module.exports = DotsColorReporter; diff --git a/node_modules/karma/lib/reporters/Multi.js b/node_modules/karma/lib/reporters/Multi.js deleted file mode 100644 index 11d1db08..00000000 --- a/node_modules/karma/lib/reporters/Multi.js +++ /dev/null @@ -1,21 +0,0 @@ -var helper = require('../helper'); - - -var MultiReporter = function(reporters) { - - this.addAdapter = function(adapter) { - reporters.forEach(function(reporter) { - reporter.adapters.push(adapter); - }); - }; - - this.removeAdapter = function(adapter) { - reporters.forEach(function(reporter) { - helper.arrayRemove(reporter.adapters, adapter); - }); - }; -}; - - -// PUBLISH -module.exports = MultiReporter; diff --git a/node_modules/karma/lib/reporters/Progress.js b/node_modules/karma/lib/reporters/Progress.js deleted file mode 100644 index d941a693..00000000 --- a/node_modules/karma/lib/reporters/Progress.js +++ /dev/null @@ -1,57 +0,0 @@ -var BaseReporter = require('./Base'); - - -var ProgressReporter = function(formatError, reportSlow) { - BaseReporter.call(this, formatError, reportSlow); - - - this.writeCommonMsg = function(msg) { - this.write(this._remove() + msg + this._render()); - }; - - - this.specSuccess = function() { - this.write(this._refresh()); - }; - - - this.onBrowserComplete = function() { - this.write(this._refresh()); - }; - - - this.onRunStart = function(browsers) { - this._browsers = browsers; - this._isRendered = false; - }; - - - this._remove = function() { - if (!this._isRendered) { - return ''; - } - - var cmd = ''; - this._browsers.forEach(function() { - cmd += '\x1B[1A' + '\x1B[2K'; - }); - - this._isRendered = false; - - return cmd; - }; - - this._render = function() { - this._isRendered = true; - - return this._browsers.map(this.renderBrowser).join('\n') + '\n'; - }; - - this._refresh = function() { - return this._remove() + this._render(); - }; -}; - - -// PUBLISH -module.exports = ProgressReporter; diff --git a/node_modules/karma/lib/reporters/ProgressColor.js b/node_modules/karma/lib/reporters/ProgressColor.js deleted file mode 100644 index 36da53c5..00000000 --- a/node_modules/karma/lib/reporters/ProgressColor.js +++ /dev/null @@ -1,12 +0,0 @@ -var ProgressReporter = require('./Progress'); -var BaseColorReporter = require('./BaseColor'); - - -var ProgressColorReporter = function(formatError, reportSlow) { - ProgressReporter.call(this, formatError, reportSlow); - BaseColorReporter.call(this); -}; - - -// PUBLISH -module.exports = ProgressColorReporter; diff --git a/node_modules/karma/lib/runner.js b/node_modules/karma/lib/runner.js deleted file mode 100644 index cffcf8d4..00000000 --- a/node_modules/karma/lib/runner.js +++ /dev/null @@ -1,70 +0,0 @@ -var http = require('http'); - -var constant = require('./constants'); -var helper = require('./helper'); -var cfg = require('./config'); - - -var parseExitCode = function(buffer, defaultCode) { - var tailPos = buffer.length - Buffer.byteLength(constant.EXIT_CODE) - 1; - - if (tailPos < 0) { - return defaultCode; - } - - // tail buffer which might contain the message - var tail = buffer.slice(tailPos); - var tailStr = tail.toString(); - if (tailStr.substr(0, tailStr.length - 1) === constant.EXIT_CODE) { - tail.fill('\x00'); - return parseInt(tailStr.substr(-1), 10); - } - - return defaultCode; -}; - - -// TODO(vojta): read config file (port, host, urlRoot) -exports.run = function(config, done) { - done = helper.isFunction(done) ? done : process.exit; - config = cfg.parseConfig(config.configFile, config); - - var exitCode = 1; - var options = { - hostname: config.hostname, - path: config.urlRoot + 'run', - port: config.port, - method: 'POST', - headers: { - 'Content-Type': 'application/json' - } - }; - - var request = http.request(options, function(response) { - response.on('data', function(buffer) { - exitCode = parseExitCode(buffer, exitCode); - process.stdout.write(buffer); - }); - - response.on('end', function() { - done(exitCode); - }); - }); - - request.on('error', function(e) { - if (e.code === 'ECONNREFUSED') { - console.error('There is no server listening on port %d', options.port); - done(1); - } else { - throw e; - } - }); - - request.end(JSON.stringify({ - args: config.clientArgs, - removedFiles: config.removedFiles, - changedFiles: config.changedFiles, - addedFiles: config.addedFiles, - refresh: config.refresh - })); -}; diff --git a/node_modules/karma/lib/server.js b/node_modules/karma/lib/server.js deleted file mode 100644 index 454a1f78..00000000 --- a/node_modules/karma/lib/server.js +++ /dev/null @@ -1,206 +0,0 @@ -var io = require('socket.io'); -var di = require('di'); - -var cfg = require('./config'); -var logger = require('./logger'); -var browser = require('./browser'); -var constant = require('./constants'); -var watcher = require('./watcher'); -var plugin = require('./plugin'); - -var ws = require('./web-server'); -var preprocessor = require('./preprocessor'); -var Launcher = require('./launcher').Launcher; -var FileList = require('./file-list').List; -var reporter = require('./reporter'); -var helper = require('./helper'); -var events = require('./events'); -var EventEmitter = events.EventEmitter; -var Executor = require('./executor'); - -var log = logger.create(); - - -var start = function(injector, config, launcher, globalEmitter, preprocess, fileList, webServer, - capturedBrowsers, socketServer, executor, done) { - - config.frameworks.forEach(function(framework) { - injector.get('framework:' + framework); - }); - - var filesPromise = fileList.refresh(); - - if (config.autoWatch) { - filesPromise.then(function() { - injector.invoke(watcher.watch); - }); - } - - webServer.on('error', function(e) { - if (e.code === 'EADDRINUSE') { - log.warn('Port %d in use', config.port); - config.port++; - webServer.listen(config.port); - } else { - throw e; - } - }); - - webServer.listen(config.port, function() { - log.info('Karma v%s server started at http://%s:%s%s', constant.VERSION, config.hostname, - config.port, config.urlRoot); - - if (config.browsers && config.browsers.length) { - injector.invoke(launcher.launch, launcher); - } - }); - - globalEmitter.on('browsers_change', function() { - // TODO(vojta): send only to interested browsers - socketServer.sockets.emit('info', capturedBrowsers.serialize()); - }); - - globalEmitter.on('browser_register', function(browser) { - // TODO(vojta): use just id - if (browser.launchId) { - launcher.markCaptured(browser.launchId); - } - - // TODO(vojta): This is lame, browser can get captured and then crash (before other browsers get - // captured). - if ((config.autoWatch || config.singleRun) && launcher.areAllCaptured()) { - executor.schedule(); - } - }); - - globalEmitter.on('run_complete', function(browsers, results) { - if (config.singleRun) { - disconnectBrowsers(results.exitCode); - } - }); - - var EVENTS_TO_REPLY = ['start', 'info', 'error', 'result', 'complete']; - socketServer.sockets.on('connection', function (socket) { - log.debug('A browser has connected on socket ' + socket.id); - - var replySocketEvents = events.bufferEvents(socket, EVENTS_TO_REPLY); - - socket.on('register', function(info) { - var newBrowser; - - if (info.id) { - newBrowser = capturedBrowsers.getById(info.id); - } - - if (newBrowser) { - newBrowser.onReconnect(socket); - } else { - newBrowser = injector.createChild([{ - id: ['value', info.id || null], - fullName: ['value', info.name], - socket: ['value', socket] - }]).instantiate(browser.Browser); - - newBrowser.init(); - } - - replySocketEvents(); - }); - }); - - if (config.autoWatch) { - globalEmitter.on('file_list_modified', function() { - log.debug('List of files has changed, trying to execute'); - executor.schedule(); - }); - } - - var disconnectBrowsers = function(code) { - // Slightly hacky way of removing disconnect listeners - // to suppress "browser disconnect" warnings - // TODO(vojta): change the client to not send the event (if disconnected by purpose) - var sockets = socketServer.sockets.sockets; - Object.getOwnPropertyNames(sockets).forEach(function(key) { - sockets[key].removeAllListeners('disconnect'); - }); - - globalEmitter.emitAsync('exit').then(function() { - done(code || 0); - }); - }; - - - if (config.singleRun) { - globalEmitter.on('browser_process_failure', function(browser) { - log.debug('%s failed to capture, aborting the run.', browser); - disconnectBrowsers(1); - }); - } - - try { - process.on('SIGINT', disconnectBrowsers); - process.on('SIGTERM', disconnectBrowsers); - } catch (e) { - // Windows doesn't support signals yet, so they simply don't get this handling. - // https://github.com/joyent/node/issues/1553 - } - - // Handle all unhandled exceptions, so we don't just exit but - // disconnect the browsers before exiting. - process.on('uncaughtException', function(error) { - log.error(error); - disconnectBrowsers(1); - }); -}; -start.$inject = ['injector', 'config', 'launcher', 'emitter', 'preprocess', 'fileList', - 'webServer', 'capturedBrowsers', 'socketServer', 'executor', 'done']; - - -var createSocketIoServer = function(webServer, executor, config) { - var server = io.listen(webServer, { - logger: logger.create('socket.io', constant.LOG_ERROR), - resource: config.urlRoot + 'socket.io', - transports: config.transports - }); - - // hack to overcome circular dependency - executor.socketIoSockets = server.sockets; - - return server; -}; - - -exports.start = function(cliOptions, done) { - // apply the default logger config as soon as we can - logger.setup(constant.LOG_INFO, true, [constant.CONSOLE_APPENDER]); - - var config = cfg.parseConfig(cliOptions.configFile, cliOptions); - var modules = [{ - helper: ['value', helper], - logger: ['value', logger], - done: ['value', done || process.exit], - emitter: ['type', EventEmitter], - launcher: ['type', Launcher], - config: ['value', config], - preprocess: ['factory', preprocessor.createPreprocessor], - fileList: ['type', FileList], - webServer: ['factory', ws.create], - socketServer: ['factory', createSocketIoServer], - executor: ['type', Executor], - // TODO(vojta): remove - customFileHandlers: ['value', []], - // TODO(vojta): remove, once karma-dart does not rely on it - customScriptTypes: ['value', []], - reporter: ['factory', reporter.createReporters], - capturedBrowsers: ['type', browser.Collection], - args: ['value', {}], - timer: ['value', {setTimeout: setTimeout, clearTimeout: clearTimeout}] - }]; - - // load the plugins - modules = modules.concat(plugin.resolve(config.plugins)); - - var injector = new di.Injector(modules); - - injector.invoke(start); -}; diff --git a/node_modules/karma/lib/watcher.js b/node_modules/karma/lib/watcher.js deleted file mode 100644 index f430dbe0..00000000 --- a/node_modules/karma/lib/watcher.js +++ /dev/null @@ -1,101 +0,0 @@ -var chokidar = require('chokidar'); -var mm = require('minimatch'); - -var helper = require('./helper'); -var log = require('./logger').create('watcher'); - -var DIR_SEP = require('path').sep; - -// Get parent folder, that be watched (does not contain any special globbing character) -var baseDirFromPattern = function(pattern) { - return pattern.replace(/\/[^\/]*\*.*$/, '') // remove parts with * - .replace(/\/[^\/]*[\!\+]\(.*$/, '') // remove parts with !(...) and +(...) - .replace(/\/[^\/]*\)\?.*$/, '') || '/'; // remove parts with (...)? -}; - -var watchPatterns = function(patterns, watcher) { - // filter only unique non url patterns paths - var pathsToWatch = []; - var uniqueMap = {}; - var path; - - patterns.forEach(function(pattern) { - path = baseDirFromPattern(pattern); - if (!uniqueMap[path]) { - uniqueMap[path] = true; - pathsToWatch.push(path); - } - }); - - // watch only common parents, no sub paths - pathsToWatch.forEach(function(path) { - if (!pathsToWatch.some(function(p) { - return p !== path && path.substr(0, p.length + 1) === p + DIR_SEP; - })) { - watcher.add(path); - log.debug('Watching "%s"', path); - } - }); -}; - -// Function to test if a path should be ignored by chokidar. -var createIgnore = function(patterns, excludes) { - return function(path, stat) { - if (!stat || stat.isDirectory()) { - return false; - } - - // Check if the path matches any of the watched patterns. - if (!patterns.some(function(pattern) { - return mm(path, pattern, {dot: true}); - })) { - return true; - } - - // Check if the path matches any of the exclude patterns. - if (excludes.some(function(pattern) { - return mm(path, pattern, {dot: true}); - })) { - return true; - } - - return false; - }; -}; - -var onlyWatchedTrue = function(pattern) { - return pattern.watched; -}; - -var getWatchedPatterns = function(patternObjects) { - return patternObjects.filter(onlyWatchedTrue).map(function(patternObject) { - return patternObject.pattern; - }); -}; - -exports.watch = function(patterns, excludes, fileList) { - var watchedPatterns = getWatchedPatterns(patterns); - var options = { - ignorePermissionErrors: true, - ignoreInitial: true, - ignored: createIgnore(watchedPatterns, excludes) - }; - var chokidarWatcher = new chokidar.FSWatcher(options); - - watchPatterns(watchedPatterns, chokidarWatcher); - - var bind = function(fn) { - return function(path) { - return fn.call(fileList, helper.normalizeWinPath(path)); - }; - }; - - // register events - chokidarWatcher.on('add', bind(fileList.addFile)) - .on('change', bind(fileList.changeFile)) - .on('unlink', bind(fileList.removeFile)); - - return chokidarWatcher; -}; - -exports.watch.$inject = ['config.files', 'config.exclude', 'fileList']; diff --git a/node_modules/karma/lib/web-server.js b/node_modules/karma/lib/web-server.js deleted file mode 100644 index cc5558a1..00000000 --- a/node_modules/karma/lib/web-server.js +++ /dev/null @@ -1,70 +0,0 @@ -var fs = require('fs'); -var http = require('http'); -var path = require('path'); -var connect = require('connect'); - -var common = require('./middleware/common'); -var runnerMiddleware = require('./middleware/runner'); -var karmaMiddleware = require('./middleware/karma'); -var sourceFilesMiddleware = require('./middleware/source-files'); -var proxyMiddleware = require('./middleware/proxy'); - - -var createCustomHandler = function(customFileHandlers, /* config.basePath */ basePath) { - return function(request, response, next) { - for (var i = 0; i < customFileHandlers.length; i++) { - if (customFileHandlers[i].urlRegex.test(request.url)) { - return customFileHandlers[i].handler(request, response, 'fake/static', 'fake/adapter', - basePath, 'fake/root'); - } - } - - return next(); - }; -}; - - -var createWebServer = function(injector, emitter) { - var serveStaticFile = common.createServeFile(fs, path.normalize(__dirname + '/../static')); - var serveFile = common.createServeFile(fs); - var filesPromise = new common.PromiseContainer(); - - emitter.on('file_list_modified', function(files) { - filesPromise.set(files); - }); - - // locals for webserver module - // NOTE(vojta): figure out how to do this with DI - injector = injector.createChild([{ - serveFile: ['value', serveFile], - serveStaticFile: ['value', serveStaticFile], - filesPromise: ['value', filesPromise] - }]); - - // TODO(vojta): remove if https://github.com/senchalabs/connect/pull/850 gets merged - var compressOptions = { - filter: function(req, res){ - return (/json|text|javascript|dart/).test(res.getHeader('Content-Type')); - } - }; - - var handler = connect() - .use(connect.compress(compressOptions)) - .use(injector.invoke(runnerMiddleware.create)) - .use(injector.invoke(karmaMiddleware.create)) - .use(injector.invoke(sourceFilesMiddleware.create)) - // TODO(vojta): extract the proxy into a plugin - .use(injector.invoke(proxyMiddleware.create)) - // TODO(vojta): remove, this is only here because of karma-dart - // we need a better way of custom handlers - .use(injector.invoke(createCustomHandler)) - .use(function(request, response) { - common.serve404(response, request.url); - }); - - return http.createServer(handler); -}; - - -// PUBLIC API -exports.create = createWebServer; diff --git a/node_modules/karma/node_modules/.bin/cake b/node_modules/karma/node_modules/.bin/cake deleted file mode 100755 index 5965f4ee..00000000 --- a/node_modules/karma/node_modules/.bin/cake +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/cake').run(); diff --git a/node_modules/karma/node_modules/.bin/coffee b/node_modules/karma/node_modules/.bin/coffee deleted file mode 100755 index 3d1d71c8..00000000 --- a/node_modules/karma/node_modules/.bin/coffee +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/command').run(); diff --git a/node_modules/karma/node_modules/.bin/node-http-proxy b/node_modules/karma/node_modules/.bin/node-http-proxy deleted file mode 100755 index 07d199ca..00000000 --- a/node_modules/karma/node_modules/.bin/node-http-proxy +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'), - fs = require('fs'), - util = require('util'), - argv = require('optimist').argv, - httpProxy = require('../lib/node-http-proxy'); - -var help = [ - "usage: node-http-proxy [options] ", - "", - "Starts a node-http-proxy server using the specified command-line options", - "", - "options:", - " --port PORT Port that the proxy server should run on", - " --host HOST Host that the proxy server should run on", - " --target HOST:PORT Location of the server the proxy will target", - " --config OUTFILE Location of the configuration file for the proxy server", - " --silent Silence the log output from the proxy server", - " --user USER User to drop privileges to once server socket is bound", - " -h, --help You're staring at it" -].join('\n'); - -if (argv.h || argv.help || Object.keys(argv).length === 2) { - return util.puts(help); -} - -var location, config = {}, - port = argv.port || 80, - host = argv.host || undefined, - target = argv.target; - user = argv.user; - -// -// If we were passed a config, parse it -// -if (argv.config) { - try { - var data = fs.readFileSync(argv.config); - config = JSON.parse(data.toString()); - } catch (ex) { - util.puts('Error starting node-http-proxy: ' + ex); - process.exit(1); - } -} - -// -// If `config.https` is set, then load the required file contents into the config options. -// -if (config.https) { - Object.keys(config.https).forEach(function (key) { - // If CA certs are specified, load those too. - if (key === "ca") { - for (var i=0; i < config.https.ca.length; i++) { - if (config.https.ca === undefined) { - config.https.ca = []; - } - config.https.ca[i] = fs.readFileSync(config.https[key][i], 'utf8'); - } - } else { - config.https[key] = fs.readFileSync(config.https[key], 'utf8'); - } - }); -} - -// -// Check to see if we should silence the logs -// -config.silent = typeof argv.silent !== 'undefined' ? argv.silent : config.silent; - -// -// If we were passed a target, parse the url string -// -if (typeof target === 'string') location = target.split(':'); - -// -// Create the server with the specified options -// -var server; -if (location) { - var targetPort = location.length === 1 ? 80 : parseInt(location[1]); - server = httpProxy.createServer(targetPort, location[0], config); -} -else if (config.router) { - server = httpProxy.createServer(config); -} -else { - return util.puts(help); -} - -// -// Start the server -// -if (host) { - server.listen(port, host); -} else { - server.listen(port); -} - - -// -// Drop privileges if requested -// -if (typeof user === 'string') { - process.setuid(user); -} - -// -// Notify that the server is started -// -if (!config.silent) { - util.puts('node-http-proxy server now listening on port: ' + port); -} diff --git a/node_modules/karma/node_modules/chokidar/.npmignore b/node_modules/karma/node_modules/chokidar/.npmignore deleted file mode 100644 index a6a62d62..00000000 --- a/node_modules/karma/node_modules/chokidar/.npmignore +++ /dev/null @@ -1,35 +0,0 @@ -*~ -*.bak -*.diff -*.err -*.orig -*.log -*.rej -*.swo -*.swp -*.vi -*.sass-cache - -.cache -.project -.settings -.tmproj -nbproject - -# Dreamweaver added files -_notes -dwsync.xml - -# Komodo -*.komodoproject -.komodotools - -# Folders to ignore -intermediate -publish -.idea - -*.sublime-project -*.sublime-workspace - -test/fixtures/subdir/ diff --git a/node_modules/karma/node_modules/chokidar/CHANGELOG.md b/node_modules/karma/node_modules/chokidar/CHANGELOG.md deleted file mode 100644 index ad76049d..00000000 --- a/node_modules/karma/node_modules/chokidar/CHANGELOG.md +++ /dev/null @@ -1,79 +0,0 @@ -# Chokidar 0.7.1 (18 November 2013) -* `Watcher#close` now also removes all event listeners. - -# Chokidar 0.7.0 (22 October 2013) -* When `options.ignored` is two-argument function, it will - also be called after stating the FS, with `stats` argument. -* `unlink` is no longer emitted on directories. - -# Chokidar 0.6.3 (12 August 2013) -* Added `usePolling` option (default: `true`). - When `false`, chokidar will use `fs.watch` as backend. - `fs.watch` is much faster, but not like super reliable. - -# Chokidar 0.6.2 (19 March 2013) -* Fixed watching initially empty directories with `ignoreInitial` option. - -# Chokidar 0.6.1 (19 March 2013) -* Added node.js 0.10 support. - -# Chokidar 0.6.0 (10 March 2013) -* File attributes (stat()) are now passed to `add` and `change` events - as second arguments. -* Changed default polling interval for binary files to 300ms. - -# Chokidar 0.5.3 (13 January 2013) -* Removed emitting of `change` events before `unlink`. - -# Chokidar 0.5.2 (13 January 2013) -* Removed postinstall script to prevent various npm bugs. - -# Chokidar 0.5.1 (6 January 2013) -* When starting to watch non-existing paths, chokidar will no longer throw -ENOENT error. -* Fixed bug with absolute path. - -# Chokidar 0.5.0 (9 December 2012) -* Added a bunch of new options: - * `ignoreInitial` that allows to ignore initial `add` events. - * `ignorePermissionErrors` that allows to ignore ENOENT etc perm errors. - * `interval` and `binaryInterval` that allow to change default - fs polling intervals. - -# Chokidar 0.4.0 (26 July 2012) -* Added `all` event that receives two args (event name and path) that -combines `add`, `change` and `unlink` events. -* Switched to `fs.watchFile` on node.js 0.8 on windows. -* Files are now correctly unwatched after unlink. - -# Chokidar 0.3.0 (24 June 2012) -* `unlink` event are no longer emitted for directories, for consistency -with `add`. - -# Chokidar 0.2.6 (8 June 2012) -* Prevented creating of duplicate 'add' events. - -# Chokidar 0.2.5 (8 June 2012) -* Fixed a bug when new files in new directories hadn't been added. - -# Chokidar 0.2.4 (7 June 2012) -* Fixed a bug when unlinked files emitted events after unlink. - -# Chokidar 0.2.3 (12 May 2012) -* Fixed watching of files on windows. - -# Chokidar 0.2.2 (4 May 2012) -* Fixed watcher signature. - -# Chokidar 0.2.1 (4 May 2012) -* Fixed invalid API bug when using `watch()`. - -# Chokidar 0.2.0 (4 May 2012) -* Rewritten in js. - -# Chokidar 0.1.1 (26 April 2012) -* Changed api to `chokidar.watch()`. -* Fixed compilation on windows. - -# Chokidar 0.1.0 (20 April 2012) -* Initial release. diff --git a/node_modules/karma/node_modules/chokidar/README.md b/node_modules/karma/node_modules/chokidar/README.md deleted file mode 100644 index cda83e50..00000000 --- a/node_modules/karma/node_modules/chokidar/README.md +++ /dev/null @@ -1,109 +0,0 @@ -# Chokidar -A neat wrapper around node.js fs.watch / fs.watchFile. - -[![NPM](https://nodei.co/npm-dl/chokidar.png)](https://nodei.co/npm/chokidar/) - -## Why? -Node.js `fs.watch`: - -* Doesn't report filenames on mac. -* Doesn't report events at all when using editors like TextMate2 on mac. -* Sometimes reports events twice. -* Has only one non-useful event: `rename`. -* Has [a lot of other issues](https://github.com/joyent/node/search?q=fs.watch&type=Issues) - -Node.js `fs.watchFile`: - -* Almost as shitty in event tracking. - -Chokidar resolves these problems. - -It is used in -[brunch](http://brunch.io), -[socketstream](http://www.socketstream.org), -and [karma](http://karma-runner.github.io) -and has proven itself in production environments. - -## Getting started -Install chokidar via node.js package manager: - - npm install chokidar - -Then just require the package in your code: - -```javascript -var chokidar = require('chokidar'); - -var watcher = chokidar.watch('file or dir', {ignored: /^\./, persistent: true}); - -watcher - .on('add', function(path) {console.log('File', path, 'has been added');}) - .on('change', function(path) {console.log('File', path, 'has been changed');}) - .on('unlink', function(path) {console.log('File', path, 'has been removed');}) - .on('error', function(error) {console.error('Error happened', error);}) - -// 'add' and 'change' events also receive stat() results as second argument. -// http://nodejs.org/api/fs.html#fs_class_fs_stats -watcher.on('change', function(path, stats) { - console.log('File', path, 'changed size to', stats.size); -}); - -watcher.add('new-file'); -watcher.add(['new-file-2', 'new-file-3']); - -// Only needed if watching is persistent. -watcher.close(); -``` - -## API -* `chokidar.watch(paths, options)`: takes paths to be watched and options: - * `options.ignored` (regexp or function) files to be ignored. - This function or regexp is tested against the **whole path**, - not just filename. If it is a function with two arguments, it gets called - twice per path - once with a single argument (the path), second time with - two arguments (the path and the [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats) - object of that path). - * `options.persistent` (default: `false`). Indicates whether the process - should continue to run as long as files are being watched. - * `options.ignorePermissionErrors` (default: `false`). Indicates - whether to watch files that don't have read permissions. - * `options.ignoreInitial` (default: `false`). Indicates whether chokidar - should ignore the initial `add` events or not. - * `options.interval` (default: `100`). Interval of file system polling. - * `options.binaryInterval` (default: `300`). Interval of file system - polling for binary files (see extensions in src/is-binary). - * `options.usePolling` (default: `true`). Whether to use fs.watchFile - (backed by polling), or fs.watch. If polling leads to high CPU utilization, - consider setting this to `false`. - -`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`: - -* `.add(file / files)`: Add directories / files for tracking. -Takes an array of strings (file paths) or just one path. -* `.on(event, callback)`: Listen for an FS event. -Available events: `add`, `change`, `unlink`, `error`. -Additionally `all` is available which gets emitted for every `add`, `change` and `unlink`. -* `.close()`: Removes all listeners from watched files. - -## License -The MIT license. - -Copyright (c) 2013 Paul Miller (http://paulmillr.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/node_modules/karma/node_modules/chokidar/lib/index.js b/node_modules/karma/node_modules/chokidar/lib/index.js deleted file mode 100644 index 05027c9d..00000000 --- a/node_modules/karma/node_modules/chokidar/lib/index.js +++ /dev/null @@ -1,270 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -'use strict'; -var EventEmitter, FSWatcher, fs, isBinary, nodeVersion, sysPath, - __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __slice = [].slice; - -EventEmitter = require('events').EventEmitter; - -fs = require('fs'); - -sysPath = require('path'); - -isBinary = require('./is-binary'); - -nodeVersion = process.versions.node.substring(0, 3); - -exports.FSWatcher = FSWatcher = (function(_super) { - __extends(FSWatcher, _super); - - function FSWatcher(options) { - var _base, _base1, _base2, _base3, _base4, _base5, - _this = this; - this.options = options != null ? options : {}; - this.close = __bind(this.close, this); - this.add = __bind(this.add, this); - this._handle = __bind(this._handle, this); - this._handleDir = __bind(this._handleDir, this); - this._handleFile = __bind(this._handleFile, this); - this._watch = __bind(this._watch, this); - this._remove = __bind(this._remove, this); - this._hasReadPermissions = __bind(this._hasReadPermissions, this); - this._removeFromWatchedDir = __bind(this._removeFromWatchedDir, this); - this._addToWatchedDir = __bind(this._addToWatchedDir, this); - this._getWatchedDir = __bind(this._getWatchedDir, this); - FSWatcher.__super__.constructor.apply(this, arguments); - this.watched = Object.create(null); - this.watchers = []; - if ((_base = this.options).persistent == null) { - _base.persistent = false; - } - if ((_base1 = this.options).ignoreInitial == null) { - _base1.ignoreInitial = false; - } - if ((_base2 = this.options).ignorePermissionErrors == null) { - _base2.ignorePermissionErrors = false; - } - if ((_base3 = this.options).interval == null) { - _base3.interval = 100; - } - if ((_base4 = this.options).binaryInterval == null) { - _base4.binaryInterval = 300; - } - if ((_base5 = this.options).usePolling == null) { - _base5.usePolling = true; - } - this.enableBinaryInterval = this.options.binaryInterval !== this.options.interval; - this._ignored = (function(ignored) { - switch (toString.call(ignored)) { - case '[object RegExp]': - return function(string) { - return ignored.test(string); - }; - case '[object Function]': - return ignored; - default: - return function() { - return false; - }; - } - })(this.options.ignored); - Object.freeze(this.options); - } - - FSWatcher.prototype._getWatchedDir = function(directory) { - var dir, _base; - dir = directory.replace(/[\\\/]$/, ''); - return (_base = this.watched)[dir] != null ? (_base = this.watched)[dir] : _base[dir] = []; - }; - - FSWatcher.prototype._addToWatchedDir = function(directory, file) { - var watchedFiles; - watchedFiles = this._getWatchedDir(directory); - return watchedFiles.push(file); - }; - - FSWatcher.prototype._removeFromWatchedDir = function(directory, file) { - var watchedFiles, - _this = this; - watchedFiles = this._getWatchedDir(directory); - return watchedFiles.some(function(watchedFile, index) { - if (watchedFile === file) { - watchedFiles.splice(index, 1); - return true; - } - }); - }; - - FSWatcher.prototype._hasReadPermissions = function(stats) { - return Boolean(4 & parseInt((stats.mode & 0x1ff).toString(8)[0])); - }; - - FSWatcher.prototype._remove = function(directory, item) { - var fullPath, isDirectory, nestedDirectoryChildren, - _this = this; - fullPath = sysPath.join(directory, item); - isDirectory = this.watched[fullPath]; - nestedDirectoryChildren = this._getWatchedDir(fullPath).slice(); - this._removeFromWatchedDir(directory, item); - nestedDirectoryChildren.forEach(function(nestedItem) { - return _this._remove(fullPath, nestedItem); - }); - if (this.options.usePolling) { - fs.unwatchFile(fullPath); - } - delete this.watched[fullPath]; - if (!isDirectory) { - return this.emit('unlink', fullPath); - } - }; - - FSWatcher.prototype._watch = function(item, itemType, callback) { - var basename, directory, options, parent, watcher, - _this = this; - if (callback == null) { - callback = (function() {}); - } - directory = sysPath.dirname(item); - basename = sysPath.basename(item); - parent = this._getWatchedDir(directory); - options = { - persistent: this.options.persistent - }; - if (parent.indexOf(basename) !== -1) { - return; - } - this._addToWatchedDir(directory, basename); - if (this.options.usePolling) { - options.interval = this.enableBinaryInterval && isBinary(basename) ? this.options.binaryInterval : this.options.interval; - return fs.watchFile(item, options, function(curr, prev) { - if (curr.mtime.getTime() > prev.mtime.getTime()) { - return callback(item, curr); - } - }); - } else { - watcher = fs.watch(item, options, function(event, path) { - return callback(item); - }); - return this.watchers.push(watcher); - } - }; - - FSWatcher.prototype._handleFile = function(file, stats, initialAdd) { - var _this = this; - if (initialAdd == null) { - initialAdd = false; - } - this._watch(file, 'file', function(file, newStats) { - return _this.emit('change', file, newStats); - }); - if (!(initialAdd && this.options.ignoreInitial)) { - return this.emit('add', file, stats); - } - }; - - FSWatcher.prototype._handleDir = function(directory, initialAdd) { - var read, - _this = this; - read = function(directory, initialAdd) { - return fs.readdir(directory, function(error, current) { - var previous; - if (error != null) { - return _this.emit('error', error); - } - if (!current) { - return; - } - previous = _this._getWatchedDir(directory); - previous.filter(function(file) { - return current.indexOf(file) === -1; - }).forEach(function(file) { - return _this._remove(directory, file); - }); - return current.filter(function(file) { - return previous.indexOf(file) === -1; - }).forEach(function(file) { - return _this._handle(sysPath.join(directory, file), initialAdd); - }); - }); - }; - read(directory, initialAdd); - return this._watch(directory, 'directory', function(dir) { - return read(dir, false); - }); - }; - - FSWatcher.prototype._handle = function(item, initialAdd) { - var _this = this; - if (this._ignored(item)) { - return; - } - return fs.realpath(item, function(error, path) { - if (error && error.code === 'ENOENT') { - return; - } - if (error != null) { - return _this.emit('error', error); - } - return fs.stat(path, function(error, stats) { - if (error != null) { - return _this.emit('error', error); - } - if (_this.options.ignorePermissionErrors && (!_this._hasReadPermissions(stats))) { - return; - } - if (_this._ignored.length === 2 && _this._ignored(item, stats)) { - return; - } - if (stats.isFile()) { - _this._handleFile(item, stats, initialAdd); - } - if (stats.isDirectory()) { - return _this._handleDir(item, initialAdd); - } - }); - }); - }; - - FSWatcher.prototype.emit = function() { - var args, event; - event = arguments[0], args = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - FSWatcher.__super__.emit.apply(this, arguments); - if (event === 'add' || event === 'change' || event === 'unlink') { - return FSWatcher.__super__.emit.apply(this, ['all', event].concat(__slice.call(args))); - } - }; - - FSWatcher.prototype.add = function(files) { - var _this = this; - if (!Array.isArray(files)) { - files = [files]; - } - files.forEach(function(file) { - return _this._handle(file, true); - }); - return this; - }; - - FSWatcher.prototype.close = function() { - var _this = this; - this.watchers.forEach(function(watcher) { - return watcher.close(); - }); - Object.keys(this.watched).forEach(function(directory) { - return _this.watched[directory].forEach(function(file) { - return fs.unwatchFile(sysPath.join(directory, file)); - }); - }); - this.watched = Object.create(null); - return this; - }; - - return FSWatcher; - -})(EventEmitter); - -exports.watch = function(files, options) { - return new FSWatcher(options).add(files); -}; diff --git a/node_modules/karma/node_modules/chokidar/lib/is-binary.js b/node_modules/karma/node_modules/chokidar/lib/is-binary.js deleted file mode 100644 index 1ef27596..00000000 --- a/node_modules/karma/node_modules/chokidar/lib/is-binary.js +++ /dev/null @@ -1,27 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -var extensions, exts, isBinary, isBinaryPath, sysPath; - -sysPath = require('path'); - -extensions = ['adp', 'au', 'mid', 'mp4a', 'mpga', 'oga', 's3m', 'sil', 'eol', 'dra', 'dts', 'dtshd', 'lvp', 'pya', 'ecelp4800', 'ecelp7470', 'ecelp9600', 'rip', 'weba', 'aac', 'aif', 'caf', 'flac', 'mka', 'm3u', 'wax', 'wma', 'wav', 'xm', 'flac', '3gp', '3g2', 'h261', 'h263', 'h264', 'jpgv', 'jpm', 'mj2', 'mp4', 'mpeg', 'ogv', 'qt', 'uvh', 'uvm', 'uvp', 'uvs', 'dvb', 'fvt', 'mxu', 'pyv', 'uvu', 'viv', 'webm', 'f4v', 'fli', 'flv', 'm4v', 'mkv', 'mng', 'asf', 'vob', 'wm', 'wmv', 'wmx', 'wvx', 'movie', 'smv', 'ts', 'bmp', 'cgm', 'g3', 'gif', 'ief', 'jpg', 'jpeg', 'ktx', 'png', 'btif', 'sgi', 'svg', 'tiff', 'psd', 'uvi', 'sub', 'djvu', 'dwg', 'dxf', 'fbs', 'fpx', 'fst', 'mmr', 'rlc', 'mdi', 'wdp', 'npx', 'wbmp', 'xif', 'webp', '3ds', 'ras', 'cmx', 'fh', 'ico', 'pcx', 'pic', 'pnm', 'pbm', 'pgm', 'ppm', 'rgb', 'tga', 'xbm', 'xpm', 'xwd', 'zip', 'rar', 'tar', 'bz2', 'eot', 'ttf', 'woff']; - -exts = Object.create(null); - -extensions.forEach(function(extension) { - return exts[extension] = true; -}); - -isBinary = function(extension) { - return !!exts[extension]; -}; - -isBinaryPath = function(path) { - var extension; - extension = sysPath.extname(path).slice(1); - if (extension === '') { - return false; - } - return isBinary(extension); -}; - -module.exports = isBinaryPath; diff --git a/node_modules/karma/node_modules/chokidar/package.json b/node_modules/karma/node_modules/chokidar/package.json deleted file mode 100644 index 3dc8831a..00000000 --- a/node_modules/karma/node_modules/chokidar/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "chokidar", - "description": "A neat wrapper around node.js fs.watch / fs.watchFile.", - "version": "0.7.1", - "keywords": [ - "fs", - "watch", - "watchFile", - "watcher", - "file" - ], - "homepage": "https://github.com/paulmillr/chokidar", - "author": { - "name": "Paul Miller", - "url": "http://paulmillr.com" - }, - "repository": { - "type": "git", - "url": "https://github.com/paulmillr/chokidar.git" - }, - "bugs": { - "url": "http://github.com/paulmillr/chokidar/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/paulmillr/chokidar/raw/master/README.md" - } - ], - "main": "./lib/index", - "scripts": { - "prepublish": "node setup.js prepublish", - "postpublish": "node setup.js postpublish", - "test": "node setup.js test", - "postinstall": "node setup.js postinstall" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "~1.7.3", - "chai": "~1.4.0", - "sinon": "~1.5.2", - "sinon-chai": "2.2.0", - "coffee-script": "~1.6.0" - }, - "readme": "# Chokidar\nA neat wrapper around node.js fs.watch / fs.watchFile.\n\n[![NPM](https://nodei.co/npm-dl/chokidar.png)](https://nodei.co/npm/chokidar/)\n\n## Why?\nNode.js `fs.watch`:\n\n* Doesn't report filenames on mac.\n* Doesn't report events at all when using editors like TextMate2 on mac.\n* Sometimes reports events twice.\n* Has only one non-useful event: `rename`.\n* Has [a lot of other issues](https://github.com/joyent/node/search?q=fs.watch&type=Issues)\n\nNode.js `fs.watchFile`:\n\n* Almost as shitty in event tracking.\n\nChokidar resolves these problems.\n\nIt is used in\n[brunch](http://brunch.io),\n[socketstream](http://www.socketstream.org),\nand [karma](http://karma-runner.github.io)\nand has proven itself in production environments.\n\n## Getting started\nInstall chokidar via node.js package manager:\n\n npm install chokidar\n\nThen just require the package in your code:\n\n```javascript\nvar chokidar = require('chokidar');\n\nvar watcher = chokidar.watch('file or dir', {ignored: /^\\./, persistent: true});\n\nwatcher\n .on('add', function(path) {console.log('File', path, 'has been added');})\n .on('change', function(path) {console.log('File', path, 'has been changed');})\n .on('unlink', function(path) {console.log('File', path, 'has been removed');})\n .on('error', function(error) {console.error('Error happened', error);})\n\n// 'add' and 'change' events also receive stat() results as second argument.\n// http://nodejs.org/api/fs.html#fs_class_fs_stats\nwatcher.on('change', function(path, stats) {\n console.log('File', path, 'changed size to', stats.size);\n});\n\nwatcher.add('new-file');\nwatcher.add(['new-file-2', 'new-file-3']);\n\n// Only needed if watching is persistent.\nwatcher.close();\n```\n\n## API\n* `chokidar.watch(paths, options)`: takes paths to be watched and options:\n * `options.ignored` (regexp or function) files to be ignored.\n This function or regexp is tested against the **whole path**,\n not just filename. If it is a function with two arguments, it gets called\n twice per path - once with a single argument (the path), second time with\n two arguments (the path and the [`fs.Stats`](http://nodejs.org/api/fs.html#fs_class_fs_stats)\n object of that path).\n * `options.persistent` (default: `false`). Indicates whether the process\n should continue to run as long as files are being watched.\n * `options.ignorePermissionErrors` (default: `false`). Indicates\n whether to watch files that don't have read permissions.\n * `options.ignoreInitial` (default: `false`). Indicates whether chokidar\n should ignore the initial `add` events or not.\n * `options.interval` (default: `100`). Interval of file system polling.\n * `options.binaryInterval` (default: `300`). Interval of file system \n polling for binary files (see extensions in src/is-binary).\n * `options.usePolling` (default: `true`). Whether to use fs.watchFile \n (backed by polling), or fs.watch. If polling leads to high CPU utilization, \n consider setting this to `false`.\n\n`chokidar.watch()` produces an instance of `FSWatcher`. Methods of `FSWatcher`:\n\n* `.add(file / files)`: Add directories / files for tracking.\nTakes an array of strings (file paths) or just one path.\n* `.on(event, callback)`: Listen for an FS event.\nAvailable events: `add`, `change`, `unlink`, `error`.\nAdditionally `all` is available which gets emitted for every `add`, `change` and `unlink`.\n* `.close()`: Removes all listeners from watched files.\n\n## License\nThe MIT license.\n\nCopyright (c) 2013 Paul Miller (http://paulmillr.com)\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n", - "readmeFilename": "README.md", - "_id": "chokidar@0.7.1", - "_from": "chokidar@~0.7.0" -} diff --git a/node_modules/karma/node_modules/chokidar/setup.js b/node_modules/karma/node_modules/chokidar/setup.js deleted file mode 100644 index 56a7d0f5..00000000 --- a/node_modules/karma/node_modules/chokidar/setup.js +++ /dev/null @@ -1,69 +0,0 @@ -var exec = require('child_process').exec; -var sysPath = require('path'); -var fs = require('fs'); - -// Cross-platform node.js postinstall & test script for coffeescript projects. - -var mode = process.argv[2]; - -var fsExists = fs.exists || sysPath.exists; -var fsExistsSync = fs.existsSync || sysPath.existsSync; - -var getBinaryPath = function(binary) { - var path; - if (fsExistsSync(path = sysPath.join('node_modules', '.bin', binary))) return path; - if (fsExistsSync(path = sysPath.join('..', '.bin', binary))) return path; - return binary; -}; - -var execute = function(path, params, callback) { - if (callback == null) callback = function() {}; - var command = path + ' ' + params; - console.log('Executing', command); - exec(command, function(error, stdout, stderr) { - if (error != null) return process.stderr.write(stderr.toString()); - console.log(stdout.toString()); - }); -}; - -var togglePostinstall = function(add) { - var pkg = require('./package.json'); - - if (add) { - if (!pkg.scripts) pkg.scripts = {}; - pkg.scripts.postinstall = 'node setup.js postinstall'; - } else if (pkg.scripts && pkg.scripts.postinstall) { - delete pkg.scripts.postinstall; - } - - fs.writeFileSync('package.json', JSON.stringify(pkg, null, 2) + '\n'); -}; - -switch (mode) { - // Remove `.postinstall` script to prevent stupid npm bugs. - case 'prepublish': - togglePostinstall(false); - execute(getBinaryPath('coffee'), '-o lib/ src/'); - break; - - // Bring back `.postinstall` script. - case 'postpublish': - togglePostinstall(true); - break; - - // Compile coffeescript for git users. - case 'postinstall': - fsExists(sysPath.join(__dirname, 'lib'), function(exists) { - if (exists) return; - execute(getBinaryPath('coffee'), '-o lib/ src/'); - }); - break; - - // Run tests. - case 'test': - execute( - getBinaryPath('mocha'), - '--compilers coffee:coffee-script --require test/common.coffee --colors' - ); - break; -} diff --git a/node_modules/karma/node_modules/chokidar/src/index.coffee b/node_modules/karma/node_modules/chokidar/src/index.coffee deleted file mode 100644 index 520d5169..00000000 --- a/node_modules/karma/node_modules/chokidar/src/index.coffee +++ /dev/null @@ -1,242 +0,0 @@ -'use strict' - -{EventEmitter} = require 'events' -fs = require 'fs' -sysPath = require 'path' -isBinary = require './is-binary' - -nodeVersion = process.versions.node.substring(0, 3) - -# Helloo, I am coffeescript file. -# Chokidar is written in coffee because it uses OOP. -# JS is fucking horrible with OOP. At least until ES6. - -# Watches files & directories for changes. -# -# Emitted events: `add`, `change`, `unlink`, `error`. -# -# Examples -# -# var watcher = new FSWatcher() -# .add(directories) -# .on('add', function(path) {console.log('File', path, 'was added');}) -# .on('change', function(path) {console.log('File', path, 'was changed');}) -# .on('unlink', function(path) {console.log('File', path, 'was removed');}) -# -exports.FSWatcher = class FSWatcher extends EventEmitter - constructor: (@options = {}) -> - super - @watched = Object.create(null) - @watchers = [] - - # Set up default options. - @options.persistent ?= no - @options.ignoreInitial ?= no - @options.ignorePermissionErrors ?= no - @options.interval ?= 100 - @options.binaryInterval ?= 300 - @options.usePolling ?= true - - @enableBinaryInterval = @options.binaryInterval isnt @options.interval - - @_ignored = do (ignored = @options.ignored) => - switch toString.call(ignored) - when '[object RegExp]' then (string) -> ignored.test(string) - when '[object Function]' then ignored - else -> no - - # You’re frozen when your heart’s not open. - Object.freeze @options - - _getWatchedDir: (directory) => - dir = directory.replace(/[\\\/]$/, '') - @watched[dir] ?= [] - - _addToWatchedDir: (directory, file) => - watchedFiles = @_getWatchedDir directory - watchedFiles.push file - - _removeFromWatchedDir: (directory, file) => - watchedFiles = @_getWatchedDir directory - watchedFiles.some (watchedFile, index) => - if watchedFile is file - watchedFiles.splice(index, 1) - yes - - # Private: Check for read permissions - # Based on this answer on SO: http://stackoverflow.com/a/11781404/1358405 - # - # stats - fs.Stats object - # - # Returns Boolean - _hasReadPermissions: (stats) => - Boolean (4 & parseInt (stats.mode & 0o777).toString(8)[0]) - - # Private: Handles emitting unlink events for - # files and directories, and via recursion, for - # files and directories within directories that are unlinked - # - # directory - string, directory within which the following item is located - # item - string, base path of item/directory - # - # Returns nothing. - _remove: (directory, item) => - # if what is being deleted is a directory, get that directory's paths - # for recursive deleting and cleaning of watched object - # if it is not a directory, nestedDirectoryChildren will be empty array - fullPath = sysPath.join(directory, item) - - # Check if it actually is a directory - isDirectory = @watched[fullPath] - - # This will create a new entry in the watched object in either case - # so we got to do the directory check beforehand - nestedDirectoryChildren = @_getWatchedDir(fullPath).slice() - - # Remove directory / file from watched list. - @_removeFromWatchedDir directory, item - - # Recursively remove children directories / files. - nestedDirectoryChildren.forEach (nestedItem) => - @_remove fullPath, nestedItem - - fs.unwatchFile fullPath if @options.usePolling - - # The Entry will either be a directory that just got removed - # or a bogus entry to a file, in either case we have to remove it - delete @watched[fullPath] - - # Only emit events for files - @emit 'unlink', fullPath unless isDirectory - - # Private: Watch file for changes with fs.watchFile or fs.watch. - # - # item - string, path to file or directory. - # callback - function that will be executed on fs change. - # - # Returns nothing. - _watch: (item, itemType, callback = (->)) => - directory = sysPath.dirname(item) - basename = sysPath.basename(item) - parent = @_getWatchedDir directory - options = {persistent: @options.persistent} - - # Prevent memory leaks. - return if parent.indexOf(basename) isnt -1 - - @_addToWatchedDir directory, basename - if @options.usePolling - options.interval = if @enableBinaryInterval and isBinary basename - @options.binaryInterval - else - @options.interval - fs.watchFile item, options, (curr, prev) => - callback item, curr if curr.mtime.getTime() > prev.mtime.getTime() - else - watcher = fs.watch item, options, (event, path) => - callback item - @watchers.push watcher - - # Private: Emit `change` event once and watch file to emit it in the future - # once the file is changed. - # - # file - string, fs path. - # stats - object, result of executing stat(1) on file. - # initialAdd - boolean, was the file added at the launch? - # - # Returns nothing. - _handleFile: (file, stats, initialAdd = no) => - @_watch file, 'file', (file, newStats) => - @emit 'change', file, newStats - @emit 'add', file, stats unless initialAdd and @options.ignoreInitial - - # Private: Read directory to add / remove files from `@watched` list - # and re-read it on change. - # - # directory - string, fs path. - # - # Returns nothing. - _handleDir: (directory, initialAdd) => - read = (directory, initialAdd) => - fs.readdir directory, (error, current) => - return @emit 'error', error if error? - return unless current - previous = @_getWatchedDir(directory) - - # Files that absent in current directory snapshot - # but present in previous emit `remove` event - # and are removed from @watched[directory]. - previous - .filter (file) => - current.indexOf(file) is -1 - .forEach (file) => - @_remove directory, file - - # Files that present in current directory snapshot - # but absent in previous are added to watch list and - # emit `add` event. - current - .filter (file) => - previous.indexOf(file) is -1 - .forEach (file) => - @_handle sysPath.join(directory, file), initialAdd - - read directory, initialAdd - @_watch directory, 'directory', (dir) -> read dir, no - - # Private: Handle added file or directory. - # Delegates call to _handleFile / _handleDir after checks. - # - # item - string, path to file or directory. - # - # Returns nothing. - _handle: (item, initialAdd) => - # Don't handle invalid files, dotfiles etc. - return if @_ignored item - - # Get the canonicalized absolute pathname. - fs.realpath item, (error, path) => - return if error and error.code is 'ENOENT' - return @emit 'error', error if error? - # Get file info, check is it file, directory or something else. - fs.stat path, (error, stats) => - return @emit 'error', error if error? - if @options.ignorePermissionErrors and (not @_hasReadPermissions stats) - return - - return if @_ignored.length is 2 and @_ignored item, stats - - @_handleFile item, stats, initialAdd if stats.isFile() - @_handleDir item, initialAdd if stats.isDirectory() - - emit: (event, args...) -> - super - super 'all', event, args... if event in ['add', 'change', 'unlink'] - - # Public: Adds directories / files for tracking. - # - # * files - array of strings (file paths). - # - # Examples - # - # add ['app', 'vendor'] - # - # Returns an instance of FSWatcher for chaning. - add: (files) => - files = [files] unless Array.isArray files - files.forEach (file) => @_handle file, true - this - - # Public: Remove all listeners from watched files. - # Returns an instance of FSWatcher for chaning. - close: => - @watchers.forEach (watcher) -> watcher.close() - Object.keys(@watched).forEach (directory) => - @watched[directory].forEach (file) => - fs.unwatchFile sysPath.join(directory, file) - @watched = Object.create(null) - @removeAllListeners() - this - -exports.watch = (files, options) -> - new FSWatcher(options).add(files) diff --git a/node_modules/karma/node_modules/chokidar/src/is-binary.coffee b/node_modules/karma/node_modules/chokidar/src/is-binary.coffee deleted file mode 100644 index d2f8ffc6..00000000 --- a/node_modules/karma/node_modules/chokidar/src/is-binary.coffee +++ /dev/null @@ -1,42 +0,0 @@ -sysPath = require 'path' - -extensions = [ - # Audio files. - 'adp', 'au', 'mid', 'mp4a', 'mpga', 'oga', 's3m', 'sil', 'eol', 'dra', - 'dts', 'dtshd', 'lvp', 'pya', 'ecelp4800', 'ecelp7470', 'ecelp9600', - 'rip', 'weba', 'aac', 'aif', 'caf', 'flac', - - # Video files. - 'mka', 'm3u', 'wax', 'wma', 'wav', 'xm', 'flac', '3gp', '3g2', 'h261', - 'h263', 'h264', 'jpgv', 'jpm', 'mj2', 'mp4', 'mpeg', 'ogv', 'qt', 'uvh', - 'uvm', 'uvp', 'uvs', 'dvb', 'fvt', 'mxu', 'pyv', 'uvu', 'viv', 'webm', - 'f4v', 'fli', 'flv', 'm4v', 'mkv', 'mng', 'asf', 'vob', 'wm', 'wmv', - 'wmx', 'wvx', 'movie', 'smv', 'ts', - - # Pictures. - 'bmp', 'cgm', 'g3', 'gif', 'ief', 'jpg', 'jpeg', 'ktx', 'png', 'btif', - 'sgi', 'svg', 'tiff', 'psd', 'uvi', 'sub', 'djvu', 'dwg', 'dxf', 'fbs', - 'fpx', 'fst', 'mmr', 'rlc', 'mdi', 'wdp', 'npx', 'wbmp', 'xif', 'webp', - '3ds', 'ras', 'cmx', 'fh', 'ico', 'pcx', 'pic', 'pnm', 'pbm', 'pgm', - 'ppm', 'rgb', 'tga', 'xbm', 'xpm', 'xwd', - - # Archives. - 'zip', 'rar', 'tar', 'bz2', - - # Fonts. - 'eot', 'ttf', 'woff' -] - -exts = Object.create(null) - -extensions.forEach (extension) -> - exts[extension] = true - -isBinary = (extension) -> !!exts[extension] - -isBinaryPath = (path) -> - extension = sysPath.extname(path).slice(1) - return no if extension is '' - isBinary extension - -module.exports = isBinaryPath diff --git a/node_modules/karma/node_modules/chokidar/test/chokidar-test.coffee b/node_modules/karma/node_modules/chokidar/test/chokidar-test.coffee deleted file mode 100644 index 3790c06b..00000000 --- a/node_modules/karma/node_modules/chokidar/test/chokidar-test.coffee +++ /dev/null @@ -1,209 +0,0 @@ -chokidar = require '..' -isBinary = require '../lib/is-binary' -fs = require 'fs' -sysPath = require 'path' - -getFixturePath = (subPath) -> - sysPath.join __dirname, 'fixtures', subPath - -fixturesPath = getFixturePath '' -delay = (fn) => - setTimeout fn, 205 - -describe 'chokidar', -> - it 'should expose public API methods', -> - chokidar.FSWatcher.should.be.a 'function' - chokidar.watch.should.be.a 'function' - - describe 'watch', -> - options = {} - - beforeEach (done) -> - @watcher = chokidar.watch fixturesPath, options - delay => - done() - - afterEach (done) -> - @watcher.close() - delete @watcher - delay => - done() - - before -> - try fs.unlinkSync (getFixturePath 'add.txt'), 'b' - fs.writeFileSync (getFixturePath 'change.txt'), 'b' - fs.writeFileSync (getFixturePath 'unlink.txt'), 'b' - try fs.unlinkSync (getFixturePath 'subdir/add.txt'), 'b' - try fs.rmdirSync (getFixturePath 'subdir'), 'b' - - after -> - try fs.unlinkSync (getFixturePath 'add.txt'), 'a' - fs.writeFileSync (getFixturePath 'change.txt'), 'a' - fs.writeFileSync (getFixturePath 'unlink.txt'), 'a' - - it 'should produce an instance of chokidar.FSWatcher', -> - @watcher.should.be.an.instanceof chokidar.FSWatcher - - it 'should expose public API methods', -> - @watcher.on.should.be.a 'function' - @watcher.emit.should.be.a 'function' - @watcher.add.should.be.a 'function' - @watcher.close.should.be.a 'function' - - it 'should emit `add` event when file was added', (done) -> - spy = sinon.spy() - testPath = getFixturePath 'add.txt' - - @watcher.on 'add', spy - - delay => - spy.should.not.have.been.called - fs.writeFileSync testPath, 'hello' - delay => - spy.should.have.been.calledOnce - spy.should.have.been.calledWith testPath - done() - - it 'should emit `change` event when file was changed', (done) -> - spy = sinon.spy() - testPath = getFixturePath 'change.txt' - - @watcher.on 'change', spy - - delay => - spy.should.not.have.been.called - fs.writeFileSync testPath, 'c' - delay => - spy.should.have.been.calledOnce - spy.should.have.been.calledWith testPath - done() - - it 'should emit `unlink` event when file was removed', (done) -> - spy = sinon.spy() - testPath = getFixturePath 'unlink.txt' - - @watcher.on 'unlink', spy - - delay => - spy.should.not.have.been.called - fs.unlinkSync testPath - delay => - spy.should.have.been.calledOnce - spy.should.have.been.calledWith testPath - done() - - it 'should not emit `unlink` event when a empty directory was removed', (done) -> - spy = sinon.spy() - testDir = getFixturePath 'subdir' - - @watcher.on 'unlink', spy - - delay => - fs.mkdirSync testDir, 0o755 - fs.rmdirSync testDir - delay => - spy.should.not.have.been.called - done() - - it 'should survive ENOENT for missing subdirectories', -> - testDir = getFixturePath 'subdir' - - @watcher.add testDir - - it 'should notice when a file appears in a new directory', (done) -> - spy = sinon.spy() - testDir = getFixturePath 'subdir' - testPath = getFixturePath 'subdir/add.txt' - - @watcher.on 'add', spy - @watcher.add testDir - - delay => - spy.should.not.have.been.callled - fs.mkdirSync testDir, 0o755 - fs.writeFileSync testPath, 'hello' - delay => - spy.should.have.been.calledOnce - spy.should.have.been.calledWith testPath - done() - - - describe 'watch options', -> - describe 'ignoreInitial', -> - options = { ignoreInitial: yes } - - before (done) -> - try fs.unlinkSync getFixturePath('subdir/add.txt') - try fs.unlinkSync getFixturePath('subdir/dir/ignored.txt') - try fs.rmdirSync getFixturePath('subdir/dir') - try fs.rmdirSync getFixturePath('subdir') - done() - - after (done) -> - try fs.unlinkSync getFixturePath('subdir/add.txt') - try fs.unlinkSync getFixturePath('subdir/dir/ignored.txt') - try fs.rmdirSync getFixturePath('subdir/dir') - try fs.rmdirSync getFixturePath('subdir') - done() - - it 'should ignore inital add events', (done) -> - spy = sinon.spy() - watcher = chokidar.watch fixturesPath, options - watcher.on 'add', spy - delay -> - spy.should.not.have.been.called - watcher.close() - done() - - it 'should notice when a file appears in an empty directory', (done) -> - spy = sinon.spy() - testDir = getFixturePath 'subdir' - testPath = getFixturePath 'subdir/add.txt' - - watcher = chokidar.watch fixturesPath, options - watcher.on 'add', spy - - delay -> - spy.should.not.have.been.called - fs.mkdirSync testDir, 0o755 - watcher.add testDir - - fs.writeFileSync testPath, 'hello' - delay -> - spy.should.have.been.calledOnce - spy.should.have.been.calledWith testPath - done() - - it 'should check ignore after stating', (done) -> - testDir = getFixturePath 'subdir' - spy = sinon.spy() - - ignoredFn = (path, stats) -> - return no if path is testDir or not stats - # ignore directories - return stats.isDirectory() - - watcher = chokidar.watch testDir, {ignored: ignoredFn} - watcher.on 'add', spy - - fs.mkdirSync testDir, 0o755 - fs.writeFileSync testDir + '/add.txt', '' # this file should be added - fs.mkdirSync testDir + '/dir', 0o755 # this dir will be ignored - fs.writeFileSync testDir + '/dir/ignored.txt', '' # so this file should be ignored - - delay -> - spy.should.have.been.calledOnce - spy.should.have.been.calledWith testDir + '/add.txt' - done() - - -describe 'is-binary', -> - it 'should be a function', -> - isBinary.should.be.a 'function' - - it 'should correctly determine binary files', -> - isBinary('a.jpg').should.equal yes - isBinary('a.jpeg').should.equal yes - isBinary('a.zip').should.equal yes - isBinary('ajpg').should.equal no - isBinary('a.txt').should.equal no diff --git a/node_modules/karma/node_modules/chokidar/test/common.js b/node_modules/karma/node_modules/chokidar/test/common.js deleted file mode 100644 index 943e8504..00000000 --- a/node_modules/karma/node_modules/chokidar/test/common.js +++ /dev/null @@ -1,5 +0,0 @@ -global.chai = require('chai'); -global.expect = chai.expect; -global.should = chai.should(); -global.sinon = require('sinon'); -chai.use(require('sinon-chai')); diff --git a/node_modules/karma/node_modules/chokidar/test/fixtures/binary.mp3 b/node_modules/karma/node_modules/chokidar/test/fixtures/binary.mp3 deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/chokidar/test/fixtures/change.txt b/node_modules/karma/node_modules/chokidar/test/fixtures/change.txt deleted file mode 100644 index 2e65efe2..00000000 --- a/node_modules/karma/node_modules/chokidar/test/fixtures/change.txt +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/node_modules/karma/node_modules/chokidar/test/fixtures/unlink.txt b/node_modules/karma/node_modules/chokidar/test/fixtures/unlink.txt deleted file mode 100644 index 2e65efe2..00000000 --- a/node_modules/karma/node_modules/chokidar/test/fixtures/unlink.txt +++ /dev/null @@ -1 +0,0 @@ -a \ No newline at end of file diff --git a/node_modules/karma/node_modules/coffee-script/.npmignore b/node_modules/karma/node_modules/coffee-script/.npmignore deleted file mode 100644 index 21e430d2..00000000 --- a/node_modules/karma/node_modules/coffee-script/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -*.coffee -*.html -.DS_Store -.git* -Cakefile -documentation/ -examples/ -extras/coffee-script.js -raw/ -src/ -test/ diff --git a/node_modules/karma/node_modules/coffee-script/CNAME b/node_modules/karma/node_modules/coffee-script/CNAME deleted file mode 100644 index faadabe5..00000000 --- a/node_modules/karma/node_modules/coffee-script/CNAME +++ /dev/null @@ -1 +0,0 @@ -coffeescript.org \ No newline at end of file diff --git a/node_modules/karma/node_modules/coffee-script/CONTRIBUTING.md b/node_modules/karma/node_modules/coffee-script/CONTRIBUTING.md deleted file mode 100644 index 6390c68b..00000000 --- a/node_modules/karma/node_modules/coffee-script/CONTRIBUTING.md +++ /dev/null @@ -1,9 +0,0 @@ -## How to contribute to CoffeeScript - -* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffee-script/issues) for previous discussions about the same feature or issue. Add to the earlier ticket if you find one. - -* Before sending a pull request for a feature, be sure to have [tests](https://github.com/jashkenas/coffee-script/tree/master/test). - -* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffee-script/tree/master/src). If you're just getting started with CoffeeScript, there's a nice [style guide](https://github.com/polarmobile/coffeescript-style-guide). - -* In your pull request, do not add documentation to `index.html` or re-build the minified `coffee-script.js` file. We'll do those things before cutting a new release. \ No newline at end of file diff --git a/node_modules/karma/node_modules/coffee-script/LICENSE b/node_modules/karma/node_modules/coffee-script/LICENSE deleted file mode 100644 index a396eaed..00000000 --- a/node_modules/karma/node_modules/coffee-script/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2009-2013 Jeremy Ashkenas - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/coffee-script/README b/node_modules/karma/node_modules/coffee-script/README deleted file mode 100644 index 69ee6f43..00000000 --- a/node_modules/karma/node_modules/coffee-script/README +++ /dev/null @@ -1,51 +0,0 @@ - - { - } } { - { { } } - } }{ { - { }{ } } _____ __ __ - ( }{ }{ { ) / ____| / _|/ _| - .- { { } { }} -. | | ___ | |_| |_ ___ ___ - ( ( } { } { } } ) | | / _ \| _| _/ _ \/ _ \ - |`-..________ ..-'| | |___| (_) | | | || __/ __/ - | | \_____\___/|_| |_| \___|\___| - | ;--. - | (__ \ _____ _ _ - | | ) ) / ____| (_) | | - | |/ / | (___ ___ _ __ _ _ __ | |_ - | ( / \___ \ / __| '__| | '_ \| __| - | |/ ____) | (__| | | | |_) | |_ - | | |_____/ \___|_| |_| .__/ \__| - `-.._________..-' | | - |_| - - - CoffeeScript is a little language that compiles into JavaScript. - - Install Node.js, and then the CoffeeScript compiler: - sudo bin/cake install - - Or, if you have the Node Package Manager installed: - npm install -g coffee-script - (Leave off the -g if you don't wish to install globally.) - - Execute a script: - coffee /path/to/script.coffee - - Compile a script: - coffee -c /path/to/script.coffee - - For documentation, usage, and examples, see: - http://coffeescript.org/ - - To suggest a feature, report a bug, or general discussion: - http://github.com/jashkenas/coffee-script/issues/ - - If you'd like to chat, drop by #coffeescript on Freenode IRC, - or on webchat.freenode.net. - - The source repository: - git://github.com/jashkenas/coffee-script.git - - All contributors are listed here: - http://github.com/jashkenas/coffee-script/contributors diff --git a/node_modules/karma/node_modules/coffee-script/Rakefile b/node_modules/karma/node_modules/coffee-script/Rakefile deleted file mode 100644 index d90cce36..00000000 --- a/node_modules/karma/node_modules/coffee-script/Rakefile +++ /dev/null @@ -1,79 +0,0 @@ -require 'rubygems' -require 'erb' -require 'fileutils' -require 'rake/testtask' -require 'json' - -desc "Build the documentation page" -task :doc do - source = 'documentation/index.html.erb' - child = fork { exec "bin/coffee -bcw -o documentation/js documentation/coffee/*.coffee" } - at_exit { Process.kill("INT", child) } - Signal.trap("INT") { exit } - loop do - mtime = File.stat(source).mtime - if !@mtime || mtime > @mtime - rendered = ERB.new(File.read(source)).result(binding) - File.open('index.html', 'w+') {|f| f.write(rendered) } - end - @mtime = mtime - sleep 1 - end -end - -desc "Build coffee-script-source gem" -task :gem do - require 'rubygems' - require 'rubygems/package' - - gemspec = Gem::Specification.new do |s| - s.name = 'coffee-script-source' - s.version = JSON.parse(File.read('package.json'))["version"] - s.date = Time.now.strftime("%Y-%m-%d") - - s.homepage = "http://jashkenas.github.com/coffee-script/" - s.summary = "The CoffeeScript Compiler" - s.description = <<-EOS - CoffeeScript is a little language that compiles into JavaScript. - Underneath all of those embarrassing braces and semicolons, - JavaScript has always had a gorgeous object model at its heart. - CoffeeScript is an attempt to expose the good parts of JavaScript - in a simple way. - EOS - - s.files = [ - 'lib/coffee_script/coffee-script.js', - 'lib/coffee_script/source.rb' - ] - - s.authors = ['Jeremy Ashkenas'] - s.email = 'jashkenas@gmail.com' - s.rubyforge_project = 'coffee-script-source' - s.license = "MIT" - end - - file = File.open("coffee-script-source.gem", "w") - Gem::Package.open(file, 'w') do |pkg| - pkg.metadata = gemspec.to_yaml - - path = "lib/coffee_script/source.rb" - contents = <<-ERUBY -module CoffeeScript - module Source - def self.bundled_path - File.expand_path("../coffee-script.js", __FILE__) - end - end -end - ERUBY - pkg.add_file_simple(path, 0644, contents.size) do |tar_io| - tar_io.write(contents) - end - - contents = File.read("extras/coffee-script.js") - path = "lib/coffee_script/coffee-script.js" - pkg.add_file_simple(path, 0644, contents.size) do |tar_io| - tar_io.write(contents) - end - end -end diff --git a/node_modules/karma/node_modules/coffee-script/bin/cake b/node_modules/karma/node_modules/coffee-script/bin/cake deleted file mode 100755 index 5965f4ee..00000000 --- a/node_modules/karma/node_modules/coffee-script/bin/cake +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/cake').run(); diff --git a/node_modules/karma/node_modules/coffee-script/bin/coffee b/node_modules/karma/node_modules/coffee-script/bin/coffee deleted file mode 100755 index 3d1d71c8..00000000 --- a/node_modules/karma/node_modules/coffee-script/bin/coffee +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'); -var fs = require('fs'); -var lib = path.join(path.dirname(fs.realpathSync(__filename)), '../lib'); - -require(lib + '/coffee-script/command').run(); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/browser.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/browser.js deleted file mode 100644 index e5411d8c..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/browser.js +++ /dev/null @@ -1,118 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, compile, runScripts, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - CoffeeScript = require('./coffee-script'); - - CoffeeScript.require = require; - - compile = CoffeeScript.compile; - - CoffeeScript["eval"] = function(code, options) { - if (options == null) { - options = {}; - } - if (options.bare == null) { - options.bare = true; - } - return eval(compile(code, options)); - }; - - CoffeeScript.run = function(code, options) { - if (options == null) { - options = {}; - } - options.bare = true; - options.shiftLine = true; - return Function(compile(code, options))(); - }; - - if (typeof window === "undefined" || window === null) { - return; - } - - if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) && (typeof unescape !== "undefined" && unescape !== null) && (typeof encodeURIComponent !== "undefined" && encodeURIComponent !== null)) { - compile = function(code, options) { - var js, v3SourceMap, _ref; - if (options == null) { - options = {}; - } - options.sourceMap = true; - options.inline = true; - _ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap; - return "" + js + "\n//@ sourceMappingURL=data:application/json;base64," + (btoa(unescape(encodeURIComponent(v3SourceMap)))) + "\n//@ sourceURL=coffeescript"; - }; - } - - CoffeeScript.load = function(url, callback, options) { - var xhr; - if (options == null) { - options = {}; - } - options.sourceFiles = [url]; - xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest(); - xhr.open('GET', url, true); - if ('overrideMimeType' in xhr) { - xhr.overrideMimeType('text/plain'); - } - xhr.onreadystatechange = function() { - var _ref; - if (xhr.readyState === 4) { - if ((_ref = xhr.status) === 0 || _ref === 200) { - CoffeeScript.run(xhr.responseText, options); - } else { - throw new Error("Could not load " + url); - } - if (callback) { - return callback(); - } - } - }; - return xhr.send(null); - }; - - runScripts = function() { - var coffees, coffeetypes, execute, index, length, s, scripts; - scripts = window.document.getElementsByTagName('script'); - coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']; - coffees = (function() { - var _i, _len, _ref, _results; - _results = []; - for (_i = 0, _len = scripts.length; _i < _len; _i++) { - s = scripts[_i]; - if (_ref = s.type, __indexOf.call(coffeetypes, _ref) >= 0) { - _results.push(s); - } - } - return _results; - })(); - index = 0; - length = coffees.length; - (execute = function() { - var mediatype, options, script; - script = coffees[index++]; - mediatype = script != null ? script.type : void 0; - if (__indexOf.call(coffeetypes, mediatype) >= 0) { - options = { - literate: mediatype === 'text/literate-coffeescript' - }; - if (script.src) { - return CoffeeScript.load(script.src, execute, options); - } else { - options.sourceFiles = ['embedded']; - CoffeeScript.run(script.innerHTML, options); - return execute(); - } - } - })(); - return null; - }; - - if (window.addEventListener) { - window.addEventListener('DOMContentLoaded', runScripts, false); - } else { - window.attachEvent('onload', runScripts); - } - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/cake.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/cake.js deleted file mode 100644 index 68bd7c30..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/cake.js +++ /dev/null @@ -1,114 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, cakefileDirectory, existsSync, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; - - fs = require('fs'); - - path = require('path'); - - helpers = require('./helpers'); - - optparse = require('./optparse'); - - CoffeeScript = require('./coffee-script'); - - existsSync = fs.existsSync || path.existsSync; - - tasks = {}; - - options = {}; - - switches = []; - - oparse = null; - - helpers.extend(global, { - task: function(name, description, action) { - var _ref; - if (!action) { - _ref = [description, action], action = _ref[0], description = _ref[1]; - } - return tasks[name] = { - name: name, - description: description, - action: action - }; - }, - option: function(letter, flag, description) { - return switches.push([letter, flag, description]); - }, - invoke: function(name) { - if (!tasks[name]) { - missingTask(name); - } - return tasks[name].action(options); - } - }); - - exports.run = function() { - var arg, args, e, _i, _len, _ref, _results; - global.__originalDirname = fs.realpathSync('.'); - process.chdir(cakefileDirectory(__originalDirname)); - args = process.argv.slice(2); - CoffeeScript.run(fs.readFileSync('Cakefile').toString(), { - filename: 'Cakefile' - }); - oparse = new optparse.OptionParser(switches); - if (!args.length) { - return printTasks(); - } - try { - options = oparse.parse(args); - } catch (_error) { - e = _error; - return fatalError("" + e); - } - _ref = options["arguments"]; - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - arg = _ref[_i]; - _results.push(invoke(arg)); - } - return _results; - }; - - printTasks = function() { - var cakefilePath, desc, name, relative, spaces, task; - relative = path.relative || path.resolve; - cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile'); - console.log("" + cakefilePath + " defines the following tasks:\n"); - for (name in tasks) { - task = tasks[name]; - spaces = 20 - name.length; - spaces = spaces > 0 ? Array(spaces + 1).join(' ') : ''; - desc = task.description ? "# " + task.description : ''; - console.log("cake " + name + spaces + " " + desc); - } - if (switches.length) { - return console.log(oparse.help()); - } - }; - - fatalError = function(message) { - console.error(message + '\n'); - console.log('To see a list of all tasks/options, run "cake"'); - return process.exit(1); - }; - - missingTask = function(task) { - return fatalError("No such task: " + task); - }; - - cakefileDirectory = function(dir) { - var parent; - if (existsSync(path.join(dir, 'Cakefile'))) { - return dir; - } - parent = path.normalize(path.join(dir, '..')); - if (parent !== dir) { - return cakefileDirectory(parent); - } - throw new Error("Cakefile not found in " + (process.cwd())); - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/coffee-script.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/coffee-script.js deleted file mode 100644 index 11ccd810..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/coffee-script.js +++ /dev/null @@ -1,358 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Lexer, Module, SourceMap, child_process, compile, ext, findExtension, fork, formatSourcePosition, fs, helpers, lexer, loadFile, parser, patchStackTrace, patched, path, sourceMaps, vm, _i, _len, _ref, - __hasProp = {}.hasOwnProperty; - - fs = require('fs'); - - vm = require('vm'); - - path = require('path'); - - child_process = require('child_process'); - - Lexer = require('./lexer').Lexer; - - parser = require('./parser').parser; - - helpers = require('./helpers'); - - SourceMap = require('./sourcemap'); - - exports.VERSION = '1.6.3'; - - exports.helpers = helpers; - - exports.compile = compile = function(code, options) { - var answer, currentColumn, currentLine, fragment, fragments, header, js, map, merge, newLines, _i, _len; - if (options == null) { - options = {}; - } - merge = helpers.merge; - if (options.sourceMap) { - map = new SourceMap; - } - fragments = parser.parse(lexer.tokenize(code, options)).compileToFragments(options); - currentLine = 0; - if (options.header) { - currentLine += 1; - } - if (options.shiftLine) { - currentLine += 1; - } - currentColumn = 0; - js = ""; - for (_i = 0, _len = fragments.length; _i < _len; _i++) { - fragment = fragments[_i]; - if (options.sourceMap) { - if (fragment.locationData) { - map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { - noReplace: true - }); - } - newLines = helpers.count(fragment.code, "\n"); - currentLine += newLines; - currentColumn = fragment.code.length - (newLines ? fragment.code.lastIndexOf("\n") : 0); - } - js += fragment.code; - } - if (options.header) { - header = "Generated by CoffeeScript " + this.VERSION; - js = "// " + header + "\n" + js; - } - if (options.sourceMap) { - answer = { - js: js - }; - answer.sourceMap = map; - answer.v3SourceMap = map.generate(options, code); - return answer; - } else { - return js; - } - }; - - exports.tokens = function(code, options) { - return lexer.tokenize(code, options); - }; - - exports.nodes = function(source, options) { - if (typeof source === 'string') { - return parser.parse(lexer.tokenize(source, options)); - } else { - return parser.parse(source); - } - }; - - exports.run = function(code, options) { - var answer, mainModule; - if (options == null) { - options = {}; - } - mainModule = require.main; - if (options.sourceMap == null) { - options.sourceMap = true; - } - mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.'; - mainModule.moduleCache && (mainModule.moduleCache = {}); - mainModule.paths = require('module')._nodeModulePaths(path.dirname(fs.realpathSync(options.filename || '.'))); - if (!helpers.isCoffee(mainModule.filename) || require.extensions) { - answer = compile(code, options); - patchStackTrace(); - sourceMaps[mainModule.filename] = answer.sourceMap; - return mainModule._compile(answer.js, mainModule.filename); - } else { - return mainModule._compile(code, mainModule.filename); - } - }; - - exports["eval"] = function(code, options) { - var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref, _ref1, _require; - if (options == null) { - options = {}; - } - if (!(code = code.trim())) { - return; - } - Script = vm.Script; - if (Script) { - if (options.sandbox != null) { - if (options.sandbox instanceof Script.createContext().constructor) { - sandbox = options.sandbox; - } else { - sandbox = Script.createContext(); - _ref = options.sandbox; - for (k in _ref) { - if (!__hasProp.call(_ref, k)) continue; - v = _ref[k]; - sandbox[k] = v; - } - } - sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox; - } else { - sandbox = global; - } - sandbox.__filename = options.filename || 'eval'; - sandbox.__dirname = path.dirname(sandbox.__filename); - if (!(sandbox !== global || sandbox.module || sandbox.require)) { - Module = require('module'); - sandbox.module = _module = new Module(options.modulename || 'eval'); - sandbox.require = _require = function(path) { - return Module._load(path, _module, true); - }; - _module.filename = sandbox.__filename; - _ref1 = Object.getOwnPropertyNames(require); - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - r = _ref1[_i]; - if (r !== 'paths') { - _require[r] = require[r]; - } - } - _require.paths = _module.paths = Module._nodeModulePaths(process.cwd()); - _require.resolve = function(request) { - return Module._resolveFilename(request, _module); - }; - } - } - o = {}; - for (k in options) { - if (!__hasProp.call(options, k)) continue; - v = options[k]; - o[k] = v; - } - o.bare = true; - js = compile(code, o); - if (sandbox === global) { - return vm.runInThisContext(js); - } else { - return vm.runInContext(js, sandbox); - } - }; - - loadFile = function(module, filename) { - var answer, raw, stripped; - raw = fs.readFileSync(filename, 'utf8'); - stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; - answer = compile(stripped, { - filename: filename, - sourceMap: true, - literate: helpers.isLiterate(filename) - }); - sourceMaps[filename] = answer.sourceMap; - return module._compile(answer.js, filename); - }; - - if (require.extensions) { - _ref = ['.coffee', '.litcoffee', '.coffee.md']; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ext = _ref[_i]; - require.extensions[ext] = loadFile; - } - Module = require('module'); - findExtension = function(filename) { - var curExtension, extensions; - extensions = path.basename(filename).split('.'); - if (extensions[0] === '') { - extensions.shift(); - } - while (extensions.shift()) { - curExtension = '.' + extensions.join('.'); - if (Module._extensions[curExtension]) { - return curExtension; - } - } - return '.js'; - }; - Module.prototype.load = function(filename) { - var extension; - this.filename = filename; - this.paths = Module._nodeModulePaths(path.dirname(filename)); - extension = findExtension(filename); - Module._extensions[extension](this, filename); - return this.loaded = true; - }; - } - - if (child_process) { - fork = child_process.fork; - child_process.fork = function(path, args, options) { - var execPath; - if (args == null) { - args = []; - } - if (options == null) { - options = {}; - } - execPath = helpers.isCoffee(path) ? 'coffee' : null; - if (!Array.isArray(args)) { - args = []; - options = args || {}; - } - options.execPath || (options.execPath = execPath); - return fork(path, args, options); - }; - } - - lexer = new Lexer; - - parser.lexer = { - lex: function() { - var tag, token; - token = this.tokens[this.pos++]; - if (token) { - tag = token[0], this.yytext = token[1], this.yylloc = token[2]; - this.yylineno = this.yylloc.first_line; - } else { - tag = ''; - } - return tag; - }, - setInput: function(tokens) { - this.tokens = tokens; - return this.pos = 0; - }, - upcomingInput: function() { - return ""; - } - }; - - parser.yy = require('./nodes'); - - parser.yy.parseError = function(message, _arg) { - var token; - token = _arg.token; - message = "unexpected " + (token === 1 ? 'end of input' : token); - return helpers.throwSyntaxError(message, parser.lexer.yylloc); - }; - - patched = false; - - sourceMaps = {}; - - patchStackTrace = function() { - var mainModule; - if (patched) { - return; - } - patched = true; - mainModule = require.main; - return Error.prepareStackTrace = function(err, stack) { - var frame, frames, getSourceMapping, sourceFiles, _ref1; - sourceFiles = {}; - getSourceMapping = function(filename, line, column) { - var answer, sourceMap; - sourceMap = sourceMaps[filename]; - if (sourceMap) { - answer = sourceMap.sourceLocation([line - 1, column - 1]); - } - if (answer) { - return [answer[0] + 1, answer[1] + 1]; - } else { - return null; - } - }; - frames = (function() { - var _j, _len1, _results; - _results = []; - for (_j = 0, _len1 = stack.length; _j < _len1; _j++) { - frame = stack[_j]; - if (frame.getFunction() === exports.run) { - break; - } - _results.push(" at " + (formatSourcePosition(frame, getSourceMapping))); - } - return _results; - })(); - return "" + err.name + ": " + ((_ref1 = err.message) != null ? _ref1 : '') + "\n" + (frames.join('\n')) + "\n"; - }; - }; - - formatSourcePosition = function(frame, getSourceMapping) { - var as, column, fileLocation, fileName, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName; - fileName = void 0; - fileLocation = ''; - if (frame.isNative()) { - fileLocation = "native"; - } else { - if (frame.isEval()) { - fileName = frame.getScriptNameOrSourceURL(); - if (!fileName) { - fileLocation = "" + (frame.getEvalOrigin()) + ", "; - } - } else { - fileName = frame.getFileName(); - } - fileName || (fileName = ""); - line = frame.getLineNumber(); - column = frame.getColumnNumber(); - source = getSourceMapping(fileName, line, column); - fileLocation = source ? "" + fileName + ":" + source[0] + ":" + source[1] + ", :" + line + ":" + column : "" + fileName + ":" + line + ":" + column; - } - functionName = frame.getFunctionName(); - isConstructor = frame.isConstructor(); - isMethodCall = !(frame.isToplevel() || isConstructor); - if (isMethodCall) { - methodName = frame.getMethodName(); - typeName = frame.getTypeName(); - if (functionName) { - tp = as = ''; - if (typeName && functionName.indexOf(typeName)) { - tp = "" + typeName + "."; - } - if (methodName && functionName.indexOf("." + methodName) !== functionName.length - methodName.length - 1) { - as = " [as " + methodName + "]"; - } - return "" + tp + functionName + as + " (" + fileLocation + ")"; - } else { - return "" + typeName + "." + (methodName || '') + " (" + fileLocation + ")"; - } - } else if (isConstructor) { - return "new " + (functionName || '') + " (" + fileLocation + ")"; - } else if (functionName) { - return "" + functionName + " (" + fileLocation + ")"; - } else { - return fileLocation; - } - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/command.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/command.js deleted file mode 100644 index 26b25540..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/command.js +++ /dev/null @@ -1,526 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, exists, forkNode, fs, helpers, hidden, joinTimeout, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, sourceCode, sources, spawn, timeLog, unwatchDir, usage, useWinPathSep, version, wait, watch, watchDir, watchers, writeJs, _ref; - - fs = require('fs'); - - path = require('path'); - - helpers = require('./helpers'); - - optparse = require('./optparse'); - - CoffeeScript = require('./coffee-script'); - - _ref = require('child_process'), spawn = _ref.spawn, exec = _ref.exec; - - EventEmitter = require('events').EventEmitter; - - exists = fs.exists || path.exists; - - useWinPathSep = path.sep === '\\'; - - helpers.extend(CoffeeScript, new EventEmitter); - - printLine = function(line) { - return process.stdout.write(line + '\n'); - }; - - printWarn = function(line) { - return process.stderr.write(line + '\n'); - }; - - hidden = function(file) { - return /^\.|~$/.test(file); - }; - - BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.'; - - SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; - - opts = {}; - - sources = []; - - sourceCode = []; - - notSources = {}; - - watchers = {}; - - optionParser = null; - - exports.run = function() { - var literals, source, _i, _len, _results; - parseOptions(); - if (opts.nodejs) { - return forkNode(); - } - if (opts.help) { - return usage(); - } - if (opts.version) { - return version(); - } - if (opts.interactive) { - return require('./repl').start(); - } - if (opts.watch && !fs.watch) { - return printWarn("The --watch feature depends on Node v0.6.0+. You are running " + process.version + "."); - } - if (opts.stdio) { - return compileStdio(); - } - if (opts["eval"]) { - return compileScript(null, sources[0]); - } - if (!sources.length) { - return require('./repl').start(); - } - literals = opts.run ? sources.splice(1) : []; - process.argv = process.argv.slice(0, 2).concat(literals); - process.argv[0] = 'coffee'; - _results = []; - for (_i = 0, _len = sources.length; _i < _len; _i++) { - source = sources[_i]; - _results.push(compilePath(source, true, path.normalize(source))); - } - return _results; - }; - - compilePath = function(source, topLevel, base) { - return fs.stat(source, function(err, stats) { - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - console.error("File not found: " + source); - process.exit(1); - } - if (stats.isDirectory() && path.dirname(source) !== 'node_modules') { - if (opts.watch) { - watchDir(source, base); - } - return fs.readdir(source, function(err, files) { - var file, index, _ref1, _ref2; - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - return; - } - index = sources.indexOf(source); - files = files.filter(function(file) { - return !hidden(file); - }); - [].splice.apply(sources, [index, index - index + 1].concat(_ref1 = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - _results.push(path.join(source, file)); - } - return _results; - })())), _ref1; - [].splice.apply(sourceCode, [index, index - index + 1].concat(_ref2 = files.map(function() { - return null; - }))), _ref2; - return files.forEach(function(file) { - return compilePath(path.join(source, file), false, base); - }); - }); - } else if (topLevel || helpers.isCoffee(source)) { - if (opts.watch) { - watch(source, base); - } - return fs.readFile(source, function(err, code) { - if (err && err.code !== 'ENOENT') { - throw err; - } - if ((err != null ? err.code : void 0) === 'ENOENT') { - return; - } - return compileScript(source, code.toString(), base); - }); - } else { - notSources[source] = true; - return removeSource(source, base); - } - }); - }; - - compileScript = function(file, input, base) { - var compiled, err, message, o, options, t, task, useColors; - if (base == null) { - base = null; - } - o = opts; - options = compileOptions(file, base); - try { - t = task = { - file: file, - input: input, - options: options - }; - CoffeeScript.emit('compile', task); - if (o.tokens) { - return printTokens(CoffeeScript.tokens(t.input, t.options)); - } else if (o.nodes) { - return printLine(CoffeeScript.nodes(t.input, t.options).toString().trim()); - } else if (o.run) { - return CoffeeScript.run(t.input, t.options); - } else if (o.join && t.file !== o.join) { - if (helpers.isLiterate(file)) { - t.input = helpers.invertLiterate(t.input); - } - sourceCode[sources.indexOf(t.file)] = t.input; - return compileJoin(); - } else { - compiled = CoffeeScript.compile(t.input, t.options); - t.output = compiled; - if (o.map) { - t.output = compiled.js; - t.sourceMap = compiled.v3SourceMap; - } - CoffeeScript.emit('success', task); - if (o.print) { - return printLine(t.output.trim()); - } else if (o.compile || o.map) { - return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap); - } - } - } catch (_error) { - err = _error; - CoffeeScript.emit('failure', err, task); - if (CoffeeScript.listeners('failure').length) { - return; - } - useColors = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS; - message = helpers.prettyErrorMessage(err, file || '[stdin]', input, useColors); - if (o.watch) { - return printLine(message + '\x07'); - } else { - printWarn(message); - return process.exit(1); - } - } - }; - - compileStdio = function() { - var code, stdin; - code = ''; - stdin = process.openStdin(); - stdin.on('data', function(buffer) { - if (buffer) { - return code += buffer.toString(); - } - }); - return stdin.on('end', function() { - return compileScript(null, code); - }); - }; - - joinTimeout = null; - - compileJoin = function() { - if (!opts.join) { - return; - } - if (!sourceCode.some(function(code) { - return code === null; - })) { - clearTimeout(joinTimeout); - return joinTimeout = wait(100, function() { - return compileScript(opts.join, sourceCode.join('\n'), opts.join); - }); - } - }; - - watch = function(source, base) { - var compile, compileTimeout, e, prevStats, rewatch, watchErr, watcher; - prevStats = null; - compileTimeout = null; - watchErr = function(e) { - if (e.code === 'ENOENT') { - if (sources.indexOf(source) === -1) { - return; - } - try { - rewatch(); - return compile(); - } catch (_error) { - e = _error; - removeSource(source, base, true); - return compileJoin(); - } - } else { - throw e; - } - }; - compile = function() { - clearTimeout(compileTimeout); - return compileTimeout = wait(25, function() { - return fs.stat(source, function(err, stats) { - if (err) { - return watchErr(err); - } - if (prevStats && stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime()) { - return rewatch(); - } - prevStats = stats; - return fs.readFile(source, function(err, code) { - if (err) { - return watchErr(err); - } - compileScript(source, code.toString(), base); - return rewatch(); - }); - }); - }); - }; - try { - watcher = fs.watch(source, compile); - } catch (_error) { - e = _error; - watchErr(e); - } - return rewatch = function() { - if (watcher != null) { - watcher.close(); - } - return watcher = fs.watch(source, compile); - }; - }; - - watchDir = function(source, base) { - var e, readdirTimeout, watcher; - readdirTimeout = null; - try { - return watcher = fs.watch(source, function() { - clearTimeout(readdirTimeout); - return readdirTimeout = wait(25, function() { - return fs.readdir(source, function(err, files) { - var file, _i, _len, _results; - if (err) { - if (err.code !== 'ENOENT') { - throw err; - } - watcher.close(); - return unwatchDir(source, base); - } - _results = []; - for (_i = 0, _len = files.length; _i < _len; _i++) { - file = files[_i]; - if (!(!hidden(file) && !notSources[file])) { - continue; - } - file = path.join(source, file); - if (sources.some(function(s) { - return s.indexOf(file) >= 0; - })) { - continue; - } - sources.push(file); - sourceCode.push(null); - _results.push(compilePath(file, false, base)); - } - return _results; - }); - }); - }); - } catch (_error) { - e = _error; - if (e.code !== 'ENOENT') { - throw e; - } - } - }; - - unwatchDir = function(source, base) { - var file, prevSources, toRemove, _i, _len; - prevSources = sources.slice(0); - toRemove = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = sources.length; _i < _len; _i++) { - file = sources[_i]; - if (file.indexOf(source) >= 0) { - _results.push(file); - } - } - return _results; - })(); - for (_i = 0, _len = toRemove.length; _i < _len; _i++) { - file = toRemove[_i]; - removeSource(file, base, true); - } - if (!sources.some(function(s, i) { - return prevSources[i] !== s; - })) { - return; - } - return compileJoin(); - }; - - removeSource = function(source, base, removeJs) { - var index, jsPath; - index = sources.indexOf(source); - sources.splice(index, 1); - sourceCode.splice(index, 1); - if (removeJs && !opts.join) { - jsPath = outputPath(source, base); - return exists(jsPath, function(itExists) { - if (itExists) { - return fs.unlink(jsPath, function(err) { - if (err && err.code !== 'ENOENT') { - throw err; - } - return timeLog("removed " + source); - }); - } - }); - } - }; - - outputPath = function(source, base, extension) { - var baseDir, basename, dir, srcDir; - if (extension == null) { - extension = ".js"; - } - basename = helpers.baseFileName(source, true, useWinPathSep); - srcDir = path.dirname(source); - baseDir = base === '.' ? srcDir : srcDir.substring(base.length); - dir = opts.output ? path.join(opts.output, baseDir) : srcDir; - return path.join(dir, basename + extension); - }; - - writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) { - var compile, jsDir, sourceMapPath; - if (generatedSourceMap == null) { - generatedSourceMap = null; - } - sourceMapPath = outputPath(sourcePath, base, ".map"); - jsDir = path.dirname(jsPath); - compile = function() { - if (opts.compile) { - if (js.length <= 0) { - js = ' '; - } - if (generatedSourceMap) { - js = "" + js + "\n/*\n//@ sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n*/\n"; - } - fs.writeFile(jsPath, js, function(err) { - if (err) { - return printLine(err.message); - } else if (opts.compile && opts.watch) { - return timeLog("compiled " + sourcePath); - } - }); - } - if (generatedSourceMap) { - return fs.writeFile(sourceMapPath, generatedSourceMap, function(err) { - if (err) { - return printLine("Could not write source map: " + err.message); - } - }); - } - }; - return exists(jsDir, function(itExists) { - if (itExists) { - return compile(); - } else { - return exec("mkdir -p " + jsDir, compile); - } - }); - }; - - wait = function(milliseconds, func) { - return setTimeout(func, milliseconds); - }; - - timeLog = function(message) { - return console.log("" + ((new Date).toLocaleTimeString()) + " - " + message); - }; - - printTokens = function(tokens) { - var strings, tag, token, value; - strings = (function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = tokens.length; _i < _len; _i++) { - token = tokens[_i]; - tag = token[0]; - value = token[1].toString().replace(/\n/, '\\n'); - _results.push("[" + tag + " " + value + "]"); - } - return _results; - })(); - return printLine(strings.join(' ')); - }; - - parseOptions = function() { - var i, o, source, _i, _len; - optionParser = new optparse.OptionParser(SWITCHES, BANNER); - o = opts = optionParser.parse(process.argv.slice(2)); - o.compile || (o.compile = !!o.output); - o.run = !(o.compile || o.print || o.map); - o.print = !!(o.print || (o["eval"] || o.stdio && o.compile)); - sources = o["arguments"]; - for (i = _i = 0, _len = sources.length; _i < _len; i = ++_i) { - source = sources[i]; - sourceCode[i] = null; - } - }; - - compileOptions = function(filename, base) { - var answer, cwd, jsDir, jsPath; - answer = { - filename: filename, - literate: opts.literate || helpers.isLiterate(filename), - bare: opts.bare, - header: opts.compile, - sourceMap: opts.map - }; - if (filename) { - if (base) { - cwd = process.cwd(); - jsPath = outputPath(filename, base); - jsDir = path.dirname(jsPath); - answer = helpers.merge(answer, { - jsPath: jsPath, - sourceRoot: path.relative(jsDir, cwd), - sourceFiles: [path.relative(cwd, filename)], - generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep) - }); - } else { - answer = helpers.merge(answer, { - sourceRoot: "", - sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)], - generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js" - }); - } - } - return answer; - }; - - forkNode = function() { - var args, nodeArgs; - nodeArgs = opts.nodejs.split(/\s+/); - args = process.argv.slice(1); - args.splice(args.indexOf('--nodejs'), 2); - return spawn(process.execPath, nodeArgs.concat(args), { - cwd: process.cwd(), - env: process.env, - customFds: [0, 1, 2] - }); - }; - - usage = function() { - return printLine((new optparse.OptionParser(SWITCHES, BANNER)).help()); - }; - - version = function() { - return printLine("CoffeeScript version " + CoffeeScript.VERSION); - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/grammar.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/grammar.js deleted file mode 100644 index 24d5bacc..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/grammar.js +++ /dev/null @@ -1,625 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; - - Parser = require('jison').Parser; - - unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/; - - o = function(patternString, action, options) { - var addLocationDataFn, match, patternCount; - patternString = patternString.replace(/\s{2,}/g, ' '); - patternCount = patternString.split(' ').length; - if (!action) { - return [patternString, '$$ = $1;', options]; - } - action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())"; - action = action.replace(/\bnew /g, '$&yy.'); - action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&'); - addLocationDataFn = function(first, last) { - if (!last) { - return "yy.addLocationDataFn(@" + first + ")"; - } else { - return "yy.addLocationDataFn(@" + first + ", @" + last + ")"; - } - }; - action = action.replace(/LOC\(([0-9]*)\)/g, addLocationDataFn('$1')); - action = action.replace(/LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2')); - return [patternString, "$$ = " + (addLocationDataFn(1, patternCount)) + "(" + action + ");", options]; - }; - - grammar = { - Root: [ - o('', function() { - return new Block; - }), o('Body'), o('Block TERMINATOR') - ], - Body: [ - o('Line', function() { - return Block.wrap([$1]); - }), o('Body TERMINATOR Line', function() { - return $1.push($3); - }), o('Body TERMINATOR') - ], - Line: [o('Expression'), o('Statement')], - Statement: [ - o('Return'), o('Comment'), o('STATEMENT', function() { - return new Literal($1); - }) - ], - Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class'), o('Throw')], - Block: [ - o('INDENT OUTDENT', function() { - return new Block; - }), o('INDENT Body OUTDENT', function() { - return $2; - }) - ], - Identifier: [ - o('IDENTIFIER', function() { - return new Literal($1); - }) - ], - AlphaNumeric: [ - o('NUMBER', function() { - return new Literal($1); - }), o('STRING', function() { - return new Literal($1); - }) - ], - Literal: [ - o('AlphaNumeric'), o('JS', function() { - return new Literal($1); - }), o('REGEX', function() { - return new Literal($1); - }), o('DEBUGGER', function() { - return new Literal($1); - }), o('UNDEFINED', function() { - return new Undefined; - }), o('NULL', function() { - return new Null; - }), o('BOOL', function() { - return new Bool($1); - }) - ], - Assign: [ - o('Assignable = Expression', function() { - return new Assign($1, $3); - }), o('Assignable = TERMINATOR Expression', function() { - return new Assign($1, $4); - }), o('Assignable = INDENT Expression OUTDENT', function() { - return new Assign($1, $4); - }) - ], - AssignObj: [ - o('ObjAssignable', function() { - return new Value($1); - }), o('ObjAssignable : Expression', function() { - return new Assign(LOC(1)(new Value($1)), $3, 'object'); - }), o('ObjAssignable :\ - INDENT Expression OUTDENT', function() { - return new Assign(LOC(1)(new Value($1)), $4, 'object'); - }), o('Comment') - ], - ObjAssignable: [o('Identifier'), o('AlphaNumeric'), o('ThisProperty')], - Return: [ - o('RETURN Expression', function() { - return new Return($2); - }), o('RETURN', function() { - return new Return; - }) - ], - Comment: [ - o('HERECOMMENT', function() { - return new Comment($1); - }) - ], - Code: [ - o('PARAM_START ParamList PARAM_END FuncGlyph Block', function() { - return new Code($2, $5, $4); - }), o('FuncGlyph Block', function() { - return new Code([], $2, $1); - }) - ], - FuncGlyph: [ - o('->', function() { - return 'func'; - }), o('=>', function() { - return 'boundfunc'; - }) - ], - OptComma: [o(''), o(',')], - ParamList: [ - o('', function() { - return []; - }), o('Param', function() { - return [$1]; - }), o('ParamList , Param', function() { - return $1.concat($3); - }), o('ParamList OptComma TERMINATOR Param', function() { - return $1.concat($4); - }), o('ParamList OptComma INDENT ParamList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Param: [ - o('ParamVar', function() { - return new Param($1); - }), o('ParamVar ...', function() { - return new Param($1, null, true); - }), o('ParamVar = Expression', function() { - return new Param($1, $3); - }) - ], - ParamVar: [o('Identifier'), o('ThisProperty'), o('Array'), o('Object')], - Splat: [ - o('Expression ...', function() { - return new Splat($1); - }) - ], - SimpleAssignable: [ - o('Identifier', function() { - return new Value($1); - }), o('Value Accessor', function() { - return $1.add($2); - }), o('Invocation Accessor', function() { - return new Value($1, [].concat($2)); - }), o('ThisProperty') - ], - Assignable: [ - o('SimpleAssignable'), o('Array', function() { - return new Value($1); - }), o('Object', function() { - return new Value($1); - }) - ], - Value: [ - o('Assignable'), o('Literal', function() { - return new Value($1); - }), o('Parenthetical', function() { - return new Value($1); - }), o('Range', function() { - return new Value($1); - }), o('This') - ], - Accessor: [ - o('. Identifier', function() { - return new Access($2); - }), o('?. Identifier', function() { - return new Access($2, 'soak'); - }), o(':: Identifier', function() { - return [LOC(1)(new Access(new Literal('prototype'))), LOC(2)(new Access($2))]; - }), o('?:: Identifier', function() { - return [LOC(1)(new Access(new Literal('prototype'), 'soak')), LOC(2)(new Access($2))]; - }), o('::', function() { - return new Access(new Literal('prototype')); - }), o('Index') - ], - Index: [ - o('INDEX_START IndexValue INDEX_END', function() { - return $2; - }), o('INDEX_SOAK Index', function() { - return extend($2, { - soak: true - }); - }) - ], - IndexValue: [ - o('Expression', function() { - return new Index($1); - }), o('Slice', function() { - return new Slice($1); - }) - ], - Object: [ - o('{ AssignList OptComma }', function() { - return new Obj($2, $1.generated); - }) - ], - AssignList: [ - o('', function() { - return []; - }), o('AssignObj', function() { - return [$1]; - }), o('AssignList , AssignObj', function() { - return $1.concat($3); - }), o('AssignList OptComma TERMINATOR AssignObj', function() { - return $1.concat($4); - }), o('AssignList OptComma INDENT AssignList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Class: [ - o('CLASS', function() { - return new Class; - }), o('CLASS Block', function() { - return new Class(null, null, $2); - }), o('CLASS EXTENDS Expression', function() { - return new Class(null, $3); - }), o('CLASS EXTENDS Expression Block', function() { - return new Class(null, $3, $4); - }), o('CLASS SimpleAssignable', function() { - return new Class($2); - }), o('CLASS SimpleAssignable Block', function() { - return new Class($2, null, $3); - }), o('CLASS SimpleAssignable EXTENDS Expression', function() { - return new Class($2, $4); - }), o('CLASS SimpleAssignable EXTENDS Expression Block', function() { - return new Class($2, $4, $5); - }) - ], - Invocation: [ - o('Value OptFuncExist Arguments', function() { - return new Call($1, $3, $2); - }), o('Invocation OptFuncExist Arguments', function() { - return new Call($1, $3, $2); - }), o('SUPER', function() { - return new Call('super', [new Splat(new Literal('arguments'))]); - }), o('SUPER Arguments', function() { - return new Call('super', $2); - }) - ], - OptFuncExist: [ - o('', function() { - return false; - }), o('FUNC_EXIST', function() { - return true; - }) - ], - Arguments: [ - o('CALL_START CALL_END', function() { - return []; - }), o('CALL_START ArgList OptComma CALL_END', function() { - return $2; - }) - ], - This: [ - o('THIS', function() { - return new Value(new Literal('this')); - }), o('@', function() { - return new Value(new Literal('this')); - }) - ], - ThisProperty: [ - o('@ Identifier', function() { - return new Value(LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this'); - }) - ], - Array: [ - o('[ ]', function() { - return new Arr([]); - }), o('[ ArgList OptComma ]', function() { - return new Arr($2); - }) - ], - RangeDots: [ - o('..', function() { - return 'inclusive'; - }), o('...', function() { - return 'exclusive'; - }) - ], - Range: [ - o('[ Expression RangeDots Expression ]', function() { - return new Range($2, $4, $3); - }) - ], - Slice: [ - o('Expression RangeDots Expression', function() { - return new Range($1, $3, $2); - }), o('Expression RangeDots', function() { - return new Range($1, null, $2); - }), o('RangeDots Expression', function() { - return new Range(null, $2, $1); - }), o('RangeDots', function() { - return new Range(null, null, $1); - }) - ], - ArgList: [ - o('Arg', function() { - return [$1]; - }), o('ArgList , Arg', function() { - return $1.concat($3); - }), o('ArgList OptComma TERMINATOR Arg', function() { - return $1.concat($4); - }), o('INDENT ArgList OptComma OUTDENT', function() { - return $2; - }), o('ArgList OptComma INDENT ArgList OptComma OUTDENT', function() { - return $1.concat($4); - }) - ], - Arg: [o('Expression'), o('Splat')], - SimpleArgs: [ - o('Expression'), o('SimpleArgs , Expression', function() { - return [].concat($1, $3); - }) - ], - Try: [ - o('TRY Block', function() { - return new Try($2); - }), o('TRY Block Catch', function() { - return new Try($2, $3[0], $3[1]); - }), o('TRY Block FINALLY Block', function() { - return new Try($2, null, null, $4); - }), o('TRY Block Catch FINALLY Block', function() { - return new Try($2, $3[0], $3[1], $5); - }) - ], - Catch: [ - o('CATCH Identifier Block', function() { - return [$2, $3]; - }), o('CATCH Object Block', function() { - return [LOC(2)(new Value($2)), $3]; - }), o('CATCH Block', function() { - return [null, $2]; - }) - ], - Throw: [ - o('THROW Expression', function() { - return new Throw($2); - }) - ], - Parenthetical: [ - o('( Body )', function() { - return new Parens($2); - }), o('( INDENT Body OUTDENT )', function() { - return new Parens($3); - }) - ], - WhileSource: [ - o('WHILE Expression', function() { - return new While($2); - }), o('WHILE Expression WHEN Expression', function() { - return new While($2, { - guard: $4 - }); - }), o('UNTIL Expression', function() { - return new While($2, { - invert: true - }); - }), o('UNTIL Expression WHEN Expression', function() { - return new While($2, { - invert: true, - guard: $4 - }); - }) - ], - While: [ - o('WhileSource Block', function() { - return $1.addBody($2); - }), o('Statement WhileSource', function() { - return $2.addBody(LOC(1)(Block.wrap([$1]))); - }), o('Expression WhileSource', function() { - return $2.addBody(LOC(1)(Block.wrap([$1]))); - }), o('Loop', function() { - return $1; - }) - ], - Loop: [ - o('LOOP Block', function() { - return new While(LOC(1)(new Literal('true'))).addBody($2); - }), o('LOOP Expression', function() { - return new While(LOC(1)(new Literal('true'))).addBody(LOC(2)(Block.wrap([$2]))); - }) - ], - For: [ - o('Statement ForBody', function() { - return new For($1, $2); - }), o('Expression ForBody', function() { - return new For($1, $2); - }), o('ForBody Block', function() { - return new For($2, $1); - }) - ], - ForBody: [ - o('FOR Range', function() { - return { - source: LOC(2)(new Value($2)) - }; - }), o('ForStart ForSource', function() { - $2.own = $1.own; - $2.name = $1[0]; - $2.index = $1[1]; - return $2; - }) - ], - ForStart: [ - o('FOR ForVariables', function() { - return $2; - }), o('FOR OWN ForVariables', function() { - $3.own = true; - return $3; - }) - ], - ForValue: [ - o('Identifier'), o('ThisProperty'), o('Array', function() { - return new Value($1); - }), o('Object', function() { - return new Value($1); - }) - ], - ForVariables: [ - o('ForValue', function() { - return [$1]; - }), o('ForValue , ForValue', function() { - return [$1, $3]; - }) - ], - ForSource: [ - o('FORIN Expression', function() { - return { - source: $2 - }; - }), o('FOROF Expression', function() { - return { - source: $2, - object: true - }; - }), o('FORIN Expression WHEN Expression', function() { - return { - source: $2, - guard: $4 - }; - }), o('FOROF Expression WHEN Expression', function() { - return { - source: $2, - guard: $4, - object: true - }; - }), o('FORIN Expression BY Expression', function() { - return { - source: $2, - step: $4 - }; - }), o('FORIN Expression WHEN Expression BY Expression', function() { - return { - source: $2, - guard: $4, - step: $6 - }; - }), o('FORIN Expression BY Expression WHEN Expression', function() { - return { - source: $2, - step: $4, - guard: $6 - }; - }) - ], - Switch: [ - o('SWITCH Expression INDENT Whens OUTDENT', function() { - return new Switch($2, $4); - }), o('SWITCH Expression INDENT Whens ELSE Block OUTDENT', function() { - return new Switch($2, $4, $6); - }), o('SWITCH INDENT Whens OUTDENT', function() { - return new Switch(null, $3); - }), o('SWITCH INDENT Whens ELSE Block OUTDENT', function() { - return new Switch(null, $3, $5); - }) - ], - Whens: [ - o('When'), o('Whens When', function() { - return $1.concat($2); - }) - ], - When: [ - o('LEADING_WHEN SimpleArgs Block', function() { - return [[$2, $3]]; - }), o('LEADING_WHEN SimpleArgs Block TERMINATOR', function() { - return [[$2, $3]]; - }) - ], - IfBlock: [ - o('IF Expression Block', function() { - return new If($2, $3, { - type: $1 - }); - }), o('IfBlock ELSE IF Expression Block', function() { - return $1.addElse(new If($4, $5, { - type: $3 - })); - }) - ], - If: [ - o('IfBlock'), o('IfBlock ELSE Block', function() { - return $1.addElse($3); - }), o('Statement POST_IF Expression', function() { - return new If($3, LOC(1)(Block.wrap([$1])), { - type: $2, - statement: true - }); - }), o('Expression POST_IF Expression', function() { - return new If($3, LOC(1)(Block.wrap([$1])), { - type: $2, - statement: true - }); - }) - ], - Operation: [ - o('UNARY Expression', function() { - return new Op($1, $2); - }), o('- Expression', (function() { - return new Op('-', $2); - }), { - prec: 'UNARY' - }), o('+ Expression', (function() { - return new Op('+', $2); - }), { - prec: 'UNARY' - }), o('-- SimpleAssignable', function() { - return new Op('--', $2); - }), o('++ SimpleAssignable', function() { - return new Op('++', $2); - }), o('SimpleAssignable --', function() { - return new Op('--', $1, null, true); - }), o('SimpleAssignable ++', function() { - return new Op('++', $1, null, true); - }), o('Expression ?', function() { - return new Existence($1); - }), o('Expression + Expression', function() { - return new Op('+', $1, $3); - }), o('Expression - Expression', function() { - return new Op('-', $1, $3); - }), o('Expression MATH Expression', function() { - return new Op($2, $1, $3); - }), o('Expression SHIFT Expression', function() { - return new Op($2, $1, $3); - }), o('Expression COMPARE Expression', function() { - return new Op($2, $1, $3); - }), o('Expression LOGIC Expression', function() { - return new Op($2, $1, $3); - }), o('Expression RELATION Expression', function() { - if ($2.charAt(0) === '!') { - return new Op($2.slice(1), $1, $3).invert(); - } else { - return new Op($2, $1, $3); - } - }), o('SimpleAssignable COMPOUND_ASSIGN\ - Expression', function() { - return new Assign($1, $3, $2); - }), o('SimpleAssignable COMPOUND_ASSIGN\ - INDENT Expression OUTDENT', function() { - return new Assign($1, $4, $2); - }), o('SimpleAssignable COMPOUND_ASSIGN TERMINATOR\ - Expression', function() { - return new Assign($1, $4, $2); - }), o('SimpleAssignable EXTENDS Expression', function() { - return new Extends($1, $3); - }) - ] - }; - - operators = [['left', '.', '?.', '::', '?::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', 'LOGIC'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'], ['right', 'POST_IF']]; - - tokens = []; - - for (name in grammar) { - alternatives = grammar[name]; - grammar[name] = (function() { - var _i, _j, _len, _len1, _ref, _results; - _results = []; - for (_i = 0, _len = alternatives.length; _i < _len; _i++) { - alt = alternatives[_i]; - _ref = alt[0].split(' '); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - token = _ref[_j]; - if (!grammar[token]) { - tokens.push(token); - } - } - if (name === 'Root') { - alt[1] = "return " + alt[1]; - } - _results.push(alt); - } - return _results; - })(); - } - - exports.parser = new Parser({ - tokens: tokens.join(' '), - bnf: grammar, - operators: operators.reverse(), - startSymbol: 'Root' - }); - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/helpers.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/helpers.js deleted file mode 100644 index 352dc366..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/helpers.js +++ /dev/null @@ -1,223 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var buildLocationData, extend, flatten, last, repeat, _ref; - - exports.starts = function(string, literal, start) { - return literal === string.substr(start, literal.length); - }; - - exports.ends = function(string, literal, back) { - var len; - len = literal.length; - return literal === string.substr(string.length - len - (back || 0), len); - }; - - exports.repeat = repeat = function(str, n) { - var res; - res = ''; - while (n > 0) { - if (n & 1) { - res += str; - } - n >>>= 1; - str += str; - } - return res; - }; - - exports.compact = function(array) { - var item, _i, _len, _results; - _results = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - item = array[_i]; - if (item) { - _results.push(item); - } - } - return _results; - }; - - exports.count = function(string, substr) { - var num, pos; - num = pos = 0; - if (!substr.length) { - return 1 / 0; - } - while (pos = 1 + string.indexOf(substr, pos)) { - num++; - } - return num; - }; - - exports.merge = function(options, overrides) { - return extend(extend({}, options), overrides); - }; - - extend = exports.extend = function(object, properties) { - var key, val; - for (key in properties) { - val = properties[key]; - object[key] = val; - } - return object; - }; - - exports.flatten = flatten = function(array) { - var element, flattened, _i, _len; - flattened = []; - for (_i = 0, _len = array.length; _i < _len; _i++) { - element = array[_i]; - if (element instanceof Array) { - flattened = flattened.concat(flatten(element)); - } else { - flattened.push(element); - } - } - return flattened; - }; - - exports.del = function(obj, key) { - var val; - val = obj[key]; - delete obj[key]; - return val; - }; - - exports.last = last = function(array, back) { - return array[array.length - (back || 0) - 1]; - }; - - exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) { - var e, _i, _len; - for (_i = 0, _len = this.length; _i < _len; _i++) { - e = this[_i]; - if (fn(e)) { - return true; - } - } - return false; - }; - - exports.invertLiterate = function(code) { - var line, lines, maybe_code; - maybe_code = true; - lines = (function() { - var _i, _len, _ref1, _results; - _ref1 = code.split('\n'); - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - line = _ref1[_i]; - if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { - _results.push(line); - } else if (maybe_code = /^\s*$/.test(line)) { - _results.push(line); - } else { - _results.push('# ' + line); - } - } - return _results; - })(); - return lines.join('\n'); - }; - - buildLocationData = function(first, last) { - if (!last) { - return first; - } else { - return { - first_line: first.first_line, - first_column: first.first_column, - last_line: last.last_line, - last_column: last.last_column - }; - } - }; - - exports.addLocationDataFn = function(first, last) { - return function(obj) { - if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) { - obj.updateLocationDataIfMissing(buildLocationData(first, last)); - } - return obj; - }; - }; - - exports.locationDataToString = function(obj) { - var locationData; - if (("2" in obj) && ("first_line" in obj[2])) { - locationData = obj[2]; - } else if ("first_line" in obj) { - locationData = obj; - } - if (locationData) { - return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1)); - } else { - return "No location data"; - } - }; - - exports.baseFileName = function(file, stripExt, useWinPathSep) { - var parts, pathSep; - if (stripExt == null) { - stripExt = false; - } - if (useWinPathSep == null) { - useWinPathSep = false; - } - pathSep = useWinPathSep ? /\\|\// : /\//; - parts = file.split(pathSep); - file = parts[parts.length - 1]; - if (!stripExt) { - return file; - } - parts = file.split('.'); - parts.pop(); - if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { - parts.pop(); - } - return parts.join('.'); - }; - - exports.isCoffee = function(file) { - return /\.((lit)?coffee|coffee\.md)$/.test(file); - }; - - exports.isLiterate = function(file) { - return /\.(litcoffee|coffee\.md)$/.test(file); - }; - - exports.throwSyntaxError = function(message, location) { - var error; - if (location.last_line == null) { - location.last_line = location.first_line; - } - if (location.last_column == null) { - location.last_column = location.first_column; - } - error = new SyntaxError(message); - error.location = location; - throw error; - }; - - exports.prettyErrorMessage = function(error, fileName, code, useColors) { - var codeLine, colorize, end, first_column, first_line, last_column, last_line, marker, message, start, _ref1; - if (!error.location) { - return error.stack || ("" + error); - } - _ref1 = error.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column; - codeLine = code.split('\n')[first_line]; - start = first_column; - end = first_line === last_line ? last_column + 1 : codeLine.length; - marker = repeat(' ', start) + repeat('^', end - start); - if (useColors) { - colorize = function(str) { - return "\x1B[1;31m" + str + "\x1B[0m"; - }; - codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); - marker = colorize(marker); - } - message = "" + fileName + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + error.message + "\n" + codeLine + "\n" + marker; - return message; - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/index.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/index.js deleted file mode 100644 index 68787dfd..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/index.js +++ /dev/null @@ -1,11 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var key, val, _ref; - - _ref = require('./coffee-script'); - for (key in _ref) { - val = _ref[key]; - exports[key] = val; - } - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/lexer.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/lexer.js deleted file mode 100644 index b4db45fd..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/lexer.js +++ /dev/null @@ -1,889 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; - - _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; - - _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; - - exports.Lexer = Lexer = (function() { - function Lexer() {} - - Lexer.prototype.tokenize = function(code, opts) { - var consumed, i, tag, _ref2; - if (opts == null) { - opts = {}; - } - this.literate = opts.literate; - this.indent = 0; - this.indebt = 0; - this.outdebt = 0; - this.indents = []; - this.ends = []; - this.tokens = []; - this.chunkLine = opts.line || 0; - this.chunkColumn = opts.column || 0; - code = this.clean(code); - i = 0; - while (this.chunk = code.slice(i)) { - consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); - _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1]; - i += consumed; - } - this.closeIndentation(); - if (tag = this.ends.pop()) { - this.error("missing " + tag); - } - if (opts.rewrite === false) { - return this.tokens; - } - return (new Rewriter).rewrite(this.tokens); - }; - - Lexer.prototype.clean = function(code) { - if (code.charCodeAt(0) === BOM) { - code = code.slice(1); - } - code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); - if (WHITESPACE.test(code)) { - code = "\n" + code; - this.chunkLine--; - } - if (this.literate) { - code = invertLiterate(code); - } - return code; - }; - - Lexer.prototype.identifierToken = function() { - var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4; - if (!(match = IDENTIFIER.exec(this.chunk))) { - return 0; - } - input = match[0], id = match[1], colon = match[2]; - idLength = id.length; - poppedToken = void 0; - if (id === 'own' && this.tag() === 'FOR') { - this.token('OWN', id); - return id.length; - } - forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@'); - tag = 'IDENTIFIER'; - if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { - tag = id.toUpperCase(); - if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) { - tag = 'LEADING_WHEN'; - } else if (tag === 'FOR') { - this.seenFor = true; - } else if (tag === 'UNLESS') { - tag = 'IF'; - } else if (__indexOf.call(UNARY, tag) >= 0) { - tag = 'UNARY'; - } else if (__indexOf.call(RELATION, tag) >= 0) { - if (tag !== 'INSTANCEOF' && this.seenFor) { - tag = 'FOR' + tag; - this.seenFor = false; - } else { - tag = 'RELATION'; - if (this.value() === '!') { - poppedToken = this.tokens.pop(); - id = '!' + id; - } - } - } - } - if (__indexOf.call(JS_FORBIDDEN, id) >= 0) { - if (forcedIdentifier) { - tag = 'IDENTIFIER'; - id = new String(id); - id.reserved = true; - } else if (__indexOf.call(RESERVED, id) >= 0) { - this.error("reserved word \"" + id + "\""); - } - } - if (!forcedIdentifier) { - if (__indexOf.call(COFFEE_ALIASES, id) >= 0) { - id = COFFEE_ALIAS_MAP[id]; - } - tag = (function() { - switch (id) { - case '!': - return 'UNARY'; - case '==': - case '!=': - return 'COMPARE'; - case '&&': - case '||': - return 'LOGIC'; - case 'true': - case 'false': - return 'BOOL'; - case 'break': - case 'continue': - return 'STATEMENT'; - default: - return tag; - } - })(); - } - tagToken = this.token(tag, id, 0, idLength); - if (poppedToken) { - _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1]; - } - if (colon) { - colonOffset = input.lastIndexOf(':'); - this.token(':', ':', colonOffset, colon.length); - } - return input.length; - }; - - Lexer.prototype.numberToken = function() { - var binaryLiteral, lexedLength, match, number, octalLiteral; - if (!(match = NUMBER.exec(this.chunk))) { - return 0; - } - number = match[0]; - if (/^0[BOX]/.test(number)) { - this.error("radix prefix '" + number + "' must be lowercase"); - } else if (/E/.test(number) && !/^0x/.test(number)) { - this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'"); - } else if (/^0\d*[89]/.test(number)) { - this.error("decimal literal '" + number + "' must not be prefixed with '0'"); - } else if (/^0\d+/.test(number)) { - this.error("octal literal '" + number + "' must be prefixed with '0o'"); - } - lexedLength = number.length; - if (octalLiteral = /^0o([0-7]+)/.exec(number)) { - number = '0x' + parseInt(octalLiteral[1], 8).toString(16); - } - if (binaryLiteral = /^0b([01]+)/.exec(number)) { - number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); - } - this.token('NUMBER', number, 0, lexedLength); - return lexedLength; - }; - - Lexer.prototype.stringToken = function() { - var match, octalEsc, string; - switch (this.chunk.charAt(0)) { - case "'": - if (!(match = SIMPLESTR.exec(this.chunk))) { - return 0; - } - string = match[0]; - this.token('STRING', string.replace(MULTILINER, '\\\n'), 0, string.length); - break; - case '"': - if (!(string = this.balancedString(this.chunk, '"'))) { - return 0; - } - if (0 < string.indexOf('#{', 1)) { - this.interpolateString(string.slice(1, -1), { - strOffset: 1, - lexedLength: string.length - }); - } else { - this.token('STRING', this.escapeLines(string, 0, string.length)); - } - break; - default: - return 0; - } - if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) { - this.error("octal escape sequences " + string + " are not allowed"); - } - return string.length; - }; - - Lexer.prototype.heredocToken = function() { - var doc, heredoc, match, quote; - if (!(match = HEREDOC.exec(this.chunk))) { - return 0; - } - heredoc = match[0]; - quote = heredoc.charAt(0); - doc = this.sanitizeHeredoc(match[2], { - quote: quote, - indent: null - }); - if (quote === '"' && 0 <= doc.indexOf('#{')) { - this.interpolateString(doc, { - heredoc: true, - strOffset: 3, - lexedLength: heredoc.length - }); - } else { - this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length); - } - return heredoc.length; - }; - - Lexer.prototype.commentToken = function() { - var comment, here, match; - if (!(match = this.chunk.match(COMMENT))) { - return 0; - } - comment = match[0], here = match[1]; - if (here) { - this.token('HERECOMMENT', this.sanitizeHeredoc(here, { - herecomment: true, - indent: repeat(' ', this.indent) - }), 0, comment.length); - } - return comment.length; - }; - - Lexer.prototype.jsToken = function() { - var match, script; - if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { - return 0; - } - this.token('JS', (script = match[0]).slice(1, -1), 0, script.length); - return script.length; - }; - - Lexer.prototype.regexToken = function() { - var flags, length, match, prev, regex, _ref2, _ref3; - if (this.chunk.charAt(0) !== '/') { - return 0; - } - if (match = HEREGEX.exec(this.chunk)) { - length = this.heregexToken(match); - return length; - } - prev = last(this.tokens); - if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) { - return 0; - } - if (!(match = REGEX.exec(this.chunk))) { - return 0; - } - _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2]; - if (regex.slice(0, 2) === '/*') { - this.error('regular expressions cannot begin with `*`'); - } - if (regex === '//') { - regex = '/(?:)/'; - } - this.token('REGEX', "" + regex + flags, 0, match.length); - return match.length; - }; - - Lexer.prototype.heregexToken = function(match) { - var body, flags, flagsOffset, heregex, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; - heregex = match[0], body = match[1], flags = match[2]; - if (0 > body.indexOf('#{')) { - re = body.replace(HEREGEX_OMIT, '').replace(/\//g, '\\/'); - if (re.match(/^\*/)) { - this.error('regular expressions cannot begin with `*`'); - } - this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length); - return heregex.length; - } - this.token('IDENTIFIER', 'RegExp', 0, 0); - this.token('CALL_START', '(', 0, 0); - tokens = []; - _ref2 = this.interpolateString(body, { - regex: true - }); - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - token = _ref2[_i]; - tag = token[0], value = token[1]; - if (tag === 'TOKENS') { - tokens.push.apply(tokens, value); - } else if (tag === 'NEOSTRING') { - if (!(value = value.replace(HEREGEX_OMIT, ''))) { - continue; - } - value = value.replace(/\\/g, '\\\\'); - token[0] = 'STRING'; - token[1] = this.makeString(value, '"', true); - tokens.push(token); - } else { - this.error("Unexpected " + tag); - } - prev = last(this.tokens); - plusToken = ['+', '+']; - plusToken[2] = prev[2]; - tokens.push(plusToken); - } - tokens.pop(); - if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') { - this.token('STRING', '""', 0, 0); - this.token('+', '+', 0, 0); - } - (_ref4 = this.tokens).push.apply(_ref4, tokens); - if (flags) { - flagsOffset = heregex.lastIndexOf(flags); - this.token(',', ',', flagsOffset, 0); - this.token('STRING', '"' + flags + '"', flagsOffset, flags.length); - } - this.token(')', ')', heregex.length - 1, 0); - return heregex.length; - }; - - Lexer.prototype.lineToken = function() { - var diff, indent, match, noNewlines, size; - if (!(match = MULTI_DENT.exec(this.chunk))) { - return 0; - } - indent = match[0]; - this.seenFor = false; - size = indent.length - 1 - indent.lastIndexOf('\n'); - noNewlines = this.unfinished(); - if (size - this.indebt === this.indent) { - if (noNewlines) { - this.suppressNewlines(); - } else { - this.newlineToken(0); - } - return indent.length; - } - if (size > this.indent) { - if (noNewlines) { - this.indebt = size - this.indent; - this.suppressNewlines(); - return indent.length; - } - diff = size - this.indent + this.outdebt; - this.token('INDENT', diff, indent.length - size, size); - this.indents.push(diff); - this.ends.push('OUTDENT'); - this.outdebt = this.indebt = 0; - } else { - this.indebt = 0; - this.outdentToken(this.indent - size, noNewlines, indent.length); - } - this.indent = size; - return indent.length; - }; - - Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { - var dent, len; - while (moveOut > 0) { - len = this.indents.length - 1; - if (this.indents[len] === void 0) { - moveOut = 0; - } else if (this.indents[len] === this.outdebt) { - moveOut -= this.outdebt; - this.outdebt = 0; - } else if (this.indents[len] < this.outdebt) { - this.outdebt -= this.indents[len]; - moveOut -= this.indents[len]; - } else { - dent = this.indents.pop() + this.outdebt; - moveOut -= dent; - this.outdebt = 0; - this.pair('OUTDENT'); - this.token('OUTDENT', dent, 0, outdentLength); - } - } - if (dent) { - this.outdebt -= moveOut; - } - while (this.value() === ';') { - this.tokens.pop(); - } - if (!(this.tag() === 'TERMINATOR' || noNewlines)) { - this.token('TERMINATOR', '\n', outdentLength, 0); - } - return this; - }; - - Lexer.prototype.whitespaceToken = function() { - var match, nline, prev; - if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { - return 0; - } - prev = last(this.tokens); - if (prev) { - prev[match ? 'spaced' : 'newLine'] = true; - } - if (match) { - return match[0].length; - } else { - return 0; - } - }; - - Lexer.prototype.newlineToken = function(offset) { - while (this.value() === ';') { - this.tokens.pop(); - } - if (this.tag() !== 'TERMINATOR') { - this.token('TERMINATOR', '\n', offset, 0); - } - return this; - }; - - Lexer.prototype.suppressNewlines = function() { - if (this.value() === '\\') { - this.tokens.pop(); - } - return this; - }; - - Lexer.prototype.literalToken = function() { - var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; - if (match = OPERATOR.exec(this.chunk)) { - value = match[0]; - if (CODE.test(value)) { - this.tagParameters(); - } - } else { - value = this.chunk.charAt(0); - } - tag = value; - prev = last(this.tokens); - if (value === '=' && prev) { - if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) { - this.error("reserved word \"" + (this.value()) + "\" can't be assigned"); - } - if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') { - prev[0] = 'COMPOUND_ASSIGN'; - prev[1] += '='; - return value.length; - } - } - if (value === ';') { - this.seenFor = false; - tag = 'TERMINATOR'; - } else if (__indexOf.call(MATH, value) >= 0) { - tag = 'MATH'; - } else if (__indexOf.call(COMPARE, value) >= 0) { - tag = 'COMPARE'; - } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) { - tag = 'COMPOUND_ASSIGN'; - } else if (__indexOf.call(UNARY, value) >= 0) { - tag = 'UNARY'; - } else if (__indexOf.call(SHIFT, value) >= 0) { - tag = 'SHIFT'; - } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) { - tag = 'LOGIC'; - } else if (prev && !prev.spaced) { - if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) { - if (prev[0] === '?') { - prev[0] = 'FUNC_EXIST'; - } - tag = 'CALL_START'; - } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) { - tag = 'INDEX_START'; - switch (prev[0]) { - case '?': - prev[0] = 'INDEX_SOAK'; - } - } - } - switch (value) { - case '(': - case '{': - case '[': - this.ends.push(INVERSES[value]); - break; - case ')': - case '}': - case ']': - this.pair(value); - } - this.token(tag, value); - return value.length; - }; - - Lexer.prototype.sanitizeHeredoc = function(doc, options) { - var attempt, herecomment, indent, match, _ref2; - indent = options.indent, herecomment = options.herecomment; - if (herecomment) { - if (HEREDOC_ILLEGAL.test(doc)) { - this.error("block comment cannot contain \"*/\", starting"); - } - if (doc.indexOf('\n') < 0) { - return doc; - } - } else { - while (match = HEREDOC_INDENT.exec(doc)) { - attempt = match[1]; - if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) { - indent = attempt; - } - } - } - if (indent) { - doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); - } - if (!herecomment) { - doc = doc.replace(/^\n/, ''); - } - return doc; - }; - - Lexer.prototype.tagParameters = function() { - var i, stack, tok, tokens; - if (this.tag() !== ')') { - return this; - } - stack = []; - tokens = this.tokens; - i = tokens.length; - tokens[--i][0] = 'PARAM_END'; - while (tok = tokens[--i]) { - switch (tok[0]) { - case ')': - stack.push(tok); - break; - case '(': - case 'CALL_START': - if (stack.length) { - stack.pop(); - } else if (tok[0] === '(') { - tok[0] = 'PARAM_START'; - return this; - } else { - return this; - } - } - } - return this; - }; - - Lexer.prototype.closeIndentation = function() { - return this.outdentToken(this.indent); - }; - - Lexer.prototype.balancedString = function(str, end) { - var continueCount, i, letter, match, prev, stack, _i, _ref2; - continueCount = 0; - stack = [end]; - for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) { - if (continueCount) { - --continueCount; - continue; - } - switch (letter = str.charAt(i)) { - case '\\': - ++continueCount; - continue; - case end: - stack.pop(); - if (!stack.length) { - return str.slice(0, +i + 1 || 9e9); - } - end = stack[stack.length - 1]; - continue; - } - if (end === '}' && (letter === '"' || letter === "'")) { - stack.push(end = letter); - } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) { - continueCount += match[0].length - 1; - } else if (end === '}' && letter === '{') { - stack.push(end = '}'); - } else if (end === '"' && prev === '#' && letter === '{') { - stack.push(end = '}'); - } - prev = letter; - } - return this.error("missing " + (stack.pop()) + ", starting"); - }; - - Lexer.prototype.interpolateString = function(str, options) { - var column, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; - if (options == null) { - options = {}; - } - heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength; - offsetInChunk = offsetInChunk || 0; - strOffset = strOffset || 0; - lexedLength = lexedLength || str.length; - if (heredoc && str.length > 0 && str[0] === '\n') { - str = str.slice(1); - strOffset++; - } - tokens = []; - pi = 0; - i = -1; - while (letter = str.charAt(i += 1)) { - if (letter === '\\') { - i += 1; - continue; - } - if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) { - continue; - } - if (pi < i) { - tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi)); - } - inner = expr.slice(1, -1); - if (inner.length) { - _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1]; - nested = new Lexer().tokenize(inner, { - line: line, - column: column, - rewrite: false - }); - popped = nested.pop(); - if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') { - popped = nested.shift(); - } - if (len = nested.length) { - if (len > 1) { - nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0)); - nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0)); - } - tokens.push(['TOKENS', nested]); - } - } - i += expr.length; - pi = i + 1; - } - if ((i > pi && pi < str.length)) { - tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi)); - } - if (regex) { - return tokens; - } - if (!tokens.length) { - return this.token('STRING', '""', offsetInChunk, lexedLength); - } - if (tokens[0][0] !== 'NEOSTRING') { - tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk)); - } - if (interpolated = tokens.length > 1) { - this.token('(', '(', offsetInChunk, 0); - } - for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) { - token = tokens[i]; - tag = token[0], value = token[1]; - if (i) { - if (i) { - plusToken = this.token('+', '+'); - } - locationToken = tag === 'TOKENS' ? value[0] : token; - plusToken[2] = { - first_line: locationToken[2].first_line, - first_column: locationToken[2].first_column, - last_line: locationToken[2].first_line, - last_column: locationToken[2].first_column - }; - } - if (tag === 'TOKENS') { - (_ref4 = this.tokens).push.apply(_ref4, value); - } else if (tag === 'NEOSTRING') { - token[0] = 'STRING'; - token[1] = this.makeString(value, '"', heredoc); - this.tokens.push(token); - } else { - this.error("Unexpected " + tag); - } - } - if (interpolated) { - rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0); - rparen.stringEnd = true; - this.tokens.push(rparen); - } - return tokens; - }; - - Lexer.prototype.pair = function(tag) { - var size, wanted; - if (tag !== (wanted = last(this.ends))) { - if ('OUTDENT' !== wanted) { - this.error("unmatched " + tag); - } - this.indent -= size = last(this.indents); - this.outdentToken(size, true); - return this.pair(tag); - } - return this.ends.pop(); - }; - - Lexer.prototype.getLineAndColumnFromChunk = function(offset) { - var column, lineCount, lines, string; - if (offset === 0) { - return [this.chunkLine, this.chunkColumn]; - } - if (offset >= this.chunk.length) { - string = this.chunk; - } else { - string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9); - } - lineCount = count(string, '\n'); - column = this.chunkColumn; - if (lineCount > 0) { - lines = string.split('\n'); - column = last(lines).length; - } else { - column += string.length; - } - return [this.chunkLine + lineCount, column]; - }; - - Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { - var lastCharacter, locationData, token, _ref2, _ref3; - if (offsetInChunk == null) { - offsetInChunk = 0; - } - if (length == null) { - length = value.length; - } - locationData = {}; - _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1]; - lastCharacter = Math.max(0, length - 1); - _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; - token = [tag, value, locationData]; - return token; - }; - - Lexer.prototype.token = function(tag, value, offsetInChunk, length) { - var token; - token = this.makeToken(tag, value, offsetInChunk, length); - this.tokens.push(token); - return token; - }; - - Lexer.prototype.tag = function(index, tag) { - var tok; - return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); - }; - - Lexer.prototype.value = function(index, val) { - var tok; - return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); - }; - - Lexer.prototype.unfinished = function() { - var _ref2; - return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS'); - }; - - Lexer.prototype.escapeLines = function(str, heredoc) { - return str.replace(MULTILINER, heredoc ? '\\n' : ''); - }; - - Lexer.prototype.makeString = function(body, quote, heredoc) { - if (!body) { - return quote + quote; - } - body = body.replace(/\\([\s\S])/g, function(match, contents) { - if (contents === '\n' || contents === quote) { - return contents; - } else { - return match; - } - }); - body = body.replace(RegExp("" + quote, "g"), '\\$&'); - return quote + this.escapeLines(body, heredoc) + quote; - }; - - Lexer.prototype.error = function(message) { - return throwSyntaxError(message, { - first_line: this.chunkLine, - first_column: this.chunkColumn - }); - }; - - return Lexer; - - })(); - - JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; - - COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; - - COFFEE_ALIAS_MAP = { - and: '&&', - or: '||', - is: '==', - isnt: '!=', - not: '!', - yes: 'true', - no: 'false', - on: 'true', - off: 'false' - }; - - COFFEE_ALIASES = (function() { - var _results; - _results = []; - for (key in COFFEE_ALIAS_MAP) { - _results.push(key); - } - return _results; - })(); - - COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); - - RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield']; - - STRICT_PROSCRIBED = ['arguments', 'eval']; - - JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED); - - exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED); - - exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED; - - BOM = 65279; - - IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/; - - NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; - - HEREDOC = /^("""|''')([\s\S]*?)(?:\n[^\n\S]*)?\1/; - - OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?(\.|::)|\.{2,3})/; - - WHITESPACE = /^[^\n\S]+/; - - COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)$)|^(?:\s*#(?!##[^#]).*)+/; - - CODE = /^[-=]>/; - - MULTI_DENT = /^(?:\n[^\n\S]*)+/; - - SIMPLESTR = /^'[^\\']*(?:\\.[^\\']*)*'/; - - JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; - - REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/; - - HEREGEX = /^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/; - - HEREGEX_OMIT = /\s+(?:#.*)?/g; - - MULTILINER = /\n/g; - - HEREDOC_INDENT = /\n+([^\n\S]*)/g; - - HEREDOC_ILLEGAL = /\*\//; - - LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; - - TRAILING_SPACES = /\s+$/; - - COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=']; - - UNARY = ['!', '~', 'NEW', 'TYPEOF', 'DELETE', 'DO']; - - LOGIC = ['&&', '||', '&', '|', '^']; - - SHIFT = ['<<', '>>', '>>>']; - - COMPARE = ['==', '!=', '<', '>', '<=', '>=']; - - MATH = ['*', '/', '%']; - - RELATION = ['IN', 'OF', 'INSTANCEOF']; - - BOOL = ['TRUE', 'FALSE']; - - NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; - - NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); - - CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; - - INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED'); - - LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/nodes.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/nodes.js deleted file mode 100644 index 0edbcf61..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/nodes.js +++ /dev/null @@ -1,3048 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Access, Arr, Assign, Base, Block, Call, Class, Closure, Code, CodeFragment, Comment, Existence, Extends, For, IDENTIFIER, IDENTIFIER_STR, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, last, locationDataToString, merge, multident, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, _ref2, _ref3, - __hasProp = {}.hasOwnProperty, - __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - Error.stackTraceLimit = Infinity; - - Scope = require('./scope').Scope; - - _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED; - - _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; - - exports.extend = extend; - - exports.addLocationDataFn = addLocationDataFn; - - YES = function() { - return true; - }; - - NO = function() { - return false; - }; - - THIS = function() { - return this; - }; - - NEGATE = function() { - this.negated = !this.negated; - return this; - }; - - exports.CodeFragment = CodeFragment = (function() { - function CodeFragment(parent, code) { - var _ref2; - this.code = "" + code; - this.locationData = parent != null ? parent.locationData : void 0; - this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown'; - } - - CodeFragment.prototype.toString = function() { - return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); - }; - - return CodeFragment; - - })(); - - fragmentsToText = function(fragments) { - var fragment; - return ((function() { - var _i, _len, _results; - _results = []; - for (_i = 0, _len = fragments.length; _i < _len; _i++) { - fragment = fragments[_i]; - _results.push(fragment.code); - } - return _results; - })()).join(''); - }; - - exports.Base = Base = (function() { - function Base() {} - - Base.prototype.compile = function(o, lvl) { - return fragmentsToText(this.compileToFragments(o, lvl)); - }; - - Base.prototype.compileToFragments = function(o, lvl) { - var node; - o = extend({}, o); - if (lvl) { - o.level = lvl; - } - node = this.unfoldSoak(o) || this; - node.tab = o.indent; - if (o.level === LEVEL_TOP || !node.isStatement(o)) { - return node.compileNode(o); - } else { - return node.compileClosure(o); - } - }; - - Base.prototype.compileClosure = function(o) { - var jumpNode; - if (jumpNode = this.jumps()) { - jumpNode.error('cannot use a pure statement in an expression'); - } - o.sharedScope = true; - return Closure.wrap(this).compileNode(o); - }; - - Base.prototype.cache = function(o, level, reused) { - var ref, sub; - if (!this.isComplex()) { - ref = level ? this.compileToFragments(o, level) : this; - return [ref, ref]; - } else { - ref = new Literal(reused || o.scope.freeVariable('ref')); - sub = new Assign(ref, this); - if (level) { - return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]]; - } else { - return [sub, ref]; - } - } - }; - - Base.prototype.cacheToCodeFragments = function(cacheValues) { - return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]; - }; - - Base.prototype.makeReturn = function(res) { - var me; - me = this.unwrapAll(); - if (res) { - return new Call(new Literal("" + res + ".push"), [me]); - } else { - return new Return(me); - } - }; - - Base.prototype.contains = function(pred) { - var node; - node = void 0; - this.traverseChildren(false, function(n) { - if (pred(n)) { - node = n; - return false; - } - }); - return node; - }; - - Base.prototype.lastNonComment = function(list) { - var i; - i = list.length; - while (i--) { - if (!(list[i] instanceof Comment)) { - return list[i]; - } - } - return null; - }; - - Base.prototype.toString = function(idt, name) { - var tree; - if (idt == null) { - idt = ''; - } - if (name == null) { - name = this.constructor.name; - } - tree = '\n' + idt + name; - if (this.soak) { - tree += '?'; - } - this.eachChild(function(node) { - return tree += node.toString(idt + TAB); - }); - return tree; - }; - - Base.prototype.eachChild = function(func) { - var attr, child, _i, _j, _len, _len1, _ref2, _ref3; - if (!this.children) { - return this; - } - _ref2 = this.children; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - attr = _ref2[_i]; - if (this[attr]) { - _ref3 = flatten([this[attr]]); - for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { - child = _ref3[_j]; - if (func(child) === false) { - return this; - } - } - } - } - return this; - }; - - Base.prototype.traverseChildren = function(crossScope, func) { - return this.eachChild(function(child) { - var recur; - recur = func(child); - if (recur !== false) { - return child.traverseChildren(crossScope, func); - } - }); - }; - - Base.prototype.invert = function() { - return new Op('!', this); - }; - - Base.prototype.unwrapAll = function() { - var node; - node = this; - while (node !== (node = node.unwrap())) { - continue; - } - return node; - }; - - Base.prototype.children = []; - - Base.prototype.isStatement = NO; - - Base.prototype.jumps = NO; - - Base.prototype.isComplex = YES; - - Base.prototype.isChainable = NO; - - Base.prototype.isAssignable = NO; - - Base.prototype.unwrap = THIS; - - Base.prototype.unfoldSoak = NO; - - Base.prototype.assigns = NO; - - Base.prototype.updateLocationDataIfMissing = function(locationData) { - this.locationData || (this.locationData = locationData); - return this.eachChild(function(child) { - return child.updateLocationDataIfMissing(locationData); - }); - }; - - Base.prototype.error = function(message) { - return throwSyntaxError(message, this.locationData); - }; - - Base.prototype.makeCode = function(code) { - return new CodeFragment(this, code); - }; - - Base.prototype.wrapInBraces = function(fragments) { - return [].concat(this.makeCode('('), fragments, this.makeCode(')')); - }; - - Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { - var answer, fragments, i, _i, _len; - answer = []; - for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) { - fragments = fragmentsList[i]; - if (i) { - answer.push(this.makeCode(joinStr)); - } - answer = answer.concat(fragments); - } - return answer; - }; - - return Base; - - })(); - - exports.Block = Block = (function(_super) { - __extends(Block, _super); - - function Block(nodes) { - this.expressions = compact(flatten(nodes || [])); - } - - Block.prototype.children = ['expressions']; - - Block.prototype.push = function(node) { - this.expressions.push(node); - return this; - }; - - Block.prototype.pop = function() { - return this.expressions.pop(); - }; - - Block.prototype.unshift = function(node) { - this.expressions.unshift(node); - return this; - }; - - Block.prototype.unwrap = function() { - if (this.expressions.length === 1) { - return this.expressions[0]; - } else { - return this; - } - }; - - Block.prototype.isEmpty = function() { - return !this.expressions.length; - }; - - Block.prototype.isStatement = function(o) { - var exp, _i, _len, _ref2; - _ref2 = this.expressions; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - exp = _ref2[_i]; - if (exp.isStatement(o)) { - return true; - } - } - return false; - }; - - Block.prototype.jumps = function(o) { - var exp, _i, _len, _ref2; - _ref2 = this.expressions; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - exp = _ref2[_i]; - if (exp.jumps(o)) { - return exp; - } - } - }; - - Block.prototype.makeReturn = function(res) { - var expr, len; - len = this.expressions.length; - while (len--) { - expr = this.expressions[len]; - if (!(expr instanceof Comment)) { - this.expressions[len] = expr.makeReturn(res); - if (expr instanceof Return && !expr.expression) { - this.expressions.splice(len, 1); - } - break; - } - } - return this; - }; - - Block.prototype.compileToFragments = function(o, level) { - if (o == null) { - o = {}; - } - if (o.scope) { - return Block.__super__.compileToFragments.call(this, o, level); - } else { - return this.compileRoot(o); - } - }; - - Block.prototype.compileNode = function(o) { - var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2; - this.tab = o.indent; - top = o.level === LEVEL_TOP; - compiledNodes = []; - _ref2 = this.expressions; - for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) { - node = _ref2[index]; - node = node.unwrapAll(); - node = node.unfoldSoak(o) || node; - if (node instanceof Block) { - compiledNodes.push(node.compileNode(o)); - } else if (top) { - node.front = true; - fragments = node.compileToFragments(o); - if (!node.isStatement(o)) { - fragments.unshift(this.makeCode("" + this.tab)); - fragments.push(this.makeCode(";")); - } - compiledNodes.push(fragments); - } else { - compiledNodes.push(node.compileToFragments(o, LEVEL_LIST)); - } - } - if (top) { - if (this.spaced) { - return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); - } else { - return this.joinFragmentArrays(compiledNodes, '\n'); - } - } - if (compiledNodes.length) { - answer = this.joinFragmentArrays(compiledNodes, ', '); - } else { - answer = [this.makeCode("void 0")]; - } - if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Block.prototype.compileRoot = function(o) { - var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; - o.indent = o.bare ? '' : TAB; - o.level = LEVEL_TOP; - this.spaced = true; - o.scope = new Scope(null, this, null); - _ref2 = o.locals || []; - for (_i = 0, _len = _ref2.length; _i < _len; _i++) { - name = _ref2[_i]; - o.scope.parameter(name); - } - prelude = []; - if (!o.bare) { - preludeExps = (function() { - var _j, _len1, _ref3, _results; - _ref3 = this.expressions; - _results = []; - for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) { - exp = _ref3[i]; - if (!(exp.unwrap() instanceof Comment)) { - break; - } - _results.push(exp); - } - return _results; - }).call(this); - rest = this.expressions.slice(preludeExps.length); - this.expressions = preludeExps; - if (preludeExps.length) { - prelude = this.compileNode(merge(o, { - indent: '' - })); - prelude.push(this.makeCode("\n")); - } - this.expressions = rest; - } - fragments = this.compileWithDeclarations(o); - if (o.bare) { - return fragments; - } - return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n")); - }; - - Block.prototype.compileWithDeclarations = function(o) { - var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4; - fragments = []; - post = []; - _ref2 = this.expressions; - for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { - exp = _ref2[i]; - exp = exp.unwrap(); - if (!(exp instanceof Comment || exp instanceof Literal)) { - break; - } - } - o = merge(o, { - level: LEVEL_TOP - }); - if (i) { - rest = this.expressions.splice(i, 9e9); - _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1]; - _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1]; - this.expressions = rest; - } - post = this.compileNode(o); - scope = o.scope; - if (scope.expressions === this) { - declars = o.scope.hasDeclarations(); - assigns = scope.hasAssignments; - if (declars || assigns) { - if (i) { - fragments.push(this.makeCode('\n')); - } - fragments.push(this.makeCode("" + this.tab + "var ")); - if (declars) { - fragments.push(this.makeCode(scope.declaredVariables().join(', '))); - } - if (assigns) { - if (declars) { - fragments.push(this.makeCode(",\n" + (this.tab + TAB))); - } - fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); - } - fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); - } else if (fragments.length && post.length) { - fragments.push(this.makeCode("\n")); - } - } - return fragments.concat(post); - }; - - Block.wrap = function(nodes) { - if (nodes.length === 1 && nodes[0] instanceof Block) { - return nodes[0]; - } - return new Block(nodes); - }; - - return Block; - - })(Base); - - exports.Literal = Literal = (function(_super) { - __extends(Literal, _super); - - function Literal(value) { - this.value = value; - } - - Literal.prototype.makeReturn = function() { - if (this.isStatement()) { - return this; - } else { - return Literal.__super__.makeReturn.apply(this, arguments); - } - }; - - Literal.prototype.isAssignable = function() { - return IDENTIFIER.test(this.value); - }; - - Literal.prototype.isStatement = function() { - var _ref2; - return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; - }; - - Literal.prototype.isComplex = NO; - - Literal.prototype.assigns = function(name) { - return name === this.value; - }; - - Literal.prototype.jumps = function(o) { - if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) { - return this; - } - if (this.value === 'continue' && !(o != null ? o.loop : void 0)) { - return this; - } - }; - - Literal.prototype.compileNode = function(o) { - var answer, code, _ref2; - code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value; - answer = this.isStatement() ? "" + this.tab + code + ";" : code; - return [this.makeCode(answer)]; - }; - - Literal.prototype.toString = function() { - return ' "' + this.value + '"'; - }; - - return Literal; - - })(Base); - - exports.Undefined = (function(_super) { - __extends(Undefined, _super); - - function Undefined() { - _ref2 = Undefined.__super__.constructor.apply(this, arguments); - return _ref2; - } - - Undefined.prototype.isAssignable = NO; - - Undefined.prototype.isComplex = NO; - - Undefined.prototype.compileNode = function(o) { - return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')]; - }; - - return Undefined; - - })(Base); - - exports.Null = (function(_super) { - __extends(Null, _super); - - function Null() { - _ref3 = Null.__super__.constructor.apply(this, arguments); - return _ref3; - } - - Null.prototype.isAssignable = NO; - - Null.prototype.isComplex = NO; - - Null.prototype.compileNode = function() { - return [this.makeCode("null")]; - }; - - return Null; - - })(Base); - - exports.Bool = (function(_super) { - __extends(Bool, _super); - - Bool.prototype.isAssignable = NO; - - Bool.prototype.isComplex = NO; - - Bool.prototype.compileNode = function() { - return [this.makeCode(this.val)]; - }; - - function Bool(val) { - this.val = val; - } - - return Bool; - - })(Base); - - exports.Return = Return = (function(_super) { - __extends(Return, _super); - - function Return(expr) { - if (expr && !expr.unwrap().isUndefined) { - this.expression = expr; - } - } - - Return.prototype.children = ['expression']; - - Return.prototype.isStatement = YES; - - Return.prototype.makeReturn = THIS; - - Return.prototype.jumps = THIS; - - Return.prototype.compileToFragments = function(o, level) { - var expr, _ref4; - expr = (_ref4 = this.expression) != null ? _ref4.makeReturn() : void 0; - if (expr && !(expr instanceof Return)) { - return expr.compileToFragments(o, level); - } else { - return Return.__super__.compileToFragments.call(this, o, level); - } - }; - - Return.prototype.compileNode = function(o) { - var answer; - answer = []; - answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); - if (this.expression) { - answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); - } - answer.push(this.makeCode(";")); - return answer; - }; - - return Return; - - })(Base); - - exports.Value = Value = (function(_super) { - __extends(Value, _super); - - function Value(base, props, tag) { - if (!props && base instanceof Value) { - return base; - } - this.base = base; - this.properties = props || []; - if (tag) { - this[tag] = true; - } - return this; - } - - Value.prototype.children = ['base', 'properties']; - - Value.prototype.add = function(props) { - this.properties = this.properties.concat(props); - return this; - }; - - Value.prototype.hasProperties = function() { - return !!this.properties.length; - }; - - Value.prototype.isArray = function() { - return !this.properties.length && this.base instanceof Arr; - }; - - Value.prototype.isComplex = function() { - return this.hasProperties() || this.base.isComplex(); - }; - - Value.prototype.isAssignable = function() { - return this.hasProperties() || this.base.isAssignable(); - }; - - Value.prototype.isSimpleNumber = function() { - return this.base instanceof Literal && SIMPLENUM.test(this.base.value); - }; - - Value.prototype.isString = function() { - return this.base instanceof Literal && IS_STRING.test(this.base.value); - }; - - Value.prototype.isAtomic = function() { - var node, _i, _len, _ref4; - _ref4 = this.properties.concat(this.base); - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - node = _ref4[_i]; - if (node.soak || node instanceof Call) { - return false; - } - } - return true; - }; - - Value.prototype.isStatement = function(o) { - return !this.properties.length && this.base.isStatement(o); - }; - - Value.prototype.assigns = function(name) { - return !this.properties.length && this.base.assigns(name); - }; - - Value.prototype.jumps = function(o) { - return !this.properties.length && this.base.jumps(o); - }; - - Value.prototype.isObject = function(onlyGenerated) { - if (this.properties.length) { - return false; - } - return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); - }; - - Value.prototype.isSplice = function() { - return last(this.properties) instanceof Slice; - }; - - Value.prototype.unwrap = function() { - if (this.properties.length) { - return this; - } else { - return this.base; - } - }; - - Value.prototype.cacheReference = function(o) { - var base, bref, name, nref; - name = last(this.properties); - if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { - return [this, this]; - } - base = new Value(this.base, this.properties.slice(0, -1)); - if (base.isComplex()) { - bref = new Literal(o.scope.freeVariable('base')); - base = new Value(new Parens(new Assign(bref, base))); - } - if (!name) { - return [base, bref]; - } - if (name.isComplex()) { - nref = new Literal(o.scope.freeVariable('name')); - name = new Index(new Assign(nref, name.index)); - nref = new Index(nref); - } - return [base.add(name), new Value(bref || base.base, [nref || name])]; - }; - - Value.prototype.compileNode = function(o) { - var fragments, prop, props, _i, _len; - this.base.front = this.front; - props = this.properties; - fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null)); - if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) { - fragments.push(this.makeCode('.')); - } - for (_i = 0, _len = props.length; _i < _len; _i++) { - prop = props[_i]; - fragments.push.apply(fragments, prop.compileToFragments(o)); - } - return fragments; - }; - - Value.prototype.unfoldSoak = function(o) { - var _this = this; - return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function() { - var fst, i, ifn, prop, ref, snd, _i, _len, _ref4, _ref5; - if (ifn = _this.base.unfoldSoak(o)) { - (_ref4 = ifn.body.properties).push.apply(_ref4, _this.properties); - return ifn; - } - _ref5 = _this.properties; - for (i = _i = 0, _len = _ref5.length; _i < _len; i = ++_i) { - prop = _ref5[i]; - if (!prop.soak) { - continue; - } - prop.soak = false; - fst = new Value(_this.base, _this.properties.slice(0, i)); - snd = new Value(_this.base, _this.properties.slice(i)); - if (fst.isComplex()) { - ref = new Literal(o.scope.freeVariable('ref')); - fst = new Parens(new Assign(ref, fst)); - snd.base = ref; - } - return new If(new Existence(fst), snd, { - soak: true - }); - } - return false; - })(); - }; - - return Value; - - })(Base); - - exports.Comment = Comment = (function(_super) { - __extends(Comment, _super); - - function Comment(comment) { - this.comment = comment; - } - - Comment.prototype.isStatement = YES; - - Comment.prototype.makeReturn = THIS; - - Comment.prototype.compileNode = function(o, level) { - var code; - code = "/*" + (multident(this.comment, this.tab)) + (__indexOf.call(this.comment, '\n') >= 0 ? "\n" + this.tab : '') + "*/\n"; - if ((level || o.level) === LEVEL_TOP) { - code = o.indent + code; - } - return [this.makeCode(code)]; - }; - - return Comment; - - })(Base); - - exports.Call = Call = (function(_super) { - __extends(Call, _super); - - function Call(variable, args, soak) { - this.args = args != null ? args : []; - this.soak = soak; - this.isNew = false; - this.isSuper = variable === 'super'; - this.variable = this.isSuper ? null : variable; - } - - Call.prototype.children = ['variable', 'args']; - - Call.prototype.newInstance = function() { - var base, _ref4; - base = ((_ref4 = this.variable) != null ? _ref4.base : void 0) || this.variable; - if (base instanceof Call && !base.isNew) { - base.newInstance(); - } else { - this.isNew = true; - } - return this; - }; - - Call.prototype.superReference = function(o) { - var accesses, method; - method = o.scope.namedMethod(); - if (method != null ? method.klass : void 0) { - accesses = [new Access(new Literal('__super__'))]; - if (method["static"]) { - accesses.push(new Access(new Literal('constructor'))); - } - accesses.push(new Access(new Literal(method.name))); - return (new Value(new Literal(method.klass), accesses)).compile(o); - } else if (method != null ? method.ctor : void 0) { - return "" + method.name + ".__super__.constructor"; - } else { - return this.error('cannot call super outside of an instance method.'); - } - }; - - Call.prototype.superThis = function(o) { - var method; - method = o.scope.method; - return (method && !method.klass && method.context) || "this"; - }; - - Call.prototype.unfoldSoak = function(o) { - var call, ifn, left, list, rite, _i, _len, _ref4, _ref5; - if (this.soak) { - if (this.variable) { - if (ifn = unfoldSoak(o, this, 'variable')) { - return ifn; - } - _ref4 = new Value(this.variable).cacheReference(o), left = _ref4[0], rite = _ref4[1]; - } else { - left = new Literal(this.superReference(o)); - rite = new Value(left); - } - rite = new Call(rite, this.args); - rite.isNew = this.isNew; - left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); - return new If(left, new Value(rite), { - soak: true - }); - } - call = this; - list = []; - while (true) { - if (call.variable instanceof Call) { - list.push(call); - call = call.variable; - continue; - } - if (!(call.variable instanceof Value)) { - break; - } - list.push(call); - if (!((call = call.variable.base) instanceof Call)) { - break; - } - } - _ref5 = list.reverse(); - for (_i = 0, _len = _ref5.length; _i < _len; _i++) { - call = _ref5[_i]; - if (ifn) { - if (call.variable instanceof Call) { - call.variable = ifn; - } else { - call.variable.base = ifn; - } - } - ifn = unfoldSoak(o, call, 'variable'); - } - return ifn; - }; - - Call.prototype.compileNode = function(o) { - var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref4, _ref5; - if ((_ref4 = this.variable) != null) { - _ref4.front = this.front; - } - compiledArray = Splat.compileSplattedArray(o, this.args, true); - if (compiledArray.length) { - return this.compileSplat(o, compiledArray); - } - compiledArgs = []; - _ref5 = this.args; - for (argIndex = _i = 0, _len = _ref5.length; _i < _len; argIndex = ++_i) { - arg = _ref5[argIndex]; - if (argIndex) { - compiledArgs.push(this.makeCode(", ")); - } - compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST)); - } - fragments = []; - if (this.isSuper) { - preface = this.superReference(o) + (".call(" + (this.superThis(o))); - if (compiledArgs.length) { - preface += ", "; - } - fragments.push(this.makeCode(preface)); - } else { - if (this.isNew) { - fragments.push(this.makeCode('new ')); - } - fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS)); - fragments.push(this.makeCode("(")); - } - fragments.push.apply(fragments, compiledArgs); - fragments.push(this.makeCode(")")); - return fragments; - }; - - Call.prototype.compileSplat = function(o, splatArgs) { - var answer, base, fun, idt, name, ref; - if (this.isSuper) { - return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); - } - if (this.isNew) { - idt = this.tab + TAB; - return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})")); - } - answer = []; - base = new Value(this.variable); - if ((name = base.properties.pop()) && base.isComplex()) { - ref = o.scope.freeVariable('ref'); - answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o)); - } else { - fun = base.compileToFragments(o, LEVEL_ACCESS); - if (SIMPLENUM.test(fragmentsToText(fun))) { - fun = this.wrapInBraces(fun); - } - if (name) { - ref = fragmentsToText(fun); - fun.push.apply(fun, name.compileToFragments(o)); - } else { - ref = 'null'; - } - answer = answer.concat(fun); - } - return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")")); - }; - - return Call; - - })(Base); - - exports.Extends = Extends = (function(_super) { - __extends(Extends, _super); - - function Extends(child, parent) { - this.child = child; - this.parent = parent; - } - - Extends.prototype.children = ['child', 'parent']; - - Extends.prototype.compileToFragments = function(o) { - return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o); - }; - - return Extends; - - })(Base); - - exports.Access = Access = (function(_super) { - __extends(Access, _super); - - function Access(name, tag) { - this.name = name; - this.name.asKey = true; - this.soak = tag === 'soak'; - } - - Access.prototype.children = ['name']; - - Access.prototype.compileToFragments = function(o) { - var name; - name = this.name.compileToFragments(o); - if (IDENTIFIER.test(fragmentsToText(name))) { - name.unshift(this.makeCode(".")); - } else { - name.unshift(this.makeCode("[")); - name.push(this.makeCode("]")); - } - return name; - }; - - Access.prototype.isComplex = NO; - - return Access; - - })(Base); - - exports.Index = Index = (function(_super) { - __extends(Index, _super); - - function Index(index) { - this.index = index; - } - - Index.prototype.children = ['index']; - - Index.prototype.compileToFragments = function(o) { - return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]")); - }; - - Index.prototype.isComplex = function() { - return this.index.isComplex(); - }; - - return Index; - - })(Base); - - exports.Range = Range = (function(_super) { - __extends(Range, _super); - - Range.prototype.children = ['from', 'to']; - - function Range(from, to, tag) { - this.from = from; - this.to = to; - this.exclusive = tag === 'exclusive'; - this.equals = this.exclusive ? '' : '='; - } - - Range.prototype.compileVariables = function(o) { - var step, _ref4, _ref5, _ref6, _ref7; - o = merge(o, { - top: true - }); - _ref4 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref4[0], this.fromVar = _ref4[1]; - _ref5 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref5[0], this.toVar = _ref5[1]; - if (step = del(o, 'step')) { - _ref6 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref6[0], this.stepVar = _ref6[1]; - } - _ref7 = [this.fromVar.match(SIMPLENUM), this.toVar.match(SIMPLENUM)], this.fromNum = _ref7[0], this.toNum = _ref7[1]; - if (this.stepVar) { - return this.stepNum = this.stepVar.match(SIMPLENUM); - } - }; - - Range.prototype.compileNode = function(o) { - var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref4, _ref5; - if (!this.fromVar) { - this.compileVariables(o); - } - if (!o.index) { - return this.compileArray(o); - } - known = this.fromNum && this.toNum; - idx = del(o, 'index'); - idxName = del(o, 'name'); - namedIndex = idxName && idxName !== idx; - varPart = "" + idx + " = " + this.fromC; - if (this.toC !== this.toVar) { - varPart += ", " + this.toC; - } - if (this.step !== this.stepVar) { - varPart += ", " + this.step; - } - _ref4 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref4[0], gt = _ref4[1]; - condPart = this.stepNum ? +this.stepNum > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref5 = [+this.fromNum, +this.toNum], from = _ref5[0], to = _ref5[1], _ref5), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); - stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--"; - if (namedIndex) { - varPart = "" + idxName + " = " + varPart; - } - if (namedIndex) { - stepPart = "" + idxName + " = " + stepPart; - } - return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)]; - }; - - Range.prototype.compileArray = function(o) { - var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref4, _ref5, _results; - if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { - range = (function() { - _results = []; - for (var _i = _ref4 = +this.fromNum, _ref5 = +this.toNum; _ref4 <= _ref5 ? _i <= _ref5 : _i >= _ref5; _ref4 <= _ref5 ? _i++ : _i--){ _results.push(_i); } - return _results; - }).apply(this); - if (this.exclusive) { - range.pop(); - } - return [this.makeCode("[" + (range.join(', ')) + "]")]; - } - idt = this.tab + TAB; - i = o.scope.freeVariable('i'); - result = o.scope.freeVariable('results'); - pre = "\n" + idt + result + " = [];"; - if (this.fromNum && this.toNum) { - o.index = i; - body = fragmentsToText(this.compileNode(o)); - } else { - vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); - cond = "" + this.fromVar + " <= " + this.toVar; - body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; - } - post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; - hasArgs = function(node) { - return node != null ? node.contains(function(n) { - return n instanceof Literal && n.value === 'arguments' && !n.asKey; - }) : void 0; - }; - if (hasArgs(this.from) || hasArgs(this.to)) { - args = ', arguments'; - } - return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")]; - }; - - return Range; - - })(Base); - - exports.Slice = Slice = (function(_super) { - __extends(Slice, _super); - - Slice.prototype.children = ['range']; - - function Slice(range) { - this.range = range; - Slice.__super__.constructor.call(this); - } - - Slice.prototype.compileNode = function(o) { - var compiled, compiledText, from, fromCompiled, to, toStr, _ref4; - _ref4 = this.range, to = _ref4.to, from = _ref4.from; - fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; - if (to) { - compiled = to.compileToFragments(o, LEVEL_PAREN); - compiledText = fragmentsToText(compiled); - if (!(!this.range.exclusive && +compiledText === -1)) { - toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9")); - } - } - return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")]; - }; - - return Slice; - - })(Base); - - exports.Obj = Obj = (function(_super) { - __extends(Obj, _super); - - function Obj(props, generated) { - this.generated = generated != null ? generated : false; - this.objects = this.properties = props || []; - } - - Obj.prototype.children = ['properties']; - - Obj.prototype.compileNode = function(o) { - var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1; - props = this.properties; - if (!props.length) { - return [this.makeCode(this.front ? '({})' : '{}')]; - } - if (this.generated) { - for (_i = 0, _len = props.length; _i < _len; _i++) { - node = props[_i]; - if (node instanceof Value) { - node.error('cannot have an implicit value in an implicit object'); - } - } - } - idt = o.indent += TAB; - lastNoncom = this.lastNonComment(this.properties); - answer = []; - for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) { - prop = props[i]; - join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; - indent = prop instanceof Comment ? '' : idt; - if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { - prop.variable.error('Invalid object key'); - } - if (prop instanceof Value && prop["this"]) { - prop = new Assign(prop.properties[0].name, prop, 'object'); - } - if (!(prop instanceof Comment)) { - if (!(prop instanceof Assign)) { - prop = new Assign(prop, prop, 'object'); - } - (prop.variable.base || prop.variable).asKey = true; - } - if (indent) { - answer.push(this.makeCode(indent)); - } - answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP)); - if (join) { - answer.push(this.makeCode(join)); - } - } - answer.unshift(this.makeCode("{" + (props.length && '\n'))); - answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}")); - if (this.front) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Obj.prototype.assigns = function(name) { - var prop, _i, _len, _ref4; - _ref4 = this.properties; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - prop = _ref4[_i]; - if (prop.assigns(name)) { - return true; - } - } - return false; - }; - - return Obj; - - })(Base); - - exports.Arr = Arr = (function(_super) { - __extends(Arr, _super); - - function Arr(objs) { - this.objects = objs || []; - } - - Arr.prototype.children = ['objects']; - - Arr.prototype.compileNode = function(o) { - var answer, compiledObjs, fragments, index, obj, _i, _len; - if (!this.objects.length) { - return [this.makeCode('[]')]; - } - o.indent += TAB; - answer = Splat.compileSplattedArray(o, this.objects); - if (answer.length) { - return answer; - } - answer = []; - compiledObjs = (function() { - var _i, _len, _ref4, _results; - _ref4 = this.objects; - _results = []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - _results.push(obj.compileToFragments(o, LEVEL_LIST)); - } - return _results; - }).call(this); - for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) { - fragments = compiledObjs[index]; - if (index) { - answer.push(this.makeCode(", ")); - } - answer.push.apply(answer, fragments); - } - if (fragmentsToText(answer).indexOf('\n') >= 0) { - answer.unshift(this.makeCode("[\n" + o.indent)); - answer.push(this.makeCode("\n" + this.tab + "]")); - } else { - answer.unshift(this.makeCode("[")); - answer.push(this.makeCode("]")); - } - return answer; - }; - - Arr.prototype.assigns = function(name) { - var obj, _i, _len, _ref4; - _ref4 = this.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (obj.assigns(name)) { - return true; - } - } - return false; - }; - - return Arr; - - })(Base); - - exports.Class = Class = (function(_super) { - __extends(Class, _super); - - function Class(variable, parent, body) { - this.variable = variable; - this.parent = parent; - this.body = body != null ? body : new Block; - this.boundFuncs = []; - this.body.classBody = true; - } - - Class.prototype.children = ['variable', 'parent', 'body']; - - Class.prototype.determineName = function() { - var decl, tail; - if (!this.variable) { - return null; - } - decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; - if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) { - this.variable.error("class variable name may not be " + decl); - } - return decl && (decl = IDENTIFIER.test(decl) && decl); - }; - - Class.prototype.setContext = function(name) { - return this.body.traverseChildren(false, function(node) { - if (node.classBody) { - return false; - } - if (node instanceof Literal && node.value === 'this') { - return node.value = name; - } else if (node instanceof Code) { - node.klass = name; - if (node.bound) { - return node.context = name; - } - } - }); - }; - - Class.prototype.addBoundFunctions = function(o) { - var bvar, lhs, _i, _len, _ref4; - _ref4 = this.boundFuncs; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - bvar = _ref4[_i]; - lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); - this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")); - } - }; - - Class.prototype.addProperties = function(node, name, o) { - var assign, base, exprs, func, props; - props = node.base.properties.slice(0); - exprs = (function() { - var _results; - _results = []; - while (assign = props.shift()) { - if (assign instanceof Assign) { - base = assign.variable.base; - delete assign.context; - func = assign.value; - if (base.value === 'constructor') { - if (this.ctor) { - assign.error('cannot define more than one constructor in a class'); - } - if (func.bound) { - assign.error('cannot define a constructor as a bound function'); - } - if (func instanceof Code) { - assign = this.ctor = func; - } else { - this.externalCtor = o.scope.freeVariable('class'); - assign = new Assign(new Literal(this.externalCtor), func); - } - } else { - if (assign.variable["this"]) { - func["static"] = true; - if (func.bound) { - func.context = name; - } - } else { - assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]); - if (func instanceof Code && func.bound) { - this.boundFuncs.push(base); - func.bound = false; - } - } - } - } - _results.push(assign); - } - return _results; - }).call(this); - return compact(exprs); - }; - - Class.prototype.walkBody = function(name, o) { - var _this = this; - return this.traverseChildren(false, function(child) { - var cont, exps, i, node, _i, _len, _ref4; - cont = true; - if (child instanceof Class) { - return false; - } - if (child instanceof Block) { - _ref4 = exps = child.expressions; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - node = _ref4[i]; - if (node instanceof Value && node.isObject(true)) { - cont = false; - exps[i] = _this.addProperties(node, name, o); - } - } - child.expressions = exps = flatten(exps); - } - return cont && !(child instanceof Class); - }); - }; - - Class.prototype.hoistDirectivePrologue = function() { - var expressions, index, node; - index = 0; - expressions = this.body.expressions; - while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) { - ++index; - } - return this.directives = expressions.splice(0, index); - }; - - Class.prototype.ensureConstructor = function(name, o) { - var missing, ref, superCall; - missing = !this.ctor; - this.ctor || (this.ctor = new Code); - this.ctor.ctor = this.ctor.name = name; - this.ctor.klass = null; - this.ctor.noReturn = true; - if (missing) { - if (this.parent) { - superCall = new Literal("" + name + ".__super__.constructor.apply(this, arguments)"); - } - if (this.externalCtor) { - superCall = new Literal("" + this.externalCtor + ".apply(this, arguments)"); - } - if (superCall) { - ref = new Literal(o.scope.freeVariable('ref')); - this.ctor.body.unshift(new Assign(ref, superCall)); - } - this.addBoundFunctions(o); - if (superCall) { - this.ctor.body.push(ref); - this.ctor.body.makeReturn(); - } - return this.body.expressions.unshift(this.ctor); - } else { - return this.addBoundFunctions(o); - } - }; - - Class.prototype.compileNode = function(o) { - var call, decl, klass, lname, name, params, _ref4; - decl = this.determineName(); - name = decl || '_Class'; - if (name.reserved) { - name = "_" + name; - } - lname = new Literal(name); - this.hoistDirectivePrologue(); - this.setContext(name); - this.walkBody(name, o); - this.ensureConstructor(name, o); - this.body.spaced = true; - if (!(this.ctor instanceof Code)) { - this.body.expressions.unshift(this.ctor); - } - this.body.expressions.push(lname); - (_ref4 = this.body.expressions).unshift.apply(_ref4, this.directives); - call = Closure.wrap(this.body); - if (this.parent) { - this.superClass = new Literal(o.scope.freeVariable('super', false)); - this.body.expressions.unshift(new Extends(lname, this.superClass)); - call.args.push(this.parent); - params = call.variable.params || call.variable.base.params; - params.push(new Param(this.superClass)); - } - klass = new Parens(call, true); - if (this.variable) { - klass = new Assign(this.variable, klass); - } - return klass.compileToFragments(o); - }; - - return Class; - - })(Base); - - exports.Assign = Assign = (function(_super) { - __extends(Assign, _super); - - function Assign(variable, value, context, options) { - var forbidden, name, _ref4; - this.variable = variable; - this.value = value; - this.context = context; - this.param = options && options.param; - this.subpattern = options && options.subpattern; - forbidden = (_ref4 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0); - if (forbidden && this.context !== 'object') { - this.variable.error("variable name may not be \"" + name + "\""); - } - } - - Assign.prototype.children = ['variable', 'value']; - - Assign.prototype.isStatement = function(o) { - return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0; - }; - - Assign.prototype.assigns = function(name) { - return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); - }; - - Assign.prototype.unfoldSoak = function(o) { - return unfoldSoak(o, this, 'variable'); - }; - - Assign.prototype.compileNode = function(o) { - var answer, compiledName, isValue, match, name, val, varBase, _ref4, _ref5, _ref6, _ref7; - if (isValue = this.variable instanceof Value) { - if (this.variable.isArray() || this.variable.isObject()) { - return this.compilePatternMatch(o); - } - if (this.variable.isSplice()) { - return this.compileSplice(o); - } - if ((_ref4 = this.context) === '||=' || _ref4 === '&&=' || _ref4 === '?=') { - return this.compileConditional(o); - } - } - compiledName = this.variable.compileToFragments(o, LEVEL_LIST); - name = fragmentsToText(compiledName); - if (!this.context) { - varBase = this.variable.unwrapAll(); - if (!varBase.isAssignable()) { - this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned"); - } - if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { - if (this.param) { - o.scope.add(name, 'var'); - } else { - o.scope.find(name); - } - } - } - if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) { - if (match[1]) { - this.value.klass = match[1]; - } - this.value.name = (_ref5 = (_ref6 = (_ref7 = match[2]) != null ? _ref7 : match[3]) != null ? _ref6 : match[4]) != null ? _ref5 : match[5]; - } - val = this.value.compileToFragments(o, LEVEL_LIST); - if (this.context === 'object') { - return compiledName.concat(this.makeCode(": "), val); - } - answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val); - if (o.level <= LEVEL_LIST) { - return answer; - } else { - return this.wrapInBraces(answer); - } - }; - - Assign.prototype.compilePatternMatch = function(o) { - var acc, assigns, code, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, splat, top, val, value, vvar, vvarText, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; - top = o.level === LEVEL_TOP; - value = this.value; - objects = this.variable.base.objects; - if (!(olen = objects.length)) { - code = value.compileToFragments(o); - if (o.level >= LEVEL_OP) { - return this.wrapInBraces(code); - } else { - return code; - } - } - isObject = this.variable.isObject(); - if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { - if (obj instanceof Assign) { - _ref4 = obj, (_ref5 = _ref4.variable, idx = _ref5.base), obj = _ref4.value; - } else { - idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); - } - acc = IDENTIFIER.test(idx.unwrap().value || 0); - value = new Value(value); - value.properties.push(new (acc ? Access : Index)(idx)); - if (_ref6 = obj.unwrap().value, __indexOf.call(RESERVED, _ref6) >= 0) { - obj.error("assignment to a reserved word: " + (obj.compile(o))); - } - return new Assign(obj, value, null, { - param: this.param - }).compileToFragments(o, LEVEL_TOP); - } - vvar = value.compileToFragments(o, LEVEL_LIST); - vvarText = fragmentsToText(vvar); - assigns = []; - splat = false; - if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) { - assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar))); - vvar = [this.makeCode(ref)]; - vvarText = ref; - } - for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) { - obj = objects[i]; - idx = i; - if (isObject) { - if (obj instanceof Assign) { - _ref7 = obj, (_ref8 = _ref7.variable, idx = _ref8.base), obj = _ref7.value; - } else { - if (obj.base instanceof Parens) { - _ref9 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref9[0], idx = _ref9[1]; - } else { - idx = obj["this"] ? obj.properties[0].name : obj; - } - } - } - if (!splat && obj instanceof Splat) { - name = obj.name.unwrap().value; - obj = obj.unwrap(); - val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i; - if (rest = olen - i - 1) { - ivar = o.scope.freeVariable('i'); - val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; - } else { - val += ") : []"; - } - val = new Literal(val); - splat = "" + ivar + "++"; - } else { - name = obj.unwrap().value; - if (obj instanceof Splat) { - obj.error("multiple splats are disallowed in an assignment"); - } - if (typeof idx === 'number') { - idx = new Literal(splat || idx); - acc = false; - } else { - acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0); - } - val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); - } - if ((name != null) && __indexOf.call(RESERVED, name) >= 0) { - obj.error("assignment to a reserved word: " + (obj.compile(o))); - } - assigns.push(new Assign(obj, val, null, { - param: this.param, - subpattern: true - }).compileToFragments(o, LEVEL_LIST)); - } - if (!(top || this.subpattern)) { - assigns.push(vvar); - } - fragments = this.joinFragmentArrays(assigns, ', '); - if (o.level < LEVEL_LIST) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - Assign.prototype.compileConditional = function(o) { - var left, right, _ref4; - _ref4 = this.variable.cacheReference(o), left = _ref4[0], right = _ref4[1]; - if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { - this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); - } - if (__indexOf.call(this.context, "?") >= 0) { - o.isExistentialEquals = true; - } - return new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o); - }; - - Assign.prototype.compileSplice = function(o) { - var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref4, _ref5, _ref6; - _ref4 = this.variable.properties.pop().range, from = _ref4.from, to = _ref4.to, exclusive = _ref4.exclusive; - name = this.variable.compile(o); - if (from) { - _ref5 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref5[0], fromRef = _ref5[1]; - } else { - fromDecl = fromRef = '0'; - } - if (to) { - if ((from != null ? from.isSimpleNumber() : void 0) && to.isSimpleNumber()) { - to = +to.compile(o) - +fromRef; - if (!exclusive) { - to += 1; - } - } else { - to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef; - if (!exclusive) { - to += ' + 1'; - } - } - } else { - to = "9e9"; - } - _ref6 = this.value.cache(o, LEVEL_LIST), valDef = _ref6[0], valRef = _ref6[1]; - answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); - if (o.level > LEVEL_TOP) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - return Assign; - - })(Base); - - exports.Code = Code = (function(_super) { - __extends(Code, _super); - - function Code(params, body, tag) { - this.params = params || []; - this.body = body || new Block; - this.bound = tag === 'boundfunc'; - if (this.bound) { - this.context = '_this'; - } - } - - Code.prototype.children = ['params', 'body']; - - Code.prototype.isStatement = function() { - return !!this.ctor; - }; - - Code.prototype.jumps = NO; - - Code.prototype.compileNode = function(o) { - var answer, code, exprs, i, idt, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _m, _ref4, _ref5, _ref6, _ref7, _ref8; - o.scope = new Scope(o.scope, this.body, this); - o.scope.shared = del(o, 'sharedScope'); - o.indent += TAB; - delete o.bare; - delete o.isExistentialEquals; - params = []; - exprs = []; - this.eachParamName(function(name) { - if (!o.scope.check(name)) { - return o.scope.parameter(name); - } - }); - _ref4 = this.params; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - if (!param.splat) { - continue; - } - _ref5 = this.params; - for (_j = 0, _len1 = _ref5.length; _j < _len1; _j++) { - p = _ref5[_j].name; - if (p["this"]) { - p = p.properties[0].name; - } - if (p.value) { - o.scope.add(p.value, 'var', true); - } - } - splats = new Assign(new Value(new Arr((function() { - var _k, _len2, _ref6, _results; - _ref6 = this.params; - _results = []; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - p = _ref6[_k]; - _results.push(p.asReference(o)); - } - return _results; - }).call(this))), new Value(new Literal('arguments'))); - break; - } - _ref6 = this.params; - for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) { - param = _ref6[_k]; - if (param.isComplex()) { - val = ref = param.asReference(o); - if (param.value) { - val = new Op('?', ref, param.value); - } - exprs.push(new Assign(new Value(param.name), val, '=', { - param: true - })); - } else { - ref = param; - if (param.value) { - lit = new Literal(ref.name.value + ' == null'); - val = new Assign(new Value(param.name), param.value, '='); - exprs.push(new If(lit, val)); - } - } - if (!splats) { - params.push(ref); - } - } - wasEmpty = this.body.isEmpty(); - if (splats) { - exprs.unshift(splats); - } - if (exprs.length) { - (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs); - } - for (i = _l = 0, _len3 = params.length; _l < _len3; i = ++_l) { - p = params[i]; - params[i] = p.compileToFragments(o); - o.scope.parameter(fragmentsToText(params[i])); - } - uniqs = []; - this.eachParamName(function(name, node) { - if (__indexOf.call(uniqs, name) >= 0) { - node.error("multiple parameters named '" + name + "'"); - } - return uniqs.push(name); - }); - if (!(wasEmpty || this.noReturn)) { - this.body.makeReturn(); - } - if (this.bound) { - if ((_ref8 = o.scope.parent.method) != null ? _ref8.bound : void 0) { - this.bound = this.context = o.scope.parent.method.context; - } else if (!this["static"]) { - o.scope.parent.assign('_this', 'this'); - } - } - idt = o.indent; - code = 'function'; - if (this.ctor) { - code += ' ' + this.name; - } - code += '('; - answer = [this.makeCode(code)]; - for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { - p = params[i]; - if (i) { - answer.push(this.makeCode(", ")); - } - answer.push.apply(answer, p); - } - answer.push(this.makeCode(') {')); - if (!this.body.isEmpty()) { - answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab)); - } - answer.push(this.makeCode('}')); - if (this.ctor) { - return [this.makeCode(this.tab)].concat(__slice.call(answer)); - } - if (this.front || (o.level >= LEVEL_ACCESS)) { - return this.wrapInBraces(answer); - } else { - return answer; - } - }; - - Code.prototype.eachParamName = function(iterator) { - var param, _i, _len, _ref4, _results; - _ref4 = this.params; - _results = []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - _results.push(param.eachName(iterator)); - } - return _results; - }; - - Code.prototype.traverseChildren = function(crossScope, func) { - if (crossScope) { - return Code.__super__.traverseChildren.call(this, crossScope, func); - } - }; - - return Code; - - })(Base); - - exports.Param = Param = (function(_super) { - __extends(Param, _super); - - function Param(name, value, splat) { - var _ref4; - this.name = name; - this.value = value; - this.splat = splat; - if (_ref4 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref4) >= 0) { - this.name.error("parameter name \"" + name + "\" is not allowed"); - } - } - - Param.prototype.children = ['name', 'value']; - - Param.prototype.compileToFragments = function(o) { - return this.name.compileToFragments(o, LEVEL_LIST); - }; - - Param.prototype.asReference = function(o) { - var node; - if (this.reference) { - return this.reference; - } - node = this.name; - if (node["this"]) { - node = node.properties[0].name; - if (node.value.reserved) { - node = new Literal(o.scope.freeVariable(node.value)); - } - } else if (node.isComplex()) { - node = new Literal(o.scope.freeVariable('arg')); - } - node = new Value(node); - if (this.splat) { - node = new Splat(node); - } - return this.reference = node; - }; - - Param.prototype.isComplex = function() { - return this.name.isComplex(); - }; - - Param.prototype.eachName = function(iterator, name) { - var atParam, node, obj, _i, _len, _ref4; - if (name == null) { - name = this.name; - } - atParam = function(obj) { - var node; - node = obj.properties[0].name; - if (!node.value.reserved) { - return iterator(node.value, node); - } - }; - if (name instanceof Literal) { - return iterator(name.value, name); - } - if (name instanceof Value) { - return atParam(name); - } - _ref4 = name.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (obj instanceof Assign) { - this.eachName(iterator, obj.value.unwrap()); - } else if (obj instanceof Splat) { - node = obj.name.unwrap(); - iterator(node.value, node); - } else if (obj instanceof Value) { - if (obj.isArray() || obj.isObject()) { - this.eachName(iterator, obj.base); - } else if (obj["this"]) { - atParam(obj); - } else { - iterator(obj.base.value, obj.base); - } - } else { - obj.error("illegal parameter " + (obj.compile())); - } - } - }; - - return Param; - - })(Base); - - exports.Splat = Splat = (function(_super) { - __extends(Splat, _super); - - Splat.prototype.children = ['name']; - - Splat.prototype.isAssignable = YES; - - function Splat(name) { - this.name = name.compile ? name : new Literal(name); - } - - Splat.prototype.assigns = function(name) { - return this.name.assigns(name); - }; - - Splat.prototype.compileToFragments = function(o) { - return this.name.compileToFragments(o); - }; - - Splat.prototype.unwrap = function() { - return this.name; - }; - - Splat.compileSplattedArray = function(o, list, apply) { - var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len; - index = -1; - while ((node = list[++index]) && !(node instanceof Splat)) { - continue; - } - if (index >= list.length) { - return []; - } - if (list.length === 1) { - node = list[0]; - fragments = node.compileToFragments(o, LEVEL_LIST); - if (apply) { - return fragments; - } - return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")")); - } - args = list.slice(index); - for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { - node = args[i]; - compiledNode = node.compileToFragments(o, LEVEL_LIST); - args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]")); - } - if (index === 0) { - node = list[0]; - concatPart = node.joinFragmentArrays(args.slice(1), ', '); - return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); - } - base = (function() { - var _j, _len1, _ref4, _results; - _ref4 = list.slice(0, index); - _results = []; - for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { - node = _ref4[_j]; - _results.push(node.compileToFragments(o, LEVEL_LIST)); - } - return _results; - })(); - base = list[0].joinFragmentArrays(base, ', '); - concatPart = list[index].joinFragmentArrays(args, ', '); - return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")")); - }; - - return Splat; - - })(Base); - - exports.While = While = (function(_super) { - __extends(While, _super); - - function While(condition, options) { - this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; - this.guard = options != null ? options.guard : void 0; - } - - While.prototype.children = ['condition', 'guard', 'body']; - - While.prototype.isStatement = YES; - - While.prototype.makeReturn = function(res) { - if (res) { - return While.__super__.makeReturn.apply(this, arguments); - } else { - this.returns = !this.jumps({ - loop: true - }); - return this; - } - }; - - While.prototype.addBody = function(body) { - this.body = body; - return this; - }; - - While.prototype.jumps = function() { - var expressions, node, _i, _len; - expressions = this.body.expressions; - if (!expressions.length) { - return false; - } - for (_i = 0, _len = expressions.length; _i < _len; _i++) { - node = expressions[_i]; - if (node.jumps({ - loop: true - })) { - return node; - } - } - return false; - }; - - While.prototype.compileNode = function(o) { - var answer, body, rvar, set; - o.indent += TAB; - set = ''; - body = this.body; - if (body.isEmpty()) { - body = this.makeCode(''); - } else { - if (this.returns) { - body.makeReturn(rvar = o.scope.freeVariable('results')); - set = "" + this.tab + rvar + " = [];\n"; - } - if (this.guard) { - if (body.expressions.length > 1) { - body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); - } else { - if (this.guard) { - body = Block.wrap([new If(this.guard, body)]); - } - } - } - body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab)); - } - answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}")); - if (this.returns) { - answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";")); - } - return answer; - }; - - return While; - - })(Base); - - exports.Op = Op = (function(_super) { - var CONVERSIONS, INVERSIONS; - - __extends(Op, _super); - - function Op(op, first, second, flip) { - if (op === 'in') { - return new In(first, second); - } - if (op === 'do') { - return this.generateDo(first); - } - if (op === 'new') { - if (first instanceof Call && !first["do"] && !first.isNew) { - return first.newInstance(); - } - if (first instanceof Code && first.bound || first["do"]) { - first = new Parens(first); - } - } - this.operator = CONVERSIONS[op] || op; - this.first = first; - this.second = second; - this.flip = !!flip; - return this; - } - - CONVERSIONS = { - '==': '===', - '!=': '!==', - 'of': 'in' - }; - - INVERSIONS = { - '!==': '===', - '===': '!==' - }; - - Op.prototype.children = ['first', 'second']; - - Op.prototype.isSimpleNumber = NO; - - Op.prototype.isUnary = function() { - return !this.second; - }; - - Op.prototype.isComplex = function() { - var _ref4; - return !(this.isUnary() && ((_ref4 = this.operator) === '+' || _ref4 === '-')) || this.first.isComplex(); - }; - - Op.prototype.isChainable = function() { - var _ref4; - return (_ref4 = this.operator) === '<' || _ref4 === '>' || _ref4 === '>=' || _ref4 === '<=' || _ref4 === '===' || _ref4 === '!=='; - }; - - Op.prototype.invert = function() { - var allInvertable, curr, fst, op, _ref4; - if (this.isChainable() && this.first.isChainable()) { - allInvertable = true; - curr = this; - while (curr && curr.operator) { - allInvertable && (allInvertable = curr.operator in INVERSIONS); - curr = curr.first; - } - if (!allInvertable) { - return new Parens(this).invert(); - } - curr = this; - while (curr && curr.operator) { - curr.invert = !curr.invert; - curr.operator = INVERSIONS[curr.operator]; - curr = curr.first; - } - return this; - } else if (op = INVERSIONS[this.operator]) { - this.operator = op; - if (this.first.unwrap() instanceof Op) { - this.first.invert(); - } - return this; - } else if (this.second) { - return new Parens(this).invert(); - } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref4 = fst.operator) === '!' || _ref4 === 'in' || _ref4 === 'instanceof')) { - return fst; - } else { - return new Op('!', this); - } - }; - - Op.prototype.unfoldSoak = function(o) { - var _ref4; - return ((_ref4 = this.operator) === '++' || _ref4 === '--' || _ref4 === 'delete') && unfoldSoak(o, this, 'first'); - }; - - Op.prototype.generateDo = function(exp) { - var call, func, param, passedParams, ref, _i, _len, _ref4; - passedParams = []; - func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; - _ref4 = func.params || []; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - param = _ref4[_i]; - if (param.value) { - passedParams.push(param.value); - delete param.value; - } else { - passedParams.push(param); - } - } - call = new Call(exp, passedParams); - call["do"] = true; - return call; - }; - - Op.prototype.compileNode = function(o) { - var answer, isChain, _ref4, _ref5; - isChain = this.isChainable() && this.first.isChainable(); - if (!isChain) { - this.first.front = this.front; - } - if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { - this.error('delete operand may not be argument or var'); - } - if (((_ref4 = this.operator) === '--' || _ref4 === '++') && (_ref5 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref5) >= 0)) { - this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\""); - } - if (this.isUnary()) { - return this.compileUnary(o); - } - if (isChain) { - return this.compileChain(o); - } - if (this.operator === '?') { - return this.compileExistence(o); - } - answer = [].concat(this.first.compileToFragments(o, LEVEL_OP), this.makeCode(' ' + this.operator + ' '), this.second.compileToFragments(o, LEVEL_OP)); - if (o.level <= LEVEL_OP) { - return answer; - } else { - return this.wrapInBraces(answer); - } - }; - - Op.prototype.compileChain = function(o) { - var fragments, fst, shared, _ref4; - _ref4 = this.first.second.cache(o), this.first.second = _ref4[0], shared = _ref4[1]; - fst = this.first.compileToFragments(o, LEVEL_OP); - fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); - return this.wrapInBraces(fragments); - }; - - Op.prototype.compileExistence = function(o) { - var fst, ref; - if (!o.isExistentialEquals && this.first.isComplex()) { - ref = new Literal(o.scope.freeVariable('ref')); - fst = new Parens(new Assign(ref, this.first)); - } else { - fst = this.first; - ref = fst; - } - return new If(new Existence(fst), ref, { - type: 'if' - }).addElse(this.second).compileToFragments(o); - }; - - Op.prototype.compileUnary = function(o) { - var op, parts, plusMinus; - parts = []; - op = this.operator; - parts.push([this.makeCode(op)]); - if (op === '!' && this.first instanceof Existence) { - this.first.negated = !this.first.negated; - return this.first.compileToFragments(o); - } - if (o.level >= LEVEL_ACCESS) { - return (new Parens(this)).compileToFragments(o); - } - plusMinus = op === '+' || op === '-'; - if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) { - parts.push([this.makeCode(' ')]); - } - if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) { - this.first = new Parens(this.first); - } - parts.push(this.first.compileToFragments(o, LEVEL_OP)); - if (this.flip) { - parts.reverse(); - } - return this.joinFragmentArrays(parts, ''); - }; - - Op.prototype.toString = function(idt) { - return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); - }; - - return Op; - - })(Base); - - exports.In = In = (function(_super) { - __extends(In, _super); - - function In(object, array) { - this.object = object; - this.array = array; - } - - In.prototype.children = ['object', 'array']; - - In.prototype.invert = NEGATE; - - In.prototype.compileNode = function(o) { - var hasSplat, obj, _i, _len, _ref4; - if (this.array instanceof Value && this.array.isArray()) { - _ref4 = this.array.base.objects; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - obj = _ref4[_i]; - if (!(obj instanceof Splat)) { - continue; - } - hasSplat = true; - break; - } - if (!hasSplat) { - return this.compileOrTest(o); - } - } - return this.compileLoopTest(o); - }; - - In.prototype.compileOrTest = function(o) { - var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref4, _ref5, _ref6; - if (this.array.base.objects.length === 0) { - return [this.makeCode("" + (!!this.negated))]; - } - _ref4 = this.object.cache(o, LEVEL_OP), sub = _ref4[0], ref = _ref4[1]; - _ref5 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref5[0], cnj = _ref5[1]; - tests = []; - _ref6 = this.array.base.objects; - for (i = _i = 0, _len = _ref6.length; _i < _len; i = ++_i) { - item = _ref6[i]; - if (i) { - tests.push(this.makeCode(cnj)); - } - tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)); - } - if (o.level < LEVEL_OP) { - return tests; - } else { - return this.wrapInBraces(tests); - } - }; - - In.prototype.compileLoopTest = function(o) { - var fragments, ref, sub, _ref4; - _ref4 = this.object.cache(o, LEVEL_LIST), sub = _ref4[0], ref = _ref4[1]; - fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); - if (fragmentsToText(sub) === fragmentsToText(ref)) { - return fragments; - } - fragments = sub.concat(this.makeCode(', '), fragments); - if (o.level < LEVEL_LIST) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - In.prototype.toString = function(idt) { - return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); - }; - - return In; - - })(Base); - - exports.Try = Try = (function(_super) { - __extends(Try, _super); - - function Try(attempt, errorVariable, recovery, ensure) { - this.attempt = attempt; - this.errorVariable = errorVariable; - this.recovery = recovery; - this.ensure = ensure; - } - - Try.prototype.children = ['attempt', 'recovery', 'ensure']; - - Try.prototype.isStatement = YES; - - Try.prototype.jumps = function(o) { - var _ref4; - return this.attempt.jumps(o) || ((_ref4 = this.recovery) != null ? _ref4.jumps(o) : void 0); - }; - - Try.prototype.makeReturn = function(res) { - if (this.attempt) { - this.attempt = this.attempt.makeReturn(res); - } - if (this.recovery) { - this.recovery = this.recovery.makeReturn(res); - } - return this; - }; - - Try.prototype.compileNode = function(o) { - var catchPart, ensurePart, placeholder, tryPart; - o.indent += TAB; - tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); - catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; - ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; - return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); - }; - - return Try; - - })(Base); - - exports.Throw = Throw = (function(_super) { - __extends(Throw, _super); - - function Throw(expression) { - this.expression = expression; - } - - Throw.prototype.children = ['expression']; - - Throw.prototype.isStatement = YES; - - Throw.prototype.jumps = NO; - - Throw.prototype.makeReturn = THIS; - - Throw.prototype.compileNode = function(o) { - return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";")); - }; - - return Throw; - - })(Base); - - exports.Existence = Existence = (function(_super) { - __extends(Existence, _super); - - function Existence(expression) { - this.expression = expression; - } - - Existence.prototype.children = ['expression']; - - Existence.prototype.invert = NEGATE; - - Existence.prototype.compileNode = function(o) { - var cmp, cnj, code, _ref4; - this.expression.front = this.front; - code = this.expression.compile(o, LEVEL_OP); - if (IDENTIFIER.test(code) && !o.scope.check(code)) { - _ref4 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref4[0], cnj = _ref4[1]; - code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; - } else { - code = "" + code + " " + (this.negated ? '==' : '!=') + " null"; - } - return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")]; - }; - - return Existence; - - })(Base); - - exports.Parens = Parens = (function(_super) { - __extends(Parens, _super); - - function Parens(body) { - this.body = body; - } - - Parens.prototype.children = ['body']; - - Parens.prototype.unwrap = function() { - return this.body; - }; - - Parens.prototype.isComplex = function() { - return this.body.isComplex(); - }; - - Parens.prototype.compileNode = function(o) { - var bare, expr, fragments; - expr = this.body.unwrap(); - if (expr instanceof Value && expr.isAtomic()) { - expr.front = this.front; - return expr.compileToFragments(o); - } - fragments = expr.compileToFragments(o, LEVEL_PAREN); - bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); - if (bare) { - return fragments; - } else { - return this.wrapInBraces(fragments); - } - }; - - return Parens; - - })(Base); - - exports.For = For = (function(_super) { - __extends(For, _super); - - function For(body, source) { - var _ref4; - this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; - this.body = Block.wrap([body]); - this.own = !!source.own; - this.object = !!source.object; - if (this.object) { - _ref4 = [this.index, this.name], this.name = _ref4[0], this.index = _ref4[1]; - } - if (this.index instanceof Value) { - this.index.error('index cannot be a pattern matching expression'); - } - this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; - this.pattern = this.name instanceof Value; - if (this.range && this.index) { - this.index.error('indexes do not apply to range loops'); - } - if (this.range && this.pattern) { - this.name.error('cannot pattern match over range loops'); - } - if (this.own && !this.object) { - this.index.error('cannot use own with for-in'); - } - this.returns = false; - } - - For.prototype.children = ['body', 'source', 'guard', 'step']; - - For.prototype.compileNode = function(o) { - var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref4, _ref5; - body = Block.wrap([this.body]); - lastJumps = (_ref4 = last(body.expressions)) != null ? _ref4.jumps() : void 0; - if (lastJumps && lastJumps instanceof Return) { - this.returns = false; - } - source = this.range ? this.source.base : this.source; - scope = o.scope; - name = this.name && (this.name.compile(o, LEVEL_LIST)); - index = this.index && (this.index.compile(o, LEVEL_LIST)); - if (name && !this.pattern) { - scope.find(name); - } - if (index) { - scope.find(index); - } - if (this.returns) { - rvar = scope.freeVariable('results'); - } - ivar = (this.object && index) || scope.freeVariable('i'); - kvar = (this.range && name) || index || ivar; - kvarAssign = kvar !== ivar ? "" + kvar + " = " : ""; - if (this.step && !this.range) { - _ref5 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref5[0], stepVar = _ref5[1]; - stepNum = stepVar.match(SIMPLENUM); - } - if (this.pattern) { - name = ivar; - } - varPart = ''; - guardPart = ''; - defPart = ''; - idt1 = this.tab + TAB; - if (this.range) { - forPartFragments = source.compileToFragments(merge(o, { - index: ivar, - name: name, - step: this.step - })); - } else { - svar = this.source.compile(o, LEVEL_LIST); - if ((name || this.own) && !IDENTIFIER.test(svar)) { - defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; - svar = ref; - } - if (name && !this.pattern) { - namePart = "" + name + " = " + svar + "[" + kvar + "]"; - } - if (!this.object) { - if (step !== stepVar) { - defPart += "" + this.tab + step + ";\n"; - } - if (!(this.step && stepNum && (down = +stepNum < 0))) { - lvar = scope.freeVariable('len'); - } - declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length"; - declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1"; - compare = "" + ivar + " < " + lvar; - compareDown = "" + ivar + " >= 0"; - if (this.step) { - if (stepNum) { - if (down) { - compare = compareDown; - declare = declareDown; - } - } else { - compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown; - declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")"; - } - increment = "" + ivar + " += " + stepVar; - } else { - increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++"); - } - forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)]; - } - } - if (this.returns) { - resultPart = "" + this.tab + rvar + " = [];\n"; - returnResult = "\n" + this.tab + "return " + rvar + ";"; - body.makeReturn(rvar); - } - if (this.guard) { - if (body.expressions.length > 1) { - body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); - } else { - if (this.guard) { - body = Block.wrap([new If(this.guard, body)]); - } - } - } - if (this.pattern) { - body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]"))); - } - defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body)); - if (namePart) { - varPart = "\n" + idt1 + namePart + ";"; - } - if (this.object) { - forPartFragments = [this.makeCode("" + kvar + " in " + svar)]; - if (this.own) { - guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;"; - } - } - bodyFragments = body.compileToFragments(merge(o, { - indent: idt1 - }), LEVEL_TOP); - if (bodyFragments && (bodyFragments.length > 0)) { - bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n")); - } - return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || ''))); - }; - - For.prototype.pluckDirectCall = function(o, body) { - var base, defs, expr, fn, idx, ref, val, _i, _len, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9; - defs = []; - _ref4 = body.expressions; - for (idx = _i = 0, _len = _ref4.length; _i < _len; idx = ++_i) { - expr = _ref4[idx]; - expr = expr.unwrapAll(); - if (!(expr instanceof Call)) { - continue; - } - val = expr.variable.unwrapAll(); - if (!((val instanceof Code) || (val instanceof Value && ((_ref5 = val.base) != null ? _ref5.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref6 = (_ref7 = val.properties[0].name) != null ? _ref7.value : void 0) === 'call' || _ref6 === 'apply')))) { - continue; - } - fn = ((_ref8 = val.base) != null ? _ref8.unwrapAll() : void 0) || val; - ref = new Literal(o.scope.freeVariable('fn')); - base = new Value(ref); - if (val.base) { - _ref9 = [base, val], val.base = _ref9[0], base = _ref9[1]; - } - body.expressions[idx] = new Call(base, expr.args); - defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); - } - return defs; - }; - - return For; - - })(While); - - exports.Switch = Switch = (function(_super) { - __extends(Switch, _super); - - function Switch(subject, cases, otherwise) { - this.subject = subject; - this.cases = cases; - this.otherwise = otherwise; - } - - Switch.prototype.children = ['subject', 'cases', 'otherwise']; - - Switch.prototype.isStatement = YES; - - Switch.prototype.jumps = function(o) { - var block, conds, _i, _len, _ref4, _ref5, _ref6; - if (o == null) { - o = { - block: true - }; - } - _ref4 = this.cases; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - _ref5 = _ref4[_i], conds = _ref5[0], block = _ref5[1]; - if (block.jumps(o)) { - return block; - } - } - return (_ref6 = this.otherwise) != null ? _ref6.jumps(o) : void 0; - }; - - Switch.prototype.makeReturn = function(res) { - var pair, _i, _len, _ref4, _ref5; - _ref4 = this.cases; - for (_i = 0, _len = _ref4.length; _i < _len; _i++) { - pair = _ref4[_i]; - pair[1].makeReturn(res); - } - if (res) { - this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); - } - if ((_ref5 = this.otherwise) != null) { - _ref5.makeReturn(res); - } - return this; - }; - - Switch.prototype.compileNode = function(o) { - var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref4, _ref5, _ref6; - idt1 = o.indent + TAB; - idt2 = o.indent = idt1 + TAB; - fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); - _ref4 = this.cases; - for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { - _ref5 = _ref4[i], conditions = _ref5[0], block = _ref5[1]; - _ref6 = flatten([conditions]); - for (_j = 0, _len1 = _ref6.length; _j < _len1; _j++) { - cond = _ref6[_j]; - if (!this.subject) { - cond = cond.invert(); - } - fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n")); - } - if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) { - fragments = fragments.concat(body, this.makeCode('\n')); - } - if (i === this.cases.length - 1 && !this.otherwise) { - break; - } - expr = this.lastNonComment(block.expressions); - if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { - continue; - } - fragments.push(cond.makeCode(idt2 + 'break;\n')); - } - if (this.otherwise && this.otherwise.expressions.length) { - fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")])); - } - fragments.push(this.makeCode(this.tab + '}')); - return fragments; - }; - - return Switch; - - })(Base); - - exports.If = If = (function(_super) { - __extends(If, _super); - - function If(condition, body, options) { - this.body = body; - if (options == null) { - options = {}; - } - this.condition = options.type === 'unless' ? condition.invert() : condition; - this.elseBody = null; - this.isChain = false; - this.soak = options.soak; - } - - If.prototype.children = ['condition', 'body', 'elseBody']; - - If.prototype.bodyNode = function() { - var _ref4; - return (_ref4 = this.body) != null ? _ref4.unwrap() : void 0; - }; - - If.prototype.elseBodyNode = function() { - var _ref4; - return (_ref4 = this.elseBody) != null ? _ref4.unwrap() : void 0; - }; - - If.prototype.addElse = function(elseBody) { - if (this.isChain) { - this.elseBodyNode().addElse(elseBody); - } else { - this.isChain = elseBody instanceof If; - this.elseBody = this.ensureBlock(elseBody); - } - return this; - }; - - If.prototype.isStatement = function(o) { - var _ref4; - return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref4 = this.elseBodyNode()) != null ? _ref4.isStatement(o) : void 0); - }; - - If.prototype.jumps = function(o) { - var _ref4; - return this.body.jumps(o) || ((_ref4 = this.elseBody) != null ? _ref4.jumps(o) : void 0); - }; - - If.prototype.compileNode = function(o) { - if (this.isStatement(o)) { - return this.compileStatement(o); - } else { - return this.compileExpression(o); - } - }; - - If.prototype.makeReturn = function(res) { - if (res) { - this.elseBody || (this.elseBody = new Block([new Literal('void 0')])); - } - this.body && (this.body = new Block([this.body.makeReturn(res)])); - this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)])); - return this; - }; - - If.prototype.ensureBlock = function(node) { - if (node instanceof Block) { - return node; - } else { - return new Block([node]); - } - }; - - If.prototype.compileStatement = function(o) { - var answer, body, child, cond, exeq, ifPart, indent; - child = del(o, 'chainChild'); - exeq = del(o, 'isExistentialEquals'); - if (exeq) { - return new If(this.condition.invert(), this.elseBodyNode(), { - type: 'if' - }).compileToFragments(o); - } - indent = o.indent + TAB; - cond = this.condition.compileToFragments(o, LEVEL_PAREN); - body = this.ensureBlock(this.body).compileToFragments(merge(o, { - indent: indent - })); - ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}")); - if (!child) { - ifPart.unshift(this.makeCode(this.tab)); - } - if (!this.elseBody) { - return ifPart; - } - answer = ifPart.concat(this.makeCode(' else ')); - if (this.isChain) { - o.chainChild = true; - answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP)); - } else { - answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, { - indent: indent - }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); - } - return answer; - }; - - If.prototype.compileExpression = function(o) { - var alt, body, cond, fragments; - cond = this.condition.compileToFragments(o, LEVEL_COND); - body = this.bodyNode().compileToFragments(o, LEVEL_LIST); - alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')]; - fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt); - if (o.level >= LEVEL_COND) { - return this.wrapInBraces(fragments); - } else { - return fragments; - } - }; - - If.prototype.unfoldSoak = function() { - return this.soak && this; - }; - - return If; - - })(Base); - - Closure = { - wrap: function(expressions, statement, noReturn) { - var args, argumentsNode, call, func, meth; - if (expressions.jumps()) { - return expressions; - } - func = new Code([], Block.wrap([expressions])); - args = []; - argumentsNode = expressions.contains(this.isLiteralArguments); - if (argumentsNode && expressions.classBody) { - argumentsNode.error("Class bodies shouldn't reference arguments"); - } - if (argumentsNode || expressions.contains(this.isLiteralThis)) { - meth = new Literal(argumentsNode ? 'apply' : 'call'); - args = [new Literal('this')]; - if (argumentsNode) { - args.push(new Literal('arguments')); - } - func = new Value(func, [new Access(meth)]); - } - func.noReturn = noReturn; - call = new Call(func, args); - if (statement) { - return Block.wrap([call]); - } else { - return call; - } - }, - isLiteralArguments: function(node) { - return node instanceof Literal && node.value === 'arguments' && !node.asKey; - }, - isLiteralThis: function(node) { - return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper); - } - }; - - unfoldSoak = function(o, parent, name) { - var ifn; - if (!(ifn = parent[name].unfoldSoak(o))) { - return; - } - parent[name] = ifn.body; - ifn.body = new Value(parent); - return ifn; - }; - - UTILITIES = { - "extends": function() { - return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"; - }, - bind: function() { - return 'function(fn, me){ return function(){ return fn.apply(me, arguments); }; }'; - }, - indexOf: function() { - return "[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"; - }, - hasProp: function() { - return '{}.hasOwnProperty'; - }, - slice: function() { - return '[].slice'; - } - }; - - LEVEL_TOP = 1; - - LEVEL_PAREN = 2; - - LEVEL_LIST = 3; - - LEVEL_COND = 4; - - LEVEL_OP = 5; - - LEVEL_ACCESS = 6; - - TAB = ' '; - - IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; - - IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$"); - - SIMPLENUM = /^[+-]?\d+$/; - - METHOD_DEF = RegExp("^(?:(" + IDENTIFIER_STR + ")\\.prototype(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\]))|(" + IDENTIFIER_STR + ")$"); - - IS_STRING = /^['"]/; - - utility = function(name) { - var ref; - ref = "__" + name; - Scope.root.assign(ref, UTILITIES[name]()); - return ref; - }; - - multident = function(code, tab) { - code = code.replace(/\n/g, '$&' + tab); - return code.replace(/\s+$/, ''); - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/optparse.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/optparse.js deleted file mode 100644 index 0f19ae7d..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/optparse.js +++ /dev/null @@ -1,139 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; - - repeat = require('./helpers').repeat; - - exports.OptionParser = OptionParser = (function() { - function OptionParser(rules, banner) { - this.banner = banner; - this.rules = buildRules(rules); - } - - OptionParser.prototype.parse = function(args) { - var arg, i, isOption, matchedRule, options, originalArgs, pos, rule, seenNonOptionArg, skippingArgument, value, _i, _j, _len, _len1, _ref; - options = { - "arguments": [] - }; - skippingArgument = false; - originalArgs = args; - args = normalizeArguments(args); - for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { - arg = args[i]; - if (skippingArgument) { - skippingArgument = false; - continue; - } - if (arg === '--') { - pos = originalArgs.indexOf('--'); - options["arguments"] = options["arguments"].concat(originalArgs.slice(pos + 1)); - break; - } - isOption = !!(arg.match(LONG_FLAG) || arg.match(SHORT_FLAG)); - seenNonOptionArg = options["arguments"].length > 0; - if (!seenNonOptionArg) { - matchedRule = false; - _ref = this.rules; - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - rule = _ref[_j]; - if (rule.shortFlag === arg || rule.longFlag === arg) { - value = true; - if (rule.hasArgument) { - skippingArgument = true; - value = args[i + 1]; - } - options[rule.name] = rule.isList ? (options[rule.name] || []).concat(value) : value; - matchedRule = true; - break; - } - } - if (isOption && !matchedRule) { - throw new Error("unrecognized option: " + arg); - } - } - if (seenNonOptionArg || !isOption) { - options["arguments"].push(arg); - } - } - return options; - }; - - OptionParser.prototype.help = function() { - var letPart, lines, rule, spaces, _i, _len, _ref; - lines = []; - if (this.banner) { - lines.unshift("" + this.banner + "\n"); - } - _ref = this.rules; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - rule = _ref[_i]; - spaces = 15 - rule.longFlag.length; - spaces = spaces > 0 ? repeat(' ', spaces) : ''; - letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' '; - lines.push(' ' + letPart + rule.longFlag + spaces + rule.description); - } - return "\n" + (lines.join('\n')) + "\n"; - }; - - return OptionParser; - - })(); - - LONG_FLAG = /^(--\w[\w\-]*)/; - - SHORT_FLAG = /^(-\w)$/; - - MULTI_FLAG = /^-(\w{2,})/; - - OPTIONAL = /\[(\w+(\*?))\]/; - - buildRules = function(rules) { - var tuple, _i, _len, _results; - _results = []; - for (_i = 0, _len = rules.length; _i < _len; _i++) { - tuple = rules[_i]; - if (tuple.length < 3) { - tuple.unshift(null); - } - _results.push(buildRule.apply(null, tuple)); - } - return _results; - }; - - buildRule = function(shortFlag, longFlag, description, options) { - var match; - if (options == null) { - options = {}; - } - match = longFlag.match(OPTIONAL); - longFlag = longFlag.match(LONG_FLAG)[1]; - return { - name: longFlag.substr(2), - shortFlag: shortFlag, - longFlag: longFlag, - description: description, - hasArgument: !!(match && match[1]), - isList: !!(match && match[2]) - }; - }; - - normalizeArguments = function(args) { - var arg, l, match, result, _i, _j, _len, _len1, _ref; - args = args.slice(0); - result = []; - for (_i = 0, _len = args.length; _i < _len; _i++) { - arg = args[_i]; - if (match = arg.match(MULTI_FLAG)) { - _ref = match[1].split(''); - for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { - l = _ref[_j]; - result.push('-' + l); - } - } else { - result.push(arg); - } - } - return result; - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/parser.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/parser.js deleted file mode 100755 index 9f23cc47..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/parser.js +++ /dev/null @@ -1,610 +0,0 @@ -/* parser generated by jison 0.4.2 */ -var parser = (function(){ -var parser = {trace: function trace() { }, -yy: {}, -symbols_: {"error":2,"Root":3,"Body":4,"Block":5,"TERMINATOR":6,"Line":7,"Expression":8,"Statement":9,"Return":10,"Comment":11,"STATEMENT":12,"Value":13,"Invocation":14,"Code":15,"Operation":16,"Assign":17,"If":18,"Try":19,"While":20,"For":21,"Switch":22,"Class":23,"Throw":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"-":128,"+":129,"--":130,"++":131,"?":132,"MATH":133,"SHIFT":134,"COMPARE":135,"LOGIC":136,"RELATION":137,"COMPOUND_ASSIGN":138,"$accept":0,"$end":1}, -terminals_: {2:"error",6:"TERMINATOR",12:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"-",129:"+",130:"--",131:"++",132:"?",133:"MATH",134:"SHIFT",135:"COMPARE",136:"LOGIC",137:"RELATION",138:"COMPOUND_ASSIGN"}, -productions_: [0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[17,3],[17,4],[17,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[10,2],[10,1],[11,1],[15,5],[15,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[13,1],[13,1],[13,1],[13,1],[13,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[23,1],[23,2],[23,3],[23,4],[23,2],[23,3],[23,4],[23,5],[14,3],[14,3],[14,1],[14,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[95,1],[95,3],[19,2],[19,3],[19,4],[19,5],[97,3],[97,3],[97,2],[24,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[20,2],[20,2],[20,2],[20,1],[107,2],[107,2],[21,2],[21,2],[21,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[22,5],[22,7],[22,4],[22,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[18,1],[18,3],[18,3],[18,3],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,2],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,3],[16,5],[16,4],[16,3]], -performAction: function anonymous(yytext,yyleng,yylineno,yy,yystate,$$,_$) { - -var $0 = $$.length - 1; -switch (yystate) { -case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block); -break; -case 2:return this.$ = $$[$0]; -break; -case 3:return this.$ = $$[$0-1]; -break; -case 4:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]])); -break; -case 5:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0])); -break; -case 6:this.$ = $$[$0-1]; -break; -case 7:this.$ = $$[$0]; -break; -case 8:this.$ = $$[$0]; -break; -case 9:this.$ = $$[$0]; -break; -case 10:this.$ = $$[$0]; -break; -case 11:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 12:this.$ = $$[$0]; -break; -case 13:this.$ = $$[$0]; -break; -case 14:this.$ = $$[$0]; -break; -case 15:this.$ = $$[$0]; -break; -case 16:this.$ = $$[$0]; -break; -case 17:this.$ = $$[$0]; -break; -case 18:this.$ = $$[$0]; -break; -case 19:this.$ = $$[$0]; -break; -case 20:this.$ = $$[$0]; -break; -case 21:this.$ = $$[$0]; -break; -case 22:this.$ = $$[$0]; -break; -case 23:this.$ = $$[$0]; -break; -case 24:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block); -break; -case 25:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); -break; -case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 28:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 29:this.$ = $$[$0]; -break; -case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); -break; -case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined); -break; -case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null); -break; -case 35:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0])); -break; -case 36:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0])); -break; -case 37:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0])); -break; -case 38:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1])); -break; -case 39:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 40:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object')); -break; -case 41:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object')); -break; -case 42:this.$ = $$[$0]; -break; -case 43:this.$ = $$[$0]; -break; -case 44:this.$ = $$[$0]; -break; -case 45:this.$ = $$[$0]; -break; -case 46:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0])); -break; -case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return); -break; -case 48:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0])); -break; -case 49:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1])); -break; -case 50:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1])); -break; -case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func'); -break; -case 52:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc'); -break; -case 53:this.$ = $$[$0]; -break; -case 54:this.$ = $$[$0]; -break; -case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); -break; -case 56:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 57:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 58:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 59:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 60:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0])); -break; -case 61:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true)); -break; -case 62:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0])); -break; -case 63:this.$ = $$[$0]; -break; -case 64:this.$ = $$[$0]; -break; -case 65:this.$ = $$[$0]; -break; -case 66:this.$ = $$[$0]; -break; -case 67:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1])); -break; -case 68:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0])); -break; -case 70:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0]))); -break; -case 71:this.$ = $$[$0]; -break; -case 72:this.$ = $$[$0]; -break; -case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 74:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 75:this.$ = $$[$0]; -break; -case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 78:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 79:this.$ = $$[$0]; -break; -case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0])); -break; -case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak')); -break; -case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); -break; -case 83:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); -break; -case 84:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype'))); -break; -case 85:this.$ = $$[$0]; -break; -case 86:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); -break; -case 87:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], { - soak: true - })); -break; -case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0])); -break; -case 89:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0])); -break; -case 90:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated)); -break; -case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); -break; -case 92:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 93:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 94:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 95:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 96:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class); -break; -case 97:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0])); -break; -case 98:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0])); -break; -case 99:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0])); -break; -case 100:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0])); -break; -case 101:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0])); -break; -case 102:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0])); -break; -case 103:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0])); -break; -case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); -break; -case 105:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); -break; -case 106:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))])); -break; -case 107:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0])); -break; -case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false); -break; -case 109:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true); -break; -case 110:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]); -break; -case 111:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); -break; -case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); -break; -case 113:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); -break; -case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this')); -break; -case 115:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([])); -break; -case 116:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2])); -break; -case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive'); -break; -case 118:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive'); -break; -case 119:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2])); -break; -case 120:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1])); -break; -case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0])); -break; -case 122:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1])); -break; -case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0])); -break; -case 124:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 125:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); -break; -case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); -break; -case 127:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); -break; -case 128:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); -break; -case 129:this.$ = $$[$0]; -break; -case 130:this.$ = $$[$0]; -break; -case 131:this.$ = $$[$0]; -break; -case 132:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0])); -break; -case 133:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0])); -break; -case 134:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1])); -break; -case 135:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0])); -break; -case 136:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0])); -break; -case 137:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); -break; -case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); -break; -case 139:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); -break; -case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); -break; -case 141:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); -break; -case 142:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); -break; -case 143:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); -break; -case 144:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { - guard: $$[$0] - })); -break; -case 145:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { - invert: true - })); -break; -case 146:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { - invert: true, - guard: $$[$0] - })); -break; -case 147:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); -break; -case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); -break; -case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); -break; -case 150:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); -break; -case 151:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); -break; -case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); -break; -case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); -break; -case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); -break; -case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); -break; -case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) - }); -break; -case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { - $$[$0].own = $$[$0-1].own; - $$[$0].name = $$[$0-1][0]; - $$[$0].index = $$[$0-1][1]; - return $$[$0]; - }())); -break; -case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); -break; -case 159:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { - $$[$0].own = true; - return $$[$0]; - }())); -break; -case 160:this.$ = $$[$0]; -break; -case 161:this.$ = $$[$0]; -break; -case 162:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); -break; -case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); -break; -case 165:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); -break; -case 166:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: $$[$0] - }); -break; -case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ - source: $$[$0], - object: true - }); -break; -case 168:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - guard: $$[$0] - }); -break; -case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - guard: $$[$0], - object: true - }); -break; -case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ - source: $$[$0-2], - step: $$[$0] - }); -break; -case 171:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ - source: $$[$0-4], - guard: $$[$0-2], - step: $$[$0] - }); -break; -case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ - source: $$[$0-4], - step: $$[$0-2], - guard: $$[$0] - }); -break; -case 173:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); -break; -case 174:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); -break; -case 175:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); -break; -case 176:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); -break; -case 177:this.$ = $$[$0]; -break; -case 178:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); -break; -case 179:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); -break; -case 180:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); -break; -case 181:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { - type: $$[$0-2] - })); -break; -case 182:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(new yy.If($$[$0-1], $$[$0], { - type: $$[$0-2] - }))); -break; -case 183:this.$ = $$[$0]; -break; -case 184:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); -break; -case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { - type: $$[$0-1], - statement: true - })); -break; -case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { - type: $$[$0-1], - statement: true - })); -break; -case 187:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); -break; -case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); -break; -case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); -break; -case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); -break; -case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); -break; -case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); -break; -case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); -break; -case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); -break; -case 195:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); -break; -case 196:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); -break; -case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); -break; -case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { - if ($$[$0-1].charAt(0) === '!') { - return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); - } else { - return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); - } - }())); -break; -case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); -break; -case 203:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); -break; -case 204:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); -break; -case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); -break; -} -}, -table: [{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[3]},{1:[2,2],6:[1,74]},{6:[1,75]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{4:77,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[1,76],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,12],74:[1,101],78:[2,12],81:92,84:[1,94],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],128:[2,12],129:[2,12],132:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],73:[2,13],74:[1,101],78:[2,13],81:102,84:[1,94],85:[2,108],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],128:[2,13],129:[2,13],132:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],128:[2,14],129:[2,14],132:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],128:[2,15],129:[2,15],132:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],128:[2,16],129:[2,16],132:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],128:[2,17],129:[2,17],132:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],128:[2,18],129:[2,18],132:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],128:[2,19],129:[2,19],132:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],128:[2,20],129:[2,20],132:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],128:[2,21],129:[2,21],132:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],128:[2,22],129:[2,22],132:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],126:[2,23],128:[2,23],129:[2,23],132:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,11],6:[2,11],26:[2,11],102:[2,11],104:[2,11],106:[2,11],110:[2,11],126:[2,11]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,104],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],128:[2,75],129:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],128:[2,76],129:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],128:[2,77],129:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],128:[2,78],129:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],128:[2,79],129:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:105,84:[2,106],85:[1,106],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],128:[2,106],129:[2,106],132:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106]},{6:[2,55],25:[2,55],27:110,28:[1,73],44:111,48:107,49:[2,55],54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{5:116,25:[1,5]},{8:117,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:119,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:120,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:121,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{13:122,14:123,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,58:47,59:48,61:125,63:25,64:26,65:27,76:[1,70],83:[1,28],88:[1,58],89:[1,59],90:[1,57],101:[1,56]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],128:[2,72],129:[2,72],130:[1,126],131:[1,127],132:[2,72],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[1,128]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[1,130],126:[2,183],128:[2,183],129:[2,183],132:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183]},{5:131,25:[1,5]},{5:132,25:[1,5]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],128:[2,150],129:[2,150],132:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150]},{5:133,25:[1,5]},{8:134,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,135],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,96],5:136,6:[2,96],13:122,14:123,25:[1,5],26:[2,96],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:124,44:63,49:[2,96],54:[2,96],57:[2,96],58:47,59:48,61:138,63:25,64:26,65:27,73:[2,96],76:[1,70],78:[2,96],80:[1,137],83:[1,28],86:[2,96],88:[1,58],89:[1,59],90:[1,57],91:[2,96],93:[2,96],101:[1,56],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],128:[2,96],129:[2,96],132:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96]},{8:139,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,47],6:[2,47],8:140,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,47],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,47],103:39,104:[2,47],106:[2,47],107:40,108:[1,67],109:41,110:[2,47],111:69,119:[1,42],124:37,125:[1,64],126:[2,47],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],54:[2,48],78:[2,48],102:[2,48],104:[2,48],106:[2,48],110:[2,48],126:[2,48]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],128:[2,73],129:[2,73],132:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],128:[2,74],129:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],128:[2,29],129:[2,29],132:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],128:[2,30],129:[2,30],132:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],128:[2,31],129:[2,31],132:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],128:[2,32],129:[2,32],132:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],128:[2,33],129:[2,33],132:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],128:[2,34],129:[2,34],132:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],66:[2,35],67:[2,35],68:[2,35],69:[2,35],71:[2,35],73:[2,35],74:[2,35],78:[2,35],84:[2,35],85:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],104:[2,35],105:[2,35],106:[2,35],110:[2,35],118:[2,35],126:[2,35],128:[2,35],129:[2,35],132:[2,35],133:[2,35],134:[2,35],135:[2,35],136:[2,35],137:[2,35]},{4:141,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,142],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:143,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],128:[2,112],129:[2,112],132:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:149,28:[1,73],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],128:[2,113],129:[2,113],132:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113]},{25:[2,51]},{25:[2,52]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],128:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],128:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71]},{8:150,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:151,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:152,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:153,8:154,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,5],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{27:159,28:[1,73],44:160,58:161,59:162,64:155,76:[1,70],89:[1,114],90:[1,57],113:156,114:[1,157],115:158},{112:163,116:[1,164],117:[1,165]},{6:[2,91],11:169,25:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:166,78:[2,91],89:[1,114]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],128:[2,27],129:[2,27],132:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],43:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],128:[2,28],129:[2,28],132:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],40:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],80:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],116:[2,26],117:[2,26],118:[2,26],126:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26]},{1:[2,6],6:[2,6],7:173,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,26:[2,6],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],102:[2,6],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],128:[2,24],129:[2,24],132:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24]},{6:[1,74],26:[1,174]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],128:[2,194],129:[2,194],132:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194]},{8:175,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:176,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:177,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:178,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:179,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:180,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:181,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:182,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],128:[2,149],129:[2,149],132:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],128:[2,154],129:[2,154],132:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154]},{8:183,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],128:[2,148],129:[2,148],132:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],104:[2,153],105:[2,153],106:[2,153],110:[2,153],118:[2,153],126:[2,153],128:[2,153],129:[2,153],132:[2,153],133:[2,153],134:[2,153],135:[2,153],136:[2,153],137:[2,153]},{82:184,85:[1,106]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],128:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69]},{85:[2,109]},{27:185,28:[1,73]},{27:186,28:[1,73]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:187,28:[1,73],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],128:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84]},{27:188,28:[1,73]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],128:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85]},{8:190,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],57:[1,194],58:47,59:48,61:36,63:25,64:26,65:27,72:189,75:191,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],92:192,93:[1,193],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{70:195,71:[1,100],74:[1,101]},{82:196,85:[1,106]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],128:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70]},{6:[1,198],8:197,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,199],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],128:[2,107],129:[2,107],132:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[1,200],87:201,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],49:[1,203],53:205,54:[1,204]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{6:[2,60],25:[2,60],26:[2,60],40:[1,207],49:[2,60],54:[2,60],57:[1,206]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:149,28:[1,73]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:145,88:[1,58],89:[1,59],90:[1,57],91:[1,144],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,50],6:[2,50],25:[2,50],26:[2,50],49:[2,50],54:[2,50],57:[2,50],73:[2,50],78:[2,50],86:[2,50],91:[2,50],93:[2,50],102:[2,50],104:[2,50],105:[2,50],106:[2,50],110:[2,50],118:[2,50],126:[2,50],128:[2,50],129:[2,50],132:[2,50],133:[2,50],134:[2,50],135:[2,50],136:[2,50],137:[2,50]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:87,104:[2,187],105:[2,187],106:[2,187],109:88,110:[2,187],111:69,118:[2,187],126:[2,187],128:[2,187],129:[2,187],132:[1,78],133:[2,187],134:[2,187],135:[2,187],136:[2,187],137:[2,187]},{103:90,104:[1,65],106:[1,66],109:91,110:[1,68],111:69,126:[1,89]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:87,104:[2,188],105:[2,188],106:[2,188],109:88,110:[2,188],111:69,118:[2,188],126:[2,188],128:[2,188],129:[2,188],132:[1,78],133:[2,188],134:[2,188],135:[2,188],136:[2,188],137:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:87,104:[2,189],105:[2,189],106:[2,189],109:88,110:[2,189],111:69,118:[2,189],126:[2,189],128:[2,189],129:[2,189],132:[1,78],133:[2,189],134:[2,189],135:[2,189],136:[2,189],137:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,190],74:[2,72],78:[2,190],84:[2,72],85:[2,72],86:[2,190],91:[2,190],93:[2,190],102:[2,190],104:[2,190],105:[2,190],106:[2,190],110:[2,190],118:[2,190],126:[2,190],128:[2,190],129:[2,190],132:[2,190],133:[2,190],134:[2,190],135:[2,190],136:[2,190],137:[2,190]},{62:93,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:92,84:[1,94],85:[2,108]},{62:103,66:[1,95],67:[1,96],68:[1,97],69:[1,98],70:99,71:[1,100],74:[1,101],81:102,84:[1,94],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,191],74:[2,72],78:[2,191],84:[2,72],85:[2,72],86:[2,191],91:[2,191],93:[2,191],102:[2,191],104:[2,191],105:[2,191],106:[2,191],110:[2,191],118:[2,191],126:[2,191],128:[2,191],129:[2,191],132:[2,191],133:[2,191],134:[2,191],135:[2,191],136:[2,191],137:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],73:[2,192],78:[2,192],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],128:[2,192],129:[2,192],132:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],73:[2,193],78:[2,193],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],128:[2,193],129:[2,193],132:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193]},{6:[1,210],8:208,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,209],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:211,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{5:212,25:[1,5],125:[1,213]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],49:[2,133],54:[2,133],57:[2,133],73:[2,133],78:[2,133],86:[2,133],91:[2,133],93:[2,133],97:214,98:[1,215],99:[1,216],102:[2,133],104:[2,133],105:[2,133],106:[2,133],110:[2,133],118:[2,133],126:[2,133],128:[2,133],129:[2,133],132:[2,133],133:[2,133],134:[2,133],135:[2,133],136:[2,133],137:[2,133]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],104:[2,147],105:[2,147],106:[2,147],110:[2,147],118:[2,147],126:[2,147],128:[2,147],129:[2,147],132:[2,147],133:[2,147],134:[2,147],135:[2,147],136:[2,147],137:[2,147]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],128:[2,155],129:[2,155],132:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155]},{25:[1,217],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{120:218,122:219,123:[1,220]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],128:[2,97],129:[2,97],132:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97]},{8:221,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,100],5:222,6:[2,100],25:[1,5],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,223],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],128:[2,100],129:[2,100],132:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],102:[2,140],103:87,104:[2,140],105:[2,140],106:[2,140],109:88,110:[2,140],111:69,118:[2,140],126:[2,140],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,46],6:[2,46],26:[2,46],102:[2,46],103:87,104:[2,46],106:[2,46],109:88,110:[2,46],111:69,126:[2,46],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,74],102:[1,224]},{4:225,7:4,8:6,9:7,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,129],25:[2,129],54:[2,129],57:[1,227],91:[2,129],92:226,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],128:[2,115],129:[2,115],132:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115]},{6:[2,53],25:[2,53],53:228,54:[1,229],91:[2,53]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:230,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],128:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114]},{5:231,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],73:[2,143],78:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],103:87,104:[1,65],105:[1,232],106:[1,66],109:88,110:[1,68],111:69,118:[2,143],126:[2,143],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:87,104:[1,65],105:[1,233],106:[1,66],109:88,110:[1,68],111:69,118:[2,145],126:[2,145],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],128:[2,151],129:[2,151],132:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],103:87,104:[1,65],105:[2,152],106:[1,66],109:88,110:[1,68],111:69,118:[2,152],126:[2,152],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],128:[2,156],129:[2,156],132:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156]},{116:[2,158],117:[2,158]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],113:234,115:158},{54:[1,235],116:[2,164],117:[2,164]},{54:[2,160],116:[2,160],117:[2,160]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],128:[2,157],129:[2,157],132:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157]},{8:236,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:237,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],53:238,54:[1,239],78:[2,53]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,39],25:[2,39],26:[2,39],43:[1,240],54:[2,39],78:[2,39]},{6:[2,42],25:[2,42],26:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{6:[2,45],25:[2,45],26:[2,45],43:[2,45],54:[2,45],78:[2,45]},{1:[2,5],6:[2,5],26:[2,5],102:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],49:[2,25],54:[2,25],57:[2,25],73:[2,25],78:[2,25],86:[2,25],91:[2,25],93:[2,25],98:[2,25],99:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],118:[2,25],121:[2,25],123:[2,25],126:[2,25],128:[2,25],129:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],103:87,104:[2,195],105:[2,195],106:[2,195],109:88,110:[2,195],111:69,118:[2,195],126:[2,195],128:[2,195],129:[2,195],132:[1,78],133:[1,81],134:[2,195],135:[2,195],136:[2,195],137:[2,195]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],103:87,104:[2,196],105:[2,196],106:[2,196],109:88,110:[2,196],111:69,118:[2,196],126:[2,196],128:[2,196],129:[2,196],132:[1,78],133:[1,81],134:[2,196],135:[2,196],136:[2,196],137:[2,196]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:87,104:[2,197],105:[2,197],106:[2,197],109:88,110:[2,197],111:69,118:[2,197],126:[2,197],128:[2,197],129:[2,197],132:[1,78],133:[2,197],134:[2,197],135:[2,197],136:[2,197],137:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:87,104:[2,198],105:[2,198],106:[2,198],109:88,110:[2,198],111:69,118:[2,198],126:[2,198],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[2,198],135:[2,198],136:[2,198],137:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:87,104:[2,199],105:[2,199],106:[2,199],109:88,110:[2,199],111:69,118:[2,199],126:[2,199],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,199],136:[2,199],137:[1,85]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:87,104:[2,200],105:[2,200],106:[2,200],109:88,110:[2,200],111:69,118:[2,200],126:[2,200],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[2,200],137:[1,85]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:87,104:[2,201],105:[2,201],106:[2,201],109:88,110:[2,201],111:69,118:[2,201],126:[2,201],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[2,201],136:[2,201],137:[2,201]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:87,104:[1,65],105:[2,186],106:[1,66],109:88,110:[1,68],111:69,118:[2,186],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],103:87,104:[1,65],105:[2,185],106:[1,66],109:88,110:[1,68],111:69,118:[2,185],126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],128:[2,104],129:[2,104],132:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],128:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],128:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83]},{73:[1,241]},{57:[1,194],73:[2,88],92:242,93:[1,193],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{73:[2,89]},{8:243,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,123],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{12:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117]},{12:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],128:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],128:[2,105],129:[2,105],132:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:87,104:[2,36],105:[2,36],106:[2,36],109:88,110:[2,36],111:69,118:[2,36],126:[2,36],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:244,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:245,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],128:[2,110],129:[2,110],132:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110]},{6:[2,53],25:[2,53],53:246,54:[1,229],86:[2,53]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,247],86:[2,129],91:[2,129],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{50:248,51:[1,60],52:[1,61]},{6:[2,54],25:[2,54],26:[2,54],27:110,28:[1,73],44:111,55:249,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[1,250],25:[1,251]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61]},{8:252,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:87,104:[2,202],105:[2,202],106:[2,202],109:88,110:[2,202],111:69,118:[2,202],126:[2,202],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:253,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:254,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:87,104:[2,205],105:[2,205],106:[2,205],109:88,110:[2,205],111:69,118:[2,205],126:[2,205],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],126:[2,184],128:[2,184],129:[2,184],132:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184]},{8:255,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],98:[1,256],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],128:[2,134],129:[2,134],132:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134]},{5:257,25:[1,5]},{5:260,25:[1,5],27:258,28:[1,73],59:259,76:[1,70]},{120:261,122:219,123:[1,220]},{26:[1,262],121:[1,263],122:264,123:[1,220]},{26:[2,177],121:[2,177],123:[2,177]},{8:266,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],95:265,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,98],5:267,6:[2,98],25:[1,5],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:87,104:[1,65],105:[2,98],106:[1,66],109:88,110:[1,68],111:69,118:[2,98],126:[2,98],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],128:[2,101],129:[2,101],132:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101]},{8:268,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],66:[2,141],67:[2,141],68:[2,141],69:[2,141],71:[2,141],73:[2,141],74:[2,141],78:[2,141],84:[2,141],85:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],104:[2,141],105:[2,141],106:[2,141],110:[2,141],118:[2,141],126:[2,141],128:[2,141],129:[2,141],132:[2,141],133:[2,141],134:[2,141],135:[2,141],136:[2,141],137:[2,141]},{6:[1,74],26:[1,269]},{8:270,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,67],12:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118]},{6:[1,272],25:[1,273],91:[1,271]},{6:[2,54],8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[2,54],26:[2,54],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],86:[2,54],88:[1,58],89:[1,59],90:[1,57],91:[2,54],94:274,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,53],25:[2,53],26:[2,53],53:275,54:[1,229]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],49:[2,181],54:[2,181],57:[2,181],73:[2,181],78:[2,181],86:[2,181],91:[2,181],93:[2,181],102:[2,181],104:[2,181],105:[2,181],106:[2,181],110:[2,181],118:[2,181],121:[2,181],126:[2,181],128:[2,181],129:[2,181],132:[2,181],133:[2,181],134:[2,181],135:[2,181],136:[2,181],137:[2,181]},{8:276,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:277,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{116:[2,159],117:[2,159]},{27:159,28:[1,73],44:160,58:161,59:162,76:[1,70],89:[1,114],90:[1,115],115:278},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],49:[2,166],54:[2,166],57:[2,166],73:[2,166],78:[2,166],86:[2,166],91:[2,166],93:[2,166],102:[2,166],103:87,104:[2,166],105:[1,279],106:[2,166],109:88,110:[2,166],111:69,118:[1,280],126:[2,166],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:87,104:[2,167],105:[1,281],106:[2,167],109:88,110:[2,167],111:69,118:[2,167],126:[2,167],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,283],25:[1,284],78:[1,282]},{6:[2,54],11:169,25:[2,54],26:[2,54],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:285,42:168,44:172,46:[1,46],78:[2,54],89:[1,114]},{8:286,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,287],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],128:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86]},{8:288,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,73:[2,121],76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,122],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],103:87,104:[2,37],105:[2,37],106:[2,37],109:88,110:[2,37],111:69,118:[2,37],126:[2,37],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,289],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],86:[1,290]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{5:291,25:[1,5]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{27:110,28:[1,73],44:111,55:292,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,55],25:[2,55],26:[2,55],27:110,28:[1,73],44:111,48:293,54:[2,55],55:108,56:109,58:112,59:113,76:[1,70],89:[1,114],90:[1,115]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{26:[1,294],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:87,104:[2,204],105:[2,204],106:[2,204],109:88,110:[2,204],111:69,118:[2,204],126:[2,204],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:295,25:[1,5],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{5:296,25:[1,5]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],128:[2,135],129:[2,135],132:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135]},{5:297,25:[1,5]},{5:298,25:[1,5]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],128:[2,139],129:[2,139],132:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139]},{26:[1,299],121:[1,300],122:264,123:[1,220]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],128:[2,175],129:[2,175],132:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175]},{5:301,25:[1,5]},{26:[2,178],121:[2,178],123:[2,178]},{5:302,25:[1,5],54:[1,303]},{25:[2,131],54:[2,131],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],128:[2,99],129:[2,99],132:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99]},{1:[2,102],5:304,6:[2,102],25:[1,5],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:87,104:[1,65],105:[2,102],106:[1,66],109:88,110:[1,68],111:69,118:[2,102],126:[2,102],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{102:[1,305]},{91:[1,306],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],128:[2,116],129:[2,116],132:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],94:307,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:202,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,25:[1,147],27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,60:148,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],87:308,88:[1,58],89:[1,59],90:[1,57],94:146,96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,272],25:[1,273],26:[1,309]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:87,104:[1,65],105:[2,144],106:[1,66],109:88,110:[1,68],111:69,118:[2,144],126:[2,144],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:87,104:[1,65],105:[2,146],106:[1,66],109:88,110:[1,68],111:69,118:[2,146],126:[2,146],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{116:[2,165],117:[2,165]},{8:310,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:311,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:312,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],128:[2,90],129:[2,90],132:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90]},{11:169,27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:313,42:168,44:172,46:[1,46],89:[1,114]},{6:[2,91],11:169,25:[2,91],26:[2,91],27:170,28:[1,73],29:171,30:[1,71],31:[1,72],41:167,42:168,44:172,46:[1,46],54:[2,91],77:314,89:[1,114]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{8:315,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{73:[2,120],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,38],6:[2,38],25:[2,38],26:[2,38],49:[2,38],54:[2,38],57:[2,38],73:[2,38],78:[2,38],86:[2,38],91:[2,38],93:[2,38],102:[2,38],104:[2,38],105:[2,38],106:[2,38],110:[2,38],118:[2,38],126:[2,38],128:[2,38],129:[2,38],132:[2,38],133:[2,38],134:[2,38],135:[2,38],136:[2,38],137:[2,38]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],128:[2,111],129:[2,111],132:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],128:[2,49],129:[2,49],132:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{6:[2,53],25:[2,53],26:[2,53],53:316,54:[1,204]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],104:[2,203],105:[2,203],106:[2,203],110:[2,203],118:[2,203],126:[2,203],128:[2,203],129:[2,203],132:[2,203],133:[2,203],134:[2,203],135:[2,203],136:[2,203],137:[2,203]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],128:[2,182],129:[2,182],132:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],128:[2,136],129:[2,136],132:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],98:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],128:[2,137],129:[2,137],132:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],128:[2,138],129:[2,138],132:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],104:[2,173],105:[2,173],106:[2,173],110:[2,173],118:[2,173],126:[2,173],128:[2,173],129:[2,173],132:[2,173],133:[2,173],134:[2,173],135:[2,173],136:[2,173],137:[2,173]},{5:317,25:[1,5]},{26:[1,318]},{6:[1,319],26:[2,179],121:[2,179],123:[2,179]},{8:320,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],128:[2,103],129:[2,103],132:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],128:[2,142],129:[2,142],132:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],128:[2,119],129:[2,119],132:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,53],25:[2,53],26:[2,53],53:321,54:[1,229]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:87,104:[2,168],105:[2,168],106:[2,168],109:88,110:[2,168],111:69,118:[1,322],126:[2,168],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:87,104:[2,170],105:[1,323],106:[2,170],109:88,110:[2,170],111:69,118:[2,170],126:[2,170],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:87,104:[2,169],105:[2,169],106:[2,169],109:88,110:[2,169],111:69,118:[2,169],126:[2,169],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,53],25:[2,53],26:[2,53],53:324,54:[1,239]},{26:[1,325],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,250],25:[1,251],26:[1,326]},{26:[1,327]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],128:[2,176],129:[2,176],132:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176]},{26:[2,180],121:[2,180],123:[2,180]},{25:[2,132],54:[2,132],103:87,104:[1,65],106:[1,66],109:88,110:[1,68],111:69,126:[1,86],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[1,272],25:[1,273],26:[1,328]},{8:329,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{8:330,9:118,10:20,11:21,12:[1,22],13:8,14:9,15:10,16:11,17:12,18:13,19:14,20:15,21:16,22:17,23:18,24:19,27:62,28:[1,73],29:49,30:[1,71],31:[1,72],32:24,33:[1,50],34:[1,51],35:[1,52],36:[1,53],37:[1,54],38:[1,55],39:23,44:63,45:[1,45],46:[1,46],47:[1,29],50:30,51:[1,60],52:[1,61],58:47,59:48,61:36,63:25,64:26,65:27,76:[1,70],79:[1,43],83:[1,28],88:[1,58],89:[1,59],90:[1,57],96:[1,38],100:[1,44],101:[1,56],103:39,104:[1,65],106:[1,66],107:40,108:[1,67],109:41,110:[1,68],111:69,119:[1,42],124:37,125:[1,64],127:[1,31],128:[1,32],129:[1,33],130:[1,34],131:[1,35]},{6:[1,283],25:[1,284],26:[1,331]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,59],25:[2,59],26:[2,59],49:[2,59],54:[2,59]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],128:[2,174],129:[2,174],132:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:87,104:[2,171],105:[2,171],106:[2,171],109:88,110:[2,171],111:69,118:[2,171],126:[2,171],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:87,104:[2,172],105:[2,172],106:[2,172],109:88,110:[2,172],111:69,118:[2,172],126:[2,172],128:[1,80],129:[1,79],132:[1,78],133:[1,81],134:[1,82],135:[1,83],136:[1,84],137:[1,85]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}], -defaultActions: {60:[2,51],61:[2,52],75:[2,3],94:[2,109],191:[2,89]}, -parseError: function parseError(str, hash) { - throw new Error(str); -}, -parse: function parse(input) { - var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; - this.lexer.setInput(input); - this.lexer.yy = this.yy; - this.yy.lexer = this.lexer; - this.yy.parser = this; - if (typeof this.lexer.yylloc == "undefined") - this.lexer.yylloc = {}; - var yyloc = this.lexer.yylloc; - lstack.push(yyloc); - var ranges = this.lexer.options && this.lexer.options.ranges; - if (typeof this.yy.parseError === "function") - this.parseError = this.yy.parseError; - function popStack(n) { - stack.length = stack.length - 2 * n; - vstack.length = vstack.length - n; - lstack.length = lstack.length - n; - } - function lex() { - var token; - token = self.lexer.lex() || 1; - if (typeof token !== "number") { - token = self.symbols_[token] || token; - } - return token; - } - var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; - while (true) { - state = stack[stack.length - 1]; - if (this.defaultActions[state]) { - action = this.defaultActions[state]; - } else { - if (symbol === null || typeof symbol == "undefined") { - symbol = lex(); - } - action = table[state] && table[state][symbol]; - } - if (typeof action === "undefined" || !action.length || !action[0]) { - var errStr = ""; - if (!recovering) { - expected = []; - for (p in table[state]) - if (this.terminals_[p] && p > 2) { - expected.push("'" + this.terminals_[p] + "'"); - } - if (this.lexer.showPosition) { - errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'"; - } else { - errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1?"end of input":"'" + (this.terminals_[symbol] || symbol) + "'"); - } - this.parseError(errStr, {text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected: expected}); - } - } - if (action[0] instanceof Array && action.length > 1) { - throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol); - } - switch (action[0]) { - case 1: - stack.push(symbol); - vstack.push(this.lexer.yytext); - lstack.push(this.lexer.yylloc); - stack.push(action[1]); - symbol = null; - if (!preErrorSymbol) { - yyleng = this.lexer.yyleng; - yytext = this.lexer.yytext; - yylineno = this.lexer.yylineno; - yyloc = this.lexer.yylloc; - if (recovering > 0) - recovering--; - } else { - symbol = preErrorSymbol; - preErrorSymbol = null; - } - break; - case 2: - len = this.productions_[action[1]][1]; - yyval.$ = vstack[vstack.length - len]; - yyval._$ = {first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column}; - if (ranges) { - yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]]; - } - r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack); - if (typeof r !== "undefined") { - return r; - } - if (len) { - stack = stack.slice(0, -1 * len * 2); - vstack = vstack.slice(0, -1 * len); - lstack = lstack.slice(0, -1 * len); - } - stack.push(this.productions_[action[1]][0]); - vstack.push(yyval.$); - lstack.push(yyval._$); - newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; - stack.push(newState); - break; - case 3: - return true; - } - } - return true; -} -}; -undefined -function Parser () { this.yy = {}; }Parser.prototype = parser;parser.Parser = Parser; -return new Parser; -})(); -if (typeof require !== 'undefined' && typeof exports !== 'undefined') { -exports.parser = parser; -exports.Parser = parser.Parser; -exports.parse = function () { return parser.parse.apply(parser, arguments); }; -exports.main = function commonjsMain(args) { - if (!args[1]) { - console.log('Usage: '+args[0]+' FILE'); - process.exit(1); - } - var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); - return exports.parser.parse(source); -}; -if (typeof module !== 'undefined' && require.main === module) { - exports.main(process.argv.slice(1)); -} -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/repl.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/repl.js deleted file mode 100644 index 6c792913..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/repl.js +++ /dev/null @@ -1,159 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var CoffeeScript, addHistory, addMultilineHandler, fs, merge, nodeREPL, path, prettyErrorMessage, replDefaults, vm, _ref; - - fs = require('fs'); - - path = require('path'); - - vm = require('vm'); - - nodeREPL = require('repl'); - - CoffeeScript = require('./coffee-script'); - - _ref = require('./helpers'), merge = _ref.merge, prettyErrorMessage = _ref.prettyErrorMessage; - - replDefaults = { - prompt: 'coffee> ', - historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, - historyMaxInputSize: 10240, - "eval": function(input, context, filename, cb) { - var Assign, Block, Literal, Value, ast, err, js, _ref1; - input = input.replace(/\uFF00/g, '\n'); - input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); - _ref1 = require('./nodes'), Block = _ref1.Block, Assign = _ref1.Assign, Value = _ref1.Value, Literal = _ref1.Literal; - try { - ast = CoffeeScript.nodes(input); - ast = new Block([new Assign(new Value(new Literal('_')), ast, '=')]); - js = ast.compile({ - bare: true, - locals: Object.keys(context) - }); - return cb(null, vm.runInContext(js, context, filename)); - } catch (_error) { - err = _error; - return cb(prettyErrorMessage(err, filename, input, true)); - } - } - }; - - addMultilineHandler = function(repl) { - var inputStream, multiline, nodeLineListener, outputStream, rli; - rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream; - multiline = { - enabled: false, - initialPrompt: repl.prompt.replace(/^[^> ]*/, function(x) { - return x.replace(/./g, '-'); - }), - prompt: repl.prompt.replace(/^[^> ]*>?/, function(x) { - return x.replace(/./g, '.'); - }), - buffer: '' - }; - nodeLineListener = rli.listeners('line')[0]; - rli.removeListener('line', nodeLineListener); - rli.on('line', function(cmd) { - if (multiline.enabled) { - multiline.buffer += "" + cmd + "\n"; - rli.setPrompt(multiline.prompt); - rli.prompt(true); - } else { - nodeLineListener(cmd); - } - }); - return inputStream.on('keypress', function(char, key) { - if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'v')) { - return; - } - if (multiline.enabled) { - if (!multiline.buffer.match(/\n/)) { - multiline.enabled = !multiline.enabled; - rli.setPrompt(repl.prompt); - rli.prompt(true); - return; - } - if ((rli.line != null) && !rli.line.match(/^\s*$/)) { - return; - } - multiline.enabled = !multiline.enabled; - rli.line = ''; - rli.cursor = 0; - rli.output.cursorTo(0); - rli.output.clearLine(1); - multiline.buffer = multiline.buffer.replace(/\n/g, '\uFF00'); - rli.emit('line', multiline.buffer); - multiline.buffer = ''; - } else { - multiline.enabled = !multiline.enabled; - rli.setPrompt(multiline.initialPrompt); - rli.prompt(true); - } - }); - }; - - addHistory = function(repl, filename, maxSize) { - var buffer, fd, lastLine, readFd, size, stat; - lastLine = null; - try { - stat = fs.statSync(filename); - size = Math.min(maxSize, stat.size); - readFd = fs.openSync(filename, 'r'); - buffer = new Buffer(size); - fs.readSync(readFd, buffer, 0, size, stat.size - size); - repl.rli.history = buffer.toString().split('\n').reverse(); - if (stat.size > maxSize) { - repl.rli.history.pop(); - } - if (repl.rli.history[0] === '') { - repl.rli.history.shift(); - } - repl.rli.historyIndex = -1; - lastLine = repl.rli.history[0]; - } catch (_error) {} - fd = fs.openSync(filename, 'a'); - repl.rli.addListener('line', function(code) { - if (code && code.length && code !== '.history' && lastLine !== code) { - fs.write(fd, "" + code + "\n"); - return lastLine = code; - } - }); - repl.rli.on('exit', function() { - return fs.close(fd); - }); - return repl.commands['.history'] = { - help: 'Show command history', - action: function() { - repl.outputStream.write("" + (repl.rli.history.slice(0).reverse().join('\n')) + "\n"); - return repl.displayPrompt(); - } - }; - }; - - module.exports = { - start: function(opts) { - var build, major, minor, repl, _ref1; - if (opts == null) { - opts = {}; - } - _ref1 = process.versions.node.split('.').map(function(n) { - return parseInt(n); - }), major = _ref1[0], minor = _ref1[1], build = _ref1[2]; - if (major === 0 && minor < 8) { - console.warn("Node 0.8.0+ required for CoffeeScript REPL"); - process.exit(1); - } - opts = merge(replDefaults, opts); - repl = nodeREPL.start(opts); - repl.on('exit', function() { - return repl.outputStream.write('\n'); - }); - addMultilineHandler(repl); - if (opts.historyFile) { - addHistory(repl, opts.historyFile, opts.historyMaxInputSize); - } - return repl; - } - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/rewriter.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/rewriter.js deleted file mode 100644 index 11f36a3e..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/rewriter.js +++ /dev/null @@ -1,485 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var BALANCED_PAIRS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref, - __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, - __slice = [].slice; - - generate = function(tag, value) { - var tok; - tok = [tag, value]; - tok.generated = true; - return tok; - }; - - exports.Rewriter = (function() { - function Rewriter() {} - - Rewriter.prototype.rewrite = function(tokens) { - this.tokens = tokens; - this.removeLeadingNewlines(); - this.removeMidExpressionNewlines(); - this.closeOpenCalls(); - this.closeOpenIndexes(); - this.addImplicitIndentation(); - this.tagPostfixConditionals(); - this.addImplicitBracesAndParens(); - this.addLocationDataToGeneratedTokens(); - return this.tokens; - }; - - Rewriter.prototype.scanTokens = function(block) { - var i, token, tokens; - tokens = this.tokens; - i = 0; - while (token = tokens[i]) { - i += block.call(this, token, i, tokens); - } - return true; - }; - - Rewriter.prototype.detectEnd = function(i, condition, action) { - var levels, token, tokens, _ref, _ref1; - tokens = this.tokens; - levels = 0; - while (token = tokens[i]) { - if (levels === 0 && condition.call(this, token, i)) { - return action.call(this, token, i); - } - if (!token || levels < 0) { - return action.call(this, token, i - 1); - } - if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) { - levels += 1; - } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) { - levels -= 1; - } - i += 1; - } - return i - 1; - }; - - Rewriter.prototype.removeLeadingNewlines = function() { - var i, tag, _i, _len, _ref; - _ref = this.tokens; - for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { - tag = _ref[i][0]; - if (tag !== 'TERMINATOR') { - break; - } - } - if (i) { - return this.tokens.splice(0, i); - } - }; - - Rewriter.prototype.removeMidExpressionNewlines = function() { - return this.scanTokens(function(token, i, tokens) { - var _ref; - if (!(token[0] === 'TERMINATOR' && (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0))) { - return 1; - } - tokens.splice(i, 1); - return 0; - }); - }; - - Rewriter.prototype.closeOpenCalls = function() { - var action, condition; - condition = function(token, i) { - var _ref; - return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; - }; - action = function(token, i) { - return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; - }; - return this.scanTokens(function(token, i) { - if (token[0] === 'CALL_START') { - this.detectEnd(i + 1, condition, action); - } - return 1; - }); - }; - - Rewriter.prototype.closeOpenIndexes = function() { - var action, condition; - condition = function(token, i) { - var _ref; - return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; - }; - action = function(token, i) { - return token[0] = 'INDEX_END'; - }; - return this.scanTokens(function(token, i) { - if (token[0] === 'INDEX_START') { - this.detectEnd(i + 1, condition, action); - } - return 1; - }); - }; - - Rewriter.prototype.matchTags = function() { - var fuzz, i, j, pattern, _i, _ref, _ref1; - i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : []; - fuzz = 0; - for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) { - while (this.tag(i + j + fuzz) === 'HERECOMMENT') { - fuzz += 2; - } - if (pattern[j] == null) { - continue; - } - if (typeof pattern[j] === 'string') { - pattern[j] = [pattern[j]]; - } - if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) { - return false; - } - } - return true; - }; - - Rewriter.prototype.looksObjectish = function(j) { - return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':'); - }; - - Rewriter.prototype.findTagsBackwards = function(i, tags) { - var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - backStack = []; - while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) { - if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) { - backStack.push(this.tag(i)); - } - if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) { - backStack.pop(); - } - i -= 1; - } - return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0; - }; - - Rewriter.prototype.addImplicitBracesAndParens = function() { - var stack; - stack = []; - return this.scanTokens(function(token, i, tokens) { - var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, nextTag, offset, prevTag, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; - tag = token[0]; - prevTag = (i > 0 ? tokens[i - 1] : [])[0]; - nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0]; - stackTop = function() { - return stack[stack.length - 1]; - }; - startIdx = i; - forward = function(n) { - return i - startIdx + n; - }; - inImplicit = function() { - var _ref, _ref1; - return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0; - }; - inImplicitCall = function() { - var _ref; - return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '('; - }; - inImplicitObject = function() { - var _ref; - return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{'; - }; - inImplicitControl = function() { - var _ref; - return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL'; - }; - startImplicitCall = function(j) { - var idx; - idx = j != null ? j : i; - stack.push([ - '(', idx, { - ours: true - } - ]); - tokens.splice(idx, 0, generate('CALL_START', '(')); - if (j == null) { - return i += 1; - } - }; - endImplicitCall = function() { - stack.pop(); - tokens.splice(i, 0, generate('CALL_END', ')')); - return i += 1; - }; - startImplicitObject = function(j, startsLine) { - var idx; - if (startsLine == null) { - startsLine = true; - } - idx = j != null ? j : i; - stack.push([ - '{', idx, { - sameLine: true, - startsLine: startsLine, - ours: true - } - ]); - tokens.splice(idx, 0, generate('{', generate(new String('{')))); - if (j == null) { - return i += 1; - } - }; - endImplicitObject = function(j) { - j = j != null ? j : i; - stack.pop(); - tokens.splice(j, 0, generate('}', '}')); - return i += 1; - }; - if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) { - stack.push([ - 'CONTROL', i, { - ours: true - } - ]); - return forward(1); - } - if (tag === 'INDENT' && inImplicit()) { - if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') { - while (inImplicitCall()) { - endImplicitCall(); - } - } - if (inImplicitControl()) { - stack.pop(); - } - stack.push([tag, i]); - return forward(1); - } - if (__indexOf.call(EXPRESSION_START, tag) >= 0) { - stack.push([tag, i]); - return forward(1); - } - if (__indexOf.call(EXPRESSION_END, tag) >= 0) { - while (inImplicit()) { - if (inImplicitCall()) { - endImplicitCall(); - } else if (inImplicitObject()) { - endImplicitObject(); - } else { - stack.pop(); - } - } - stack.pop(); - } - if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { - if (tag === '?') { - tag = token[0] = 'FUNC_EXIST'; - } - startImplicitCall(i + 1); - return forward(2); - } - if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { - startImplicitCall(i + 1); - stack.push(['INDENT', i + 2]); - return forward(3); - } - if (tag === ':') { - if (this.tag(i - 2) === '@') { - s = i - 2; - } else { - s = i - 1; - } - while (this.tag(s - 2) === 'HERECOMMENT') { - s -= 2; - } - startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine; - if (stackTop()) { - _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1]; - if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) { - return forward(1); - } - } - startImplicitObject(s, !!startsLine); - return forward(2); - } - if (prevTag === 'OUTDENT' && inImplicitCall() && (tag === '.' || tag === '?.' || tag === '::' || tag === '?::')) { - endImplicitCall(); - return forward(1); - } - if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) { - stackTop()[2].sameLine = false; - } - if (__indexOf.call(IMPLICIT_END, tag) >= 0) { - while (inImplicit()) { - _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine); - if (inImplicitCall() && prevTag !== ',') { - endImplicitCall(); - } else if (inImplicitObject() && sameLine && !startsLine) { - endImplicitObject(); - } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) { - endImplicitObject(); - } else { - break; - } - } - } - if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) { - offset = nextTag === 'OUTDENT' ? 1 : 0; - while (inImplicitObject()) { - endImplicitObject(i + offset); - } - } - return forward(1); - }); - }; - - Rewriter.prototype.addLocationDataToGeneratedTokens = function() { - return this.scanTokens(function(token, i, tokens) { - var column, line, nextLocation, prevLocation, _ref, _ref1; - if (token[2]) { - return 1; - } - if (!(token.generated || token.explicit)) { - return 1; - } - if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) { - line = nextLocation.first_line, column = nextLocation.first_column; - } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) { - line = prevLocation.last_line, column = prevLocation.last_column; - } else { - line = column = 0; - } - token[2] = { - first_line: line, - first_column: column, - last_line: line, - last_column: column - }; - return 1; - }); - }; - - Rewriter.prototype.addImplicitIndentation = function() { - var action, condition, indent, outdent, starter; - starter = indent = outdent = null; - condition = function(token, i) { - var _ref, _ref1; - return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref1 = token[0]) === 'CATCH' || _ref1 === 'FINALLY') && (starter === '->' || starter === '=>')); - }; - action = function(token, i) { - return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); - }; - return this.scanTokens(function(token, i, tokens) { - var j, tag, _i, _ref, _ref1; - tag = token[0]; - if (tag === 'TERMINATOR' && this.tag(i + 1) === 'THEN') { - tokens.splice(i, 1); - return 0; - } - if (tag === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { - tokens.splice.apply(tokens, [i, 0].concat(__slice.call(this.indentation()))); - return 2; - } - if (tag === 'CATCH') { - for (j = _i = 1; _i <= 2; j = ++_i) { - if (!((_ref = this.tag(i + j)) === 'OUTDENT' || _ref === 'TERMINATOR' || _ref === 'FINALLY')) { - continue; - } - tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); - return 2 + j; - } - } - if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { - starter = tag; - _ref1 = this.indentation(true), indent = _ref1[0], outdent = _ref1[1]; - if (starter === 'THEN') { - indent.fromThen = true; - } - tokens.splice(i + 1, 0, indent); - this.detectEnd(i + 2, condition, action); - if (tag === 'THEN') { - tokens.splice(i, 1); - } - return 1; - } - return 1; - }); - }; - - Rewriter.prototype.tagPostfixConditionals = function() { - var action, condition, original; - original = null; - condition = function(token, i) { - var prevTag, tag; - tag = token[0]; - prevTag = this.tokens[i - 1][0]; - return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0); - }; - action = function(token, i) { - if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { - return original[0] = 'POST_' + original[0]; - } - }; - return this.scanTokens(function(token, i) { - if (token[0] !== 'IF') { - return 1; - } - original = token; - this.detectEnd(i + 1, condition, action); - return 1; - }); - }; - - Rewriter.prototype.indentation = function(implicit) { - var indent, outdent; - if (implicit == null) { - implicit = false; - } - indent = ['INDENT', 2]; - outdent = ['OUTDENT', 2]; - if (implicit) { - indent.generated = outdent.generated = true; - } - if (!implicit) { - indent.explicit = outdent.explicit = true; - } - return [indent, outdent]; - }; - - Rewriter.prototype.generate = generate; - - Rewriter.prototype.tag = function(i) { - var _ref; - return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; - }; - - return Rewriter; - - })(); - - BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; - - exports.INVERSES = INVERSES = {}; - - EXPRESSION_START = []; - - EXPRESSION_END = []; - - for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) { - _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1]; - EXPRESSION_START.push(INVERSES[rite] = left); - EXPRESSION_END.push(INVERSES[left] = rite); - } - - EXPRESSION_CLOSE = ['CATCH', 'WHEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); - - IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; - - IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++']; - - IMPLICIT_UNSPACED_CALL = ['+', '-']; - - IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; - - SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; - - SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; - - LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/scope.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/scope.js deleted file mode 100644 index a09ba970..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/scope.js +++ /dev/null @@ -1,146 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var Scope, extend, last, _ref; - - _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; - - exports.Scope = Scope = (function() { - Scope.root = null; - - function Scope(parent, expressions, method) { - this.parent = parent; - this.expressions = expressions; - this.method = method; - this.variables = [ - { - name: 'arguments', - type: 'arguments' - } - ]; - this.positions = {}; - if (!this.parent) { - Scope.root = this; - } - } - - Scope.prototype.add = function(name, type, immediate) { - if (this.shared && !immediate) { - return this.parent.add(name, type, immediate); - } - if (Object.prototype.hasOwnProperty.call(this.positions, name)) { - return this.variables[this.positions[name]].type = type; - } else { - return this.positions[name] = this.variables.push({ - name: name, - type: type - }) - 1; - } - }; - - Scope.prototype.namedMethod = function() { - var _ref1; - if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) { - return this.method; - } - return this.parent.namedMethod(); - }; - - Scope.prototype.find = function(name) { - if (this.check(name)) { - return true; - } - this.add(name, 'var'); - return false; - }; - - Scope.prototype.parameter = function(name) { - if (this.shared && this.parent.check(name, true)) { - return; - } - return this.add(name, 'param'); - }; - - Scope.prototype.check = function(name) { - var _ref1; - return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0)); - }; - - Scope.prototype.temporary = function(name, index) { - if (name.length > 1) { - return '_' + name + (index > 1 ? index - 1 : ''); - } else { - return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a'); - } - }; - - Scope.prototype.type = function(name) { - var v, _i, _len, _ref1; - _ref1 = this.variables; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.name === name) { - return v.type; - } - } - return null; - }; - - Scope.prototype.freeVariable = function(name, reserve) { - var index, temp; - if (reserve == null) { - reserve = true; - } - index = 0; - while (this.check((temp = this.temporary(name, index)))) { - index++; - } - if (reserve) { - this.add(temp, 'var', true); - } - return temp; - }; - - Scope.prototype.assign = function(name, value) { - this.add(name, { - value: value, - assigned: true - }, true); - return this.hasAssignments = true; - }; - - Scope.prototype.hasDeclarations = function() { - return !!this.declaredVariables().length; - }; - - Scope.prototype.declaredVariables = function() { - var realVars, tempVars, v, _i, _len, _ref1; - realVars = []; - tempVars = []; - _ref1 = this.variables; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.type === 'var') { - (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name); - } - } - return realVars.sort().concat(tempVars.sort()); - }; - - Scope.prototype.assignedVariables = function() { - var v, _i, _len, _ref1, _results; - _ref1 = this.variables; - _results = []; - for (_i = 0, _len = _ref1.length; _i < _len; _i++) { - v = _ref1[_i]; - if (v.type.assigned) { - _results.push("" + v.name + " = " + v.type.value); - } - } - return _results; - }; - - return Scope; - - })(); - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/sourcemap.js b/node_modules/karma/node_modules/coffee-script/lib/coffee-script/sourcemap.js deleted file mode 100644 index 4bb6f258..00000000 --- a/node_modules/karma/node_modules/coffee-script/lib/coffee-script/sourcemap.js +++ /dev/null @@ -1,161 +0,0 @@ -// Generated by CoffeeScript 1.6.3 -(function() { - var LineMap, SourceMap; - - LineMap = (function() { - function LineMap(line) { - this.line = line; - this.columns = []; - } - - LineMap.prototype.add = function(column, _arg, options) { - var sourceColumn, sourceLine; - sourceLine = _arg[0], sourceColumn = _arg[1]; - if (options == null) { - options = {}; - } - if (this.columns[column] && options.noReplace) { - return; - } - return this.columns[column] = { - line: this.line, - column: column, - sourceLine: sourceLine, - sourceColumn: sourceColumn - }; - }; - - LineMap.prototype.sourceLocation = function(column) { - var mapping; - while (!((mapping = this.columns[column]) || (column <= 0))) { - column--; - } - return mapping && [mapping.sourceLine, mapping.sourceColumn]; - }; - - return LineMap; - - })(); - - SourceMap = (function() { - var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK; - - function SourceMap() { - this.lines = []; - } - - SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) { - var column, line, lineMap, _base; - if (options == null) { - options = {}; - } - line = generatedLocation[0], column = generatedLocation[1]; - lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line))); - return lineMap.add(column, sourceLocation, options); - }; - - SourceMap.prototype.sourceLocation = function(_arg) { - var column, line, lineMap; - line = _arg[0], column = _arg[1]; - while (!((lineMap = this.lines[line]) || (line <= 0))) { - line--; - } - return lineMap && lineMap.sourceLocation(column); - }; - - SourceMap.prototype.generate = function(options, code) { - var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1; - if (options == null) { - options = {}; - } - if (code == null) { - code = null; - } - writingline = 0; - lastColumn = 0; - lastSourceLine = 0; - lastSourceColumn = 0; - needComma = false; - buffer = ""; - _ref = this.lines; - for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { - lineMap = _ref[lineNumber]; - if (lineMap) { - _ref1 = lineMap.columns; - for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { - mapping = _ref1[_j]; - if (!(mapping)) { - continue; - } - while (writingline < mapping.line) { - lastColumn = 0; - needComma = false; - buffer += ";"; - writingline++; - } - if (needComma) { - buffer += ","; - needComma = false; - } - buffer += this.encodeVlq(mapping.column - lastColumn); - lastColumn = mapping.column; - buffer += this.encodeVlq(0); - buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine); - lastSourceLine = mapping.sourceLine; - buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn); - lastSourceColumn = mapping.sourceColumn; - needComma = true; - } - } - } - v3 = { - version: 3, - file: options.generatedFile || '', - sourceRoot: options.sourceRoot || '', - sources: options.sourceFiles || [''], - names: [], - mappings: buffer - }; - if (options.inline) { - v3.sourcesContent = [code]; - } - return JSON.stringify(v3, null, 2); - }; - - VLQ_SHIFT = 5; - - VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; - - VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; - - SourceMap.prototype.encodeVlq = function(value) { - var answer, nextChunk, signBit, valueToEncode; - answer = ''; - signBit = value < 0 ? 1 : 0; - valueToEncode = (Math.abs(value) << 1) + signBit; - while (valueToEncode || !answer) { - nextChunk = valueToEncode & VLQ_VALUE_MASK; - valueToEncode = valueToEncode >> VLQ_SHIFT; - if (valueToEncode) { - nextChunk |= VLQ_CONTINUATION_BIT; - } - answer += this.encodeBase64(nextChunk); - } - return answer; - }; - - BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; - - SourceMap.prototype.encodeBase64 = function(value) { - return BASE64_CHARS[value] || (function() { - throw new Error("Cannot Base64 encode value: " + value); - })(); - }; - - return SourceMap; - - })(); - - module.exports = SourceMap; - -}).call(this); diff --git a/node_modules/karma/node_modules/coffee-script/package.json b/node_modules/karma/node_modules/coffee-script/package.json deleted file mode 100644 index 490422e1..00000000 --- a/node_modules/karma/node_modules/coffee-script/package.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "coffee-script", - "description": "Unfancy JavaScript", - "keywords": [ - "javascript", - "language", - "coffeescript", - "compiler" - ], - "author": { - "name": "Jeremy Ashkenas" - }, - "version": "1.6.3", - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/jashkenas/coffee-script/master/LICENSE" - } - ], - "engines": { - "node": ">=0.8.0" - }, - "directories": { - "lib": "./lib/coffee-script" - }, - "main": "./lib/coffee-script/coffee-script", - "bin": { - "coffee": "./bin/coffee", - "cake": "./bin/cake" - }, - "scripts": { - "test": "node ./bin/cake test" - }, - "homepage": "http://coffeescript.org", - "bugs": { - "url": "https://github.com/jashkenas/coffee-script/issues" - }, - "repository": { - "type": "git", - "url": "git://github.com/jashkenas/coffee-script.git" - }, - "devDependencies": { - "uglify-js": "~2.2", - "jison": ">=0.2.0" - }, - "readme": "\n {\n } } {\n { { } }\n } }{ {\n { }{ } } _____ __ __\n ( }{ }{ { ) / ____| / _|/ _|\n .- { { } { }} -. | | ___ | |_| |_ ___ ___\n ( ( } { } { } } ) | | / _ \\| _| _/ _ \\/ _ \\\n |`-..________ ..-'| | |___| (_) | | | || __/ __/\n | | \\_____\\___/|_| |_| \\___|\\___|\n | ;--.\n | (__ \\ _____ _ _\n | | ) ) / ____| (_) | |\n | |/ / | (___ ___ _ __ _ _ __ | |_\n | ( / \\___ \\ / __| '__| | '_ \\| __|\n | |/ ____) | (__| | | | |_) | |_\n | | |_____/ \\___|_| |_| .__/ \\__|\n `-.._________..-' | |\n |_|\n\n\n CoffeeScript is a little language that compiles into JavaScript.\n\n Install Node.js, and then the CoffeeScript compiler:\n sudo bin/cake install\n\n Or, if you have the Node Package Manager installed:\n npm install -g coffee-script\n (Leave off the -g if you don't wish to install globally.)\n\n Execute a script:\n coffee /path/to/script.coffee\n\n Compile a script:\n coffee -c /path/to/script.coffee\n\n For documentation, usage, and examples, see:\n http://coffeescript.org/\n\n To suggest a feature, report a bug, or general discussion:\n http://github.com/jashkenas/coffee-script/issues/\n\n If you'd like to chat, drop by #coffeescript on Freenode IRC,\n or on webchat.freenode.net.\n\n The source repository:\n git://github.com/jashkenas/coffee-script.git\n\n All contributors are listed here:\n http://github.com/jashkenas/coffee-script/contributors\n", - "readmeFilename": "README", - "_id": "coffee-script@1.6.3", - "_from": "coffee-script@~1.6" -} diff --git a/node_modules/karma/node_modules/colors/MIT-LICENSE.txt b/node_modules/karma/node_modules/colors/MIT-LICENSE.txt deleted file mode 100644 index 7dca1070..00000000 --- a/node_modules/karma/node_modules/colors/MIT-LICENSE.txt +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2010 - -Marak Squires -Alexis Sellier (cloudhead) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/colors/ReadMe.md b/node_modules/karma/node_modules/colors/ReadMe.md deleted file mode 100644 index 1c6b0d07..00000000 --- a/node_modules/karma/node_modules/colors/ReadMe.md +++ /dev/null @@ -1,77 +0,0 @@ -# colors.js - get color and style in your node.js console ( and browser ) like what - - - - -## Installation - - npm install colors - -## colors and styles! - -- bold -- italic -- underline -- inverse -- yellow -- cyan -- white -- magenta -- green -- red -- grey -- blue -- rainbow -- zebra -- random - -## Usage - -``` js -var colors = require('./colors'); - -console.log('hello'.green); // outputs green text -console.log('i like cake and pies'.underline.red) // outputs red underlined text -console.log('inverse the color'.inverse); // inverses the color -console.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces) -``` - -# Creating Custom themes - -```js - -var require('colors'); - -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); -``` - - -### Contributors - -Marak (Marak Squires) -Alexis Sellier (cloudhead) -mmalecki (Maciej Małecki) -nicoreed (Nico Reed) -morganrallen (Morgan Allen) -JustinCampbell (Justin Campbell) -ded (Dustin Diaz) - - -#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded) diff --git a/node_modules/karma/node_modules/colors/colors.js b/node_modules/karma/node_modules/colors/colors.js deleted file mode 100644 index a7198f15..00000000 --- a/node_modules/karma/node_modules/colors/colors.js +++ /dev/null @@ -1,269 +0,0 @@ -/* -colors.js - -Copyright (c) 2010 - -Marak Squires -Alexis Sellier (cloudhead) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -var isHeadless = false; - -if (typeof module !== 'undefined') { - isHeadless = true; -} - -if (!isHeadless) { - var exports = {}; - var module = {}; - var colors = exports; - exports.mode = "browser"; -} else { - exports.mode = "console"; -} - -// -// Prototypes the string object to have additional method calls that add terminal colors -// -var addProperty = function (color, func) { - var allowOverride = ['bold']; - exports[color] = function(str) { - return func.apply(str); - }; - String.prototype.__defineGetter__(color, func); -} - -// -// Iterate through all default styles and colors -// - -var x = ['bold', 'underline', 'italic', 'inverse', 'grey', 'black', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; -x.forEach(function (style) { - - // __defineGetter__ at the least works in more browsers - // http://robertnyman.com/javascript/javascript-getters-setters.html - // Object.defineProperty only works in Chrome - addProperty(style, function () { - return stylize(this, style); - }); -}); - -function sequencer(map) { - return function () { - if (!isHeadless) { - return this.replace(/( )/, '$1'); - } - var exploded = this.split(""); - var i = 0; - exploded = exploded.map(map); - return exploded.join(""); - } -} - -var rainbowMap = (function () { - var rainbowColors = ['red','yellow','green','blue','magenta']; //RoY G BiV - return function (letter, i, exploded) { - if (letter == " ") { - return letter; - } else { - return stylize(letter, rainbowColors[i++ % rainbowColors.length]); - } - } -})(); - -exports.addSequencer = function (name, map) { - addProperty(name, sequencer(map)); -} - -exports.addSequencer('rainbow', rainbowMap); -exports.addSequencer('zebra', function (letter, i, exploded) { - return i % 2 === 0 ? letter : letter.inverse; -}); - -exports.setTheme = function (theme) { - Object.keys(theme).forEach(function(prop){ - addProperty(prop, function(){ - return exports[theme[prop]](this); - }); - }); -} - -function stylize(str, style) { - - if (exports.mode == 'console') { - var styles = { - //styles - 'bold' : ['\033[1m', '\033[22m'], - 'italic' : ['\033[3m', '\033[23m'], - 'underline' : ['\033[4m', '\033[24m'], - 'inverse' : ['\033[7m', '\033[27m'], - //grayscale - 'white' : ['\033[37m', '\033[39m'], - 'grey' : ['\033[90m', '\033[39m'], - 'black' : ['\033[30m', '\033[39m'], - //colors - 'blue' : ['\033[34m', '\033[39m'], - 'cyan' : ['\033[36m', '\033[39m'], - 'green' : ['\033[32m', '\033[39m'], - 'magenta' : ['\033[35m', '\033[39m'], - 'red' : ['\033[31m', '\033[39m'], - 'yellow' : ['\033[33m', '\033[39m'] - }; - } else if (exports.mode == 'browser') { - var styles = { - //styles - 'bold' : ['', ''], - 'italic' : ['', ''], - 'underline' : ['', ''], - 'inverse' : ['', ''], - //grayscale - 'white' : ['', ''], - 'grey' : ['', ''], - 'black' : ['', ''], - //colors - 'blue' : ['', ''], - 'cyan' : ['', ''], - 'green' : ['', ''], - 'magenta' : ['', ''], - 'red' : ['', ''], - 'yellow' : ['', ''] - }; - } else if (exports.mode == 'none') { - return str; - } else { - console.log('unsupported mode, try "browser", "console" or "none"'); - } - return styles[style][0] + str + styles[style][1]; -}; - -// don't summon zalgo -addProperty('zalgo', function () { - return zalgo(this); -}); - -// please no -function zalgo(text, options) { - var soul = { - "up" : [ - '̍','̎','̄','̅', - '̿','̑','̆','̐', - '͒','͗','͑','̇', - '̈','̊','͂','̓', - '̈','͊','͋','͌', - '̃','̂','̌','͐', - '̀','́','̋','̏', - '̒','̓','̔','̽', - '̉','ͣ','ͤ','ͥ', - 'ͦ','ͧ','ͨ','ͩ', - 'ͪ','ͫ','ͬ','ͭ', - 'ͮ','ͯ','̾','͛', - '͆','̚' - ], - "down" : [ - '̖','̗','̘','̙', - '̜','̝','̞','̟', - '̠','̤','̥','̦', - '̩','̪','̫','̬', - '̭','̮','̯','̰', - '̱','̲','̳','̹', - '̺','̻','̼','ͅ', - '͇','͈','͉','͍', - '͎','͓','͔','͕', - '͖','͙','͚','̣' - ], - "mid" : [ - '̕','̛','̀','́', - '͘','̡','̢','̧', - '̨','̴','̵','̶', - '͜','͝','͞', - '͟','͠','͢','̸', - '̷','͡',' ҉' - ] - }, - all = [].concat(soul.up, soul.down, soul.mid), - zalgo = {}; - - function randomNumber(range) { - r = Math.floor(Math.random()*range); - return r; - }; - - function is_char(character) { - var bool = false; - all.filter(function(i){ - bool = (i == character); - }); - return bool; - } - - function heComes(text, options){ - result = ''; - options = options || {}; - options["up"] = options["up"] || true; - options["mid"] = options["mid"] || true; - options["down"] = options["down"] || true; - options["size"] = options["size"] || "maxi"; - var counts; - text = text.split(''); - for(var l in text){ - if(is_char(l)) { continue; } - result = result + text[l]; - - counts = {"up" : 0, "down" : 0, "mid" : 0}; - - switch(options.size) { - case 'mini': - counts.up = randomNumber(8); - counts.min= randomNumber(2); - counts.down = randomNumber(8); - break; - case 'maxi': - counts.up = randomNumber(16) + 3; - counts.min = randomNumber(4) + 1; - counts.down = randomNumber(64) + 3; - break; - default: - counts.up = randomNumber(8) + 1; - counts.mid = randomNumber(6) / 2; - counts.down= randomNumber(8) + 1; - break; - } - - var arr = ["up", "mid", "down"]; - for(var d in arr){ - var index = arr[d]; - for (var i = 0 ; i <= counts[index]; i++) - { - if(options[index]) { - result = result + soul[index][randomNumber(soul[index].length)]; - } - } - } - } - return result; - }; - return heComes(text); -} - -addProperty('stripColors', function() { - return ("" + this).replace(/\u001b\[\d+m/g,''); -}); diff --git a/node_modules/karma/node_modules/colors/example.html b/node_modules/karma/node_modules/colors/example.html deleted file mode 100644 index ab956494..00000000 --- a/node_modules/karma/node_modules/colors/example.html +++ /dev/null @@ -1,74 +0,0 @@ - - - - - Colors Example - - - - - - \ No newline at end of file diff --git a/node_modules/karma/node_modules/colors/example.js b/node_modules/karma/node_modules/colors/example.js deleted file mode 100644 index 3da29864..00000000 --- a/node_modules/karma/node_modules/colors/example.js +++ /dev/null @@ -1,65 +0,0 @@ -var colors = require('./colors'); - -//colors.mode = "browser"; - -var test = colors.red("hopefully colorless output"); -console.log('Rainbows are fun!'.rainbow); -console.log('So '.italic + 'are'.underline + ' styles! '.bold + 'inverse'.inverse); // styles not widely supported -console.log('Chains are also cool.'.bold.italic.underline.red); // styles not widely supported -//console.log('zalgo time!'.zalgo); -console.log(test.stripColors); -console.log("a".grey + " b".black); - -console.log("Zebras are so fun!".zebra); - -console.log(colors.rainbow('Rainbows are fun!')); -console.log(colors.italic('So ') + colors.underline('are') + colors.bold(' styles! ') + colors.inverse('inverse')); // styles not widely supported -console.log(colors.bold(colors.italic(colors.underline(colors.red('Chains are also cool.'))))); // styles not widely supported -//console.log(colors.zalgo('zalgo time!')); -console.log(colors.stripColors(test)); -console.log(colors.grey("a") + colors.black(" b")); - -colors.addSequencer("america", function(letter, i, exploded) { - if(letter === " ") return letter; - switch(i%3) { - case 0: return letter.red; - case 1: return letter.white; - case 2: return letter.blue; - } -}); - -colors.addSequencer("random", (function() { - var available = ['bold', 'underline', 'italic', 'inverse', 'grey', 'yellow', 'red', 'green', 'blue', 'white', 'cyan', 'magenta']; - - return function(letter, i, exploded) { - return letter === " " ? letter : letter[available[Math.round(Math.random() * (available.length - 1))]]; - }; -})()); - -console.log("AMERICA! F--K YEAH!".america); -console.log("So apparently I've been to Mars, with all the little green men. But you know, I don't recall.".random); - -// -// Custom themes -// - -colors.setTheme({ - silly: 'rainbow', - input: 'grey', - verbose: 'cyan', - prompt: 'grey', - info: 'green', - data: 'grey', - help: 'cyan', - warn: 'yellow', - debug: 'blue', - error: 'red' -}); - -// outputs red text -console.log("this is an error".error); - -// outputs yellow text -console.log("this is a warning".warn); - - diff --git a/node_modules/karma/node_modules/colors/package.json b/node_modules/karma/node_modules/colors/package.json deleted file mode 100644 index 9d9bed1c..00000000 --- a/node_modules/karma/node_modules/colors/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "colors", - "description": "get colors in your node.js console like what", - "version": "0.6.0-1", - "author": { - "name": "Marak Squires" - }, - "repository": { - "type": "git", - "url": "http://github.com/Marak/colors.js.git" - }, - "engines": { - "node": ">=0.1.90" - }, - "main": "colors", - "readme": "# colors.js - get color and style in your node.js console ( and browser ) like what\n\n\n\n\n## Installation\n\n npm install colors\n\n## colors and styles!\n\n- bold\n- italic\n- underline\n- inverse\n- yellow\n- cyan\n- white\n- magenta\n- green\n- red\n- grey\n- blue\n- rainbow\n- zebra\n- random\n\n## Usage\n\n``` js\nvar colors = require('./colors');\n\nconsole.log('hello'.green); // outputs green text\nconsole.log('i like cake and pies'.underline.red) // outputs red underlined text\nconsole.log('inverse the color'.inverse); // inverses the color\nconsole.log('OMG Rainbows!'.rainbow); // rainbow (ignores spaces)\n```\n\n# Creating Custom themes\n\n```js\n\nvar require('colors');\n\ncolors.setTheme({\n silly: 'rainbow',\n input: 'grey',\n verbose: 'cyan',\n prompt: 'grey',\n info: 'green',\n data: 'grey',\n help: 'cyan',\n warn: 'yellow',\n debug: 'blue',\n error: 'red'\n});\n\n// outputs red text\nconsole.log(\"this is an error\".error);\n\n// outputs yellow text\nconsole.log(\"this is a warning\".warn);\n```\n\n\n### Contributors \n\nMarak (Marak Squires)\nAlexis Sellier (cloudhead)\nmmalecki (Maciej Małecki)\nnicoreed (Nico Reed)\nmorganrallen (Morgan Allen)\nJustinCampbell (Justin Campbell)\nded (Dustin Diaz)\n\n\n#### , Marak Squires , Justin Campbell, Dustin Diaz (@ded)\n", - "readmeFilename": "ReadMe.md", - "bugs": { - "url": "https://github.com/Marak/colors.js/issues" - }, - "homepage": "https://github.com/Marak/colors.js", - "_id": "colors@0.6.0-1", - "_from": "colors@0.6.0-1" -} diff --git a/node_modules/karma/node_modules/colors/test.js b/node_modules/karma/node_modules/colors/test.js deleted file mode 100644 index 1c03d658..00000000 --- a/node_modules/karma/node_modules/colors/test.js +++ /dev/null @@ -1,65 +0,0 @@ -var assert = require('assert'), - colors = require('./colors'); - -// -// This is a pretty nice example on how tests shouldn't be written. However, -// it's more about API stability than about really testing it (although it's -// a pretty complete test suite). -// - -var s = 'string'; - -function a(s, code) { - return '\033[' + code.toString() + 'm' + s + '\033[39m'; -} - -function aE(s, color, code) { - assert.equal(s[color], a(s, code)); - assert.equal(colors[color](s), a(s, code)); - assert.equal(s[color], colors[color](s)); - assert.equal(s[color].stripColors, s); - assert.equal(s[color].stripColors, colors.stripColors(s)); -} - -function h(s, color) { - return '' + s + ''; - // that's pretty dumb approach to testing it -} - -var stylesColors = ['white', 'grey', 'black', 'blue', 'cyan', 'green', 'magenta', 'red', 'yellow']; -var stylesAll = stylesColors.concat(['bold', 'italic', 'underline', 'inverse', 'rainbow']); - -colors.mode = 'console'; -assert.equal(s.bold, '\033[1m' + s + '\033[22m'); -assert.equal(s.italic, '\033[3m' + s + '\033[23m'); -assert.equal(s.underline, '\033[4m' + s + '\033[24m'); -assert.equal(s.inverse, '\033[7m' + s + '\033[27m'); -assert.ok(s.rainbow); -aE(s, 'white', 37); -aE(s, 'grey', 90); -aE(s, 'black', 30); -aE(s, 'blue', 34); -aE(s, 'cyan', 36); -aE(s, 'green', 32); -aE(s, 'magenta', 35); -aE(s, 'red', 31); -aE(s, 'yellow', 33); -assert.equal(s, 'string'); - -colors.mode = 'browser'; -assert.equal(s.bold, '' + s + ''); -assert.equal(s.italic, '' + s + ''); -assert.equal(s.underline, '' + s + ''); -assert.equal(s.inverse, '' + s + ''); -assert.ok(s.rainbow); -stylesColors.forEach(function (color) { - assert.equal(s[color], h(s, color)); - assert.equal(colors[color](s), h(s, color)); -}); - -colors.mode = 'none'; -stylesAll.forEach(function (style) { - assert.equal(s[style], s); - assert.equal(colors[style](s), s); -}); - diff --git a/node_modules/karma/node_modules/connect/.npmignore b/node_modules/karma/node_modules/connect/.npmignore deleted file mode 100644 index 9046dde5..00000000 --- a/node_modules/karma/node_modules/connect/.npmignore +++ /dev/null @@ -1,12 +0,0 @@ -*.markdown -*.md -.git* -Makefile -benchmarks/ -docs/ -examples/ -install.sh -support/ -test/ -.DS_Store -coverage.html diff --git a/node_modules/karma/node_modules/connect/.travis.yml b/node_modules/karma/node_modules/connect/.travis.yml deleted file mode 100644 index a12e3f0f..00000000 --- a/node_modules/karma/node_modules/connect/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/LICENSE b/node_modules/karma/node_modules/connect/LICENSE deleted file mode 100644 index 0c5d22d9..00000000 --- a/node_modules/karma/node_modules/connect/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -(The MIT License) - -Copyright (c) 2010 Sencha Inc. -Copyright (c) 2011 LearnBoost -Copyright (c) 2011 TJ Holowaychuk - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/Readme.md b/node_modules/karma/node_modules/connect/Readme.md deleted file mode 100644 index 7d65f9c1..00000000 --- a/node_modules/karma/node_modules/connect/Readme.md +++ /dev/null @@ -1,133 +0,0 @@ -[![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect) -# Connect - - Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance "plugins" known as _middleware_. - - Connect is bundled with over _20_ commonly used middleware, including - a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/). - -```js -var connect = require('connect') - , http = require('http'); - -var app = connect() - .use(connect.favicon()) - .use(connect.logger('dev')) - .use(connect.static('public')) - .use(connect.directory('public')) - .use(connect.cookieParser()) - .use(connect.session({ secret: 'my secret here' })) - .use(function(req, res){ - res.end('Hello from Connect!\n'); - }); - -http.createServer(app).listen(3000); -``` - -## Middleware - - - [csrf](http://www.senchalabs.org/connect/csrf.html) - - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html) - - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html) - - [json](http://www.senchalabs.org/connect/json.html) - - [multipart](http://www.senchalabs.org/connect/multipart.html) - - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html) - - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html) - - [directory](http://www.senchalabs.org/connect/directory.html) - - [compress](http://www.senchalabs.org/connect/compress.html) - - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html) - - [favicon](http://www.senchalabs.org/connect/favicon.html) - - [limit](http://www.senchalabs.org/connect/limit.html) - - [logger](http://www.senchalabs.org/connect/logger.html) - - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html) - - [query](http://www.senchalabs.org/connect/query.html) - - [responseTime](http://www.senchalabs.org/connect/responseTime.html) - - [session](http://www.senchalabs.org/connect/session.html) - - [static](http://www.senchalabs.org/connect/static.html) - - [staticCache](http://www.senchalabs.org/connect/staticCache.html) - - [vhost](http://www.senchalabs.org/connect/vhost.html) - - [subdomains](http://www.senchalabs.org/connect/subdomains.html) - - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html) - -## Running Tests - -first: - - $ npm install -d - -then: - - $ make test - -## Authors - - Below is the output from [git-summary](http://github.com/visionmedia/git-extras). - - - project: connect - commits: 2033 - active : 301 days - files : 171 - authors: - 1414 Tj Holowaychuk 69.6% - 298 visionmedia 14.7% - 191 Tim Caswell 9.4% - 51 TJ Holowaychuk 2.5% - 10 Ryan Olds 0.5% - 8 Astro 0.4% - 5 Nathan Rajlich 0.2% - 5 Jakub Nešetřil 0.2% - 3 Daniel Dickison 0.1% - 3 David Rio Deiros 0.1% - 3 Alexander Simmerl 0.1% - 3 Andreas Lind Petersen 0.1% - 2 Aaron Heckmann 0.1% - 2 Jacques Crocker 0.1% - 2 Fabian Jakobs 0.1% - 2 Brian J Brennan 0.1% - 2 Adam Malcontenti-Wilson 0.1% - 2 Glen Mailer 0.1% - 2 James Campos 0.1% - 1 Trent Mick 0.0% - 1 Troy Kruthoff 0.0% - 1 Wei Zhu 0.0% - 1 comerc 0.0% - 1 darobin 0.0% - 1 nateps 0.0% - 1 Marco Sanson 0.0% - 1 Arthur Taylor 0.0% - 1 Aseem Kishore 0.0% - 1 Bart Teeuwisse 0.0% - 1 Cameron Howey 0.0% - 1 Chad Weider 0.0% - 1 Craig Barnes 0.0% - 1 Eran Hammer-Lahav 0.0% - 1 Gregory McWhirter 0.0% - 1 Guillermo Rauch 0.0% - 1 Jae Kwon 0.0% - 1 Jakub Nesetril 0.0% - 1 Joshua Peek 0.0% - 1 Jxck 0.0% - 1 AJ ONeal 0.0% - 1 Michael Hemesath 0.0% - 1 Morten Siebuhr 0.0% - 1 Samori Gorse 0.0% - 1 Tom Jensen 0.0% - -## Node Compatibility - - Connect `< 1.x` is compatible with node 0.2.x - - - Connect `1.x` is compatible with node 0.4.x - - - Connect (_master_) `2.x` is compatible with node 0.6.x - -## CLA - - [http://sencha.com/cla](http://sencha.com/cla) - -## License - -View the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/). diff --git a/node_modules/karma/node_modules/connect/index.js b/node_modules/karma/node_modules/connect/index.js deleted file mode 100644 index 23240eed..00000000 --- a/node_modules/karma/node_modules/connect/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = process.env.CONNECT_COV - ? require('./lib-cov/connect') - : require('./lib/connect'); \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/lib/cache.js b/node_modules/karma/node_modules/connect/lib/cache.js deleted file mode 100644 index 052fcdb3..00000000 --- a/node_modules/karma/node_modules/connect/lib/cache.js +++ /dev/null @@ -1,81 +0,0 @@ - -/*! - * Connect - Cache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Expose `Cache`. - */ - -module.exports = Cache; - -/** - * LRU cache store. - * - * @param {Number} limit - * @api private - */ - -function Cache(limit) { - this.store = {}; - this.keys = []; - this.limit = limit; -} - -/** - * Touch `key`, promoting the object. - * - * @param {String} key - * @param {Number} i - * @api private - */ - -Cache.prototype.touch = function(key, i){ - this.keys.splice(i,1); - this.keys.push(key); -}; - -/** - * Remove `key`. - * - * @param {String} key - * @api private - */ - -Cache.prototype.remove = function(key){ - delete this.store[key]; -}; - -/** - * Get the object stored for `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.get = function(key){ - return this.store[key]; -}; - -/** - * Add a cache `key`. - * - * @param {String} key - * @return {Array} - * @api private - */ - -Cache.prototype.add = function(key){ - // initialize store - var len = this.keys.push(key); - - // limit reached, invalidate LRU - if (len > this.limit) this.remove(this.keys.shift()); - - var arr = this.store[key] = []; - arr.createdAt = new Date; - return arr; -}; diff --git a/node_modules/karma/node_modules/connect/lib/connect.js b/node_modules/karma/node_modules/connect/lib/connect.js deleted file mode 100644 index 72961dca..00000000 --- a/node_modules/karma/node_modules/connect/lib/connect.js +++ /dev/null @@ -1,92 +0,0 @@ -/*! - * Connect - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , proto = require('./proto') - , utils = require('./utils') - , path = require('path') - , basename = path.basename - , fs = require('fs'); - -// node patches - -require('./patch'); - -// expose createServer() as the module - -exports = module.exports = createServer; - -/** - * Framework version. - */ - -exports.version = '2.7.11'; - -/** - * Expose mime module. - */ - -exports.mime = require('./middleware/static').mime; - -/** - * Expose the prototype. - */ - -exports.proto = proto; - -/** - * Auto-load middleware getters. - */ - -exports.middleware = {}; - -/** - * Expose utilities. - */ - -exports.utils = utils; - -/** - * Create a new connect server. - * - * @return {Function} - * @api public - */ - -function createServer() { - function app(req, res, next){ app.handle(req, res, next); } - utils.merge(app, proto); - utils.merge(app, EventEmitter.prototype); - app.route = '/'; - app.stack = []; - for (var i = 0; i < arguments.length; ++i) { - app.use(arguments[i]); - } - return app; -}; - -/** - * Support old `.createServer()` method. - */ - -createServer.createServer = createServer; - -/** - * Auto-load bundled middleware with getters. - */ - -fs.readdirSync(__dirname + '/middleware').forEach(function(filename){ - if (!/\.js$/.test(filename)) return; - var name = basename(filename, '.js'); - function load(){ return require('./middleware/' + name); } - exports.middleware.__defineGetter__(name, load); - exports.__defineGetter__(name, load); -}); diff --git a/node_modules/karma/node_modules/connect/lib/index.js b/node_modules/karma/node_modules/connect/lib/index.js deleted file mode 100644 index 2618ddca..00000000 --- a/node_modules/karma/node_modules/connect/lib/index.js +++ /dev/null @@ -1,50 +0,0 @@ - -/** - * Connect is a middleware framework for node, - * shipping with over 18 bundled middleware and a rich selection of - * 3rd-party middleware. - * - * var app = connect() - * .use(connect.logger('dev')) - * .use(connect.static('public')) - * .use(function(req, res){ - * res.end('hello world\n'); - * }) - * .listen(3000); - * - * Installation: - * - * $ npm install connect - * - * Middleware: - * - * - [logger](logger.html) request logger with custom format support - * - [csrf](csrf.html) Cross-site request forgery protection - * - [compress](compress.html) Gzip compression middleware - * - [basicAuth](basicAuth.html) basic http authentication - * - [bodyParser](bodyParser.html) extensible request body parser - * - [json](json.html) application/json parser - * - [urlencoded](urlencoded.html) application/x-www-form-urlencoded parser - * - [multipart](multipart.html) multipart/form-data parser - * - [timeout](timeout.html) request timeouts - * - [cookieParser](cookieParser.html) cookie parser - * - [session](session.html) session management support with bundled MemoryStore - * - [cookieSession](cookieSession.html) cookie-based session support - * - [methodOverride](methodOverride.html) faux HTTP method support - * - [responseTime](responseTime.html) calculates response-time and exposes via X-Response-Time - * - [staticCache](staticCache.html) memory cache layer for the static() middleware - * - [static](static.html) streaming static file server supporting `Range` and more - * - [directory](directory.html) directory listing middleware - * - [vhost](vhost.html) virtual host sub-domain mapping middleware - * - [favicon](favicon.html) efficient favicon server (with default icon) - * - [limit](limit.html) limit the bytesize of request bodies - * - [query](query.html) automatic querystring parser, populating `req.query` - * - [errorHandler](errorHandler.html) flexible error handler - * - * Links: - * - * - list of [3rd-party](https://github.com/senchalabs/connect/wiki) middleware - * - GitHub [repository](http://github.com/senchalabs/connect) - * - [test documentation](https://github.com/senchalabs/connect/blob/gh-pages/tests.md) - * - */ \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/lib/middleware/basicAuth.js b/node_modules/karma/node_modules/connect/lib/middleware/basicAuth.js deleted file mode 100644 index bc7ec97a..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/basicAuth.js +++ /dev/null @@ -1,103 +0,0 @@ - -/*! - * Connect - basicAuth - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , unauthorized = utils.unauthorized; - -/** - * Basic Auth: - * - * Enfore basic authentication by providing a `callback(user, pass)`, - * which must return `true` in order to gain access. Alternatively an async - * method is provided as well, invoking `callback(user, pass, callback)`. Populates - * `req.user`. The final alternative is simply passing username / password - * strings. - * - * Simple username and password - * - * connect(connect.basicAuth('username', 'password')); - * - * Callback verification - * - * connect() - * .use(connect.basicAuth(function(user, pass){ - * return 'tj' == user & 'wahoo' == pass; - * })) - * - * Async callback verification, accepting `fn(err, user)`. - * - * connect() - * .use(connect.basicAuth(function(user, pass, fn){ - * User.authenticate({ user: user, pass: pass }, fn); - * })) - * - * @param {Function|String} callback or username - * @param {String} realm - * @api public - */ - -module.exports = function basicAuth(callback, realm) { - var username, password; - - // user / pass strings - if ('string' == typeof callback) { - username = callback; - password = realm; - if ('string' != typeof password) throw new Error('password argument required'); - realm = arguments[2]; - callback = function(user, pass){ - return user == username && pass == password; - } - } - - realm = realm || 'Authorization Required'; - - return function(req, res, next) { - var authorization = req.headers.authorization; - - if (req.user) return next(); - if (!authorization) return unauthorized(res, realm); - - var parts = authorization.split(' '); - - if (parts.length !== 2) return next(utils.error(400)); - - var scheme = parts[0] - , credentials = new Buffer(parts[1], 'base64').toString() - , index = credentials.indexOf(':'); - - if ('Basic' != scheme || index < 0) return next(utils.error(400)); - - var user = credentials.slice(0, index) - , pass = credentials.slice(index + 1); - - // async - if (callback.length >= 3) { - var pause = utils.pause(req); - callback(user, pass, function(err, user){ - if (err || !user) return unauthorized(res, realm); - req.user = req.remoteUser = user; - next(); - pause.resume(); - }); - // sync - } else { - if (callback(user, pass)) { - req.user = req.remoteUser = user; - next(); - } else { - unauthorized(res, realm); - } - } - } -}; - diff --git a/node_modules/karma/node_modules/connect/lib/middleware/bodyParser.js b/node_modules/karma/node_modules/connect/lib/middleware/bodyParser.js deleted file mode 100644 index 9f692cdc..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/bodyParser.js +++ /dev/null @@ -1,61 +0,0 @@ - -/*! - * Connect - bodyParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var multipart = require('./multipart') - , urlencoded = require('./urlencoded') - , json = require('./json'); - -/** - * Body parser: - * - * Parse request bodies, supports _application/json_, - * _application/x-www-form-urlencoded_, and _multipart/form-data_. - * - * This is equivalent to: - * - * app.use(connect.json()); - * app.use(connect.urlencoded()); - * app.use(connect.multipart()); - * - * Examples: - * - * connect() - * .use(connect.bodyParser()) - * .use(function(req, res) { - * res.end('viewing user ' + req.body.user.name); - * }); - * - * $ curl -d 'user[name]=tj' http://local/ - * $ curl -d '{"user":{"name":"tj"}}' -H "Content-Type: application/json" http://local/ - * - * View [json](json.html), [urlencoded](urlencoded.html), and [multipart](multipart.html) for more info. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function bodyParser(options){ - var _urlencoded = urlencoded(options) - , _multipart = multipart(options) - , _json = json(options); - - return function bodyParser(req, res, next) { - _json(req, res, function(err){ - if (err) return next(err); - _urlencoded(req, res, function(err){ - if (err) return next(err); - _multipart(req, res, next); - }); - }); - } -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/lib/middleware/compress.js b/node_modules/karma/node_modules/connect/lib/middleware/compress.js deleted file mode 100644 index 84028b33..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/compress.js +++ /dev/null @@ -1,189 +0,0 @@ -/*! - * Connect - compress - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var zlib = require('zlib'); -var utils = require('../utils'); - -/** - * Supported content-encoding methods. - */ - -exports.methods = { - gzip: zlib.createGzip - , deflate: zlib.createDeflate -}; - -/** - * Default filter function. - */ - -exports.filter = function(req, res){ - return /json|text|javascript|dart|image\/svg\+xml|application\/x-font-ttf|application\/vnd\.ms-opentype|application\/vnd\.ms-fontobject/.test(res.getHeader('Content-Type')); -}; - -/** - * Compress: - * - * Compress response data with gzip/deflate. - * - * Filter: - * - * A `filter` callback function may be passed to - * replace the default logic of: - * - * exports.filter = function(req, res){ - * return /json|text|javascript/.test(res.getHeader('Content-Type')); - * }; - * - * Threshold: - * - * Only compress the response if the byte size is at or above a threshold. - * Always compress while streaming. - * - * - `threshold` - string representation of size or bytes as an integer. - * - * Options: - * - * All remaining options are passed to the gzip/deflate - * creation functions. Consult node's docs for additional details. - * - * - `chunkSize` (default: 16*1024) - * - `windowBits` - * - `level`: 0-9 where 0 is no compression, and 9 is slow but best compression - * - `memLevel`: 1-9 low is slower but uses less memory, high is fast but uses more - * - `strategy`: compression strategy - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function compress(options) { - options = options || {}; - var names = Object.keys(exports.methods) - , filter = options.filter || exports.filter - , threshold; - - if (false === options.threshold || 0 === options.threshold) { - threshold = 0 - } else if ('string' === typeof options.threshold) { - threshold = utils.parseBytes(options.threshold) - } else { - threshold = options.threshold || 1024 - } - - return function compress(req, res, next){ - var accept = req.headers['accept-encoding'] - , vary = res.getHeader('Vary') - , write = res.write - , end = res.end - , compress = true - , stream - , method; - - // vary - if (!vary) { - res.setHeader('Vary', 'Accept-Encoding'); - } else if (!~vary.indexOf('Accept-Encoding')) { - res.setHeader('Vary', vary + ', Accept-Encoding'); - } - - // see #724 - req.on('close', function(){ - res.write = res.end = function(){}; - }); - - // proxy - - res.write = function(chunk, encoding){ - if (!this.headerSent) this._implicitHeader(); - return stream - ? stream.write(new Buffer(chunk, encoding)) - : write.call(res, chunk, encoding); - }; - - res.end = function(chunk, encoding){ - if (chunk) { - if (!this.headerSent && getSize(chunk) < threshold) compress = false; - this.write(chunk, encoding); - } else if (!this.headerSent) { - // response size === 0 - compress = false; - } - return stream - ? stream.end() - : end.call(res); - }; - - res.on('header', function(){ - if (!compress) return; - - var encoding = res.getHeader('Content-Encoding') || 'identity'; - - // already encoded - if ('identity' != encoding) return; - - // default request filter - if (!filter(req, res)) return; - - // SHOULD use identity - if (!accept) return; - - // head - if ('HEAD' == req.method) return; - - // default to gzip - if ('*' == accept.trim()) method = 'gzip'; - - // compression method - if (!method) { - for (var i = 0, len = names.length; i < len; ++i) { - if (~accept.indexOf(names[i])) { - method = names[i]; - break; - } - } - } - - // compression method - if (!method) return; - - // compression stream - stream = exports.methods[method](options); - - // header fields - res.setHeader('Content-Encoding', method); - res.removeHeader('Content-Length'); - - // compression - - stream.on('data', function(chunk){ - write.call(res, chunk); - }); - - stream.on('end', function(){ - end.call(res); - }); - - stream.on('drain', function() { - res.emit('drain'); - }); - }); - - next(); - }; -}; - -function getSize(chunk) { - return Buffer.isBuffer(chunk) - ? chunk.length - : Buffer.byteLength(chunk); -} diff --git a/node_modules/karma/node_modules/connect/lib/middleware/cookieParser.js b/node_modules/karma/node_modules/connect/lib/middleware/cookieParser.js deleted file mode 100644 index 5da23f25..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/cookieParser.js +++ /dev/null @@ -1,62 +0,0 @@ - -/*! - * Connect - cookieParser - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , cookie = require('cookie'); - -/** - * Cookie parser: - * - * Parse _Cookie_ header and populate `req.cookies` - * with an object keyed by the cookie names. Optionally - * you may enabled signed cookie support by passing - * a `secret` string, which assigns `req.secret` so - * it may be used by other middleware. - * - * Examples: - * - * connect() - * .use(connect.cookieParser('optional secret string')) - * .use(function(req, res, next){ - * res.end(JSON.stringify(req.cookies)); - * }) - * - * @param {String} secret - * @return {Function} - * @api public - */ - -module.exports = function cookieParser(secret){ - return function cookieParser(req, res, next) { - if (req.cookies) return next(); - var cookies = req.headers.cookie; - - req.secret = secret; - req.cookies = {}; - req.signedCookies = {}; - - if (cookies) { - try { - req.cookies = cookie.parse(cookies); - if (secret) { - req.signedCookies = utils.parseSignedCookies(req.cookies, secret); - req.signedCookies = utils.parseJSONCookies(req.signedCookies); - } - req.cookies = utils.parseJSONCookies(req.cookies); - } catch (err) { - err.status = 400; - return next(err); - } - } - next(); - }; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/cookieSession.js b/node_modules/karma/node_modules/connect/lib/middleware/cookieSession.js deleted file mode 100644 index 21011b82..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/cookieSession.js +++ /dev/null @@ -1,115 +0,0 @@ -/*! - * Connect - cookieSession - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('./../utils') - , Cookie = require('./session/cookie') - , debug = require('debug')('connect:cookieSession') - , signature = require('cookie-signature') - , crc32 = require('buffer-crc32'); - -/** - * Cookie Session: - * - * Cookie session middleware. - * - * var app = connect(); - * app.use(connect.cookieParser()); - * app.use(connect.cookieSession({ secret: 'tobo!', cookie: { maxAge: 60 * 60 * 1000 }})); - * - * Options: - * - * - `key` cookie name defaulting to `connect.sess` - * - `secret` prevents cookie tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Clearing sessions: - * - * To clear the session simply set its value to `null`, - * `cookieSession()` will then respond with a 1970 Set-Cookie. - * - * req.session = null; - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function cookieSession(options){ - // TODO: utilize Session/Cookie to unify API - options = options || {}; - var key = options.key || 'connect.sess' - , trustProxy = options.proxy; - - return function cookieSession(req, res, next) { - - // req.secret is for backwards compatibility - var secret = options.secret || req.secret; - if (!secret) throw new Error('`secret` option required for cookie sessions'); - - // default session - req.session = {}; - var cookie = req.session.cookie = new Cookie(options.cookie); - - // pathname mismatch - if (0 != req.originalUrl.indexOf(cookie.path)) return next(); - - // cookieParser secret - if (!options.secret && req.secret) { - req.session = req.signedCookies[key] || {}; - req.session.cookie = cookie; - } else { - // TODO: refactor - var rawCookie = req.cookies[key]; - if (rawCookie) { - var unsigned = utils.parseSignedCookie(rawCookie, secret); - if (unsigned) { - var originalHash = crc32.signed(unsigned); - req.session = utils.parseJSONCookie(unsigned) || {}; - req.session.cookie = cookie; - } - } - } - - res.on('header', function(){ - // removed - if (!req.session) { - debug('clear session'); - cookie.expires = new Date(0); - res.setHeader('Set-Cookie', cookie.serialize(key, '')); - return; - } - - delete req.session.cookie; - - // check security - var proto = (req.headers['x-forwarded-proto'] || '').toLowerCase() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto.split(/\s*,\s*/)[0]); - - // only send secure cookies via https - if (cookie.secure && !tls) return debug('not secured'); - - // serialize - debug('serializing %j', req.session); - var val = 'j:' + JSON.stringify(req.session); - - // compare hashes, no need to set-cookie if unchanged - if (originalHash == crc32.signed(val)) return debug('unmodified session'); - - // set-cookie - val = 's:' + signature.sign(val, secret); - val = cookie.serialize(key, val); - debug('set-cookie %j', cookie); - res.setHeader('Set-Cookie', val); - }); - - next(); - }; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/csrf.js b/node_modules/karma/node_modules/connect/lib/middleware/csrf.js deleted file mode 100644 index 2d49d16d..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/csrf.js +++ /dev/null @@ -1,163 +0,0 @@ -/*! - * Connect - csrf - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'); -var uid = require('uid2'); -var crypto = require('crypto'); - -/** - * Anti CSRF: - * - * CSRF protection middleware. - * - * This middleware adds a `req.csrfToken()` function to make a token - * which should be added to requests which mutate - * state, within a hidden form field, query-string etc. This - * token is validated against the visitor's session. - * - * The default `value` function checks `req.body` generated - * by the `bodyParser()` middleware, `req.query` generated - * by `query()`, and the "X-CSRF-Token" header field. - * - * This middleware requires session support, thus should be added - * somewhere _below_ `session()` and `cookieParser()`. - * - * Options: - * - * - `value` a function accepting the request, returning the token - * - * @param {Object} options - * @api public - */ - -module.exports = function csrf(options) { - options = options || {}; - var value = options.value || defaultValue; - - return function(req, res, next){ - - // already have one - var secret = req.session._csrfSecret; - if (secret) return createToken(secret); - - // generate secret - uid(24, function(err, secret){ - if (err) return next(err); - req.session._csrfSecret = secret; - createToken(secret); - }); - - // generate the token - function createToken(secret) { - var token; - - // lazy-load token - req.csrfToken = function csrfToken() { - return token || (token = saltedToken(secret)); - }; - - // compatibility with old middleware - Object.defineProperty(req.session, '_csrf', { - configurable: true, - get: function() { - console.warn('req.session._csrf is deprecated, use req.csrfToken([callback]) instead'); - return req.csrfToken(); - } - }); - - // ignore these methods - if ('GET' == req.method || 'HEAD' == req.method || 'OPTIONS' == req.method) return next(); - - // determine user-submitted value - var val = value(req); - - // check - if (!checkToken(val, secret)) return next(utils.error(403)); - - next(); - } - } -}; - -/** - * Default value function, checking the `req.body` - * and `req.query` for the CSRF token. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -function defaultValue(req) { - return (req.body && req.body._csrf) - || (req.query && req.query._csrf) - || (req.headers['x-csrf-token']) - || (req.headers['x-xsrf-token']); -} - -/** - * Return salted token. - * - * @param {String} secret - * @return {String} - * @api private - */ - -function saltedToken(secret) { - return createToken(generateSalt(10), secret); -} - -/** - * Creates a CSRF token from a given salt and secret. - * - * @param {String} salt (should be 10 characters) - * @param {String} secret - * @return {String} - * @api private - */ - -function createToken(salt, secret) { - return salt + crypto - .createHash('sha1') - .update(salt + secret) - .digest('base64'); -} - -/** - * Checks if a given CSRF token matches the given secret. - * - * @param {String} token - * @param {String} secret - * @return {Boolean} - * @api private - */ - -function checkToken(token, secret) { - if ('string' != typeof token) return false; - return token === createToken(token.slice(0, 10), secret); -} - -/** - * Generates a random salt, using a fast non-blocking PRNG (Math.random()). - * - * @param {Number} length - * @return {String} - * @api private - */ - -function generateSalt(length) { - var i, r = []; - for (i = 0; i < length; ++i) { - r.push(SALTCHARS[Math.floor(Math.random() * SALTCHARS.length)]); - } - return r.join(''); -} - -var SALTCHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/directory.js b/node_modules/karma/node_modules/connect/lib/middleware/directory.js deleted file mode 100644 index 1c925a7d..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/directory.js +++ /dev/null @@ -1,229 +0,0 @@ - -/*! - * Connect - directory - * Copyright(c) 2011 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -// TODO: icon / style for directories -// TODO: arrow key navigation -// TODO: make icons extensible - -/** - * Module dependencies. - */ - -var fs = require('fs') - , parse = require('url').parse - , utils = require('../utils') - , path = require('path') - , normalize = path.normalize - , extname = path.extname - , join = path.join; - -/*! - * Icon cache. - */ - -var cache = {}; - -/** - * Directory: - * - * Serve directory listings with the given `root` path. - * - * Options: - * - * - `hidden` display hidden (dot) files. Defaults to false. - * - `icons` display icons. Defaults to false. - * - `filter` Apply this filter function to files. Defaults to false. - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function directory(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('directory() root path required'); - var hidden = options.hidden - , icons = options.icons - , filter = options.filter - , root = normalize(root); - - return function directory(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - - var accept = req.headers.accept || 'text/plain' - , url = parse(req.url) - , dir = decodeURIComponent(url.pathname) - , path = normalize(join(root, dir)) - , originalUrl = parse(req.originalUrl) - , originalDir = decodeURIComponent(originalUrl.pathname) - , showUp = path != root && path != root + '/'; - - // null byte(s), bad request - if (~path.indexOf('\0')) return next(utils.error(400)); - - // malicious path, forbidden - if (0 != path.indexOf(root)) return next(utils.error(403)); - - // check if we have a directory - fs.stat(path, function(err, stat){ - if (err) return 'ENOENT' == err.code - ? next() - : next(err); - - if (!stat.isDirectory()) return next(); - - // fetch files - fs.readdir(path, function(err, files){ - if (err) return next(err); - if (!hidden) files = removeHidden(files); - if (filter) files = files.filter(filter); - files.sort(); - - // content-negotiation - for (var key in exports) { - if (~accept.indexOf(key) || ~accept.indexOf('*/*')) { - exports[key](req, res, files, next, originalDir, showUp, icons); - return; - } - } - - // not acceptable - next(utils.error(406)); - }); - }); - }; -}; - -/** - * Respond with text/html. - */ - -exports.html = function(req, res, files, next, dir, showUp, icons){ - fs.readFile(__dirname + '/../public/directory.html', 'utf8', function(err, str){ - if (err) return next(err); - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(err, style){ - if (err) return next(err); - if (showUp) files.unshift('..'); - str = str - .replace('{style}', style) - .replace('{files}', html(files, dir, icons)) - .replace('{directory}', dir) - .replace('{linked-path}', htmlPath(dir)); - res.setHeader('Content-Type', 'text/html'); - res.setHeader('Content-Length', str.length); - res.end(str); - }); - }); -}; - -/** - * Respond with application/json. - */ - -exports.json = function(req, res, files){ - files = JSON.stringify(files); - res.setHeader('Content-Type', 'application/json'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Respond with text/plain. - */ - -exports.plain = function(req, res, files){ - files = files.join('\n') + '\n'; - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', files.length); - res.end(files); -}; - -/** - * Map html `dir`, returning a linked path. - */ - -function htmlPath(dir) { - var curr = []; - return dir.split('/').map(function(part){ - curr.push(part); - return '' + part + ''; - }).join(' / '); -} - -/** - * Map html `files`, returning an html unordered list. - */ - -function html(files, dir, useIcons) { - return '
    ' + files.map(function(file){ - var icon = '' - , classes = []; - - if (useIcons && '..' != file) { - icon = icons[extname(file)] || icons.default; - icon = ''; - classes.push('icon'); - } - - return '
  • ' - + icon + file + '
  • '; - - }).join('\n') + '
'; -} - -/** - * Load and cache the given `icon`. - * - * @param {String} icon - * @return {String} - * @api private - */ - -function load(icon) { - if (cache[icon]) return cache[icon]; - return cache[icon] = fs.readFileSync(__dirname + '/../public/icons/' + icon, 'base64'); -} - -/** - * Filter "hidden" `files`, aka files - * beginning with a `.`. - * - * @param {Array} files - * @return {Array} - * @api private - */ - -function removeHidden(files) { - return files.filter(function(file){ - return '.' != file[0]; - }); -} - -/** - * Icon map. - */ - -var icons = { - '.js': 'page_white_code_red.png' - , '.c': 'page_white_c.png' - , '.h': 'page_white_h.png' - , '.cc': 'page_white_cplusplus.png' - , '.php': 'page_white_php.png' - , '.rb': 'page_white_ruby.png' - , '.cpp': 'page_white_cplusplus.png' - , '.swf': 'page_white_flash.png' - , '.pdf': 'page_white_acrobat.png' - , 'default': 'page_white.png' -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/errorHandler.js b/node_modules/karma/node_modules/connect/lib/middleware/errorHandler.js deleted file mode 100644 index 4a84edca..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/errorHandler.js +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Connect - errorHandler - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , fs = require('fs'); - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Error handler: - * - * Development error handler, providing stack traces - * and error message responses for requests accepting text, html, - * or json. - * - * Text: - * - * By default, and when _text/plain_ is accepted a simple stack trace - * or error message will be returned. - * - * JSON: - * - * When _application/json_ is accepted, connect will respond with - * an object in the form of `{ "error": error }`. - * - * HTML: - * - * When accepted connect will output a nice html stack trace. - * - * @return {Function} - * @api public - */ - -exports = module.exports = function errorHandler(){ - return function errorHandler(err, req, res, next){ - if (err.status) res.statusCode = err.status; - if (res.statusCode < 400) res.statusCode = 500; - if ('test' != env) console.error(err.stack); - var accept = req.headers.accept || ''; - // html - if (~accept.indexOf('html')) { - fs.readFile(__dirname + '/../public/style.css', 'utf8', function(e, style){ - fs.readFile(__dirname + '/../public/error.html', 'utf8', function(e, html){ - var stack = (err.stack || '') - .split('\n').slice(1) - .map(function(v){ return '
  • ' + v + '
  • '; }).join(''); - html = html - .replace('{style}', style) - .replace('{stack}', stack) - .replace('{title}', exports.title) - .replace('{statusCode}', res.statusCode) - .replace(/\{error\}/g, utils.escape(err.toString())); - res.setHeader('Content-Type', 'text/html; charset=utf-8'); - res.end(html); - }); - }); - // json - } else if (~accept.indexOf('json')) { - var error = { message: err.message, stack: err.stack }; - for (var prop in err) error[prop] = err[prop]; - var json = JSON.stringify({ error: error }); - res.setHeader('Content-Type', 'application/json'); - res.end(json); - // plain text - } else { - res.writeHead(res.statusCode, { 'Content-Type': 'text/plain' }); - res.end(err.stack); - } - }; -}; - -/** - * Template title, framework authors may override this value. - */ - -exports.title = 'Connect'; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/favicon.js b/node_modules/karma/node_modules/connect/lib/middleware/favicon.js deleted file mode 100644 index ef543544..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/favicon.js +++ /dev/null @@ -1,80 +0,0 @@ -/*! - * Connect - favicon - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , utils = require('../utils'); - -/** - * Favicon: - * - * By default serves the connect favicon, or the favicon - * located by the given `path`. - * - * Options: - * - * - `maxAge` cache-control max-age directive, defaulting to 1 day - * - * Examples: - * - * Serve default favicon: - * - * connect() - * .use(connect.favicon()) - * - * Serve favicon before logging for brevity: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger('dev')) - * - * Serve custom favicon: - * - * connect() - * .use(connect.favicon('public/favicon.ico')) - * - * @param {String} path - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function favicon(path, options){ - var options = options || {} - , path = path || __dirname + '/../public/favicon.ico' - , maxAge = options.maxAge || 86400000 - , icon; // favicon cache - - return function favicon(req, res, next){ - if ('/favicon.ico' == req.url) { - if (icon) { - res.writeHead(200, icon.headers); - res.end(icon.body); - } else { - fs.readFile(path, function(err, buf){ - if (err) return next(err); - icon = { - headers: { - 'Content-Type': 'image/x-icon' - , 'Content-Length': buf.length - , 'ETag': '"' + utils.md5(buf) + '"' - , 'Cache-Control': 'public, max-age=' + (maxAge / 1000) - }, - body: buf - }; - res.writeHead(200, icon.headers); - res.end(icon.body); - }); - } - } else { - next(); - } - }; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/json.js b/node_modules/karma/node_modules/connect/lib/middleware/json.js deleted file mode 100644 index 29878d22..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/json.js +++ /dev/null @@ -1,89 +0,0 @@ - -/*! - * Connect - json - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , _limit = require('./limit'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * JSON: - * - * Parse JSON request bodies, providing the - * parsed object as `req.body`. - * - * Options: - * - * - `strict` when `false` anything `JSON.parse()` accepts will be parsed - * - `reviver` used as the second "reviver" argument for JSON.parse - * - `limit` byte limit disabled by default - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - var options = options || {} - , strict = options.strict !== false; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function json(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if (!exports.regexp.test(utils.mime(req))) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - var buf = ''; - req.setEncoding('utf8'); - req.on('data', function(chunk){ buf += chunk }); - req.on('end', function(){ - var first = buf.trim()[0]; - - if (0 == buf.length) { - return next(utils.error(400, 'invalid json, empty body')); - } - - if (strict && '{' != first && '[' != first) return next(utils.error(400, 'invalid json')); - try { - req.body = JSON.parse(buf, options.reviver); - } catch (err){ - err.body = buf; - err.status = 400; - return next(err); - } - next(); - }); - }); - }; -}; - -exports.regexp = /^application\/([\w!#\$%&\*`\-\.\^~]*\+)?json$/i; - diff --git a/node_modules/karma/node_modules/connect/lib/middleware/limit.js b/node_modules/karma/node_modules/connect/lib/middleware/limit.js deleted file mode 100644 index 09bd1c47..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/limit.js +++ /dev/null @@ -1,78 +0,0 @@ - -/*! - * Connect - limit - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils'), - brokenPause = utils.brokenPause; - -/** - * Limit: - * - * Limit request bodies to the given size in `bytes`. - * - * A string representation of the bytesize may also be passed, - * for example "5mb", "200kb", "1gb", etc. - * - * connect() - * .use(connect.limit('5.5mb')) - * .use(handleImageUpload) - * - * @param {Number|String} bytes - * @return {Function} - * @api public - */ - -module.exports = function limit(bytes){ - if ('string' == typeof bytes) bytes = utils.parseBytes(bytes); - if ('number' != typeof bytes) throw new Error('limit() bytes required'); - return function limit(req, res, next){ - var received = 0 - , len = req.headers['content-length'] - ? parseInt(req.headers['content-length'], 10) - : null; - - // self-awareness - if (req._limit) return next(); - req._limit = true; - - // limit by content-length - if (len && len > bytes) return next(utils.error(413)); - - // limit - if (brokenPause) { - listen(); - } else { - req.on('newListener', function handler(event) { - if (event !== 'data') return; - - req.removeListener('newListener', handler); - // Start listening at the end of the current loop - // otherwise the request will be consumed too early. - // Sideaffect is `limit` will miss the first chunk, - // but that's not a big deal. - // Unfortunately, the tests don't have large enough - // request bodies to test this. - process.nextTick(listen); - }); - }; - - next(); - - function listen() { - req.on('data', function(chunk) { - received += Buffer.isBuffer(chunk) - ? chunk.length : - Buffer.byteLength(chunk); - - if (received > bytes) req.destroy(); - }); - }; - }; -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/lib/middleware/logger.js b/node_modules/karma/node_modules/connect/lib/middleware/logger.js deleted file mode 100644 index 7e882488..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/logger.js +++ /dev/null @@ -1,339 +0,0 @@ -/*! - * Connect - logger - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var bytes = require('bytes'); - -/*! - * Log buffer. - */ - -var buf = []; - -/*! - * Default log buffer duration. - */ - -var defaultBufferDuration = 1000; - -/** - * Logger: - * - * Log requests with the given `options` or a `format` string. - * - * Options: - * - * - `format` Format string, see below for tokens - * - `stream` Output stream, defaults to _stdout_ - * - `buffer` Buffer duration, defaults to 1000ms when _true_ - * - `immediate` Write log line on request instead of response (for response times) - * - * Tokens: - * - * - `:req[header]` ex: `:req[Accept]` - * - `:res[header]` ex: `:res[Content-Length]` - * - `:http-version` - * - `:response-time` - * - `:remote-addr` - * - `:date` - * - `:method` - * - `:url` - * - `:referrer` - * - `:user-agent` - * - `:status` - * - * Formats: - * - * Pre-defined formats that ship with connect: - * - * - `default` ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"' - * - `short` ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms' - * - `tiny` ':method :url :status :res[content-length] - :response-time ms' - * - `dev` concise output colored by response status for development use - * - * Examples: - * - * connect.logger() // default - * connect.logger('short') - * connect.logger('tiny') - * connect.logger({ immediate: true, format: 'dev' }) - * connect.logger(':method :url - :referrer') - * connect.logger(':req[content-type] -> :res[content-type]') - * connect.logger(function(tokens, req, res){ return 'some format string' }) - * - * Defining Tokens: - * - * To define a token, simply invoke `connect.logger.token()` with the - * name and a callback function. The value returned is then available - * as ":type" in this case. - * - * connect.logger.token('type', function(req, res){ return req.headers['content-type']; }) - * - * Defining Formats: - * - * All default formats are defined this way, however it's public API as well: - * - * connect.logger.format('name', 'string or function') - * - * @param {String|Function|Object} format or options - * @return {Function} - * @api public - */ - -exports = module.exports = function logger(options) { - if ('object' == typeof options) { - options = options || {}; - } else if (options) { - options = { format: options }; - } else { - options = {}; - } - - // output on request instead of response - var immediate = options.immediate; - - // format name - var fmt = exports[options.format] || options.format || exports.default; - - // compile format - if ('function' != typeof fmt) fmt = compile(fmt); - - // options - var stream = options.stream || process.stdout - , buffer = options.buffer; - - // buffering support - if (buffer) { - var realStream = stream - , interval = 'number' == typeof buffer - ? buffer - : defaultBufferDuration; - - // flush interval - setInterval(function(){ - if (buf.length) { - realStream.write(buf.join('')); - buf.length = 0; - } - }, interval); - - // swap the stream - stream = { - write: function(str){ - buf.push(str); - } - }; - } - - return function logger(req, res, next) { - req._startTime = new Date; - - // immediate - if (immediate) { - var line = fmt(exports, req, res); - if (null == line) return; - stream.write(line + '\n'); - // proxy end to output logging - } else { - var end = res.end; - res.end = function(chunk, encoding){ - res.end = end; - res.end(chunk, encoding); - var line = fmt(exports, req, res); - if (null == line) return; - stream.write(line + '\n'); - }; - } - - - next(); - }; -}; - -/** - * Compile `fmt` into a function. - * - * @param {String} fmt - * @return {Function} - * @api private - */ - -function compile(fmt) { - fmt = fmt.replace(/"/g, '\\"'); - var js = ' return "' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function(_, name, arg){ - return '"\n + (tokens["' + name + '"](req, res, "' + arg + '") || "-") + "'; - }) + '";' - return new Function('tokens, req, res', js); -}; - -/** - * Define a token function with the given `name`, - * and callback `fn(req, res)`. - * - * @param {String} name - * @param {Function} fn - * @return {Object} exports for chaining - * @api public - */ - -exports.token = function(name, fn) { - exports[name] = fn; - return this; -}; - -/** - * Define a `fmt` with the given `name`. - * - * @param {String} name - * @param {String|Function} fmt - * @return {Object} exports for chaining - * @api public - */ - -exports.format = function(name, str){ - exports[name] = str; - return this; -}; - -/** - * Default format. - */ - -exports.format('default', ':remote-addr - - [:date] ":method :url HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent"'); - -/** - * Short format. - */ - -exports.format('short', ':remote-addr - :method :url HTTP/:http-version :status :res[content-length] - :response-time ms'); - -/** - * Tiny format. - */ - -exports.format('tiny', ':method :url :status :res[content-length] - :response-time ms'); - -/** - * dev (colored) - */ - -exports.format('dev', function(tokens, req, res){ - var status = res.statusCode - , len = parseInt(res.getHeader('Content-Length'), 10) - , color = 32; - - if (status >= 500) color = 31 - else if (status >= 400) color = 33 - else if (status >= 300) color = 36; - - len = isNaN(len) - ? '' - : len = ' - ' + bytes(len); - - return '\x1b[90m' + req.method - + ' ' + req.originalUrl + ' ' - + '\x1b[' + color + 'm' + res.statusCode - + ' \x1b[90m' - + (new Date - req._startTime) - + 'ms' + len - + '\x1b[0m'; -}); - -/** - * request url - */ - -exports.token('url', function(req){ - return req.originalUrl || req.url; -}); - -/** - * request method - */ - -exports.token('method', function(req){ - return req.method; -}); - -/** - * response time in milliseconds - */ - -exports.token('response-time', function(req){ - return new Date - req._startTime; -}); - -/** - * UTC date - */ - -exports.token('date', function(){ - return new Date().toUTCString(); -}); - -/** - * response status code - */ - -exports.token('status', function(req, res){ - return res.statusCode; -}); - -/** - * normalized referrer - */ - -exports.token('referrer', function(req){ - return req.headers['referer'] || req.headers['referrer']; -}); - -/** - * remote address - */ - -exports.token('remote-addr', function(req){ - if (req.ip) return req.ip; - var sock = req.socket; - if (sock.socket) return sock.socket.remoteAddress; - return sock.remoteAddress; -}); - -/** - * HTTP version - */ - -exports.token('http-version', function(req){ - return req.httpVersionMajor + '.' + req.httpVersionMinor; -}); - -/** - * UA string - */ - -exports.token('user-agent', function(req){ - return req.headers['user-agent']; -}); - -/** - * request header - */ - -exports.token('req', function(req, res, field){ - return req.headers[field.toLowerCase()]; -}); - -/** - * response header - */ - -exports.token('res', function(req, res, field){ - return (res._headers || {})[field.toLowerCase()]; -}); - diff --git a/node_modules/karma/node_modules/connect/lib/middleware/methodOverride.js b/node_modules/karma/node_modules/connect/lib/middleware/methodOverride.js deleted file mode 100644 index 9ce49399..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/methodOverride.js +++ /dev/null @@ -1,59 +0,0 @@ - -/*! - * Connect - methodOverride - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var methods = require('methods'); - -/** - * Method Override: - * - * Provides faux HTTP method support. - * - * Pass an optional `key` to use when checking for - * a method override, othewise defaults to _\_method_. - * The original method is available via `req.originalMethod`. - * - * @param {String} key - * @return {Function} - * @api public - */ - -module.exports = function methodOverride(key){ - key = key || "_method"; - return function methodOverride(req, res, next) { - var method; - req.originalMethod = req.originalMethod || req.method; - - // req.body - if (req.body && key in req.body) { - method = req.body[key].toLowerCase(); - delete req.body[key]; - } - - // check X-HTTP-Method-Override - if (req.headers['x-http-method-override']) { - method = req.headers['x-http-method-override'].toLowerCase(); - } - - // replace - if (supports(method)) req.method = method.toUpperCase(); - - next(); - }; -}; - -/** - * Check if node supports `method`. - */ - -function supports(method) { - return ~methods.indexOf(method); -} diff --git a/node_modules/karma/node_modules/connect/lib/middleware/multipart.js b/node_modules/karma/node_modules/connect/lib/middleware/multipart.js deleted file mode 100644 index f217d4b1..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/multipart.js +++ /dev/null @@ -1,134 +0,0 @@ -/*! - * Connect - multipart - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var formidable = require('formidable') - , _limit = require('./limit') - , utils = require('../utils') - , qs = require('qs'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * Multipart: - * - * Parse multipart/form-data request bodies, - * providing the parsed object as `req.body` - * and `req.files`. - * - * Configuration: - * - * The options passed are merged with [formidable](https://github.com/felixge/node-formidable)'s - * `IncomingForm` object, allowing you to configure the upload directory, - * size limits, etc. For example if you wish to change the upload dir do the following. - * - * app.use(connect.multipart({ uploadDir: path })); - * - * Options: - * - * - `limit` byte limit defaulting to none - * - `defer` defers processing and exposes the Formidable form object as `req.form`. - * `next()` is called without waiting for the form's "end" event. - * This option is useful if you need to bind to the "progress" event, for example. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function multipart(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - req.files = req.files || {}; - - if (!utils.hasBody(req)) return next(); - - // ignore GET - if ('GET' == req.method || 'HEAD' == req.method) return next(); - - // check Content-Type - if ('multipart/form-data' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - - var form = new formidable.IncomingForm - , data = {} - , files = {} - , done; - - Object.keys(options).forEach(function(key){ - form[key] = options[key]; - }); - - function ondata(name, val, data){ - if (Array.isArray(data[name])) { - data[name].push(val); - } else if (data[name]) { - data[name] = [data[name], val]; - } else { - data[name] = val; - } - } - - form.on('field', function(name, val){ - ondata(name, val, data); - }); - - form.on('file', function(name, val){ - ondata(name, val, files); - }); - - form.on('error', function(err){ - if (!options.defer) { - err.status = 400; - next(err); - } - done = true; - }); - - form.on('end', function(){ - if (done) return; - try { - req.body = qs.parse(data); - req.files = qs.parse(files); - } catch (err) { - form.emit('error', err); - return; - } - if (!options.defer) next(); - }); - - form.parse(req); - - if (options.defer) { - req.form = form; - next(); - } - }); - } -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/query.js b/node_modules/karma/node_modules/connect/lib/middleware/query.js deleted file mode 100644 index 93fc5d34..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/query.js +++ /dev/null @@ -1,46 +0,0 @@ -/*! - * Connect - query - * Copyright(c) 2011 TJ Holowaychuk - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var qs = require('qs') - , parse = require('../utils').parseUrl; - -/** - * Query: - * - * Automatically parse the query-string when available, - * populating the `req.query` object. - * - * Examples: - * - * connect() - * .use(connect.query()) - * .use(function(req, res){ - * res.end(JSON.stringify(req.query)); - * }); - * - * The `options` passed are provided to qs.parse function. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function query(options){ - return function query(req, res, next){ - if (!req.query) { - req.query = ~req.url.indexOf('?') - ? qs.parse(parse(req).query, options) - : {}; - } - - next(); - }; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/responseTime.js b/node_modules/karma/node_modules/connect/lib/middleware/responseTime.js deleted file mode 100644 index 62abc049..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/responseTime.js +++ /dev/null @@ -1,32 +0,0 @@ - -/*! - * Connect - responseTime - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Reponse time: - * - * Adds the `X-Response-Time` header displaying the response - * duration in milliseconds. - * - * @return {Function} - * @api public - */ - -module.exports = function responseTime(){ - return function(req, res, next){ - var start = new Date; - - if (res._responseTime) return next(); - res._responseTime = true; - - res.on('header', function(){ - var duration = new Date - start; - res.setHeader('X-Response-Time', duration + 'ms'); - }); - - next(); - }; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/session.js b/node_modules/karma/node_modules/connect/lib/middleware/session.js deleted file mode 100644 index a1072953..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/session.js +++ /dev/null @@ -1,355 +0,0 @@ -/*! - * Connect - session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Session = require('./session/session') - , debug = require('debug')('connect:session') - , MemoryStore = require('./session/memory') - , signature = require('cookie-signature') - , Cookie = require('./session/cookie') - , Store = require('./session/store') - , utils = require('./../utils') - , uid = require('uid2') - , parse = utils.parseUrl - , crc32 = require('buffer-crc32'); - -// environment - -var env = process.env.NODE_ENV; - -/** - * Expose the middleware. - */ - -exports = module.exports = session; - -/** - * Expose constructors. - */ - -exports.Store = Store; -exports.Cookie = Cookie; -exports.Session = Session; -exports.MemoryStore = MemoryStore; - -/** - * Warning message for `MemoryStore` usage in production. - */ - -var warning = 'Warning: connection.session() MemoryStore is not\n' - + 'designed for a production environment, as it will leak\n' - + 'memory, and will not scale past a single process.'; - -/** - * Session: - * - * Setup session store with the given `options`. - * - * Session data is _not_ saved in the cookie itself, however - * cookies are used, so we must use the [cookieParser()](cookieParser.html) - * middleware _before_ `session()`. - * - * Examples: - * - * connect() - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', key: 'sid', cookie: { secure: true }})) - * - * Options: - * - * - `key` cookie name defaulting to `connect.sid` - * - `store` session store instance - * - `secret` session cookie is signed with this secret to prevent tampering - * - `cookie` session cookie settings, defaulting to `{ path: '/', httpOnly: true, maxAge: null }` - * - `proxy` trust the reverse proxy when setting secure cookies (via "x-forwarded-proto") - * - * Cookie option: - * - * By default `cookie.maxAge` is `null`, meaning no "expires" parameter is set - * so the cookie becomes a browser-session cookie. When the user closes the - * browser the cookie (and session) will be removed. - * - * ## req.session - * - * To store or access session data, simply use the request property `req.session`, - * which is (generally) serialized as JSON by the store, so nested objects - * are typically fine. For example below is a user-specific view counter: - * - * connect() - * .use(connect.favicon()) - * .use(connect.cookieParser()) - * .use(connect.session({ secret: 'keyboard cat', cookie: { maxAge: 60000 }})) - * .use(function(req, res, next){ - * var sess = req.session; - * if (sess.views) { - * res.setHeader('Content-Type', 'text/html'); - * res.write('

    views: ' + sess.views + '

    '); - * res.write('

    expires in: ' + (sess.cookie.maxAge / 1000) + 's

    '); - * res.end(); - * sess.views++; - * } else { - * sess.views = 1; - * res.end('welcome to the session demo. refresh!'); - * } - * } - * )).listen(3000); - * - * ## Session#regenerate() - * - * To regenerate the session simply invoke the method, once complete - * a new SID and `Session` instance will be initialized at `req.session`. - * - * req.session.regenerate(function(err){ - * // will have a new session here - * }); - * - * ## Session#destroy() - * - * Destroys the session, removing `req.session`, will be re-generated next request. - * - * req.session.destroy(function(err){ - * // cannot access session here - * }); - * - * ## Session#reload() - * - * Reloads the session data. - * - * req.session.reload(function(err){ - * // session updated - * }); - * - * ## Session#save() - * - * Save the session. - * - * req.session.save(function(err){ - * // session saved - * }); - * - * ## Session#touch() - * - * Updates the `.maxAge` property. Typically this is - * not necessary to call, as the session middleware does this for you. - * - * ## Session#cookie - * - * Each session has a unique cookie object accompany it. This allows - * you to alter the session cookie per visitor. For example we can - * set `req.session.cookie.expires` to `false` to enable the cookie - * to remain for only the duration of the user-agent. - * - * ## Session#maxAge - * - * Alternatively `req.session.cookie.maxAge` will return the time - * remaining in milliseconds, which we may also re-assign a new value - * to adjust the `.expires` property appropriately. The following - * are essentially equivalent - * - * var hour = 3600000; - * req.session.cookie.expires = new Date(Date.now() + hour); - * req.session.cookie.maxAge = hour; - * - * For example when `maxAge` is set to `60000` (one minute), and 30 seconds - * has elapsed it will return `30000` until the current request has completed, - * at which time `req.session.touch()` is called to reset `req.session.maxAge` - * to its original value. - * - * req.session.cookie.maxAge; - * // => 30000 - * - * Session Store Implementation: - * - * Every session store _must_ implement the following methods - * - * - `.get(sid, callback)` - * - `.set(sid, session, callback)` - * - `.destroy(sid, callback)` - * - * Recommended methods include, but are not limited to: - * - * - `.length(callback)` - * - `.clear(callback)` - * - * For an example implementation view the [connect-redis](http://github.com/visionmedia/connect-redis) repo. - * - * @param {Object} options - * @return {Function} - * @api public - */ - -function session(options){ - var options = options || {} - , key = options.key || 'connect.sid' - , store = options.store || new MemoryStore - , cookie = options.cookie || {} - , trustProxy = options.proxy - , storeReady = true; - - // notify user that this store is not - // meant for a production environment - if ('production' == env && store instanceof MemoryStore) { - console.warn(warning); - } - - // generates the new session - store.generate = function(req){ - req.sessionID = uid(24); - req.session = new Session(req); - req.session.cookie = new Cookie(cookie); - }; - - store.on('disconnect', function(){ storeReady = false; }); - store.on('connect', function(){ storeReady = true; }); - - return function session(req, res, next) { - // self-awareness - if (req.session) return next(); - - // Handle connection as if there is no session if - // the store has temporarily disconnected etc - if (!storeReady) return debug('store is disconnected'), next(); - - // pathname mismatch - if (0 != req.originalUrl.indexOf(cookie.path || '/')) return next(); - - // backwards compatibility for signed cookies - // req.secret is passed from the cookie parser middleware - var secret = options.secret || req.secret; - - // ensure secret is available or bail - if (!secret) throw new Error('`secret` option required for sessions'); - - // parse url - var originalHash - , originalId; - - // expose store - req.sessionStore = store; - - // grab the session cookie value and check the signature - var rawCookie = req.cookies[key]; - - // get signedCookies for backwards compat with signed cookies - var unsignedCookie = req.signedCookies[key]; - - if (!unsignedCookie && rawCookie) { - unsignedCookie = utils.parseSignedCookie(rawCookie, secret); - } - - // set-cookie - res.on('header', function(){ - if (!req.session) return; - var cookie = req.session.cookie - , proto = (req.headers['x-forwarded-proto'] || '').split(',')[0].toLowerCase().trim() - , tls = req.connection.encrypted || (trustProxy && 'https' == proto) - , isNew = unsignedCookie != req.sessionID; - - // only send secure cookies via https - if (cookie.secure && !tls) return debug('not secured'); - - // long expires, handle expiry server-side - if (!isNew && cookie.hasLongExpires) return debug('already set cookie'); - - // browser-session length cookie - if (null == cookie.expires) { - if (!isNew) return debug('already set browser-session cookie'); - // compare hashes and ids - } else if (originalHash == hash(req.session) && originalId == req.session.id) { - return debug('unmodified session'); - } - - var val = 's:' + signature.sign(req.sessionID, secret); - val = cookie.serialize(key, val); - debug('set-cookie %s', val); - res.setHeader('Set-Cookie', val); - }); - - // proxy end() to commit the session - var end = res.end; - res.end = function(data, encoding){ - res.end = end; - if (!req.session) return res.end(data, encoding); - debug('saving'); - req.session.resetMaxAge(); - req.session.save(function(err){ - if (err) console.error(err.stack); - debug('saved'); - res.end(data, encoding); - }); - }; - - // generate the session - function generate() { - store.generate(req); - } - - // get the sessionID from the cookie - req.sessionID = unsignedCookie; - - // generate a session if the browser doesn't send a sessionID - if (!req.sessionID) { - debug('no SID sent, generating session'); - generate(); - next(); - return; - } - - // generate the session object - var pause = utils.pause(req); - debug('fetching %s', req.sessionID); - store.get(req.sessionID, function(err, sess){ - // proxy to resume() events - var _next = next; - next = function(err){ - _next(err); - pause.resume(); - }; - - // error handling - if (err) { - debug('error %j', err); - if ('ENOENT' == err.code) { - generate(); - next(); - } else { - next(err); - } - // no session - } else if (!sess) { - debug('no session found'); - generate(); - next(); - // populate req.session - } else { - debug('session found'); - store.createSession(req, sess); - originalId = req.sessionID; - originalHash = hash(sess); - next(); - } - }); - }; -}; - -/** - * Hash the given `sess` object omitting changes - * to `.cookie`. - * - * @param {Object} sess - * @return {String} - * @api private - */ - -function hash(sess) { - return crc32.signed(JSON.stringify(sess, function(key, val){ - if ('cookie' != key) return val; - })); -} diff --git a/node_modules/karma/node_modules/connect/lib/middleware/session/cookie.js b/node_modules/karma/node_modules/connect/lib/middleware/session/cookie.js deleted file mode 100644 index cdce2a5e..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/session/cookie.js +++ /dev/null @@ -1,140 +0,0 @@ - -/*! - * Connect - session - Cookie - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils') - , cookie = require('cookie'); - -/** - * Initialize a new `Cookie` with the given `options`. - * - * @param {IncomingMessage} req - * @param {Object} options - * @api private - */ - -var Cookie = module.exports = function Cookie(options) { - this.path = '/'; - this.maxAge = null; - this.httpOnly = true; - if (options) utils.merge(this, options); - this.originalMaxAge = undefined == this.originalMaxAge - ? this.maxAge - : this.originalMaxAge; -}; - -/*! - * Prototype. - */ - -Cookie.prototype = { - - /** - * Set expires `date`. - * - * @param {Date} date - * @api public - */ - - set expires(date) { - this._expires = date; - this.originalMaxAge = this.maxAge; - }, - - /** - * Get expires `date`. - * - * @return {Date} - * @api public - */ - - get expires() { - return this._expires; - }, - - /** - * Set expires via max-age in `ms`. - * - * @param {Number} ms - * @api public - */ - - set maxAge(ms) { - this.expires = 'number' == typeof ms - ? new Date(Date.now() + ms) - : ms; - }, - - /** - * Get expires max-age in `ms`. - * - * @return {Number} - * @api public - */ - - get maxAge() { - return this.expires instanceof Date - ? this.expires.valueOf() - Date.now() - : this.expires; - }, - - /** - * Return cookie data object. - * - * @return {Object} - * @api private - */ - - get data() { - return { - originalMaxAge: this.originalMaxAge - , expires: this._expires - , secure: this.secure - , httpOnly: this.httpOnly - , domain: this.domain - , path: this.path - } - }, - - /** - * Check if the cookie has a reasonably large max-age. - * - * @return {Boolean} - * @api private - */ - - get hasLongExpires() { - var week = 604800000; - return this.maxAge > (4 * week); - }, - - /** - * Return a serialized cookie string. - * - * @return {String} - * @api public - */ - - serialize: function(name, val){ - return cookie.serialize(name, val, this.data); - }, - - /** - * Return JSON representation of this cookie. - * - * @return {Object} - * @api private - */ - - toJSON: function(){ - return this.data; - } -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/session/memory.js b/node_modules/karma/node_modules/connect/lib/middleware/session/memory.js deleted file mode 100644 index fb939392..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/session/memory.js +++ /dev/null @@ -1,129 +0,0 @@ - -/*! - * Connect - session - MemoryStore - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var Store = require('./store'); - -/** - * Initialize a new `MemoryStore`. - * - * @api public - */ - -var MemoryStore = module.exports = function MemoryStore() { - this.sessions = {}; -}; - -/** - * Inherit from `Store.prototype`. - */ - -MemoryStore.prototype.__proto__ = Store.prototype; - -/** - * Attempt to fetch session by the given `sid`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.get = function(sid, fn){ - var self = this; - process.nextTick(function(){ - var expires - , sess = self.sessions[sid]; - if (sess) { - sess = JSON.parse(sess); - expires = 'string' == typeof sess.cookie.expires - ? new Date(sess.cookie.expires) - : sess.cookie.expires; - if (!expires || new Date < expires) { - fn(null, sess); - } else { - self.destroy(sid, fn); - } - } else { - fn(); - } - }); -}; - -/** - * Commit the given `sess` object associated with the given `sid`. - * - * @param {String} sid - * @param {Session} sess - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.set = function(sid, sess, fn){ - var self = this; - process.nextTick(function(){ - self.sessions[sid] = JSON.stringify(sess); - fn && fn(); - }); -}; - -/** - * Destroy the session associated with the given `sid`. - * - * @param {String} sid - * @api public - */ - -MemoryStore.prototype.destroy = function(sid, fn){ - var self = this; - process.nextTick(function(){ - delete self.sessions[sid]; - fn && fn(); - }); -}; - -/** - * Invoke the given callback `fn` with all active sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.all = function(fn){ - var arr = [] - , keys = Object.keys(this.sessions); - for (var i = 0, len = keys.length; i < len; ++i) { - arr.push(this.sessions[keys[i]]); - } - fn(null, arr); -}; - -/** - * Clear all sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.clear = function(fn){ - this.sessions = {}; - fn && fn(); -}; - -/** - * Fetch number of sessions. - * - * @param {Function} fn - * @api public - */ - -MemoryStore.prototype.length = function(fn){ - fn(null, Object.keys(this.sessions).length); -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/session/session.js b/node_modules/karma/node_modules/connect/lib/middleware/session/session.js deleted file mode 100644 index 0dd4b400..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/session/session.js +++ /dev/null @@ -1,116 +0,0 @@ - -/*! - * Connect - session - Session - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../../utils'); - -/** - * Create a new `Session` with the given request and `data`. - * - * @param {IncomingRequest} req - * @param {Object} data - * @api private - */ - -var Session = module.exports = function Session(req, data) { - Object.defineProperty(this, 'req', { value: req }); - Object.defineProperty(this, 'id', { value: req.sessionID }); - if ('object' == typeof data) utils.merge(this, data); -}; - -/** - * Update reset `.cookie.maxAge` to prevent - * the cookie from expiring when the - * session is still active. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.touch = function(){ - return this.resetMaxAge(); -}; - -/** - * Reset `.maxAge` to `.originalMaxAge`. - * - * @return {Session} for chaining - * @api public - */ - -Session.prototype.resetMaxAge = function(){ - this.cookie.maxAge = this.cookie.originalMaxAge; - return this; -}; - -/** - * Save the session data with optional callback `fn(err)`. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.save = function(fn){ - this.req.sessionStore.set(this.id, this, fn || function(){}); - return this; -}; - -/** - * Re-loads the session data _without_ altering - * the maxAge properties. Invokes the callback `fn(err)`, - * after which time if no exception has occurred the - * `req.session` property will be a new `Session` object, - * although representing the same session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.reload = function(fn){ - var req = this.req - , store = this.req.sessionStore; - store.get(this.id, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(new Error('failed to load session')); - store.createSession(req, sess); - fn(); - }); - return this; -}; - -/** - * Destroy `this` session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.destroy = function(fn){ - delete this.req.session; - this.req.sessionStore.destroy(this.id, fn); - return this; -}; - -/** - * Regenerate this request's session. - * - * @param {Function} fn - * @return {Session} for chaining - * @api public - */ - -Session.prototype.regenerate = function(fn){ - this.req.sessionStore.regenerate(this.req, fn); - return this; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/session/store.js b/node_modules/karma/node_modules/connect/lib/middleware/session/store.js deleted file mode 100644 index 54294cbd..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/session/store.js +++ /dev/null @@ -1,84 +0,0 @@ - -/*! - * Connect - session - Store - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , Session = require('./session') - , Cookie = require('./cookie'); - -/** - * Initialize abstract `Store`. - * - * @api private - */ - -var Store = module.exports = function Store(options){}; - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Store.prototype.__proto__ = EventEmitter.prototype; - -/** - * Re-generate the given requests's session. - * - * @param {IncomingRequest} req - * @return {Function} fn - * @api public - */ - -Store.prototype.regenerate = function(req, fn){ - var self = this; - this.destroy(req.sessionID, function(err){ - self.generate(req); - fn(err); - }); -}; - -/** - * Load a `Session` instance via the given `sid` - * and invoke the callback `fn(err, sess)`. - * - * @param {String} sid - * @param {Function} fn - * @api public - */ - -Store.prototype.load = function(sid, fn){ - var self = this; - this.get(sid, function(err, sess){ - if (err) return fn(err); - if (!sess) return fn(); - var req = { sessionID: sid, sessionStore: self }; - sess = self.createSession(req, sess); - fn(null, sess); - }); -}; - -/** - * Create session from JSON `sess` data. - * - * @param {IncomingRequest} req - * @param {Object} sess - * @return {Session} - * @api private - */ - -Store.prototype.createSession = function(req, sess){ - var expires = sess.cookie.expires - , orig = sess.cookie.originalMaxAge; - sess.cookie = new Cookie(sess.cookie); - if ('string' == typeof expires) sess.cookie.expires = new Date(expires); - sess.cookie.originalMaxAge = orig; - req.session = new Session(req, sess); - return req.session; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/static.js b/node_modules/karma/node_modules/connect/lib/middleware/static.js deleted file mode 100644 index 7762ac13..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/static.js +++ /dev/null @@ -1,95 +0,0 @@ -/*! - * Connect - static - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var send = require('send') - , utils = require('../utils') - , parse = utils.parseUrl - , url = require('url'); - -/** - * Static: - * - * Static file server with the given `root` path. - * - * Examples: - * - * var oneDay = 86400000; - * - * connect() - * .use(connect.static(__dirname + '/public')) - * - * connect() - * .use(connect.static(__dirname + '/public', { maxAge: oneDay })) - * - * Options: - * - * - `maxAge` Browser cache maxAge in milliseconds. defaults to 0 - * - `hidden` Allow transfer of hidden files. defaults to false - * - `redirect` Redirect to trailing "/" when the pathname is a dir. defaults to true - * - `index` Default file name, defaults to 'index.html' - * - * @param {String} root - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(root, options){ - options = options || {}; - - // root required - if (!root) throw new Error('static() root path required'); - - // default redirect - var redirect = false !== options.redirect; - - return function staticMiddleware(req, res, next) { - if ('GET' != req.method && 'HEAD' != req.method) return next(); - var path = parse(req).pathname; - var pause = utils.pause(req); - - function resume() { - next(); - pause.resume(); - } - - function directory() { - if (!redirect) return resume(); - var pathname = url.parse(req.originalUrl).pathname; - res.statusCode = 303; - res.setHeader('Location', pathname + '/'); - res.end('Redirecting to ' + utils.escape(pathname) + '/'); - } - - function error(err) { - if (404 == err.status) return resume(); - next(err); - } - - send(req, path) - .maxage(options.maxAge || 0) - .root(root) - .index(options.index || 'index.html') - .hidden(options.hidden) - .on('error', error) - .on('directory', directory) - .pipe(res); - }; -}; - -/** - * Expose mime module. - * - * If you wish to extend the mime table use this - * reference to the "mime" module in the npm registry. - */ - -exports.mime = send.mime; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/staticCache.js b/node_modules/karma/node_modules/connect/lib/middleware/staticCache.js deleted file mode 100644 index 7354a8ff..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/staticCache.js +++ /dev/null @@ -1,231 +0,0 @@ - -/*! - * Connect - staticCache - * Copyright(c) 2011 Sencha Inc. - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , Cache = require('../cache') - , fresh = require('fresh'); - -/** - * Static cache: - * - * Enables a memory cache layer on top of - * the `static()` middleware, serving popular - * static files. - * - * By default a maximum of 128 objects are - * held in cache, with a max of 256k each, - * totalling ~32mb. - * - * A Least-Recently-Used (LRU) cache algo - * is implemented through the `Cache` object, - * simply rotating cache objects as they are - * hit. This means that increasingly popular - * objects maintain their positions while - * others get shoved out of the stack and - * garbage collected. - * - * Benchmarks: - * - * static(): 2700 rps - * node-static: 5300 rps - * static() + staticCache(): 7500 rps - * - * Options: - * - * - `maxObjects` max cache objects [128] - * - `maxLength` max cache object length 256kb - * - * @param {Object} options - * @return {Function} - * @api public - */ - -module.exports = function staticCache(options){ - var options = options || {} - , cache = new Cache(options.maxObjects || 128) - , maxlen = options.maxLength || 1024 * 256; - - console.warn('connect.staticCache() is deprecated and will be removed in 3.0'); - console.warn('use varnish or similar reverse proxy caches.'); - - return function staticCache(req, res, next){ - var key = cacheKey(req) - , ranges = req.headers.range - , hasCookies = req.headers.cookie - , hit = cache.get(key); - - // cache static - // TODO: change from staticCache() -> cache() - // and make this work for any request - req.on('static', function(stream){ - var headers = res._headers - , cc = utils.parseCacheControl(headers['cache-control'] || '') - , contentLength = headers['content-length'] - , hit; - - // dont cache set-cookie responses - if (headers['set-cookie']) return hasCookies = true; - - // dont cache when cookies are present - if (hasCookies) return; - - // ignore larger files - if (!contentLength || contentLength > maxlen) return; - - // don't cache partial files - if (headers['content-range']) return; - - // dont cache items we shouldn't be - // TODO: real support for must-revalidate / no-cache - if ( cc['no-cache'] - || cc['no-store'] - || cc['private'] - || cc['must-revalidate']) return; - - // if already in cache then validate - if (hit = cache.get(key)){ - if (headers.etag == hit[0].etag) { - hit[0].date = new Date; - return; - } else { - cache.remove(key); - } - } - - // validation notifiactions don't contain a steam - if (null == stream) return; - - // add the cache object - var arr = []; - - // store the chunks - stream.on('data', function(chunk){ - arr.push(chunk); - }); - - // flag it as complete - stream.on('end', function(){ - var cacheEntry = cache.add(key); - delete headers['x-cache']; // Clean up (TODO: others) - cacheEntry.push(200); - cacheEntry.push(headers); - cacheEntry.push.apply(cacheEntry, arr); - }); - }); - - if (req.method == 'GET' || req.method == 'HEAD') { - if (ranges) { - next(); - } else if (!hasCookies && hit && !mustRevalidate(req, hit)) { - res.setHeader('X-Cache', 'HIT'); - respondFromCache(req, res, hit); - } else { - res.setHeader('X-Cache', 'MISS'); - next(); - } - } else { - next(); - } - } -}; - -/** - * Respond with the provided cached value. - * TODO: Assume 200 code, that's iffy. - * - * @param {Object} req - * @param {Object} res - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function respondFromCache(req, res, cacheEntry) { - var status = cacheEntry[0] - , headers = utils.merge({}, cacheEntry[1]) - , content = cacheEntry.slice(2); - - headers.age = (new Date - new Date(headers.date)) / 1000 || 0; - - switch (req.method) { - case 'HEAD': - res.writeHead(status, headers); - res.end(); - break; - case 'GET': - if (utils.conditionalGET(req) && fresh(req.headers, headers)) { - headers['content-length'] = 0; - res.writeHead(304, headers); - res.end(); - } else { - res.writeHead(status, headers); - - function write() { - while (content.length) { - if (false === res.write(content.shift())) { - res.once('drain', write); - return; - } - } - res.end(); - } - - write(); - } - break; - default: - // This should never happen. - res.writeHead(500, ''); - res.end(); - } -} - -/** - * Determine whether or not a cached value must be revalidated. - * - * @param {Object} req - * @param {Object} cacheEntry - * @return {String} - * @api private - */ - -function mustRevalidate(req, cacheEntry) { - var cacheHeaders = cacheEntry[1] - , reqCC = utils.parseCacheControl(req.headers['cache-control'] || '') - , cacheCC = utils.parseCacheControl(cacheHeaders['cache-control'] || '') - , cacheAge = (new Date - new Date(cacheHeaders.date)) / 1000 || 0; - - if ( cacheCC['no-cache'] - || cacheCC['must-revalidate'] - || cacheCC['proxy-revalidate']) return true; - - if (reqCC['no-cache']) return true; - - if (null != reqCC['max-age']) return reqCC['max-age'] < cacheAge; - - if (null != cacheCC['max-age']) return cacheCC['max-age'] < cacheAge; - - return false; -} - -/** - * The key to use in the cache. For now, this is the URL path and query. - * - * 'http://example.com?key=value' -> '/?key=value' - * - * @param {Object} req - * @return {String} - * @api private - */ - -function cacheKey(req) { - return utils.parseUrl(req).path; -} diff --git a/node_modules/karma/node_modules/connect/lib/middleware/timeout.js b/node_modules/karma/node_modules/connect/lib/middleware/timeout.js deleted file mode 100644 index 5496c024..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/timeout.js +++ /dev/null @@ -1,55 +0,0 @@ -/*! - * Connect - timeout - * Ported from https://github.com/LearnBoost/connect-timeout - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var debug = require('debug')('connect:timeout'); - -/** - * Timeout: - * - * Times out the request in `ms`, defaulting to `5000`. The - * method `req.clearTimeout()` is added to revert this behaviour - * programmatically within your application's middleware, routes, etc. - * - * The timeout error is passed to `next()` so that you may customize - * the response behaviour. This error has the `.timeout` property as - * well as `.status == 503`. - * - * @param {Number} ms - * @return {Function} - * @api public - */ - -module.exports = function timeout(ms) { - ms = ms || 5000; - - return function(req, res, next) { - var id = setTimeout(function(){ - req.emit('timeout', ms); - }, ms); - - req.on('timeout', function(){ - if (res.headerSent) return debug('response started, cannot timeout'); - var err = new Error('Response timeout'); - err.timeout = ms; - err.status = 503; - next(err); - }); - - req.clearTimeout = function(){ - clearTimeout(id); - }; - - res.on('header', function(){ - clearTimeout(id); - }); - - next(); - }; -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/urlencoded.js b/node_modules/karma/node_modules/connect/lib/middleware/urlencoded.js deleted file mode 100644 index 20ca053b..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/urlencoded.js +++ /dev/null @@ -1,78 +0,0 @@ - -/*! - * Connect - urlencoded - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var utils = require('../utils') - , _limit = require('./limit') - , qs = require('qs'); - -/** - * noop middleware. - */ - -function noop(req, res, next) { - next(); -} - -/** - * Urlencoded: - * - * Parse x-ww-form-urlencoded request bodies, - * providing the parsed object as `req.body`. - * - * Options: - * - * - `limit` byte limit disabled by default - * - * @param {Object} options - * @return {Function} - * @api public - */ - -exports = module.exports = function(options){ - options = options || {}; - - var limit = options.limit - ? _limit(options.limit) - : noop; - - return function urlencoded(req, res, next) { - if (req._body) return next(); - req.body = req.body || {}; - - if (!utils.hasBody(req)) return next(); - - // check Content-Type - if ('application/x-www-form-urlencoded' != utils.mime(req)) return next(); - - // flag as parsed - req._body = true; - - // parse - limit(req, res, function(err){ - if (err) return next(err); - var buf = ''; - req.setEncoding('utf8'); - req.on('data', function(chunk){ buf += chunk }); - req.on('end', function(){ - try { - req.body = buf.length - ? qs.parse(buf, options) - : {}; - } catch (err){ - err.body = buf; - return next(err); - } - next(); - }); - }); - } -}; diff --git a/node_modules/karma/node_modules/connect/lib/middleware/vhost.js b/node_modules/karma/node_modules/connect/lib/middleware/vhost.js deleted file mode 100644 index abbb0500..00000000 --- a/node_modules/karma/node_modules/connect/lib/middleware/vhost.js +++ /dev/null @@ -1,40 +0,0 @@ - -/*! - * Connect - vhost - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Vhost: - * - * Setup vhost for the given `hostname` and `server`. - * - * connect() - * .use(connect.vhost('foo.com', fooApp)) - * .use(connect.vhost('bar.com', barApp)) - * .use(connect.vhost('*.com', mainApp)) - * - * The `server` may be a Connect server or - * a regular Node `http.Server`. - * - * @param {String} hostname - * @param {Server} server - * @return {Function} - * @api public - */ - -module.exports = function vhost(hostname, server){ - if (!hostname) throw new Error('vhost hostname required'); - if (!server) throw new Error('vhost server required'); - var regexp = new RegExp('^' + hostname.replace(/[^*\w]/g, '\\$&').replace(/[*]/g, '(?:.*?)') + '$', 'i'); - if (server.onvhost) server.onvhost(hostname); - return function vhost(req, res, next){ - if (!req.headers.host) return next(); - var host = req.headers.host.split(':')[0]; - if (!regexp.test(host)) return next(); - if ('function' == typeof server) return server(req, res, next); - server.emit('request', req, res); - }; -}; diff --git a/node_modules/karma/node_modules/connect/lib/patch.js b/node_modules/karma/node_modules/connect/lib/patch.js deleted file mode 100644 index 7cf00125..00000000 --- a/node_modules/karma/node_modules/connect/lib/patch.js +++ /dev/null @@ -1,79 +0,0 @@ - -/*! - * Connect - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , res = http.ServerResponse.prototype - , setHeader = res.setHeader - , _renderHeaders = res._renderHeaders - , writeHead = res.writeHead; - -// apply only once - -if (!res._hasConnectPatch) { - - /** - * Provide a public "header sent" flag - * until node does. - * - * @return {Boolean} - * @api public - */ - - res.__defineGetter__('headerSent', function(){ - return this._header; - }); - - /** - * Set header `field` to `val`, special-casing - * the `Set-Cookie` field for multiple support. - * - * @param {String} field - * @param {String} val - * @api public - */ - - res.setHeader = function(field, val){ - var key = field.toLowerCase() - , prev; - - // special-case Set-Cookie - if (this._headers && 'set-cookie' == key) { - if (prev = this.getHeader(field)) { - val = Array.isArray(prev) - ? prev.concat(val) - : [prev, val]; - } - // charset - } else if ('content-type' == key && this.charset) { - val += '; charset=' + this.charset; - } - - return setHeader.call(this, field, val); - }; - - /** - * Proxy to emit "header" event. - */ - - res._renderHeaders = function(){ - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return _renderHeaders.call(this); - }; - - res.writeHead = function(){ - if (!this._emittedHeader) this.emit('header'); - this._emittedHeader = true; - return writeHead.apply(this, arguments); - }; - - res._hasConnectPatch = true; -} diff --git a/node_modules/karma/node_modules/connect/lib/proto.js b/node_modules/karma/node_modules/connect/lib/proto.js deleted file mode 100644 index 6fadf8fd..00000000 --- a/node_modules/karma/node_modules/connect/lib/proto.js +++ /dev/null @@ -1,230 +0,0 @@ - -/*! - * Connect - HTTPServer - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , utils = require('./utils') - , debug = require('debug')('connect:dispatcher'); - -// prototype - -var app = module.exports = {}; - -// environment - -var env = process.env.NODE_ENV || 'development'; - -/** - * Utilize the given middleware `handle` to the given `route`, - * defaulting to _/_. This "route" is the mount-point for the - * middleware, when given a value other than _/_ the middleware - * is only effective when that segment is present in the request's - * pathname. - * - * For example if we were to mount a function at _/admin_, it would - * be invoked on _/admin_, and _/admin/settings_, however it would - * not be invoked for _/_, or _/posts_. - * - * Examples: - * - * var app = connect(); - * app.use(connect.favicon()); - * app.use(connect.logger()); - * app.use(connect.static(__dirname + '/public')); - * - * If we wanted to prefix static files with _/public_, we could - * "mount" the `static()` middleware: - * - * app.use('/public', connect.static(__dirname + '/public')); - * - * This api is chainable, so the following is valid: - * - * connect() - * .use(connect.favicon()) - * .use(connect.logger()) - * .use(connect.static(__dirname + '/public')) - * .listen(3000); - * - * @param {String|Function|Server} route, callback or server - * @param {Function|Server} callback or server - * @return {Server} for chaining - * @api public - */ - -app.use = function(route, fn){ - // default route to '/' - if ('string' != typeof route) { - fn = route; - route = '/'; - } - - // wrap sub-apps - if ('function' == typeof fn.handle) { - var server = fn; - fn.route = route; - fn = function(req, res, next){ - server.handle(req, res, next); - }; - } - - // wrap vanilla http.Servers - if (fn instanceof http.Server) { - fn = fn.listeners('request')[0]; - } - - // strip trailing slash - if ('/' == route[route.length - 1]) { - route = route.slice(0, -1); - } - - // add the middleware - debug('use %s %s', route || '/', fn.name || 'anonymous'); - this.stack.push({ route: route, handle: fn }); - - return this; -}; - -/** - * Handle server requests, punting them down - * the middleware stack. - * - * @api private - */ - -app.handle = function(req, res, out) { - var stack = this.stack - , fqdn = ~req.url.indexOf('://') - , removed = '' - , slashAdded = false - , index = 0; - - function next(err) { - var layer, path, status, c; - - if (slashAdded) { - req.url = req.url.substr(1); - slashAdded = false; - } - - req.url = removed + req.url; - req.originalUrl = req.originalUrl || req.url; - removed = ''; - - // next callback - layer = stack[index++]; - - // all done - if (!layer || res.headerSent) { - // delegate to parent - if (out) return out(err); - - // unhandled error - if (err) { - // default to 500 - if (res.statusCode < 400) res.statusCode = 500; - debug('default %s', res.statusCode); - - // respect err.status - if (err.status) res.statusCode = err.status; - - // production gets a basic error message - var msg = 'production' == env - ? http.STATUS_CODES[res.statusCode] - : err.stack || err.toString(); - - // log to stderr in a non-test env - if ('test' != env) console.error(err.stack || err.toString()); - if (res.headerSent) return req.socket.destroy(); - res.setHeader('Content-Type', 'text/plain'); - res.setHeader('Content-Length', Buffer.byteLength(msg)); - if ('HEAD' == req.method) return res.end(); - res.end(msg); - } else { - debug('default 404'); - res.statusCode = 404; - res.setHeader('Content-Type', 'text/plain'); - if ('HEAD' == req.method) return res.end(); - res.end('Cannot ' + utils.escape(req.method) + ' ' + utils.escape(req.originalUrl)); - } - return; - } - - try { - path = utils.parseUrl(req).pathname; - if (undefined == path) path = '/'; - - // skip this layer if the route doesn't match. - if (0 != path.toLowerCase().indexOf(layer.route.toLowerCase())) return next(err); - - c = path[layer.route.length]; - if (c && '/' != c && '.' != c) return next(err); - - // Call the layer handler - // Trim off the part of the url that matches the route - removed = layer.route; - req.url = req.url.substr(removed.length); - - // Ensure leading slash - if (!fqdn && '/' != req.url[0]) { - req.url = '/' + req.url; - slashAdded = true; - } - - debug('%s %s : %s', layer.handle.name || 'anonymous', layer.route, req.originalUrl); - var arity = layer.handle.length; - if (err) { - if (arity === 4) { - layer.handle(err, req, res, next); - } else { - next(err); - } - } else if (arity < 4) { - layer.handle(req, res, next); - } else { - next(); - } - } catch (e) { - next(e); - } - } - next(); -}; - -/** - * Listen for connections. - * - * This method takes the same arguments - * as node's `http.Server#listen()`. - * - * HTTP and HTTPS: - * - * If you run your application both as HTTP - * and HTTPS you may wrap them individually, - * since your Connect "server" is really just - * a JavaScript `Function`. - * - * var connect = require('connect') - * , http = require('http') - * , https = require('https'); - * - * var app = connect(); - * - * http.createServer(app).listen(80); - * https.createServer(options, app).listen(443); - * - * @return {http.Server} - * @api public - */ - -app.listen = function(){ - var server = http.createServer(this); - return server.listen.apply(server, arguments); -}; diff --git a/node_modules/karma/node_modules/connect/lib/public/directory.html b/node_modules/karma/node_modules/connect/lib/public/directory.html deleted file mode 100644 index 2d637042..00000000 --- a/node_modules/karma/node_modules/connect/lib/public/directory.html +++ /dev/null @@ -1,81 +0,0 @@ - - - - - listing directory {directory} - - - - - -
    -

    {linked-path}

    - {files} -
    - - \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/lib/public/error.html b/node_modules/karma/node_modules/connect/lib/public/error.html deleted file mode 100644 index a6d3fafd..00000000 --- a/node_modules/karma/node_modules/connect/lib/public/error.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - {error} - - - -
    -

    {title}

    -

    {statusCode} {error}

    -
      {stack}
    -
    - - diff --git a/node_modules/karma/node_modules/connect/lib/public/favicon.ico b/node_modules/karma/node_modules/connect/lib/public/favicon.ico deleted file mode 100644 index 895fc96a..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/favicon.ico and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page.png b/node_modules/karma/node_modules/connect/lib/public/icons/page.png deleted file mode 100644 index 03ddd799..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_add.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_add.png deleted file mode 100644 index d5bfa071..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_add.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_attach.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_attach.png deleted file mode 100644 index 89ee2da0..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_attach.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_code.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_code.png deleted file mode 100644 index f7ea9041..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_code.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_copy.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_copy.png deleted file mode 100644 index 195dc6d6..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_copy.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_delete.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_delete.png deleted file mode 100644 index 3141467c..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_delete.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_edit.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_edit.png deleted file mode 100644 index 046811ed..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_edit.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_error.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_error.png deleted file mode 100644 index f07f449a..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_error.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_excel.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_excel.png deleted file mode 100644 index eb6158eb..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_excel.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_find.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_find.png deleted file mode 100644 index 2f193889..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_find.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_gear.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_gear.png deleted file mode 100644 index 8e83281c..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_gear.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_go.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_go.png deleted file mode 100644 index 80fe1ed0..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_go.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_green.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_green.png deleted file mode 100644 index de8e003f..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_green.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_key.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_key.png deleted file mode 100644 index d6626cb0..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_key.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_lightning.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_lightning.png deleted file mode 100644 index 7e568703..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_lightning.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_link.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_link.png deleted file mode 100644 index 312eab09..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_link.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_paintbrush.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_paintbrush.png deleted file mode 100644 index 246a2f0b..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_paintbrush.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_paste.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_paste.png deleted file mode 100644 index 968f073f..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_paste.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_red.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_red.png deleted file mode 100644 index 0b18247d..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_red.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_refresh.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_refresh.png deleted file mode 100644 index cf347c7d..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_refresh.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_save.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_save.png deleted file mode 100644 index caea546a..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_save.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white.png deleted file mode 100644 index 8b8b1ca0..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_acrobat.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_acrobat.png deleted file mode 100644 index 8f8095e4..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_acrobat.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_actionscript.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_actionscript.png deleted file mode 100644 index 159b2407..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_actionscript.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_add.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_add.png deleted file mode 100644 index aa23dde3..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_add.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_c.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_c.png deleted file mode 100644 index 34a05ccc..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_c.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_camera.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_camera.png deleted file mode 100644 index f501a593..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_camera.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cd.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cd.png deleted file mode 100644 index 848bdaf3..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cd.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_code.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_code.png deleted file mode 100644 index 0c76bd12..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_code.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_code_red.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_code_red.png deleted file mode 100644 index 87a69145..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_code_red.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_coldfusion.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_coldfusion.png deleted file mode 100644 index c66011fb..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_coldfusion.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_compressed.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_compressed.png deleted file mode 100644 index 2b6b1007..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_compressed.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_copy.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_copy.png deleted file mode 100644 index a9f31a27..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_copy.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cplusplus.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cplusplus.png deleted file mode 100644 index a87cf847..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cplusplus.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_csharp.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_csharp.png deleted file mode 100644 index ffb8fc93..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_csharp.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cup.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cup.png deleted file mode 100644 index 0a7d6f4a..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_cup.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_database.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_database.png deleted file mode 100644 index bddba1f9..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_database.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_delete.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_delete.png deleted file mode 100644 index af1ecaf2..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_delete.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_dvd.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_dvd.png deleted file mode 100644 index 4cc537af..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_dvd.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_edit.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_edit.png deleted file mode 100644 index b93e7760..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_edit.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_error.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_error.png deleted file mode 100644 index 9fc5a0a1..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_error.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_excel.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_excel.png deleted file mode 100644 index b977d7e5..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_excel.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_find.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_find.png deleted file mode 100644 index 58184363..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_find.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_flash.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_flash.png deleted file mode 100644 index 5769120b..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_flash.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_freehand.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_freehand.png deleted file mode 100644 index 8d719df5..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_freehand.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_gear.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_gear.png deleted file mode 100644 index 106f5aa3..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_gear.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_get.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_get.png deleted file mode 100644 index e4a1ecba..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_get.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_go.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_go.png deleted file mode 100644 index 7e62a924..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_go.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_h.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_h.png deleted file mode 100644 index e902abb0..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_h.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_horizontal.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_horizontal.png deleted file mode 100644 index 1d2d0a49..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_horizontal.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_key.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_key.png deleted file mode 100644 index d6164845..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_key.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_lightning.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_lightning.png deleted file mode 100644 index 7215d1e8..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_lightning.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_link.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_link.png deleted file mode 100644 index bf7bd1c9..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_link.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_magnify.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_magnify.png deleted file mode 100644 index f6b74cc4..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_magnify.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_medal.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_medal.png deleted file mode 100644 index d3fffb6d..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_medal.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_office.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_office.png deleted file mode 100644 index a65bcb3e..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_office.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paint.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paint.png deleted file mode 100644 index 23a37b89..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paint.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paintbrush.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paintbrush.png deleted file mode 100644 index f907e44b..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paintbrush.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paste.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paste.png deleted file mode 100644 index 5b2cbb3f..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_paste.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_php.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_php.png deleted file mode 100644 index 7868a259..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_php.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_picture.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_picture.png deleted file mode 100644 index 134b6693..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_picture.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_powerpoint.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_powerpoint.png deleted file mode 100644 index c4eff038..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_powerpoint.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_put.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_put.png deleted file mode 100644 index 884ffd6f..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_put.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_ruby.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_ruby.png deleted file mode 100644 index f59b7c43..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_ruby.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_stack.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_stack.png deleted file mode 100644 index 44084add..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_stack.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_star.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_star.png deleted file mode 100644 index 3a1441c9..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_star.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_swoosh.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_swoosh.png deleted file mode 100644 index e7708292..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_swoosh.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_text.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_text.png deleted file mode 100644 index 813f712f..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_text.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_text_width.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_text_width.png deleted file mode 100644 index d9cf1325..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_text_width.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_tux.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_tux.png deleted file mode 100644 index 52699bfe..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_tux.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_vector.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_vector.png deleted file mode 100644 index 4a05955b..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_vector.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_visualstudio.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_visualstudio.png deleted file mode 100644 index a0a433df..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_visualstudio.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_width.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_width.png deleted file mode 100644 index 1eb88094..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_width.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_word.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_word.png deleted file mode 100644 index ae8ecbf4..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_word.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_world.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_world.png deleted file mode 100644 index 6ed2490e..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_world.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_wrench.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_wrench.png deleted file mode 100644 index fecadd08..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_wrench.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_zip.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_white_zip.png deleted file mode 100644 index fd4bbccd..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_white_zip.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_word.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_word.png deleted file mode 100644 index 834cdfaf..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_word.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/icons/page_world.png b/node_modules/karma/node_modules/connect/lib/public/icons/page_world.png deleted file mode 100644 index b8895dde..00000000 Binary files a/node_modules/karma/node_modules/connect/lib/public/icons/page_world.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/lib/public/style.css b/node_modules/karma/node_modules/connect/lib/public/style.css deleted file mode 100644 index 32b65071..00000000 --- a/node_modules/karma/node_modules/connect/lib/public/style.css +++ /dev/null @@ -1,141 +0,0 @@ -body { - margin: 0; - padding: 80px 100px; - font: 13px "Helvetica Neue", "Lucida Grande", "Arial"; - background: #ECE9E9 -webkit-gradient(linear, 0% 0%, 0% 100%, from(#fff), to(#ECE9E9)); - background: #ECE9E9 -moz-linear-gradient(top, #fff, #ECE9E9); - background-repeat: no-repeat; - color: #555; - -webkit-font-smoothing: antialiased; -} -h1, h2, h3 { - margin: 0; - font-size: 22px; - color: #343434; -} -h1 em, h2 em { - padding: 0 5px; - font-weight: normal; -} -h1 { - font-size: 60px; -} -h2 { - margin-top: 10px; -} -h3 { - margin: 5px 0 10px 0; - padding-bottom: 5px; - border-bottom: 1px solid #eee; - font-size: 18px; -} -ul { - margin: 0; - padding: 0; -} -ul li { - margin: 5px 0; - padding: 3px 8px; - list-style: none; -} -ul li:hover { - cursor: pointer; - color: #2e2e2e; -} -ul li .path { - padding-left: 5px; - font-weight: bold; -} -ul li .line { - padding-right: 5px; - font-style: italic; -} -ul li:first-child .path { - padding-left: 0; -} -p { - line-height: 1.5; -} -a { - color: #555; - text-decoration: none; -} -a:hover { - color: #303030; -} -#stacktrace { - margin-top: 15px; -} -.directory h1 { - margin-bottom: 15px; - font-size: 18px; -} -ul#files { - width: 100%; - height: 500px; -} -ul#files li { - padding: 0; -} -ul#files li img { - position: absolute; - top: 5px; - left: 5px; -} -ul#files li a { - position: relative; - display: block; - margin: 1px; - width: 30%; - height: 25px; - line-height: 25px; - text-indent: 8px; - float: left; - border: 1px solid transparent; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; - border-radius: 5px; - overflow: hidden; - text-overflow: ellipsis; -} -ul#files li a.icon { - text-indent: 25px; -} -ul#files li a:focus, -ul#files li a:hover { - outline: none; - background: rgba(255,255,255,0.65); - border: 1px solid #ececec; -} -ul#files li a.highlight { - -webkit-transition: background .4s ease-in-out; - background: #ffff4f; - border-color: #E9DC51; -} -#search { - display: block; - position: fixed; - top: 20px; - right: 20px; - width: 90px; - -webkit-transition: width ease 0.2s, opacity ease 0.4s; - -moz-transition: width ease 0.2s, opacity ease 0.4s; - -webkit-border-radius: 32px; - -moz-border-radius: 32px; - -webkit-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -moz-box-shadow: inset 0px 0px 3px rgba(0, 0, 0, 0.25), inset 0px 1px 3px rgba(0, 0, 0, 0.7), 0px 1px 0px rgba(255, 255, 255, 0.03); - -webkit-font-smoothing: antialiased; - text-align: left; - font: 13px "Helvetica Neue", Arial, sans-serif; - padding: 4px 10px; - border: none; - background: transparent; - margin-bottom: 0; - outline: none; - opacity: 0.7; - color: #888; -} -#search:focus { - width: 120px; - opacity: 1.0; -} diff --git a/node_modules/karma/node_modules/connect/lib/utils.js b/node_modules/karma/node_modules/connect/lib/utils.js deleted file mode 100644 index d52009a9..00000000 --- a/node_modules/karma/node_modules/connect/lib/utils.js +++ /dev/null @@ -1,386 +0,0 @@ - -/*! - * Connect - utils - * Copyright(c) 2010 Sencha Inc. - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var http = require('http') - , crypto = require('crypto') - , parse = require('url').parse - , signature = require('cookie-signature') - , nodeVersion = process.versions.node.split('.'); - -// pause is broken in node < 0.10 -exports.brokenPause = parseInt(nodeVersion[0], 10) === 0 - && parseInt(nodeVersion[1], 10) < 10; - -/** - * Return `true` if the request has a body, otherwise return `false`. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.hasBody = function(req) { - var encoding = 'transfer-encoding' in req.headers; - var length = 'content-length' in req.headers && req.headers['content-length'] !== '0'; - return encoding || length; -}; - -/** - * Extract the mime type from the given request's - * _Content-Type_ header. - * - * @param {IncomingMessage} req - * @return {String} - * @api private - */ - -exports.mime = function(req) { - var str = req.headers['content-type'] || ''; - return str.split(';')[0]; -}; - -/** - * Generate an `Error` from the given status `code` - * and optional `msg`. - * - * @param {Number} code - * @param {String} msg - * @return {Error} - * @api private - */ - -exports.error = function(code, msg){ - var err = new Error(msg || http.STATUS_CODES[code]); - err.status = code; - return err; -}; - -/** - * Return md5 hash of the given string and optional encoding, - * defaulting to hex. - * - * utils.md5('wahoo'); - * // => "e493298061761236c96b02ea6aa8a2ad" - * - * @param {String} str - * @param {String} encoding - * @return {String} - * @api private - */ - -exports.md5 = function(str, encoding){ - return crypto - .createHash('md5') - .update(str) - .digest(encoding || 'hex'); -}; - -/** - * Merge object b with object a. - * - * var a = { foo: 'bar' } - * , b = { bar: 'baz' }; - * - * utils.merge(a, b); - * // => { foo: 'bar', bar: 'baz' } - * - * @param {Object} a - * @param {Object} b - * @return {Object} - * @api private - */ - -exports.merge = function(a, b){ - if (a && b) { - for (var key in b) { - a[key] = b[key]; - } - } - return a; -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - console.warn('do not use utils.sign(), use https://github.com/visionmedia/node-cookie-signature') - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - console.warn('do not use utils.unsign(), use https://github.com/visionmedia/node-cookie-signature') - var str = val.slice(0, val.lastIndexOf('.')); - return exports.sign(str, secret) == val - ? str - : false; -}; - -/** - * Parse signed cookies, returning an object - * containing the decoded key/value pairs, - * while removing the signed key from `obj`. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseSignedCookies = function(obj, secret){ - var ret = {}; - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - if (0 == val.indexOf('s:')) { - val = signature.unsign(val.slice(2), secret); - if (val) { - ret[key] = val; - delete obj[key]; - } - } - }); - return ret; -}; - -/** - * Parse a signed cookie string, return the decoded value - * - * @param {String} str signed cookie string - * @param {String} secret - * @return {String} decoded value - * @api private - */ - -exports.parseSignedCookie = function(str, secret){ - return 0 == str.indexOf('s:') - ? signature.unsign(str.slice(2), secret) - : str; -}; - -/** - * Parse JSON cookies. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.parseJSONCookies = function(obj){ - Object.keys(obj).forEach(function(key){ - var val = obj[key]; - var res = exports.parseJSONCookie(val); - if (res) obj[key] = res; - }); - return obj; -}; - -/** - * Parse JSON cookie string - * - * @param {String} str - * @return {Object} Parsed object or null if not json cookie - * @api private - */ - -exports.parseJSONCookie = function(str) { - if (0 == str.indexOf('j:')) { - try { - return JSON.parse(str.slice(2)); - } catch (err) { - // no op - } - } -}; - -/** - * Pause `data` and `end` events on the given `obj`. - * Middleware performing async tasks _should_ utilize - * this utility (or similar), to re-emit data once - * the async operation has completed, otherwise these - * events may be lost. Pause is only required for - * node versions less than 10, and is replaced with - * noop's otherwise. - * - * var pause = utils.pause(req); - * fs.readFile(path, function(){ - * next(); - * pause.resume(); - * }); - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -exports.pause = exports.brokenPause - ? require('pause') - : function () { - return { - end: noop, - resume: noop - } - } - -/** - * Strip `Content-*` headers from `res`. - * - * @param {ServerResponse} res - * @api private - */ - -exports.removeContentHeaders = function(res){ - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Check if `req` is a conditional GET request. - * - * @param {IncomingMessage} req - * @return {Boolean} - * @api private - */ - -exports.conditionalGET = function(req) { - return req.headers['if-modified-since'] - || req.headers['if-none-match']; -}; - -/** - * Respond with 401 "Unauthorized". - * - * @param {ServerResponse} res - * @param {String} realm - * @api private - */ - -exports.unauthorized = function(res, realm) { - res.statusCode = 401; - res.setHeader('WWW-Authenticate', 'Basic realm="' + realm + '"'); - res.end('Unauthorized'); -}; - -/** - * Respond with 304 "Not Modified". - * - * @param {ServerResponse} res - * @param {Object} headers - * @api private - */ - -exports.notModified = function(res) { - exports.removeContentHeaders(res); - res.statusCode = 304; - res.end(); -}; - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * Parse the given Cache-Control `str`. - * - * @param {String} str - * @return {Object} - * @api private - */ - -exports.parseCacheControl = function(str){ - var directives = str.split(',') - , obj = {}; - - for(var i = 0, len = directives.length; i < len; i++) { - var parts = directives[i].split('=') - , key = parts.shift().trim() - , val = parseInt(parts.shift(), 10); - - obj[key] = isNaN(val) ? true : val; - } - - return obj; -}; - -/** - * Parse the `req` url with memoization. - * - * @param {ServerRequest} req - * @return {Object} - * @api private - */ - -exports.parseUrl = function(req){ - var parsed = req._parsedUrl; - if (parsed && parsed.href == req.url) { - return parsed; - } else { - return req._parsedUrl = parse(req.url); - } -}; - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api private - */ - -exports.parseBytes = require('bytes'); - -function noop() {} diff --git a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/.npmignore b/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/.travis.yml b/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/.travis.yml deleted file mode 100644 index 7a902e8c..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/.travis.yml +++ /dev/null @@ -1,8 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 -notifications: - email: - recipients: - - brianloveswords@gmail.com \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/README.md b/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/README.md deleted file mode 100644 index 0d9d8b83..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/README.md +++ /dev/null @@ -1,47 +0,0 @@ -# buffer-crc32 - -[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32) - -crc32 that works with binary data and fancy character sets, outputs -buffer, signed or unsigned data and has tests. - -Derived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix - -# install -``` -npm install buffer-crc32 -``` - -# example -```js -var crc32 = require('buffer-crc32'); -// works with buffers -var buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00]) -crc32(buf) // -> - -// has convenience methods for getting signed or unsigned ints -crc32.signed(buf) // -> -1805997238 -crc32.unsigned(buf) // -> 2488970058 - -// will cast to buffer if given a string, so you can -// directly use foreign characters safely -crc32('自動販売機') // -> - -// and works in append mode too -var partialCrc = crc32('hey'); -var partialCrc = crc32(' ', partialCrc); -var partialCrc = crc32('sup', partialCrc); -var partialCrc = crc32(' ', partialCrc); -var finalCrc = crc32('bros', partialCrc); // -> -``` - -# tests -This was tested against the output of zlib's crc32 method. You can run -the tests with`npm test` (requires tap) - -# see also -https://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also -supports buffer inputs and return unsigned ints (thanks @tjholowaychuk). - -# license -MIT/X11 diff --git a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/index.js b/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/index.js deleted file mode 100644 index e29ce3eb..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/index.js +++ /dev/null @@ -1,88 +0,0 @@ -var Buffer = require('buffer').Buffer; - -var CRC_TABLE = [ - 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, - 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, - 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, - 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, - 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, - 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, - 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, - 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, - 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, - 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, - 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, - 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, - 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, - 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, - 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, - 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, - 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, - 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, - 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, - 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, - 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, - 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, - 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, - 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, - 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, - 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, - 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, - 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, - 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, - 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, - 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, - 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, - 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, - 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, - 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, - 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, - 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, - 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, - 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, - 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, - 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, - 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, - 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, - 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, - 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, - 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, - 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, - 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, - 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, - 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, - 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, - 0x2d02ef8d -]; - -function bufferizeInt(num) { - var tmp = Buffer(4); - tmp.writeInt32BE(num, 0); - return tmp; -} - -function _crc32(buf, previous) { - if (!Buffer.isBuffer(buf)) { - buf = Buffer(buf); - } - if (Buffer.isBuffer(previous)) { - previous = previous.readUInt32BE(0); - } - var crc = ~~previous ^ -1; - for (var n = 0; n < buf.length; n++) { - crc = CRC_TABLE[(crc ^ buf[n]) & 0xff] ^ (crc >>> 8); - } - return (crc ^ -1); -} - -function crc32() { - return bufferizeInt(_crc32.apply(null, arguments)); -} -crc32.signed = function () { - return _crc32.apply(null, arguments); -}; -crc32.unsigned = function () { - return _crc32.apply(null, arguments) >>> 0; -}; - -module.exports = crc32; diff --git a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/package.json b/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/package.json deleted file mode 100644 index 4bb469a0..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "author": { - "name": "Brian J. Brennan", - "email": "brianloveswords@gmail.com", - "url": "http://bjb.io" - }, - "name": "buffer-crc32", - "description": "A pure javascript CRC32 algorithm that plays nice with binary data", - "version": "0.2.1", - "contributors": [ - { - "name": "Vladimir Kuznetsov" - } - ], - "homepage": "https://github.com/brianloveswords/buffer-crc32", - "repository": { - "type": "git", - "url": "git://github.com/brianloveswords/buffer-crc32.git" - }, - "main": "index.js", - "scripts": { - "test": "./node_modules/.bin/tap tests/*.test.js" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.5" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# buffer-crc32\n\n[![Build Status](https://secure.travis-ci.org/brianloveswords/buffer-crc32.png?branch=master)](http://travis-ci.org/brianloveswords/buffer-crc32)\n\ncrc32 that works with binary data and fancy character sets, outputs\nbuffer, signed or unsigned data and has tests.\n\nDerived from the sample CRC implementation in the PNG specification: http://www.w3.org/TR/PNG/#D-CRCAppendix\n\n# install\n```\nnpm install buffer-crc32\n```\n\n# example\n```js\nvar crc32 = require('buffer-crc32');\n// works with buffers\nvar buf = Buffer([0x00, 0x73, 0x75, 0x70, 0x20, 0x62, 0x72, 0x6f, 0x00])\ncrc32(buf) // -> \n\n// has convenience methods for getting signed or unsigned ints\ncrc32.signed(buf) // -> -1805997238\ncrc32.unsigned(buf) // -> 2488970058\n\n// will cast to buffer if given a string, so you can\n// directly use foreign characters safely\ncrc32('自動販売機') // -> \n\n// and works in append mode too\nvar partialCrc = crc32('hey');\nvar partialCrc = crc32(' ', partialCrc);\nvar partialCrc = crc32('sup', partialCrc);\nvar partialCrc = crc32(' ', partialCrc);\nvar finalCrc = crc32('bros', partialCrc); // -> \n```\n\n# tests\nThis was tested against the output of zlib's crc32 method. You can run\nthe tests with`npm test` (requires tap)\n\n# see also\nhttps://github.com/alexgorbatchev/node-crc, `crc.buffer.crc32` also\nsupports buffer inputs and return unsigned ints (thanks @tjholowaychuk).\n\n# license\nMIT/X11\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/brianloveswords/buffer-crc32/issues" - }, - "_id": "buffer-crc32@0.2.1", - "_from": "buffer-crc32@0.2.1" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/tests/crc.test.js b/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/tests/crc.test.js deleted file mode 100644 index bb0f9efc..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/buffer-crc32/tests/crc.test.js +++ /dev/null @@ -1,89 +0,0 @@ -var crc32 = require('..'); -var test = require('tap').test; - -test('simple crc32 is no problem', function (t) { - var input = Buffer('hey sup bros'); - var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); - t.same(crc32(input), expected); - t.end(); -}); - -test('another simple one', function (t) { - var input = Buffer('IEND'); - var expected = Buffer([0xae, 0x42, 0x60, 0x82]); - t.same(crc32(input), expected); - t.end(); -}); - -test('slightly more complex', function (t) { - var input = Buffer([0x00, 0x00, 0x00]); - var expected = Buffer([0xff, 0x41, 0xd9, 0x12]); - t.same(crc32(input), expected); - t.end(); -}); - -test('complex crc32 gets calculated like a champ', function (t) { - var input = Buffer('शीर्षक'); - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('casts to buffer if necessary', function (t) { - var input = 'शीर्षक'; - var expected = Buffer([0x17, 0xb8, 0xaf, 0xf1]); - t.same(crc32(input), expected); - t.end(); -}); - -test('can do signed', function (t) { - var input = 'ham sandwich'; - var expected = -1891873021; - t.same(crc32.signed(input), expected); - t.end(); -}); - -test('can do unsigned', function (t) { - var input = 'bear sandwich'; - var expected = 3711466352; - t.same(crc32.unsigned(input), expected); - t.end(); -}); - - -test('simple crc32 in append mode', function (t) { - var input = [Buffer('hey'), Buffer(' '), Buffer('sup'), Buffer(' '), Buffer('bros')]; - var expected = Buffer([0x47, 0xfa, 0x55, 0x70]); - for (var crc = 0, i = 0; i < input.length; i++) { - crc = crc32(input[i], crc); - } - t.same(crc, expected); - t.end(); -}); - - -test('can do signed in append mode', function (t) { - var input1 = 'ham'; - var input2 = ' '; - var input3 = 'sandwich'; - var expected = -1891873021; - - var crc = crc32.signed(input1); - crc = crc32.signed(input2, crc); - crc = crc32.signed(input3, crc); - - t.same(crc, expected); - t.end(); -}); - -test('can do unsigned in append mode', function (t) { - var input1 = 'bear san'; - var input2 = 'dwich'; - var expected = 3711466352; - - var crc = crc32.unsigned(input1); - crc = crc32.unsigned(input2, crc); - t.same(crc, expected); - t.end(); -}); - diff --git a/node_modules/karma/node_modules/connect/node_modules/bytes/.npmignore b/node_modules/karma/node_modules/connect/node_modules/bytes/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/bytes/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/karma/node_modules/connect/node_modules/bytes/History.md b/node_modules/karma/node_modules/connect/node_modules/bytes/History.md deleted file mode 100644 index 1332808c..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/bytes/History.md +++ /dev/null @@ -1,10 +0,0 @@ - -0.2.0 / 2012-10-28 -================== - - * bytes(200).should.eql('200b') - -0.1.0 / 2012-07-04 -================== - - * add bytes to string conversion [yields] diff --git a/node_modules/karma/node_modules/connect/node_modules/bytes/Makefile b/node_modules/karma/node_modules/connect/node_modules/bytes/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/bytes/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/bytes/Readme.md b/node_modules/karma/node_modules/connect/node_modules/bytes/Readme.md deleted file mode 100644 index 9325d5bf..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/bytes/Readme.md +++ /dev/null @@ -1,51 +0,0 @@ -# node-bytes - - Byte string parser / formatter. - -## Example: - -```js -bytes('1kb') -// => 1024 - -bytes('2mb') -// => 2097152 - -bytes('1gb') -// => 1073741824 - -bytes(1073741824) -// => 1gb -``` - -## Installation - -``` -$ npm install bytes -$ component install visionmedia/bytes.js -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/connect/node_modules/bytes/component.json b/node_modules/karma/node_modules/connect/node_modules/bytes/component.json deleted file mode 100644 index 76a6057b..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/bytes/component.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "bytes", - "description": "byte size string parser / serializer", - "keywords": ["bytes", "utility"], - "version": "0.1.0", - "scripts": ["index.js"] -} diff --git a/node_modules/karma/node_modules/connect/node_modules/bytes/index.js b/node_modules/karma/node_modules/connect/node_modules/bytes/index.js deleted file mode 100644 index 70b2e01a..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/bytes/index.js +++ /dev/null @@ -1,39 +0,0 @@ - -/** - * Parse byte `size` string. - * - * @param {String} size - * @return {Number} - * @api public - */ - -module.exports = function(size) { - if ('number' == typeof size) return convert(size); - var parts = size.match(/^(\d+(?:\.\d+)?) *(kb|mb|gb)$/) - , n = parseFloat(parts[1]) - , type = parts[2]; - - var map = { - kb: 1 << 10 - , mb: 1 << 20 - , gb: 1 << 30 - }; - - return map[type] * n; -}; - -/** - * convert bytes into string. - * - * @param {Number} b - bytes to convert - * @return {String} - * @api public - */ - -function convert (b) { - var gb = 1 << 30, mb = 1 << 20, kb = 1 << 10; - if (b >= gb) return (Math.round(b / gb * 100) / 100) + 'gb'; - if (b >= mb) return (Math.round(b / mb * 100) / 100) + 'mb'; - if (b >= kb) return (Math.round(b / kb * 100) / 100) + 'kb'; - return b + 'b'; -} diff --git a/node_modules/karma/node_modules/connect/node_modules/bytes/package.json b/node_modules/karma/node_modules/connect/node_modules/bytes/package.json deleted file mode 100644 index 0db9bc90..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/bytes/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "bytes", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "byte size string parser / serializer", - "version": "0.2.0", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "# node-bytes\n\n Byte string parser / formatter.\n\n## Example:\n\n```js\nbytes('1kb')\n// => 1024\n\nbytes('2mb')\n// => 2097152\n\nbytes('1gb')\n// => 1073741824\n\nbytes(1073741824)\n// => 1gb\n```\n\n## Installation\n\n```\n$ npm install bytes\n$ component install visionmedia/bytes.js\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "_id": "bytes@0.2.0", - "_from": "bytes@0.2.0" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/.npmignore b/node_modules/karma/node_modules/connect/node_modules/cookie-signature/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/History.md b/node_modules/karma/node_modules/connect/node_modules/cookie-signature/History.md deleted file mode 100644 index 9e301799..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/History.md +++ /dev/null @@ -1,11 +0,0 @@ - -1.0.1 / 2013-04-15 -================== - - * Revert "Changed underlying HMAC algo. to sha512." - * Revert "Fix for timing attacks on MAC verification." - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/Makefile b/node_modules/karma/node_modules/connect/node_modules/cookie-signature/Makefile deleted file mode 100644 index 4e9c8d36..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec - -.PHONY: test \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/Readme.md b/node_modules/karma/node_modules/connect/node_modules/cookie-signature/Readme.md deleted file mode 100644 index 2559e841..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/Readme.md +++ /dev/null @@ -1,42 +0,0 @@ - -# cookie-signature - - Sign and unsign cookies. - -## Example - -```js -var cookie = require('cookie-signature'); - -var val = cookie.sign('hello', 'tobiiscool'); -val.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI'); - -var val = cookie.sign('hello', 'tobiiscool'); -cookie.unsign(val, 'tobiiscool').should.equal('hello'); -cookie.unsign(val, 'luna').should.be.false; -``` - -## License - -(The MIT License) - -Copyright (c) 2012 LearnBoost <tj@learnboost.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/index.js b/node_modules/karma/node_modules/connect/node_modules/cookie-signature/index.js deleted file mode 100644 index ed62814e..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/index.js +++ /dev/null @@ -1,42 +0,0 @@ - -/** - * Module dependencies. - */ - -var crypto = require('crypto'); - -/** - * Sign the given `val` with `secret`. - * - * @param {String} val - * @param {String} secret - * @return {String} - * @api private - */ - -exports.sign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - return val + '.' + crypto - .createHmac('sha256', secret) - .update(val) - .digest('base64') - .replace(/\=+$/, ''); -}; - -/** - * Unsign and decode the given `val` with `secret`, - * returning `false` if the signature is invalid. - * - * @param {String} val - * @param {String} secret - * @return {String|Boolean} - * @api private - */ - -exports.unsign = function(val, secret){ - if ('string' != typeof val) throw new TypeError('cookie required'); - if ('string' != typeof secret) throw new TypeError('secret required'); - var str = val.slice(0, val.lastIndexOf('.')); - return exports.sign(str, secret) == val ? str : false; -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/package.json b/node_modules/karma/node_modules/connect/node_modules/cookie-signature/package.json deleted file mode 100644 index 83bea32c..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie-signature/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "cookie-signature", - "version": "1.0.1", - "description": "Sign and unsign cookies", - "keywords": [ - "cookie", - "sign", - "unsign" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@learnboost.com" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# cookie-signature\n\n Sign and unsign cookies.\n\n## Example\n\n```js\nvar cookie = require('cookie-signature');\n\nvar val = cookie.sign('hello', 'tobiiscool');\nval.should.equal('hello.DGDUkGlIkCzPz+C0B064FNgHdEjox7ch8tOBGslZ5QI');\n\nvar val = cookie.sign('hello', 'tobiiscool');\ncookie.unsign(val, 'tobiiscool').should.equal('hello');\ncookie.unsign(val, 'luna').should.be.false;\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 LearnBoost <tj@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "cookie-signature@1.0.1", - "_from": "cookie-signature@1.0.1" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/.npmignore b/node_modules/karma/node_modules/connect/node_modules/cookie/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/.travis.yml b/node_modules/karma/node_modules/connect/node_modules/cookie/.travis.yml deleted file mode 100644 index 9400c118..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.6" - - "0.8" - - "0.10" diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/LICENSE b/node_modules/karma/node_modules/connect/node_modules/cookie/LICENSE deleted file mode 100644 index 249d9def..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/LICENSE +++ /dev/null @@ -1,9 +0,0 @@ -// MIT License - -Copyright (C) Roman Shtylman - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/README.md b/node_modules/karma/node_modules/connect/node_modules/cookie/README.md deleted file mode 100644 index 5187ed1c..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/README.md +++ /dev/null @@ -1,44 +0,0 @@ -# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) # - -cookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers. - -See [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies. - -## how? - -``` -npm install cookie -``` - -```javascript -var cookie = require('cookie'); - -var hdr = cookie.serialize('foo', 'bar'); -// hdr = 'foo=bar'; - -var cookies = cookie.parse('foo=bar; cat=meow; dog=ruff'); -// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' }; -``` - -## more - -The serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values. - -### path -> cookie path - -### expires -> absolute expiration date for the cookie (Date object) - -### maxAge -> relative max age of the cookie from when the client receives it (seconds) - -### domain -> domain for the cookie - -### secure -> true or false - -### httpOnly -> true or false - diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/index.js b/node_modules/karma/node_modules/connect/node_modules/cookie/index.js deleted file mode 100644 index 16bdb65d..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/index.js +++ /dev/null @@ -1,70 +0,0 @@ - -/// Serialize the a name value pair into a cookie string suitable for -/// http headers. An optional options object specified cookie parameters -/// -/// serialize('foo', 'bar', { httpOnly: true }) -/// => "foo=bar; httpOnly" -/// -/// @param {String} name -/// @param {String} val -/// @param {Object} options -/// @return {String} -var serialize = function(name, val, opt){ - opt = opt || {}; - var enc = opt.encode || encode; - var pairs = [name + '=' + enc(val)]; - - if (opt.maxAge) pairs.push('Max-Age=' + opt.maxAge); - if (opt.domain) pairs.push('Domain=' + opt.domain); - if (opt.path) pairs.push('Path=' + opt.path); - if (opt.expires) pairs.push('Expires=' + opt.expires.toUTCString()); - if (opt.httpOnly) pairs.push('HttpOnly'); - if (opt.secure) pairs.push('Secure'); - - return pairs.join('; '); -}; - -/// Parse the given cookie header string into an object -/// The object has the various cookies as keys(names) => values -/// @param {String} str -/// @return {Object} -var parse = function(str, opt) { - opt = opt || {}; - var obj = {} - var pairs = str.split(/[;,] */); - var dec = opt.decode || decode; - - pairs.forEach(function(pair) { - var eq_idx = pair.indexOf('=') - - // skip things that don't look like key=value - if (eq_idx < 0) { - return; - } - - var key = pair.substr(0, eq_idx).trim() - var val = pair.substr(++eq_idx, pair.length).trim(); - - // quoted values - if ('"' == val[0]) { - val = val.slice(1, -1); - } - - // only assign once - if (undefined == obj[key]) { - try { - obj[key] = dec(val); - } catch (e) { - obj[key] = val; - } - } - }); - - return obj; -}; - -var encode = encodeURIComponent; -var decode = decodeURIComponent; - -module.exports.serialize = serialize; -module.exports.parse = parse; diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/package.json b/node_modules/karma/node_modules/connect/node_modules/cookie/package.json deleted file mode 100644 index aef4e078..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "author": { - "name": "Roman Shtylman", - "email": "shtylman@gmail.com" - }, - "name": "cookie", - "description": "cookie parsing and serialization", - "version": "0.1.0", - "repository": { - "type": "git", - "url": "git://github.com/shtylman/node-cookie.git" - }, - "keywords": [ - "cookie", - "cookies" - ], - "main": "index.js", - "scripts": { - "test": "mocha" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "1.x.x" - }, - "optionalDependencies": {}, - "engines": { - "node": "*" - }, - "readme": "# cookie [![Build Status](https://secure.travis-ci.org/shtylman/node-cookie.png?branch=master)](http://travis-ci.org/shtylman/node-cookie) #\n\ncookie is a basic cookie parser and serializer. It doesn't make assumptions about how you are going to deal with your cookies. It basically just provides a way to read and write the HTTP cookie headers.\n\nSee [RFC6265](http://tools.ietf.org/html/rfc6265) for details about the http header for cookies.\n\n## how?\n\n```\nnpm install cookie\n```\n\n```javascript\nvar cookie = require('cookie');\n\nvar hdr = cookie.serialize('foo', 'bar');\n// hdr = 'foo=bar';\n\nvar cookies = cookie.parse('foo=bar; cat=meow; dog=ruff');\n// cookies = { foo: 'bar', cat: 'meow', dog: 'ruff' };\n```\n\n## more\n\nThe serialize function takes a third parameter, an object, to set cookie options. See the RFC for valid values.\n\n### path\n> cookie path\n\n### expires\n> absolute expiration date for the cookie (Date object)\n\n### maxAge\n> relative max age of the cookie from when the client receives it (seconds)\n\n### domain\n> domain for the cookie\n\n### secure\n> true or false\n\n### httpOnly\n> true or false\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/shtylman/node-cookie/issues" - }, - "homepage": "https://github.com/shtylman/node-cookie", - "_id": "cookie@0.1.0", - "_from": "cookie@0.1.0" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/test/mocha.opts b/node_modules/karma/node_modules/connect/node_modules/cookie/test/mocha.opts deleted file mode 100644 index e2bfcc5a..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/test/mocha.opts +++ /dev/null @@ -1 +0,0 @@ ---ui qunit diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/test/parse.js b/node_modules/karma/node_modules/connect/node_modules/cookie/test/parse.js deleted file mode 100644 index c6c27a20..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/test/parse.js +++ /dev/null @@ -1,44 +0,0 @@ - -var assert = require('assert'); - -var cookie = require('..'); - -suite('parse'); - -test('basic', function() { - assert.deepEqual({ foo: 'bar' }, cookie.parse('foo=bar')); - assert.deepEqual({ foo: '123' }, cookie.parse('foo=123')); -}); - -test('ignore spaces', function() { - assert.deepEqual({ FOO: 'bar', baz: 'raz' }, - cookie.parse('FOO = bar; baz = raz')); -}); - -test('escaping', function() { - assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' }, - cookie.parse('foo="bar=123456789&name=Magic+Mouse"')); - - assert.deepEqual({ email: ' ",;/' }, - cookie.parse('email=%20%22%2c%3b%2f')); -}); - -test('ignore escaping error and return original value', function() { - assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar')); -}); - -test('ignore non values', function() { - assert.deepEqual({ foo: '%1', bar: 'bar' }, cookie.parse('foo=%1;bar=bar;HttpOnly;Secure')); -}); - -test('unencoded', function() { - assert.deepEqual({ foo: 'bar=123456789&name=Magic+Mouse' }, - cookie.parse('foo="bar=123456789&name=Magic+Mouse"',{ - decode: function(value) { return value; } - })); - - assert.deepEqual({ email: '%20%22%2c%3b%2f' }, - cookie.parse('email=%20%22%2c%3b%2f',{ - decode: function(value) { return value; } - })); -}) diff --git a/node_modules/karma/node_modules/connect/node_modules/cookie/test/serialize.js b/node_modules/karma/node_modules/connect/node_modules/cookie/test/serialize.js deleted file mode 100644 index 86bb8c93..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/cookie/test/serialize.js +++ /dev/null @@ -1,64 +0,0 @@ -// builtin -var assert = require('assert'); - -var cookie = require('..'); - -suite('serialize'); - -test('basic', function() { - assert.equal('foo=bar', cookie.serialize('foo', 'bar')); - assert.equal('foo=bar%20baz', cookie.serialize('foo', 'bar baz')); -}); - -test('path', function() { - assert.equal('foo=bar; Path=/', cookie.serialize('foo', 'bar', { - path: '/' - })); -}); - -test('secure', function() { - assert.equal('foo=bar; Secure', cookie.serialize('foo', 'bar', { - secure: true - })); - - assert.equal('foo=bar', cookie.serialize('foo', 'bar', { - secure: false - })); -}); - -test('domain', function() { - assert.equal('foo=bar; Domain=example.com', cookie.serialize('foo', 'bar', { - domain: 'example.com' - })); -}); - -test('httpOnly', function() { - assert.equal('foo=bar; HttpOnly', cookie.serialize('foo', 'bar', { - httpOnly: true - })); -}); - -test('maxAge', function() { - assert.equal('foo=bar; Max-Age=1000', cookie.serialize('foo', 'bar', { - maxAge: 1000 - })); -}); - -test('escaping', function() { - assert.deepEqual('cat=%2B%20', cookie.serialize('cat', '+ ')); -}); - -test('parse->serialize', function() { - - assert.deepEqual({ cat: 'foo=123&name=baz five' }, cookie.parse( - cookie.serialize('cat', 'foo=123&name=baz five'))); - - assert.deepEqual({ cat: ' ";/' }, cookie.parse( - cookie.serialize('cat', ' ";/'))); -}); - -test('unencoded', function() { - assert.deepEqual('cat=+ ', cookie.serialize('cat', '+ ', { - encode: function(value) { return value; } - })); -}) diff --git a/node_modules/karma/node_modules/connect/node_modules/debug/Readme.md b/node_modules/karma/node_modules/connect/node_modules/debug/Readme.md deleted file mode 100644 index c5a34e8b..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/debug/Readme.md +++ /dev/null @@ -1,115 +0,0 @@ -# debug - - tiny node.js debugging utility modelled after node core's debugging technique. - -## Installation - -``` -$ npm install debug -``` - -## Usage - - With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility. - -Example _app.js_: - -```js -var debug = require('debug')('http') - , http = require('http') - , name = 'My App'; - -// fake app - -debug('booting %s', name); - -http.createServer(function(req, res){ - debug(req.method + ' ' + req.url); - res.end('hello\n'); -}).listen(3000, function(){ - debug('listening'); -}); - -// fake worker of some kind - -require('./worker'); -``` - -Example _worker.js_: - -```js -var debug = require('debug')('worker'); - -setInterval(function(){ - debug('doing some work'); -}, 1000); -``` - - The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples: - - ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png) - - ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png) - -## Millisecond diff - - When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls. - - ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png) - - When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below: - _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_ - - ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png) - -## Conventions - - If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". - -## Wildcards - - The "*" character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`. - - You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with "connect:". - -## Browser support - - Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. - -```js -a = debug('worker:a'); -b = debug('worker:b'); - -setInterval(function(){ - a('doing some work'); -}, 1000); - -setInterval(function(){ - a('doing some work'); -}, 1200); -``` - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/connect/node_modules/debug/debug.js b/node_modules/karma/node_modules/connect/node_modules/debug/debug.js deleted file mode 100644 index 509dc0de..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/debug/debug.js +++ /dev/null @@ -1,137 +0,0 @@ - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - if (!debug.enabled(name)) return function(){}; - - return function(fmt){ - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (debug[name] || curr); - debug[name] = curr; - - fmt = name - + ' ' - + fmt - + ' +' + debug.humanize(ms); - - // This hackery is required for IE8 - // where `console.log` doesn't have 'apply' - window.console - && console.log - && Function.prototype.apply.call(console.log, console, arguments); - } -} - -/** - * The currently active debug mode names. - */ - -debug.names = []; -debug.skips = []; - -/** - * Enables a debug mode by name. This can include modes - * separated by a colon and wildcards. - * - * @param {String} name - * @api public - */ - -debug.enable = function(name) { - try { - localStorage.debug = name; - } catch(e){} - - var split = (name || '').split(/[\s,]+/) - , len = split.length; - - for (var i = 0; i < len; i++) { - name = split[i].replace('*', '.*?'); - if (name[0] === '-') { - debug.skips.push(new RegExp('^' + name.substr(1) + '$')); - } - else { - debug.names.push(new RegExp('^' + name + '$')); - } - } -}; - -/** - * Disable debug output. - * - * @api public - */ - -debug.disable = function(){ - debug.enable(''); -}; - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -debug.humanize = function(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -}; - -/** - * Returns true if the given mode name is enabled, false otherwise. - * - * @param {String} name - * @return {Boolean} - * @api public - */ - -debug.enabled = function(name) { - for (var i = 0, len = debug.skips.length; i < len; i++) { - if (debug.skips[i].test(name)) { - return false; - } - } - for (var i = 0, len = debug.names.length; i < len; i++) { - if (debug.names[i].test(name)) { - return true; - } - } - return false; -}; - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} - -// persist - -try { - if (window.localStorage) debug.enable(localStorage.debug); -} catch(e){} diff --git a/node_modules/karma/node_modules/connect/node_modules/debug/index.js b/node_modules/karma/node_modules/connect/node_modules/debug/index.js deleted file mode 100644 index e02c13b7..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/debug/index.js +++ /dev/null @@ -1,5 +0,0 @@ -if ('undefined' == typeof window) { - module.exports = require('./lib/debug'); -} else { - module.exports = require('./debug'); -} diff --git a/node_modules/karma/node_modules/connect/node_modules/debug/lib/debug.js b/node_modules/karma/node_modules/connect/node_modules/debug/lib/debug.js deleted file mode 100644 index 3b0a9183..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/debug/lib/debug.js +++ /dev/null @@ -1,147 +0,0 @@ -/** - * Module dependencies. - */ - -var tty = require('tty'); - -/** - * Expose `debug()` as the module. - */ - -module.exports = debug; - -/** - * Enabled debuggers. - */ - -var names = [] - , skips = []; - -(process.env.DEBUG || '') - .split(/[\s,]+/) - .forEach(function(name){ - name = name.replace('*', '.*?'); - if (name[0] === '-') { - skips.push(new RegExp('^' + name.substr(1) + '$')); - } else { - names.push(new RegExp('^' + name + '$')); - } - }); - -/** - * Colors. - */ - -var colors = [6, 2, 3, 4, 5, 1]; - -/** - * Previous debug() call. - */ - -var prev = {}; - -/** - * Previously assigned color. - */ - -var prevColor = 0; - -/** - * Is stdout a TTY? Colored output is disabled when `true`. - */ - -var isatty = tty.isatty(2); - -/** - * Select a color. - * - * @return {Number} - * @api private - */ - -function color() { - return colors[prevColor++ % colors.length]; -} - -/** - * Humanize the given `ms`. - * - * @param {Number} m - * @return {String} - * @api private - */ - -function humanize(ms) { - var sec = 1000 - , min = 60 * 1000 - , hour = 60 * min; - - if (ms >= hour) return (ms / hour).toFixed(1) + 'h'; - if (ms >= min) return (ms / min).toFixed(1) + 'm'; - if (ms >= sec) return (ms / sec | 0) + 's'; - return ms + 'ms'; -} - -/** - * Create a debugger with the given `name`. - * - * @param {String} name - * @return {Type} - * @api public - */ - -function debug(name) { - function disabled(){} - disabled.enabled = false; - - var match = skips.some(function(re){ - return re.test(name); - }); - - if (match) return disabled; - - match = names.some(function(re){ - return re.test(name); - }); - - if (!match) return disabled; - var c = color(); - - function colored(fmt) { - fmt = coerce(fmt); - - var curr = new Date; - var ms = curr - (prev[name] || curr); - prev[name] = curr; - - fmt = ' \u001b[9' + c + 'm' + name + ' ' - + '\u001b[3' + c + 'm\u001b[90m' - + fmt + '\u001b[3' + c + 'm' - + ' +' + humanize(ms) + '\u001b[0m'; - - console.error.apply(this, arguments); - } - - function plain(fmt) { - fmt = coerce(fmt); - - fmt = new Date().toUTCString() - + ' ' + name + ' ' + fmt; - console.error.apply(this, arguments); - } - - colored.enabled = plain.enabled = true; - - return isatty || process.env.DEBUG_COLORS - ? colored - : plain; -} - -/** - * Coerce `val`. - */ - -function coerce(val) { - if (val instanceof Error) return val.stack || val.message; - return val; -} diff --git a/node_modules/karma/node_modules/connect/node_modules/debug/package.json b/node_modules/karma/node_modules/connect/node_modules/debug/package.json deleted file mode 100644 index f44874e1..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/debug/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "debug", - "version": "0.7.4", - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/debug.git" - }, - "description": "small debugging utility", - "keywords": [ - "debug", - "log", - "debugger" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*" - }, - "main": "lib/debug.js", - "browser": "./debug.js", - "engines": { - "node": "*" - }, - "files": [ - "lib/debug.js", - "debug.js", - "index.js" - ], - "component": { - "scripts": { - "debug/index.js": "index.js", - "debug/debug.js": "debug.js" - } - }, - "readme": "# debug\n\n tiny node.js debugging utility modelled after node core's debugging technique.\n\n## Installation\n\n```\n$ npm install debug\n```\n\n## Usage\n\n With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` format string goodies you're used to work fine. A unique color is selected per-function for visibility.\n \nExample _app.js_:\n\n```js\nvar debug = require('debug')('http')\n , http = require('http')\n , name = 'My App';\n\n// fake app\n\ndebug('booting %s', name);\n\nhttp.createServer(function(req, res){\n debug(req.method + ' ' + req.url);\n res.end('hello\\n');\n}).listen(3000, function(){\n debug('listening');\n});\n\n// fake worker of some kind\n\nrequire('./worker');\n```\n\nExample _worker.js_:\n\n```js\nvar debug = require('debug')('worker');\n\nsetInterval(function(){\n debug('doing some work');\n}, 1000);\n```\n\n The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:\n\n ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)\n\n ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)\n\n## Millisecond diff\n\n When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the \"+NNNms\" will show you how much time was spent between calls.\n\n ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)\n\n When stderr is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:\n _(NOTE: Debug now uses stderr instead of stdout, so the correct shell command for this example is actually `DEBUG=* node example/worker 2> out &`)_\n \n ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)\n \n## Conventions\n\n If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use \":\" to separate features. For example \"bodyParser\" from Connect would then be \"connect:bodyParser\". \n\n## Wildcards\n\n The \"*\" character may be used as a wildcard. Suppose for example your library has debuggers named \"connect:bodyParser\", \"connect:compress\", \"connect:session\", instead of listing all three with `DEBUG=connect:bodyParser,connect.compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.\n\n You can also exclude specific debuggers by prefixing them with a \"-\" character. For example, `DEBUG=* -connect:*` would include all debuggers except those starting with \"connect:\".\n\n## Browser support\n\n Debug works in the browser as well, currently persisted by `localStorage`. For example if you have `worker:a` and `worker:b` as shown below, and wish to debug both type `debug.enable('worker:*')` in the console and refresh the page, this will remain until you disable with `debug.disable()`. \n\n```js\na = debug('worker:a');\nb = debug('worker:b');\n\nsetInterval(function(){\n a('doing some work');\n}, 1000);\n\nsetInterval(function(){\n a('doing some work');\n}, 1200);\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/debug/issues" - }, - "homepage": "https://github.com/visionmedia/debug", - "_id": "debug@0.7.4", - "_from": "debug@*" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/.npmignore b/node_modules/karma/node_modules/connect/node_modules/formidable/.npmignore deleted file mode 100644 index 4fbabb33..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -/test/tmp/ -*.upload -*.un~ -*.http diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/.travis.yml b/node_modules/karma/node_modules/connect/node_modules/formidable/.travis.yml deleted file mode 100644 index cb931cb0..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.8 - - 0.9 - - "0.10" diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/LICENSE b/node_modules/karma/node_modules/connect/node_modules/formidable/LICENSE deleted file mode 100644 index 38d3c9cf..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/LICENSE +++ /dev/null @@ -1,7 +0,0 @@ -Copyright (C) 2011 Felix Geisendörfer - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/Readme.md b/node_modules/karma/node_modules/connect/node_modules/formidable/Readme.md deleted file mode 100644 index 08e9eca1..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/Readme.md +++ /dev/null @@ -1,419 +0,0 @@ -# Formidable - -[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable) - -## Purpose - -A node.js module for parsing form data, especially file uploads. - -## Current status - -This module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading -and encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from -a large variety of clients and is considered production-ready. - -## Features - -* Fast (~500mb/sec), non-buffering multipart parser -* Automatically writing file uploads to disk -* Low memory footprint -* Graceful error handling -* Very high test coverage - -## Installation - -Via [npm](http://github.com/isaacs/npm): -``` -npm install formidable@latest -``` -Manually: -``` -git clone git://github.com/felixge/node-formidable.git formidable -vim my.js -# var formidable = require('./formidable'); -``` - -Note: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library. - -## Example - -Parse an incoming file upload. -```javascript -var formidable = require('formidable'), - http = require('http'), - util = require('util'); - -http.createServer(function(req, res) { - if (req.url == '/upload' && req.method.toLowerCase() == 'post') { - // parse a file upload - var form = new formidable.IncomingForm(); - - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received upload:\n\n'); - res.end(util.inspect({fields: fields, files: files})); - }); - - return; - } - - // show a file upload form - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); -}).listen(8080); -``` -## API - -### Formidable.IncomingForm -```javascript -var form = new formidable.IncomingForm() -``` -Creates a new incoming form. - -```javascript -form.encoding = 'utf-8'; -``` -Sets encoding for incoming form fields. - -```javascript -form.uploadDir = process.env.TMP || process.env.TMPDIR || process.env.TEMP || '/tmp' || process.cwd(); -``` -The directory for placing file uploads in. You can move them later on using -`fs.rename()`. The default directory is picked at module load time depending on -the first existing directory from those listed above. - -```javascript -form.keepExtensions = false; -``` -If you want the files written to `form.uploadDir` to include the extensions of the original files, set this property to `true`. - -```javascript -form.type -``` -Either 'multipart' or 'urlencoded' depending on the incoming request. - -```javascript -form.maxFieldsSize = 2 * 1024 * 1024; -``` -Limits the amount of memory a field (not file) can allocate in bytes. -If this value is exceeded, an `'error'` event is emitted. The default -size is 2MB. - -```javascript -form.maxFields = 0; -``` -Limits the number of fields that the querystring parser will decode. Defaults -to 0 (unlimited). - -```javascript -form.hash = false; -``` -If you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`. - -```javascript -form.bytesReceived -``` -The amount of bytes received for this form so far. - -```javascript -form.bytesExpected -``` -The expected number of bytes in this form. - -```javascript -form.parse(request, [cb]); -``` -Parses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback: - - -```javascript -form.parse(req, function(err, fields, files) { - // ... -}); - -form.onPart(part); -``` -You may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing. - -```javascript -form.onPart = function(part) { - part.addListener('data', function() { - // ... - }); -} -``` -If you want to use formidable to only handle certain parts for you, you can do so: -```javascript -form.onPart = function(part) { - if (!part.filename) { - // let formidable handle all non-file parts - form.handlePart(part); - } -} -``` -Check the code in this method for further inspiration. - - -### Formidable.File -```javascript -file.size = 0 -``` -The size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet. -```javascript -file.path = null -``` -The path this file is being written to. You can modify this in the `'fileBegin'` event in -case you are unhappy with the way formidable generates a temporary path for your files. -```javascript -file.name = null -``` -The name this file had according to the uploading client. -```javascript -file.type = null -``` -The mime type of this file, according to the uploading client. -```javascript -file.lastModifiedDate = null -``` -A date object (or `null`) containing the time this file was last written to. Mostly -here for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/). -```javascript -file.hash = null -``` -If hash calculation was set, you can read the hex digest out of this var. - -#### Formidable.File#toJSON() - - This method returns a JSON-representation of the file, allowing you to - `JSON.stringify()` the file which is useful for logging and responding - to requests. - -### Events - - -#### 'progress' -```javascript -form.on('progress', function(bytesReceived, bytesExpected) { -}); -``` -Emitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar. - - - -#### 'field' -```javascript -form.on('field', function(name, value) { -}); -``` - -#### 'fileBegin' - -Emitted whenever a field / value pair has been received. -```javascript -form.on('fileBegin', function(name, file) { -}); -``` - -#### 'file' - -Emitted whenever a new file is detected in the upload stream. Use this even if -you want to stream the file to somewhere else while buffering the upload on -the file system. - -Emitted whenever a field / file pair has been received. `file` is an instance of `File`. -```javascript -form.on('file', function(name, file) { -}); -``` - -#### 'error' - -Emitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events. -```javascript -form.on('error', function(err) { -}); -``` - -#### 'aborted' - - -Emitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core). -```javascript -form.on('aborted', function() { -}); -``` - -##### 'end' -```javascript -form.on('end', function() { -}); -``` -Emitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response. - - - -## Changelog - -### v1.0.14 - -* Add failing hash tests. (Ben Trask) -* Enable hash calculation again (Eugene Girshov) -* Test for immediate data events (Tim Smart) -* Re-arrange IncomingForm#parse (Tim Smart) - -### v1.0.13 - -* Only update hash if update method exists (Sven Lito) -* According to travis v0.10 needs to go quoted (Sven Lito) -* Bumping build node versions (Sven Lito) -* Additional fix for empty requests (Eugene Girshov) -* Change the default to 1000, to match the new Node behaviour. (OrangeDog) -* Add ability to control maxKeys in the querystring parser. (OrangeDog) -* Adjust test case to work with node 0.9.x (Eugene Girshov) -* Update package.json (Sven Lito) -* Path adjustment according to eb4468b (Markus Ast) - -### v1.0.12 - -* Emit error on aborted connections (Eugene Girshov) -* Add support for empty requests (Eugene Girshov) -* Fix name/filename handling in Content-Disposition (jesperp) -* Tolerate malformed closing boundary in multipart (Eugene Girshov) -* Ignore preamble in multipart messages (Eugene Girshov) -* Add support for application/json (Mike Frey, Carlos Rodriguez) -* Add support for Base64 encoding (Elmer Bulthuis) -* Add File#toJSON (TJ Holowaychuk) -* Remove support for Node.js 0.4 & 0.6 (Andrew Kelley) -* Documentation improvements (Sven Lito, Andre Azevedo) -* Add support for application/octet-stream (Ion Lupascu, Chris Scribner) -* Use os.tmpDir() to get tmp directory (Andrew Kelley) -* Improve package.json (Andrew Kelley, Sven Lito) -* Fix benchmark script (Andrew Kelley) -* Fix scope issue in incoming_forms (Sven Lito) -* Fix file handle leak on error (OrangeDog) - -### v1.0.11 - -* Calculate checksums for incoming files (sreuter) -* Add definition parameters to "IncomingForm" as an argument (Math-) - -### v1.0.10 - -* Make parts to be proper Streams (Matt Robenolt) - -### v1.0.9 - -* Emit progress when content length header parsed (Tim Koschützki) -* Fix Readme syntax due to GitHub changes (goob) -* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara) - -### v1.0.8 - -* Strip potentially unsafe characters when using `keepExtensions: true`. -* Switch to utest / urun for testing -* Add travis build - -### v1.0.7 - -* Remove file from package that was causing problems when installing on windows. (#102) -* Fix typos in Readme (Jason Davies). - -### v1.0.6 - -* Do not default to the default to the field name for file uploads where - filename="". - -### v1.0.5 - -* Support filename="" in multipart parts -* Explain unexpected end() errors in parser better - -**Note:** Starting with this version, formidable emits 'file' events for empty -file input fields. Previously those were incorrectly emitted as regular file -input fields with value = "". - -### v1.0.4 - -* Detect a good default tmp directory regardless of platform. (#88) - -### v1.0.3 - -* Fix problems with utf8 characters (#84) / semicolons in filenames (#58) -* Small performance improvements -* New test suite and fixture system - -### v1.0.2 - -* Exclude node\_modules folder from git -* Implement new `'aborted'` event -* Fix files in example folder to work with recent node versions -* Make gently a devDependency - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2) - -### v1.0.1 - -* Fix package.json to refer to proper main directory. (#68, Dean Landolt) - -[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1) - -### v1.0.0 - -* Add support for multipart boundaries that are quoted strings. (Jeff Craig) - -This marks the beginning of development on version 2.0 which will include -several architectural improvements. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0) - -### v0.9.11 - -* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki) -* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class - -**Important:** The old property names of the File class will be removed in a -future release. - -[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11) - -### Older releases - -These releases were done before starting to maintain the above Changelog: - -* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10) -* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9) -* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8) -* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7) -* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6) -* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5) -* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4) -* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3) -* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2) -* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0) -* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0) - -## License - -Formidable is licensed under the MIT license. - -## Ports - -* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable - -## Credits - -* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js deleted file mode 100644 index 49abc43e..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/benchmark/bench-multipart-parser.js +++ /dev/null @@ -1,71 +0,0 @@ -var assert = require('assert'); -require('../test/common'); -var multipartParser = require('../lib/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - Buffer = require('buffer').Buffer, - boundary = '-----------------------------168072824752491622650073', - mb = 100, - buffer = createMultipartBuffer(boundary, mb * 1024 * 1024), - callbacks = - { partBegin: -1, - partEnd: -1, - headerField: -1, - headerValue: -1, - partData: -1, - end: -1, - }; - - -parser.initWithBoundary(boundary); -parser.onHeaderField = function() { - callbacks.headerField++; -}; - -parser.onHeaderValue = function() { - callbacks.headerValue++; -}; - -parser.onPartBegin = function() { - callbacks.partBegin++; -}; - -parser.onPartData = function() { - callbacks.partData++; -}; - -parser.onPartEnd = function() { - callbacks.partEnd++; -}; - -parser.onEnd = function() { - callbacks.end++; -}; - -var start = +new Date(), - nparsed = parser.write(buffer), - duration = +new Date - start, - mbPerSec = (mb / (duration / 1000)).toFixed(2); - -console.log(mbPerSec+' mb/sec'); - -assert.equal(nparsed, buffer.length); - -function createMultipartBuffer(boundary, size) { - var head = - '--'+boundary+'\r\n' - + 'content-disposition: form-data; name="field1"\r\n' - + '\r\n' - , tail = '\r\n--'+boundary+'--\r\n' - , buffer = new Buffer(size); - - buffer.write(head, 'ascii', 0); - buffer.write(tail, 'ascii', buffer.length - tail.length); - return buffer; -} - -process.on('exit', function() { - for (var k in callbacks) { - assert.equal(0, callbacks[k], k+' count off by '+callbacks[k]); - } -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/example/json.js b/node_modules/karma/node_modules/connect/node_modules/formidable/example/json.js deleted file mode 100644 index eb8a7245..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/example/json.js +++ /dev/null @@ -1,67 +0,0 @@ -var common = require('../test/common'), - http = require('http'), - util = require('util'), - formidable = common.formidable, - Buffer = require('buffer').Buffer, - port = common.port, - server; - -server = http.createServer(function(req, res) { - if (req.method !== 'POST') { - res.writeHead(200, {'content-type': 'text/plain'}) - res.end('Please POST a JSON payload to http://localhost:'+port+'/') - return; - } - - var form = new formidable.IncomingForm(), - fields = {}; - - form - .on('error', function(err) { - res.writeHead(500, {'content-type': 'text/plain'}); - res.end('error:\n\n'+util.inspect(err)); - console.error(err); - }) - .on('field', function(field, value) { - console.log(field, value); - fields[field] = value; - }) - .on('end', function() { - console.log('-> post done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('received fields:\n\n '+util.inspect(fields)); - }); - form.parse(req); -}); -server.listen(port); - -console.log('listening on http://localhost:'+port+'/'); - - -var request = http.request({ - host: 'localhost', - path: '/', - port: port, - method: 'POST', - headers: { 'content-type':'application/json', 'content-length':48 } -}, function(response) { - var data = ''; - console.log('\nServer responded with:'); - console.log('Status:', response.statusCode); - response.pipe(process.stdout); - response.on('end', function() { - console.log('\n') - process.exit(); - }); - // response.on('data', function(chunk) { - // data += chunk.toString('utf8'); - // }); - // response.on('end', function() { - // console.log('Response Data:') - // console.log(data); - // process.exit(); - // }); -}) - -request.write('{"numbers":[1,2,3,4,5],"nested":{"key":"value"}}'); -request.end(); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/example/post.js b/node_modules/karma/node_modules/connect/node_modules/formidable/example/post.js deleted file mode 100644 index f6c15a64..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/example/post.js +++ /dev/null @@ -1,43 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url == '/post') { - var form = new formidable.IncomingForm(), - fields = []; - - form - .on('error', function(err) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('error:\n\n'+util.inspect(err)); - }) - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('end', function() { - console.log('-> post done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.end('received fields:\n\n '+util.inspect(fields)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/example/upload.js b/node_modules/karma/node_modules/connect/node_modules/formidable/example/upload.js deleted file mode 100644 index 050cdd9d..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/example/upload.js +++ /dev/null @@ -1,48 +0,0 @@ -require('../test/common'); -var http = require('http'), - util = require('util'), - formidable = require('formidable'), - server; - -server = http.createServer(function(req, res) { - if (req.url == '/') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - } else if (req.url == '/upload') { - var form = new formidable.IncomingForm(), - files = [], - fields = []; - - form.uploadDir = TEST_TMP; - - form - .on('field', function(field, value) { - console.log(field, value); - fields.push([field, value]); - }) - .on('file', function(field, file) { - console.log(field, file); - files.push([field, file]); - }) - .on('end', function() { - console.log('-> upload done'); - res.writeHead(200, {'content-type': 'text/plain'}); - res.write('received fields:\n\n '+util.inspect(fields)); - res.write('\n\n'); - res.end('received files:\n\n '+util.inspect(files)); - }); - form.parse(req); - } else { - res.writeHead(404, {'content-type': 'text/plain'}); - res.end('404'); - } -}); -server.listen(TEST_PORT); - -console.log('listening on http://localhost:'+TEST_PORT+'/'); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/index.js b/node_modules/karma/node_modules/connect/node_modules/formidable/index.js deleted file mode 100644 index 4cc88b35..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib'); \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/file.js b/node_modules/karma/node_modules/connect/node_modules/formidable/lib/file.js deleted file mode 100644 index e34c10e4..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/file.js +++ /dev/null @@ -1,72 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var util = require('util'), - WriteStream = require('fs').WriteStream, - EventEmitter = require('events').EventEmitter, - crypto = require('crypto'); - -function File(properties) { - EventEmitter.call(this); - - this.size = 0; - this.path = null; - this.name = null; - this.type = null; - this.hash = null; - this.lastModifiedDate = null; - - this._writeStream = null; - - for (var key in properties) { - this[key] = properties[key]; - } - - if(typeof this.hash === 'string') { - this.hash = crypto.createHash(properties.hash); - } else { - this.hash = null; - } -} -module.exports = File; -util.inherits(File, EventEmitter); - -File.prototype.open = function() { - this._writeStream = new WriteStream(this.path); -}; - -File.prototype.toJSON = function() { - return { - size: this.size, - path: this.path, - name: this.name, - type: this.type, - mtime: this.lastModifiedDate, - length: this.length, - filename: this.filename, - mime: this.mime - }; -}; - -File.prototype.write = function(buffer, cb) { - var self = this; - if (self.hash) { - self.hash.update(buffer); - } - this._writeStream.write(buffer, function() { - self.lastModifiedDate = new Date(); - self.size += buffer.length; - self.emit('progress', self.size); - cb(); - }); -}; - -File.prototype.end = function(cb) { - var self = this; - if (self.hash) { - self.hash = self.hash.digest('hex'); - } - this._writeStream.end(function() { - self.emit('end'); - cb(); - }); -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/incoming_form.js b/node_modules/karma/node_modules/connect/node_modules/formidable/lib/incoming_form.js deleted file mode 100644 index c2eeaf81..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/incoming_form.js +++ /dev/null @@ -1,535 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var fs = require('fs'); -var util = require('util'), - path = require('path'), - File = require('./file'), - MultipartParser = require('./multipart_parser').MultipartParser, - QuerystringParser = require('./querystring_parser').QuerystringParser, - OctetParser = require('./octet_parser').OctetParser, - JSONParser = require('./json_parser').JSONParser, - StringDecoder = require('string_decoder').StringDecoder, - EventEmitter = require('events').EventEmitter, - Stream = require('stream').Stream, - os = require('os'); - -function IncomingForm(opts) { - if (!(this instanceof IncomingForm)) return new IncomingForm(opts); - EventEmitter.call(this); - - opts=opts||{}; - - this.error = null; - this.ended = false; - - this.maxFields = opts.maxFields || 1000; - this.maxFieldsSize = opts.maxFieldsSize || 2 * 1024 * 1024; - this.keepExtensions = opts.keepExtensions || false; - this.uploadDir = opts.uploadDir || os.tmpDir(); - this.encoding = opts.encoding || 'utf-8'; - this.headers = null; - this.type = null; - this.hash = false; - - this.bytesReceived = null; - this.bytesExpected = null; - - this._parser = null; - this._flushing = 0; - this._fieldsSize = 0; - this.openedFiles = []; - - return this; -}; -util.inherits(IncomingForm, EventEmitter); -exports.IncomingForm = IncomingForm; - -IncomingForm.prototype.parse = function(req, cb) { - this.pause = function() { - try { - req.pause(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - return true; - }; - - this.resume = function() { - try { - req.resume(); - } catch (err) { - // the stream was destroyed - if (!this.ended) { - // before it was completed, crash & burn - this._error(err); - } - return false; - } - - return true; - }; - - // Setup callback first, so we don't miss anything from data events emitted - // immediately. - if (cb) { - var fields = {}, files = {}; - this - .on('field', function(name, value) { - fields[name] = value; - }) - .on('file', function(name, file) { - files[name] = file; - }) - .on('error', function(err) { - cb(err, fields, files); - }) - .on('end', function() { - cb(null, fields, files); - }); - } - - // Parse headers and setup the parser, ready to start listening for data. - this.writeHeaders(req.headers); - - // Start listening for data. - var self = this; - req - .on('error', function(err) { - self._error(err); - }) - .on('aborted', function() { - self.emit('aborted'); - self._error(new Error('Request aborted')); - }) - .on('data', function(buffer) { - self.write(buffer); - }) - .on('end', function() { - if (self.error) { - return; - } - - var err = self._parser.end(); - if (err) { - self._error(err); - } - }); - - return this; -}; - -IncomingForm.prototype.writeHeaders = function(headers) { - this.headers = headers; - this._parseContentLength(); - this._parseContentType(); -}; - -IncomingForm.prototype.write = function(buffer) { - if (!this._parser) { - this._error(new Error('unintialized parser')); - return; - } - - this.bytesReceived += buffer.length; - this.emit('progress', this.bytesReceived, this.bytesExpected); - - var bytesParsed = this._parser.write(buffer); - if (bytesParsed !== buffer.length) { - this._error(new Error('parser error, '+bytesParsed+' of '+buffer.length+' bytes parsed')); - } - - return bytesParsed; -}; - -IncomingForm.prototype.pause = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.resume = function() { - // this does nothing, unless overwritten in IncomingForm.parse - return false; -}; - -IncomingForm.prototype.onPart = function(part) { - // this method can be overwritten by the user - this.handlePart(part); -}; - -IncomingForm.prototype.handlePart = function(part) { - var self = this; - - if (part.filename === undefined) { - var value = '' - , decoder = new StringDecoder(this.encoding); - - part.on('data', function(buffer) { - self._fieldsSize += buffer.length; - if (self._fieldsSize > self.maxFieldsSize) { - self._error(new Error('maxFieldsSize exceeded, received '+self._fieldsSize+' bytes of field data')); - return; - } - value += decoder.write(buffer); - }); - - part.on('end', function() { - self.emit('field', part.name, value); - }); - return; - } - - this._flushing++; - - var file = new File({ - path: this._uploadPath(part.filename), - name: part.filename, - type: part.mime, - hash: self.hash - }); - - this.emit('fileBegin', part.name, file); - - file.open(); - this.openedFiles.push(file); - - part.on('data', function(buffer) { - self.pause(); - file.write(buffer, function() { - self.resume(); - }); - }); - - part.on('end', function() { - file.end(function() { - self._flushing--; - self.emit('file', part.name, file); - self._maybeEnd(); - }); - }); -}; - -function dummyParser(self) { - return { - end: function () { - self.ended = true; - self._maybeEnd(); - return null; - } - }; -} - -IncomingForm.prototype._parseContentType = function() { - if (this.bytesExpected === 0) { - this._parser = dummyParser(this); - return; - } - - if (!this.headers['content-type']) { - this._error(new Error('bad content-type header, no content-type')); - return; - } - - if (this.headers['content-type'].match(/octet-stream/i)) { - this._initOctetStream(); - return; - } - - if (this.headers['content-type'].match(/urlencoded/i)) { - this._initUrlencoded(); - return; - } - - if (this.headers['content-type'].match(/multipart/i)) { - var m; - if (m = this.headers['content-type'].match(/boundary=(?:"([^"]+)"|([^;]+))/i)) { - this._initMultipart(m[1] || m[2]); - } else { - this._error(new Error('bad content-type header, no multipart boundary')); - } - return; - } - - if (this.headers['content-type'].match(/json/i)) { - this._initJSONencoded(); - return; - } - - this._error(new Error('bad content-type header, unknown content-type: '+this.headers['content-type'])); -}; - -IncomingForm.prototype._error = function(err) { - if (this.error || this.ended) { - return; - } - - this.error = err; - this.pause(); - this.emit('error', err); - - if (Array.isArray(this.openedFiles)) { - this.openedFiles.forEach(function(file) { - file._writeStream.destroy(); - setTimeout(fs.unlink, 0, file.path); - }); - } -}; - -IncomingForm.prototype._parseContentLength = function() { - this.bytesReceived = 0; - if (this.headers['content-length']) { - this.bytesExpected = parseInt(this.headers['content-length'], 10); - } else if (this.headers['transfer-encoding'] === undefined) { - this.bytesExpected = 0; - } - - if (this.bytesExpected !== null) { - this.emit('progress', this.bytesReceived, this.bytesExpected); - } -}; - -IncomingForm.prototype._newParser = function() { - return new MultipartParser(); -}; - -IncomingForm.prototype._initMultipart = function(boundary) { - this.type = 'multipart'; - - var parser = new MultipartParser(), - self = this, - headerField, - headerValue, - part; - - parser.initWithBoundary(boundary); - - parser.onPartBegin = function() { - part = new Stream(); - part.readable = true; - part.headers = {}; - part.name = null; - part.filename = null; - part.mime = null; - - part.transferEncoding = 'binary'; - part.transferBuffer = ''; - - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString(self.encoding, start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString(self.encoding, start, end); - }; - - parser.onHeaderEnd = function() { - headerField = headerField.toLowerCase(); - part.headers[headerField] = headerValue; - - var m; - if (headerField == 'content-disposition') { - if (m = headerValue.match(/\bname="([^"]+)"/i)) { - part.name = m[1]; - } - - part.filename = self._fileName(headerValue); - } else if (headerField == 'content-type') { - part.mime = headerValue; - } else if (headerField == 'content-transfer-encoding') { - part.transferEncoding = headerValue.toLowerCase(); - } - - headerField = ''; - headerValue = ''; - }; - - parser.onHeadersEnd = function() { - switch(part.transferEncoding){ - case 'binary': - case '7bit': - case '8bit': - parser.onPartData = function(b, start, end) { - part.emit('data', b.slice(start, end)); - }; - - parser.onPartEnd = function() { - part.emit('end'); - }; - break; - - case 'base64': - parser.onPartData = function(b, start, end) { - part.transferBuffer += b.slice(start, end).toString('ascii'); - - /* - four bytes (chars) in base64 converts to three bytes in binary - encoding. So we should always work with a number of bytes that - can be divided by 4, it will result in a number of buytes that - can be divided vy 3. - */ - var offset = parseInt(part.transferBuffer.length / 4) * 4; - part.emit('data', new Buffer(part.transferBuffer.substring(0, offset), 'base64')) - part.transferBuffer = part.transferBuffer.substring(offset); - }; - - parser.onPartEnd = function() { - part.emit('data', new Buffer(part.transferBuffer, 'base64')) - part.emit('end'); - }; - break; - - default: - return self._error(new Error('unknown transfer-encoding')); - } - - self.onPart(part); - }; - - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._fileName = function(headerValue) { - var m = headerValue.match(/\bfilename="(.*?)"($|; )/i); - if (!m) return; - - var filename = m[1].substr(m[1].lastIndexOf('\\') + 1); - filename = filename.replace(/%22/g, '"'); - filename = filename.replace(/&#([\d]{4});/g, function(m, code) { - return String.fromCharCode(code); - }); - return filename; -}; - -IncomingForm.prototype._initUrlencoded = function() { - this.type = 'urlencoded'; - - var parser = new QuerystringParser(this.maxFields) - , self = this; - - parser.onField = function(key, val) { - self.emit('field', key, val); - }; - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._initOctetStream = function() { - this.type = 'octet-stream'; - var filename = this.headers['x-file-name']; - var mime = this.headers['content-type']; - - var file = new File({ - path: this._uploadPath(filename), - name: filename, - type: mime - }); - - file.open(); - - this.emit('fileBegin', filename, file); - - this._flushing++; - - var self = this; - - self._parser = new OctetParser(); - - //Keep track of writes that haven't finished so we don't emit the file before it's done being written - var outstandingWrites = 0; - - self._parser.on('data', function(buffer){ - self.pause(); - outstandingWrites++; - - file.write(buffer, function() { - outstandingWrites--; - self.resume(); - - if(self.ended){ - self._parser.emit('doneWritingFile'); - } - }); - }); - - self._parser.on('end', function(){ - self._flushing--; - self.ended = true; - - var done = function(){ - self.emit('file', 'file', file); - self._maybeEnd(); - }; - - if(outstandingWrites === 0){ - done(); - } else { - self._parser.once('doneWritingFile', done); - } - }); -}; - -IncomingForm.prototype._initJSONencoded = function() { - this.type = 'json'; - - var parser = new JSONParser() - , self = this; - - if (this.bytesExpected) { - parser.initWithLength(this.bytesExpected); - } - - parser.onField = function(key, val) { - self.emit('field', key, val); - } - - parser.onEnd = function() { - self.ended = true; - self._maybeEnd(); - }; - - this._parser = parser; -}; - -IncomingForm.prototype._uploadPath = function(filename) { - var name = ''; - for (var i = 0; i < 32; i++) { - name += Math.floor(Math.random() * 16).toString(16); - } - - if (this.keepExtensions) { - var ext = path.extname(filename); - ext = ext.replace(/(\.[a-z0-9]+).*/, '$1'); - - name += ext; - } - - return path.join(this.uploadDir, name); -}; - -IncomingForm.prototype._maybeEnd = function() { - if (!this.ended || this._flushing || this.error) { - return; - } - - this.emit('end'); -}; - diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/index.js b/node_modules/karma/node_modules/connect/node_modules/formidable/lib/index.js deleted file mode 100644 index 7a6e3e10..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/index.js +++ /dev/null @@ -1,3 +0,0 @@ -var IncomingForm = require('./incoming_form').IncomingForm; -IncomingForm.IncomingForm = IncomingForm; -module.exports = IncomingForm; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/json_parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/lib/json_parser.js deleted file mode 100644 index 6ce966b4..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/json_parser.js +++ /dev/null @@ -1,35 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -var Buffer = require('buffer').Buffer - -function JSONParser() { - this.data = new Buffer(''); - this.bytesWritten = 0; -}; -exports.JSONParser = JSONParser; - -JSONParser.prototype.initWithLength = function(length) { - this.data = new Buffer(length); -} - -JSONParser.prototype.write = function(buffer) { - if (this.data.length >= this.bytesWritten + buffer.length) { - buffer.copy(this.data, this.bytesWritten); - } else { - this.data = Buffer.concat([this.data, buffer]); - } - this.bytesWritten += buffer.length; - return buffer.length; -} - -JSONParser.prototype.end = function() { - try { - var fields = JSON.parse(this.data.toString('utf8')) - for (var field in fields) { - this.onField(field, fields[field]); - } - } catch (e) {} - this.data = null; - - this.onEnd(); -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/multipart_parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/lib/multipart_parser.js deleted file mode 100644 index 98a68560..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/multipart_parser.js +++ /dev/null @@ -1,324 +0,0 @@ -var Buffer = require('buffer').Buffer, - s = 0, - S = - { PARSER_UNINITIALIZED: s++, - START: s++, - START_BOUNDARY: s++, - HEADER_FIELD_START: s++, - HEADER_FIELD: s++, - HEADER_VALUE_START: s++, - HEADER_VALUE: s++, - HEADER_VALUE_ALMOST_DONE: s++, - HEADERS_ALMOST_DONE: s++, - PART_DATA_START: s++, - PART_DATA: s++, - PART_END: s++, - END: s++ - }, - - f = 1, - F = - { PART_BOUNDARY: f, - LAST_BOUNDARY: f *= 2 - }, - - LF = 10, - CR = 13, - SPACE = 32, - HYPHEN = 45, - COLON = 58, - A = 97, - Z = 122, - - lower = function(c) { - return c | 0x20; - }; - -for (s in S) { - exports[s] = S[s]; -} - -function MultipartParser() { - this.boundary = null; - this.boundaryChars = null; - this.lookbehind = null; - this.state = S.PARSER_UNINITIALIZED; - - this.index = null; - this.flags = 0; -}; -exports.MultipartParser = MultipartParser; - -MultipartParser.stateToString = function(stateNumber) { - for (var state in S) { - var number = S[state]; - if (number === stateNumber) return state; - } -}; - -MultipartParser.prototype.initWithBoundary = function(str) { - this.boundary = new Buffer(str.length+4); - this.boundary.write('\r\n--', 'ascii', 0); - this.boundary.write(str, 'ascii', 4); - this.lookbehind = new Buffer(this.boundary.length+8); - this.state = S.START; - - this.boundaryChars = {}; - for (var i = 0; i < this.boundary.length; i++) { - this.boundaryChars[this.boundary[i]] = true; - } -}; - -MultipartParser.prototype.write = function(buffer) { - var self = this, - i = 0, - len = buffer.length, - prevIndex = this.index, - index = this.index, - state = this.state, - flags = this.flags, - lookbehind = this.lookbehind, - boundary = this.boundary, - boundaryChars = this.boundaryChars, - boundaryLength = this.boundary.length, - boundaryEnd = boundaryLength - 1, - bufferLength = buffer.length, - c, - cl, - - mark = function(name) { - self[name+'Mark'] = i; - }, - clear = function(name) { - delete self[name+'Mark']; - }, - callback = function(name, buffer, start, end) { - if (start !== undefined && start === end) { - return; - } - - var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1); - if (callbackSymbol in self) { - self[callbackSymbol](buffer, start, end); - } - }, - dataCallback = function(name, clear) { - var markSymbol = name+'Mark'; - if (!(markSymbol in self)) { - return; - } - - if (!clear) { - callback(name, buffer, self[markSymbol], buffer.length); - self[markSymbol] = 0; - } else { - callback(name, buffer, self[markSymbol], i); - delete self[markSymbol]; - } - }; - - for (i = 0; i < len; i++) { - c = buffer[i]; - switch (state) { - case S.PARSER_UNINITIALIZED: - return i; - case S.START: - index = 0; - state = S.START_BOUNDARY; - case S.START_BOUNDARY: - if (index == boundary.length - 2) { - if (c != CR) { - return i; - } - index++; - break; - } else if (index - 1 == boundary.length - 2) { - if (c != LF) { - return i; - } - index = 0; - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - - if (c != boundary[index+2]) { - index = -2; - } - if (c == boundary[index+2]) { - index++; - } - break; - case S.HEADER_FIELD_START: - state = S.HEADER_FIELD; - mark('headerField'); - index = 0; - case S.HEADER_FIELD: - if (c == CR) { - clear('headerField'); - state = S.HEADERS_ALMOST_DONE; - break; - } - - index++; - if (c == HYPHEN) { - break; - } - - if (c == COLON) { - if (index == 1) { - // empty header field - return i; - } - dataCallback('headerField', true); - state = S.HEADER_VALUE_START; - break; - } - - cl = lower(c); - if (cl < A || cl > Z) { - return i; - } - break; - case S.HEADER_VALUE_START: - if (c == SPACE) { - break; - } - - mark('headerValue'); - state = S.HEADER_VALUE; - case S.HEADER_VALUE: - if (c == CR) { - dataCallback('headerValue', true); - callback('headerEnd'); - state = S.HEADER_VALUE_ALMOST_DONE; - } - break; - case S.HEADER_VALUE_ALMOST_DONE: - if (c != LF) { - return i; - } - state = S.HEADER_FIELD_START; - break; - case S.HEADERS_ALMOST_DONE: - if (c != LF) { - return i; - } - - callback('headersEnd'); - state = S.PART_DATA_START; - break; - case S.PART_DATA_START: - state = S.PART_DATA; - mark('partData'); - case S.PART_DATA: - prevIndex = index; - - if (index == 0) { - // boyer-moore derrived algorithm to safely skip non-boundary data - i += boundaryEnd; - while (i < bufferLength && !(buffer[i] in boundaryChars)) { - i += boundaryLength; - } - i -= boundaryEnd; - c = buffer[i]; - } - - if (index < boundary.length) { - if (boundary[index] == c) { - if (index == 0) { - dataCallback('partData', true); - } - index++; - } else { - index = 0; - } - } else if (index == boundary.length) { - index++; - if (c == CR) { - // CR = part boundary - flags |= F.PART_BOUNDARY; - } else if (c == HYPHEN) { - // HYPHEN = end boundary - flags |= F.LAST_BOUNDARY; - } else { - index = 0; - } - } else if (index - 1 == boundary.length) { - if (flags & F.PART_BOUNDARY) { - index = 0; - if (c == LF) { - // unset the PART_BOUNDARY flag - flags &= ~F.PART_BOUNDARY; - callback('partEnd'); - callback('partBegin'); - state = S.HEADER_FIELD_START; - break; - } - } else if (flags & F.LAST_BOUNDARY) { - if (c == HYPHEN) { - callback('partEnd'); - callback('end'); - state = S.END; - } else { - index = 0; - } - } else { - index = 0; - } - } - - if (index > 0) { - // when matching a possible boundary, keep a lookbehind reference - // in case it turns out to be a false lead - lookbehind[index-1] = c; - } else if (prevIndex > 0) { - // if our boundary turned out to be rubbish, the captured lookbehind - // belongs to partData - callback('partData', lookbehind, 0, prevIndex); - prevIndex = 0; - mark('partData'); - - // reconsider the current character even so it interrupted the sequence - // it could be the beginning of a new sequence - i--; - } - - break; - case S.END: - break; - default: - return i; - } - } - - dataCallback('headerField'); - dataCallback('headerValue'); - dataCallback('partData'); - - this.index = index; - this.state = state; - this.flags = flags; - - return len; -}; - -MultipartParser.prototype.end = function() { - var callback = function(self, name) { - var callbackSymbol = 'on'+name.substr(0, 1).toUpperCase()+name.substr(1); - if (callbackSymbol in self) { - self[callbackSymbol](); - } - }; - if ((this.state == S.HEADER_FIELD_START && this.index == 0) || - (this.state == S.PART_DATA && this.index == this.boundary.length)) { - callback(this, 'partEnd'); - callback(this, 'end'); - } else if (this.state != S.END) { - return new Error('MultipartParser.end(): stream ended unexpectedly: ' + this.explain()); - } -}; - -MultipartParser.prototype.explain = function() { - return 'state = ' + MultipartParser.stateToString(this.state); -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/octet_parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/lib/octet_parser.js deleted file mode 100644 index 6e8b5515..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/octet_parser.js +++ /dev/null @@ -1,20 +0,0 @@ -var EventEmitter = require('events').EventEmitter - , util = require('util'); - -function OctetParser(options){ - if(!(this instanceof OctetParser)) return new OctetParser(options); - EventEmitter.call(this); -} - -util.inherits(OctetParser, EventEmitter); - -exports.OctetParser = OctetParser; - -OctetParser.prototype.write = function(buffer) { - this.emit('data', buffer); - return buffer.length; -}; - -OctetParser.prototype.end = function() { - this.emit('end'); -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/querystring_parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/lib/querystring_parser.js deleted file mode 100644 index 320ce5a1..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/lib/querystring_parser.js +++ /dev/null @@ -1,27 +0,0 @@ -if (global.GENTLY) require = GENTLY.hijack(require); - -// This is a buffering parser, not quite as nice as the multipart one. -// If I find time I'll rewrite this to be fully streaming as well -var querystring = require('querystring'); - -function QuerystringParser(maxKeys) { - this.maxKeys = maxKeys; - this.buffer = ''; -}; -exports.QuerystringParser = QuerystringParser; - -QuerystringParser.prototype.write = function(buffer) { - this.buffer += buffer.toString('ascii'); - return buffer.length; -}; - -QuerystringParser.prototype.end = function() { - var fields = querystring.parse(this.buffer, '&', '=', { maxKeys: this.maxKeys }); - for (var field in fields) { - this.onField(field, fields[field]); - } - this.buffer = ''; - - this.onEnd(); -}; - diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/package.json b/node_modules/karma/node_modules/connect/node_modules/formidable/package.json deleted file mode 100644 index 4679a11a..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "formidable", - "description": "A node.js module for parsing form data, especially file uploads.", - "homepage": "https://github.com/felixge/node-formidable", - "version": "1.0.14", - "devDependencies": { - "gently": "0.8.0", - "findit": "0.1.1", - "hashish": "0.0.4", - "urun": "~0.0.6", - "utest": "0.0.3", - "request": "~2.11.4" - }, - "directories": { - "lib": "./lib" - }, - "main": "./lib/index", - "scripts": { - "test": "node test/run.js", - "clean": "rm test/tmp/*" - }, - "engines": { - "node": ">=0.8.0" - }, - "repository": { - "type": "git", - "url": "git://github.com/felixge/node-formidable.git" - }, - "bugs": { - "url": "http://github.com/felixge/node-formidable/issues" - }, - "optionalDependencies": {}, - "readme": "# Formidable\n\n[![Build Status](https://secure.travis-ci.org/felixge/node-formidable.png?branch=master)](http://travis-ci.org/felixge/node-formidable)\n\n## Purpose\n\nA node.js module for parsing form data, especially file uploads.\n\n## Current status\n\nThis module was developed for [Transloadit](http://transloadit.com/), a service focused on uploading\nand encoding images and videos. It has been battle-tested against hundreds of GB of file uploads from\na large variety of clients and is considered production-ready.\n\n## Features\n\n* Fast (~500mb/sec), non-buffering multipart parser\n* Automatically writing file uploads to disk\n* Low memory footprint\n* Graceful error handling\n* Very high test coverage\n\n## Installation\n\nVia [npm](http://github.com/isaacs/npm):\n```\nnpm install formidable@latest\n```\nManually:\n```\ngit clone git://github.com/felixge/node-formidable.git formidable\nvim my.js\n# var formidable = require('./formidable');\n```\n\nNote: Formidable requires [gently](http://github.com/felixge/node-gently) to run the unit tests, but you won't need it for just using the library.\n\n## Example\n\nParse an incoming file upload.\n```javascript\nvar formidable = require('formidable'),\n http = require('http'),\n util = require('util');\n\nhttp.createServer(function(req, res) {\n if (req.url == '/upload' && req.method.toLowerCase() == 'post') {\n // parse a file upload\n var form = new formidable.IncomingForm();\n\n form.parse(req, function(err, fields, files) {\n res.writeHead(200, {'content-type': 'text/plain'});\n res.write('received upload:\\n\\n');\n res.end(util.inspect({fields: fields, files: files}));\n });\n\n return;\n }\n\n // show a file upload form\n res.writeHead(200, {'content-type': 'text/html'});\n res.end(\n '
    '+\n '
    '+\n '
    '+\n ''+\n '
    '\n );\n}).listen(8080);\n```\n## API\n\n### Formidable.IncomingForm\n```javascript\nvar form = new formidable.IncomingForm()\n```\nCreates a new incoming form.\n\n```javascript\nform.encoding = 'utf-8';\n```\nSets encoding for incoming form fields.\n\n```javascript\nform.uploadDir = process.env.TMP || process.env.TMPDIR || process.env.TEMP || '/tmp' || process.cwd();\n```\nThe directory for placing file uploads in. You can move them later on using\n`fs.rename()`. The default directory is picked at module load time depending on\nthe first existing directory from those listed above.\n\n```javascript\nform.keepExtensions = false;\n```\nIf you want the files written to `form.uploadDir` to include the extensions of the original files, set this property to `true`.\n\n```javascript\nform.type\n```\nEither 'multipart' or 'urlencoded' depending on the incoming request.\n\n```javascript\nform.maxFieldsSize = 2 * 1024 * 1024;\n```\nLimits the amount of memory a field (not file) can allocate in bytes.\nIf this value is exceeded, an `'error'` event is emitted. The default\nsize is 2MB.\n\n```javascript\nform.maxFields = 0;\n```\nLimits the number of fields that the querystring parser will decode. Defaults\nto 0 (unlimited).\n\n```javascript\nform.hash = false;\n```\nIf you want checksums calculated for incoming files, set this to either `'sha1'` or `'md5'`.\n\n```javascript\nform.bytesReceived\n```\nThe amount of bytes received for this form so far.\n\n```javascript\nform.bytesExpected\n```\nThe expected number of bytes in this form.\n\n```javascript\nform.parse(request, [cb]);\n```\nParses an incoming node.js `request` containing form data. If `cb` is provided, all fields an files are collected and passed to the callback:\n\n\n```javascript\nform.parse(req, function(err, fields, files) {\n // ...\n});\n\nform.onPart(part);\n```\nYou may overwrite this method if you are interested in directly accessing the multipart stream. Doing so will disable any `'field'` / `'file'` events processing which would occur otherwise, making you fully responsible for handling the processing.\n\n```javascript\nform.onPart = function(part) {\n part.addListener('data', function() {\n // ...\n });\n}\n```\nIf you want to use formidable to only handle certain parts for you, you can do so:\n```javascript\nform.onPart = function(part) {\n if (!part.filename) {\n // let formidable handle all non-file parts\n form.handlePart(part);\n }\n}\n```\nCheck the code in this method for further inspiration.\n\n\n### Formidable.File\n```javascript\nfile.size = 0\n```\nThe size of the uploaded file in bytes. If the file is still being uploaded (see `'fileBegin'` event), this property says how many bytes of the file have been written to disk yet.\n```javascript\nfile.path = null\n```\nThe path this file is being written to. You can modify this in the `'fileBegin'` event in\ncase you are unhappy with the way formidable generates a temporary path for your files.\n```javascript\nfile.name = null\n```\nThe name this file had according to the uploading client.\n```javascript\nfile.type = null\n```\nThe mime type of this file, according to the uploading client.\n```javascript\nfile.lastModifiedDate = null\n```\nA date object (or `null`) containing the time this file was last written to. Mostly\nhere for compatibility with the [W3C File API Draft](http://dev.w3.org/2006/webapi/FileAPI/).\n```javascript\nfile.hash = null\n```\nIf hash calculation was set, you can read the hex digest out of this var.\n\n#### Formidable.File#toJSON()\n\n This method returns a JSON-representation of the file, allowing you to\n `JSON.stringify()` the file which is useful for logging and responding\n to requests.\n\n### Events\n\n\n#### 'progress'\n```javascript\nform.on('progress', function(bytesReceived, bytesExpected) {\n});\n```\nEmitted after each incoming chunk of data that has been parsed. Can be used to roll your own progress bar.\n\n\n\n#### 'field'\n```javascript\nform.on('field', function(name, value) {\n});\n```\n\n#### 'fileBegin'\n\nEmitted whenever a field / value pair has been received.\n```javascript\nform.on('fileBegin', function(name, file) {\n});\n```\n\n#### 'file'\n\nEmitted whenever a new file is detected in the upload stream. Use this even if\nyou want to stream the file to somewhere else while buffering the upload on\nthe file system.\n\nEmitted whenever a field / file pair has been received. `file` is an instance of `File`.\n```javascript\nform.on('file', function(name, file) {\n});\n```\n\n#### 'error'\n\nEmitted when there is an error processing the incoming form. A request that experiences an error is automatically paused, you will have to manually call `request.resume()` if you want the request to continue firing `'data'` events.\n```javascript\nform.on('error', function(err) {\n});\n```\n\n#### 'aborted'\n\n\nEmitted when the request was aborted by the user. Right now this can be due to a 'timeout' or 'close' event on the socket. In the future there will be a separate 'timeout' event (needs a change in the node core).\n```javascript\nform.on('aborted', function() {\n});\n```\n\n##### 'end'\n```javascript\nform.on('end', function() {\n});\n```\nEmitted when the entire request has been received, and all contained files have finished flushing to disk. This is a great place for you to send your response.\n\n\n\n## Changelog\n\n### v1.0.14\n\n* Add failing hash tests. (Ben Trask)\n* Enable hash calculation again (Eugene Girshov)\n* Test for immediate data events (Tim Smart)\n* Re-arrange IncomingForm#parse (Tim Smart)\n\n### v1.0.13\n\n* Only update hash if update method exists (Sven Lito)\n* According to travis v0.10 needs to go quoted (Sven Lito)\n* Bumping build node versions (Sven Lito)\n* Additional fix for empty requests (Eugene Girshov)\n* Change the default to 1000, to match the new Node behaviour. (OrangeDog)\n* Add ability to control maxKeys in the querystring parser. (OrangeDog)\n* Adjust test case to work with node 0.9.x (Eugene Girshov)\n* Update package.json (Sven Lito)\n* Path adjustment according to eb4468b (Markus Ast)\n\n### v1.0.12\n\n* Emit error on aborted connections (Eugene Girshov)\n* Add support for empty requests (Eugene Girshov)\n* Fix name/filename handling in Content-Disposition (jesperp)\n* Tolerate malformed closing boundary in multipart (Eugene Girshov)\n* Ignore preamble in multipart messages (Eugene Girshov)\n* Add support for application/json (Mike Frey, Carlos Rodriguez)\n* Add support for Base64 encoding (Elmer Bulthuis)\n* Add File#toJSON (TJ Holowaychuk)\n* Remove support for Node.js 0.4 & 0.6 (Andrew Kelley)\n* Documentation improvements (Sven Lito, Andre Azevedo)\n* Add support for application/octet-stream (Ion Lupascu, Chris Scribner)\n* Use os.tmpDir() to get tmp directory (Andrew Kelley)\n* Improve package.json (Andrew Kelley, Sven Lito)\n* Fix benchmark script (Andrew Kelley)\n* Fix scope issue in incoming_forms (Sven Lito)\n* Fix file handle leak on error (OrangeDog)\n\n### v1.0.11\n\n* Calculate checksums for incoming files (sreuter)\n* Add definition parameters to \"IncomingForm\" as an argument (Math-)\n\n### v1.0.10\n\n* Make parts to be proper Streams (Matt Robenolt)\n\n### v1.0.9\n\n* Emit progress when content length header parsed (Tim Koschützki)\n* Fix Readme syntax due to GitHub changes (goob)\n* Replace references to old 'sys' module in Readme with 'util' (Peter Sugihara)\n\n### v1.0.8\n\n* Strip potentially unsafe characters when using `keepExtensions: true`.\n* Switch to utest / urun for testing\n* Add travis build\n\n### v1.0.7\n\n* Remove file from package that was causing problems when installing on windows. (#102)\n* Fix typos in Readme (Jason Davies).\n\n### v1.0.6\n\n* Do not default to the default to the field name for file uploads where\n filename=\"\".\n\n### v1.0.5\n\n* Support filename=\"\" in multipart parts\n* Explain unexpected end() errors in parser better\n\n**Note:** Starting with this version, formidable emits 'file' events for empty\nfile input fields. Previously those were incorrectly emitted as regular file\ninput fields with value = \"\".\n\n### v1.0.4\n\n* Detect a good default tmp directory regardless of platform. (#88)\n\n### v1.0.3\n\n* Fix problems with utf8 characters (#84) / semicolons in filenames (#58)\n* Small performance improvements\n* New test suite and fixture system\n\n### v1.0.2\n\n* Exclude node\\_modules folder from git\n* Implement new `'aborted'` event\n* Fix files in example folder to work with recent node versions\n* Make gently a devDependency\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.1...v1.0.2)\n\n### v1.0.1\n\n* Fix package.json to refer to proper main directory. (#68, Dean Landolt)\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v1.0.0...v1.0.1)\n\n### v1.0.0\n\n* Add support for multipart boundaries that are quoted strings. (Jeff Craig)\n\nThis marks the beginning of development on version 2.0 which will include\nseveral architectural improvements.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.11...v1.0.0)\n\n### v0.9.11\n\n* Emit `'progress'` event when receiving data, regardless of parsing it. (Tim Koschützki)\n* Use [W3C FileAPI Draft](http://dev.w3.org/2006/webapi/FileAPI/) properties for File class\n\n**Important:** The old property names of the File class will be removed in a\nfuture release.\n\n[See Commits](https://github.com/felixge/node-formidable/compare/v0.9.10...v0.9.11)\n\n### Older releases\n\nThese releases were done before starting to maintain the above Changelog:\n\n* [v0.9.10](https://github.com/felixge/node-formidable/compare/v0.9.9...v0.9.10)\n* [v0.9.9](https://github.com/felixge/node-formidable/compare/v0.9.8...v0.9.9)\n* [v0.9.8](https://github.com/felixge/node-formidable/compare/v0.9.7...v0.9.8)\n* [v0.9.7](https://github.com/felixge/node-formidable/compare/v0.9.6...v0.9.7)\n* [v0.9.6](https://github.com/felixge/node-formidable/compare/v0.9.5...v0.9.6)\n* [v0.9.5](https://github.com/felixge/node-formidable/compare/v0.9.4...v0.9.5)\n* [v0.9.4](https://github.com/felixge/node-formidable/compare/v0.9.3...v0.9.4)\n* [v0.9.3](https://github.com/felixge/node-formidable/compare/v0.9.2...v0.9.3)\n* [v0.9.2](https://github.com/felixge/node-formidable/compare/v0.9.1...v0.9.2)\n* [v0.9.1](https://github.com/felixge/node-formidable/compare/v0.9.0...v0.9.1)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.9.0](https://github.com/felixge/node-formidable/compare/v0.8.0...v0.9.0)\n* [v0.1.0](https://github.com/felixge/node-formidable/commits/v0.1.0)\n\n## License\n\nFormidable is licensed under the MIT license.\n\n## Ports\n\n* [multipart-parser](http://github.com/FooBarWidget/multipart-parser): a C++ parser based on formidable\n\n## Credits\n\n* [Ryan Dahl](http://twitter.com/ryah) for his work on [http-parser](http://github.com/ry/http-parser) which heavily inspired multipart_parser.js\n", - "readmeFilename": "Readme.md", - "dependencies": {}, - "_id": "formidable@1.0.14", - "_from": "formidable@1.0.14" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/common.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/common.js deleted file mode 100644 index 6a942951..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/common.js +++ /dev/null @@ -1,18 +0,0 @@ -var path = require('path'); - -var root = path.join(__dirname, '../'); -exports.dir = { - root : root, - lib : root + '/lib', - fixture : root + '/test/fixture', - tmp : root + '/test/tmp', -}; - -exports.port = 13532; - -exports.formidable = require('..'); -exports.assert = require('assert'); - -exports.require = function(lib) { - return require(exports.dir.lib + '/' + lib); -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/beta-sticker-1.png b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/beta-sticker-1.png deleted file mode 100644 index 20b1a7f1..00000000 Binary files a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/beta-sticker-1.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/binaryfile.tar.gz b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/binaryfile.tar.gz deleted file mode 100644 index 4a85af7a..00000000 Binary files a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/binaryfile.tar.gz and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/blank.gif b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/blank.gif deleted file mode 100755 index 75b945d2..00000000 Binary files a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/blank.gif and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt deleted file mode 100644 index e7a4785e..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/funkyfilename.txt +++ /dev/null @@ -1 +0,0 @@ -I am a text file with a funky name! diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/menu_separator.png b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/menu_separator.png deleted file mode 100644 index 1c16a71e..00000000 Binary files a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/menu_separator.png and /dev/null differ diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt deleted file mode 100644 index 9b6903e2..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/file/plain.txt +++ /dev/null @@ -1 +0,0 @@ -I am a plain text file diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md deleted file mode 100644 index 3c9dbe3d..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/http/special-chars-in-filename/info.md +++ /dev/null @@ -1,3 +0,0 @@ -* Opera does not allow submitting this file, it shows a warning to the - user that the file could not be found instead. Tested in 9.8, 11.51 on OSX. - Reported to Opera on 08.09.2011 (tracking email DSK-346009@bugs.opera.com). diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/encoding.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/encoding.js deleted file mode 100644 index fc220265..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/encoding.js +++ /dev/null @@ -1,24 +0,0 @@ -module.exports['menu_seperator.png.http'] = [ - {type: 'file', name: 'image', filename: 'menu_separator.png', fixture: 'menu_separator.png', - sha1: 'c845ca3ea794be298f2a1b79769b71939eaf4e54'} -]; - -module.exports['beta-sticker-1.png.http'] = [ - {type: 'file', name: 'sticker', filename: 'beta-sticker-1.png', fixture: 'beta-sticker-1.png', - sha1: '6abbcffd12b4ada5a6a084fe9e4584f846331bc4'} -]; - -module.exports['blank.gif.http'] = [ - {type: 'file', name: 'file', filename: 'blank.gif', fixture: 'blank.gif', - sha1: 'a1fdee122b95748d81cee426d717c05b5174fe96'} -]; - -module.exports['binaryfile.tar.gz.http'] = [ - {type: 'file', name: 'file', filename: 'binaryfile.tar.gz', fixture: 'binaryfile.tar.gz', - sha1: 'cfabe13b348e5e69287d677860880c52a69d2155'} -]; - -module.exports['plain.txt.http'] = [ - {type: 'file', name: 'file', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'} -]; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/misc.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/misc.js deleted file mode 100644 index 4489176d..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/misc.js +++ /dev/null @@ -1,6 +0,0 @@ -module.exports = { - 'empty.http': [], - 'empty-urlencoded.http': [], - 'empty-multipart.http': [], - 'minimal.http': [], -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js deleted file mode 100644 index f03b4f01..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/no-filename.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports['generic.http'] = [ - {type: 'file', name: 'upload', filename: '', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; - -module.exports['filename-name.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/preamble.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/preamble.js deleted file mode 100644 index d2e4cfdb..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/preamble.js +++ /dev/null @@ -1,9 +0,0 @@ -module.exports['crlf.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; - -module.exports['preamble.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js deleted file mode 100644 index eb76fdc1..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/special-chars-in-filename.js +++ /dev/null @@ -1,21 +0,0 @@ -var properFilename = 'funkyfilename.txt'; - -function expect(filename) { - return [ - {type: 'field', name: 'title', value: 'Weird filename'}, - {type: 'file', name: 'upload', filename: filename, fixture: properFilename}, - ]; -}; - -var webkit = " ? % * | \" < > . ? ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; -var ffOrIe = " ? % * | \" < > . ☃ ; ' @ # $ ^ & ( ) - _ = + { } [ ] ` ~.txt"; - -module.exports = { - 'osx-chrome-13.http' : expect(webkit), - 'osx-firefox-3.6.http' : expect(ffOrIe), - 'osx-safari-5.http' : expect(webkit), - 'xp-chrome-12.http' : expect(webkit), - 'xp-ie-7.http' : expect(ffOrIe), - 'xp-ie-8.http' : expect(ffOrIe), - 'xp-safari-5.http' : expect(webkit), -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/workarounds.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/workarounds.js deleted file mode 100644 index e59c5b26..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/js/workarounds.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports['missing-hyphens1.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; -module.exports['missing-hyphens2.http'] = [ - {type: 'file', name: 'upload', filename: 'plain.txt', fixture: 'plain.txt', - sha1: 'b31d07bac24ac32734de88b3687dddb10e976872'}, -]; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/multipart.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/multipart.js deleted file mode 100644 index a4761699..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/fixture/multipart.js +++ /dev/null @@ -1,72 +0,0 @@ -exports['rfc1867'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['noTrailing\r\n'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--', - parts: - [ { headers: { - 'content-disposition': 'form-data; name="field1"', - }, - data: 'Joe Blow\r\nalmost tricked you!', - }, - { headers: { - 'content-disposition': 'form-data; name="pics"; filename="file1.txt"', - 'Content-Type': 'text/plain', - }, - data: '... contents of file1.txt ...\r', - } - ] - }; - -exports['emptyHeader'] = - { boundary: 'AaB03x', - raw: - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="field1"\r\n'+ - ': foo\r\n'+ - '\r\n'+ - 'Joe Blow\r\nalmost tricked you!\r\n'+ - '--AaB03x\r\n'+ - 'content-disposition: form-data; name="pics"; filename="file1.txt"\r\n'+ - 'Content-Type: text/plain\r\n'+ - '\r\n'+ - '... contents of file1.txt ...\r\r\n'+ - '--AaB03x--\r\n', - expectError: true, - }; diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js deleted file mode 100644 index 8e10ac97..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-fixtures.js +++ /dev/null @@ -1,96 +0,0 @@ -var hashish = require('hashish'); -var fs = require('fs'); -var findit = require('findit'); -var path = require('path'); -var http = require('http'); -var net = require('net'); -var assert = require('assert'); - -var common = require('../common'); -var formidable = common.formidable; - -var server = http.createServer(); -server.listen(common.port, findFixtures); - -function findFixtures() { - var fixtures = []; - findit - .sync(common.dir.fixture + '/js') - .forEach(function(jsPath) { - if (!/\.js$/.test(jsPath)) return; - - var group = path.basename(jsPath, '.js'); - hashish.forEach(require(jsPath), function(fixture, name) { - fixtures.push({ - name : group + '/' + name, - fixture : fixture, - }); - }); - }); - - testNext(fixtures); -} - -function testNext(fixtures) { - var fixture = fixtures.shift(); - if (!fixture) return server.close(); - - var name = fixture.name; - var fixture = fixture.fixture; - - uploadFixture(name, function(err, parts) { - if (err) throw err; - - fixture.forEach(function(expectedPart, i) { - var parsedPart = parts[i]; - assert.equal(parsedPart.type, expectedPart.type); - assert.equal(parsedPart.name, expectedPart.name); - - if (parsedPart.type === 'file') { - var file = parsedPart.value; - assert.equal(file.name, expectedPart.filename); - if(expectedPart.sha1) assert.equal(file.hash, expectedPart.sha1); - } - }); - - testNext(fixtures); - }); -}; - -function uploadFixture(name, cb) { - server.once('request', function(req, res) { - var form = new formidable.IncomingForm(); - form.uploadDir = common.dir.tmp; - form.hash = "sha1"; - form.parse(req); - - function callback() { - var realCallback = cb; - cb = function() {}; - realCallback.apply(null, arguments); - } - - var parts = []; - form - .on('error', callback) - .on('fileBegin', function(name, value) { - parts.push({type: 'file', name: name, value: value}); - }) - .on('field', function(name, value) { - parts.push({type: 'field', name: name, value: value}); - }) - .on('end', function() { - res.end('OK'); - callback(null, parts); - }); - }); - - var socket = net.createConnection(common.port); - var file = fs.createReadStream(common.dir.fixture + '/http/' + name); - - file.pipe(socket, {end: false}); - socket.on('data', function () { - socket.end(); - }); - -} diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-json.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-json.js deleted file mode 100644 index 28e758e5..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-json.js +++ /dev/null @@ -1,38 +0,0 @@ -var common = require('../common'); -var formidable = common.formidable; -var http = require('http'); -var assert = require('assert'); - -var testData = { - numbers: [1, 2, 3, 4, 5], - nested: { key: 'value' } -}; - -var server = http.createServer(function(req, res) { - var form = new formidable.IncomingForm(); - - form.parse(req, function(err, fields, files) { - assert.deepEqual(fields, testData); - - res.end(); - server.close(); - }); -}); - -var port = common.port; - -server.listen(port, function(err){ - assert.equal(err, null); - - var request = http.request({ - port: port, - method: 'POST', - headers: { - 'Content-Type': 'application/json' - } - }); - - request.write(JSON.stringify(testData)); - request.end(); -}); - diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-octet-stream.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-octet-stream.js deleted file mode 100644 index 643d2c6f..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/integration/test-octet-stream.js +++ /dev/null @@ -1,45 +0,0 @@ -var common = require('../common'); -var formidable = common.formidable; -var http = require('http'); -var fs = require('fs'); -var path = require('path'); -var hashish = require('hashish'); -var assert = require('assert'); - -var testFilePath = path.join(__dirname, '../fixture/file/binaryfile.tar.gz'); - -var server = http.createServer(function(req, res) { - var form = new formidable.IncomingForm(); - - form.parse(req, function(err, fields, files) { - assert.equal(hashish(files).length, 1); - var file = files.file; - - assert.equal(file.size, 301); - - var uploaded = fs.readFileSync(file.path); - var original = fs.readFileSync(testFilePath); - - assert.deepEqual(uploaded, original); - - res.end(); - server.close(); - }); -}); - -var port = common.port; - -server.listen(port, function(err){ - assert.equal(err, null); - - var request = http.request({ - port: port, - method: 'POST', - headers: { - 'Content-Type': 'application/octet-stream' - } - }); - - fs.createReadStream(testFilePath).pipe(request); -}); - diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/common.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/common.js deleted file mode 100644 index 2b985981..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/common.js +++ /dev/null @@ -1,24 +0,0 @@ -var path = require('path'), - fs = require('fs'); - -try { - global.Gently = require('gently'); -} catch (e) { - throw new Error('this test suite requires node-gently'); -} - -exports.lib = path.join(__dirname, '../../lib'); - -global.GENTLY = new Gently(); - -global.assert = require('assert'); -global.TEST_PORT = 13532; -global.TEST_FIXTURES = path.join(__dirname, '../fixture'); -global.TEST_TMP = path.join(__dirname, '../tmp'); - -// Stupid new feature in node that complains about gently attaching too many -// listeners to process 'exit'. This is a workaround until I can think of a -// better way to deal with this. -if (process.setMaxListeners) { - process.setMaxListeners(10000); -} diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js deleted file mode 100644 index 75232aa4..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/integration/test-multipart-parser.js +++ /dev/null @@ -1,80 +0,0 @@ -var common = require('../common'); -var CHUNK_LENGTH = 10, - multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - parser = new MultipartParser(), - fixtures = require(TEST_FIXTURES + '/multipart'), - Buffer = require('buffer').Buffer; - -Object.keys(fixtures).forEach(function(name) { - var fixture = fixtures[name], - buffer = new Buffer(Buffer.byteLength(fixture.raw, 'binary')), - offset = 0, - chunk, - nparsed, - - parts = [], - part = null, - headerField, - headerValue, - endCalled = ''; - - parser.initWithBoundary(fixture.boundary); - parser.onPartBegin = function() { - part = {headers: {}, data: ''}; - parts.push(part); - headerField = ''; - headerValue = ''; - }; - - parser.onHeaderField = function(b, start, end) { - headerField += b.toString('ascii', start, end); - }; - - parser.onHeaderValue = function(b, start, end) { - headerValue += b.toString('ascii', start, end); - } - - parser.onHeaderEnd = function() { - part.headers[headerField] = headerValue; - headerField = ''; - headerValue = ''; - }; - - parser.onPartData = function(b, start, end) { - var str = b.toString('ascii', start, end); - part.data += b.slice(start, end); - } - - parser.onEnd = function() { - endCalled = true; - } - - buffer.write(fixture.raw, 'binary', 0); - - while (offset < buffer.length) { - if (offset + CHUNK_LENGTH < buffer.length) { - chunk = buffer.slice(offset, offset+CHUNK_LENGTH); - } else { - chunk = buffer.slice(offset, buffer.length); - } - offset = offset + CHUNK_LENGTH; - - nparsed = parser.write(chunk); - if (nparsed != chunk.length) { - if (fixture.expectError) { - return; - } - puts('-- ERROR --'); - p(chunk.toString('ascii')); - throw new Error(chunk.length+' bytes written, but only '+nparsed+' bytes parsed!'); - } - } - - if (fixture.expectError) { - throw new Error('expected parse error did not happen'); - } - - assert.ok(endCalled); - assert.deepEqual(parts, fixture.parts); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js deleted file mode 100644 index 52ceedb4..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-file.js +++ /dev/null @@ -1,104 +0,0 @@ -var common = require('../common'); -var WriteStreamStub = GENTLY.stub('fs', 'WriteStream'); - -var File = require(common.lib + '/file'), - EventEmitter = require('events').EventEmitter, - file, - gently; - -function test(test) { - gently = new Gently(); - file = new File(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.ok(file instanceof EventEmitter); - assert.strictEqual(file.size, 0); - assert.strictEqual(file.path, null); - assert.strictEqual(file.name, null); - assert.strictEqual(file.type, null); - assert.strictEqual(file.lastModifiedDate, null); - - assert.strictEqual(file._writeStream, null); - - (function testSetProperties() { - var file2 = new File({foo: 'bar'}); - assert.equal(file2.foo, 'bar'); - })(); -}); - -test(function open() { - var WRITE_STREAM; - file.path = '/foo'; - - gently.expect(WriteStreamStub, 'new', function (path) { - WRITE_STREAM = this; - assert.strictEqual(path, file.path); - }); - - file.open(); - assert.strictEqual(file._writeStream, WRITE_STREAM); -}); - -test(function write() { - var BUFFER = {length: 10}, - CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'write', function (buffer, cb) { - assert.strictEqual(buffer, BUFFER); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.ok(file.lastModifiedDate instanceof Date); - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 10); - }); - - cb(); - - gently.expect(file, 'emit', function (event, bytesWritten) { - assert.equal(event, 'progress'); - assert.equal(bytesWritten, file.size); - }); - - CB_STUB = gently.expect(function writeCb() { - assert.equal(file.size, 20); - }); - - cb(); - }); - - file.write(BUFFER, CB); -}); - -test(function end() { - var CB_STUB, - CB = function() { - CB_STUB.apply(this, arguments); - }; - - file._writeStream = {}; - - gently.expect(file._writeStream, 'end', function (cb) { - gently.expect(file, 'emit', function (event) { - assert.equal(event, 'end'); - }); - - CB_STUB = gently.expect(function endCb() { - }); - - cb(); - }); - - file.end(CB); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js deleted file mode 100644 index 25bd887f..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-incoming-form.js +++ /dev/null @@ -1,756 +0,0 @@ -var common = require('../common'); -var MultipartParserStub = GENTLY.stub('./multipart_parser', 'MultipartParser'), - QuerystringParserStub = GENTLY.stub('./querystring_parser', 'QuerystringParser'), - EventEmitterStub = GENTLY.stub('events', 'EventEmitter'), - StreamStub = GENTLY.stub('stream', 'Stream'), - FileStub = GENTLY.stub('./file'); - -var formidable = require(common.lib + '/index'), - IncomingForm = formidable.IncomingForm, - events = require('events'), - fs = require('fs'), - path = require('path'), - Buffer = require('buffer').Buffer, - fixtures = require(TEST_FIXTURES + '/multipart'), - form, - gently; - -function test(test) { - gently = new Gently(); - gently.expect(EventEmitterStub, 'call'); - form = new IncomingForm(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.strictEqual(form.error, null); - assert.strictEqual(form.ended, false); - assert.strictEqual(form.type, null); - assert.strictEqual(form.headers, null); - assert.strictEqual(form.keepExtensions, false); - // Can't assume dir === '/tmp' for portability - // assert.strictEqual(form.uploadDir, '/tmp'); - // Make sure it is a directory instead - assert.doesNotThrow(function () { - assert(fs.statSync(form.uploadDir).isDirectory()); - }); - assert.strictEqual(form.encoding, 'utf-8'); - assert.strictEqual(form.bytesReceived, null); - assert.strictEqual(form.bytesExpected, null); - assert.strictEqual(form.maxFieldsSize, 2 * 1024 * 1024); - assert.strictEqual(form._parser, null); - assert.strictEqual(form._flushing, 0); - assert.strictEqual(form._fieldsSize, 0); - assert.ok(form instanceof EventEmitterStub); - assert.equal(form.constructor.name, 'IncomingForm'); - - (function testSimpleConstructor() { - gently.expect(EventEmitterStub, 'call'); - var form = IncomingForm(); - assert.ok(form instanceof IncomingForm); - })(); - - (function testSimpleConstructorShortcut() { - gently.expect(EventEmitterStub, 'call'); - var form = formidable(); - assert.ok(form instanceof IncomingForm); - })(); -}); - -test(function parse() { - var REQ = {headers: {}} - , emit = {}; - - gently.expect(form, 'writeHeaders', function(headers) { - assert.strictEqual(headers, REQ.headers); - }); - - var EVENTS = ['error', 'aborted', 'data', 'end']; - gently.expect(REQ, 'on', EVENTS.length, function(event, fn) { - assert.equal(event, EVENTS.shift()); - emit[event] = fn; - return this; - }); - - form.parse(REQ); - - (function testPause() { - gently.expect(REQ, 'pause'); - assert.strictEqual(form.pause(), true); - })(); - - (function testPauseCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testPauseHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'pause', function() { - throw ERR; - }); - - assert.strictEqual(form.pause(), false); - })(); - - (function testResume() { - gently.expect(REQ, 'resume'); - assert.strictEqual(form.resume(), true); - })(); - - (function testResumeCriticalException() { - form.ended = false; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testResumeHarmlessException() { - form.ended = true; - - var ERR = new Error('dasdsa'); - gently.expect(REQ, 'resume', function() { - throw ERR; - }); - - assert.strictEqual(form.resume(), false); - })(); - - (function testEmitError() { - var ERR = new Error('something bad happened'); - gently.expect(form, '_error',function(err) { - assert.strictEqual(err, ERR); - }); - emit.error(ERR); - })(); - - (function testEmitAborted() { - gently.expect(form, 'emit',function(event) { - assert.equal(event, 'aborted'); - }); - gently.expect(form, '_error'); - - emit.aborted(); - })(); - - - (function testEmitData() { - var BUFFER = [1, 2, 3]; - gently.expect(form, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - }); - emit.data(BUFFER); - })(); - - (function testEmitEnd() { - form._parser = {}; - - (function testWithError() { - var ERR = new Error('haha'); - gently.expect(form._parser, 'end', function() { - return ERR; - }); - - gently.expect(form, '_error', function(err) { - assert.strictEqual(err, ERR); - }); - - emit.end(); - })(); - - (function testWithoutError() { - gently.expect(form._parser, 'end'); - emit.end(); - })(); - - (function testAfterError() { - form.error = true; - emit.end(); - })(); - })(); - - (function testWithCallback() { - gently.expect(EventEmitterStub, 'call'); - var form = new IncomingForm(), - REQ = {headers: {}}, - parseCalled = 0; - - gently.expect(form, 'on', 4, function(event, fn) { - if (event == 'field') { - fn('field1', 'foo'); - fn('field1', 'bar'); - fn('field2', 'nice'); - } - - if (event == 'file') { - fn('file1', '1'); - fn('file1', '2'); - fn('file2', '3'); - } - - if (event == 'end') { - fn(); - } - return this; - }); - - gently.expect(form, 'writeHeaders'); - - gently.expect(REQ, 'on', 4, function() { - return this; - }); - - var parseCbOk = function (err, fields, files) { - assert.deepEqual(fields, {field1: 'bar', field2: 'nice'}); - assert.deepEqual(files, {file1: '2', file2: '3'}); - }; - form.parse(REQ, parseCbOk); - - var ERR = new Error('test'); - gently.expect(form, 'on', 3, function(event, fn) { - if (event == 'field') { - fn('foo', 'bar'); - } - - if (event == 'error') { - fn(ERR); - gently.expect(form, 'on'); - gently.expect(form, 'writeHeaders'); - gently.expect(REQ, 'on', 4, function() { - return this; - }); - } - return this; - }); - - form.parse(REQ, function parseCbErr(err, fields, files) { - assert.strictEqual(err, ERR); - assert.deepEqual(fields, {foo: 'bar'}); - }); - })(); - - (function testWriteOrder() { - gently.expect(EventEmitterStub, 'call'); - var form = new IncomingForm(); - var REQ = new events.EventEmitter(); - var BUF = {}; - var DATACB = null; - - REQ.on('newListener', function(event, fn) { - if ('data' === event) fn(BUF); - }); - - gently.expect(form, 'writeHeaders'); - gently.expect(form, 'write', function(buf) { - assert.strictEqual(buf, BUF); - }); - - form.parse(REQ); - })(); -}); - -test(function pause() { - assert.strictEqual(form.pause(), false); -}); - -test(function resume() { - assert.strictEqual(form.resume(), false); -}); - - -test(function writeHeaders() { - var HEADERS = {}; - gently.expect(form, '_parseContentLength'); - gently.expect(form, '_parseContentType'); - - form.writeHeaders(HEADERS); - assert.strictEqual(form.headers, HEADERS); -}); - -test(function write() { - var parser = {}, - BUFFER = [1, 2, 3]; - - form._parser = parser; - form.bytesExpected = 523423; - - (function testBasic() { - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, BUFFER.length); - assert.equal(bytesExpected, form.bytesExpected); - }); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length; - }); - - assert.equal(form.write(BUFFER), BUFFER.length); - assert.equal(form.bytesReceived, BUFFER.length); - })(); - - (function testParserError() { - gently.expect(form, 'emit'); - - gently.expect(parser, 'write', function(buffer) { - assert.strictEqual(buffer, BUFFER); - return buffer.length - 1; - }); - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/parser error/i)); - }); - - assert.equal(form.write(BUFFER), BUFFER.length - 1); - assert.equal(form.bytesReceived, BUFFER.length + BUFFER.length); - })(); - - (function testUninitialized() { - delete form._parser; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unintialized parser/i)); - }); - form.write(BUFFER); - })(); -}); - -test(function parseContentType() { - var HEADERS = {}; - - form.headers = {'content-type': 'application/x-www-form-urlencoded'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - // accept anything that has 'urlencoded' in it - form.headers = {'content-type': 'broken-client/urlencoded-stupid'}; - gently.expect(form, '_initUrlencoded'); - form._parseContentType(); - - var BOUNDARY = '---------------------------57814261102167618332366269'; - form.headers = {'content-type': 'multipart/form-data; boundary='+BOUNDARY}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - - (function testQuotedBoundary() { - form.headers = {'content-type': 'multipart/form-data; boundary="' + BOUNDARY + '"'}; - - gently.expect(form, '_initMultipart', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - form._parseContentType(); - })(); - - (function testNoBoundary() { - form.headers = {'content-type': 'multipart/form-data'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no multipart boundary/i)); - }); - form._parseContentType(); - })(); - - (function testNoContentType() { - form.headers = {}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/no content-type/i)); - }); - form._parseContentType(); - })(); - - (function testUnknownContentType() { - form.headers = {'content-type': 'invalid'}; - - gently.expect(form, '_error', function(err) { - assert.ok(err.message.match(/unknown content-type/i)); - }); - form._parseContentType(); - })(); -}); - -test(function parseContentLength() { - var HEADERS = {}; - - form.headers = {}; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 0); - }); - form._parseContentLength(); - - form.headers['content-length'] = '8'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesReceived, 0); - assert.strictEqual(form.bytesExpected, 8); - - // JS can be evil, lets make sure we are not - form.headers['content-length'] = '08'; - gently.expect(form, 'emit', function(event, bytesReceived, bytesExpected) { - assert.equal(event, 'progress'); - assert.equal(bytesReceived, 0); - assert.equal(bytesExpected, 8); - }); - form._parseContentLength(); - assert.strictEqual(form.bytesExpected, 8); -}); - -test(function _initMultipart() { - var BOUNDARY = '123', - PARSER; - - gently.expect(MultipartParserStub, 'new', function() { - PARSER = this; - }); - - gently.expect(MultipartParserStub.prototype, 'initWithBoundary', function(boundary) { - assert.equal(boundary, BOUNDARY); - }); - - form._initMultipart(BOUNDARY); - assert.equal(form.type, 'multipart'); - assert.strictEqual(form._parser, PARSER); - - (function testRegularField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.strictEqual(part, PART); - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field1"' - , 'foo': 'bar' - } - ); - assert.equal(part.name, 'field1'); - - var strings = ['hello', ' world']; - gently.expect(part, 'emit', 2, function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), strings.shift()); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 10); - PARSER.onHeaderField(new Buffer('content-disposition'), 10, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 0, 14); - PARSER.onHeaderValue(new Buffer('form-data; name="field1"'), 14, 24); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('foo'), 0, 3); - PARSER.onHeaderValue(new Buffer('bar'), 0, 3); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('hello world'), 0, 5); - PARSER.onPartData(new Buffer('hello world'), 5, 11); - PARSER.onPartEnd(); - })(); - - (function testFileField() { - var PART; - gently.expect(StreamStub, 'new', function() { - PART = this; - }); - - gently.expect(form, 'onPart', function(part) { - assert.deepEqual - ( part.headers - , { 'content-disposition': 'form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"' - , 'content-type': 'text/plain' - } - ); - assert.equal(part.name, 'field2'); - assert.equal(part.filename, 'Sun"et.jpg'); - assert.equal(part.mime, 'text/plain'); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'data'); - assert.equal(b.toString(), '... contents of file1.txt ...'); - }); - - gently.expect(part, 'emit', function(event, b) { - assert.equal(event, 'end'); - }); - }); - - PARSER.onPartBegin(); - PARSER.onHeaderField(new Buffer('content-disposition'), 0, 19); - PARSER.onHeaderValue(new Buffer('form-data; name="field2"; filename="C:\\Documents and Settings\\IE\\Must\\Die\\Sun"et.jpg"'), 0, 85); - PARSER.onHeaderEnd(); - PARSER.onHeaderField(new Buffer('Content-Type'), 0, 12); - PARSER.onHeaderValue(new Buffer('text/plain'), 0, 10); - PARSER.onHeaderEnd(); - PARSER.onHeadersEnd(); - PARSER.onPartData(new Buffer('... contents of file1.txt ...'), 0, 29); - PARSER.onPartEnd(); - })(); - - (function testEnd() { - gently.expect(form, '_maybeEnd'); - PARSER.onEnd(); - assert.ok(form.ended); - })(); -}); - -test(function _fileName() { - // TODO - return; -}); - -test(function _initUrlencoded() { - var PARSER; - - gently.expect(QuerystringParserStub, 'new', function() { - PARSER = this; - }); - - form._initUrlencoded(); - assert.equal(form.type, 'urlencoded'); - assert.strictEqual(form._parser, PARSER); - - (function testOnField() { - var KEY = 'KEY', VAL = 'VAL'; - gently.expect(form, 'emit', function(field, key, val) { - assert.equal(field, 'field'); - assert.equal(key, KEY); - assert.equal(val, VAL); - }); - - PARSER.onField(KEY, VAL); - })(); - - (function testOnEnd() { - gently.expect(form, '_maybeEnd'); - - PARSER.onEnd(); - assert.equal(form.ended, true); - })(); -}); - -test(function _error() { - var ERR = new Error('bla'); - - gently.expect(form, 'pause'); - gently.expect(form, 'emit', function(event, err) { - assert.equal(event, 'error'); - assert.strictEqual(err, ERR); - }); - - form._error(ERR); - assert.strictEqual(form.error, ERR); - - // make sure _error only does its thing once - form._error(ERR); -}); - -test(function onPart() { - var PART = {}; - gently.expect(form, 'handlePart', function(part) { - assert.strictEqual(part, PART); - }); - - form.onPart(PART); -}); - -test(function handlePart() { - (function testUtf8Field() { - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field'); - assert.equal(value, 'hello world: €'); - }); - - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testBinaryField() { - var PART = new events.EventEmitter(); - PART.name = 'my_field2'; - - gently.expect(form, 'emit', function(event, field, value) { - assert.equal(event, 'field'); - assert.equal(field, 'my_field2'); - assert.equal(value, 'hello world: '+new Buffer([0xE2, 0x82, 0xAC]).toString('binary')); - }); - - form.encoding = 'binary'; - form.handlePart(PART); - PART.emit('data', new Buffer('hello')); - PART.emit('data', new Buffer(' world: ')); - PART.emit('data', new Buffer([0xE2])); - PART.emit('data', new Buffer([0x82, 0xAC])); - PART.emit('end'); - })(); - - (function testFieldSize() { - form.maxFieldsSize = 8; - var PART = new events.EventEmitter(); - PART.name = 'my_field'; - - gently.expect(form, '_error', function(err) { - assert.equal(err.message, 'maxFieldsSize exceeded, received 9 bytes of field data'); - }); - - form.handlePart(PART); - form._fieldsSize = 1; - PART.emit('data', new Buffer(7)); - PART.emit('data', new Buffer(1)); - })(); - - (function testFilePart() { - var PART = new events.EventEmitter(), - FILE = new events.EventEmitter(), - PATH = '/foo/bar'; - - PART.name = 'my_file'; - PART.filename = 'sweet.txt'; - PART.mime = 'sweet.txt'; - - gently.expect(form, '_uploadPath', function(filename) { - assert.equal(filename, PART.filename); - return PATH; - }); - - gently.expect(FileStub, 'new', function(properties) { - assert.equal(properties.path, PATH); - assert.equal(properties.name, PART.filename); - assert.equal(properties.type, PART.mime); - FILE = this; - - gently.expect(form, 'emit', function (event, field, file) { - assert.equal(event, 'fileBegin'); - assert.strictEqual(field, PART.name); - assert.strictEqual(file, FILE); - }); - - gently.expect(FILE, 'open'); - }); - - form.handlePart(PART); - assert.equal(form._flushing, 1); - - var BUFFER; - gently.expect(form, 'pause'); - gently.expect(FILE, 'write', function(buffer, cb) { - assert.strictEqual(buffer, BUFFER); - gently.expect(form, 'resume'); - // @todo handle cb(new Err) - cb(); - }); - - PART.emit('data', BUFFER = new Buffer('test')); - - gently.expect(FILE, 'end', function(cb) { - gently.expect(form, 'emit', function(event, field, file) { - assert.equal(event, 'file'); - assert.strictEqual(file, FILE); - }); - - gently.expect(form, '_maybeEnd'); - - cb(); - assert.equal(form._flushing, 0); - }); - - PART.emit('end'); - })(); -}); - -test(function _uploadPath() { - (function testUniqueId() { - var UUID_A, UUID_B; - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - assert.equal(uploadDir, form.uploadDir); - UUID_A = uuid; - }); - form._uploadPath(); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, uuid) { - UUID_B = uuid; - }); - form._uploadPath(); - - assert.notEqual(UUID_A, UUID_B); - })(); - - (function testFileExtension() { - form.keepExtensions = true; - var FILENAME = 'foo.jpg', - EXT = '.bar'; - - gently.expect(GENTLY.hijacked.path, 'extname', function(filename) { - assert.equal(filename, FILENAME); - gently.restore(path, 'extname'); - - return EXT; - }); - - gently.expect(GENTLY.hijacked.path, 'join', function(uploadDir, name) { - assert.equal(path.extname(name), EXT); - }); - form._uploadPath(FILENAME); - })(); -}); - -test(function _maybeEnd() { - gently.expect(form, 'emit', 0); - form._maybeEnd(); - - form.ended = true; - form._flushing = 1; - form._maybeEnd(); - - gently.expect(form, 'emit', function(event) { - assert.equal(event, 'end'); - }); - - form.ended = true; - form._flushing = 0; - form._maybeEnd(); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js deleted file mode 100644 index bf2cd5e1..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-multipart-parser.js +++ /dev/null @@ -1,50 +0,0 @@ -var common = require('../common'); -var multipartParser = require(common.lib + '/multipart_parser'), - MultipartParser = multipartParser.MultipartParser, - events = require('events'), - Buffer = require('buffer').Buffer, - parser; - -function test(test) { - parser = new MultipartParser(); - test(); -} - -test(function constructor() { - assert.equal(parser.boundary, null); - assert.equal(parser.state, 0); - assert.equal(parser.flags, 0); - assert.equal(parser.boundaryChars, null); - assert.equal(parser.index, null); - assert.equal(parser.lookbehind, null); - assert.equal(parser.constructor.name, 'MultipartParser'); -}); - -test(function initWithBoundary() { - var boundary = 'abc'; - parser.initWithBoundary(boundary); - assert.deepEqual(Array.prototype.slice.call(parser.boundary), [13, 10, 45, 45, 97, 98, 99]); - assert.equal(parser.state, multipartParser.START); - - assert.deepEqual(parser.boundaryChars, {10: true, 13: true, 45: true, 97: true, 98: true, 99: true}); -}); - -test(function parserError() { - var boundary = 'abc', - buffer = new Buffer(5); - - parser.initWithBoundary(boundary); - buffer.write('--ad', 'ascii', 0); - assert.equal(parser.write(buffer), 5); -}); - -test(function end() { - (function testError() { - assert.equal(parser.end().message, 'MultipartParser.end(): stream ended unexpectedly: ' + parser.explain()); - })(); - - (function testRegular() { - parser.state = multipartParser.END; - assert.strictEqual(parser.end(), undefined); - })(); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js deleted file mode 100644 index 54d3e2d5..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/simple/test-querystring-parser.js +++ /dev/null @@ -1,45 +0,0 @@ -var common = require('../common'); -var QuerystringParser = require(common.lib + '/querystring_parser').QuerystringParser, - Buffer = require('buffer').Buffer, - gently, - parser; - -function test(test) { - gently = new Gently(); - parser = new QuerystringParser(); - test(); - gently.verify(test.name); -} - -test(function constructor() { - assert.equal(parser.buffer, ''); - assert.equal(parser.constructor.name, 'QuerystringParser'); -}); - -test(function write() { - var a = new Buffer('a=1'); - assert.equal(parser.write(a), a.length); - - var b = new Buffer('&b=2'); - parser.write(b); - assert.equal(parser.buffer, a + b); -}); - -test(function end() { - var FIELDS = {a: ['b', {c: 'd'}], e: 'f'}; - - gently.expect(GENTLY.hijacked.querystring, 'parse', function(str) { - assert.equal(str, parser.buffer); - return FIELDS; - }); - - gently.expect(parser, 'onField', Object.keys(FIELDS).length, function(key, val) { - assert.deepEqual(FIELDS[key], val); - }); - - gently.expect(parser, 'onEnd'); - - parser.buffer = 'my buffer'; - parser.end(); - assert.equal(parser.buffer, ''); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js deleted file mode 100644 index b35ffd68..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/legacy/system/test-multi-video-upload.js +++ /dev/null @@ -1,71 +0,0 @@ -var common = require('../common'); -var BOUNDARY = '---------------------------10102754414578508781458777923', - FIXTURE = TEST_FIXTURES+'/multi_video.upload', - fs = require('fs'), - http = require('http'), - formidable = require(common.lib + '/index'), - server = http.createServer(); - -server.on('request', function(req, res) { - var form = new formidable.IncomingForm(), - uploads = {}; - - form.uploadDir = TEST_TMP; - form.hash = 'sha1'; - form.parse(req); - - form - .on('fileBegin', function(field, file) { - assert.equal(field, 'upload'); - - var tracker = {file: file, progress: [], ended: false}; - uploads[file.name] = tracker; - file - .on('progress', function(bytesReceived) { - tracker.progress.push(bytesReceived); - assert.equal(bytesReceived, file.size); - }) - .on('end', function() { - tracker.ended = true; - }); - }) - .on('field', function(field, value) { - assert.equal(field, 'title'); - assert.equal(value, ''); - }) - .on('file', function(field, file) { - assert.equal(field, 'upload'); - assert.strictEqual(uploads[file.name].file, file); - }) - .on('end', function() { - assert.ok(uploads['shortest_video.flv']); - assert.ok(uploads['shortest_video.flv'].ended); - assert.ok(uploads['shortest_video.flv'].progress.length > 3); - assert.equal(uploads['shortest_video.flv'].file.hash, 'd6a17616c7143d1b1438ceeef6836d1a09186b3a'); - assert.equal(uploads['shortest_video.flv'].progress.slice(-1), uploads['shortest_video.flv'].file.size); - assert.ok(uploads['shortest_video.mp4']); - assert.ok(uploads['shortest_video.mp4'].ended); - assert.ok(uploads['shortest_video.mp4'].progress.length > 3); - assert.equal(uploads['shortest_video.mp4'].file.hash, '937dfd4db263f4887ceae19341dcc8d63bcd557f'); - - server.close(); - res.writeHead(200); - res.end('good'); - }); -}); - -server.listen(TEST_PORT, function() { - var stat, headers, request, fixture; - - stat = fs.statSync(FIXTURE); - request = http.request({ - port: TEST_PORT, - path: '/', - method: 'POST', - headers: { - 'content-type': 'multipart/form-data; boundary='+BOUNDARY, - 'content-length': stat.size, - }, - }); - fs.createReadStream(FIXTURE).pipe(request); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/run.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/run.js deleted file mode 100755 index 02d6d5c1..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/run.js +++ /dev/null @@ -1 +0,0 @@ -require('urun')(__dirname) diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-connection-aborted.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-connection-aborted.js deleted file mode 100644 index 4ea4431a..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-connection-aborted.js +++ /dev/null @@ -1,27 +0,0 @@ -var assert = require('assert'); -var http = require('http'); -var net = require('net'); -var formidable = require('../../lib/index'); - -var server = http.createServer(function (req, res) { - var form = new formidable.IncomingForm(); - var aborted_received = false; - form.on('aborted', function () { - aborted_received = true; - }); - form.on('error', function () { - assert(aborted_received, 'Error event should follow aborted'); - server.close(); - }); - form.on('end', function () { - throw new Error('Unexpected "end" event'); - }); - form.parse(req); -}).listen(0, 'localhost', function () { - var client = net.connect(server.address().port); - client.write( - "POST / HTTP/1.1\r\n" + - "Content-Length: 70\r\n" + - "Content-Type: multipart/form-data; boundary=foo\r\n\r\n"); - client.end(); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-content-transfer-encoding.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-content-transfer-encoding.js deleted file mode 100644 index 165628ab..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-content-transfer-encoding.js +++ /dev/null @@ -1,48 +0,0 @@ -var assert = require('assert'); -var common = require('../common'); -var formidable = require('../../lib/index'); -var http = require('http'); - -var server = http.createServer(function(req, res) { - var form = new formidable.IncomingForm(); - form.uploadDir = common.dir.tmp; - form.on('end', function () { - throw new Error('Unexpected "end" event'); - }); - form.on('error', function (e) { - res.writeHead(500); - res.end(e.message); - }); - form.parse(req); -}); - -server.listen(0, function() { - var body = - '--foo\r\n' + - 'Content-Disposition: form-data; name="file1"; filename="file1"\r\n' + - 'Content-Type: application/octet-stream\r\n' + - '\r\nThis is the first file\r\n' + - '--foo\r\n' + - 'Content-Type: application/octet-stream\r\n' + - 'Content-Disposition: form-data; name="file2"; filename="file2"\r\n' + - 'Content-Transfer-Encoding: unknown\r\n' + - '\r\nThis is the second file\r\n' + - '--foo--\r\n'; - - var req = http.request({ - method: 'POST', - port: server.address().port, - headers: { - 'Content-Length': body.length, - 'Content-Type': 'multipart/form-data; boundary=foo' - } - }); - req.on('response', function (res) { - assert.equal(res.statusCode, 500); - res.on('data', function () {}); - res.on('end', function () { - server.close(); - }); - }); - req.end(body); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-issue-46.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-issue-46.js deleted file mode 100644 index 19393287..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/standalone/test-issue-46.js +++ /dev/null @@ -1,49 +0,0 @@ -var http = require('http'), - formidable = require('../../lib/index'), - request = require('request'), - assert = require('assert'); - -var host = 'localhost'; - -var index = [ - '
    ', - ' ', - ' ', - '
    ' -].join("\n"); - -var server = http.createServer(function(req, res) { - - // Show a form for testing purposes. - if (req.method == 'GET') { - res.writeHead(200, {'content-type': 'text/html'}); - res.end(index); - return; - } - - // Parse form and write results to response. - var form = new formidable.IncomingForm(); - form.parse(req, function(err, fields, files) { - res.writeHead(200, {'content-type': 'text/plain'}); - res.write(JSON.stringify({err: err, fields: fields, files: files})); - res.end(); - }); - -}).listen(0, host, function() { - - console.log("Server up and running..."); - - var server = this, - url = 'http://' + host + ':' + server.address().port; - - var parts = [ - {'Content-Disposition': 'form-data; name="foo"', 'body': 'bar'} - ] - - var req = request({method: 'POST', url: url, multipart: parts}, function(e, res, body) { - var obj = JSON.parse(body); - assert.equal("bar", obj.fields.foo); - server.close(); - }); - -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/tools/base64.html b/node_modules/karma/node_modules/connect/node_modules/formidable/test/tools/base64.html deleted file mode 100644 index 48ad92e0..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/tools/base64.html +++ /dev/null @@ -1,67 +0,0 @@ - - - Convert a file to a base64 request - - - - - - - -
    -
    -
    -
    -
    -
    -

    -Don't forget to save the output with windows (CRLF) line endings! -

    - - - diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/unit/test-file.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/unit/test-file.js deleted file mode 100644 index fc8f36e5..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/unit/test-file.js +++ /dev/null @@ -1,33 +0,0 @@ -var common = require('../common'); -var test = require('utest'); -var assert = common.assert; -var File = common.require('file'); - -var file; -var now = new Date; -test('IncomingForm', { - before: function() { - file = new File({ - size: 1024, - path: '/tmp/cat.png', - name: 'cat.png', - type: 'image/png', - lastModifiedDate: now, - filename: 'cat.png', - mime: 'image/png' - }) - }, - - '#toJSON()': function() { - var obj = file.toJSON(); - var len = Object.keys(obj).length; - assert.equal(1024, obj.size); - assert.equal('/tmp/cat.png', obj.path); - assert.equal('cat.png', obj.name); - assert.equal('image/png', obj.type); - assert.equal('image/png', obj.mime); - assert.equal('cat.png', obj.filename); - assert.equal(now, obj.mtime); - assert.equal(len, 8); - } -}); \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js b/node_modules/karma/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js deleted file mode 100644 index fe2ac1c6..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/test/unit/test-incoming-form.js +++ /dev/null @@ -1,63 +0,0 @@ -var common = require('../common'); -var test = require('utest'); -var assert = common.assert; -var IncomingForm = common.require('incoming_form').IncomingForm; -var path = require('path'); - -var form; -test('IncomingForm', { - before: function() { - form = new IncomingForm(); - }, - - '#_fileName with regular characters': function() { - var filename = 'foo.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'foo.txt'); - }, - - '#_fileName with unescaped quote': function() { - var filename = 'my".txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with escaped quote': function() { - var filename = 'my%22.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my".txt'); - }, - - '#_fileName with bad quote and additional sub-header': function() { - var filename = 'my".txt'; - var header = makeHeader(filename) + '; foo="bar"'; - assert.equal(form._fileName(header), filename); - }, - - '#_fileName with semicolon': function() { - var filename = 'my;.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my;.txt'); - }, - - '#_fileName with utf8 character': function() { - var filename = 'my☃.txt'; - assert.equal(form._fileName(makeHeader(filename)), 'my☃.txt'); - }, - - '#_uploadPath strips harmful characters from extension when keepExtensions': function() { - form.keepExtensions = true; - - var ext = path.extname(form._uploadPath('fine.jpg?foo=bar')); - assert.equal(ext, '.jpg'); - - var ext = path.extname(form._uploadPath('fine?foo=bar')); - assert.equal(ext, ''); - - var ext = path.extname(form._uploadPath('super.cr2+dsad')); - assert.equal(ext, '.cr2'); - - var ext = path.extname(form._uploadPath('super.bar')); - assert.equal(ext, '.bar'); - }, -}); - -function makeHeader(filename) { - return 'Content-Disposition: form-data; name="upload"; filename="' + filename + '"'; -} diff --git a/node_modules/karma/node_modules/connect/node_modules/formidable/tool/record.js b/node_modules/karma/node_modules/connect/node_modules/formidable/tool/record.js deleted file mode 100644 index 9f1cef86..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/formidable/tool/record.js +++ /dev/null @@ -1,47 +0,0 @@ -var http = require('http'); -var fs = require('fs'); -var connections = 0; - -var server = http.createServer(function(req, res) { - var socket = req.socket; - console.log('Request: %s %s -> %s', req.method, req.url, socket.filename); - - req.on('end', function() { - if (req.url !== '/') { - res.end(JSON.stringify({ - method: req.method, - url: req.url, - filename: socket.filename, - })); - return; - } - - res.writeHead(200, {'content-type': 'text/html'}); - res.end( - '
    '+ - '
    '+ - '
    '+ - ''+ - '
    ' - ); - }); -}); - -server.on('connection', function(socket) { - connections++; - - socket.id = connections; - socket.filename = 'connection-' + socket.id + '.http'; - socket.file = fs.createWriteStream(socket.filename); - socket.pipe(socket.file); - - console.log('--> %s', socket.filename); - socket.on('close', function() { - console.log('<-- %s', socket.filename); - }); -}); - -var port = process.env.PORT || 8080; -server.listen(port, function() { - console.log('Recording connections on port %s', port); -}); diff --git a/node_modules/karma/node_modules/connect/node_modules/fresh/.npmignore b/node_modules/karma/node_modules/connect/node_modules/fresh/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/fresh/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/karma/node_modules/connect/node_modules/fresh/History.md b/node_modules/karma/node_modules/connect/node_modules/fresh/History.md deleted file mode 100644 index 60a2903f..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/fresh/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.2.0 / 2013-08-11 -================== - - * fix: return false for no-cache diff --git a/node_modules/karma/node_modules/connect/node_modules/fresh/Makefile b/node_modules/karma/node_modules/connect/node_modules/fresh/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/fresh/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/fresh/Readme.md b/node_modules/karma/node_modules/connect/node_modules/fresh/Readme.md deleted file mode 100644 index 61366c57..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/fresh/Readme.md +++ /dev/null @@ -1,57 +0,0 @@ - -# node-fresh - - HTTP response freshness testing - -## fresh(req, res) - - Check freshness of `req` and `res` headers. - - When the cache is "fresh" __true__ is returned, - otherwise __false__ is returned to indicate that - the cache is now stale. - -## Example: - -```js -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'luna' }; -fresh(req, res); -// => false - -var req = { 'if-none-match': 'tobi' }; -var res = { 'etag': 'tobi' }; -fresh(req, res); -// => true -``` - -## Installation - -``` -$ npm install fresh -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/fresh/index.js b/node_modules/karma/node_modules/connect/node_modules/fresh/index.js deleted file mode 100644 index 9c3f47d1..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/fresh/index.js +++ /dev/null @@ -1,53 +0,0 @@ - -/** - * Expose `fresh()`. - */ - -module.exports = fresh; - -/** - * Check freshness of `req` and `res` headers. - * - * When the cache is "fresh" __true__ is returned, - * otherwise __false__ is returned to indicate that - * the cache is now stale. - * - * @param {Object} req - * @param {Object} res - * @return {Boolean} - * @api public - */ - -function fresh(req, res) { - // defaults - var etagMatches = true; - var notModified = true; - - // fields - var modifiedSince = req['if-modified-since']; - var noneMatch = req['if-none-match']; - var lastModified = res['last-modified']; - var etag = res['etag']; - var cc = req['cache-control']; - - // unconditional request - if (!modifiedSince && !noneMatch) return false; - - // check for no-cache cache request directive - if (cc && cc.indexOf('no-cache') !== -1) return false; - - // parse if-none-match - if (noneMatch) noneMatch = noneMatch.split(/ *, */); - - // if-none-match - if (noneMatch) etagMatches = ~noneMatch.indexOf(etag) || '*' == noneMatch[0]; - - // if-modified-since - if (modifiedSince) { - modifiedSince = new Date(modifiedSince); - lastModified = new Date(lastModified); - notModified = lastModified <= modifiedSince; - } - - return !! (etagMatches && notModified); -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/fresh/package.json b/node_modules/karma/node_modules/connect/node_modules/fresh/package.json deleted file mode 100644 index f6dfe8d0..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/fresh/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "fresh", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "HTTP response freshness testing", - "version": "0.2.0", - "main": "index.js", - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/node-fresh.git" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "\n# node-fresh\n\n HTTP response freshness testing\n\n## fresh(req, res)\n\n Check freshness of `req` and `res` headers.\n\n When the cache is \"fresh\" __true__ is returned,\n otherwise __false__ is returned to indicate that\n the cache is now stale.\n\n## Example:\n\n```js\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'luna' };\nfresh(req, res);\n// => false\n\nvar req = { 'if-none-match': 'tobi' };\nvar res = { 'etag': 'tobi' };\nfresh(req, res);\n// => true\n```\n\n## Installation\n\n```\n$ npm install fresh\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-fresh/issues" - }, - "homepage": "https://github.com/visionmedia/node-fresh", - "_id": "fresh@0.2.0", - "_from": "fresh@0.2.0" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/methods/index.js b/node_modules/karma/node_modules/connect/node_modules/methods/index.js deleted file mode 100644 index 297d0223..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/methods/index.js +++ /dev/null @@ -1,26 +0,0 @@ - -module.exports = [ - 'get' - , 'post' - , 'put' - , 'head' - , 'delete' - , 'options' - , 'trace' - , 'copy' - , 'lock' - , 'mkcol' - , 'move' - , 'propfind' - , 'proppatch' - , 'unlock' - , 'report' - , 'mkactivity' - , 'checkout' - , 'merge' - , 'm-search' - , 'notify' - , 'subscribe' - , 'unsubscribe' - , 'patch' -]; \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/methods/package.json b/node_modules/karma/node_modules/connect/node_modules/methods/package.json deleted file mode 100644 index f867a8b5..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/methods/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "methods", - "version": "0.0.1", - "description": "HTTP methods that node supports", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [ - "http", - "methods" - ], - "author": { - "name": "TJ Holowaychuk" - }, - "license": "MIT", - "readme": "ERROR: No README data found!", - "_id": "methods@0.0.1", - "_from": "methods@0.0.1" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/pause/.npmignore b/node_modules/karma/node_modules/connect/node_modules/pause/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/pause/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/karma/node_modules/connect/node_modules/pause/History.md b/node_modules/karma/node_modules/connect/node_modules/pause/History.md deleted file mode 100644 index c8aa68fa..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/pause/History.md +++ /dev/null @@ -1,5 +0,0 @@ - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/karma/node_modules/connect/node_modules/pause/Makefile b/node_modules/karma/node_modules/connect/node_modules/pause/Makefile deleted file mode 100644 index 4e9c8d36..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/pause/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec - -.PHONY: test \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/pause/Readme.md b/node_modules/karma/node_modules/connect/node_modules/pause/Readme.md deleted file mode 100644 index 1cdd68a2..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/pause/Readme.md +++ /dev/null @@ -1,29 +0,0 @@ - -# pause - - Pause streams... - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/pause/index.js b/node_modules/karma/node_modules/connect/node_modules/pause/index.js deleted file mode 100644 index 1b7b3794..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/pause/index.js +++ /dev/null @@ -1,29 +0,0 @@ - -module.exports = function(obj){ - var onData - , onEnd - , events = []; - - // buffer data - obj.on('data', onData = function(data, encoding){ - events.push(['data', data, encoding]); - }); - - // buffer end - obj.on('end', onEnd = function(data, encoding){ - events.push(['end', data, encoding]); - }); - - return { - end: function(){ - obj.removeListener('data', onData); - obj.removeListener('end', onEnd); - }, - resume: function(){ - this.end(); - for (var i = 0, len = events.length; i < len; ++i) { - obj.emit.apply(obj, events[i]); - } - } - }; -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/pause/package.json b/node_modules/karma/node_modules/connect/node_modules/pause/package.json deleted file mode 100644 index 73cfe400..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/pause/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "pause", - "version": "0.0.1", - "description": "Pause streams...", - "keywords": [], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "main": "index", - "readme": "\n# pause\n\n Pause streams...\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "_id": "pause@0.0.1", - "_from": "pause@0.0.1" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/qs/.gitmodules b/node_modules/karma/node_modules/connect/node_modules/qs/.gitmodules deleted file mode 100644 index 49e31dac..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/qs/.gitmodules +++ /dev/null @@ -1,6 +0,0 @@ -[submodule "support/expresso"] - path = support/expresso - url = git://github.com/visionmedia/expresso.git -[submodule "support/should"] - path = support/should - url = git://github.com/visionmedia/should.js.git diff --git a/node_modules/karma/node_modules/connect/node_modules/qs/.npmignore b/node_modules/karma/node_modules/connect/node_modules/qs/.npmignore deleted file mode 100644 index e85ce2af..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/qs/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -test -.travis.yml -benchmark.js -component.json -examples.js -History.md -Makefile diff --git a/node_modules/karma/node_modules/connect/node_modules/qs/Readme.md b/node_modules/karma/node_modules/connect/node_modules/qs/Readme.md deleted file mode 100644 index 27e54a4a..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/qs/Readme.md +++ /dev/null @@ -1,58 +0,0 @@ -# node-querystring - - query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others. - -## Installation - - $ npm install qs - -## Examples - -```js -var qs = require('qs'); - -qs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com'); -// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } } - -qs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }}) -// => user[name]=Tobi&user[email]=tobi%40learnboost.com -``` - -## Testing - -Install dev dependencies: - - $ npm install -d - -and execute: - - $ make test - -browser: - - $ open test/browser/index.html - -## License - -(The MIT License) - -Copyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/qs/index.js b/node_modules/karma/node_modules/connect/node_modules/qs/index.js deleted file mode 100644 index 590491e3..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/qs/index.js +++ /dev/null @@ -1,387 +0,0 @@ -/** - * Object#toString() ref for stringify(). - */ - -var toString = Object.prototype.toString; - -/** - * Object#hasOwnProperty ref - */ - -var hasOwnProperty = Object.prototype.hasOwnProperty; - -/** - * Array#indexOf shim. - */ - -var indexOf = typeof Array.prototype.indexOf === 'function' - ? function(arr, el) { return arr.indexOf(el); } - : function(arr, el) { - for (var i = 0; i < arr.length; i++) { - if (arr[i] === el) return i; - } - return -1; - }; - -/** - * Array.isArray shim. - */ - -var isArray = Array.isArray || function(arr) { - return toString.call(arr) == '[object Array]'; -}; - -/** - * Object.keys shim. - */ - -var objectKeys = Object.keys || function(obj) { - var ret = []; - for (var key in obj) ret.push(key); - return ret; -}; - -/** - * Array#forEach shim. - */ - -var forEach = typeof Array.prototype.forEach === 'function' - ? function(arr, fn) { return arr.forEach(fn); } - : function(arr, fn) { - for (var i = 0; i < arr.length; i++) fn(arr[i]); - }; - -/** - * Array#reduce shim. - */ - -var reduce = function(arr, fn, initial) { - if (typeof arr.reduce === 'function') return arr.reduce(fn, initial); - var res = initial; - for (var i = 0; i < arr.length; i++) res = fn(res, arr[i]); - return res; -}; - -/** - * Create a nullary object if possible - */ - -function createObject() { - return Object.create - ? Object.create(null) - : {}; -} - -/** - * Cache non-integer test regexp. - */ - -var isint = /^[0-9]+$/; - -function promote(parent, key) { - if (parent[key].length == 0) return parent[key] = createObject(); - var t = createObject(); - for (var i in parent[key]) { - if (hasOwnProperty.call(parent[key], i)) { - t[i] = parent[key][i]; - } - } - parent[key] = t; - return t; -} - -function parse(parts, parent, key, val) { - var part = parts.shift(); - // end - if (!part) { - if (isArray(parent[key])) { - parent[key].push(val); - } else if ('object' == typeof parent[key]) { - parent[key] = val; - } else if ('undefined' == typeof parent[key]) { - parent[key] = val; - } else { - parent[key] = [parent[key], val]; - } - // array - } else { - var obj = parent[key] = parent[key] || []; - if (']' == part) { - if (isArray(obj)) { - if ('' != val) obj.push(val); - } else if ('object' == typeof obj) { - obj[objectKeys(obj).length] = val; - } else { - obj = parent[key] = [parent[key], val]; - } - // prop - } else if (~indexOf(part, ']')) { - part = part.substr(0, part.length - 1); - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - // key - } else { - if (!isint.test(part) && isArray(obj)) obj = promote(parent, key); - parse(parts, obj, part, val); - } - } -} - -/** - * Merge parent key/val pair. - */ - -function merge(parent, key, val){ - if (~indexOf(key, ']')) { - var parts = key.split('[') - , len = parts.length - , last = len - 1; - parse(parts, parent, 'base', val); - // optimize - } else { - if (!isint.test(key) && isArray(parent.base)) { - var t = createObject(); - for (var k in parent.base) t[k] = parent.base[k]; - parent.base = t; - } - set(parent.base, key, val); - } - - return parent; -} - -/** - * Compact sparse arrays. - */ - -function compact(obj) { - if ('object' != typeof obj) return obj; - - if (isArray(obj)) { - var ret = []; - - for (var i in obj) { - if (hasOwnProperty.call(obj, i)) { - ret.push(obj[i]); - } - } - - return ret; - } - - for (var key in obj) { - obj[key] = compact(obj[key]); - } - - return obj; -} - -/** - * Restore Object.prototype. - * see pull-request #58 - */ - -function restoreProto(obj) { - if (!Object.create) return obj; - if (isArray(obj)) return obj; - if (obj && 'object' != typeof obj) return obj; - - for (var key in obj) { - if (hasOwnProperty.call(obj, key)) { - obj[key] = restoreProto(obj[key]); - } - } - - obj.__proto__ = Object.prototype; - return obj; -} - -/** - * Parse the given obj. - */ - -function parseObject(obj){ - var ret = { base: {} }; - - forEach(objectKeys(obj), function(name){ - merge(ret, name, obj[name]); - }); - - return compact(ret.base); -} - -/** - * Parse the given str. - */ - -function parseString(str){ - var ret = reduce(String(str).split('&'), function(ret, pair){ - var eql = indexOf(pair, '=') - , brace = lastBraceInKey(pair) - , key = pair.substr(0, brace || eql) - , val = pair.substr(brace || eql, pair.length) - , val = val.substr(indexOf(val, '=') + 1, val.length); - - // ?foo - if ('' == key) key = pair, val = ''; - if ('' == key) return ret; - - return merge(ret, decode(key), decode(val)); - }, { base: createObject() }).base; - - return restoreProto(compact(ret)); -} - -/** - * Parse the given query `str` or `obj`, returning an object. - * - * @param {String} str | {Object} obj - * @return {Object} - * @api public - */ - -exports.parse = function(str){ - if (null == str || '' == str) return {}; - return 'object' == typeof str - ? parseObject(str) - : parseString(str); -}; - -/** - * Turn the given `obj` into a query string - * - * @param {Object} obj - * @return {String} - * @api public - */ - -var stringify = exports.stringify = function(obj, prefix) { - if (isArray(obj)) { - return stringifyArray(obj, prefix); - } else if ('[object Object]' == toString.call(obj)) { - return stringifyObject(obj, prefix); - } else if ('string' == typeof obj) { - return stringifyString(obj, prefix); - } else { - return prefix + '=' + encodeURIComponent(String(obj)); - } -}; - -/** - * Stringify the given `str`. - * - * @param {String} str - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyString(str, prefix) { - if (!prefix) throw new TypeError('stringify expects an object'); - return prefix + '=' + encodeURIComponent(str); -} - -/** - * Stringify the given `arr`. - * - * @param {Array} arr - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyArray(arr, prefix) { - var ret = []; - if (!prefix) throw new TypeError('stringify expects an object'); - for (var i = 0; i < arr.length; i++) { - ret.push(stringify(arr[i], prefix + '[' + i + ']')); - } - return ret.join('&'); -} - -/** - * Stringify the given `obj`. - * - * @param {Object} obj - * @param {String} prefix - * @return {String} - * @api private - */ - -function stringifyObject(obj, prefix) { - var ret = [] - , keys = objectKeys(obj) - , key; - - for (var i = 0, len = keys.length; i < len; ++i) { - key = keys[i]; - if ('' == key) continue; - if (null == obj[key]) { - ret.push(encodeURIComponent(key) + '='); - } else { - ret.push(stringify(obj[key], prefix - ? prefix + '[' + encodeURIComponent(key) + ']' - : encodeURIComponent(key))); - } - } - - return ret.join('&'); -} - -/** - * Set `obj`'s `key` to `val` respecting - * the weird and wonderful syntax of a qs, - * where "foo=bar&foo=baz" becomes an array. - * - * @param {Object} obj - * @param {String} key - * @param {String} val - * @api private - */ - -function set(obj, key, val) { - var v = obj[key]; - if (undefined === v) { - obj[key] = val; - } else if (isArray(v)) { - v.push(val); - } else { - obj[key] = [v, val]; - } -} - -/** - * Locate last brace in `str` within the key. - * - * @param {String} str - * @return {Number} - * @api private - */ - -function lastBraceInKey(str) { - var len = str.length - , brace - , c; - for (var i = 0; i < len; ++i) { - c = str[i]; - if (']' == c) brace = false; - if ('[' == c) brace = true; - if ('=' == c && !brace) return i; - } -} - -/** - * Decode `str`. - * - * @param {String} str - * @return {String} - * @api private - */ - -function decode(str) { - try { - return decodeURIComponent(str.replace(/\+/g, ' ')); - } catch (err) { - return str; - } -} diff --git a/node_modules/karma/node_modules/connect/node_modules/qs/package.json b/node_modules/karma/node_modules/connect/node_modules/qs/package.json deleted file mode 100644 index 1f5ea69c..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/qs/package.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "qs", - "description": "querystring parser", - "version": "0.6.5", - "keywords": [ - "query string", - "parser", - "component" - ], - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/node-querystring.git" - }, - "devDependencies": { - "mocha": "*", - "expect.js": "*" - }, - "scripts": { - "test": "make test" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "main": "index", - "engines": { - "node": "*" - }, - "readme": "# node-querystring\n\n query string parser for node and the browser supporting nesting, as it was removed from `0.3.x`, so this library provides the previous and commonly desired behaviour (and twice as fast). Used by [express](http://expressjs.com), [connect](http://senchalabs.github.com/connect) and others.\n\n## Installation\n\n $ npm install qs\n\n## Examples\n\n```js\nvar qs = require('qs');\n\nqs.parse('user[name][first]=Tobi&user[email]=tobi@learnboost.com');\n// => { user: { name: { first: 'Tobi' }, email: 'tobi@learnboost.com' } }\n\nqs.stringify({ user: { name: 'Tobi', email: 'tobi@learnboost.com' }})\n// => user[name]=Tobi&user[email]=tobi%40learnboost.com\n```\n\n## Testing\n\nInstall dev dependencies:\n\n $ npm install -d\n\nand execute:\n\n $ make test\n\nbrowser:\n\n $ open test/browser/index.html\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2010 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/node-querystring/issues" - }, - "homepage": "https://github.com/visionmedia/node-querystring", - "_id": "qs@0.6.5", - "_from": "qs@0.6.5" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/send/.npmignore b/node_modules/karma/node_modules/connect/node_modules/send/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/karma/node_modules/connect/node_modules/send/History.md b/node_modules/karma/node_modules/connect/node_modules/send/History.md deleted file mode 100644 index 55c4af74..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/History.md +++ /dev/null @@ -1,40 +0,0 @@ - -0.1.4 / 2013-08-11 -================== - - * update fresh - -0.1.3 / 2013-07-08 -================== - - * Revert "Fix fd leak" - -0.1.2 / 2013-07-03 -================== - - * Fix fd leak - -0.1.0 / 2012-08-25 -================== - - * add options parameter to send() that is passed to fs.createReadStream() [kanongil] - -0.0.4 / 2012-08-16 -================== - - * allow custom "Accept-Ranges" definition - -0.0.3 / 2012-07-16 -================== - - * fix normalization of the root directory. Closes #3 - -0.0.2 / 2012-07-09 -================== - - * add passing of req explicitly for now (YUCK) - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/karma/node_modules/connect/node_modules/send/Makefile b/node_modules/karma/node_modules/connect/node_modules/send/Makefile deleted file mode 100644 index a9dcfd50..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/Makefile +++ /dev/null @@ -1,8 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --require should \ - --reporter spec \ - --bail - -.PHONY: test \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/send/Readme.md b/node_modules/karma/node_modules/connect/node_modules/send/Readme.md deleted file mode 100644 index ea7b2341..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/Readme.md +++ /dev/null @@ -1,128 +0,0 @@ -# send - - Send is Connect's `static()` extracted for generalized use, a streaming static file - server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework. - -## Installation - - $ npm install send - -## Examples - - Small: - -```js -var http = require('http'); -var send = require('send'); - -var app = http.createServer(function(req, res){ - send(req, req.url).pipe(res); -}).listen(3000); -``` - - Serving from a root directory with custom error-handling: - -```js -var http = require('http'); -var send = require('send'); -var url = require('url'); - -var app = http.createServer(function(req, res){ - // your custom error-handling logic: - function error(err) { - res.statusCode = err.status || 500; - res.end(err.message); - } - - // your custom directory handling logic: - function redirect() { - res.statusCode = 301; - res.setHeader('Location', req.url + '/'); - res.end('Redirecting to ' + req.url + '/'); - } - - // transfer arbitrary files from within - // /www/example.com/public/* - send(req, url.parse(req.url).pathname) - .root('/www/example.com/public') - .on('error', error) - .on('directory', redirect) - .pipe(res); -}).listen(3000); -``` - -## API - -### Events - - - `error` an error occurred `(err)` - - `directory` a directory was requested - - `file` a file was requested `(path, stat)` - - `stream` file streaming has started `(stream)` - - `end` streaming has completed - -### .root(dir) - - Serve files relative to `path`. Aliased as `.from(dir)`. - -### .index(path) - - By default send supports "index.html" files, to disable this - invoke `.index(false)` or to supply a new index pass a string. - -### .maxage(ms) - - Provide a max-age in milliseconds for http caching, defaults to 0. - -### .hidden(bool) - - Enable or disable transfer of hidden files, defaults to false. - -## Error-handling - - By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc. - -## Caching - - It does _not_ perform internal caching, you should use a reverse proxy cache such - as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;). - -## Debugging - - To enable `debug()` instrumentation output export __DEBUG__: - -``` -$ DEBUG=send node app -``` - -## Running tests - -``` -$ npm install -$ make test -``` - -## License - -(The MIT License) - -Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/connect/node_modules/send/index.js b/node_modules/karma/node_modules/connect/node_modules/send/index.js deleted file mode 100644 index f17158d8..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/send'); \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/send/lib/send.js b/node_modules/karma/node_modules/connect/node_modules/send/lib/send.js deleted file mode 100644 index a3d94a69..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/lib/send.js +++ /dev/null @@ -1,474 +0,0 @@ - -/** - * Module dependencies. - */ - -var debug = require('debug')('send') - , parseRange = require('range-parser') - , Stream = require('stream') - , mime = require('mime') - , fresh = require('fresh') - , path = require('path') - , http = require('http') - , fs = require('fs') - , basename = path.basename - , normalize = path.normalize - , join = path.join - , utils = require('./utils'); - -/** - * Expose `send`. - */ - -exports = module.exports = send; - -/** - * Expose mime module. - */ - -exports.mime = mime; - -/** - * Return a `SendStream` for `req` and `path`. - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @return {SendStream} - * @api public - */ - -function send(req, path, options) { - return new SendStream(req, path, options); -} - -/** - * Initialize a `SendStream` with the given `path`. - * - * Events: - * - * - `error` an error occurred - * - `stream` file streaming has started - * - `end` streaming has completed - * - `directory` a directory was requested - * - * @param {Request} req - * @param {String} path - * @param {Object} options - * @api private - */ - -function SendStream(req, path, options) { - var self = this; - this.req = req; - this.path = path; - this.options = options || {}; - this.maxage(0); - this.hidden(false); - this.index('index.html'); -} - -/** - * Inherits from `Stream.prototype`. - */ - -SendStream.prototype.__proto__ = Stream.prototype; - -/** - * Enable or disable "hidden" (dot) files. - * - * @param {Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.hidden = function(val){ - debug('hidden %s', val); - this._hidden = val; - return this; -}; - -/** - * Set index `path`, set to a falsy - * value to disable index support. - * - * @param {String|Boolean} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.index = function(path){ - debug('index %s', path); - this._index = path; - return this; -}; - -/** - * Set root `path`. - * - * @param {String} path - * @return {SendStream} - * @api public - */ - -SendStream.prototype.root = -SendStream.prototype.from = function(path){ - this._root = normalize(path); - return this; -}; - -/** - * Set max-age to `ms`. - * - * @param {Number} ms - * @return {SendStream} - * @api public - */ - -SendStream.prototype.maxage = function(ms){ - if (Infinity == ms) ms = 60 * 60 * 24 * 365 * 1000; - debug('max-age %d', ms); - this._maxage = ms; - return this; -}; - -/** - * Emit error with `status`. - * - * @param {Number} status - * @api private - */ - -SendStream.prototype.error = function(status, err){ - var res = this.res; - var msg = http.STATUS_CODES[status]; - err = err || new Error(msg); - err.status = status; - if (this.listeners('error').length) return this.emit('error', err); - res.statusCode = err.status; - res.end(msg); -}; - -/** - * Check if the pathname is potentially malicious. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isMalicious = function(){ - return !this._root && ~this.path.indexOf('..'); -}; - -/** - * Check if the pathname ends with "/". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasTrailingSlash = function(){ - return '/' == this.path[this.path.length - 1]; -}; - -/** - * Check if the basename leads with ".". - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.hasLeadingDot = function(){ - return '.' == basename(this.path)[0]; -}; - -/** - * Check if this is a conditional GET request. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isConditionalGET = function(){ - return this.req.headers['if-none-match'] - || this.req.headers['if-modified-since']; -}; - -/** - * Strip content-* header fields. - * - * @api private - */ - -SendStream.prototype.removeContentHeaderFields = function(){ - var res = this.res; - Object.keys(res._headers).forEach(function(field){ - if (0 == field.indexOf('content')) { - res.removeHeader(field); - } - }); -}; - -/** - * Respond with 304 not modified. - * - * @api private - */ - -SendStream.prototype.notModified = function(){ - var res = this.res; - debug('not modified'); - this.removeContentHeaderFields(); - res.statusCode = 304; - res.end(); -}; - -/** - * Check if the request is cacheable, aka - * responded with 2xx or 304 (see RFC 2616 section 14.2{5,6}). - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isCachable = function(){ - var res = this.res; - return (res.statusCode >= 200 && res.statusCode < 300) || 304 == res.statusCode; -}; - -/** - * Handle stat() error. - * - * @param {Error} err - * @api private - */ - -SendStream.prototype.onStatError = function(err){ - var notfound = ['ENOENT', 'ENAMETOOLONG', 'ENOTDIR']; - if (~notfound.indexOf(err.code)) return this.error(404, err); - this.error(500, err); -}; - -/** - * Check if the cache is fresh. - * - * @return {Boolean} - * @api private - */ - -SendStream.prototype.isFresh = function(){ - return fresh(this.req.headers, this.res._headers); -}; - -/** - * Redirect to `path`. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.redirect = function(path){ - if (this.listeners('directory').length) return this.emit('directory'); - var res = this.res; - path += '/'; - res.statusCode = 301; - res.setHeader('Location', path); - res.end('Redirecting to ' + utils.escape(path)); -}; - -/** - * Pipe to `res. - * - * @param {Stream} res - * @return {Stream} res - * @api public - */ - -SendStream.prototype.pipe = function(res){ - var self = this - , args = arguments - , path = this.path - , root = this._root; - - // references - this.res = res; - - // invalid request uri - path = utils.decode(path); - if (-1 == path) return this.error(400); - - // null byte(s) - if (~path.indexOf('\0')) return this.error(400); - - // join / normalize from optional root dir - if (root) path = normalize(join(this._root, path)); - - // ".." is malicious without "root" - if (this.isMalicious()) return this.error(403); - - // malicious path - if (root && 0 != path.indexOf(root)) return this.error(403); - - // hidden file support - if (!this._hidden && this.hasLeadingDot()) return this.error(404); - - // index file support - if (this._index && this.hasTrailingSlash()) path += this._index; - - debug('stat "%s"', path); - fs.stat(path, function(err, stat){ - if (err) return self.onStatError(err); - if (stat.isDirectory()) return self.redirect(self.path); - self.emit('file', path, stat); - self.send(path, stat); - }); - - return res; -}; - -/** - * Transfer `path`. - * - * @param {String} path - * @api public - */ - -SendStream.prototype.send = function(path, stat){ - var options = this.options; - var len = stat.size; - var res = this.res; - var req = this.req; - var ranges = req.headers.range; - var offset = options.start || 0; - - // set header fields - this.setHeader(stat); - - // set content-type - this.type(path); - - // conditional GET support - if (this.isConditionalGET() - && this.isCachable() - && this.isFresh()) { - return this.notModified(); - } - - // adjust len to start/end options - len = Math.max(0, len - offset); - if (options.end !== undefined) { - var bytes = options.end - offset + 1; - if (len > bytes) len = bytes; - } - - // Range support - if (ranges) { - ranges = parseRange(len, ranges); - - // unsatisfiable - if (-1 == ranges) { - res.setHeader('Content-Range', 'bytes */' + stat.size); - return this.error(416); - } - - // valid (syntactically invalid ranges are treated as a regular response) - if (-2 != ranges) { - options.start = offset + ranges[0].start; - options.end = offset + ranges[0].end; - - // Content-Range - res.statusCode = 206; - res.setHeader('Content-Range', 'bytes ' - + ranges[0].start - + '-' - + ranges[0].end - + '/' - + len); - len = options.end - options.start + 1; - } - } - - // content-length - res.setHeader('Content-Length', len); - - // HEAD support - if ('HEAD' == req.method) return res.end(); - - this.stream(path, options); -}; - -/** - * Stream `path` to the response. - * - * @param {String} path - * @param {Object} options - * @api private - */ - -SendStream.prototype.stream = function(path, options){ - // TODO: this is all lame, refactor meeee - var self = this; - var res = this.res; - var req = this.req; - - // pipe - var stream = fs.createReadStream(path, options); - this.emit('stream', stream); - stream.pipe(res); - - // socket closed, done with the fd - req.on('close', stream.destroy.bind(stream)); - - // error handling code-smell - stream.on('error', function(err){ - // no hope in responding - if (res._header) { - console.error(err.stack); - req.destroy(); - return; - } - - // 500 - err.status = 500; - self.emit('error', err); - }); - - // end - stream.on('end', function(){ - self.emit('end'); - }); -}; - -/** - * Set content-type based on `path` - * if it hasn't been explicitly set. - * - * @param {String} path - * @api private - */ - -SendStream.prototype.type = function(path){ - var res = this.res; - if (res.getHeader('Content-Type')) return; - var type = mime.lookup(path); - var charset = mime.charsets.lookup(type); - debug('content-type %s', type); - res.setHeader('Content-Type', type + (charset ? '; charset=' + charset : '')); -}; - -/** - * Set reaponse header fields, most - * fields may be pre-defined. - * - * @param {Object} stat - * @api private - */ - -SendStream.prototype.setHeader = function(stat){ - var res = this.res; - if (!res.getHeader('Accept-Ranges')) res.setHeader('Accept-Ranges', 'bytes'); - if (!res.getHeader('ETag')) res.setHeader('ETag', utils.etag(stat)); - if (!res.getHeader('Date')) res.setHeader('Date', new Date().toUTCString()); - if (!res.getHeader('Cache-Control')) res.setHeader('Cache-Control', 'public, max-age=' + (this._maxage / 1000)); - if (!res.getHeader('Last-Modified')) res.setHeader('Last-Modified', stat.mtime.toUTCString()); -}; diff --git a/node_modules/karma/node_modules/connect/node_modules/send/lib/utils.js b/node_modules/karma/node_modules/connect/node_modules/send/lib/utils.js deleted file mode 100644 index 950e5a2c..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/lib/utils.js +++ /dev/null @@ -1,47 +0,0 @@ - -/** - * Return an ETag in the form of `"-"` - * from the given `stat`. - * - * @param {Object} stat - * @return {String} - * @api private - */ - -exports.etag = function(stat) { - return '"' + stat.size + '-' + Number(stat.mtime) + '"'; -}; - -/** - * decodeURIComponent. - * - * Allows V8 to only deoptimize this fn instead of all - * of send(). - * - * @param {String} path - * @api private - */ - -exports.decode = function(path){ - try { - return decodeURIComponent(path); - } catch (err) { - return -1; - } -}; - -/** - * Escape the given string of `html`. - * - * @param {String} html - * @return {String} - * @api private - */ - -exports.escape = function(html){ - return String(html) - .replace(/&(?!\w+;)/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/.npmignore b/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/.npmignore deleted file mode 100644 index 9daeafb9..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/History.md b/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/History.md deleted file mode 100644 index 82df7b1e..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/History.md +++ /dev/null @@ -1,15 +0,0 @@ - -0.0.4 / 2012-06-17 -================== - - * changed: ret -1 for unsatisfiable and -2 when invalid - -0.0.3 / 2012-06-17 -================== - - * fix last-byte-pos default to len - 1 - -0.0.2 / 2012-06-14 -================== - - * add `.type` diff --git a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/Makefile b/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/Makefile deleted file mode 100644 index 8e8640f2..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -test: - @./node_modules/.bin/mocha \ - --reporter spec \ - --require should - -.PHONY: test \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/Readme.md b/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/Readme.md deleted file mode 100644 index b2a67fe8..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/Readme.md +++ /dev/null @@ -1,28 +0,0 @@ - -# node-range-parser - - Range header field parser. - -## Example: - -```js -assert(-1 == parse(200, 'bytes=500-20')); -assert(-2 == parse(200, 'bytes=malformed')); -parse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }])); -parse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }])); -parse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }])); -parse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }])); -parse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }])); -parse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }])); -parse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }])); -parse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }])); -parse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }])); -parse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }])); -``` - -## Installation - -``` -$ npm install range-parser -``` \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/index.js b/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/index.js deleted file mode 100644 index 9b0f7a8e..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/index.js +++ /dev/null @@ -1,49 +0,0 @@ - -/** - * Parse "Range" header `str` relative to the given file `size`. - * - * @param {Number} size - * @param {String} str - * @return {Array} - * @api public - */ - -module.exports = function(size, str){ - var valid = true; - var i = str.indexOf('='); - - if (-1 == i) return -2; - - var arr = str.slice(i + 1).split(',').map(function(range){ - var range = range.split('-') - , start = parseInt(range[0], 10) - , end = parseInt(range[1], 10); - - // -nnn - if (isNaN(start)) { - start = size - end; - end = size - 1; - // nnn- - } else if (isNaN(end)) { - end = size - 1; - } - - // limit last-byte-pos to current length - if (end > size - 1) end = size - 1; - - // invalid - if (isNaN(start) - || isNaN(end) - || start > end - || start < 0) valid = false; - - return { - start: start, - end: end - }; - }); - - arr.type = str.slice(0, i); - - return valid ? arr : -1; -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/package.json b/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/package.json deleted file mode 100644 index efdf450a..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/node_modules/range-parser/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "range-parser", - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "description": "Range header field string parser", - "version": "0.0.4", - "main": "index.js", - "dependencies": {}, - "devDependencies": { - "mocha": "*", - "should": "*" - }, - "readme": "\n# node-range-parser\n\n Range header field parser.\n\n## Example:\n\n```js\nassert(-1 == parse(200, 'bytes=500-20'));\nassert(-2 == parse(200, 'bytes=malformed'));\nparse(200, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 199 }]));\nparse(1000, 'bytes=0-499').should.eql(arr('bytes', [{ start: 0, end: 499 }]));\nparse(1000, 'bytes=40-80').should.eql(arr('bytes', [{ start: 40, end: 80 }]));\nparse(1000, 'bytes=-500').should.eql(arr('bytes', [{ start: 500, end: 999 }]));\nparse(1000, 'bytes=-400').should.eql(arr('bytes', [{ start: 600, end: 999 }]));\nparse(1000, 'bytes=500-').should.eql(arr('bytes', [{ start: 500, end: 999 }]));\nparse(1000, 'bytes=400-').should.eql(arr('bytes', [{ start: 400, end: 999 }]));\nparse(1000, 'bytes=0-0').should.eql(arr('bytes', [{ start: 0, end: 0 }]));\nparse(1000, 'bytes=-1').should.eql(arr('bytes', [{ start: 999, end: 999 }]));\nparse(1000, 'items=0-5').should.eql(arr('items', [{ start: 0, end: 5 }]));\nparse(1000, 'bytes=40-80,-1').should.eql(arr('bytes', [{ start: 40, end: 80 }, { start: 999, end: 999 }]));\n```\n\n## Installation\n\n```\n$ npm install range-parser\n```", - "readmeFilename": "Readme.md", - "_id": "range-parser@0.0.4", - "_from": "range-parser@0.0.4" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/send/package.json b/node_modules/karma/node_modules/connect/node_modules/send/package.json deleted file mode 100644 index 1107aca4..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/send/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "send", - "version": "0.1.4", - "description": "Better streaming static file server with Range and conditional-GET support", - "keywords": [ - "static", - "file", - "server" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "dependencies": { - "debug": "*", - "mime": "~1.2.9", - "fresh": "0.2.0", - "range-parser": "0.0.4" - }, - "devDependencies": { - "mocha": "*", - "should": "*", - "supertest": "0.0.1", - "connect": "2.x" - }, - "scripts": { - "test": "make test" - }, - "repository": { - "type": "git", - "url": "git://github.com/visionmedia/send.git" - }, - "main": "index", - "readme": "# send\n\n Send is Connect's `static()` extracted for generalized use, a streaming static file\n server supporting partial responses (Ranges), conditional-GET negotiation, high test coverage, and granular events which may be leveraged to take appropriate actions in your application or framework.\n\n## Installation\n\n $ npm install send\n\n## Examples\n\n Small:\n\n```js\nvar http = require('http');\nvar send = require('send');\n\nvar app = http.createServer(function(req, res){\n send(req, req.url).pipe(res);\n}).listen(3000);\n```\n\n Serving from a root directory with custom error-handling:\n\n```js\nvar http = require('http');\nvar send = require('send');\nvar url = require('url');\n\nvar app = http.createServer(function(req, res){\n // your custom error-handling logic:\n function error(err) {\n res.statusCode = err.status || 500;\n res.end(err.message);\n }\n\n // your custom directory handling logic:\n function redirect() {\n res.statusCode = 301;\n res.setHeader('Location', req.url + '/');\n res.end('Redirecting to ' + req.url + '/');\n }\n\n // transfer arbitrary files from within\n // /www/example.com/public/*\n send(req, url.parse(req.url).pathname)\n .root('/www/example.com/public')\n .on('error', error)\n .on('directory', redirect)\n .pipe(res);\n}).listen(3000);\n```\n\n## API\n\n### Events\n\n - `error` an error occurred `(err)`\n - `directory` a directory was requested\n - `file` a file was requested `(path, stat)`\n - `stream` file streaming has started `(stream)`\n - `end` streaming has completed\n\n### .root(dir)\n\n Serve files relative to `path`. Aliased as `.from(dir)`.\n\n### .index(path)\n\n By default send supports \"index.html\" files, to disable this\n invoke `.index(false)` or to supply a new index pass a string.\n\n### .maxage(ms)\n\n Provide a max-age in milliseconds for http caching, defaults to 0.\n\n### .hidden(bool)\n\n Enable or disable transfer of hidden files, defaults to false.\n\n## Error-handling\n\n By default when no `error` listeners are present an automatic response will be made, otherwise you have full control over the response, aka you may show a 5xx page etc.\n\n## Caching\n\n It does _not_ perform internal caching, you should use a reverse proxy cache such\n as Varnish for this, or those fancy things called CDNs. If your application is small enough that it would benefit from single-node memory caching, it's small enough that it does not need caching at all ;).\n\n## Debugging\n\n To enable `debug()` instrumentation output export __DEBUG__:\n\n```\n$ DEBUG=send node app\n```\n\n## Running tests\n\n```\n$ npm install\n$ make test\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/send/issues" - }, - "homepage": "https://github.com/visionmedia/send", - "_id": "send@0.1.4", - "_from": "send@0.1.4" -} diff --git a/node_modules/karma/node_modules/connect/node_modules/uid2/index.js b/node_modules/karma/node_modules/connect/node_modules/uid2/index.js deleted file mode 100644 index d665f519..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/uid2/index.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * Module dependencies - */ - -var crypto = require('crypto'); - -/** - * The size ratio between a base64 string and the equivalent byte buffer - */ - -var ratio = Math.log(64) / Math.log(256); - -/** - * Make a Base64 string ready for use in URLs - * - * @param {String} - * @returns {String} - * @api private - */ - -function urlReady(str) { - return str.replace(/\+/g, '_').replace(/\//g, '-'); -} - -/** - * Generate an Unique Id - * - * @param {Number} length The number of chars of the uid - * @param {Number} cb (optional) Callback for async uid generation - * @api public - */ - -function uid(length, cb) { - var numbytes = Math.ceil(length * ratio); - if (typeof cb === 'undefined') { - return urlReady(crypto.randomBytes(numbytes).toString('base64').slice(0, length)); - } else { - crypto.randomBytes(numbytes, function(err, bytes) { - if (err) return cb(err); - cb(null, urlReady(bytes.toString('base64').slice(0, length))); - }) - } -} - -/** - * Exports - */ - -module.exports = uid; diff --git a/node_modules/karma/node_modules/connect/node_modules/uid2/package.json b/node_modules/karma/node_modules/connect/node_modules/uid2/package.json deleted file mode 100644 index 9498f776..00000000 --- a/node_modules/karma/node_modules/connect/node_modules/uid2/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "uid2", - "description": "strong uid", - "tags": [ - "uid" - ], - "version": "0.0.2", - "dependencies": {}, - "readme": "ERROR: No README data found!", - "_id": "uid2@0.0.2", - "_from": "uid2@0.0.2" -} diff --git a/node_modules/karma/node_modules/connect/package.json b/node_modules/karma/node_modules/connect/package.json deleted file mode 100644 index 34f85891..00000000 --- a/node_modules/karma/node_modules/connect/package.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "name": "connect", - "version": "2.8.8", - "description": "High performance middleware framework", - "keywords": [ - "framework", - "web", - "middleware", - "connect", - "rack" - ], - "repository": { - "type": "git", - "url": "git://github.com/senchalabs/connect.git" - }, - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca", - "url": "http://tjholowaychuk.com" - }, - "dependencies": { - "qs": "0.6.5", - "formidable": "1.0.14", - "cookie-signature": "1.0.1", - "buffer-crc32": "0.2.1", - "cookie": "0.1.0", - "send": "0.1.4", - "bytes": "0.2.0", - "fresh": "0.2.0", - "pause": "0.0.1", - "uid2": "0.0.2", - "debug": "*", - "methods": "0.0.1" - }, - "devDependencies": { - "should": "*", - "mocha": "*", - "jade": "*", - "dox": "*" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://raw.github.com/senchalabs/connect/master/LICENSE" - } - ], - "main": "index", - "engines": { - "node": ">= 0.8.0" - }, - "scripts": { - "test": "make" - }, - "readme": "[![build status](https://secure.travis-ci.org/senchalabs/connect.png)](http://travis-ci.org/senchalabs/connect)\n# Connect\n\n Connect is an extensible HTTP server framework for [node](http://nodejs.org), providing high performance \"plugins\" known as _middleware_.\n\n Connect is bundled with over _20_ commonly used middleware, including\n a logger, session support, cookie parser, and [more](http://senchalabs.github.com/connect). Be sure to view the 2.x [documentation](http://senchalabs.github.com/connect/).\n\n```js\nvar connect = require('connect')\n , http = require('http');\n\nvar app = connect()\n .use(connect.favicon())\n .use(connect.logger('dev'))\n .use(connect.static('public'))\n .use(connect.directory('public'))\n .use(connect.cookieParser())\n .use(connect.session({ secret: 'my secret here' }))\n .use(function(req, res){\n res.end('Hello from Connect!\\n');\n });\n\nhttp.createServer(app).listen(3000);\n```\n\n## Middleware\n\n - [csrf](http://www.senchalabs.org/connect/csrf.html)\n - [basicAuth](http://www.senchalabs.org/connect/basicAuth.html)\n - [bodyParser](http://www.senchalabs.org/connect/bodyParser.html)\n - [json](http://www.senchalabs.org/connect/json.html)\n - [multipart](http://www.senchalabs.org/connect/multipart.html)\n - [urlencoded](http://www.senchalabs.org/connect/urlencoded.html)\n - [cookieParser](http://www.senchalabs.org/connect/cookieParser.html)\n - [directory](http://www.senchalabs.org/connect/directory.html)\n - [compress](http://www.senchalabs.org/connect/compress.html)\n - [errorHandler](http://www.senchalabs.org/connect/errorHandler.html)\n - [favicon](http://www.senchalabs.org/connect/favicon.html)\n - [limit](http://www.senchalabs.org/connect/limit.html)\n - [logger](http://www.senchalabs.org/connect/logger.html)\n - [methodOverride](http://www.senchalabs.org/connect/methodOverride.html)\n - [query](http://www.senchalabs.org/connect/query.html)\n - [responseTime](http://www.senchalabs.org/connect/responseTime.html)\n - [session](http://www.senchalabs.org/connect/session.html)\n - [static](http://www.senchalabs.org/connect/static.html)\n - [staticCache](http://www.senchalabs.org/connect/staticCache.html)\n - [vhost](http://www.senchalabs.org/connect/vhost.html)\n - [subdomains](http://www.senchalabs.org/connect/subdomains.html)\n - [cookieSession](http://www.senchalabs.org/connect/cookieSession.html)\n\n## Running Tests\n\nfirst:\n\n $ npm install -d\n\nthen:\n\n $ make test\n\n## Authors\n\n Below is the output from [git-summary](http://github.com/visionmedia/git-extras).\n\n\n project: connect\n commits: 2033\n active : 301 days\n files : 171\n authors: \n 1414\tTj Holowaychuk 69.6%\n 298\tvisionmedia 14.7%\n 191\tTim Caswell 9.4%\n 51\tTJ Holowaychuk 2.5%\n 10\tRyan Olds 0.5%\n 8\tAstro 0.4%\n 5\tNathan Rajlich 0.2%\n 5\tJakub Nešetřil 0.2%\n 3\tDaniel Dickison 0.1%\n 3\tDavid Rio Deiros 0.1%\n 3\tAlexander Simmerl 0.1%\n 3\tAndreas Lind Petersen 0.1%\n 2\tAaron Heckmann 0.1%\n 2\tJacques Crocker 0.1%\n 2\tFabian Jakobs 0.1%\n 2\tBrian J Brennan 0.1%\n 2\tAdam Malcontenti-Wilson 0.1%\n 2\tGlen Mailer 0.1%\n 2\tJames Campos 0.1%\n 1\tTrent Mick 0.0%\n 1\tTroy Kruthoff 0.0%\n 1\tWei Zhu 0.0%\n 1\tcomerc 0.0%\n 1\tdarobin 0.0%\n 1\tnateps 0.0%\n 1\tMarco Sanson 0.0%\n 1\tArthur Taylor 0.0%\n 1\tAseem Kishore 0.0%\n 1\tBart Teeuwisse 0.0%\n 1\tCameron Howey 0.0%\n 1\tChad Weider 0.0%\n 1\tCraig Barnes 0.0%\n 1\tEran Hammer-Lahav 0.0%\n 1\tGregory McWhirter 0.0%\n 1\tGuillermo Rauch 0.0%\n 1\tJae Kwon 0.0%\n 1\tJakub Nesetril 0.0%\n 1\tJoshua Peek 0.0%\n 1\tJxck 0.0%\n 1\tAJ ONeal 0.0%\n 1\tMichael Hemesath 0.0%\n 1\tMorten Siebuhr 0.0%\n 1\tSamori Gorse 0.0%\n 1\tTom Jensen 0.0%\n\n## Node Compatibility\n\n Connect `< 1.x` is compatible with node 0.2.x\n\n\n Connect `1.x` is compatible with node 0.4.x\n\n\n Connect (_master_) `2.x` is compatible with node 0.6.x\n\n## CLA\n\n [http://sencha.com/cla](http://sencha.com/cla)\n\n## License\n\nView the [LICENSE](https://github.com/senchalabs/connect/blob/master/LICENSE) file. The [Silk](http://www.famfamfam.com/lab/icons/silk/) icons used by the `directory` middleware created by/copyright of [FAMFAMFAM](http://www.famfamfam.com/).\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/senchalabs/connect/issues" - }, - "homepage": "https://github.com/senchalabs/connect", - "_id": "connect@2.8.8", - "_from": "connect@~2.8.4" -} diff --git a/node_modules/karma/node_modules/connect/test.js b/node_modules/karma/node_modules/connect/test.js deleted file mode 100644 index a349d0bb..00000000 --- a/node_modules/karma/node_modules/connect/test.js +++ /dev/null @@ -1,7 +0,0 @@ - -var conn = require('./'); -var app = conn(); - -app.use(conn.logger('dev')); - -app.listen(3000); diff --git a/node_modules/karma/node_modules/di/LICENSE b/node_modules/karma/node_modules/di/LICENSE deleted file mode 100644 index 39baeb42..00000000 --- a/node_modules/karma/node_modules/di/LICENSE +++ /dev/null @@ -1,20 +0,0 @@ -The MIT License - -Copyright (C) 2013 Vojta Jína. - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR -COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER -IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/di/README.md b/node_modules/karma/node_modules/di/README.md deleted file mode 100644 index 87c185ad..00000000 --- a/node_modules/karma/node_modules/di/README.md +++ /dev/null @@ -1,22 +0,0 @@ -# Dependency Injection for Node.js - -Heavily influenced by [AngularJS] and its implementation of dependency injection. -Inspired by [Guice] and [Pico Container]. - -[AngularJS]: http://angularjs.org/ -[Pico Container]: http://picocontainer.codehaus.org/ -[Guice]: http://code.google.com/p/google-guice/ - - diff --git a/node_modules/karma/node_modules/di/lib/annotation.js b/node_modules/karma/node_modules/di/lib/annotation.js deleted file mode 100644 index 401a3c5e..00000000 --- a/node_modules/karma/node_modules/di/lib/annotation.js +++ /dev/null @@ -1,37 +0,0 @@ -var annotate = function() { - var args = Array.prototype.slice.call(arguments); - var fn = args.pop(); - - fn.$inject = args; - - return fn; -}; - - -// Current limitations: -// - can't put into "function arg" comments -// function /* (no parenthesis like this) */ (){} -// function abc( /* xx (no parenthesis like this) */ a, b) {} -// -// Just put the comment before function or inside: -// /* (((this is fine))) */ function(a, b) {} -// function abc(a) { /* (((this is fine))) */} - -var FN_ARGS = /^function\s*[^\(]*\(\s*([^\)]*)\)/m; -var FN_ARG = /\/\*([^\*]*)\*\//m; - -var parse = function(fn) { - if (typeof fn !== 'function') { - throw new Error('Can not annotate "' + fn + '". Expected a function!'); - } - - var match = fn.toString().match(FN_ARGS); - return match[1] && match[1].split(',').map(function(arg) { - match = arg.match(FN_ARG); - return match ? match[1].trim() : arg.trim(); - }) || []; -}; - - -exports.annotate = annotate; -exports.parse = parse; diff --git a/node_modules/karma/node_modules/di/lib/index.js b/node_modules/karma/node_modules/di/lib/index.js deleted file mode 100644 index ceb27ab7..00000000 --- a/node_modules/karma/node_modules/di/lib/index.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - annotate: require('./annotation').annotate, - Module: require('./module'), - Injector: require('./injector') -}; diff --git a/node_modules/karma/node_modules/di/lib/injector.js b/node_modules/karma/node_modules/di/lib/injector.js deleted file mode 100644 index 4a7cc552..00000000 --- a/node_modules/karma/node_modules/di/lib/injector.js +++ /dev/null @@ -1,131 +0,0 @@ -var Module = require('./module'); -var autoAnnotate = require('./annotation').parse; - - -var Injector = function(modules, parent) { - parent = parent || { - get: function(name) { - currentlyResolving.push(name); - throw error('No provider for "' + name + '"!'); - } - }; - - var currentlyResolving = []; - var providers = this._providers = Object.create(parent._providers || null); - var instances = this._instances = Object.create(null); - - instances.injector = this; - - var error = function(msg) { - var stack = currentlyResolving.join(' -> '); - currentlyResolving.length = 0; - return new Error(stack ? msg + ' (Resolving: ' + stack + ')' : msg); - }; - - var get = function(name) { - if (!providers[name] && name.indexOf('.') !== -1) { - var parts = name.split('.'); - var pivot = get(parts.shift()); - - while(parts.length) { - pivot = pivot[parts.shift()]; - } - - return pivot; - } - - if (Object.hasOwnProperty.call(instances, name)) { - return instances[name]; - } - - if (Object.hasOwnProperty.call(providers, name)) { - if (currentlyResolving.indexOf(name) !== -1) { - currentlyResolving.push(name); - throw error('Can not resolve circular dependency!'); - } - - currentlyResolving.push(name); - instances[name] = providers[name][0](providers[name][1]); - currentlyResolving.pop(); - - return instances[name]; - } - - return parent.get(name); - }; - - var instantiate = function(Type) { - var instance = Object.create(Type.prototype); - var returned = invoke(Type, instance); - - return typeof returned === 'object' ? returned : instance; - }; - - var invoke = function(fn, context) { - if (typeof fn !== 'function') { - throw error('Can not invoke "' + fn + '". Expected a function!'); - } - - var inject = fn.$inject && fn.$inject || autoAnnotate(fn); - var dependencies = inject.map(function(dep) { - return get(dep); - }); - - // TODO(vojta): optimize without apply - return fn.apply(context, dependencies); - }; - - var createChild = function(modules, providersFromParent) { - if (providersFromParent && providersFromParent.length) { - var fromParentModule = Object.create(null); - - providersFromParent.forEach(function(name) { - if (!providers[name]) { - throw new Error('No provider for "' + name + '". Can not use provider from the parent!'); - } - - fromParentModule[name] = [providers[name][2], providers[name][1]]; - }); - - modules.unshift(fromParentModule); - } - - return new Injector(modules, this); - }; - - var factoryMap = { - factory: invoke, - type: instantiate, - value: function(value) { - return value; - } - }; - - modules.forEach(function(module) { - // TODO(vojta): handle wrong inputs (modules) - if (module instanceof Module) { - module.forEach(function(provider) { - var name = provider[0]; - var type = provider[1]; - var value = provider[2]; - - providers[name] = [factoryMap[type], value, type]; - }); - } else if (typeof module === 'object') { - Object.keys(module).forEach(function(name) { - var type = module[name][0]; - var value = module[name][1]; - - providers[name] = [factoryMap[type], value, type]; - }); - } - }); - - // public API - this.get = get; - this.invoke = invoke; - this.instantiate = instantiate; - this.createChild = createChild; -}; - -module.exports = Injector; diff --git a/node_modules/karma/node_modules/di/lib/module.js b/node_modules/karma/node_modules/di/lib/module.js deleted file mode 100644 index 4fd218e9..00000000 --- a/node_modules/karma/node_modules/di/lib/module.js +++ /dev/null @@ -1,24 +0,0 @@ -var Module = function() { - var providers = []; - - this.factory = function(name, factory) { - providers.push([name, 'factory', factory]); - return this; - }; - - this.value = function(name, value) { - providers.push([name, 'value', value]); - return this; - }; - - this.type = function(name, type) { - providers.push([name, 'type', type]); - return this; - }; - - this.forEach = function(iterator) { - providers.forEach(iterator); - }; -}; - -module.exports = Module; diff --git a/node_modules/karma/node_modules/di/package.json b/node_modules/karma/node_modules/di/package.json deleted file mode 100644 index 00d14fbd..00000000 --- a/node_modules/karma/node_modules/di/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "di", - "version": "0.0.1", - "description": "Dependency Injection for Node.js. Heavily inspired by AngularJS.", - "main": "lib/index.js", - "scripts": { - "test": "mocha --compilers coffee:coffee-script test/*" - }, - "repository": { - "type": "git", - "url": "git://github.com/vojtajina/node-di.git" - }, - "keywords": [ - "di", - "dependency", - "injection", - "injector" - ], - "devDependencies": { - "grunt": "~0.4.0rc5", - "grunt-simple-mocha": "~0.3.2", - "grunt-contrib-jshint": "~0.1.1rc5", - "mocha": "1.8.1", - "chai": "1.4.2", - "coffee-script": "1.4.0" - }, - "author": { - "name": "Vojta Jina", - "email": "vojta.jina@gmail.com" - }, - "license": "MIT", - "readme": "# Dependency Injection for Node.js\n\nHeavily influenced by [AngularJS] and its implementation of dependency injection.\nInspired by [Guice] and [Pico Container].\n\n[AngularJS]: http://angularjs.org/\n[Pico Container]: http://picocontainer.codehaus.org/\n[Guice]: http://code.google.com/p/google-guice/\n\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/vojtajina/node-di/issues" - }, - "homepage": "https://github.com/vojtajina/node-di", - "_id": "di@0.0.1", - "_from": "di@~0.0.1" -} diff --git a/node_modules/karma/node_modules/glob/.npmignore b/node_modules/karma/node_modules/glob/.npmignore deleted file mode 100644 index 2af4b71c..00000000 --- a/node_modules/karma/node_modules/glob/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -.*.swp -test/a/ diff --git a/node_modules/karma/node_modules/glob/.travis.yml b/node_modules/karma/node_modules/glob/.travis.yml deleted file mode 100644 index baa0031d..00000000 --- a/node_modules/karma/node_modules/glob/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: node_js -node_js: - - 0.8 diff --git a/node_modules/karma/node_modules/glob/LICENSE b/node_modules/karma/node_modules/glob/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/karma/node_modules/glob/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma/node_modules/glob/README.md b/node_modules/karma/node_modules/glob/README.md deleted file mode 100644 index 6e27df62..00000000 --- a/node_modules/karma/node_modules/glob/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# Glob - -This is a glob implementation in JavaScript. It uses the `minimatch` -library to do its matching. - -## Attention: node-glob users! - -The API has changed dramatically between 2.x and 3.x. This library is -now 100% JavaScript, and the integer flags have been replaced with an -options object. - -Also, there's an event emitter class, proper tests, and all the other -things you've come to expect from node modules. - -And best of all, no compilation! - -## Usage - -```javascript -var glob = require("glob") - -// options is optional -glob("**/*.js", options, function (er, files) { - // files is an array of filenames. - // If the `nonull` option is set, and nothing - // was found, then files is ["**/*.js"] - // er is an error object or null. -}) -``` - -## Features - -Please see the [minimatch -documentation](https://github.com/isaacs/minimatch) for more details. - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` -* [minimatch documentation](https://github.com/isaacs/minimatch) - -## glob(pattern, [options], cb) - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* `cb` {Function} - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Perform an asynchronous glob search. - -## glob.sync(pattern, [options] - -* `pattern` {String} Pattern to be matched -* `options` {Object} -* return: {Array} filenames found matching the pattern - -Perform a synchronous glob search. - -## Class: glob.Glob - -Create a Glob object by instanting the `glob.Glob` class. - -```javascript -var Glob = require("glob").Glob -var mg = new Glob(pattern, options, cb) -``` - -It's an EventEmitter, and starts walking the filesystem to find matches -immediately. - -### new glob.Glob(pattern, [options], [cb]) - -* `pattern` {String} pattern to search for -* `options` {Object} -* `cb` {Function} Called when an error occurs, or matches are found - * `err` {Error | null} - * `matches` {Array} filenames found matching the pattern - -Note that if the `sync` flag is set in the options, then matches will -be immediately available on the `g.found` member. - -### Properties - -* `minimatch` The minimatch object that the glob uses. -* `options` The options object passed in. -* `error` The error encountered. When an error is encountered, the - glob object is in an undefined state, and should be discarded. -* `aborted` Boolean which is set to true when calling `abort()`. There - is no way at this time to continue a glob search after aborting, but - you can re-use the statCache to avoid having to duplicate syscalls. - -### Events - -* `end` When the matching is finished, this is emitted with all the - matches found. If the `nonull` option is set, and no match was found, - then the `matches` list contains the original pattern. The matches - are sorted, unless the `nosort` flag is set. -* `match` Every time a match is found, this is emitted with the matched. -* `error` Emitted when an unexpected error is encountered, or whenever - any fs error occurs if `options.strict` is set. -* `abort` When `abort()` is called, this event is raised. - -### Methods - -* `abort` Stop the search. - -### Options - -All the options that can be passed to Minimatch can also be passed to -Glob to change pattern matching behavior. Also, some have been added, -or have glob-specific ramifications. - -All options are false by default, unless otherwise noted. - -All options are added to the glob object, as well. - -* `cwd` The current working directory in which to search. Defaults - to `process.cwd()`. -* `root` The place where patterns starting with `/` will be mounted - onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix - systems, and `C:\` or some such on Windows.) -* `nomount` By default, a pattern starting with a forward-slash will be - "mounted" onto the root setting, so that a valid filesystem path is - returned. Set this flag to disable that behavior. -* `mark` Add a `/` character to directory matches. Note that this - requires additional stat calls. -* `nosort` Don't sort the results. -* `stat` Set to true to stat *all* results. This reduces performance - somewhat, and is completely unnecessary, unless `readdir` is presumed - to be an untrustworthy indicator of file existence. It will cause - ELOOP to be triggered one level sooner in the case of cyclical - symbolic links. -* `silent` When an unusual error is encountered - when attempting to read a directory, a warning will be printed to - stderr. Set the `silent` option to true to suppress these warnings. -* `strict` When an unusual error is encountered - when attempting to read a directory, the process will just continue on - in search of other matches. Set the `strict` option to raise an error - in these cases. -* `statCache` A cache of results of filesystem information, to prevent - unnecessary stat calls. While it should not normally be necessary to - set this, you may pass the statCache from one glob() call to the - options object of another, if you know that the filesystem will not - change between calls. (See "Race Conditions" below.) -* `sync` Perform a synchronous glob search. -* `nounique` In some cases, brace-expanded patterns can result in the - same file showing up multiple times in the result set. By default, - this implementation prevents duplicates in the result set. - Set this flag to disable that behavior. -* `nonull` Set to never return an empty set, instead returning a set - containing the pattern itself. This is the default in glob(3). -* `nocase` Perform a case-insensitive match. Note that case-insensitive - filesystems will sometimes result in glob returning results that are - case-insensitively matched anyway, since readdir and stat will not - raise an error. -* `debug` Set to enable debug logging in minimatch and glob. -* `globDebug` Set to enable debug logging in glob, but not minimatch. - -## Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between node-glob and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. **Note that this is different from the way that `**` is -handled by ruby's `Dir` class.** - -If an escaped pattern has no matches, and the `nonull` flag is set, -then glob returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - -## Windows - -**Please only use forward-slashes in glob expressions.** - -Though windows uses either `/` or `\` as its path separator, only `/` -characters are used by this glob implementation. You must use -forward-slashes **only** in glob expressions. Back-slashes will always -be interpreted as escape characters, not path separators. - -Results from absolute patterns such as `/foo/*` are mounted onto the -root setting using `path.join`. On windows, this will by default result -in `/foo/*` matching `C:\foo\bar.txt`. - -## Race Conditions - -Glob searching, by its very nature, is susceptible to race conditions, -since it relies on directory walking and such. - -As a result, it is possible that a file that exists when glob looks for -it may have been deleted or modified by the time it returns the result. - -As part of its internal implementation, this program caches all stat -and readdir calls that it makes, in order to cut down on system -overhead. However, this also makes it even more susceptible to races, -especially if the statCache object is reused between glob calls. - -Users are thus advised not to use a glob result as a -guarantee of filesystem state in the face of rapid changes. -For the vast majority of operations, this is never a problem. diff --git a/node_modules/karma/node_modules/glob/examples/g.js b/node_modules/karma/node_modules/glob/examples/g.js deleted file mode 100644 index be122df0..00000000 --- a/node_modules/karma/node_modules/glob/examples/g.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "test/a/**/[cg]/../[cg]" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/node_modules/karma/node_modules/glob/examples/usr-local.js b/node_modules/karma/node_modules/glob/examples/usr-local.js deleted file mode 100644 index 327a425e..00000000 --- a/node_modules/karma/node_modules/glob/examples/usr-local.js +++ /dev/null @@ -1,9 +0,0 @@ -var Glob = require("../").Glob - -var pattern = "{./*/*,/*,/usr/local/*}" -console.log(pattern) - -var mg = new Glob(pattern, {mark: true}, function (er, matches) { - console.log("matches", matches) -}) -console.log("after") diff --git a/node_modules/karma/node_modules/glob/glob.js b/node_modules/karma/node_modules/glob/glob.js deleted file mode 100644 index 891c8836..00000000 --- a/node_modules/karma/node_modules/glob/glob.js +++ /dev/null @@ -1,643 +0,0 @@ -// Approach: -// -// 1. Get the minimatch set -// 2. For each pattern in the set, PROCESS(pattern) -// 3. Store matches per-set, then uniq them -// -// PROCESS(pattern) -// Get the first [n] items from pattern that are all strings -// Join these together. This is PREFIX. -// If there is no more remaining, then stat(PREFIX) and -// add to matches if it succeeds. END. -// readdir(PREFIX) as ENTRIES -// If fails, END -// If pattern[n] is GLOBSTAR -// // handle the case where the globstar match is empty -// // by pruning it out, and testing the resulting pattern -// PROCESS(pattern[0..n] + pattern[n+1 .. $]) -// // handle other cases. -// for ENTRY in ENTRIES (not dotfiles) -// // attach globstar + tail onto the entry -// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $]) -// -// else // not globstar -// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) -// Test ENTRY against pattern[n] -// If fails, continue -// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) -// -// Caveat: -// Cache all stats and readdirs results to minimize syscall. Since all -// we ever care about is existence and directory-ness, we can just keep -// `true` for files, and [children,...] for directories, or `false` for -// things that don't exist. - - - -module.exports = glob - -var fs = require("graceful-fs") -, minimatch = require("minimatch") -, Minimatch = minimatch.Minimatch -, inherits = require("inherits") -, EE = require("events").EventEmitter -, path = require("path") -, isDir = {} -, assert = require("assert").ok - -function glob (pattern, options, cb) { - if (typeof options === "function") cb = options, options = {} - if (!options) options = {} - - if (typeof options === "number") { - deprecated() - return - } - - var g = new Glob(pattern, options, cb) - return g.sync ? g.found : g -} - -glob.fnmatch = deprecated - -function deprecated () { - throw new Error("glob's interface has changed. Please see the docs.") -} - -glob.sync = globSync -function globSync (pattern, options) { - if (typeof options === "number") { - deprecated() - return - } - - options = options || {} - options.sync = true - return glob(pattern, options) -} - - -glob.Glob = Glob -inherits(Glob, EE) -function Glob (pattern, options, cb) { - if (!(this instanceof Glob)) { - return new Glob(pattern, options, cb) - } - - if (typeof cb === "function") { - this.on("error", cb) - this.on("end", function (matches) { - cb(null, matches) - }) - } - - options = options || {} - - this.EOF = {} - this._emitQueue = [] - - this.maxDepth = options.maxDepth || 1000 - this.maxLength = options.maxLength || Infinity - this.statCache = options.statCache || {} - - this.changedCwd = false - var cwd = process.cwd() - if (!options.hasOwnProperty("cwd")) this.cwd = cwd - else { - this.cwd = options.cwd - this.changedCwd = path.resolve(options.cwd) !== cwd - } - - this.root = options.root || path.resolve(this.cwd, "/") - this.root = path.resolve(this.root) - if (process.platform === "win32") - this.root = this.root.replace(/\\/g, "/") - - this.nomount = !!options.nomount - - if (!pattern) { - throw new Error("must provide pattern") - } - - // base-matching: just use globstar for that. - if (options.matchBase && -1 === pattern.indexOf("/")) { - if (options.noglobstar) { - throw new Error("base matching requires globstar") - } - pattern = "**/" + pattern - } - - this.strict = options.strict !== false - this.dot = !!options.dot - this.mark = !!options.mark - this.sync = !!options.sync - this.nounique = !!options.nounique - this.nonull = !!options.nonull - this.nosort = !!options.nosort - this.nocase = !!options.nocase - this.stat = !!options.stat - - this.debug = !!options.debug || !!options.globDebug - if (this.debug) - this.log = console.error - - this.silent = !!options.silent - - var mm = this.minimatch = new Minimatch(pattern, options) - this.options = mm.options - pattern = this.pattern = mm.pattern - - this.error = null - this.aborted = false - - EE.call(this) - - // process each pattern in the minimatch set - var n = this.minimatch.set.length - - // The matches are stored as {: true,...} so that - // duplicates are automagically pruned. - // Later, we do an Object.keys() on these. - // Keep them as a list so we can fill in when nonull is set. - this.matches = new Array(n) - - this.minimatch.set.forEach(iterator.bind(this)) - function iterator (pattern, i, set) { - this._process(pattern, 0, i, function (er) { - if (er) this.emit("error", er) - if (-- n <= 0) this._finish() - }) - } -} - -Glob.prototype.log = function () {} - -Glob.prototype._finish = function () { - assert(this instanceof Glob) - - var nou = this.nounique - , all = nou ? [] : {} - - for (var i = 0, l = this.matches.length; i < l; i ++) { - var matches = this.matches[i] - this.log("matches[%d] =", i, matches) - // do like the shell, and spit out the literal glob - if (!matches) { - if (this.nonull) { - var literal = this.minimatch.globSet[i] - if (nou) all.push(literal) - else all[literal] = true - } - } else { - // had matches - var m = Object.keys(matches) - if (nou) all.push.apply(all, m) - else m.forEach(function (m) { - all[m] = true - }) - } - } - - if (!nou) all = Object.keys(all) - - if (!this.nosort) { - all = all.sort(this.nocase ? alphasorti : alphasort) - } - - if (this.mark) { - // at *some* point we statted all of these - all = all.map(function (m) { - var sc = this.statCache[m] - if (!sc) - return m - var isDir = (Array.isArray(sc) || sc === 2) - if (isDir && m.slice(-1) !== "/") { - return m + "/" - } - if (!isDir && m.slice(-1) === "/") { - return m.replace(/\/+$/, "") - } - return m - }, this) - } - - this.log("emitting end", all) - - this.EOF = this.found = all - this.emitMatch(this.EOF) -} - -function alphasorti (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return alphasort(a, b) -} - -function alphasort (a, b) { - return a > b ? 1 : a < b ? -1 : 0 -} - -Glob.prototype.abort = function () { - this.aborted = true - this.emit("abort") -} - -Glob.prototype.pause = function () { - if (this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = true - this.emit("pause") -} - -Glob.prototype.resume = function () { - if (!this.paused) return - if (this.sync) - this.emit("error", new Error("Can't pause/resume sync glob")) - this.paused = false - this.emit("resume") - this._processEmitQueue() - //process.nextTick(this.emit.bind(this, "resume")) -} - -Glob.prototype.emitMatch = function (m) { - this._emitQueue.push(m) - this._processEmitQueue() -} - -Glob.prototype._processEmitQueue = function (m) { - while (!this._processingEmitQueue && - !this.paused) { - this._processingEmitQueue = true - var m = this._emitQueue.shift() - if (!m) { - this._processingEmitQueue = false - break - } - - this.log('emit!', m === this.EOF ? "end" : "match") - - this.emit(m === this.EOF ? "end" : "match", m) - this._processingEmitQueue = false - } -} - -Glob.prototype._process = function (pattern, depth, index, cb_) { - assert(this instanceof Glob) - - var cb = function cb (er, res) { - assert(this instanceof Glob) - if (this.paused) { - if (!this._processQueue) { - this._processQueue = [] - this.once("resume", function () { - var q = this._processQueue - this._processQueue = null - q.forEach(function (cb) { cb() }) - }) - } - this._processQueue.push(cb_.bind(this, er, res)) - } else { - cb_.call(this, er, res) - } - }.bind(this) - - if (this.aborted) return cb() - - if (depth > this.maxDepth) return cb() - - // Get the first [n] parts of pattern that are all strings. - var n = 0 - while (typeof pattern[n] === "string") { - n ++ - } - // now n is the index of the first one that is *not* a string. - - // see if there's anything else - var prefix - switch (n) { - // if not, then this is rather simple - case pattern.length: - prefix = pattern.join("/") - this._stat(prefix, function (exists, isDir) { - // either it's there, or it isn't. - // nothing more to do, either way. - if (exists) { - if (prefix && isAbsolute(prefix) && !this.nomount) { - if (prefix.charAt(0) === "/") { - prefix = path.join(this.root, prefix) - } else { - prefix = path.resolve(this.root, prefix) - } - } - - if (process.platform === "win32") - prefix = prefix.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][prefix] = true - this.emitMatch(prefix) - } - return cb() - }) - return - - case 0: - // pattern *starts* with some non-trivial item. - // going to readdir(cwd), but not include the prefix in matches. - prefix = null - break - - default: - // pattern has some string bits in the front. - // whatever it starts with, whether that's "absolute" like /foo/bar, - // or "relative" like "../baz" - prefix = pattern.slice(0, n) - prefix = prefix.join("/") - break - } - - // get the list of entries. - var read - if (prefix === null) read = "." - else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { - if (!prefix || !isAbsolute(prefix)) { - prefix = path.join("/", prefix) - } - read = prefix = path.resolve(prefix) - - // if (process.platform === "win32") - // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") - - this.log('absolute: ', prefix, this.root, pattern, read) - } else { - read = prefix - } - - this.log('readdir(%j)', read, this.cwd, this.root) - - return this._readdir(read, function (er, entries) { - if (er) { - // not a directory! - // this means that, whatever else comes after this, it can never match - return cb() - } - - // globstar is special - if (pattern[n] === minimatch.GLOBSTAR) { - // test without the globstar, and with every child both below - // and replacing the globstar. - var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ] - entries.forEach(function (e) { - if (e.charAt(0) === "." && !this.dot) return - // instead of the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))) - // below the globstar - s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n))) - }, this) - - // now asyncForEach over this - var l = s.length - , errState = null - s.forEach(function (gsPattern) { - this._process(gsPattern, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l <= 0) return cb() - }) - }, this) - - return - } - - // not a globstar - // It will only match dot entries if it starts with a dot, or if - // dot is set. Stuff like @(.foo|.bar) isn't allowed. - var pn = pattern[n] - if (typeof pn === "string") { - var found = entries.indexOf(pn) !== -1 - entries = found ? entries[pn] : [] - } else { - var rawGlob = pattern[n]._glob - , dotOk = this.dot || rawGlob.charAt(0) === "." - - entries = entries.filter(function (e) { - return (e.charAt(0) !== "." || dotOk) && - (typeof pattern[n] === "string" && e === pattern[n] || - e.match(pattern[n])) - }) - } - - // If n === pattern.length - 1, then there's no need for the extra stat - // *unless* the user has specified "mark" or "stat" explicitly. - // We know that they exist, since the readdir returned them. - if (n === pattern.length - 1 && - !this.mark && - !this.stat) { - entries.forEach(function (e) { - if (prefix) { - if (prefix !== "/") e = prefix + "/" + e - else e = prefix + e - } - if (e.charAt(0) === "/" && !this.nomount) { - e = path.join(this.root, e) - } - - if (process.platform === "win32") - e = e.replace(/\\/g, "/") - - this.matches[index] = this.matches[index] || {} - this.matches[index][e] = true - this.emitMatch(e) - }, this) - return cb.call(this) - } - - - // now test all the remaining entries as stand-ins for that part - // of the pattern. - var l = entries.length - , errState = null - if (l === 0) return cb() // no matches possible - entries.forEach(function (e) { - var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)) - this._process(p, depth + 1, index, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (--l === 0) return cb.call(this) - }) - }, this) - }) - -} - -Glob.prototype._stat = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - this.log('stat', [this.cwd, f, '=', abs]) - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterStat(f, abs, cb, er) - } - - if (this.statCache.hasOwnProperty(f)) { - var exists = this.statCache[f] - , isDir = exists && (Array.isArray(exists) || exists === 2) - if (this.sync) return cb.call(this, !!exists, isDir) - return process.nextTick(cb.bind(this, !!exists, isDir)) - } - - if (this.sync) { - var er, stat - try { - stat = fs.statSync(abs) - } catch (e) { - er = e - } - this._afterStat(f, abs, cb, er, stat) - } else { - fs.stat(abs, this._afterStat.bind(this, f, abs, cb)) - } -} - -Glob.prototype._afterStat = function (f, abs, cb, er, stat) { - var exists - assert(this instanceof Glob) - - if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { - this.log("should be ENOTDIR, fake it") - - er = new Error("ENOTDIR, not a directory '" + abs + "'") - er.path = abs - er.code = "ENOTDIR" - stat = null - } - - if (er || !stat) { - exists = false - } else { - exists = stat.isDirectory() ? 2 : 1 - } - this.statCache[f] = this.statCache[f] || exists - cb.call(this, !!exists, exists === 2) -} - -Glob.prototype._readdir = function (f, cb) { - assert(this instanceof Glob) - var abs = f - if (f.charAt(0) === "/") { - abs = path.join(this.root, f) - } else if (isAbsolute(f)) { - abs = f - } else if (this.changedCwd) { - abs = path.resolve(this.cwd, f) - } - - this.log('readdir', [this.cwd, f, abs]) - if (f.length > this.maxLength) { - var er = new Error("Path name too long") - er.code = "ENAMETOOLONG" - er.path = f - return this._afterReaddir(f, abs, cb, er) - } - - if (this.statCache.hasOwnProperty(f)) { - var c = this.statCache[f] - if (Array.isArray(c)) { - if (this.sync) return cb.call(this, null, c) - return process.nextTick(cb.bind(this, null, c)) - } - - if (!c || c === 1) { - // either ENOENT or ENOTDIR - var code = c ? "ENOTDIR" : "ENOENT" - , er = new Error((c ? "Not a directory" : "Not found") + ": " + f) - er.path = f - er.code = code - this.log(f, er) - if (this.sync) return cb.call(this, er) - return process.nextTick(cb.bind(this, er)) - } - - // at this point, c === 2, meaning it's a dir, but we haven't - // had to read it yet, or c === true, meaning it's *something* - // but we don't have any idea what. Need to read it, either way. - } - - if (this.sync) { - var er, entries - try { - entries = fs.readdirSync(abs) - } catch (e) { - er = e - } - return this._afterReaddir(f, abs, cb, er, entries) - } - - fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb)) -} - -Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) { - assert(this instanceof Glob) - if (entries && !er) { - this.statCache[f] = entries - // if we haven't asked to stat everything for suresies, then just - // assume that everything in there exists, so we can avoid - // having to stat it a second time. This also gets us one step - // further into ELOOP territory. - if (!this.mark && !this.stat) { - entries.forEach(function (e) { - if (f === "/") e = f + e - else e = f + "/" + e - this.statCache[e] = true - }, this) - } - - return cb.call(this, er, entries) - } - - // now handle errors, and cache the information - if (er) switch (er.code) { - case "ENOTDIR": // totally normal. means it *does* exist. - this.statCache[f] = 1 - return cb.call(this, er) - case "ENOENT": // not terribly unusual - case "ELOOP": - case "ENAMETOOLONG": - case "UNKNOWN": - this.statCache[f] = false - return cb.call(this, er) - default: // some unusual error. Treat as failure. - this.statCache[f] = false - if (this.strict) this.emit("error", er) - if (!this.silent) console.error("glob error", er) - return cb.call(this, er) - } -} - -var isAbsolute = process.platform === "win32" ? absWin : absUnix - -function absWin (p) { - if (absUnix(p)) return true - // pull off the device/UNC bit from a windows path. - // from node's lib/path.js - var splitDeviceRe = - /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ - , result = splitDeviceRe.exec(p) - , device = result[1] || '' - , isUnc = device && device.charAt(1) !== ':' - , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute - - return isAbsolute -} - -function absUnix (p) { - return p.charAt(0) === "/" || p === "" -} diff --git a/node_modules/karma/node_modules/glob/node_modules/inherits/README.md b/node_modules/karma/node_modules/glob/node_modules/inherits/README.md deleted file mode 100644 index b2beaed9..00000000 --- a/node_modules/karma/node_modules/glob/node_modules/inherits/README.md +++ /dev/null @@ -1,51 +0,0 @@ -A dead simple way to do inheritance in JS. - - var inherits = require("inherits") - - function Animal () { - this.alive = true - } - Animal.prototype.say = function (what) { - console.log(what) - } - - inherits(Dog, Animal) - function Dog () { - Dog.super.apply(this) - } - Dog.prototype.sniff = function () { - this.say("sniff sniff") - } - Dog.prototype.bark = function () { - this.say("woof woof") - } - - inherits(Chihuahua, Dog) - function Chihuahua () { - Chihuahua.super.apply(this) - } - Chihuahua.prototype.bark = function () { - this.say("yip yip") - } - - // also works - function Cat () { - Cat.super.apply(this) - } - Cat.prototype.hiss = function () { - this.say("CHSKKSS!!") - } - inherits(Cat, Animal, { - meow: function () { this.say("miao miao") } - }) - Cat.prototype.purr = function () { - this.say("purr purr") - } - - - var c = new Chihuahua - assert(c instanceof Chihuahua) - assert(c instanceof Dog) - assert(c instanceof Animal) - -The actual function is laughably small. 10-lines small. diff --git a/node_modules/karma/node_modules/glob/node_modules/inherits/inherits.js b/node_modules/karma/node_modules/glob/node_modules/inherits/inherits.js deleted file mode 100644 index 061b3962..00000000 --- a/node_modules/karma/node_modules/glob/node_modules/inherits/inherits.js +++ /dev/null @@ -1,29 +0,0 @@ -module.exports = inherits - -function inherits (c, p, proto) { - proto = proto || {} - var e = {} - ;[c.prototype, proto].forEach(function (s) { - Object.getOwnPropertyNames(s).forEach(function (k) { - e[k] = Object.getOwnPropertyDescriptor(s, k) - }) - }) - c.prototype = Object.create(p.prototype, e) - c.super = p -} - -//function Child () { -// Child.super.call(this) -// console.error([this -// ,this.constructor -// ,this.constructor === Child -// ,this.constructor.super === Parent -// ,Object.getPrototypeOf(this) === Child.prototype -// ,Object.getPrototypeOf(Object.getPrototypeOf(this)) -// === Parent.prototype -// ,this instanceof Child -// ,this instanceof Parent]) -//} -//function Parent () {} -//inherits(Child, Parent) -//new Child diff --git a/node_modules/karma/node_modules/glob/node_modules/inherits/package.json b/node_modules/karma/node_modules/glob/node_modules/inherits/package.json deleted file mode 100644 index 738a0a58..00000000 --- a/node_modules/karma/node_modules/glob/node_modules/inherits/package.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "name": "inherits", - "description": "A tiny simple way to do classic inheritance in js", - "version": "1.0.0", - "keywords": [ - "inheritance", - "class", - "klass", - "oop", - "object-oriented" - ], - "main": "./inherits.js", - "repository": { - "type": "git", - "url": "https://github.com/isaacs/inherits" - }, - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "readme": "A dead simple way to do inheritance in JS.\n\n var inherits = require(\"inherits\")\n\n function Animal () {\n this.alive = true\n }\n Animal.prototype.say = function (what) {\n console.log(what)\n }\n\n inherits(Dog, Animal)\n function Dog () {\n Dog.super.apply(this)\n }\n Dog.prototype.sniff = function () {\n this.say(\"sniff sniff\")\n }\n Dog.prototype.bark = function () {\n this.say(\"woof woof\")\n }\n\n inherits(Chihuahua, Dog)\n function Chihuahua () {\n Chihuahua.super.apply(this)\n }\n Chihuahua.prototype.bark = function () {\n this.say(\"yip yip\")\n }\n\n // also works\n function Cat () {\n Cat.super.apply(this)\n }\n Cat.prototype.hiss = function () {\n this.say(\"CHSKKSS!!\")\n }\n inherits(Cat, Animal, {\n meow: function () { this.say(\"miao miao\") }\n })\n Cat.prototype.purr = function () {\n this.say(\"purr purr\")\n }\n\n\n var c = new Chihuahua\n assert(c instanceof Chihuahua)\n assert(c instanceof Dog)\n assert(c instanceof Animal)\n\nThe actual function is laughably small. 10-lines small.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/inherits/issues" - }, - "homepage": "https://github.com/isaacs/inherits", - "_id": "inherits@1.0.0", - "_from": "inherits@1" -} diff --git a/node_modules/karma/node_modules/glob/package.json b/node_modules/karma/node_modules/glob/package.json deleted file mode 100644 index fd3bd2eb..00000000 --- a/node_modules/karma/node_modules/glob/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "name": "glob", - "description": "a little globber", - "version": "3.1.21", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-glob.git" - }, - "main": "glob.js", - "engines": { - "node": "*" - }, - "dependencies": { - "minimatch": "~0.2.11", - "graceful-fs": "~1.2.0", - "inherits": "1" - }, - "devDependencies": { - "tap": "~0.4.0", - "mkdirp": "0", - "rimraf": "1" - }, - "scripts": { - "test": "tap test/*.js" - }, - "license": "BSD", - "readme": "# Glob\n\nThis is a glob implementation in JavaScript. It uses the `minimatch`\nlibrary to do its matching.\n\n## Attention: node-glob users!\n\nThe API has changed dramatically between 2.x and 3.x. This library is\nnow 100% JavaScript, and the integer flags have been replaced with an\noptions object.\n\nAlso, there's an event emitter class, proper tests, and all the other\nthings you've come to expect from node modules.\n\nAnd best of all, no compilation!\n\n## Usage\n\n```javascript\nvar glob = require(\"glob\")\n\n// options is optional\nglob(\"**/*.js\", options, function (er, files) {\n // files is an array of filenames.\n // If the `nonull` option is set, and nothing\n // was found, then files is [\"**/*.js\"]\n // er is an error object or null.\n})\n```\n\n## Features\n\nPlease see the [minimatch\ndocumentation](https://github.com/isaacs/minimatch) for more details.\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n* [minimatch documentation](https://github.com/isaacs/minimatch)\n\n## glob(pattern, [options], cb)\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* `cb` {Function}\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nPerform an asynchronous glob search.\n\n## glob.sync(pattern, [options]\n\n* `pattern` {String} Pattern to be matched\n* `options` {Object}\n* return: {Array} filenames found matching the pattern\n\nPerform a synchronous glob search.\n\n## Class: glob.Glob\n\nCreate a Glob object by instanting the `glob.Glob` class.\n\n```javascript\nvar Glob = require(\"glob\").Glob\nvar mg = new Glob(pattern, options, cb)\n```\n\nIt's an EventEmitter, and starts walking the filesystem to find matches\nimmediately.\n\n### new glob.Glob(pattern, [options], [cb])\n\n* `pattern` {String} pattern to search for\n* `options` {Object}\n* `cb` {Function} Called when an error occurs, or matches are found\n * `err` {Error | null}\n * `matches` {Array} filenames found matching the pattern\n\nNote that if the `sync` flag is set in the options, then matches will\nbe immediately available on the `g.found` member.\n\n### Properties\n\n* `minimatch` The minimatch object that the glob uses.\n* `options` The options object passed in.\n* `error` The error encountered. When an error is encountered, the\n glob object is in an undefined state, and should be discarded.\n* `aborted` Boolean which is set to true when calling `abort()`. There\n is no way at this time to continue a glob search after aborting, but\n you can re-use the statCache to avoid having to duplicate syscalls.\n\n### Events\n\n* `end` When the matching is finished, this is emitted with all the\n matches found. If the `nonull` option is set, and no match was found,\n then the `matches` list contains the original pattern. The matches\n are sorted, unless the `nosort` flag is set.\n* `match` Every time a match is found, this is emitted with the matched.\n* `error` Emitted when an unexpected error is encountered, or whenever\n any fs error occurs if `options.strict` is set.\n* `abort` When `abort()` is called, this event is raised.\n\n### Methods\n\n* `abort` Stop the search.\n\n### Options\n\nAll the options that can be passed to Minimatch can also be passed to\nGlob to change pattern matching behavior. Also, some have been added,\nor have glob-specific ramifications.\n\nAll options are false by default, unless otherwise noted.\n\nAll options are added to the glob object, as well.\n\n* `cwd` The current working directory in which to search. Defaults\n to `process.cwd()`.\n* `root` The place where patterns starting with `/` will be mounted\n onto. Defaults to `path.resolve(options.cwd, \"/\")` (`/` on Unix\n systems, and `C:\\` or some such on Windows.)\n* `nomount` By default, a pattern starting with a forward-slash will be\n \"mounted\" onto the root setting, so that a valid filesystem path is\n returned. Set this flag to disable that behavior.\n* `mark` Add a `/` character to directory matches. Note that this\n requires additional stat calls.\n* `nosort` Don't sort the results.\n* `stat` Set to true to stat *all* results. This reduces performance\n somewhat, and is completely unnecessary, unless `readdir` is presumed\n to be an untrustworthy indicator of file existence. It will cause\n ELOOP to be triggered one level sooner in the case of cyclical\n symbolic links.\n* `silent` When an unusual error is encountered\n when attempting to read a directory, a warning will be printed to\n stderr. Set the `silent` option to true to suppress these warnings.\n* `strict` When an unusual error is encountered\n when attempting to read a directory, the process will just continue on\n in search of other matches. Set the `strict` option to raise an error\n in these cases.\n* `statCache` A cache of results of filesystem information, to prevent\n unnecessary stat calls. While it should not normally be necessary to\n set this, you may pass the statCache from one glob() call to the\n options object of another, if you know that the filesystem will not\n change between calls. (See \"Race Conditions\" below.)\n* `sync` Perform a synchronous glob search.\n* `nounique` In some cases, brace-expanded patterns can result in the\n same file showing up multiple times in the result set. By default,\n this implementation prevents duplicates in the result set.\n Set this flag to disable that behavior.\n* `nonull` Set to never return an empty set, instead returning a set\n containing the pattern itself. This is the default in glob(3).\n* `nocase` Perform a case-insensitive match. Note that case-insensitive\n filesystems will sometimes result in glob returning results that are\n case-insensitively matched anyway, since readdir and stat will not\n raise an error.\n* `debug` Set to enable debug logging in minimatch and glob.\n* `globDebug` Set to enable debug logging in glob, but not minimatch.\n\n## Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between node-glob and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen glob returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`glob.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n## Windows\n\n**Please only use forward-slashes in glob expressions.**\n\nThough windows uses either `/` or `\\` as its path separator, only `/`\ncharacters are used by this glob implementation. You must use\nforward-slashes **only** in glob expressions. Back-slashes will always\nbe interpreted as escape characters, not path separators.\n\nResults from absolute patterns such as `/foo/*` are mounted onto the\nroot setting using `path.join`. On windows, this will by default result\nin `/foo/*` matching `C:\\foo\\bar.txt`.\n\n## Race Conditions\n\nGlob searching, by its very nature, is susceptible to race conditions,\nsince it relies on directory walking and such.\n\nAs a result, it is possible that a file that exists when glob looks for\nit may have been deleted or modified by the time it returns the result.\n\nAs part of its internal implementation, this program caches all stat\nand readdir calls that it makes, in order to cut down on system\noverhead. However, this also makes it even more susceptible to races,\nespecially if the statCache object is reused between glob calls.\n\nUsers are thus advised not to use a glob result as a\nguarantee of filesystem state in the face of rapid changes.\nFor the vast majority of operations, this is never a problem.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-glob/issues" - }, - "homepage": "https://github.com/isaacs/node-glob", - "_id": "glob@3.1.21", - "_from": "glob@~3.1.21" -} diff --git a/node_modules/karma/node_modules/glob/test/00-setup.js b/node_modules/karma/node_modules/glob/test/00-setup.js deleted file mode 100644 index 245afafd..00000000 --- a/node_modules/karma/node_modules/glob/test/00-setup.js +++ /dev/null @@ -1,176 +0,0 @@ -// just a little pre-run script to set up the fixtures. -// zz-finish cleans it up - -var mkdirp = require("mkdirp") -var path = require("path") -var i = 0 -var tap = require("tap") -var fs = require("fs") -var rimraf = require("rimraf") - -var files = -[ "a/.abcdef/x/y/z/a" -, "a/abcdef/g/h" -, "a/abcfed/g/h" -, "a/b/c/d" -, "a/bc/e/f" -, "a/c/d/c/b" -, "a/cb/e/f" -] - -var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c") -var symlinkFrom = "../.." - -files = files.map(function (f) { - return path.resolve(__dirname, f) -}) - -tap.test("remove fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "remove fixtures") - t.end() - }) -}) - -files.forEach(function (f) { - tap.test(f, function (t) { - var d = path.dirname(f) - mkdirp(d, 0755, function (er) { - if (er) { - t.fail(er) - return t.bailout() - } - fs.writeFile(f, "i like tests", function (er) { - t.ifError(er, "make file") - t.end() - }) - }) - }) -}) - -if (process.platform !== "win32") { - tap.test("symlinky", function (t) { - var d = path.dirname(symlinkTo) - console.error("mkdirp", d) - mkdirp(d, 0755, function (er) { - t.ifError(er) - fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { - t.ifError(er, "make symlink") - t.end() - }) - }) - }) -} - -;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { - w = "/tmp/glob-test/" + w - tap.test("create " + w, function (t) { - mkdirp(w, function (er) { - if (er) - throw er - t.pass(w) - t.end() - }) - }) -}) - - -// generate the bash pattern test-fixtures if possible -if (process.platform === "win32" || !process.env.TEST_REGEN) { - console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") - return -} - -var spawn = require("child_process").spawn; -var globs = - // put more patterns here. - // anything that would be directly in / should be in /tmp/glob-test - ["test/a/*/+(c|g)/./d" - ,"test/a/**/[cg]/../[cg]" - ,"test/a/{b,c,d,e,f}/**/g" - ,"test/a/b/**" - ,"test/**/g" - ,"test/a/abc{fed,def}/g/h" - ,"test/a/abc{fed/g,def}/**/" - ,"test/a/abc{fed/g,def}/**///**/" - ,"test/**/a/**/" - ,"test/+(a|b|c)/a{/,bc*}/**" - ,"test/*/*/*/f" - ,"test/**/f" - ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" - ,"{./*/*,/tmp/glob-test/*}" - ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! - ,"test/a/!(symlink)/**" - ] -var bashOutput = {} -var fs = require("fs") - -globs.forEach(function (pattern) { - tap.test("generate fixture " + pattern, function (t) { - var cmd = "shopt -s globstar && " + - "shopt -s extglob && " + - "shopt -s nullglob && " + - // "shopt >&2; " + - "eval \'for i in " + pattern + "; do echo $i; done\'" - var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) - var out = [] - cp.stdout.on("data", function (c) { - out.push(c) - }) - cp.stderr.pipe(process.stderr) - cp.on("close", function (code) { - out = flatten(out) - if (!out) - out = [] - else - out = cleanResults(out.split(/\r*\n/)) - - bashOutput[pattern] = out - t.notOk(code, "bash test should finish nicely") - t.end() - }) - }) -}) - -tap.test("save fixtures", function (t) { - var fname = path.resolve(__dirname, "bash-results.json") - var data = JSON.stringify(bashOutput, null, 2) + "\n" - fs.writeFile(fname, data, function (er) { - t.ifError(er) - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -function flatten (chunks) { - var s = 0 - chunks.forEach(function (c) { s += c.length }) - var out = new Buffer(s) - s = 0 - chunks.forEach(function (c) { - c.copy(out, s) - s += c.length - }) - - return out.toString().trim() -} - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} diff --git a/node_modules/karma/node_modules/glob/test/bash-comparison.js b/node_modules/karma/node_modules/glob/test/bash-comparison.js deleted file mode 100644 index 239ed1a9..00000000 --- a/node_modules/karma/node_modules/glob/test/bash-comparison.js +++ /dev/null @@ -1,63 +0,0 @@ -// basic test -// show that it does the same thing by default as the shell. -var tap = require("tap") -, child_process = require("child_process") -, bashResults = require("./bash-results.json") -, globs = Object.keys(bashResults) -, glob = require("../") -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -globs.forEach(function (pattern) { - var expect = bashResults[pattern] - // anything regarding the symlink thing will fail on windows, so just skip it - if (process.platform === "win32" && - expect.some(function (m) { - return /\/symlink\//.test(m) - })) - return - - tap.test(pattern, function (t) { - glob(pattern, function (er, matches) { - if (er) - throw er - - // sort and unmark, just to match the shell results - matches = cleanResults(matches) - - t.deepEqual(matches, expect, pattern) - t.end() - }) - }) - - tap.test(pattern + " sync", function (t) { - var matches = cleanResults(glob.sync(pattern)) - - t.deepEqual(matches, expect, "should match shell") - t.end() - }) -}) - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') - }) -} diff --git a/node_modules/karma/node_modules/glob/test/bash-results.json b/node_modules/karma/node_modules/glob/test/bash-results.json deleted file mode 100644 index c227449b..00000000 --- a/node_modules/karma/node_modules/glob/test/bash-results.json +++ /dev/null @@ -1,348 +0,0 @@ -{ - "test/a/*/+(c|g)/./d": [ - "test/a/b/c/./d" - ], - "test/a/**/[cg]/../[cg]": [ - "test/a/abcdef/g/../g", - "test/a/abcfed/g/../g", - "test/a/b/c/../c", - "test/a/c/../c", - "test/a/c/d/c/../c", - "test/a/symlink/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c" - ], - "test/a/{b,c,d,e,f}/**/g": [], - "test/a/b/**": [ - "test/a/b", - "test/a/b/c", - "test/a/b/c/d" - ], - "test/**/g": [ - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed,def}/g/h": [ - "test/a/abcdef/g/h", - "test/a/abcfed/g/h" - ], - "test/a/abc{fed/g,def}/**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/a/abc{fed/g,def}/**///**/": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed/g" - ], - "test/**/a/**/": [ - "test/a", - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/b", - "test/a/b/c", - "test/a/bc", - "test/a/bc/e", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/cb", - "test/a/cb/e", - "test/a/symlink", - "test/a/symlink/a", - "test/a/symlink/a/b", - "test/a/symlink/a/b/c", - "test/a/symlink/a/b/c/a", - "test/a/symlink/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b" - ], - "test/+(a|b|c)/a{/,bc*}/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h" - ], - "test/*/*/*/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/**/f": [ - "test/a/bc/e/f", - "test/a/cb/e/f" - ], - "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [ - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", - "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c" - ], - "{./*/*,/tmp/glob-test/*}": [ - "./examples/g.js", - "./examples/usr-local.js", - "./node_modules/graceful-fs", - "./node_modules/inherits", - "./node_modules/minimatch", - "./node_modules/mkdirp", - "./node_modules/rimraf", - "./node_modules/tap", - "./test/00-setup.js", - "./test/a", - "./test/bash-comparison.js", - "./test/bash-results.json", - "./test/cwd-test.js", - "./test/mark.js", - "./test/nocase-nomagic.js", - "./test/pause-resume.js", - "./test/root-nomount.js", - "./test/root.js", - "./test/zz-cleanup.js", - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq" - ], - "{/tmp/glob-test/*,*}": [ - "/tmp/glob-test/asdf", - "/tmp/glob-test/bar", - "/tmp/glob-test/baz", - "/tmp/glob-test/foo", - "/tmp/glob-test/quux", - "/tmp/glob-test/qwer", - "/tmp/glob-test/rewq", - "examples", - "glob.js", - "LICENSE", - "node_modules", - "package.json", - "README.md", - "test" - ], - "test/a/!(symlink)/**": [ - "test/a/abcdef", - "test/a/abcdef/g", - "test/a/abcdef/g/h", - "test/a/abcfed", - "test/a/abcfed/g", - "test/a/abcfed/g/h", - "test/a/b", - "test/a/b/c", - "test/a/b/c/d", - "test/a/bc", - "test/a/bc/e", - "test/a/bc/e/f", - "test/a/c", - "test/a/c/d", - "test/a/c/d/c", - "test/a/c/d/c/b", - "test/a/cb", - "test/a/cb/e", - "test/a/cb/e/f" - ] -} diff --git a/node_modules/karma/node_modules/glob/test/cwd-test.js b/node_modules/karma/node_modules/glob/test/cwd-test.js deleted file mode 100644 index 352c27ef..00000000 --- a/node_modules/karma/node_modules/glob/test/cwd-test.js +++ /dev/null @@ -1,55 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing cwd and searching for **/d", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('**/d', function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('a', function (t) { - glob('**/d', {cwd:path.resolve('a')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'b/c/d', 'c/d' ]) - t.end() - }) - }) - - t.test('a/b', function (t) { - glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('a/b/', function (t) { - glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'c/d' ]) - t.end() - }) - }) - - t.test('.', function (t) { - glob('**/d', {cwd: process.cwd()}, function (er, matches) { - t.ifError(er) - t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/node_modules/karma/node_modules/glob/test/mark.js b/node_modules/karma/node_modules/glob/test/mark.js deleted file mode 100644 index ed68a335..00000000 --- a/node_modules/karma/node_modules/glob/test/mark.js +++ /dev/null @@ -1,74 +0,0 @@ -var test = require("tap").test -var glob = require('../') -process.chdir(__dirname) - -test("mark, no / on pattern", function (t) { - glob("a/*", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - - if (process.platform !== "win32") - expect.push('a/symlink/') - - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, no / on pattern", function (t) { - glob("a/*", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef', - 'a/abcfed', - 'a/b', - 'a/bc', - 'a/c', - 'a/cb' ] - - if (process.platform !== "win32") - expect.push('a/symlink') - t.same(results, expect) - t.end() - }) -}) - -test("mark=true, / on pattern", function (t) { - glob("a/*/", {mark: true}, function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) - -test("mark=false, / on pattern", function (t) { - glob("a/*/", function (er, results) { - if (er) - throw er - var expect = [ 'a/abcdef/', - 'a/abcfed/', - 'a/b/', - 'a/bc/', - 'a/c/', - 'a/cb/' ] - if (process.platform !== "win32") - expect.push('a/symlink/') - t.same(results, expect) - t.end() - }) -}) diff --git a/node_modules/karma/node_modules/glob/test/nocase-nomagic.js b/node_modules/karma/node_modules/glob/test/nocase-nomagic.js deleted file mode 100644 index d8629709..00000000 --- a/node_modules/karma/node_modules/glob/test/nocase-nomagic.js +++ /dev/null @@ -1,113 +0,0 @@ -var fs = require('graceful-fs'); -var test = require('tap').test; -var glob = require('../'); - -test('mock fs', function(t) { - var stat = fs.stat - var statSync = fs.statSync - var readdir = fs.readdir - var readdirSync = fs.readdirSync - - function fakeStat(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = { isDirectory: function() { return true } } - break - case '/tmp/a': - ret = { isDirectory: function() { return false } } - break - } - return ret - } - - fs.stat = function(path, cb) { - var f = fakeStat(path); - if (f) { - process.nextTick(function() { - cb(null, f) - }) - } else { - stat.call(fs, path, cb) - } - } - - fs.statSync = function(path) { - return fakeStat(path) || statSync.call(fs, path) - } - - function fakeReaddir(path) { - var ret - switch (path.toLowerCase()) { - case '/tmp': case '/tmp/': - ret = [ 'a', 'A' ] - break - case '/': - ret = ['tmp', 'tMp', 'tMP', 'TMP'] - } - return ret - } - - fs.readdir = function(path, cb) { - var f = fakeReaddir(path) - if (f) - process.nextTick(function() { - cb(null, f) - }) - else - readdir.call(fs, path, cb) - } - - fs.readdirSync = function(path) { - return fakeReaddir(path) || readdirSync.call(fs, path) - } - - t.pass('mocked') - t.end() -}) - -test('nocase, nomagic', function(t) { - var n = 2 - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/a', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) - glob('/tmp/A', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - if (--n === 0) t.end() - }) -}) - -test('nocase, with some magic', function(t) { - t.plan(2) - var want = [ '/TMP/A', - '/TMP/a', - '/tMP/A', - '/tMP/a', - '/tMp/A', - '/tMp/a', - '/tmp/A', - '/tmp/a' ] - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) - glob('/tmp/*', { nocase: true }, function(er, res) { - if (er) - throw er - t.same(res.sort(), want) - }) -}) diff --git a/node_modules/karma/node_modules/glob/test/pause-resume.js b/node_modules/karma/node_modules/glob/test/pause-resume.js deleted file mode 100644 index e1ffbab1..00000000 --- a/node_modules/karma/node_modules/glob/test/pause-resume.js +++ /dev/null @@ -1,73 +0,0 @@ -// show that no match events happen while paused. -var tap = require("tap") -, child_process = require("child_process") -// just some gnarly pattern with lots of matches -, pattern = "test/a/!(symlink)/**" -, bashResults = require("./bash-results.json") -, patterns = Object.keys(bashResults) -, glob = require("../") -, Glob = glob.Glob -, path = require("path") - -// run from the root of the project -// this is usually where you're at anyway, but be sure. -process.chdir(path.resolve(__dirname, "..")) - -function alphasort (a, b) { - a = a.toLowerCase() - b = b.toLowerCase() - return a > b ? 1 : a < b ? -1 : 0 -} - -function cleanResults (m) { - // normalize discrepancies in ordering, duplication, - // and ending slashes. - return m.map(function (m) { - return m.replace(/\/+/g, "/").replace(/\/$/, "") - }).sort(alphasort).reduce(function (set, f) { - if (f !== set[set.length - 1]) set.push(f) - return set - }, []).sort(alphasort).map(function (f) { - // de-windows - return (process.platform !== 'win32') ? f - : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') - }) -} - -var globResults = [] -tap.test("use a Glob object, and pause/resume it", function (t) { - var g = new Glob(pattern) - , paused = false - , res = [] - , expect = bashResults[pattern] - - g.on("pause", function () { - console.error("pause") - }) - - g.on("resume", function () { - console.error("resume") - }) - - g.on("match", function (m) { - t.notOk(g.paused, "must not be paused") - globResults.push(m) - g.pause() - t.ok(g.paused, "must be paused") - setTimeout(g.resume.bind(g), 10) - }) - - g.on("end", function (matches) { - t.pass("reached glob end") - globResults = cleanResults(globResults) - matches = cleanResults(matches) - t.deepEqual(matches, globResults, - "end event matches should be the same as match events") - - t.deepEqual(matches, expect, - "glob matches should be the same as bash results") - - t.end() - }) -}) - diff --git a/node_modules/karma/node_modules/glob/test/root-nomount.js b/node_modules/karma/node_modules/glob/test/root-nomount.js deleted file mode 100644 index 3ac5979b..00000000 --- a/node_modules/karma/node_modules/glob/test/root-nomount.js +++ /dev/null @@ -1,39 +0,0 @@ -var tap = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -tap.test("changing root and searching for /b*/**", function (t) { - var glob = require('../') - var path = require('path') - t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) - }) - - t.test('a', function (t) { - glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) - t.end() - }) - }) - - t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() - }) - - t.end() -}) diff --git a/node_modules/karma/node_modules/glob/test/root.js b/node_modules/karma/node_modules/glob/test/root.js deleted file mode 100644 index 95c23f99..00000000 --- a/node_modules/karma/node_modules/glob/test/root.js +++ /dev/null @@ -1,46 +0,0 @@ -var t = require("tap") - -var origCwd = process.cwd() -process.chdir(__dirname) - -var glob = require('../') -var path = require('path') - -t.test('.', function (t) { - glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { - t.ifError(er) - t.like(matches, []) - t.end() - }) -}) - - -t.test('a', function (t) { - console.error("root=" + path.resolve('a')) - glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { - t.ifError(er) - var wanted = [ - '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' - ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - }) - - t.like(matches, wanted) - t.end() - }) -}) - -t.test('root=a, cwd=a/b', function (t) { - glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { - t.ifError(er) - t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { - return path.join(path.resolve('a'), m).replace(/\\/g, '/') - })) - t.end() - }) -}) - -t.test('cd -', function (t) { - process.chdir(origCwd) - t.end() -}) diff --git a/node_modules/karma/node_modules/glob/test/zz-cleanup.js b/node_modules/karma/node_modules/glob/test/zz-cleanup.js deleted file mode 100644 index e085f0fa..00000000 --- a/node_modules/karma/node_modules/glob/test/zz-cleanup.js +++ /dev/null @@ -1,11 +0,0 @@ -// remove the fixtures -var tap = require("tap") -, rimraf = require("rimraf") -, path = require("path") - -tap.test("cleanup fixtures", function (t) { - rimraf(path.resolve(__dirname, "a"), function (er) { - t.ifError(er, "removed") - t.end() - }) -}) diff --git a/node_modules/karma/node_modules/graceful-fs/.npmignore b/node_modules/karma/node_modules/graceful-fs/.npmignore deleted file mode 100644 index c2658d7d..00000000 --- a/node_modules/karma/node_modules/graceful-fs/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules/ diff --git a/node_modules/karma/node_modules/graceful-fs/LICENSE b/node_modules/karma/node_modules/graceful-fs/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/karma/node_modules/graceful-fs/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma/node_modules/graceful-fs/README.md b/node_modules/karma/node_modules/graceful-fs/README.md deleted file mode 100644 index 01af3d6b..00000000 --- a/node_modules/karma/node_modules/graceful-fs/README.md +++ /dev/null @@ -1,33 +0,0 @@ -# graceful-fs - -graceful-fs functions as a drop-in replacement for the fs module, -making various improvements. - -The improvements are meant to normalize behavior across different -platforms and environments, and to make filesystem access more -resilient to errors. - -## Improvements over fs module - -graceful-fs: - -* keeps track of how many file descriptors are open, and by default - limits this to 1024. Any further requests to open a file are put in a - queue until new slots become available. If 1024 turns out to be too - much, it decreases the limit further. -* fixes `lchmod` for Node versions prior to 0.6.2. -* implements `fs.lutimes` if possible. Otherwise it becomes a noop. -* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or - `lchown` if the user isn't root. -* makes `lchmod` and `lchown` become noops, if not available. -* retries reading a file if `read` results in EAGAIN error. - -On Windows, it retries renaming a file for up to one second if `EACCESS` -or `EPERM` error occurs, likely because antivirus software has locked -the directory. - -## Configuration - -The maximum number of open file descriptors that graceful-fs manages may -be adjusted by setting `fs.MAX_OPEN` to a different number. The default -is 1024. diff --git a/node_modules/karma/node_modules/graceful-fs/graceful-fs.js b/node_modules/karma/node_modules/graceful-fs/graceful-fs.js deleted file mode 100644 index ca911524..00000000 --- a/node_modules/karma/node_modules/graceful-fs/graceful-fs.js +++ /dev/null @@ -1,442 +0,0 @@ -// this keeps a queue of opened file descriptors, and will make -// fs operations wait until some have closed before trying to open more. - -var fs = exports = module.exports = {} -fs._originalFs = require("fs") - -Object.getOwnPropertyNames(fs._originalFs).forEach(function(prop) { - var desc = Object.getOwnPropertyDescriptor(fs._originalFs, prop) - Object.defineProperty(fs, prop, desc) -}) - -var queue = [] - , constants = require("constants") - -fs._curOpen = 0 - -fs.MIN_MAX_OPEN = 64 -fs.MAX_OPEN = 1024 - -// prevent EMFILE errors -function OpenReq (path, flags, mode, cb) { - this.path = path - this.flags = flags - this.mode = mode - this.cb = cb -} - -function noop () {} - -fs.open = gracefulOpen - -function gracefulOpen (path, flags, mode, cb) { - if (typeof mode === "function") cb = mode, mode = null - if (typeof cb !== "function") cb = noop - - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new OpenReq(path, flags, mode, cb)) - setTimeout(flush) - return - } - open(path, flags, mode, function (er, fd) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - // that was too many. reduce max, get back in queue. - // this should only happen once in a great while, and only - // if the ulimit -n is set lower than 1024. - fs.MAX_OPEN = fs._curOpen - 1 - return fs.open(path, flags, mode, cb) - } - cb(er, fd) - }) -} - -function open (path, flags, mode, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.open.call(fs, path, flags, mode, function (er, fd) { - if (er) onclose() - cb(er, fd) - }) -} - -fs.openSync = function (path, flags, mode) { - var ret - ret = fs._originalFs.openSync.call(fs, path, flags, mode) - fs._curOpen ++ - return ret -} - -function onclose () { - fs._curOpen -- - flush() -} - -function flush () { - while (fs._curOpen < fs.MAX_OPEN) { - var req = queue.shift() - if (!req) return - switch (req.constructor.name) { - case 'OpenReq': - open(req.path, req.flags || "r", req.mode || 0777, req.cb) - break - case 'ReaddirReq': - readdir(req.path, req.cb) - break - case 'ReadFileReq': - readFile(req.path, req.options, req.cb) - break - case 'WriteFileReq': - writeFile(req.path, req.data, req.options, req.cb) - break - default: - throw new Error('Unknown req type: ' + req.constructor.name) - } - } -} - -fs.close = function (fd, cb) { - cb = cb || noop - fs._originalFs.close.call(fs, fd, function (er) { - onclose() - cb(er) - }) -} - -fs.closeSync = function (fd) { - try { - return fs._originalFs.closeSync.call(fs, fd) - } finally { - onclose() - } -} - - -// readdir takes a fd as well. -// however, the sync version closes it right away, so -// there's no need to wrap. -// It would be nice to catch when it throws an EMFILE, -// but that's relatively rare anyway. - -fs.readdir = gracefulReaddir - -function gracefulReaddir (path, cb) { - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new ReaddirReq(path, cb)) - setTimeout(flush) - return - } - - readdir(path, function (er, files) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - fs.MAX_OPEN = fs._curOpen - 1 - return fs.readdir(path, cb) - } - cb(er, files) - }) -} - -function readdir (path, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.readdir.call(fs, path, function (er, files) { - onclose() - cb(er, files) - }) -} - -function ReaddirReq (path, cb) { - this.path = path - this.cb = cb -} - - -fs.readFile = gracefulReadFile - -function gracefulReadFile(path, options, cb) { - if (typeof options === "function") cb = options, options = null - if (typeof cb !== "function") cb = noop - - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new ReadFileReq(path, options, cb)) - setTimeout(flush) - return - } - - readFile(path, options, function (er, data) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - fs.MAX_OPEN = fs._curOpen - 1 - return fs.readFile(path, options, cb) - } - cb(er, data) - }) -} - -function readFile (path, options, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.readFile.call(fs, path, options, function (er, data) { - onclose() - cb(er, data) - }) -} - -function ReadFileReq (path, options, cb) { - this.path = path - this.options = options - this.cb = cb -} - - - - -fs.writeFile = gracefulWriteFile - -function gracefulWriteFile(path, data, options, cb) { - if (typeof options === "function") cb = options, options = null - if (typeof cb !== "function") cb = noop - - if (fs._curOpen >= fs.MAX_OPEN) { - queue.push(new WriteFileReq(path, data, options, cb)) - setTimeout(flush) - return - } - - writeFile(path, data, options, function (er) { - if (er && er.code === "EMFILE" && fs._curOpen > fs.MIN_MAX_OPEN) { - fs.MAX_OPEN = fs._curOpen - 1 - return fs.writeFile(path, data, options, cb) - } - cb(er) - }) -} - -function writeFile (path, data, options, cb) { - cb = cb || noop - fs._curOpen ++ - fs._originalFs.writeFile.call(fs, path, data, options, function (er) { - onclose() - cb(er) - }) -} - -function WriteFileReq (path, data, options, cb) { - this.path = path - this.data = data - this.options = options - this.cb = cb -} - - -// (re-)implement some things that are known busted or missing. - -var constants = require("constants") - -// lchmod, broken prior to 0.6.2 -// back-port the fix here. -if (constants.hasOwnProperty('O_SYMLINK') && - process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) { - fs.lchmod = function (path, mode, callback) { - callback = callback || noop - fs.open( path - , constants.O_WRONLY | constants.O_SYMLINK - , mode - , function (err, fd) { - if (err) { - callback(err) - return - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function (err) { - fs.close(fd, function(err2) { - callback(err || err2) - }) - }) - }) - } - - fs.lchmodSync = function (path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode) - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2 - try { - var ret = fs.fchmodSync(fd, mode) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } -} - - -// lutimes implementation, or no-op -if (!fs.lutimes) { - if (constants.hasOwnProperty("O_SYMLINK")) { - fs.lutimes = function (path, at, mt, cb) { - fs.open(path, constants.O_SYMLINK, function (er, fd) { - cb = cb || noop - if (er) return cb(er) - fs.futimes(fd, at, mt, function (er) { - fs.close(fd, function (er2) { - return cb(er || er2) - }) - }) - }) - } - - fs.lutimesSync = function (path, at, mt) { - var fd = fs.openSync(path, constants.O_SYMLINK) - , err - , err2 - , ret - - try { - var ret = fs.futimesSync(fd, at, mt) - } catch (er) { - err = er - } - try { - fs.closeSync(fd) - } catch (er) { - err2 = er - } - if (err || err2) throw (err || err2) - return ret - } - - } else if (fs.utimensat && constants.hasOwnProperty("AT_SYMLINK_NOFOLLOW")) { - // maybe utimensat will be bound soonish? - fs.lutimes = function (path, at, mt, cb) { - fs.utimensat(path, at, mt, constants.AT_SYMLINK_NOFOLLOW, cb) - } - - fs.lutimesSync = function (path, at, mt) { - return fs.utimensatSync(path, at, mt, constants.AT_SYMLINK_NOFOLLOW) - } - - } else { - fs.lutimes = function (_a, _b, _c, cb) { process.nextTick(cb) } - fs.lutimesSync = function () {} - } -} - - -// https://github.com/isaacs/node-graceful-fs/issues/4 -// Chown should not fail on einval or eperm if non-root. - -fs.chown = chownFix(fs.chown) -fs.fchown = chownFix(fs.fchown) -fs.lchown = chownFix(fs.lchown) - -fs.chownSync = chownFixSync(fs.chownSync) -fs.fchownSync = chownFixSync(fs.fchownSync) -fs.lchownSync = chownFixSync(fs.lchownSync) - -function chownFix (orig) { - if (!orig) return orig - return function (target, uid, gid, cb) { - return orig.call(fs, target, uid, gid, function (er, res) { - if (chownErOk(er)) er = null - cb(er, res) - }) - } -} - -function chownFixSync (orig) { - if (!orig) return orig - return function (target, uid, gid) { - try { - return orig.call(fs, target, uid, gid) - } catch (er) { - if (!chownErOk(er)) throw er - } - } -} - -function chownErOk (er) { - // if there's no getuid, or if getuid() is something other than 0, - // and the error is EINVAL or EPERM, then just ignore it. - // This specific case is a silent failure in cp, install, tar, - // and most other unix tools that manage permissions. - // When running as root, or if other types of errors are encountered, - // then it's strict. - if (!er || (!process.getuid || process.getuid() !== 0) - && (er.code === "EINVAL" || er.code === "EPERM")) return true -} - - -// if lchmod/lchown do not exist, then make them no-ops -if (!fs.lchmod) { - fs.lchmod = function (path, mode, cb) { - process.nextTick(cb) - } - fs.lchmodSync = function () {} -} -if (!fs.lchown) { - fs.lchown = function (path, uid, gid, cb) { - process.nextTick(cb) - } - fs.lchownSync = function () {} -} - - - -// on Windows, A/V software can lock the directory, causing this -// to fail with an EACCES or EPERM if the directory contains newly -// created files. Try again on failure, for up to 1 second. -if (process.platform === "win32") { - var rename_ = fs.rename - fs.rename = function rename (from, to, cb) { - var start = Date.now() - rename_(from, to, function CB (er) { - if (er - && (er.code === "EACCES" || er.code === "EPERM") - && Date.now() - start < 1000) { - return rename_(from, to, CB) - } - cb(er) - }) - } -} - - -// if read() returns EAGAIN, then just try it again. -var read = fs.read -fs.read = function (fd, buffer, offset, length, position, callback_) { - var callback - if (callback_ && typeof callback_ === 'function') { - var eagCounter = 0 - callback = function (er, _, __) { - if (er && er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - return read.call(fs, fd, buffer, offset, length, position, callback) - } - callback_.apply(this, arguments) - } - } - return read.call(fs, fd, buffer, offset, length, position, callback) -} - -var readSync = fs.readSync -fs.readSync = function (fd, buffer, offset, length, position) { - var eagCounter = 0 - while (true) { - try { - return readSync.call(fs, fd, buffer, offset, length, position) - } catch (er) { - if (er.code === 'EAGAIN' && eagCounter < 10) { - eagCounter ++ - continue - } - throw er - } - } -} diff --git a/node_modules/karma/node_modules/graceful-fs/package.json b/node_modules/karma/node_modules/graceful-fs/package.json deleted file mode 100644 index 77dc7699..00000000 --- a/node_modules/karma/node_modules/graceful-fs/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "graceful-fs", - "description": "A drop-in replacement for fs, making various improvements.", - "version": "1.2.3", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-graceful-fs.git" - }, - "main": "graceful-fs.js", - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "test": "test" - }, - "scripts": { - "test": "tap test/*.js" - }, - "keywords": [ - "fs", - "module", - "reading", - "retry", - "retries", - "queue", - "error", - "errors", - "handling", - "EMFILE", - "EAGAIN", - "EINVAL", - "EPERM", - "EACCESS" - ], - "license": "BSD", - "readme": "# graceful-fs\n\ngraceful-fs functions as a drop-in replacement for the fs module,\nmaking various improvements.\n\nThe improvements are meant to normalize behavior across different\nplatforms and environments, and to make filesystem access more\nresilient to errors.\n\n## Improvements over fs module\n\ngraceful-fs:\n\n* keeps track of how many file descriptors are open, and by default\n limits this to 1024. Any further requests to open a file are put in a\n queue until new slots become available. If 1024 turns out to be too\n much, it decreases the limit further.\n* fixes `lchmod` for Node versions prior to 0.6.2.\n* implements `fs.lutimes` if possible. Otherwise it becomes a noop.\n* ignores `EINVAL` and `EPERM` errors in `chown`, `fchown` or\n `lchown` if the user isn't root.\n* makes `lchmod` and `lchown` become noops, if not available.\n* retries reading a file if `read` results in EAGAIN error.\n\nOn Windows, it retries renaming a file for up to one second if `EACCESS`\nor `EPERM` error occurs, likely because antivirus software has locked\nthe directory.\n\n## Configuration\n\nThe maximum number of open file descriptors that graceful-fs manages may\nbe adjusted by setting `fs.MAX_OPEN` to a different number. The default\nis 1024.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-graceful-fs/issues" - }, - "homepage": "https://github.com/isaacs/node-graceful-fs", - "_id": "graceful-fs@1.2.3", - "_from": "graceful-fs@~1.2.1" -} diff --git a/node_modules/karma/node_modules/graceful-fs/test/open.js b/node_modules/karma/node_modules/graceful-fs/test/open.js deleted file mode 100644 index 930d5325..00000000 --- a/node_modules/karma/node_modules/graceful-fs/test/open.js +++ /dev/null @@ -1,46 +0,0 @@ -var test = require('tap').test -var fs = require('../graceful-fs.js') - -test('graceful fs is not fs', function (t) { - t.notEqual(fs, require('fs')) - t.end() -}) - -test('open an existing file works', function (t) { - var start = fs._curOpen - var fd = fs.openSync(__filename, 'r') - t.equal(fs._curOpen, start + 1) - fs.closeSync(fd) - t.equal(fs._curOpen, start) - fs.open(__filename, 'r', function (er, fd) { - if (er) throw er - t.equal(fs._curOpen, start + 1) - fs.close(fd, function (er) { - if (er) throw er - t.equal(fs._curOpen, start) - t.end() - }) - }) -}) - -test('open a non-existing file throws', function (t) { - var start = fs._curOpen - var er - try { - var fd = fs.openSync('this file does not exist', 'r') - } catch (x) { - er = x - } - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.equal(fs._curOpen, start) - - fs.open('neither does this file', 'r', function (er, fd) { - t.ok(er, 'should throw') - t.notOk(fd, 'should not get an fd') - t.equal(er.code, 'ENOENT') - t.equal(fs._curOpen, start) - t.end() - }) -}) diff --git a/node_modules/karma/node_modules/graceful-fs/test/ulimit.js b/node_modules/karma/node_modules/graceful-fs/test/ulimit.js deleted file mode 100644 index 8d0882d0..00000000 --- a/node_modules/karma/node_modules/graceful-fs/test/ulimit.js +++ /dev/null @@ -1,158 +0,0 @@ -var test = require('tap').test - -// simulated ulimit -// this is like graceful-fs, but in reverse -var fs_ = require('fs') -var fs = require('../graceful-fs.js') -var files = fs.readdirSync(__dirname) - -// Ok, no more actual file reading! - -var fds = 0 -var nextFd = 60 -var limit = 8 -fs_.open = function (path, flags, mode, cb) { - process.nextTick(function() { - ++fds - if (fds >= limit) { - --fds - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - return cb(er) - } else { - cb(null, nextFd++) - } - }) -} - -fs_.openSync = function (path, flags, mode) { - if (fds >= limit) { - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - throw er - } else { - ++fds - return nextFd++ - } -} - -fs_.close = function (fd, cb) { - process.nextTick(function () { - --fds - cb() - }) -} - -fs_.closeSync = function (fd) { - --fds -} - -fs_.readdir = function (path, cb) { - process.nextTick(function() { - if (fds >= limit) { - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - return cb(er) - } else { - ++fds - process.nextTick(function () { - --fds - cb(null, [__filename, "some-other-file.js"]) - }) - } - }) -} - -fs_.readdirSync = function (path) { - if (fds >= limit) { - var er = new Error('EMFILE Curses!') - er.code = 'EMFILE' - er.path = path - throw er - } else { - return [__filename, "some-other-file.js"] - } -} - - -test('open emfile autoreduce', function (t) { - fs.MIN_MAX_OPEN = 4 - t.equal(fs.MAX_OPEN, 1024) - - var max = 12 - for (var i = 0; i < max; i++) { - fs.open(__filename, 'r', next(i)) - } - - var phase = 0 - - var expect = - [ [ 0, 60, null, 1024, 4, 12, 1 ], - [ 1, 61, null, 1024, 4, 12, 2 ], - [ 2, 62, null, 1024, 4, 12, 3 ], - [ 3, 63, null, 1024, 4, 12, 4 ], - [ 4, 64, null, 1024, 4, 12, 5 ], - [ 5, 65, null, 1024, 4, 12, 6 ], - [ 6, 66, null, 1024, 4, 12, 7 ], - [ 7, 67, null, 6, 4, 5, 1 ], - [ 8, 68, null, 6, 4, 5, 2 ], - [ 9, 69, null, 6, 4, 5, 3 ], - [ 10, 70, null, 6, 4, 5, 4 ], - [ 11, 71, null, 6, 4, 5, 5 ] ] - - var actual = [] - - function next (i) { return function (er, fd) { - if (er) - throw er - actual.push([i, fd, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds]) - - if (i === max - 1) { - t.same(actual, expect) - t.ok(fs.MAX_OPEN < limit) - t.end() - } - - fs.close(fd) - } } -}) - -test('readdir emfile autoreduce', function (t) { - fs.MAX_OPEN = 1024 - var max = 12 - for (var i = 0; i < max; i ++) { - fs.readdir(__dirname, next(i)) - } - - var expect = - [ [0,[__filename,"some-other-file.js"],null,7,4,7,7], - [1,[__filename,"some-other-file.js"],null,7,4,7,6], - [2,[__filename,"some-other-file.js"],null,7,4,7,5], - [3,[__filename,"some-other-file.js"],null,7,4,7,4], - [4,[__filename,"some-other-file.js"],null,7,4,7,3], - [5,[__filename,"some-other-file.js"],null,7,4,6,2], - [6,[__filename,"some-other-file.js"],null,7,4,5,1], - [7,[__filename,"some-other-file.js"],null,7,4,4,0], - [8,[__filename,"some-other-file.js"],null,7,4,3,3], - [9,[__filename,"some-other-file.js"],null,7,4,2,2], - [10,[__filename,"some-other-file.js"],null,7,4,1,1], - [11,[__filename,"some-other-file.js"],null,7,4,0,0] ] - - var actual = [] - - function next (i) { return function (er, files) { - if (er) - throw er - var line = [i, files, er, fs.MAX_OPEN, fs.MIN_MAX_OPEN, fs._curOpen, fds ] - actual.push(line) - - if (i === max - 1) { - t.ok(fs.MAX_OPEN < limit) - t.same(actual, expect) - t.end() - } - } } -}) diff --git a/node_modules/karma/node_modules/http-proxy/.npmignore b/node_modules/karma/node_modules/http-proxy/.npmignore deleted file mode 100644 index 468b525c..00000000 --- a/node_modules/karma/node_modules/http-proxy/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -config.json -node_modules/ -npm-debug.log diff --git a/node_modules/karma/node_modules/http-proxy/.travis.yml b/node_modules/karma/node_modules/http-proxy/.travis.yml deleted file mode 100644 index fb8c9bb9..00000000 --- a/node_modules/karma/node_modules/http-proxy/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - -notifications: - email: - - travis@nodejitsu.com - irc: "irc.freenode.org#nodejitsu" diff --git a/node_modules/karma/node_modules/http-proxy/CHANGELOG.md b/node_modules/karma/node_modules/http-proxy/CHANGELOG.md deleted file mode 100644 index 2205ee87..00000000 --- a/node_modules/karma/node_modules/http-proxy/CHANGELOG.md +++ /dev/null @@ -1,97 +0,0 @@ -## ChangeLog for: node-http-proxy - -## Version 0.10.0 - 3/18/2013 - -- Breaking change: `proxyResponse` events are emitted on the `HttpProxy` or `RoutingProxy` instances as originally was intended in `0.9.x`. - -## Version 0.9.1 - 3/9/2013 - -- Ensure that `webSocketProxyError` and `proxyError` both receive the error (indexzero). - -## Version 0.9.0 - 3/9/2013 -- Fix #276 Ensure response.headers.location is defined (indexzero) -- Fix #248 Make options immutable in RoutingProxy (indexzero) -- Fix #359 Do not modify the protocol in redirect request for external sites. (indexzero) -- Fix #373 Do not use "Transfer-Encoding: chunked" header for proxied DELETE requests with no "Content-Length" header. (indexzero) -- Fix #338 Set "content-length" header to "0" if it is not already set on DELETE requests. (indexzero) -- Updates to README.md and Examples (ramitos, jamie-stackhouse, oost, indexzero) -- Fixes to ProxyTable and Routing Proxy (adjohnson916, otavoijr) -- New API for ProxyTable (mikkel, tglines) -- Add `options.timeout` for specifying socket timeouts (pdoran) -- Improve bin/node-http-proxy (niallo) -- Don't emit `proxyError` twice (erasmospunk) -- Fix memory leaks in WebSocket proxying -- Support UNIX Sockets (yosefd) -- Fix truncated chunked respones (jpetazzo) -- Allow upstream listeners to get `proxyResponse` (colinmollenhour) - -## Version 0.8.1 - 6/5/2012 -- Fix re-emitting of events in RoutingProxy (coderarity) -- New load balancer and middleware examples (marak) -- Docs updated including changelog (lot of gently people) - -## Version 0.8.0 - 12/23/2011 -- Improve support and tests for url segment routing (maxogden) -- Fix aborting connections when request close (c4milo) -- Avoid 'Transfer-Encoding' on HTTP/1.0 clients (koichik). -- Support for Node.js 0.6.x (mmalecki) - -## Version 0.7.3 - 10/4/2011 -- Fix setting x-forwarded headers (jesusabdullah) -- Updated examples (AvianFlu) - -## Version 0.7.0 - 9/10/2011 -- Handles to every throw-able resume() call (isaacs) -- Updated tests, README and package.json (indexzero) -- Added HttpProxy.close() method (indexzero) - -## Version 0.6.6 - 8/31/2011 -- Add more examples (dominictarr) -- Use of 'pkginfo' (indexzero) -- Handle cases where res.write throws (isaacs) -- Handles to every throw-able res.end call (isaacs) - -## Version 0.5.11 - 6/21/2011 -- Add more examples with WebSockets (indexzero) -- Update the documentation (indexzero) - -## Version 0.5.7 - 5/19/2011 -- Fix to README related to markup and fix some examples (benatkin) -- Improve WebSockets handling (indexzero) -- Improve WebSockets tests (indexzero) -- Improve https tests (olauzon) -- Add devDependencies to package.json (olauzon) -- Add 'proxyError' event (indexzero) -- Add 'x-forwarded-{port|proto}' headers support (indexzero) -- Keep-Alive connection supported (indexzero) - -## Version 0.5.0 - 4/15/2011 -- Remove winston in favor of custom events (indexzero) -- Add x-forwarded-for Header (indexzero) -- Fix WebSocket support (indexzero) -- Add tests / examples for WebSocket support (indexzero) -- Update .proxyRequest() and .proxyWebSocketRequest() APIs (indexzero) -- Add HTTPS support (indexzero) -- Add tests / examples for HTTPS support (indexzero) - -## Version 0.4.1 - 3/20/2011 -- Include missing dependency in package.json (indexzero) - -## Version 0.4.0 - 3/20/2011 -- Update for node.js 0.4.0 (indexzero) -- Remove pool dependency in favor of http.Agent (indexzero) -- Store buffered data using `.buffer()` instead of on the HttpProxy instance (indexzero) -- Change the ProxyTable to be a lookup table instead of actively proxying (indexzero) -- Allow for pure host-only matching in ProxyTable (indexzero) -- Use winston for logging (indexzero) -- Improve tests with async setup and more coverage (indexzero) -- Improve code documentation (indexzero) - -### Version 0.3.1 - 11/22/2010 -- Added node-http-proxy binary script (indexzero) -- Added experimental WebSocket support (indutny) -- Added forward proxy functionality (indexzero) -- Added proxy table for multiple target lookup (indexzero) -- Simplified tests using helpers.js (indexzero) -- Fixed uncaughtException bug with invalid proxy target (indutny) -- Added configurable logging for HttpProxy and ProxyTable (indexzero) \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/LICENSE b/node_modules/karma/node_modules/http-proxy/LICENSE deleted file mode 100644 index db9b0b1e..00000000 --- a/node_modules/karma/node_modules/http-proxy/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ - - node-http-proxy - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/README.md b/node_modules/karma/node_modules/http-proxy/README.md deleted file mode 100644 index a7a8328c..00000000 --- a/node_modules/karma/node_modules/http-proxy/README.md +++ /dev/null @@ -1,629 +0,0 @@ -# node-http-proxy [![Build Status](https://secure.travis-ci.org/nodejitsu/node-http-proxy.png)](http://travis-ci.org/nodejitsu/node-http-proxy) - - - -## Battle-hardened node.js http proxy - -### Features - -* Reverse proxies incoming http.ServerRequest streams -* Can be used as a CommonJS module in node.js -* Uses event buffering to support application latency in proxied requests -* Reverse or Forward Proxy based on simple JSON-based configuration -* Supports [WebSockets][1] -* Supports [HTTPS][2] -* Minimal request overhead and latency -* Full suite of functional tests -* Battled-hardened through __production usage__ @ [nodejitsu.com][0] -* Written entirely in Javascript -* Easy to use API - -### When to use node-http-proxy - -Let's suppose you were running multiple http application servers, but you only wanted to expose one machine to the internet. You could setup node-http-proxy on that one machine and then reverse-proxy the incoming http requests to locally running services which were not exposed to the outside network. - -### Installing npm (node package manager) - -``` -curl https://npmjs.org/install.sh | sh -``` - -### Installing node-http-proxy - -``` -npm install http-proxy -``` - -## Using node-http-proxy - -There are several ways to use node-http-proxy; the library is designed to be flexible so that it can be used by itself, or in conjunction with other node.js libraries / tools: - -1. Standalone HTTP Proxy server -2. Inside of another HTTP server (like Connect) -3. In conjunction with a Proxy Routing Table -4. As a forward-proxy with a reverse proxy -5. From the command-line as a long running process -6. customized with 3rd party middleware. - -In each of these scenarios node-http-proxy can handle any of these types of requests: - -1. HTTP Requests (http://) -2. HTTPS Requests (https://) -3. WebSocket Requests (ws://) -4. Secure WebSocket Requests (wss://) - -See the [examples][3] for more working sample code. - -### Setup a basic stand-alone proxy server - -``` js -var http = require('http'), - httpProxy = require('http-proxy'); -// -// Create your proxy server -// -httpProxy.createServer(9000, 'localhost').listen(8000); - -// -// Create your target server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied!' + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); -``` - -### Setup a stand-alone proxy server with custom server logic - -``` js -var http = require('http'), - httpProxy = require('http-proxy'); - -// -// Create a proxy server with custom application logic -// -httpProxy.createServer(function (req, res, proxy) { - // - // Put your custom server logic here - // - proxy.proxyRequest(req, res, { - host: 'localhost', - port: 9000 - }); -}).listen(8000); - -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied: ' + req.url +'\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); -``` - -### Setup a stand-alone proxy server with latency (e.g. IO, etc) - -``` js -var http = require('http'), - httpProxy = require('http-proxy'); - -// -// Create a proxy server with custom application logic -// -httpProxy.createServer(function (req, res, proxy) { - // - // Buffer the request so that `data` and `end` events - // are not lost during async operation(s). - // - var buffer = httpProxy.buffer(req); - - // - // Wait for two seconds then respond: this simulates - // performing async actions before proxying a request - // - setTimeout(function () { - proxy.proxyRequest(req, res, { - host: 'localhost', - port: 9000, - buffer: buffer - }); - }, 2000); -}).listen(8000); - -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied: ' + req.url +'\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); -``` - -### Proxy requests within another http server - -``` js -var http = require('http'), - httpProxy = require('http-proxy'); - -// -// Create a new instance of HttProxy to use in your server -// -var proxy = new httpProxy.RoutingProxy(); - -// -// Create a regular http server and proxy its handler -// -http.createServer(function (req, res) { - // - // Put your custom server logic here, then proxy - // - proxy.proxyRequest(req, res, { - host: 'localhost', - port: 9000 - }); -}).listen(8001); - -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied: ' + req.url +'\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); -``` - -### Proxy requests using a ProxyTable -A Proxy Table is a simple lookup table that maps incoming requests to proxy target locations. Take a look at an example of the options you need to pass to httpProxy.createServer: - -``` js -var options = { - router: { - 'foo.com/baz': '127.0.0.1:8001', - 'foo.com/buz': '127.0.0.1:8002', - 'bar.com/buz': '127.0.0.1:8003' - } -}; -``` - -The above route table will take incoming requests to 'foo.com/baz' and forward them to '127.0.0.1:8001'. Likewise it will take incoming requests to 'foo.com/buz' and forward them to '127.0.0.1:8002'. The routes themselves are later converted to regular expressions to enable more complex matching functionality. We can create a proxy server with these options by using the following code: - -``` js -var proxyServer = httpProxy.createServer(options); -proxyServer.listen(80); -``` - -### Proxy requests using a 'Hostname Only' ProxyTable -As mentioned in the previous section, all routes passes to the ProxyTable are by default converted to regular expressions that are evaluated at proxy-time. This is good for complex URL rewriting of proxy requests, but less efficient when one simply wants to do pure hostname routing based on the HTTP 'Host' header. If you are only concerned with hostname routing, you change the lookup used by the internal ProxyTable: - -``` js -var options = { - hostnameOnly: true, - router: { - 'foo.com': '127.0.0.1:8001', - 'bar.com': '127.0.0.1:8002' - } -} -``` - -Notice here that I have not included paths on the individual domains because this is not possible when using only the HTTP 'Host' header. Care to learn more? See [RFC2616: HTTP/1.1, Section 14.23, "Host"][4]. - -### Proxy requests using a 'Pathname Only' ProxyTable - -If you dont care about forwarding to different hosts, you can redirect based on the request path. - -``` js -var options = { - pathnameOnly: true, - router: { - '/wiki': '127.0.0.1:8001', - '/blog': '127.0.0.1:8002', - '/api': '127.0.0.1:8003' - } -} -``` - -This comes in handy if you are running separate services or applications on separate paths. Note, using this option disables routing by hostname entirely. - - -### Proxy requests with an additional forward proxy -Sometimes in addition to a reverse proxy, you may want your front-facing server to forward traffic to another location. For example, if you wanted to load test your staging environment. This is possible when using node-http-proxy using similar JSON-based configuration to a proxy table: - -``` js -var proxyServerWithForwarding = httpProxy.createServer(9000, 'localhost', { - forward: { - port: 9000, - host: 'staging.com' - } -}); -proxyServerWithForwarding.listen(80); -``` - -The forwarding option can be used in conjunction with the proxy table options by simply including both the 'forward' and 'router' properties in the options passed to 'createServer'. - -### Listening for proxy events -Sometimes you want to listen to an event on a proxy. For example, you may want to listen to the 'end' event, which represents when the proxy has finished proxying a request. - -``` js -var httpProxy = require('http-proxy'); - -var server = httpProxy.createServer(function (req, res, proxy) { - var buffer = httpProxy.buffer(req); - - proxy.proxyRequest(req, res, { - host: '127.0.0.1', - port: 9000, - buffer: buffer - }); -}); - -server.proxy.on('end', function () { - console.log("The request was proxied."); -}); - -server.listen(8000); -``` - -It's important to remember not to listen for events on the proxy object in the function passed to `httpProxy.createServer`. Doing so would add a new listener on every request, which would end up being a disaster. - -## Using HTTPS -You have all the full flexibility of node-http-proxy offers in HTTPS as well as HTTP. The two basic scenarios are: with a stand-alone proxy server or in conjunction with another HTTPS server. - -### Proxying to HTTP from HTTPS -This is probably the most common use-case for proxying in conjunction with HTTPS. You have some front-facing HTTPS server, but all of your internal traffic is HTTP. In this way, you can reduce the number of servers to which your CA and other important security files are deployed and reduce the computational overhead from HTTPS traffic. - -Using HTTPS in `node-http-proxy` is relatively straight-forward: - -``` js -var fs = require('fs'), - http = require('http'), - https = require('https'), - httpProxy = require('http-proxy'); - -var options = { - https: { - key: fs.readFileSync('path/to/your/key.pem', 'utf8'), - cert: fs.readFileSync('path/to/your/cert.pem', 'utf8') - } -}; - -// -// Create a standalone HTTPS proxy server -// -httpProxy.createServer(8000, 'localhost', options).listen(8001); - -// -// Create an instance of HttpProxy to use with another HTTPS server -// -var proxy = new httpProxy.HttpProxy({ - target: { - host: 'localhost', - port: 8000 - } -}); -https.createServer(options.https, function (req, res) { - proxy.proxyRequest(req, res) -}).listen(8002); - -// -// Create the target HTTPS server for both cases -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('hello https\n'); - res.end(); -}).listen(8000); -``` - -### Using two certificates - -Suppose that your reverse proxy will handle HTTPS traffic for two different domains `fobar.com` and `barbaz.com`. -If you need to use two different certificates you can take advantage of [Server Name Indication](http://en.wikipedia.org/wiki/Server_Name_Indication). - -``` js -var https = require('https'), - path = require("path"), - fs = require("fs"), - crypto = require("crypto"); - -// -// generic function to load the credentials context from disk -// -function getCredentialsContext (cer) { - return crypto.createCredentials({ - key: fs.readFileSync(path.join(__dirname, 'certs', cer + '.key')), - cert: fs.readFileSync(path.join(__dirname, 'certs', cer + '.crt')) - }).context; -} - -// -// A certificate per domain hash -// -var certs = { - "fobar.com": getCredentialsContext("foobar"), - "barbaz.com": getCredentialsContext("barbaz") -}; - -// -// Proxy options -// -var options = { - https: { - SNICallback: function (hostname) { - return certs[hostname]; - }, - cert: myCert, - key: myKey, - ca: [myCa] - }, - hostnameOnly: true, - router: { - 'fobar.com': '127.0.0.1:8001', - 'barbaz.com': '127.0.0.1:8002' - } -}; - -// -// Create a standalone HTTPS proxy server -// -httpProxy.createServer(options).listen(8001); - -// -// Create the target HTTPS server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('hello https\n'); - res.end(); -}).listen(8000); - -``` - -### Proxying to HTTPS from HTTPS -Proxying from HTTPS to HTTPS is essentially the same as proxying from HTTPS to HTTP, but you must include the `target` option in when calling `httpProxy.createServer` or instantiating a new instance of `HttpProxy`. - -``` js -var fs = require('fs'), - https = require('https'), - httpProxy = require('http-proxy'); - -var options = { - https: { - key: fs.readFileSync('path/to/your/key.pem', 'utf8'), - cert: fs.readFileSync('path/to/your/cert.pem', 'utf8') - }, - target: { - https: true // This could also be an Object with key and cert properties - } -}; - -// -// Create a standalone HTTPS proxy server -// -httpProxy.createServer(8000, 'localhost', options).listen(8001); - -// -// Create an instance of HttpProxy to use with another HTTPS server -// -var proxy = new httpProxy.HttpProxy({ - target: { - host: 'localhost', - port: 8000, - https: true - } -}); - -https.createServer(options.https, function (req, res) { - proxy.proxyRequest(req, res); -}).listen(8002); - -// -// Create the target HTTPS server for both cases -// -https.createServer(options.https, function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('hello https\n'); - res.end(); -}).listen(8000); -``` -## Middleware - -`node-http-proxy` now supports connect middleware. Add middleware functions to your createServer call: - -``` js -httpProxy.createServer( - require('connect-gzip').gzip(), - 9000, 'localhost' -).listen(8000); -``` - -A regular request we receive is to support the modification of html/xml content that is returned in the response from an upstream server. - -[Harmon](https://github.com/No9/harmon/) is a stream based middleware plugin that is designed to solve that problem in the most effective way possible. - -## Proxying WebSockets -Websockets are handled automatically when using `httpProxy.createServer()`, however, if you supply a callback inside the createServer call, you will need to handle the 'upgrade' proxy event yourself. Here's how: - -```js - -var options = { - .... -}; - -var server = httpProxy.createServer( - callback/middleware, - options -); - -server.listen(port, function () { ... }); -server.on('upgrade', function (req, socket, head) { - server.proxy.proxyWebSocketRequest(req, socket, head); -}); -``` - -If you would rather not use createServer call, and create the server that proxies yourself, see below: - -``` js -var http = require('http'), - httpProxy = require('http-proxy'); - -// -// Create an instance of node-http-proxy -// -var proxy = new httpProxy.HttpProxy({ - target: { - host: 'localhost', - port: 8000 - } -}); - -var server = http.createServer(function (req, res) { - // - // Proxy normal HTTP requests - // - proxy.proxyRequest(req, res); -}); - -server.on('upgrade', function (req, socket, head) { - // - // Proxy websocket requests too - // - proxy.proxyWebSocketRequest(req, socket, head); -}); - -server.listen(8080); -``` - -### with custom server logic - -``` js -var httpProxy = require('http-proxy') - -var server = httpProxy.createServer(function (req, res, proxy) { - // - // Put your custom server logic here - // - proxy.proxyRequest(req, res, { - host: 'localhost', - port: 9000 - }); -}) - -server.on('upgrade', function (req, socket, head) { - // - // Put your custom server logic here - // - server.proxy.proxyWebSocketRequest(req, socket, head, { - host: 'localhost', - port: 9000 - }); -}); - -server.listen(8080); -``` - -### Configuring your Socket limits - -By default, `node-http-proxy` will set a 100 socket limit for all `host:port` proxy targets. You can change this in two ways: - -1. By passing the `maxSockets` option to `httpProxy.createServer()` -2. By calling `httpProxy.setMaxSockets(n)`, where `n` is the number of sockets you with to use. - -## POST requests and buffering - -express.bodyParser will interfere with proxying of POST requests (and other methods that have a request -body). With bodyParser active, proxied requests will never send anything to the upstream server, and -the original client will just hang. See https://github.com/nodejitsu/node-http-proxy/issues/180 for options. - -## Using node-http-proxy from the command line -When you install this package with npm, a node-http-proxy binary will become available to you. Using this binary is easy with some simple options: - -``` js -usage: node-http-proxy [options] - -All options should be set with the syntax --option=value - -options: - --port PORT Port that the proxy server should run on - --target HOST:PORT Location of the server the proxy will target - --config OUTFILE Location of the configuration file for the proxy server - --silent Silence the log output from the proxy server - -h, --help You're staring at it -``` - -
    -## Why doesn't node-http-proxy have more advanced features like x, y, or z? - -If you have a suggestion for a feature currently not supported, feel free to open a [support issue][6]. node-http-proxy is designed to just proxy http requests from one server to another, but we will be soon releasing many other complimentary projects that can be used in conjunction with node-http-proxy. - -## Options - -### Http Proxy - -`createServer()` supports the following options - -```javascript -{ - forward: { // options for forward-proxy - port: 8000, - host: 'staging.com' - }, - target : { // options for proxy target - port : 8000, - host : 'localhost', - }; - source : { // additional options for websocket proxying - host : 'localhost', - port : 8000, - https: true - }, - enable : { - xforward: true // enables X-Forwarded-For - }, - changeOrigin: false, // changes the origin of the host header to the target URL - timeout: 120000 // override the default 2 minute http socket timeout value in milliseconds -} -``` - -## Run Tests -The test suite is designed to fully cover the combinatoric possibilities of HTTP and HTTPS proxying: - -1. HTTP --> HTTP -2. HTTPS --> HTTP -3. HTTPS --> HTTPS -4. HTTP --> HTTPS - -``` -vows test/*-test.js --spec -vows test/*-test.js --spec --https -vows test/*-test.js --spec --https --target=https -vows test/*-test.js --spec --target=https -``` - -
    -### License - -(The MIT License) - -Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -[0]: http://nodejitsu.com -[1]: https://github.com/nodejitsu/node-http-proxy/blob/master/examples/websocket/websocket-proxy.js -[2]: https://github.com/nodejitsu/node-http-proxy/blob/master/examples/http/proxy-https-to-http.js -[3]: https://github.com/nodejitsu/node-http-proxy/tree/master/examples -[4]: http://www.ietf.org/rfc/rfc2616.txt -[5]: http://socket.io -[6]: http://github.com/nodejitsu/node-http-proxy/issues diff --git a/node_modules/karma/node_modules/http-proxy/benchmark/websockets-throughput.js b/node_modules/karma/node_modules/http-proxy/benchmark/websockets-throughput.js deleted file mode 100644 index 6787385a..00000000 --- a/node_modules/karma/node_modules/http-proxy/benchmark/websockets-throughput.js +++ /dev/null @@ -1,88 +0,0 @@ -var crypto = require('crypto'), - WebSocket = require('ws'), - async = require('async'), - httpProxy = require('../'); - -var SERVER_PORT = 8415, - PROXY_PORT = 8514; - -var testSets = [ - { - size: 1024 * 1024, // 1 MB - count: 128 // 128 MB - }, - { - size: 1024, // 1 KB, - count: 1024 // 1 MB - }, - { - size: 128, // 128 B - count: 1024 * 8 // 1 MB - } -]; - -testSets.forEach(function (set) { - set.buffer = new Buffer(crypto.randomBytes(set.size)); - - set.buffers = []; - for (var i = 0; i < set.count; i++) { - set.buffers.push(set.buffer); - } -}); - -function runSet(set, callback) { - function runAgainst(port, callback) { - function send(sock) { - sock.send(set.buffers[got++]); - if (got === set.count) { - t = new Date() - t; - - server.close(); - proxy.close(); - - callback(null, t); - } - } - - var server = new WebSocket.Server({ port: SERVER_PORT }), - proxy = httpProxy.createServer(SERVER_PORT, 'localhost').listen(PROXY_PORT), - client = new WebSocket('ws://localhost:' + port), - got = 0, - t = new Date(); - - server.on('connection', function (ws) { - send(ws); - - ws.on('message', function (msg) { - send(ws); - }); - }); - - client.on('message', function () { - send(client); - }); - } - - async.series({ - server: async.apply(runAgainst, SERVER_PORT), - proxy: async.apply(runAgainst, PROXY_PORT) - }, function (err, results) { - if (err) { - throw err; - } - - var mb = (set.size * set.count) / (1024 * 1024); - console.log(set.size / (1024) + ' KB * ' + set.count + ' (' + mb + ' MB)'); - - Object.keys(results).forEach(function (key) { - var t = results[key], - throughput = mb / (t / 1000); - - console.log(' ' + key + ' took ' + t + ' ms (' + throughput + ' MB/s)'); - }); - - callback(); - }); -} - -async.forEachLimit(testSets, 1, runSet); diff --git a/node_modules/karma/node_modules/http-proxy/bin/node-http-proxy b/node_modules/karma/node_modules/http-proxy/bin/node-http-proxy deleted file mode 100755 index 07d199ca..00000000 --- a/node_modules/karma/node_modules/http-proxy/bin/node-http-proxy +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/env node - -var path = require('path'), - fs = require('fs'), - util = require('util'), - argv = require('optimist').argv, - httpProxy = require('../lib/node-http-proxy'); - -var help = [ - "usage: node-http-proxy [options] ", - "", - "Starts a node-http-proxy server using the specified command-line options", - "", - "options:", - " --port PORT Port that the proxy server should run on", - " --host HOST Host that the proxy server should run on", - " --target HOST:PORT Location of the server the proxy will target", - " --config OUTFILE Location of the configuration file for the proxy server", - " --silent Silence the log output from the proxy server", - " --user USER User to drop privileges to once server socket is bound", - " -h, --help You're staring at it" -].join('\n'); - -if (argv.h || argv.help || Object.keys(argv).length === 2) { - return util.puts(help); -} - -var location, config = {}, - port = argv.port || 80, - host = argv.host || undefined, - target = argv.target; - user = argv.user; - -// -// If we were passed a config, parse it -// -if (argv.config) { - try { - var data = fs.readFileSync(argv.config); - config = JSON.parse(data.toString()); - } catch (ex) { - util.puts('Error starting node-http-proxy: ' + ex); - process.exit(1); - } -} - -// -// If `config.https` is set, then load the required file contents into the config options. -// -if (config.https) { - Object.keys(config.https).forEach(function (key) { - // If CA certs are specified, load those too. - if (key === "ca") { - for (var i=0; i < config.https.ca.length; i++) { - if (config.https.ca === undefined) { - config.https.ca = []; - } - config.https.ca[i] = fs.readFileSync(config.https[key][i], 'utf8'); - } - } else { - config.https[key] = fs.readFileSync(config.https[key], 'utf8'); - } - }); -} - -// -// Check to see if we should silence the logs -// -config.silent = typeof argv.silent !== 'undefined' ? argv.silent : config.silent; - -// -// If we were passed a target, parse the url string -// -if (typeof target === 'string') location = target.split(':'); - -// -// Create the server with the specified options -// -var server; -if (location) { - var targetPort = location.length === 1 ? 80 : parseInt(location[1]); - server = httpProxy.createServer(targetPort, location[0], config); -} -else if (config.router) { - server = httpProxy.createServer(config); -} -else { - return util.puts(help); -} - -// -// Start the server -// -if (host) { - server.listen(port, host); -} else { - server.listen(port); -} - - -// -// Drop privileges if requested -// -if (typeof user === 'string') { - process.setuid(user); -} - -// -// Notify that the server is started -// -if (!config.silent) { - util.puts('node-http-proxy server now listening on port: ' + port); -} diff --git a/node_modules/karma/node_modules/http-proxy/config.sample.json b/node_modules/karma/node_modules/http-proxy/config.sample.json deleted file mode 100644 index 8f15f882..00000000 --- a/node_modules/karma/node_modules/http-proxy/config.sample.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "silent": false, - "router": { - "localhost": "localhost:9000" - }, - "forward": { - "port": 9001, - "host": "localhost" - } -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/examples/balancer/simple-balancer-with-websockets.js b/node_modules/karma/node_modules/http-proxy/examples/balancer/simple-balancer-with-websockets.js deleted file mode 100644 index 04564cef..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/balancer/simple-balancer-with-websockets.js +++ /dev/null @@ -1,58 +0,0 @@ -var http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// A simple round-robin load balancing strategy. -// -// First, list the servers you want to use in your rotation. -// -var addresses = [ - { - host: 'ws1.0.0.0', - port: 80 - }, - { - host: 'ws2.0.0.0', - port: 80 - } -]; - -// -// Create a HttpProxy object for each target -// - -var proxies = addresses.map(function (target) { - return new httpProxy.HttpProxy({ - target: target - }); -}); - -// -// Get the proxy at the front of the array, put it at the end and return it -// If you want a fancier balancer, put your code here -// - -function nextProxy() { - var proxy = proxies.shift(); - proxies.push(proxy); - return proxy; -} - -// -// Get the 'next' proxy and send the http request -// - -var server = http.createServer(function (req, res) { - nextProxy().proxyRequest(req, res); -}); - -// -// Get the 'next' proxy and send the upgrade request -// - -server.on('upgrade', function (req, socket, head) { - nextProxy().proxyWebSocketRequest(req, socket, head); -}); - -server.listen(8080); - \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/examples/balancer/simple-balancer.js b/node_modules/karma/node_modules/http-proxy/examples/balancer/simple-balancer.js deleted file mode 100644 index f1fa0c06..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/balancer/simple-balancer.js +++ /dev/null @@ -1,36 +0,0 @@ -var httpProxy = require('../../lib/node-http-proxy'); -// -// A simple round-robin load balancing strategy. -// -// First, list the servers you want to use in your rotation. -// -var addresses = [ - { - host: 'ws1.0.0.0', - port: 80 - }, - { - host: 'ws2.0.0.0', - port: 80 - } -]; - -httpProxy.createServer(function (req, res, proxy) { - // - // On each request, get the first location from the list... - // - var target = addresses.shift(); - - // - // ...then proxy to the server whose 'turn' it is... - // - console.log('balancing request to: ', target); - proxy.proxyRequest(req, res, target); - - // - // ...and then the server you just used becomes the last item in the list. - // - addresses.push(target); -}).listen(8000); - -// Rinse; repeat; enjoy. \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/examples/helpers/store.js b/node_modules/karma/node_modules/http-proxy/examples/helpers/store.js deleted file mode 100644 index e2860573..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/helpers/store.js +++ /dev/null @@ -1,64 +0,0 @@ - -// -// just to make these example a little bit interesting, -// make a little key value store with an http interface -// (see couchbd for a grown-up version of this) -// -// API: -// GET / -// retrive list of keys -// -// GET /[url] -// retrive object stored at [url] -// will respond with 404 if there is nothing stored at [url] -// -// POST /[url] -// -// JSON.parse the body and store it under [url] -// will respond 400 (bad request) if body is not valid json. -// -// TODO: cached map-reduce views and auto-magic sharding. -// -var Store = module.exports = function Store () { - this.store = {}; -}; - -Store.prototype = { - get: function (key) { - return this.store[key] - }, - set: function (key, value) { - return this.store[key] = value - }, - handler:function () { - var store = this - return function (req, res) { - function send (obj, status) { - res.writeHead(200 || status,{'Content-Type': 'application/json'}) - res.write(JSON.stringify(obj) + '\n') - res.end() - } - var url = req.url.split('?').shift() - if (url === '/') { - console.log('get index') - return send(Object.keys(store.store)) - } else if (req.method == 'GET') { - var obj = store.get (url) - send(obj || {error: 'not_found', url: url}, obj ? 200 : 404) - } else { - //post: buffer body, and parse. - var body = '', obj - req.on('data', function (c) { body += c}) - req.on('end', function (c) { - try { - obj = JSON.parse(body) - } catch (err) { - return send (err, 400) - } - store.set(url, obj) - send({ok: true}) - }) - } - } - } -} diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/basic-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/http/basic-proxy.js deleted file mode 100644 index b890e69a..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/basic-proxy.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - basic-proxy.js: Basic example of proxying over HTTP - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -var welcome = [ - '# # ##### ##### ##### ##### ##### #### # # # #', - '# # # # # # # # # # # # # # # # ', - '###### # # # # ##### # # # # # # ## # ', - '# # # # ##### ##### ##### # # ## # ', - '# # # # # # # # # # # # # ', - '# # # # # # # # #### # # # ' -].join('\n'); - -util.puts(welcome.rainbow.bold); - -// -// Basic Http Proxy Server -// -httpProxy.createServer(9000, 'localhost').listen(8000); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/concurrent-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/http/concurrent-proxy.js deleted file mode 100644 index 230dfc65..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/concurrent-proxy.js +++ /dev/null @@ -1,66 +0,0 @@ -/* - concurrent-proxy.js: check levelof concurrency through proxy. - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Basic Http Proxy Server -// -httpProxy.createServer(9000, 'localhost').listen(8000); - -// -// Target Http Server -// -// to check apparent problems with concurrent connections -// make a server which only responds when there is a given nubmer on connections -// - - -var connections = [], - go; - -http.createServer(function (req, res) { - connections.push(function () { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); - }); - - process.stdout.write(connections.length + ', '); - - if (connections.length > 110 || go) { - go = true; - while (connections.length) { - connections.shift()(); - } - } -}).listen(9000); - -util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/custom-proxy-error.js b/node_modules/karma/node_modules/http-proxy/examples/http/custom-proxy-error.js deleted file mode 100644 index dc439ea1..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/custom-proxy-error.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - custom-proxy-error.js: Example of using the custom `proxyError` event. - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Http Proxy Server with Latency -// -var server = httpProxy.createServer(9000, 'localhost'); - -// -// Tell the server to listen on port 8002 -// -server.listen(8002); - -// -// Listen for the `proxyError` event on `server.proxy`. _It will not -// be raised on the server itself._ -server.proxy.on('proxyError', function (err, req, res) { - res.writeHead(500, { - 'Content-Type': 'text/plain' - }); - - res.end('Something went wrong. And we are reporting a custom error message.'); -}); - - -util.puts('http proxy server '.blue + 'started '.green.bold + 'on port '.blue + '8002 '.yellow + 'with custom error message'.magenta.underline); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/forward-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/http/forward-proxy.js deleted file mode 100644 index ecc20fd4..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/forward-proxy.js +++ /dev/null @@ -1,63 +0,0 @@ -/* - forward-proxy.js: Example of proxying over HTTP with additional forward proxy - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Setup proxy server with forwarding -// -httpProxy.createServer(9000, 'localhost', { - forward: { - port: 9001, - host: 'localhost' - } -}).listen(8003); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -// -// Target Http Forwarding Server -// -http.createServer(function (req, res) { - util.puts('Receiving forward for: ' + req.url); - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully forwarded to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9001); - -util.puts('http proxy server '.blue + 'started '.green.bold + 'on port '.blue + '8003 '.yellow + 'with forward proxy'.magenta.underline); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); -util.puts('http forward server '.blue + 'started '.green.bold + 'on port '.blue + '9001 '.yellow); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/latent-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/http/latent-proxy.js deleted file mode 100644 index 2063d0e5..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/latent-proxy.js +++ /dev/null @@ -1,56 +0,0 @@ -/* - latent-proxy.js: Example of proxying over HTTP with latency - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Http Proxy Server with Latency -// -httpProxy.createServer(function (req, res, proxy) { - var buffer = httpProxy.buffer(req); - setTimeout(function () { - proxy.proxyRequest(req, res, { - port: 9000, - host: 'localhost', - buffer: buffer - }); - }, 200); -}).listen(8002); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -util.puts('http proxy server '.blue + 'started '.green.bold + 'on port '.blue + '8002 '.yellow + 'with latency'.magenta.underline); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/proxy-https-to-http.js b/node_modules/karma/node_modules/http-proxy/examples/http/proxy-https-to-http.js deleted file mode 100644 index 378de036..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/proxy-https-to-http.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - proxy-https-to-http.js: Basic example of proxying over HTTPS to a target HTTP server - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var https = require('https'), - http = require('http'), - util = require('util'), - colors = require('colors'), - httpProxy = require('../../lib/node-http-proxy'), - helpers = require('../../test/helpers'); - -// -// Create the target HTTPS server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('hello http over https\n'); - res.end(); -}).listen(8000); - -// -// Create the proxy server listening on port 443 -// -httpProxy.createServer(8000, 'localhost', { - https: helpers.https -}).listen(8080); - -util.puts('https proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8080'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '8000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/proxy-https-to-https.js b/node_modules/karma/node_modules/http-proxy/examples/http/proxy-https-to-https.js deleted file mode 100644 index af0d9227..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/proxy-https-to-https.js +++ /dev/null @@ -1,55 +0,0 @@ -/* - proxy-https-to-https.js: Basic example of proxying over HTTPS to a target HTTPS server - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var https = require('https'), - http = require('http'), - util = require('util'), - colors = require('colors'), - httpProxy = require('../../lib/node-http-proxy'), - helpers = require('../../test/helpers'); - -// -// Create the target HTTPS server -// -https.createServer(helpers.https, function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('hello https\n'); - res.end(); -}).listen(8000); - -// -// Create the proxy server listening on port 443 -// -httpProxy.createServer(8000, 'localhost', { - https: helpers.https, - target: { - https: true, - rejectUnauthorized: false - } -}).listen(8080); - -util.puts('https proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8080'.yellow); -util.puts('https server '.blue + 'started '.green.bold + 'on port '.blue + '8000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/proxy-table.js b/node_modules/karma/node_modules/http-proxy/examples/http/proxy-table.js deleted file mode 100644 index 55d97aed..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/proxy-table.js +++ /dev/null @@ -1,51 +0,0 @@ -/* - proxy-table.js: Example of proxying over HTTP with proxy table - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Http Proxy Server with Proxy Table -// -httpProxy.createServer({ - router: { - 'localhost': 'localhost:9000' - } -}).listen(8001); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -util.puts('http proxy server '.blue + 'started '.green.bold + 'on port '.blue + '8001 '.yellow + 'with proxy table'.magenta.underline); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/http/standalone-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/http/standalone-proxy.js deleted file mode 100644 index e1b1011c..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/http/standalone-proxy.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - standalone-proxy.js: Example of proxying over HTTP with a standalone HTTP server. - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Http Server with proxyRequest Handler and Latency -// -var proxy = new httpProxy.RoutingProxy(); -http.createServer(function (req, res) { - var buffer = httpProxy.buffer(req); - setTimeout(function () { - proxy.proxyRequest(req, res, { - port: 9000, - host: 'localhost', - buffer: buffer - }); - }, 200); -}).listen(8004); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '8004 '.yellow + 'with proxyRequest handler'.cyan.underline + ' and latency'.magenta); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/middleware/bodyDecoder-middleware.js b/node_modules/karma/node_modules/http-proxy/examples/middleware/bodyDecoder-middleware.js deleted file mode 100644 index d889548a..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/middleware/bodyDecoder-middleware.js +++ /dev/null @@ -1,87 +0,0 @@ - -var Store = require('../helpers/store') - , http = require('http') - -http.createServer(new Store().handler()).listen(7531, function () { -//try these commands: -// get index: -// curl localhost:7531 -// [] -// -// get a doc: -// curl localhost:7531/foo -// {"error":"not_found"} -// -// post an doc: -// curl -X POST localhost:7531/foo -d '{"content": "hello", "type": "greeting"}' -// {"ok":true} -// -// get index (now, not empty) -// curl localhost:7531 -// ["/foo"] -// -// get doc -// curl localhost:7531/foo -// {"content": "hello", "type": "greeting"} - -// -// now, suppose we wanted to direct all objects where type == "greeting" to a different store -// than where type == "insult" -// -// we can use connect connect-bodyDecoder and some custom logic to send insults to another Store. - -//insult server: - - http.createServer(new Store().handler()).listen(2600, function () { - - //greetings -> 7531, insults-> 2600 - - // now, start a proxy server. - - var bodyParser = require('connect/lib/middleware/bodyParser') - //don't worry about incoming contont type - //bodyParser.parse[''] = JSON.parse - - require('../../lib/node-http-proxy').createServer( - //refactor the body parser and re-streamer into a separate package - bodyParser(), - //body parser absorbs the data and end events before passing control to the next - // middleware. if we want to proxy it, we'll need to re-emit these events after - //passing control to the middleware. - require('connect-restreamer')(), - function (req, res, proxy) { - //if your posting an obect which contains type: "insult" - //it will get redirected to port 2600. - //normal get requests will go to 7531 nad will not return insults. - var port = (req.body && req.body.type === 'insult' ? 2600 : 7531) - proxy.proxyRequest(req, res, {host: 'localhost', port: port}) - } - ).listen(1337, function () { - var request = require('request') - //bodyParser needs content-type set to application/json - //if we use request, it will set automatically if we use the 'json:' field. - function post (greeting, type) { - request.post({ - url: 'http://localhost:1337/' + greeting, - json: {content: greeting, type: type || "greeting"} - }) - } - post("hello") - post("g'day") - post("kiora") - post("houdy") - post("java", "insult") - - //now, the insult should have been proxied to 2600 - - //curl localhost:2600 - //["/java"] - - //but the greetings will be sent to 7531 - - //curl localhost:7531 - //["/hello","/g%27day","/kiora","/houdy"] - - }) - }) -}) diff --git a/node_modules/karma/node_modules/http-proxy/examples/middleware/gzip-middleware-proxytable.js b/node_modules/karma/node_modules/http-proxy/examples/middleware/gzip-middleware-proxytable.js deleted file mode 100644 index 527d3d7b..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/middleware/gzip-middleware-proxytable.js +++ /dev/null @@ -1,54 +0,0 @@ -/* - gzip-middleware-proxytable.js: Basic example of `connect-gzip` middleware in node-http-proxy - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, Marak Squires, & Dominic Tarr. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Basic Http Proxy Server -// -httpProxy.createServer( - require('connect-gzip').gzip({ matchType: /.?/ }), - { - router: { - "localhost/fun": "localhost:9000" - } - } -).listen(8000); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/middleware/gzip-middleware.js b/node_modules/karma/node_modules/http-proxy/examples/middleware/gzip-middleware.js deleted file mode 100644 index 29097ecd..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/middleware/gzip-middleware.js +++ /dev/null @@ -1,50 +0,0 @@ -/* - gzip-middleware.js: Basic example of `connect-gzip` middleware in node-http-proxy - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, Marak Squires, & Dominic Tarr. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Basic Http Proxy Server -// -httpProxy.createServer( - require('connect-gzip').gzip({ matchType: /.?/ }), - 9000, 'localhost' -).listen(8000); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/middleware/jsonp-middleware.js b/node_modules/karma/node_modules/http-proxy/examples/middleware/jsonp-middleware.js deleted file mode 100644 index 15ab9ee0..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/middleware/jsonp-middleware.js +++ /dev/null @@ -1,30 +0,0 @@ -var Store = require('../helpers/store') - , http = require('http') - -// -// jsonp is a handy technique for getting around the limitations of the same-origin policy. -// (http://en.wikipedia.org/wiki/Same_origin_policy) -// -// normally, to dynamically update a page you use an XmlHttpRequest. this has flakey support -// is some browsers and is restricted by the same origin policy. you cannot perform XHR requests to -// someone else's server. one way around this would be to proxy requests to all the servers you want -// to xhr to, and your core server - so that everything has the same port and host. -// -// another way, is to turn json into javascript. (which is exempt from the same origin policy) -// this is done by wrapping the json object in a function call, and then including a script tag. -// -// here we're proxing our own JSON returning server, but we could proxy any server on the internet, -// and our client side app would be slurping down JSONP from anywhere. -// -// curl localhost:1337/whatever?callback=alert -// alert([]) //which is valid javascript! -// -// also see http://en.wikipedia.org/wiki/JSONP#JSONP -// - -http.createServer(new Store().handler()).listen(7531) - -require('../../lib/node-http-proxy').createServer( - require('connect-jsonp')(true), - 'localhost', 7531 -).listen(1337) diff --git a/node_modules/karma/node_modules/http-proxy/examples/middleware/modifyResponse-middleware.js b/node_modules/karma/node_modules/http-proxy/examples/middleware/modifyResponse-middleware.js deleted file mode 100644 index af21236e..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/middleware/modifyResponse-middleware.js +++ /dev/null @@ -1,57 +0,0 @@ -/* - modifyBody-middleware.js: Example of middleware which modifies response - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, Marak Squires, & Dominic Tarr. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Basic Http Proxy Server -// -httpProxy.createServer( - function (req, res, next) { - var _write = res.write; - - res.write = function (data) { - _write.call(res, data.toString().replace("Ruby", "nodejitsu")); - } - next(); - }, - 9000, 'localhost' -).listen(8000); - -// -// Target Http Server -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.end('Hello, I know Ruby\n'); -}).listen(9000); - -util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); - diff --git a/node_modules/karma/node_modules/http-proxy/examples/middleware/url-middleware.js b/node_modules/karma/node_modules/http-proxy/examples/middleware/url-middleware.js deleted file mode 100644 index b4f30456..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/middleware/url-middleware.js +++ /dev/null @@ -1,58 +0,0 @@ -/* - url-middleware.js: Example of a simple url routing middleware for node-http-proxy - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'); - -// -// Now we set up our proxy. -// -httpProxy.createServer( - // - // This is where our middlewares go, with any options desired - in this case, - // the list of routes/URLs and their destinations. - // - require('proxy-by-url')({ - '/hello': { port: 9000, host: 'localhost' }, - '/charlie': { port: 80, host: 'charlieistheman.com' }, - '/google': { port: 80, host: 'google.com' } - }) -).listen(8000); - -// -// Target Http Server (to listen for requests on 'localhost') -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -// And finally, some colored startup output. -util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/middleware/url-middleware2.js b/node_modules/karma/node_modules/http-proxy/examples/middleware/url-middleware2.js deleted file mode 100644 index 2c894e1a..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/middleware/url-middleware2.js +++ /dev/null @@ -1,30 +0,0 @@ -var util = require('util'), - colors = require('colors'), - http = require('http'), - httpProxy = require('../../lib/node-http-proxy'), - Store = require('../helpers/store') - -http.createServer(new Store().handler()).listen(7531) - -// Now we set up our proxy. -httpProxy.createServer( - // This is where our middlewares go, with any options desired - in this case, - // the list of routes/URLs and their destinations. - require('proxy-by-url')({ - '/store': { port: 7531, host: 'localhost' }, - '/': { port: 9000, host: 'localhost' } - }) -).listen(8000); - -// -// Target Http Server (to listen for requests on 'localhost') -// -http.createServer(function (req, res) { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write('request successfully proxied to: ' + req.url + '\n' + JSON.stringify(req.headers, true, 2)); - res.end(); -}).listen(9000); - -// And finally, some colored startup output. -util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow); -util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow); diff --git a/node_modules/karma/node_modules/http-proxy/examples/package.json b/node_modules/karma/node_modules/http-proxy/examples/package.json deleted file mode 100644 index ca95fd8c..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "http-proxy-examples", - "description": "packages required to run the examples", - "version": "0.0.0", - "dependencies": { - "connect": "1.6", - "connect-gzip": "0.1", - "connect-jsonp": "0.0.5", - "connect-restreamer": "1", - "proxy-by-url": ">= 0.0.1" - } -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/examples/websocket/latent-websocket-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/websocket/latent-websocket-proxy.js deleted file mode 100644 index 99a07281..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/websocket/latent-websocket-proxy.js +++ /dev/null @@ -1,92 +0,0 @@ -/* - standalone-websocket-proxy.js: Example of proxying websockets over HTTP with a standalone HTTP server. - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - http = require('http'), - colors = require('colors'), - httpProxy = require('../../lib/node-http-proxy'); - -try { - var io = require('socket.io'), - client = require('socket.io-client'); -} -catch (ex) { - console.error('Socket.io is required for this example:'); - console.error('npm ' + 'install'.green); - process.exit(1); -} - -// -// Create the target HTTP server and setup -// socket.io on it. -// -var server = io.listen(8080); -server.sockets.on('connection', function (client) { - util.debug('Got websocket connection'); - - client.on('message', function (msg) { - util.debug('Got message from client: ' + msg); - }); - - client.send('from server'); -}); - -// -// Setup our server to proxy standard HTTP requests -// -var proxy = new httpProxy.HttpProxy({ - target: { - host: 'localhost', - port: 8080 - } -}); - -var proxyServer = http.createServer(function (req, res) { - proxy.proxyRequest(req, res); -}); - -// -// Listen to the `upgrade` event and proxy the -// WebSocket requests as well. -// -proxyServer.on('upgrade', function (req, socket, head) { - var buffer = httpProxy.buffer(socket); - - setTimeout(function () { - proxy.proxyWebSocketRequest(req, socket, head, buffer); - }, 1000); -}); - -proxyServer.listen(8081); - -// -// Setup the socket.io client against our proxy -// -var ws = client.connect('ws://localhost:8081'); - -ws.on('message', function (msg) { - util.debug('Got message: ' + msg); -}); diff --git a/node_modules/karma/node_modules/http-proxy/examples/websocket/standalone-websocket-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/websocket/standalone-websocket-proxy.js deleted file mode 100644 index acf43b97..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/websocket/standalone-websocket-proxy.js +++ /dev/null @@ -1,87 +0,0 @@ -/* - standalone-websocket-proxy.js: Example of proxying websockets over HTTP with a standalone HTTP server. - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - http = require('http'), - colors = require('colors'), - httpProxy = require('../../lib/node-http-proxy'); - -try { - var io = require('socket.io'), - client = require('socket.io-client'); -} -catch (ex) { - console.error('Socket.io is required for this example:'); - console.error('npm ' + 'install'.green); - process.exit(1); -} - -// -// Create the target HTTP server and setup -// socket.io on it. -// -var server = io.listen(8080); -server.sockets.on('connection', function (client) { - util.debug('Got websocket connection'); - - client.on('message', function (msg) { - util.debug('Got message from client: ' + msg); - }); - - client.send('from server'); -}); - -// -// Setup our server to proxy standard HTTP requests -// -var proxy = new httpProxy.HttpProxy({ - target: { - host: 'localhost', - port: 8080 - } -}); -var proxyServer = http.createServer(function (req, res) { - proxy.proxyRequest(req, res); -}); - -// -// Listen to the `upgrade` event and proxy the -// WebSocket requests as well. -// -proxyServer.on('upgrade', function (req, socket, head) { - proxy.proxyWebSocketRequest(req, socket, head); -}); - -proxyServer.listen(8081); - -// -// Setup the socket.io client against our proxy -// -var ws = client.connect('ws://localhost:8081'); - -ws.on('message', function (msg) { - util.debug('Got message: ' + msg); -}); diff --git a/node_modules/karma/node_modules/http-proxy/examples/websocket/websocket-proxy.js b/node_modules/karma/node_modules/http-proxy/examples/websocket/websocket-proxy.js deleted file mode 100644 index 4e3cf6fd..00000000 --- a/node_modules/karma/node_modules/http-proxy/examples/websocket/websocket-proxy.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - web-socket-proxy.js: Example of proxying over HTTP and WebSockets. - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires. - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - http = require('http'), - colors = require('colors'), - httpProxy = require('../../lib/node-http-proxy'); - -try { - var io = require('socket.io'), - client = require('socket.io-client'); -} -catch (ex) { - console.error('Socket.io is required for this example:'); - console.error('npm ' + 'install'.green); - process.exit(1); -} - -// -// Create the target HTTP server and setup -// socket.io on it. -// -var server = io.listen(8080); -server.sockets.on('connection', function (client) { - util.debug('Got websocket connection'); - - client.on('message', function (msg) { - util.debug('Got message from client: ' + msg); - }); - - client.send('from server'); -}); - -// -// Create a proxy server with node-http-proxy -// -httpProxy.createServer(8080, 'localhost').listen(8081); - -// -// Setup the socket.io client against our proxy -// -var ws = client.connect('ws://localhost:8081'); - -ws.on('message', function (msg) { - util.debug('Got message: ' + msg); -}); diff --git a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy.js b/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy.js deleted file mode 100644 index 956a5f3d..00000000 --- a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy.js +++ /dev/null @@ -1,394 +0,0 @@ -/* - node-http-proxy.js: http proxy for node.js - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Marak Squires, Fedor Indutny - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - http = require('http'), - https = require('https'), - events = require('events'), - maxSockets = 100; - -// -// Expose version information through `pkginfo`. -// -require('pkginfo')(module, 'version'); - -// -// ### Export the relevant objects exposed by `node-http-proxy` -// -var HttpProxy = exports.HttpProxy = require('./node-http-proxy/http-proxy').HttpProxy, - ProxyTable = exports.ProxyTable = require('./node-http-proxy/proxy-table').ProxyTable, - RoutingProxy = exports.RoutingProxy = require('./node-http-proxy/routing-proxy').RoutingProxy; - -// -// ### function createServer ([port, host, options, handler]) -// #### @port {number} **Optional** Port to use on the proxy target host. -// #### @host {string} **Optional** Host of the proxy target. -// #### @options {Object} **Optional** Options for the HttpProxy instance used -// #### @handler {function} **Optional** Request handler for the server -// Returns a server that manages an instance of HttpProxy. Flexible arguments allow for: -// -// * `httpProxy.createServer(9000, 'localhost')` -// * `httpProxy.createServer(9000, 'localhost', options) -// * `httpPRoxy.createServer(function (req, res, proxy) { ... })` -// -exports.createServer = function () { - var args = Array.prototype.slice.call(arguments), - handlers = [], - callback, - options = {}, - message, - handler, - server, - proxy, - host, - port; - - // - // Liberally parse arguments of the form: - // - // httpProxy.createServer('localhost', 9000, callback); - // httpProxy.createServer({ host: 'localhost', port: 9000 }, callback); - // **NEED MORE HERE!!!** - // - args.forEach(function (arg) { - arg = Number(arg) || arg; - switch (typeof arg) { - case 'string': host = arg; break; - case 'number': port = arg; break; - case 'object': options = arg || {}; break; - case 'function': callback = arg; handlers.push(callback); break; - }; - }); - - // - // Helper function to create intelligent error message(s) - // for the very liberal arguments parsing performed by - // `require('http-proxy').createServer()`. - // - function validArguments() { - var conditions = { - 'port and host': function () { - return port && host; - }, - 'options.target or options.router': function () { - return options && (options.router || - (options.target && options.target.host && options.target.port)); - }, - 'or proxy handlers': function () { - return handlers && handlers.length; - } - } - - var missing = Object.keys(conditions).filter(function (name) { - return !conditions[name](); - }); - - if (missing.length === 3) { - message = 'Cannot proxy without ' + missing.join(', '); - return false; - } - - return true; - } - - if (!validArguments()) { - // - // If `host`, `port` and `options` are all not passed (with valid - // options) then this server is improperly configured. - // - throw new Error(message); - return; - } - - // - // Hoist up any explicit `host` or `port` arguments - // that have been passed in to the options we will - // pass to the `httpProxy.HttpProxy` constructor. - // - options.target = options.target || {}; - options.target.port = options.target.port || port; - options.target.host = options.target.host || host; - - if (options.target && options.target.host && options.target.port) { - // - // If an explicit `host` and `port` combination has been passed - // to `.createServer()` then instantiate a hot-path optimized - // `HttpProxy` object and add the "proxy" middleware layer. - // - proxy = new HttpProxy(options); - handlers.push(function (req, res) { - proxy.proxyRequest(req, res); - }); - } - else { - // - // If no explicit `host` or `port` combination has been passed then - // we have to assume that this is a "go-anywhere" Proxy (i.e. a `RoutingProxy`). - // - proxy = new RoutingProxy(options); - - if (options.router) { - // - // If a routing table has been supplied than we assume - // the user intends us to add the "proxy" middleware layer - // for them - // - handlers.push(function (req, res) { - proxy.proxyRequest(req, res); - }); - - proxy.on('routes', function (routes) { - server.emit('routes', routes); - }); - } - } - - // - // Create the `http[s].Server` instance which will use - // an instance of `httpProxy.HttpProxy`. - // - handler = handlers.length > 1 - ? exports.stack(handlers, proxy) - : function (req, res) { handlers[0](req, res, proxy) }; - - server = options.https - ? https.createServer(options.https, handler) - : http.createServer(handler); - - server.on('close', function () { - proxy.close(); - }); - - if (!callback) { - // - // If an explicit callback has not been supplied then - // automagically proxy the request using the `HttpProxy` - // instance we have created. - // - server.on('upgrade', function (req, socket, head) { - proxy.proxyWebSocketRequest(req, socket, head); - }); - } - - // - // Set the proxy on the server so it is available - // to the consumer of the server - // - server.proxy = proxy; - return server; -}; - -// -// ### function buffer (obj) -// #### @obj {Object} Object to pause events from -// Buffer `data` and `end` events from the given `obj`. -// Consumers of HttpProxy performing async tasks -// __must__ utilize this utility, to re-emit data once -// the async operation has completed, otherwise these -// __events will be lost.__ -// -// var buffer = httpProxy.buffer(req); -// fs.readFile(path, function () { -// httpProxy.proxyRequest(req, res, host, port, buffer); -// }); -// -// __Attribution:__ This approach is based heavily on -// [Connect](https://github.com/senchalabs/connect/blob/master/lib/utils.js#L157). -// However, this is not a big leap from the implementation in node-http-proxy < 0.4.0. -// This simply chooses to manage the scope of the events on a new Object literal as opposed to -// [on the HttpProxy instance](https://github.com/nodejitsu/node-http-proxy/blob/v0.3.1/lib/node-http-proxy.js#L154). -// -exports.buffer = function (obj) { - var events = [], - onData, - onEnd; - - obj.on('data', onData = function (data, encoding) { - events.push(['data', data, encoding]); - }); - - obj.on('end', onEnd = function (data, encoding) { - events.push(['end', data, encoding]); - }); - - return { - end: function () { - obj.removeListener('data', onData); - obj.removeListener('end', onEnd); - }, - destroy: function () { - this.end(); - this.resume = function () { - console.error("Cannot resume buffer after destroying it."); - }; - - onData = onEnd = events = obj = null; - }, - resume: function () { - this.end(); - for (var i = 0, len = events.length; i < len; ++i) { - obj.emit.apply(obj, events[i]); - } - } - }; -}; - -// -// ### function getMaxSockets () -// Returns the maximum number of sockets -// allowed on __every__ outgoing request -// made by __all__ instances of `HttpProxy` -// -exports.getMaxSockets = function () { - return maxSockets; -}; - -// -// ### function setMaxSockets () -// Sets the maximum number of sockets -// allowed on __every__ outgoing request -// made by __all__ instances of `HttpProxy` -// -exports.setMaxSockets = function (value) { - maxSockets = value; -}; - -// -// ### function stack (middlewares, proxy) -// #### @middlewares {Array} Array of functions to stack. -// #### @proxy {HttpProxy|RoutingProxy} Proxy instance to -// Iteratively build up a single handler to the `http.Server` -// `request` event (i.e. `function (req, res)`) by wrapping -// each middleware `layer` into a `child` middleware which -// is in invoked by the parent (i.e. predecessor in the Array). -// -// adapted from https://github.com/creationix/stack -// -exports.stack = function stack (middlewares, proxy) { - var handle; - middlewares.reverse().forEach(function (layer) { - var child = handle; - handle = function (req, res) { - var next = function (err) { - if (err) { - if (res._headerSent) { - res.destroy(); - } - else { - res.statusCode = 500; - res.setHeader('Content-Type', 'text/plain'); - res.end('Internal Server Error'); - } - - console.error('Error in middleware(s): %s', err.stack); - return; - } - - if (child) { - child(req, res); - } - }; - - // - // Set the prototype of the `next` function to the instance - // of the `proxy` so that in can be used interchangably from - // a `connect` style callback and a true `HttpProxy` object. - // - // e.g. `function (req, res, next)` vs. `function (req, res, proxy)` - // - next.__proto__ = proxy; - layer(req, res, next); - }; - }); - - return handle; -}; - -// -// ### function _getAgent (host, port, secure) -// #### @options {Object} Options to use when creating the agent. -// -// { -// host: 'localhost', -// port: 9000, -// https: true, -// maxSockets: 100 -// } -// -// Createsan agent from the `http` or `https` module -// and sets the `maxSockets` property appropriately. -// -exports._getAgent = function _getAgent (options) { - if (!options || !options.host) { - throw new Error('`options.host` is required to create an Agent.'); - } - - if (!options.port) { - options.port = options.https ? 443 : 80; - } - - var Agent = options.https ? https.Agent : http.Agent, - agent; - - // require('http-proxy').setMaxSockets() should override http's default - // configuration value (which is pretty low). - options.maxSockets = options.maxSockets || maxSockets; - agent = new Agent(options); - - return agent; -} - -// -// ### function _getProtocol (options) -// #### @options {Object} Options for the proxy target. -// Returns the appropriate node.js core protocol module (i.e. `http` or `https`) -// based on the `options` supplied. -// -exports._getProtocol = function _getProtocol (options) { - return options.https ? https : http; -}; - - -// -// ### function _getBase (options) -// #### @options {Object} Options for the proxy target. -// Returns the relevate base object to create on outgoing proxy request. -// If `options.https` are supplied, this function respond with an object -// containing the relevant `ca`, `key`, and `cert` properties. -// -exports._getBase = function _getBase (options) { - var result = function () {}; - - if (options.https && typeof options.https === 'object') { - ['ca', 'cert', 'key'].forEach(function (key) { - if (options.https[key]) { - result.prototype[key] = options.https[key]; - } - }); - } - - return result; -}; diff --git a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/http-proxy.js b/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/http-proxy.js deleted file mode 100644 index 0efb2fa3..00000000 --- a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/http-proxy.js +++ /dev/null @@ -1,952 +0,0 @@ -/* - node-http-proxy.js: http proxy for node.js - - Copyright (c) 2010 Charlie Robbins, Mikeal Rogers, Marak Squires, Fedor Indutny - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var events = require('events'), - http = require('http'), - util = require('util'), - url = require('url'), - httpProxy = require('../node-http-proxy'); - -// -// ### function HttpProxy (options) -// #### @options {Object} Options for this instance. -// Constructor function for new instances of HttpProxy responsible -// for managing the life-cycle of streaming reverse proxyied HTTP requests. -// -// Example options: -// -// { -// target: { -// host: 'localhost', -// port: 9000 -// }, -// forward: { -// host: 'localhost', -// port: 9001 -// } -// } -// -var HttpProxy = exports.HttpProxy = function (options) { - if (!options || !options.target) { - throw new Error('Both `options` and `options.target` are required.'); - } - - events.EventEmitter.call(this); - - var self = this; - - // - // Setup basic proxying options: - // - // * forward {Object} Options for a forward-proxy (if-any) - // * target {Object} Options for the **sole** proxy target of this instance - // - this.forward = options.forward; - this.target = options.target; - this.timeout = options.timeout; - - // - // Setup the necessary instances instance variables for - // the `target` and `forward` `host:port` combinations - // used by this instance. - // - // * agent {http[s].Agent} Agent to be used by this instance. - // * protocol {http|https} Core node.js module to make requests with. - // * base {Object} Base object to create when proxying containing any https settings. - // - function setupProxy (key) { - self[key].agent = httpProxy._getAgent(self[key]); - self[key].protocol = httpProxy._getProtocol(self[key]); - self[key].base = httpProxy._getBase(self[key]); - } - - setupProxy('target'); - if (this.forward) { - setupProxy('forward'); - } - - // - // Setup opt-in features - // - this.enable = options.enable || {}; - this.enable.xforward = typeof this.enable.xforward === 'boolean' - ? this.enable.xforward - : true; - - // - // Setup additional options for WebSocket proxying. When forcing - // the WebSocket handshake to change the `sec-websocket-location` - // and `sec-websocket-origin` headers `options.source` **MUST** - // be provided or the operation will fail with an `origin mismatch` - // by definition. - // - this.source = options.source || { host: 'localhost', port: 80 }; - this.source.https = this.source.https || options.https; - this.changeOrigin = options.changeOrigin || false; -}; - -// Inherit from events.EventEmitter -util.inherits(HttpProxy, events.EventEmitter); - -// -// ### function proxyRequest (req, res, buffer) -// #### @req {ServerRequest} Incoming HTTP Request to proxy. -// #### @res {ServerResponse} Outgoing HTTP Request to write proxied data to. -// #### @buffer {Object} Result from `httpProxy.buffer(req)` -// -HttpProxy.prototype.proxyRequest = function (req, res, buffer) { - var self = this, - errState = false, - outgoing = new(this.target.base), - reverseProxy, - location; - - // If this is a DELETE request then set the "content-length" - // header (if it is not already set) - if (req.method === 'DELETE') { - req.headers['content-length'] = req.headers['content-length'] || '0'; - } - - // - // Add common proxy headers to the request so that they can - // be availible to the proxy target server. If the proxy is - // part of proxy chain it will append the address: - // - // * `x-forwarded-for`: IP Address of the original request - // * `x-forwarded-proto`: Protocol of the original request - // * `x-forwarded-port`: Port of the original request. - // - if (this.enable.xforward && req.connection && req.socket) { - if (req.headers['x-forwarded-for']) { - var addressToAppend = "," + req.connection.remoteAddress || req.socket.remoteAddress; - req.headers['x-forwarded-for'] += addressToAppend; - } - else { - req.headers['x-forwarded-for'] = req.connection.remoteAddress || req.socket.remoteAddress; - } - - if (req.headers['x-forwarded-port']) { - var portToAppend = "," + req.connection.remotePort || req.socket.remotePort; - req.headers['x-forwarded-port'] += portToAppend; - } - else { - req.headers['x-forwarded-port'] = req.connection.remotePort || req.socket.remotePort; - } - - if (req.headers['x-forwarded-proto']) { - var protoToAppend = "," + getProto(req); - req.headers['x-forwarded-proto'] += protoToAppend; - } - else { - req.headers['x-forwarded-proto'] = getProto(req); - } - } - - if (this.timeout) { - req.socket.setTimeout(this.timeout); - } - - // - // Emit the `start` event indicating that we have begun the proxy operation. - // - this.emit('start', req, res, this.target); - - // - // If forwarding is enabled for this instance, foward proxy the - // specified request to the address provided in `this.forward` - // - if (this.forward) { - this.emit('forward', req, res, this.forward); - this._forwardRequest(req); - } - - // - // #### function proxyError (err) - // #### @err {Error} Error contacting the proxy target - // Short-circuits `res` in the event of any error when - // contacting the proxy target at `host` / `port`. - // - function proxyError(err) { - errState = true; - - // - // Emit an `error` event, allowing the application to use custom - // error handling. The error handler should end the response. - // - if (self.emit('proxyError', err, req, res)) { - return; - } - - res.writeHead(500, { 'Content-Type': 'text/plain' }); - - if (req.method !== 'HEAD') { - // - // This NODE_ENV=production behavior is mimics Express and - // Connect. - // - if (process.env.NODE_ENV === 'production') { - res.write('Internal Server Error'); - } - else { - res.write('An error has occurred: ' + JSON.stringify(err)); - } - } - - try { res.end() } - catch (ex) { console.error("res.end error: %s", ex.message) } - } - - // - // Setup outgoing proxy with relevant properties. - // - outgoing.host = this.target.host; - outgoing.hostname = this.target.hostname; - outgoing.port = this.target.port; - outgoing.socketPath = this.target.socketPath; - outgoing.agent = this.target.agent; - outgoing.method = req.method; - outgoing.path = req.url; - outgoing.headers = req.headers; - - // - // If the changeOrigin option is specified, change the - // origin of the host header to the target URL! Please - // don't revert this without documenting it! - // - if (this.changeOrigin) { - outgoing.headers.host = this.target.host + ':' + this.target.port; - } - - // - // Open new HTTP request to internal resource with will act - // as a reverse proxy pass - // - reverseProxy = this.target.protocol.request(outgoing, function (response) { - // - // Process the `reverseProxy` `response` when it's received. - // - if (req.httpVersion === '1.0') { - if (req.headers.connection) { - response.headers.connection = req.headers.connection - } else { - response.headers.connection = 'close' - } - } else if (!response.headers.connection) { - if (req.headers.connection) { response.headers.connection = req.headers.connection } - else { - response.headers.connection = 'keep-alive' - } - } - - // Remove `Transfer-Encoding` header if client's protocol is HTTP/1.0 - // or if this is a DELETE request with no content-length header. - // See: https://github.com/nodejitsu/node-http-proxy/pull/373 - if (req.httpVersion === '1.0' || (req.method === 'DELETE' - && !req.headers['content-length'])) { - delete response.headers['transfer-encoding']; - } - - if ((response.statusCode === 301 || response.statusCode === 302) - && typeof response.headers.location !== 'undefined') { - location = url.parse(response.headers.location); - if (location.host === req.headers.host) { - if (self.source.https && !self.target.https) { - response.headers.location = response.headers.location.replace(/^http\:/, 'https:'); - } - if (self.target.https && !self.source.https) { - response.headers.location = response.headers.location.replace(/^https\:/, 'http:'); - } - } - } - - // - // When the `reverseProxy` `response` ends, end the - // corresponding outgoing `res` unless we have entered - // an error state. In which case, assume `res.end()` has - // already been called and the 'error' event listener - // removed. - // - var ended = false; - response.on('close', function () { - if (!ended) { response.emit('end') } - }); - - // - // After reading a chunked response, the underlying socket - // will hit EOF and emit a 'end' event, which will abort - // the request. If the socket was paused at that time, - // pending data gets discarded, truncating the response. - // This code makes sure that we flush pending data. - // - response.connection.on('end', function () { - if (response.readable && response.resume) { - response.resume(); - } - }); - - response.on('end', function () { - ended = true; - if (!errState) { - try { res.end() } - catch (ex) { console.error("res.end error: %s", ex.message) } - - // Emit the `end` event now that we have completed proxying - self.emit('end', req, res, response); - } - }); - - // Allow observer to modify headers or abort response - try { self.emit('proxyResponse', req, res, response) } - catch (ex) { - errState = true; - return; - } - - // Set the headers of the client response - Object.keys(response.headers).forEach(function (key) { - res.setHeader(key, response.headers[key]); - }); - res.writeHead(response.statusCode); - - function ondata(chunk) { - if (res.writable) { - // Only pause if the underlying buffers are full, - // *and* the connection is not in 'closing' state. - // Otherwise, the pause will cause pending data to - // be discarded and silently lost. - if (false === res.write(chunk) && response.pause - && response.connection.readable) { - response.pause(); - } - } - } - - response.on('data', ondata); - - function ondrain() { - if (response.readable && response.resume) { - response.resume(); - } - } - - res.on('drain', ondrain); - }); - - // - // Handle 'error' events from the `reverseProxy`. Setup timeout override if needed - // - reverseProxy.once('error', proxyError); - - // Set a timeout on the socket if `this.timeout` is specified. - reverseProxy.once('socket', function (socket) { - if (self.timeout) { - socket.setTimeout(self.timeout); - } - }); - - // - // Handle 'error' events from the `req` (e.g. `Parse Error`). - // - req.on('error', proxyError); - - // - // If `req` is aborted, we abort our `reverseProxy` request as well. - // - req.on('aborted', function () { - reverseProxy.abort(); - }); - - // - // For each data `chunk` received from the incoming - // `req` write it to the `reverseProxy` request. - // - req.on('data', function (chunk) { - if (!errState) { - var flushed = reverseProxy.write(chunk); - if (!flushed) { - req.pause(); - reverseProxy.once('drain', function () { - try { req.resume() } - catch (er) { console.error("req.resume error: %s", er.message) } - }); - - // - // Force the `drain` event in 100ms if it hasn't - // happened on its own. - // - setTimeout(function () { - reverseProxy.emit('drain'); - }, 100); - } - } - }); - - // - // When the incoming `req` ends, end the corresponding `reverseProxy` - // request unless we have entered an error state. - // - req.on('end', function () { - if (!errState) { - reverseProxy.end(); - } - }); - - //Aborts reverseProxy if client aborts the connection. - req.on('close', function () { - if (!errState) { - reverseProxy.abort(); - } - }); - - // - // If we have been passed buffered data, resume it. - // - if (buffer) { - return !errState - ? buffer.resume() - : buffer.destroy(); - } -}; - -// -// ### function proxyWebSocketRequest (req, socket, head, buffer) -// #### @req {ServerRequest} Websocket request to proxy. -// #### @socket {net.Socket} Socket for the underlying HTTP request -// #### @head {string} Headers for the Websocket request. -// #### @buffer {Object} Result from `httpProxy.buffer(req)` -// Performs a WebSocket proxy operation to the location specified by -// `this.target`. -// -HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, upgradeHead, buffer) { - var self = this, - outgoing = new(this.target.base), - listeners = {}, - errState = false, - CRLF = '\r\n', - //copy upgradeHead to avoid retention of large slab buffers used in node core - head = new Buffer(upgradeHead.length); - upgradeHead.copy(head); - - // - // WebSocket requests must have the `GET` method and - // the `upgrade:websocket` header - // - if (req.method !== 'GET' || req.headers.upgrade.toLowerCase() !== 'websocket') { - // - // This request is not WebSocket request - // - return socket.destroy(); - } - - // - // Add common proxy headers to the request so that they can - // be availible to the proxy target server. If the proxy is - // part of proxy chain it will append the address: - // - // * `x-forwarded-for`: IP Address of the original request - // * `x-forwarded-proto`: Protocol of the original request - // * `x-forwarded-port`: Port of the original request. - // - if (this.enable.xforward && req.connection) { - if (req.headers['x-forwarded-for']) { - var addressToAppend = "," + req.connection.remoteAddress || socket.remoteAddress; - req.headers['x-forwarded-for'] += addressToAppend; - } - else { - req.headers['x-forwarded-for'] = req.connection.remoteAddress || socket.remoteAddress; - } - - if (req.headers['x-forwarded-port']) { - var portToAppend = "," + req.connection.remotePort || socket.remotePort; - req.headers['x-forwarded-port'] += portToAppend; - } - else { - req.headers['x-forwarded-port'] = req.connection.remotePort || socket.remotePort; - } - - if (req.headers['x-forwarded-proto']) { - var protoToAppend = "," + (req.connection.pair ? 'wss' : 'ws'); - req.headers['x-forwarded-proto'] += protoToAppend; - } - else { - req.headers['x-forwarded-proto'] = req.connection.pair ? 'wss' : 'ws'; - } - } - - self.emit('websocket:start', req, socket, head, this.target); - - // - // Helper function for setting appropriate socket values: - // 1. Turn of all bufferings - // 2. For server set KeepAlive - // - function _socket(socket, keepAlive) { - socket.setTimeout(0); - socket.setNoDelay(true); - - if (keepAlive) { - if (socket.setKeepAlive) { - socket.setKeepAlive(true, 0); - } - else if (socket.pair.cleartext.socket.setKeepAlive) { - socket.pair.cleartext.socket.setKeepAlive(true, 0); - } - } - } - - // - // Setup the incoming client socket. - // - _socket(socket, true); - - // - // On `upgrade` from the Agent socket, listen to - // the appropriate events. - // - function onUpgrade (reverseProxy, proxySocket) { - if (!reverseProxy) { - proxySocket.end(); - socket.end(); - return; - } - - // - // Any incoming data on this WebSocket to the proxy target - // will be written to the `reverseProxy` socket. - // - proxySocket.on('data', listeners.onIncoming = function (data) { - if (reverseProxy.incoming.socket.writable) { - try { - self.emit('websocket:outgoing', req, socket, head, data); - var flushed = reverseProxy.incoming.socket.write(data); - if (!flushed) { - proxySocket.pause(); - reverseProxy.incoming.socket.once('drain', function () { - try { proxySocket.resume() } - catch (er) { console.error("proxySocket.resume error: %s", er.message) } - }); - - // - // Force the `drain` event in 100ms if it hasn't - // happened on its own. - // - setTimeout(function () { - reverseProxy.incoming.socket.emit('drain'); - }, 100); - } - } - catch (ex) { - detach(); - } - } - }); - - // - // Any outgoing data on this Websocket from the proxy target - // will be written to the `proxySocket` socket. - // - reverseProxy.incoming.socket.on('data', listeners.onOutgoing = function (data) { - try { - self.emit('websocket:incoming', reverseProxy, reverseProxy.incoming, head, data); - var flushed = proxySocket.write(data); - if (!flushed) { - reverseProxy.incoming.socket.pause(); - proxySocket.once('drain', function () { - try { reverseProxy.incoming.socket.resume() } - catch (er) { console.error("reverseProxy.incoming.socket.resume error: %s", er.message) } - }); - - // - // Force the `drain` event in 100ms if it hasn't - // happened on its own. - // - setTimeout(function () { - proxySocket.emit('drain'); - }, 100); - } - } - catch (ex) { - detach(); - } - }); - - // - // Helper function to detach all event listeners - // from `reverseProxy` and `proxySocket`. - // - function detach() { - proxySocket.destroySoon(); - proxySocket.removeListener('end', listeners.onIncomingClose); - proxySocket.removeListener('data', listeners.onIncoming); - reverseProxy.incoming.socket.destroySoon(); - reverseProxy.incoming.socket.removeListener('end', listeners.onOutgoingClose); - reverseProxy.incoming.socket.removeListener('data', listeners.onOutgoing); - } - - // - // If the incoming `proxySocket` socket closes, then - // detach all event listeners. - // - listeners.onIncomingClose = function () { - reverseProxy.incoming.socket.destroy(); - detach(); - - // Emit the `end` event now that we have completed proxying - self.emit('websocket:end', req, socket, head); - } - - // - // If the `reverseProxy` socket closes, then detach all - // event listeners. - // - listeners.onOutgoingClose = function () { - proxySocket.destroy(); - detach(); - } - - proxySocket.on('end', listeners.onIncomingClose); - proxySocket.on('close', listeners.onIncomingClose); - reverseProxy.incoming.socket.on('end', listeners.onOutgoingClose); - reverseProxy.incoming.socket.on('close', listeners.onOutgoingClose); - } - - function getPort (port) { - port = port || 80; - return port - 80 === 0 ? '' : ':' + port; - } - - // - // Get the protocol, and host for this request and create an instance - // of `http.Agent` or `https.Agent` from the pool managed by `node-http-proxy`. - // - var agent = this.target.agent, - protocolName = this.target.https ? 'https' : 'http', - portUri = getPort(this.source.port), - remoteHost = this.target.host + portUri; - - // - // Change headers (if requested). - // - if (this.changeOrigin) { - req.headers.host = remoteHost; - req.headers.origin = protocolName + '://' + remoteHost; - } - - // - // Make the outgoing WebSocket request - // - outgoing.host = this.target.host; - outgoing.port = this.target.port; - outgoing.agent = agent; - outgoing.method = 'GET'; - outgoing.path = req.url; - outgoing.headers = req.headers; - outgoing.agent = agent; - - var reverseProxy = this.target.protocol.request(outgoing); - - // - // On any errors from the `reverseProxy` emit the - // `webSocketProxyError` and close the appropriate - // connections. - // - function proxyError (err) { - reverseProxy.destroy(); - - process.nextTick(function () { - // - // Destroy the incoming socket in the next tick, in case the error handler - // wants to write to it. - // - socket.destroy(); - }); - - self.emit('webSocketProxyError', err, req, socket, head); - } - - // - // Here we set the incoming `req`, `socket` and `head` data to the outgoing - // request so that we can reuse this data later on in the closure scope - // available to the `upgrade` event. This bookkeeping is not tracked anywhere - // in nodejs core and is **very** specific to proxying WebSockets. - // - reverseProxy.incoming = { - request: req, - socket: socket, - head: head - }; - - // - // Here we set the handshake `headers` and `statusCode` data to the outgoing - // request so that we can reuse this data later. - // - reverseProxy.handshake = { - headers: {}, - statusCode: null, - } - - // - // If the agent for this particular `host` and `port` combination - // is not already listening for the `upgrade` event, then do so once. - // This will force us not to disconnect. - // - // In addition, it's important to note the closure scope here. Since - // there is no mapping of the socket to the request bound to it. - // - reverseProxy.on('upgrade', function (res, remoteSocket, head) { - // - // Prepare handshake response 'headers' and 'statusCode'. - // - reverseProxy.handshake = { - headers: res.headers, - statusCode: res.statusCode, - } - - // - // Prepare the socket for the reverseProxy request and begin to - // stream data between the two sockets. Here it is important to - // note that `remoteSocket._httpMessage === reverseProxy`. - // - _socket(remoteSocket, true); - onUpgrade(remoteSocket._httpMessage, remoteSocket); - }); - - // - // If the reverseProxy connection has an underlying socket, - // then execute the WebSocket handshake. - // - reverseProxy.once('socket', function (revSocket) { - revSocket.on('data', function handshake (data) { - // Set empty headers - var headers = ''; - - // - // If the handshake statusCode 101, concat headers. - // - if (reverseProxy.handshake.statusCode && reverseProxy.handshake.statusCode == 101) { - headers = [ - 'HTTP/1.1 101 Switching Protocols', - 'Upgrade: websocket', - 'Connection: Upgrade', - 'Sec-WebSocket-Accept: ' + reverseProxy.handshake.headers['sec-websocket-accept'] - ]; - - headers = headers.concat('', '').join('\r\n'); - } - - // - // Ok, kind of harmfull part of code. Socket.IO sends a hash - // at the end of handshake if protocol === 76, but we need - // to replace 'host' and 'origin' in response so we split - // data to printable data and to non-printable. (Non-printable - // will come after double-CRLF). - // - var sdata = data.toString(); - - // Get the Printable data - sdata = sdata.substr(0, sdata.search(CRLF + CRLF)); - - // Get the Non-Printable data - data = data.slice(Buffer.byteLength(sdata), data.length); - - if (self.source.https && !self.target.https) { - // - // If the proxy server is running HTTPS but the client is running - // HTTP then replace `ws` with `wss` in the data sent back to the client. - // - sdata = sdata.replace('ws:', 'wss:'); - } - - try { - // - // Write the printable and non-printable data to the socket - // from the original incoming request. - // - self.emit('websocket:handshake', req, socket, head, sdata, data); - // add headers to the socket - socket.write(headers + sdata); - var flushed = socket.write(data); - if (!flushed) { - revSocket.pause(); - socket.once('drain', function () { - try { revSocket.resume() } - catch (er) { console.error("reverseProxy.socket.resume error: %s", er.message) } - }); - - // - // Force the `drain` event in 100ms if it hasn't - // happened on its own. - // - setTimeout(function () { - socket.emit('drain'); - }, 100); - } - } - catch (ex) { - // - // Remove data listener on socket error because the - // 'handshake' has failed. - // - revSocket.removeListener('data', handshake); - return proxyError(ex); - } - - // - // Remove data listener now that the 'handshake' is complete - // - revSocket.removeListener('data', handshake); - }); - }); - - // - // Handle 'error' events from the `reverseProxy`. - // - reverseProxy.on('error', proxyError); - - // - // Handle 'error' events from the `req` (e.g. `Parse Error`). - // - req.on('error', proxyError); - - try { - // - // Attempt to write the upgrade-head to the reverseProxy - // request. This is small, and there's only ever one of - // it; no need for pause/resume. - // - // XXX This is very wrong and should be fixed in node's core - // - reverseProxy.write(head); - if (head && head.length === 0) { - reverseProxy._send(''); - } - } - catch (ex) { - return proxyError(ex); - } - - // - // If we have been passed buffered data, resume it. - // - if (buffer) { - return !errState - ? buffer.resume() - : buffer.destroy(); - } -}; - -// -// ### function close() -// Closes all sockets associated with the Agents -// belonging to this instance. -// -HttpProxy.prototype.close = function () { - [this.forward, this.target].forEach(function (proxy) { - if (proxy && proxy.agent) { - for (var host in proxy.agent.sockets) { - proxy.agent.sockets[host].forEach(function (socket) { - socket.end(); - }); - } - } - }); -}; - -// -// ### @private function _forwardRequest (req) -// #### @req {ServerRequest} Incoming HTTP Request to proxy. -// Forwards the specified `req` to the location specified -// by `this.forward` ignoring errors and the subsequent response. -// -HttpProxy.prototype._forwardRequest = function (req) { - var self = this, - outgoing = new(this.forward.base), - forwardProxy; - - // - // Setup outgoing proxy with relevant properties. - // - outgoing.host = this.forward.host; - outgoing.port = this.forward.port, - outgoing.agent = this.forward.agent; - outgoing.method = req.method; - outgoing.path = req.url; - outgoing.headers = req.headers; - - // - // Open new HTTP request to internal resource with will - // act as a reverse proxy pass. - // - forwardProxy = this.forward.protocol.request(outgoing, function (response) { - // - // Ignore the response from the forward proxy since this is a 'fire-and-forget' proxy. - // Remark (indexzero): We will eventually emit a 'forward' event here for performance tuning. - // - }); - - // - // Add a listener for the connection timeout event. - // - // Remark: Ignoring this error in the event - // forward target doesn't exist. - // - forwardProxy.once('error', function (err) { }); - - // - // Chunk the client request body as chunks from - // the proxied request come in - // - req.on('data', function (chunk) { - var flushed = forwardProxy.write(chunk); - if (!flushed) { - req.pause(); - forwardProxy.once('drain', function () { - try { req.resume() } - catch (er) { console.error("req.resume error: %s", er.message) } - }); - - // - // Force the `drain` event in 100ms if it hasn't - // happened on its own. - // - setTimeout(function () { - forwardProxy.emit('drain'); - }, 100); - } - }); - - // - // At the end of the client request, we are going to - // stop the proxied request - // - req.on('end', function () { - forwardProxy.end(); - }); -}; - -function getProto(req) { - return req.isSpdy ? 'https' : (req.connection.pair ? 'https' : 'http'); -} diff --git a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/proxy-table.js b/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/proxy-table.js deleted file mode 100644 index 320396fe..00000000 --- a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/proxy-table.js +++ /dev/null @@ -1,282 +0,0 @@ -/* - node-http-proxy.js: Lookup table for proxy targets in node.js - - Copyright (c) 2010 Charlie Robbins - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var util = require('util'), - events = require('events'), - fs = require('fs'), - url = require('url'); - -// -// ### function ProxyTable (router, silent) -// #### @router {Object} Object containing the host based routes -// #### @silent {Boolean} Value indicating whether we should suppress logs -// #### @hostnameOnly {Boolean} Value indicating if we should route based on __hostname string only__ -// #### @pathnameOnly {Boolean} Value indicating if we should route based on only the pathname. __This causes hostnames to be ignored.__. Using this along with hostnameOnly wont work at all. -// Constructor function for the ProxyTable responsible for getting -// locations of proxy targets based on ServerRequest headers; specifically -// the HTTP host header. -// -var ProxyTable = exports.ProxyTable = function (options) { - events.EventEmitter.call(this); - - this.silent = options.silent || options.silent !== true; - this.target = options.target || {}; - this.pathnameOnly = options.pathnameOnly === true; - this.hostnameOnly = options.hostnameOnly === true; - - if (typeof options.router === 'object') { - // - // If we are passed an object literal setup - // the routes with RegExps from the router - // - this.setRoutes(options.router); - } - else if (typeof options.router === 'string') { - // - // If we are passed a string then assume it is a - // file path, parse that file and watch it for changes - // - var self = this; - this.routeFile = options.router; - this.setRoutes(JSON.parse(fs.readFileSync(options.router)).router); - - fs.watchFile(this.routeFile, function () { - fs.readFile(self.routeFile, function (err, data) { - if (err) { - self.emit('error', err); - } - - self.setRoutes(JSON.parse(data).router); - self.emit('routes', self.hostnameOnly === false ? self.routes : self.router); - }); - }); - } - else { - throw new Error('Cannot parse router with unknown type: ' + typeof router); - } -}; - -// -// Inherit from `events.EventEmitter` -// -util.inherits(ProxyTable, events.EventEmitter); - -// -// ### function addRoute (route, target) -// #### @route {String} String containing route coming in -// #### @target {String} String containing the target -// Adds a host-based route to this instance. -// -ProxyTable.prototype.addRoute = function (route, target) { - if (!this.router) { - throw new Error('Cannot update ProxyTable routes without router.'); - } - - this.router[route] = target; - this.setRoutes(this.router); -}; - -// -// ### function removeRoute (route) -// #### @route {String} String containing route to remove -// Removes a host-based route from this instance. -// -ProxyTable.prototype.removeRoute = function (route) { - if (!this.router) { - throw new Error('Cannot update ProxyTable routes without router.'); - } - - delete this.router[route]; - this.setRoutes(this.router); -}; - -// -// ### function setRoutes (router) -// #### @router {Object} Object containing the host based routes -// Sets the host-based routes to be used by this instance. -// -ProxyTable.prototype.setRoutes = function (router) { - if (!router) { - throw new Error('Cannot update ProxyTable routes without router.'); - } - - var self = this; - this.router = router; - - if (this.hostnameOnly === false) { - this.routes = []; - - Object.keys(router).forEach(function (path) { - if (!/http[s]?/.test(router[path])) { - router[path] = (self.target.https ? 'https://' : 'http://') - + router[path]; - } - - var target = url.parse(router[path]), - defaultPort = self.target.https ? 443 : 80; - - // - // Setup a robust lookup table for the route: - // - // { - // source: { - // regexp: /^foo.com/i, - // sref: 'foo.com', - // url: { - // protocol: 'http:', - // slashes: true, - // host: 'foo.com', - // hostname: 'foo.com', - // href: 'http://foo.com/', - // pathname: '/', - // path: '/' - // } - // }, - // { - // target: { - // sref: '127.0.0.1:8000/', - // url: { - // protocol: 'http:', - // slashes: true, - // host: '127.0.0.1:8000', - // hostname: '127.0.0.1', - // href: 'http://127.0.0.1:8000/', - // pathname: '/', - // path: '/' - // } - // }, - // - self.routes.push({ - source: { - regexp: new RegExp('^' + path, 'i'), - sref: path, - url: url.parse('http://' + path) - }, - target: { - sref: target.hostname + ':' + (target.port || defaultPort) + target.path, - url: target - } - }); - }); - } -}; - -// -// ### function getProxyLocation (req) -// #### @req {ServerRequest} The incoming server request to get proxy information about. -// Returns the proxy location based on the HTTP Headers in the ServerRequest `req` -// available to this instance. -// -ProxyTable.prototype.getProxyLocation = function (req) { - if (!req || !req.headers || !req.headers.host) { - return null; - } - - var targetHost = req.headers.host.split(':')[0]; - if (this.hostnameOnly === true) { - var target = targetHost; - if (this.router.hasOwnProperty(target)) { - var location = this.router[target].split(':'), - host = location[0], - port = location.length === 1 ? 80 : location[1]; - - return { - port: port, - host: host - }; - } - } - else if (this.pathnameOnly === true) { - var target = req.url; - for (var i in this.routes) { - var route = this.routes[i]; - // - // If we are matching pathname only, we remove the matched pattern. - // - // IE /wiki/heartbeat - // is redirected to - // /heartbeat - // - // for the route "/wiki" : "127.0.0.1:8020" - // - if (target.match(route.source.regexp)) { - req.url = url.format(target.replace(route.source.regexp, '')); - return { - protocol: route.target.url.protocol.replace(':', ''), - host: route.target.url.hostname, - port: route.target.url.port - || (this.target.https ? 443 : 80) - }; - } - } - - } - else { - var target = targetHost + req.url; - for (var i in this.routes) { - var route = this.routes[i]; - if (target.match(route.source.regexp)) { - // - // Attempt to perform any path replacement for differences - // between the source path and the target path. This replaces the - // path's part of the URL to the target's part of the URL. - // - // 1. Parse the request URL - // 2. Replace any portions of the source path with the target path - // 3. Set the request URL to the formatted URL with replacements. - // - var parsed = url.parse(req.url); - - parsed.pathname = parsed.pathname.replace( - route.source.url.pathname, - route.target.url.pathname - ); - - req.url = url.format(parsed); - - return { - protocol: route.target.url.protocol.replace(':', ''), - host: route.target.url.hostname, - port: route.target.url.port - || (this.target.https ? 443 : 80) - }; - } - } - } - - return null; -}; - -// -// ### close function () -// Cleans up the event listeneners maintained -// by this instance. -// -ProxyTable.prototype.close = function () { - if (typeof this.routeFile === 'string') { - fs.unwatchFile(this.routeFile); - } -}; diff --git a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/routing-proxy.js b/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/routing-proxy.js deleted file mode 100644 index b294fb15..00000000 --- a/node_modules/karma/node_modules/http-proxy/lib/node-http-proxy/routing-proxy.js +++ /dev/null @@ -1,322 +0,0 @@ -/* - * routing-proxy.js: A routing proxy consuming a RoutingTable and multiple HttpProxy instances - * - * (C) 2011 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var events = require('events'), - utile = require('utile'), - HttpProxy = require('./http-proxy').HttpProxy, - ProxyTable = require('./proxy-table').ProxyTable; - -// -// ### function RoutingProxy (options) -// #### @options {Object} Options for this instance -// Constructor function for the RoutingProxy object, a higher level -// reverse proxy Object which can proxy to multiple hosts and also interface -// easily with a RoutingTable instance. -// -var RoutingProxy = exports.RoutingProxy = function (options) { - events.EventEmitter.call(this); - - var self = this; - options = options || {}; - - if (options.router) { - this.proxyTable = new ProxyTable(options); - this.proxyTable.on('routes', function (routes) { - self.emit('routes', routes); - }); - } - - // - // Create a set of `HttpProxy` objects to be used later on calls - // to `.proxyRequest()` and `.proxyWebSocketRequest()`. - // - this.proxies = {}; - - // - // Setup default target options (such as `https`). - // - this.target = {}; - this.target.https = options.target && options.target.https; - this.target.maxSockets = options.target && options.target.maxSockets; - - // - // Setup other default options to be used for instances of - // `HttpProxy` created by this `RoutingProxy` instance. - // - this.source = options.source || { host: 'localhost', port: 8000 }; - this.https = this.source.https || options.https; - this.enable = options.enable; - this.forward = options.forward; - this.changeOrigin = options.changeOrigin || false; - - // - // Listen for 'newListener' events so that we can bind 'proxyError' - // listeners to each HttpProxy's 'proxyError' event. - // - this.on('newListener', function (evt) { - if (evt === 'proxyError' || evt === 'webSocketProxyError') { - Object.keys(self.proxies).forEach(function (key) { - self.proxies[key].on(evt, self.emit.bind(self, evt)); - }); - } - }); -}; - - -// -// Inherit from `events.EventEmitter`. -// -utile.inherits(RoutingProxy, events.EventEmitter); - -// -// ### function add (options) -// #### @options {Object} Options for the `HttpProxy` to add. -// Adds a new instance of `HttpProxy` to this `RoutingProxy` instance -// for the specified `options.host` and `options.port`. -// -RoutingProxy.prototype.add = function (options) { - var self = this, - key = this._getKey(options); - - // - // TODO: Consume properties in `options` related to the `ProxyTable`. - // - options.target = options.target || {}; - options.target.host = options.target.host || options.host; - options.target.port = options.target.port || options.port; - options.target.socketPath = options.target.socketPath || options.socketPath; - options.target.https = this.target && this.target.https || - options.target && options.target.https; - options.target.maxSockets = this.target && this.target.maxSockets; - - // - // Setup options to pass-thru to the new `HttpProxy` instance - // for the specified `options.host` and `options.port` pair. - // - ['https', 'enable', 'forward', 'changeOrigin'].forEach(function (key) { - if (options[key] !== false && self[key]) { - options[key] = self[key]; - } - }); - - this.proxies[key] = new HttpProxy(options); - - if (this.listeners('proxyError').length > 0) { - this.proxies[key].on('proxyError', this.emit.bind(this, 'proxyError')); - } - - if (this.listeners('webSocketProxyError').length > 0) { - this.proxies[key].on('webSocketProxyError', this.emit.bind(this, 'webSocketProxyError')); - } - - [ - 'start', - 'forward', - 'end', - 'proxyResponse', - 'websocket:start', - 'websocket:end', - 'websocket:incoming', - 'websocket:outgoing' - ].forEach(function (event) { - this.proxies[key].on(event, this.emit.bind(this, event)); - }, this); -}; - -// -// ### function remove (options) -// #### @options {Object} Options mapping to the `HttpProxy` to remove. -// Removes an instance of `HttpProxy` from this `RoutingProxy` instance -// for the specified `options.host` and `options.port` (if they exist). -// -RoutingProxy.prototype.remove = function (options) { - var key = this._getKey(options), - proxy = this.proxies[key]; - - delete this.proxies[key]; - return proxy; -}; - -// -// ### function close() -// Cleans up any state left behind (sockets, timeouts, etc) -// associated with this instance. -// -RoutingProxy.prototype.close = function () { - var self = this; - - if (this.proxyTable) { - // - // Close the `RoutingTable` associated with - // this instance (if any). - // - this.proxyTable.close(); - } - - // - // Close all sockets for all `HttpProxy` object(s) - // associated with this instance. - // - Object.keys(this.proxies).forEach(function (key) { - self.proxies[key].close(); - }); -}; - -// -// ### function proxyRequest (req, res, [port, host, paused]) -// #### @req {ServerRequest} Incoming HTTP Request to proxy. -// #### @res {ServerResponse} Outgoing HTTP Request to write proxied data to. -// #### @options {Object} Options for the outgoing proxy request. -// -// options.port {number} Port to use on the proxy target host. -// options.host {string} Host of the proxy target. -// options.buffer {Object} Result from `httpProxy.buffer(req)` -// options.https {Object|boolean} Settings for https. -// -RoutingProxy.prototype.proxyRequest = function (req, res, options) { - options = options || {}; - - var location; - - // - // Check the proxy table for this instance to see if we need - // to get the proxy location for the request supplied. We will - // always ignore the proxyTable if an explicit `port` and `host` - // arguments are supplied to `proxyRequest`. - // - if (this.proxyTable && !options.host) { - location = this.proxyTable.getProxyLocation(req); - - // - // If no location is returned from the ProxyTable instance - // then respond with `404` since we do not have a valid proxy target. - // - if (!location) { - try { - if (!this.emit('notFound', req, res)) { - res.writeHead(404); - res.end(); - } - } - catch (er) { - console.error("res.writeHead/res.end error: %s", er.message); - } - - return; - } - - // - // When using the ProxyTable in conjunction with an HttpProxy instance - // only the following arguments are valid: - // - // * `proxy.proxyRequest(req, res, { host: 'localhost' })`: This will be skipped - // * `proxy.proxyRequest(req, res, { buffer: buffer })`: Buffer will get updated appropriately - // * `proxy.proxyRequest(req, res)`: Options will be assigned appropriately. - // - options.port = location.port; - options.host = location.host; - } - - var key = this._getKey(options), - proxy; - - if ((this.target && this.target.https) - || (location && location.protocol === 'https')) { - options.target = options.target || {}; - options.target.https = true; - } - - if (!this.proxies[key]) { - this.add(utile.clone(options)); - } - - proxy = this.proxies[key]; - proxy.proxyRequest(req, res, options.buffer); -}; - -// -// ### function proxyWebSocketRequest (req, socket, head, options) -// #### @req {ServerRequest} Websocket request to proxy. -// #### @socket {net.Socket} Socket for the underlying HTTP request -// #### @head {string} Headers for the Websocket request. -// #### @options {Object} Options to use when proxying this request. -// -// options.port {number} Port to use on the proxy target host. -// options.host {string} Host of the proxy target. -// options.buffer {Object} Result from `httpProxy.buffer(req)` -// options.https {Object|boolean} Settings for https. -// -RoutingProxy.prototype.proxyWebSocketRequest = function (req, socket, head, options) { - options = options || {}; - - var location, - proxy, - key; - - if (this.proxyTable && !options.host) { - location = this.proxyTable.getProxyLocation(req); - - if (!location) { - return socket.destroy(); - } - - options.port = location.port; - options.host = location.host; - } - - key = this._getKey(options); - - if (!this.proxies[key]) { - this.add(utile.clone(options)); - } - - proxy = this.proxies[key]; - proxy.proxyWebSocketRequest(req, socket, head, options.buffer); -}; - -// -// ### function addHost (host, target) -// #### @host {String} Host to add to proxyTable -// #### @target {String} Target to add to proxyTable -// Adds a host to proxyTable -// -RoutingProxy.prototype.addHost = function (host, target) { - if (this.proxyTable) { - this.proxyTable.addRoute(host, target); - } -}; - -// -// ### function removeHost (host) -// #### @host {String} Host to remove from proxyTable -// Removes a host to proxyTable -// -RoutingProxy.prototype.removeHost = function (host) { - if (this.proxyTable) { - this.proxyTable.removeRoute(host); - } -}; - -// -// ### @private function _getKey (options) -// #### @options {Object} Options to extract the key from -// Ensures that the appropriate options are present in the `options` -// provided and responds with a string key representing the `host`, `port` -// combination contained within. -// -RoutingProxy.prototype._getKey = function (options) { - if (!options || ((!options.host || !options.port) - && (!options.target || !options.target.host || !options.target.port))) { - throw new Error('options.host and options.port or options.target are required.'); - } - - return [ - options.host || options.target.host, - options.port || options.target.port - ].join(':'); -}; diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/.npmignore b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/README.md b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/README.md deleted file mode 100644 index 07ba942c..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/README.md +++ /dev/null @@ -1,85 +0,0 @@ -# node-pkginfo - -An easy way to expose properties on a module from a package.json - -## Installation - -### Installing npm (node package manager) -``` - curl http://npmjs.org/install.sh | sh -``` - -### Installing pkginfo -``` - [sudo] npm install pkginfo -``` - -## Motivation -How often when writing node.js modules have you written the following line(s) of code? - -* Hard code your version string into your code - -``` js - exports.version = '0.1.0'; -``` - -* Programmatically expose the version from the package.json - -``` js - exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version; -``` - -In other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!** - -## Usage - -Using `pkginfo` is idiot-proof, just require and invoke it. - -``` js - var pkginfo = require('pkginfo')(module); - - console.dir(module.exports); -``` - -By invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). - -Here's a sample of the output: - -``` - { name: 'simple-app', - description: 'A test fixture for pkginfo', - version: '0.1.0', - author: 'Charlie Robbins ', - keywords: [ 'test', 'fixture' ], - main: './index.js', - scripts: { test: 'vows test/*-test.js --spec' }, - engines: { node: '>= 0.4.0' } } -``` - -### Expose specific properties -If you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function: - -``` js - var pkginfo = require('pkginfo')(module, 'version', 'author'); - - console.dir(module.exports); -``` - -``` - { version: '0.1.0', - author: 'Charlie Robbins ' } -``` - -If you're looking for further usage see the [examples][0] included in this repository. - -## Run Tests -Tests are written in [vows][1] and give complete coverage of all APIs. - -``` - vows test/*-test.js --spec -``` - -[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples -[1]: http://vowsjs.org - -#### Author: [Charlie Robbins](http://nodejitsu.com) \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/docs/docco.css b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/docs/docco.css deleted file mode 100644 index bd541343..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/docs/docco.css +++ /dev/null @@ -1,194 +0,0 @@ -/*--------------------- Layout and Typography ----------------------------*/ -body { - font-family: 'Palatino Linotype', 'Book Antiqua', Palatino, FreeSerif, serif; - font-size: 15px; - line-height: 22px; - color: #252519; - margin: 0; padding: 0; -} -a { - color: #261a3b; -} - a:visited { - color: #261a3b; - } -p { - margin: 0 0 15px 0; -} -h4, h5, h6 { - color: #333; - margin: 6px 0 6px 0; - font-size: 13px; -} - h2, h3 { - margin-bottom: 0; - color: #000; - } - h1 { - margin-top: 40px; - margin-bottom: 15px; - color: #000; - } -#container { - position: relative; -} -#background { - position: fixed; - top: 0; left: 525px; right: 0; bottom: 0; - background: #f5f5ff; - border-left: 1px solid #e5e5ee; - z-index: -1; -} -#jump_to, #jump_page { - background: white; - -webkit-box-shadow: 0 0 25px #777; -moz-box-shadow: 0 0 25px #777; - -webkit-border-bottom-left-radius: 5px; -moz-border-radius-bottomleft: 5px; - font: 10px Arial; - text-transform: uppercase; - cursor: pointer; - text-align: right; -} -#jump_to, #jump_wrapper { - position: fixed; - right: 0; top: 0; - padding: 5px 10px; -} - #jump_wrapper { - padding: 0; - display: none; - } - #jump_to:hover #jump_wrapper { - display: block; - } - #jump_page { - padding: 5px 0 3px; - margin: 0 0 25px 25px; - } - #jump_page .source { - display: block; - padding: 5px 10px; - text-decoration: none; - border-top: 1px solid #eee; - } - #jump_page .source:hover { - background: #f5f5ff; - } - #jump_page .source:first-child { - } -table td { - border: 0; - outline: 0; -} - td.docs, th.docs { - max-width: 450px; - min-width: 450px; - min-height: 5px; - padding: 10px 25px 1px 50px; - overflow-x: hidden; - vertical-align: top; - text-align: left; - } - .docs pre { - margin: 15px 0 15px; - padding-left: 15px; - } - .docs p tt, .docs p code { - background: #f8f8ff; - border: 1px solid #dedede; - font-size: 12px; - padding: 0 0.2em; - } - .pilwrap { - position: relative; - } - .pilcrow { - font: 12px Arial; - text-decoration: none; - color: #454545; - position: absolute; - top: 3px; left: -20px; - padding: 1px 2px; - opacity: 0; - -webkit-transition: opacity 0.2s linear; - } - td.docs:hover .pilcrow { - opacity: 1; - } - td.code, th.code { - padding: 14px 15px 16px 25px; - width: 100%; - vertical-align: top; - background: #f5f5ff; - border-left: 1px solid #e5e5ee; - } - pre, tt, code { - font-size: 12px; line-height: 18px; - font-family: Menlo, Monaco, Consolas, "Lucida Console", monospace; - margin: 0; padding: 0; - } - - -/*---------------------- Syntax Highlighting -----------------------------*/ -td.linenos { background-color: #f0f0f0; padding-right: 10px; } -span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } -body .hll { background-color: #ffffcc } -body .c { color: #408080; font-style: italic } /* Comment */ -body .err { border: 1px solid #FF0000 } /* Error */ -body .k { color: #954121 } /* Keyword */ -body .o { color: #666666 } /* Operator */ -body .cm { color: #408080; font-style: italic } /* Comment.Multiline */ -body .cp { color: #BC7A00 } /* Comment.Preproc */ -body .c1 { color: #408080; font-style: italic } /* Comment.Single */ -body .cs { color: #408080; font-style: italic } /* Comment.Special */ -body .gd { color: #A00000 } /* Generic.Deleted */ -body .ge { font-style: italic } /* Generic.Emph */ -body .gr { color: #FF0000 } /* Generic.Error */ -body .gh { color: #000080; font-weight: bold } /* Generic.Heading */ -body .gi { color: #00A000 } /* Generic.Inserted */ -body .go { color: #808080 } /* Generic.Output */ -body .gp { color: #000080; font-weight: bold } /* Generic.Prompt */ -body .gs { font-weight: bold } /* Generic.Strong */ -body .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ -body .gt { color: #0040D0 } /* Generic.Traceback */ -body .kc { color: #954121 } /* Keyword.Constant */ -body .kd { color: #954121; font-weight: bold } /* Keyword.Declaration */ -body .kn { color: #954121; font-weight: bold } /* Keyword.Namespace */ -body .kp { color: #954121 } /* Keyword.Pseudo */ -body .kr { color: #954121; font-weight: bold } /* Keyword.Reserved */ -body .kt { color: #B00040 } /* Keyword.Type */ -body .m { color: #666666 } /* Literal.Number */ -body .s { color: #219161 } /* Literal.String */ -body .na { color: #7D9029 } /* Name.Attribute */ -body .nb { color: #954121 } /* Name.Builtin */ -body .nc { color: #0000FF; font-weight: bold } /* Name.Class */ -body .no { color: #880000 } /* Name.Constant */ -body .nd { color: #AA22FF } /* Name.Decorator */ -body .ni { color: #999999; font-weight: bold } /* Name.Entity */ -body .ne { color: #D2413A; font-weight: bold } /* Name.Exception */ -body .nf { color: #0000FF } /* Name.Function */ -body .nl { color: #A0A000 } /* Name.Label */ -body .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */ -body .nt { color: #954121; font-weight: bold } /* Name.Tag */ -body .nv { color: #19469D } /* Name.Variable */ -body .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */ -body .w { color: #bbbbbb } /* Text.Whitespace */ -body .mf { color: #666666 } /* Literal.Number.Float */ -body .mh { color: #666666 } /* Literal.Number.Hex */ -body .mi { color: #666666 } /* Literal.Number.Integer */ -body .mo { color: #666666 } /* Literal.Number.Oct */ -body .sb { color: #219161 } /* Literal.String.Backtick */ -body .sc { color: #219161 } /* Literal.String.Char */ -body .sd { color: #219161; font-style: italic } /* Literal.String.Doc */ -body .s2 { color: #219161 } /* Literal.String.Double */ -body .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */ -body .sh { color: #219161 } /* Literal.String.Heredoc */ -body .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */ -body .sx { color: #954121 } /* Literal.String.Other */ -body .sr { color: #BB6688 } /* Literal.String.Regex */ -body .s1 { color: #219161 } /* Literal.String.Single */ -body .ss { color: #19469D } /* Literal.String.Symbol */ -body .bp { color: #954121 } /* Name.Builtin.Pseudo */ -body .vc { color: #19469D } /* Name.Variable.Class */ -body .vg { color: #19469D } /* Name.Variable.Global */ -body .vi { color: #19469D } /* Name.Variable.Instance */ -body .il { color: #666666 } /* Literal.Number.Integer.Long */ \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/docs/pkginfo.html b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/docs/pkginfo.html deleted file mode 100644 index bf615fa9..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/docs/pkginfo.html +++ /dev/null @@ -1,101 +0,0 @@ - pkginfo.js

    pkginfo.js

    /*
    - * pkginfo.js: Top-level include for the pkginfo module
    - *
    - * (C) 2011, Charlie Robbins
    - *
    - */
    - 
    -var fs = require('fs'),
    -    path = require('path');

    function pkginfo ([options, 'property', 'property' ..])

    - -

    @pmodule {Module} Parent module to read from.

    - -

    @options {Object|Array|string} Optional Options used when exposing properties.

    - -

    @arguments {string...} Optional Specified properties to expose.

    - -

    Exposes properties from the package.json file for the parent module on -it's exports. Valid usage:

    - -

    require('pkginfo')()

    - -

    require('pkginfo')('version', 'author');

    - -

    require('pkginfo')(['version', 'author']);

    - -

    require('pkginfo')({ include: ['version', 'author'] });

    var pkginfo = module.exports = function (pmodule, options) {
    -  var args = [].slice.call(arguments, 2).filter(function (arg) {
    -    return typeof arg === 'string';
    -  });
    -  

    Parse variable arguments

      if (Array.isArray(options)) {

    If the options passed in is an Array assume that -it is the Array of properties to expose from the -on the package.json file on the parent module.

        options = { include: options };
    -  }
    -  else if (typeof options === 'string') {

    Otherwise if the first argument is a string, then -assume that it is the first property to expose from -the package.json file on the parent module.

        options = { include: [options] };
    -  }
    -  

    Setup default options

      options = options || { include: [] };
    -  
    -  if (args.length > 0) {

    If additional string arguments have been passed in -then add them to the properties to expose on the -parent module.

        options.include = options.include.concat(args);
    -  }
    -  
    -  var pkg = pkginfo.read(pmodule, options.dir).package;
    -  Object.keys(pkg).forEach(function (key) {
    -    if (options.include.length > 0 && !~options.include.indexOf(key)) {
    -      return;
    -    }
    -    
    -    if (!pmodule.exports[key]) {
    -      pmodule.exports[key] = pkg[key];
    -    }
    -  });
    -  
    -  return pkginfo;
    -};

    function find (dir)

    - -

    @pmodule {Module} Parent module to read from.

    - -

    @dir {string} Optional Directory to start search from.

    - -

    Searches up the directory tree from dir until it finds a directory -which contains a package.json file.

    pkginfo.find = function (pmodule, dir) {
    -  dir = dir || pmodule.filename;
    -  dir = path.dirname(dir); 
    -  
    -  var files = fs.readdirSync(dir);
    -  
    -  if (~files.indexOf('package.json')) {
    -    return path.join(dir, 'package.json');
    -  }
    -  
    -  if (dir === '/') {
    -    throw new Error('Could not find package.json up from: ' + dir);
    -  }
    -  
    -  return pkginfo.find(dir);
    -};

    function read (pmodule, dir)

    - -

    @pmodule {Module} Parent module to read from.

    - -

    @dir {string} Optional Directory to start search from.

    - -

    Searches up the directory tree from dir until it finds a directory -which contains a package.json file and returns the package information.

    pkginfo.read = function (pmodule, dir) { 
    -  dir = pkginfo.find(pmodule, dir);
    -  
    -  var data = fs.readFileSync(dir).toString();
    -      
    -  return {
    -    dir: dir, 
    -    package: JSON.parse(data)
    -  };
    -};

    Call pkginfo on this module and expose version.

    pkginfo(module, {
    -  dir: __dirname,
    -  include: ['version'],
    -  target: pkginfo
    -});
    -
    -
    \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/all-properties.js b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/all-properties.js deleted file mode 100644 index fd1d831a..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/all-properties.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * all-properties.js: Sample of including all properties from a package.json file - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/array-argument.js b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/array-argument.js deleted file mode 100644 index b1b68487..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/array-argument.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * array-argument.js: Sample of including specific properties from a package.json file - * using Array argument syntax. - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, ['version', 'author']); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/multiple-properties.js b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/multiple-properties.js deleted file mode 100644 index b4b5fd61..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/multiple-properties.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * multiple-properties.js: Sample of including multiple properties from a package.json file - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, 'version', 'author'); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/object-argument.js b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/object-argument.js deleted file mode 100644 index 28420c85..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/object-argument.js +++ /dev/null @@ -1,22 +0,0 @@ -/* - * object-argument.js: Sample of including specific properties from a package.json file - * using Object argument syntax. - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, { - include: ['version', 'author'] - }); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/package.json deleted file mode 100644 index 1f2f01c1..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "simple-app", - "description": "A test fixture for pkginfo", - "version": "0.1.0", - "author": "Charlie Robbins ", - "keywords": ["test", "fixture"], - "main": "./index.js", - "scripts": { "test": "vows test/*-test.js --spec" }, - "engines": { "node": ">= 0.4.0" } -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/single-property.js b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/single-property.js deleted file mode 100644 index 4f445614..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/examples/single-property.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * single-property.js: Sample of including a single specific properties from a package.json file - * - * (C) 2011, Charlie Robbins - * - */ - -var util = require('util'), - pkginfo = require('../lib/pkginfo')(module, 'version'); - -exports.someFunction = function () { - console.log('some of your custom logic here'); -}; - -console.log('Inspecting module:'); -console.dir(module.exports); - -console.log('\nAll exports exposed:'); -console.error(Object.keys(module.exports)); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/lib/pkginfo.js b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/lib/pkginfo.js deleted file mode 100644 index a4a62272..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/lib/pkginfo.js +++ /dev/null @@ -1,132 +0,0 @@ -/* - * pkginfo.js: Top-level include for the pkginfo module - * - * (C) 2011, Charlie Robbins - * - */ - -var fs = require('fs'), - path = require('path'); - -// -// ### function pkginfo ([options, 'property', 'property' ..]) -// #### @pmodule {Module} Parent module to read from. -// #### @options {Object|Array|string} **Optional** Options used when exposing properties. -// #### @arguments {string...} **Optional** Specified properties to expose. -// Exposes properties from the package.json file for the parent module on -// it's exports. Valid usage: -// -// `require('pkginfo')()` -// -// `require('pkginfo')('version', 'author');` -// -// `require('pkginfo')(['version', 'author']);` -// -// `require('pkginfo')({ include: ['version', 'author'] });` -// -var pkginfo = module.exports = function (pmodule, options) { - var args = [].slice.call(arguments, 2).filter(function (arg) { - return typeof arg === 'string'; - }); - - // - // **Parse variable arguments** - // - if (Array.isArray(options)) { - // - // If the options passed in is an Array assume that - // it is the Array of properties to expose from the - // on the package.json file on the parent module. - // - options = { include: options }; - } - else if (typeof options === 'string') { - // - // Otherwise if the first argument is a string, then - // assume that it is the first property to expose from - // the package.json file on the parent module. - // - options = { include: [options] }; - } - - // - // **Setup default options** - // - options = options || { include: [] }; - - if (args.length > 0) { - // - // If additional string arguments have been passed in - // then add them to the properties to expose on the - // parent module. - // - options.include = options.include.concat(args); - } - - var pkg = pkginfo.read(pmodule, options.dir).package; - Object.keys(pkg).forEach(function (key) { - if (options.include.length > 0 && !~options.include.indexOf(key)) { - return; - } - - if (!pmodule.exports[key]) { - pmodule.exports[key] = pkg[key]; - } - }); - - return pkginfo; -}; - -// -// ### function find (dir) -// #### @pmodule {Module} Parent module to read from. -// #### @dir {string} **Optional** Directory to start search from. -// Searches up the directory tree from `dir` until it finds a directory -// which contains a `package.json` file. -// -pkginfo.find = function (pmodule, dir) { - dir = dir || pmodule.filename; - dir = path.dirname(dir); - - var files = fs.readdirSync(dir); - - if (~files.indexOf('package.json')) { - return path.join(dir, 'package.json'); - } - - if (dir === '/') { - throw new Error('Could not find package.json up from: ' + dir); - } - else if (!dir || dir === '.') { - throw new Error('Cannot find package.json from unspecified directory'); - } - - return pkginfo.find(pmodule, dir); -}; - -// -// ### function read (pmodule, dir) -// #### @pmodule {Module} Parent module to read from. -// #### @dir {string} **Optional** Directory to start search from. -// Searches up the directory tree from `dir` until it finds a directory -// which contains a `package.json` file and returns the package information. -// -pkginfo.read = function (pmodule, dir) { - dir = pkginfo.find(pmodule, dir); - - var data = fs.readFileSync(dir).toString(); - - return { - dir: dir, - package: JSON.parse(data) - }; -}; - -// -// Call `pkginfo` on this module and expose version. -// -pkginfo(module, { - dir: __dirname, - include: ['version'], - target: pkginfo -}); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/package.json deleted file mode 100644 index 7489ac2b..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "pkginfo", - "version": "0.2.3", - "description": "An easy way to expose properties on a module from a package.json", - "author": { - "name": "Charlie Robbins", - "email": "charlie.robbins@gmail.com" - }, - "repository": { - "type": "git", - "url": "http://github.com/indexzero/node-pkginfo.git" - }, - "keywords": [ - "info", - "tools", - "package.json" - ], - "devDependencies": { - "vows": "0.6.x" - }, - "main": "./lib/pkginfo", - "scripts": { - "test": "vows test/*-test.js --spec" - }, - "engines": { - "node": ">= 0.4.0" - }, - "readme": "# node-pkginfo\n\nAn easy way to expose properties on a module from a package.json\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing pkginfo\n```\n [sudo] npm install pkginfo\n```\n\n## Motivation\nHow often when writing node.js modules have you written the following line(s) of code? \n\n* Hard code your version string into your code\n\n``` js\n exports.version = '0.1.0';\n```\n\n* Programmatically expose the version from the package.json\n\n``` js\n exports.version = JSON.parse(fs.readFileSync('/path/to/package.json', 'utf8')).version;\n```\n\nIn other words, how often have you wanted to expose basic information from your package.json onto your module programmatically? **WELL NOW YOU CAN!**\n\n## Usage\n\nUsing `pkginfo` is idiot-proof, just require and invoke it. \n\n``` js\n var pkginfo = require('pkginfo')(module);\n \n console.dir(module.exports);\n```\n\nBy invoking the `pkginfo` module all of the properties in your `package.json` file will be automatically exposed on the callee module (i.e. the parent module of `pkginfo`). \n\nHere's a sample of the output:\n\n```\n { name: 'simple-app',\n description: 'A test fixture for pkginfo',\n version: '0.1.0',\n author: 'Charlie Robbins ',\n keywords: [ 'test', 'fixture' ],\n main: './index.js',\n scripts: { test: 'vows test/*-test.js --spec' },\n engines: { node: '>= 0.4.0' } }\n```\n\n### Expose specific properties\nIf you don't want to expose **all** properties on from your `package.json` on your module then simple pass those properties to the `pkginfo` function:\n\n``` js\n var pkginfo = require('pkginfo')(module, 'version', 'author');\n \n console.dir(module.exports);\n```\n\n```\n { version: '0.1.0',\n author: 'Charlie Robbins ' }\n```\n\nIf you're looking for further usage see the [examples][0] included in this repository. \n\n## Run Tests\nTests are written in [vows][1] and give complete coverage of all APIs.\n\n```\n vows test/*-test.js --spec\n```\n\n[0]: https://github.com/indexzero/node-pkginfo/tree/master/examples\n[1]: http://vowsjs.org\n\n#### Author: [Charlie Robbins](http://nodejitsu.com)", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/indexzero/node-pkginfo/issues" - }, - "homepage": "https://github.com/indexzero/node-pkginfo", - "_id": "pkginfo@0.2.3", - "_from": "pkginfo@0.2.x" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/test/pkginfo-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/test/pkginfo-test.js deleted file mode 100644 index 3156c001..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/pkginfo/test/pkginfo-test.js +++ /dev/null @@ -1,69 +0,0 @@ -/* - * pkginfo-test.js: Tests for the pkginfo module. - * - * (C) 2011, Charlie Robbins - * - */ - -var assert = require('assert'), - exec = require('child_process').exec, - fs = require('fs'), - path = require('path'), - vows = require('vows'), - pkginfo = require('../lib/pkginfo'); - -function assertProperties (source, target) { - assert.lengthOf(source, target.length + 1); - target.forEach(function (prop) { - assert.isTrue(!!~source.indexOf(prop)); - }); -} - -function testExposes (options) { - return { - topic: function () { - exec('node ' + path.join(__dirname, '..', 'examples', options.script), this.callback); - }, - "should expose that property correctly": function (err, stdout, stderr) { - assert.isNull(err); - - var exposed = stderr.match(/'(\w+)'/ig).map(function (p) { - return p.substring(1, p.length - 1); - }); - - return !options.assert - ? assertProperties(exposed, options.properties) - : options.assert(exposed); - } - } -} - -vows.describe('pkginfo').addBatch({ - "When using the pkginfo module": { - "and passed a single `string` argument": testExposes({ - script: 'single-property.js', - properties: ['version'] - }), - "and passed multiple `string` arguments": testExposes({ - script: 'multiple-properties.js', - properties: ['version', 'author'] - }), - "and passed an `object` argument": testExposes({ - script: 'object-argument.js', - properties: ['version', 'author'] - }), - "and passed an `array` argument": testExposes({ - script: 'array-argument.js', - properties: ['version', 'author'] - }), - "and passed no arguments": testExposes({ - script: 'all-properties.js', - assert: function (exposed) { - var pkg = fs.readFileSync(path.join(__dirname, '..', 'examples', 'package.json')).toString(), - keys = Object.keys(JSON.parse(pkg)); - - assertProperties(exposed, keys); - } - }) - } -}).export(module); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/.npmignore b/node_modules/karma/node_modules/http-proxy/node_modules/utile/.npmignore deleted file mode 100644 index 8d8bfd57..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -npm-debug.log -*.swp -*.swo diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/.travis.yml b/node_modules/karma/node_modules/http-proxy/node_modules/utile/.travis.yml deleted file mode 100644 index 88cf1f3a..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - -notifications: - email: - - travis@nodejitsu.com - irc: "irc.freenode.org#nodejitsu" - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/CHANGELOG.md b/node_modules/karma/node_modules/http-proxy/node_modules/utile/CHANGELOG.md deleted file mode 100644 index b4e427a3..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/CHANGELOG.md +++ /dev/null @@ -1,16 +0,0 @@ - -0.1.5 / 2012-09-18 -================== - - * Fixed problem with underscore values in camelToUnderscore - -0.1.4 / 2012-07-26 -================== - - * Made use of inflect for camel to underscore conversion - -0.1.3 / 2012-07-25 -================== - - * Added camel to underscore conversion and vice-versa - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/LICENSE b/node_modules/karma/node_modules/http-proxy/node_modules/utile/LICENSE deleted file mode 100644 index 56217cac..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Nodejitsu Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/README.md b/node_modules/karma/node_modules/http-proxy/node_modules/utile/README.md deleted file mode 100644 index 451b1fce..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/README.md +++ /dev/null @@ -1,87 +0,0 @@ -# utile [![Build Status](https://secure.travis-ci.org/flatiron/utile.png)](http://travis-ci.org/flatiron/utile) - -A drop-in replacement for `util` with some additional advantageous functions - -## Motivation -Javascript is definitely a "batteries not included language" when compared to languages like Ruby or Python. Node.js has a simple utility library which exposes some basic (but important) functionality: - -``` -$ node -> var util = require('util'); -> util. -(...) - -util.debug util.error util.exec util.inherits util.inspect -util.log util.p util.print util.pump util.puts -``` - -When one considers their own utility library, why ever bother requiring `util` again? That is the approach taken by this module. To compare: - -``` -$ node -> var utile = require('./lib') -> utile. -(...) - -utile.async utile.capitalize utile.clone utile.cpr utile.createPath utile.debug -utile.each utile.error utile.exec utile.file utile.filter utile.find -utile.inherits utile.log utile.mixin utile.mkdirp utile.p utile.path -utile.print utile.pump utile.puts utile.randomString utile.requireDir uile.requireDirLazy -utile.rimraf -``` - -As you can see all of the original methods from `util` are there, but there are several new methods specific to `utile`. A note about implementation: _no node.js native modules are modified by utile, it simply copies those methods._ - -## Methods -The `utile` modules exposes some simple utility methods: - -* `.each(obj, iterator)`: Iterate over the keys of an object. -* `.mixin(target [source0, source1, ...])`: Copies enumerable properties from `source0 ... sourceN` onto `target` and returns the resulting object. -* `.clone(obj)`: Shallow clones the specified object. -* `.capitalize(str)`: Capitalizes the specified `str`. -* `.randomString(length)`: randomString returns a pseudo-random ASCII string (subset) the return value is a string of length ⌈bits/6⌉ of characters from the base64 alphabet. -* `.filter(obj, test)`: return an object with the properties that `test` returns true on. -* `.args(arguments)`: Converts function arguments into actual array with special `callback`, `cb`, `array`, and `last` properties. Also supports *optional* argument contracts. See [the example](https://github.com/flatiron/utile/blob/master/examples/utile-args.js) for more details. -* `.requireDir(directory)`: Requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values being return values of `require(filename)`. -* `.requireDirLazy(directory)`: Lazily requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values (getters) being return values of `require(filename)`. -* `.format([string] text, [array] formats, [array] replacements)`: Replace `formats` in `text` with `replacements`. This will fall back to the original `util.format` command if it is called improperly. - -## Packaged Dependencies -In addition to the methods that are built-in, utile includes a number of commonly used dependencies to reduce the number of includes in your package.json. These modules _are not eagerly loaded to be respectful of startup time,_ but instead are lazy-loaded getters on the `utile` object - -* `.async`: [Async utilities for node and the browser][0] -* `.inflect`: [Customizable inflections for node.js][6] -* `.mkdirp`: [Recursively mkdir, like mkdir -p, but in node.js][1] -* `.rimraf`: [A rm -rf util for nodejs][2] -* `.cpr`: [Asynchronous recursive file copying with Node.js][3] - -## Installation - -### Installing npm (node package manager) -``` - curl http://npmjs.org/install.sh | sh -``` - -### Installing utile -``` - [sudo] npm install utile -``` - -## Tests -All tests are written with [vows][4] and should be run with [npm][5]: - -``` bash - $ npm test -``` - -#### Author: [Nodejitsu Inc.](http://www.nodejitsu.com) -#### Contributors: [Charlie Robbins](http://github.com/indexzero), [Dominic Tarr](http://github.com/dominictarr) -#### License: MIT - -[0]: https://github.com/caolan/async -[1]: https://github.com/substack/node-mkdirp -[2]: https://github.com/isaacs/rimraf -[3]: https://github.com/avianflu/ncp -[4]: https://vowsjs.org -[5]: https://npmjs.org -[6]: https://github.com/pksunkara/inflect diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/args.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/args.js deleted file mode 100644 index 34f1c115..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/args.js +++ /dev/null @@ -1,46 +0,0 @@ -/* - * args.js: function argument parsing helper utility - * - * (C) 2012, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var utile = require('./index'); - -// -// ### function args(_args) -// #### _args {Arguments} Original function arguments -// -// Top-level method will accept a javascript "arguments" object (the actual keyword -// "arguments" inside any scope), and attempt to return back an intelligent object -// representing the functions arguments -// -module.exports = function (_args) { - var args = utile.rargs(_args), - _cb; - - // - // Find and define the first argument - // - Object.defineProperty(args, 'first', { value: args[0] }); - - // - // Find and define any callback - // - _cb = args[args.length - 1] || args[args.length]; - if (typeof _cb === "function") { - Object.defineProperty(args, 'callback', { value: _cb }); - Object.defineProperty(args, 'cb', { value: _cb }); - args.pop(); - } - - // - // Find and define the last argument - // - if (args.length) { - Object.defineProperty(args, 'last', { value: args[args.length - 1] }); - } - - return args; -}; diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/base64.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/base64.js deleted file mode 100644 index 1de7a76d..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/base64.js +++ /dev/null @@ -1,44 +0,0 @@ -/* - * base64.js: An extremely simple implementation of base64 encoding / decoding using node.js Buffers - * - * (C) 2010, Nodejitsu Inc. - * - */ - -var base64 = exports; - -// -// ### function encode (unencoded) -// #### @unencoded {string} The string to base64 encode -// Encodes the specified string to base64 using node.js Buffers. -// -base64.encode = function (unencoded) { - var encoded; - - try { - encoded = new Buffer(unencoded || '').toString('base64'); - } - catch (ex) { - return null; - } - - return encoded; -}; - -// -// ### function decode (encoded) -// #### @encoded {string} The string to base64 decode -// Decodes the specified string from base64 using node.js Buffers. -// -base64.decode = function (encoded) { - var decoded; - - try { - decoded = new Buffer(encoded || '', 'base64').toString('utf8'); - } - catch (ex) { - return null; - } - - return decoded; -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/file.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/file.js deleted file mode 100644 index 46418780..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/file.js +++ /dev/null @@ -1,33 +0,0 @@ -/* - * file.js: Simple utilities for working with the file system. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var fs = require('fs'); - -exports.readJson = exports.readJSON = function (file, callback) { - if (typeof callback !== 'function') { - throw new Error('utile.file.readJson needs a callback'); - } - - fs.readFile(file, 'utf-8', function (err, data) { - if (err) { - return callback(err); - } - - try { - var json = JSON.parse(data); - callback(null, json); - } - catch (err) { - return callback(err); - } - }); -}; - -exports.readJsonSync = exports.readJSONSync = function (file) { - return JSON.parse(fs.readFileSync(file, 'utf-8')); -}; diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/format.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/format.js deleted file mode 100644 index 3262dd51..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/format.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * format.js: `util.format` enhancement to allow custom formatting parameters. - * - * (C) 2012, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var util = require('util'); - -exports = module.exports = function(str) { - var formats = [].slice.call(arguments, 1, 3); - - if (!(formats[0] instanceof Array && formats[1] instanceof Array) || arguments.length > 3) - return util.format.apply(null, arguments); - - var replacements = formats.pop(), - formats = formats.shift(); - - formats.forEach(function(format, id) { - str = str.replace(new RegExp(format), replacements[id]); - }); - - return str; -}; diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/index.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/index.js deleted file mode 100644 index ac9f9250..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/lib/index.js +++ /dev/null @@ -1,467 +0,0 @@ -/* - * index.js: Top-level include for the `utile` module. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var fs = require('fs'), - path = require('path'), - util = require('util'); - -var utile = module.exports; - -// -// Extend the `utile` object with all methods from the -// core node `util` methods. -// -Object.keys(util).forEach(function (key) { - utile[key] = util[key]; -}); - -Object.defineProperties(utile, { - - // - // ### function async - // Simple wrapper to `require('async')`. - // - 'async': { - get: function() { - return utile.async = require('async'); - } - }, - - // - // ### function inflect - // Simple wrapper to `require('i')`. - // - 'inflect': { - get: function() { - return utile.inflect = require('i')(); - } - }, - - // - // ### function mkdirp - // Simple wrapper to `require('mkdirp')` - // - 'mkdirp': { - get: function() { - return utile.mkdirp = require('mkdirp'); - } - }, - - // - // ### function deepEqual - // Simple wrapper to `require('deep-equal')` - // Remark: deepEqual is 4x faster then using assert.deepEqual - // see: https://gist.github.com/2790507 - // - 'deepEqual': { - get: function() { - return utile.deepEqual = require('deep-equal'); - } - }, - - // - // ### function rimraf - // Simple wrapper to `require('rimraf')` - // - 'rimraf': { - get: function() { - return utile.rimraf = require('rimraf'); - } - }, - - // - // ### function cpr - // Simple wrapper to `require('ncp').ncp` - // - 'cpr': { - get: function() { - return utile.cpr = require('ncp').ncp; - } - }, - - // - // ### @file {Object} - // Lazy-loaded `file` module - // - 'file': { - get: function() { - return utile.file = require('./file'); - } - }, - - // - // ### @args {Object} - // Lazy-loaded `args` module - // - 'args': { - get: function() { - return utile.args = require('./args'); - } - }, - - // - // ### @base64 {Object} - // Lazy-loaded `base64` object - // - 'base64': { - get: function() { - return utile.base64 = require('./base64'); - } - }, - - // - // ### @format {Object} - // Lazy-loaded `format` object - // - 'format': { - get: function() { - return utile.format = require('./format'); - } - } - -}); - - -// -// ### function rargs(_args) -// #### _args {Arguments} Original function arguments -// -// Top-level method will accept a javascript "arguments" object -// (the actual keyword "arguments" inside any scope) and return -// back an Array. -// -utile.rargs = function (_args, slice) { - if (!slice) { - slice = 0; - } - - var len = (_args || []).length, - args = new Array(len - slice), - i; - - // - // Convert the raw `_args` to a proper Array. - // - for (i = slice; i < len; i++) { - args[i - slice] = _args[i]; - } - - return args; -}; - -// -// ### function each (obj, iterator) -// #### @obj {Object} Object to iterate over -// #### @iterator {function} Continuation to use on each key. `function (value, key, object)` -// Iterate over the keys of an object. -// -utile.each = function (obj, iterator) { - Object.keys(obj).forEach(function (key) { - iterator(obj[key], key, obj); - }); -}; - -// -// ### function find (o) -// -// -utile.find = function (obj, pred) { - var value, key; - - for (key in obj) { - value = obj[key]; - if (pred(value, key)) { - return value; - } - } -}; - -// -// ### function pad (str, len, chr) -// ### @str {String} String to pad -// ### @len {Number} Number of chars to pad str with -// ### @chr {String} Optional replacement character, defaults to empty space -// Appends chr to str until it reaches a length of len -// -utile.pad = function pad(str, len, chr) { - var s; - if (!chr) { - chr = ' '; - } - str = str || ''; - s = str; - if (str.length < len) { - for (var i = 0; i < (len - str.length); i++) { - s += chr; - } - } - return s; -} - -// -// ### function path (obj, path, value) -// ### @obj {Object} Object to insert value into -// ### @path {Array} List of nested keys to insert value at -// Retreives a value from given Object, `obj`, located at the -// nested keys, `path`. -// -utile.path = function (obj, path) { - var key, i; - - for (i in path) { - if (typeof obj === 'undefined') { - return undefined; - } - - key = path[i]; - obj = obj[key]; - } - - return obj; -}; - -// -// ### function createPath (obj, path, value) -// ### @obj {Object} Object to insert value into -// ### @path {Array} List of nested keys to insert value at -// ### @value {*} Value to insert into the object. -// Inserts the `value` into the given Object, `obj`, creating -// any keys in `path` along the way if necessary. -// -utile.createPath = function (obj, path, value) { - var key, i; - - for (i in path) { - key = path[i]; - if (!obj[key]) { - obj[key] = ((+i + 1 === path.length) ? value : {}); - } - - obj = obj[key]; - } -}; - -// -// ### function mixin (target [source0, source1, ...]) -// Copies enumerable properties from `source0 ... sourceN` -// onto `target` and returns the resulting object. -// -utile.mixin = function (target) { - utile.rargs(arguments, 1).forEach(function (o) { - Object.getOwnPropertyNames(o).forEach(function(attr) { - var getter = Object.getOwnPropertyDescriptor(o, attr).get, - setter = Object.getOwnPropertyDescriptor(o, attr).set; - - if (!getter && !setter) { - target[attr] = o[attr]; - } - else { - Object.defineProperty(target, attr, { - get: getter, - set: setter - }); - } - }); - }); - - return target; -}; - - -// -// ### function capitalize (str) -// #### @str {string} String to capitalize -// Capitalizes the specified `str`. -// -utile.capitalize = utile.inflect.camelize; - -// -// ### function escapeRegExp (str) -// #### @str {string} String to be escaped -// Escape string for use in Javascript regex -// -utile.escapeRegExp = function (str) { - return str.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&"); -}; - -// -// ### function randomString (length) -// #### @length {integer} The number of bits for the random base64 string returned to contain -// randomString returns a pseude-random ASCII string (subset) -// the return value is a string of length ⌈bits/6⌉ of characters -// from the base64 alphabet. -// -utile.randomString = function (length) { - var chars, rand, i, ret, mod, bits; - - chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-'; - ret = ''; - // standard 4 - mod = 4; - // default is 16 - bits = length * mod || 64; - - // in v8, Math.random() yields 32 pseudo-random bits (in spidermonkey it gives 53) - while (bits > 0) { - // 32-bit integer - rand = Math.floor(Math.random() * 0x100000000); - //we use the top bits - for (i = 26; i > 0 && bits > 0; i -= mod, bits -= mod) { - ret += chars[0x3F & rand >>> i]; - } - } - - return ret; -}; - -// -// ### function filter (object, test) -// #### @obj {Object} Object to iterate over -// #### @pred {function} Predicate applied to each property. `function (value, key, object)` -// Returns an object with properties from `obj` which satisfy -// the predicate `pred` -// -utile.filter = function (obj, pred) { - var copy; - if (Array.isArray(obj)) { - copy = []; - utile.each(obj, function (val, key) { - if (pred(val, key, obj)) { - copy.push(val); - } - }); - } - else { - copy = {}; - utile.each(obj, function (val, key) { - if (pred(val, key, obj)) { - copy[key] = val; - } - }); - } - return copy; -}; - -// -// ### function requireDir (directory) -// #### @directory {string} Directory to require -// Requires all files and directories from `directory`, returning an object -// with keys being filenames (without trailing `.js`) and respective values -// being return values of `require(filename)`. -// -utile.requireDir = function (directory) { - var result = {}, - files = fs.readdirSync(directory); - - files.forEach(function (file) { - if (file.substr(-3) === '.js') { - file = file.substr(0, file.length - 3); - } - result[file] = require(path.resolve(directory, file)); - }); - return result; -}; - -// -// ### function requireDirLazy (directory) -// #### @directory {string} Directory to require -// Lazily requires all files and directories from `directory`, returning an -// object with keys being filenames (without trailing `.js`) and respective -// values (getters) being return values of `require(filename)`. -// -utile.requireDirLazy = function (directory) { - var result = {}, - files = fs.readdirSync(directory); - - files.forEach(function (file) { - if (file.substr(-3) === '.js') { - file = file.substr(0, file.length - 3); - } - Object.defineProperty(result, file, { - get: function() { - return result[file] = require(path.resolve(directory, file)); - } - }); - }); - - return result; -}; - -// -// ### function clone (object, filter) -// #### @object {Object} Object to clone -// #### @filter {Function} Filter to be used -// Shallow clones the specified object. -// -utile.clone = function (object, filter) { - return Object.keys(object).reduce(filter ? function (obj, k) { - if (filter(k)) obj[k] = object[k]; - return obj; - } : function (obj, k) { - obj[k] = object[k]; - return obj; - }, {}); -}; - -// -// ### function camelToUnderscore (obj) -// #### @obj {Object} Object to convert keys on. -// Converts all keys of the type `keyName` to `key_name` on the -// specified `obj`. -// -utile.camelToUnderscore = function (obj) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - if (Array.isArray(obj)) { - obj.forEach(utile.camelToUnderscore); - return obj; - } - - Object.keys(obj).forEach(function (key) { - var k = utile.inflect.underscore(key); - if (k !== key) { - obj[k] = obj[key]; - delete obj[key]; - key = k; - } - utile.camelToUnderscore(obj[key]); - }); - - return obj; -}; - -// -// ### function underscoreToCamel (obj) -// #### @obj {Object} Object to convert keys on. -// Converts all keys of the type `key_name` to `keyName` on the -// specified `obj`. -// -utile.underscoreToCamel = function (obj) { - if (typeof obj !== 'object' || obj === null) { - return obj; - } - - if (Array.isArray(obj)) { - obj.forEach(utile.underscoreToCamel); - return obj; - } - - Object.keys(obj).forEach(function (key) { - var k = utile.inflect.camelize(key, false); - if (k !== key) { - obj[k] = obj[key]; - delete obj[key]; - key = k; - } - utile.underscoreToCamel(obj[key]); - }); - - return obj; -}; diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/.bin/ncp b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/.bin/ncp deleted file mode 100755 index 388eaba6..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/.bin/ncp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - - - - -var ncp = require('../lib/ncp'), - args = process.argv.slice(2), - source, dest; - -if (args.length < 2) { - console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); - process.exit(1); -} - -// parse arguments the hard way -function startsWith(str, prefix) { - return str.substr(0, prefix.length) == prefix; -} - -var options = {}; -args.forEach(function (arg) { - if (startsWith(arg, "--limit=")) { - options.limit = parseInt(arg.split('=', 2)[1], 10); - } - if (startsWith(arg, "--filter=")) { - options.filter = new RegExp(arg.split('=', 2)[1]); - } - if (startsWith(arg, "--stoponerr")) { - options.stopOnErr = true; - } -}); - -ncp.ncp(args[0], args[1], options, function (err) { - if (Array.isArray(err)) { - console.error('There were errors during the copy.'); - err.forEach(function (err) { - console.error(err.stack || err.message); - }); - process.exit(1); - } - else if (err) { - console.error('An error has occurred.'); - console.error(err.stack || err.message); - process.exit(1); - } -}); - - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/.gitmodules b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/.gitmodules deleted file mode 100644 index a9aae984..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "deps/nodeunit"] - path = deps/nodeunit - url = git://github.com/caolan/nodeunit.git -[submodule "deps/UglifyJS"] - path = deps/UglifyJS - url = https://github.com/mishoo/UglifyJS.git -[submodule "deps/nodelint"] - path = deps/nodelint - url = https://github.com/tav/nodelint.git diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/.npmignore b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/.npmignore deleted file mode 100644 index 9bdfc97c..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -deps -dist -test -nodelint.cfg \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/LICENSE b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/Makefile b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/Makefile deleted file mode 100644 index bad647c6..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -PACKAGE = asyncjs -NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) -CWD := $(shell pwd) -NODEUNIT = $(CWD)/node_modules/nodeunit/bin/nodeunit -UGLIFY = $(CWD)/node_modules/uglify-js/bin/uglifyjs -NODELINT = $(CWD)/node_modules/nodelint/nodelint - -BUILDDIR = dist - -all: clean test build - -build: $(wildcard lib/*.js) - mkdir -p $(BUILDDIR) - $(UGLIFY) lib/async.js > $(BUILDDIR)/async.min.js - -test: - $(NODEUNIT) test - -clean: - rm -rf $(BUILDDIR) - -lint: - $(NODELINT) --config nodelint.cfg lib/async.js - -.PHONY: test build all diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/README.md b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/README.md deleted file mode 100644 index 1bbbc477..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/README.md +++ /dev/null @@ -1,1021 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, forEach…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - - async.parallel([ - function(){ ... }, - function(){ ... } - ], callback); - - async.series([ - function(){ ... }, - function(){ ... } - ]); - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - - -## Download - -Releases are available for download from -[GitHub](http://github.com/caolan/async/downloads). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed - -__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped - - -## In the Browser - -So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - - - - - -## Documentation - -### Collections - -* [forEach](#forEach) -* [map](#map) -* [filter](#filter) -* [reject](#reject) -* [reduce](#reduce) -* [detect](#detect) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [whilst](#whilst) -* [until](#until) -* [waterfall](#waterfall) -* [queue](#queue) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - - -### forEach(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the forEach function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // assuming openFiles is an array of file names and saveFile is a function - // to save the modified contents of that file: - - async.forEach(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error - }); - ---------------------------------------- - - -### forEachSeries(arr, iterator, callback) - -The same as forEach only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - - -### forEachLimit(arr, limit, iterator, callback) - -The same as forEach only the iterator is applied to batches of items in the -array, in series. The next batch of iterators is only called once the current -one has completed processing. - -__Arguments__ - -* arr - An array to iterate over. -* limit - How many items should be in each batch. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // Assume documents is an array of JSON objects and requestApi is a - // function that interacts with a rate-limited REST api. - - async.forEachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error - }); ---------------------------------------- - - -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - ---------------------------------------- - - -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - - -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - ---------------------------------------- - - -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - - -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - - -### rejectSeries(arr, iterator, callback) - -The same as filter, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - - -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then its probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback which accepts an optional error as its first argument, and the state - of the reduction as the second. If an error is passed to the callback, the - reduction is stopped and the main callback is immediately called with the - error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - - async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); - }, function(err, result){ - // result is now equal to the last value of memo, which is 6 - }); - ---------------------------------------- - - -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - - -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - - async.detect(['file1','file2','file3'], path.exists, function(result){ - // result now equals the first file in the list that exists - }); - ---------------------------------------- - - -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - - -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a value to use as the sort criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - - async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); - }, function(err, results){ - // results is now the original array of files sorted by - // modified date - }); - - ---------------------------------------- - - -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - - async.some(['file1','file2','file3'], path.exists, function(result){ - // if result is true then at least one of the files exists - }); - ---------------------------------------- - - -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - - async.every(['file1','file2','file3'], path.exists, function(result){ - // if result is true then every file exists - }); - ---------------------------------------- - - -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - - async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories - }); - ---------------------------------------- - - -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - - -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - }, - ], - // optional callback - function(err, results){ - // results is now equal to ['one', 'two'] - }); - - - // an example using an object instead of an array - async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equal to: {one: 1, two: 2} - }); - - ---------------------------------------- - - -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed a - callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - }, - ], - // optional callback - function(err, results){ - // the results array will equal ['one','two'] even though - // the second function had a shorter timeout. - }); - - - // an example using an object instead of an array - async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equals to: {one: 1, two: 2} - }); - - ---------------------------------------- - - -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback which must be called once it has completed with an optional - error as the first argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - - var count = 0; - - async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } - ); - - ---------------------------------------- - - -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - - ---------------------------------------- - - -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. -* callback(err, [results]) - An optional callback to run once all the functions - have completed. This will be passed the results of the last task's callback. - - - -__Example__ - - async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } - ], function (err, result) { - // result now equals 'done' - }); - - ---------------------------------------- - - -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. - instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - - // create a queue object with concurrency 2 - - var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); - }, 2); - - - // assign a callback - q.drain = function() { - console.log('all items have been processed'); - } - - // add some items to the queue - - q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); - }); - q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); - }); - - // add some items to the queue (batch-wise) - - q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) { - console.log('finished processing bar'); - }); - - ---------------------------------------- - - -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions which have completed so far. - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - syntax is easier to understand by looking at the example. -* callback(err, results) - An optional callback which is called when all the - tasks have been completed. The callback will receive an error as an argument - if any tasks pass an error to their callback. If all tasks complete - successfully, it will receive an object containing their results. - -__Example__ - - async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] - }); - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - - async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } - ], - function(results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - email_link: function(callback){ - // once the file is written let's email a link to it... - } - ]); - }); - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - - -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. Its also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. - -__Example__ - - var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } - ]); - - node> var iterator2 = iterator(); - 'one' - node> var iterator3 = iterator2(); - 'two' - node> iterator3(); - 'three' - node> var nextfn = iterator2.next(); - node> nextfn(); - 'three' - - ---------------------------------------- - - -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - - // using apply - - async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), - ]); - - - // the same process without using apply - - async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - }, - ]); - -It's possible to pass any number of additional arguments when calling the -continuation: - - node> var fn = async.apply(sys.puts, 'one'); - node> fn('two', 'three'); - one - two - three - ---------------------------------------- - - -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), -which means other higher priority events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - - var call_order = []; - async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two] - }); - call_order.push('one') - - -## Utils - - -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - - var slow_fn = function (name, callback) { - // do something - callback(null, result); - }; - var fn = async.memoize(slow_fn); - - // fn can now be used as if it were slow_fn - fn('some name', function () { - // callback - }); - - -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - - -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); - }; - - node> async.log(hello, 'world'); - 'hello world' - - ---------------------------------------- - - -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); - }; - - node> async.dir(hello, 'world'); - {hello: 'world'} - - ---------------------------------------- - - -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/index.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/index.js deleted file mode 100644 index 8e238453..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/index.js +++ /dev/null @@ -1,3 +0,0 @@ -// This file is just added for convenience so this repository can be -// directly checked out into a project's deps folder -module.exports = require('./lib/async'); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/lib/async.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/lib/async.js deleted file mode 100644 index 7cc4f5ea..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/lib/async.js +++ /dev/null @@ -1,692 +0,0 @@ -/*global setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root = this, - previous_async = root.async; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - else { - root.async = async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - //// cross-browser compatiblity functions //// - - var _forEach = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _forEach(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _forEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - if (typeof process === 'undefined' || !(process.nextTick)) { - async.nextTick = function (fn) { - setTimeout(fn, 0); - }; - } - else { - async.nextTick = process.nextTick; - } - - async.forEach = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - _forEach(arr, function (x) { - iterator(x, function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - } - }); - }); - }; - - async.forEachSeries = function (arr, iterator, callback) { - callback = callback || function () {}; - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(null); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - - async.forEachLimit = function (arr, limit, iterator, callback) { - callback = callback || function () {}; - if (!arr.length || limit <= 0) { - return callback(); - } - var completed = 0; - var started = 0; - var running = 0; - - (function replenish () { - if (completed === arr.length) { - return callback(); - } - - while (running < limit && started < arr.length) { - started += 1; - running += 1; - iterator(arr[started - 1], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - running -= 1; - if (completed === arr.length) { - callback(); - } - else { - replenish(); - } - } - }); - } - })(); - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEach].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.forEachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - main_callback = function () {}; - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _forEach(listeners.slice(0), function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - callback = function () {}; - } - }); - - _forEach(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - if (err) { - callback(err); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - taskComplete(); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true) && !results.hasOwnProperty(k); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - callback = callback || function () {}; - if (!tasks.length) { - return callback(); - } - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.nextTick(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - async.parallel = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEach(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.queue = function (worker, concurrency) { - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - if(data.constructor !== Array) { - data = [data]; - } - _forEach(data, function(task) { - q.tasks.push({ - data: task, - callback: typeof callback === 'function' ? callback : null - }); - if (q.saturated && q.tasks.length == concurrency) { - q.saturated(); - } - async.nextTick(q.process); - }); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if(q.empty && q.tasks.length == 0) q.empty(); - workers += 1; - worker(task.data, function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if(q.drain && q.tasks.length + workers == 0) q.drain(); - q.process(); - }); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _forEach(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - }; - }; - -}()); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/package.json deleted file mode 100644 index a1ed9b0f..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/async/package.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./index", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.1.22", - "repository": { - "type": "git", - "url": "http://github.com/caolan/async.git" - }, - "bugs": { - "url": "http://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/caolan/async/raw/master/LICENSE" - } - ], - "devDependencies": { - "nodeunit": ">0.0.0", - "uglify-js": "1.2.x", - "nodelint": ">0.0.0" - }, - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n \n \n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n\n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // the results array will equal ['one','two'] even though\n // the second function had a shorter timeout.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n );\n\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err, [results]) - An optional callback to run once all the functions\n have completed. This will be passed the results of the last task's callback.\n\n\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ], function (err, result) {\n // result now equals 'done' \n });\n\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n instead of a single task, an array of tasks can be submitted. the respective callback is used for every task in the list.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n // add some items to the queue (batch-wise)\n\n q.push([{name: 'baz'},{name: 'bay'},{name: 'bax'}], function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions which have completed so far.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err, results) - An optional callback which is called when all the\n tasks have been completed. The callback will receive an error as an argument\n if any tasks pass an error to their callback. If all tasks complete\n successfully, it will receive an object containing their results.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable.\n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.1.22", - "_from": "async@0.1.x" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/.travis.yml b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/README.markdown b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/README.markdown deleted file mode 100644 index ccde39bd..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/README.markdown +++ /dev/null @@ -1,61 +0,0 @@ -# deep-equal - -Node's `assert.deepEqual() algorithm` as a standalone module. - -This module is around [5 times faster](https://gist.github.com/2790507) -than wrapping `assert.deepEqual()` in a `try/catch`. - -[![browser support](http://ci.testling.com/substack/node-deep-equal.png)](http://ci.testling.com/substack/node-deep-equal) - -[![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](http://travis-ci.org/substack/node-deep-equal) - -# example - -``` js -var equal = require('deep-equal'); -console.dir([ - equal( - { a : [ 2, 3 ], b : [ 4 ] }, - { a : [ 2, 3 ], b : [ 4 ] } - ), - equal( - { x : 5, y : [6] }, - { x : 5, y : 6 } - ) -]); -``` - -# methods - -``` js -var deepEqual = require('deep-equal') -``` - -## deepEqual(a, b, opts) - -Compare objects `a` and `b`, returning whether they are equal according to a -recursive equality algorithm. - -If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes. -The default is to use coercive equality (`==`) because that's how -`assert.deepEqual()` works by default. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install deep-equal -``` - -# test - -With [npm](http://npmjs.org) do: - -``` -npm test -``` - -# license - -MIT. Derived largely from node's assert module. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/example/cmp.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/example/cmp.js deleted file mode 100644 index 67014b88..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/example/cmp.js +++ /dev/null @@ -1,11 +0,0 @@ -var equal = require('../'); -console.dir([ - equal( - { a : [ 2, 3 ], b : [ 4 ] }, - { a : [ 2, 3 ], b : [ 4 ] } - ), - equal( - { x : 5, y : [6] }, - { x : 5, y : 6 } - ) -]); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/index.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/index.js deleted file mode 100644 index 8b7bf532..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/index.js +++ /dev/null @@ -1,86 +0,0 @@ -var pSlice = Array.prototype.slice; -var Object_keys = typeof Object.keys === 'function' - ? Object.keys - : function (obj) { - var keys = []; - for (var key in obj) keys.push(key); - return keys; - } -; - -var deepEqual = module.exports = function (actual, expected, opts) { - if (!opts) opts = {}; - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - - } else if (actual instanceof Date && expected instanceof Date) { - return actual.getTime() === expected.getTime(); - - // 7.3. Other pairs that do not both pass typeof value == 'object', - // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { - return opts.strict ? actual === expected : actual == expected; - - // 7.4. For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical 'prototype' property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected, opts); - } -} - -function isUndefinedOrNull(value) { - return value === null || value === undefined; -} - -function isArguments(object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv(a, b, opts) { - if (!opts) opts = {}; - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) - return false; - // an identical 'prototype' property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return deepEqual(a, b, opts); - } - try { - var ka = Object_keys(a), - kb = Object_keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates - // hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!deepEqual(a[key], b[key], opts)) return false; - } - return true; -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/package.json deleted file mode 100644 index 8c9a4aca..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "deep-equal", - "version": "0.1.0", - "description": "node's assert.deepEqual algorithm", - "main": "index.js", - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.3.0", - "tape": "~0.0.5" - }, - "repository": { - "type": "git", - "url": "http://github.com/substack/node-deep-equal.git" - }, - "keywords": [ - "equality", - "equal", - "compare" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": { - "ie": [ - 6, - 7, - 8, - 9 - ], - "ff": [ - 3.5, - 10, - 15 - ], - "chrome": [ - 10, - 22 - ], - "safari": [ - 5.1 - ], - "opera": [ - 12 - ] - } - }, - "readme": "# deep-equal\n\nNode's `assert.deepEqual() algorithm` as a standalone module.\n\nThis module is around [5 times faster](https://gist.github.com/2790507)\nthan wrapping `assert.deepEqual()` in a `try/catch`.\n\n[![browser support](http://ci.testling.com/substack/node-deep-equal.png)](http://ci.testling.com/substack/node-deep-equal)\n\n[![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](http://travis-ci.org/substack/node-deep-equal)\n\n# example\n\n``` js\nvar equal = require('deep-equal');\nconsole.dir([\n equal(\n { a : [ 2, 3 ], b : [ 4 ] },\n { a : [ 2, 3 ], b : [ 4 ] }\n ),\n equal(\n { x : 5, y : [6] },\n { x : 5, y : 6 }\n )\n]);\n```\n\n# methods\n\n``` js\nvar deepEqual = require('deep-equal')\n```\n\n## deepEqual(a, b, opts)\n\nCompare objects `a` and `b`, returning whether they are equal according to a\nrecursive equality algorithm.\n\nIf `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes.\nThe default is to use coercive equality (`==`) because that's how\n`assert.deepEqual()` works by default.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install deep-equal\n```\n\n# test\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm test\n```\n\n# license\n\nMIT. Derived largely from node's assert module.\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-deep-equal/issues" - }, - "homepage": "https://github.com/substack/node-deep-equal", - "_id": "deep-equal@0.1.0", - "_from": "deep-equal@*" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/test/cmp.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/test/cmp.js deleted file mode 100644 index ac7b8ea1..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/deep-equal/test/cmp.js +++ /dev/null @@ -1,32 +0,0 @@ -var test = require('tape'); -var equal = require('../'); - -test('equal', function (t) { - t.ok(equal( - { a : [ 2, 3 ], b : [ 4 ] }, - { a : [ 2, 3 ], b : [ 4 ] } - )); - t.end(); -}); - -test('not equal', function (t) { - t.notOk(equal( - { x : 5, y : [6] }, - { x : 5, y : 6 } - )); - t.end(); -}); - -test('nested nulls', function (t) { - t.ok(equal([ null, null, null ], [ null, null, null ])); - t.end(); -}); - -test('strict equal', function (t) { - t.notOk(equal( - [ { a: 3 }, { b: 4 } ], - [ { a: '3' }, { b: '4' } ], - { strict: true } - )); - t.end(); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/.npmignore b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/.npmignore deleted file mode 100644 index 435e4bbb..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -node_modules -npm-debug.log -*.swp diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/.travis.yml b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/.travis.yml deleted file mode 100644 index 24a76b06..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 - - 0.7 -notifications: - irc: "irc.freenode.net#pksunkara" - email: - on_success: never diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/LICENSE b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/LICENSE deleted file mode 100644 index c9b44cb8..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/LICENSE +++ /dev/null @@ -1,18 +0,0 @@ -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/README.md b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/README.md deleted file mode 100644 index dbfa6d46..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/README.md +++ /dev/null @@ -1,174 +0,0 @@ -# inflect - -customizable inflections for nodejs - -## Installation - -```bash -npm install i -``` - -## Usage - -Require the module before using - -```js -var inflect = require('i')(); -``` - -All the below api functions can be called directly on a string - -```js -inflect.titleize('messages to store') // === 'Messages To Store' -'messages to store'.titleize // === 'Messages To Store' -``` - -only if `true` is passed while initiating - -```js -var inflect = require('i')(true); -``` - -### Pluralize - -```js -inflect.pluralize('person'); // === 'people' -inflect.pluralize('octopus'); // === 'octopi' -inflect.pluralize('Hat'); // === 'Hats' -``` - -### Singularize - -```js -inflect.singularize('people'); // === 'person' -inflect.singularize('octopi'); // === 'octopus' -inflect.singularize('Hats'); // === 'Hat' -``` - -### Camelize - -```js -inflect.camelize('message_properties'); // === 'MessageProperties' -inflect.camelize('message_properties', false); // === 'messageProperties' -``` - -### Underscore - -```js -inflect.underscore('MessageProperties'); // === 'message_properties' -inflect.underscore('messageProperties'); // === 'message_properties' -``` - -### Humanize - -```js -inflect.humanize('message_id'); // === 'Message' -``` - -### Dasherize - -```js -inflect.dasherize('message_properties'); // === 'message-properties' -inflect.dasherize('Message Properties'); // === 'Message Properties' -``` - -### Titleize - -```js -inflect.titleize('message_properties'); // === 'Message Properties' -inflect.titleize('message properties to keep'); // === 'Message Properties to Keep' -``` - -### Demodulize - -```js -inflect.demodulize('Message.Bus.Properties'); // === 'Properties' -``` - -### Tableize - -```js -inflect.tableize('MessageBusProperty'); // === 'message_bus_properties' -``` - -### Classify - -```js -inflect.classify('message_bus_properties'); // === 'MessageBusProperty' -``` - -### Foreign key - -```js -inflect.foreign_key('MessageBusProperty'); // === 'message_bus_property_id' -inflect.foreign_key('MessageBusProperty', false); // === 'message_bus_propertyid' -``` - -### Ordinalize - -```js -inflect.ordinalize( '1' ); // === '1st' -``` - -## Custom rules for inflection - -### Custom plural - -We can use regexp in any of these custom rules - -```js -inflect.inflections.plural('person', 'guys'); -inflect.pluralize('person'); // === 'guys' -inflect.singularize('guys'); // === 'guy' -``` - -### Custom singular - -```js -inflect.inflections.singular('guys', 'person') -inflect.singularize('guys'); // === 'person' -inflect.pluralize('person'); // === 'people' -``` - -### Custom irregular - -```js -inflect.inflections.irregular('person', 'guys') -inflect.pluralize('person'); // === 'guys' -inflect.singularize('guys'); // === 'person' -``` - -### Custom human - -```js -inflect.inflections.human(/^(.*)_cnt$/i, '$1_count'); -inflect.inflections.humanize('jargon_cnt'); // === 'Jargon count' -``` - -### Custom uncountable - -```js -inflect.inflections.uncountable('oil') -inflect.pluralize('oil'); // === 'oil' -inflect.singularize('oil'); // === 'oil' -``` - -## Contributors -Here is a list of [Contributors](http://github.com/pksunkara/inflect/contributors) - -### TODO - -- More obscure test cases - -__I accept pull requests and guarantee a reply back within a day__ - -## License -MIT/X11 - -## Bug Reports -Report [here](http://github.com/pksunkara/inflect/issues). __Guaranteed reply within a day__. - -## Contact -Pavan Kumar Sunkara (pavan.sss1991@gmail.com) - -Follow me on [github](https://github.com/users/follow?target=pksunkara), [twitter](http://twitter.com/pksunkara) diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/defaults.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/defaults.js deleted file mode 100644 index ac26a505..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/defaults.js +++ /dev/null @@ -1,63 +0,0 @@ -// Default inflections -module.exports = function (inflect) { - - inflect.plural(/$/, 's'); - inflect.plural(/s$/i, 's'); - inflect.plural(/(ax|test)is$/i, '$1es'); - inflect.plural(/(octop|vir)us$/i, '$1i'); - inflect.plural(/(octop|vir)i$/i, '$1i'); - inflect.plural(/(alias|status)$/i, '$1es'); - inflect.plural(/(bu)s$/i, '$1ses'); - inflect.plural(/(buffal|tomat)o$/i, '$1oes'); - inflect.plural(/([ti])um$/i, '$1a'); - inflect.plural(/([ti])a$/i, '$1a'); - inflect.plural(/sis$/i, 'ses'); - inflect.plural(/(?:([^f])fe|([lr])f)$/i, '$1ves'); - inflect.plural(/(hive)$/i, '$1s'); - inflect.plural(/([^aeiouy]|qu)y$/i, '$1ies'); - inflect.plural(/(x|ch|ss|sh)$/i, '$1es'); - inflect.plural(/(matr|vert|ind)(?:ix|ex)$/i, '$1ices'); - inflect.plural(/([m|l])ouse$/i, '$1ice'); - inflect.plural(/([m|l])ice$/i, '$1ice'); - inflect.plural(/^(ox)$/i, '$1en'); - inflect.plural(/^(oxen)$/i, '$1'); - inflect.plural(/(quiz)$/i, '$1zes'); - - - inflect.singular(/s$/i, ''); - inflect.singular(/(n)ews$/i, '$1ews'); - inflect.singular(/([ti])a$/i, '$1um'); - inflect.singular(/((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$/i, '$1sis'); - inflect.singular(/(^analy)ses$/i, '$1sis'); - inflect.singular(/([^f])ves$/i, '$1fe'); - inflect.singular(/(hive)s$/i, '$1'); - inflect.singular(/(tive)s$/i, '$1'); - inflect.singular(/([lr])ves$/i, '$1f'); - inflect.singular(/([^aeiouy]|qu)ies$/i, '$1y'); - inflect.singular(/(s)eries$/i, '$1eries'); - inflect.singular(/(m)ovies$/i, '$1ovie'); - inflect.singular(/(x|ch|ss|sh)es$/i, '$1'); - inflect.singular(/([m|l])ice$/i, '$1ouse'); - inflect.singular(/(bus)es$/i, '$1'); - inflect.singular(/(o)es$/i, '$1'); - inflect.singular(/(shoe)s$/i, '$1'); - inflect.singular(/(cris|ax|test)es$/i, '$1is'); - inflect.singular(/(octop|vir)i$/i, '$1us'); - inflect.singular(/(alias|status)es$/i, '$1'); - inflect.singular(/^(ox)en/i, '$1'); - inflect.singular(/(vert|ind)ices$/i, '$1ex'); - inflect.singular(/(matr)ices$/i, '$1ix'); - inflect.singular(/(quiz)zes$/i, '$1'); - inflect.singular(/(database)s$/i, '$1'); - - inflect.irregular('child', 'children'); - inflect.irregular('person', 'people'); - inflect.irregular('man', 'men'); - inflect.irregular('child', 'children'); - inflect.irregular('sex', 'sexes'); - inflect.irregular('move', 'moves'); - inflect.irregular('cow', 'kine'); - inflect.irregular('zombie', 'zombies'); - - inflect.uncountable(['equipment', 'information', 'rice', 'money', 'species', 'series', 'fish', 'sheep', 'jeans']); -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/inflect.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/inflect.js deleted file mode 100644 index 5e0cc704..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/inflect.js +++ /dev/null @@ -1,11 +0,0 @@ -// Requiring modules - -module.exports = function (attach) { - var methods = require('./methods'); - - if (attach) { - require('./native')(methods); - } - - return methods -}; diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/inflections.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/inflections.js deleted file mode 100644 index 2808a488..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/inflections.js +++ /dev/null @@ -1,116 +0,0 @@ -// A singleton instance of this class is yielded by Inflector.inflections, which can then be used to specify additional -// inflection rules. Examples: -// -// BulletSupport.Inflector.inflect ($) -> -// $.plural /^(ox)$/i, '$1en' -// $.singular /^(ox)en/i, '$1' -// -// $.irregular 'octopus', 'octopi' -// -// $.uncountable "equipment" -// -// New rules are added at the top. So in the example above, the irregular rule for octopus will now be the first of the -// pluralization and singularization rules that is runs. This guarantees that your rules run before any of the rules that may -// already have been loaded. - -var util = require('./util'); - -var Inflections = function () { - this.plurals = []; - this.singulars = []; - this.uncountables = []; - this.humans = []; - require('./defaults')(this); - return this; -}; - -// Specifies a new pluralization rule and its replacement. The rule can either be a string or a regular expression. -// The replacement should always be a string that may include references to the matched data from the rule. -Inflections.prototype.plural = function (rule, replacement) { - if (typeof rule == 'string') { - this.uncountables = util.array.del(this.uncountables, rule); - } - this.uncountables = util.array.del(this.uncountables, replacement); - this.plurals.unshift([rule, replacement]); -}; - -// Specifies a new singularization rule and its replacement. The rule can either be a string or a regular expression. -// The replacement should always be a string that may include references to the matched data from the rule. -Inflections.prototype.singular = function (rule, replacement) { - if (typeof rule == 'string') { - this.uncountables = util.array.del(this.uncountables, rule); - } - this.uncountables = util.array.del(this.uncountables, replacement); - this.singulars.unshift([rule, replacement]); -}; - -// Specifies a new irregular that applies to both pluralization and singularization at the same time. This can only be used -// for strings, not regular expressions. You simply pass the irregular in singular and plural form. -// -// irregular 'octopus', 'octopi' -// irregular 'person', 'people' -Inflections.prototype.irregular = function (singular, plural) { - this.uncountables = util.array.del(this.uncountables, singular); - this.uncountables = util.array.del(this.uncountables, plural); - if (singular[0].toUpperCase() == plural[0].toUpperCase()) { - this.plural(new RegExp("(" + singular[0] + ")" + singular.slice(1) + "$", "i"), '$1' + plural.slice(1)); - this.plural(new RegExp("(" + plural[0] + ")" + plural.slice(1) + "$", "i"), '$1' + plural.slice(1)); - this.singular(new RegExp("(" + plural[0] + ")" + plural.slice(1) + "$", "i"), '$1' + singular.slice(1)); - } else { - this.plural(new RegExp("" + (singular[0].toUpperCase()) + singular.slice(1) + "$"), plural[0].toUpperCase() + plural.slice(1)); - this.plural(new RegExp("" + (singular[0].toLowerCase()) + singular.slice(1) + "$"), plural[0].toLowerCase() + plural.slice(1)); - this.plural(new RegExp("" + (plural[0].toUpperCase()) + plural.slice(1) + "$"), plural[0].toUpperCase() + plural.slice(1)); - this.plural(new RegExp("" + (plural[0].toLowerCase()) + plural.slice(1) + "$"), plural[0].toLowerCase() + plural.slice(1)); - this.singular(new RegExp("" + (plural[0].toUpperCase()) + plural.slice(1) + "$"), singular[0].toUpperCase() + singular.slice(1)); - this.singular(new RegExp("" + (plural[0].toLowerCase()) + plural.slice(1) + "$"), singular[0].toLowerCase() + singular.slice(1)); - } -}; - -// Specifies a humanized form of a string by a regular expression rule or by a string mapping. -// When using a regular expression based replacement, the normal humanize formatting is called after the replacement. -// When a string is used, the human form should be specified as desired (example: 'The name', not 'the_name') -// -// human /(.*)_cnt$/i, '$1_count' -// human "legacy_col_person_name", "Name" -Inflections.prototype.human = function (rule, replacement) { - this.humans.unshift([rule, replacement]); -} - -// Add uncountable words that shouldn't be attempted inflected. -// -// uncountable "money" -// uncountable ["money", "information"] -Inflections.prototype.uncountable = function (words) { - this.uncountables = this.uncountables.concat(words); -} - -// Clears the loaded inflections within a given scope (default is _'all'_). -// Give the scope as a symbol of the inflection type, the options are: _'plurals'_, -// _'singulars'_, _'uncountables'_, _'humans'_. -// -// clear 'all' -// clear 'plurals' -Inflections.prototype.clear = function (scope) { - if (scope == null) scope = 'all'; - switch (scope) { - case 'all': - this.plurals = []; - this.singulars = []; - this.uncountables = []; - this.humans = []; - default: - this[scope] = []; - } -} - -// Clears the loaded inflections and initializes them to [default](../inflections.html) -Inflections.prototype.default = function () { - this.plurals = []; - this.singulars = []; - this.uncountables = []; - this.humans = []; - require('./defaults')(this); - return this; -}; - -module.exports = new Inflections(); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/methods.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/methods.js deleted file mode 100644 index 293dd9d5..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/methods.js +++ /dev/null @@ -1,233 +0,0 @@ -// The Inflector transforms words from singular to plural, class names to table names, modularized class names to ones without, -// and class names to foreign keys. The default inflections for pluralization, singularization, and uncountable words are kept -// in inflections.coffee -// -// If you discover an incorrect inflection and require it for your application, you'll need -// to correct it yourself (explained below). - -var util = require('./util'); - -var inflect = module.exports; - -// Import [inflections](inflections.html) instance -inflect.inflections = require('./inflections') - -// Gives easy access to add inflections to this class -inflect.inflect = function (inflections_function) { - inflections_function(inflect.inflections); -}; - -// By default, _camelize_ converts strings to UpperCamelCase. If the argument to _camelize_ -// is set to _false_ then _camelize_ produces lowerCamelCase. -// -// _camelize_ will also convert '/' to '.' which is useful for converting paths to namespaces. -// -// "bullet_record".camelize() // => "BulletRecord" -// "bullet_record".camelize(false) // => "bulletRecord" -// "bullet_record/errors".camelize() // => "BulletRecord.Errors" -// "bullet_record/errors".camelize(false) // => "bulletRecord.Errors" -// -// As a rule of thumb you can think of _camelize_ as the inverse of _underscore_, -// though there are cases where that does not hold: -// -// "SSLError".underscore.camelize // => "SslError" -inflect.camelize = function(lower_case_and_underscored_word, first_letter_in_uppercase) { - var result; - if (first_letter_in_uppercase == null) first_letter_in_uppercase = true; - result = util.string.gsub(lower_case_and_underscored_word, /\/(.?)/, function($) { - return "." + (util.string.upcase($[1])); - }); - result = util.string.gsub(result, /(?:_)(.)/, function($) { - return util.string.upcase($[1]); - }); - if (first_letter_in_uppercase) { - return util.string.upcase(result); - } else { - return util.string.downcase(result); - } -}; - -// Makes an underscored, lowercase form from the expression in the string. -// -// Changes '.' to '/' to convert namespaces to paths. -// -// "BulletRecord".underscore() // => "bullet_record" -// "BulletRecord.Errors".underscore() // => "bullet_record/errors" -// -// As a rule of thumb you can think of +underscore+ as the inverse of +camelize+, -// though there are cases where that does not hold: -// -// "SSLError".underscore().camelize() // => "SslError" -inflect.underscore = function (camel_cased_word) { - var self; - self = util.string.gsub(camel_cased_word, /\./, '/'); - self = util.string.gsub(self, /([A-Z]+)([A-Z][a-z])/, "$1_$2"); - self = util.string.gsub(self, /([a-z\d])([A-Z])/, "$1_$2"); - self = util.string.gsub(self, /-/, '_'); - return self.toLowerCase(); -}; - -// Replaces underscores with dashes in the string. -// -// "puni_puni".dasherize() // => "puni-puni" -inflect.dasherize = function (underscored_word) { - return util.string.gsub(underscored_word, /_/, '-'); -}; - -// Removes the module part from the expression in the string. -// -// "BulletRecord.String.Inflections".demodulize() // => "Inflections" -// "Inflections".demodulize() // => "Inflections" -inflect.demodulize = function (class_name_in_module) { - return util.string.gsub(class_name_in_module, /^.*\./, ''); -}; - -// Creates a foreign key name from a class name. -// _separate_class_name_and_id_with_underscore_ sets whether -// the method should put '_' between the name and 'id'. -// -// "Message".foreign_key() // => "message_id" -// "Message".foreign_key(false) // => "messageid" -// "Admin::Post".foreign_key() // => "post_id" -inflect.foreign_key = function (class_name, separate_class_name_and_id_with_underscore) { - if (separate_class_name_and_id_with_underscore == null) { - separate_class_name_and_id_with_underscore = true; - } - return inflect.underscore(inflect.demodulize(class_name)) + (separate_class_name_and_id_with_underscore ? "_id" : "id"); -}; - -// Turns a number into an ordinal string used to denote the position in an -// ordered sequence such as 1st, 2nd, 3rd, 4th. -// -// ordinalize(1) // => "1st" -// ordinalize(2) // => "2nd" -// ordinalize(1002) // => "1002nd" -// ordinalize(1003) // => "1003rd" -// ordinalize(-11) // => "-11th" -// ordinalize(-1021) // => "-1021st" -inflect.ordinalize = function (number) { - var _ref; - number = parseInt(number); - if ((_ref = Math.abs(number) % 100) === 11 || _ref === 12 || _ref === 13) { - return "" + number + "th"; - } else { - switch (Math.abs(number) % 10) { - case 1: - return "" + number + "st"; - case 2: - return "" + number + "nd"; - case 3: - return "" + number + "rd"; - default: - return "" + number + "th"; - } - } -}; - -// Checks a given word for uncountability -// -// "money".uncountability() // => true -// "my money".uncountability() // => true -inflect.uncountability = function (word) { - return inflect.inflections.uncountables.some(function(ele, ind, arr) { - return word.match(new RegExp("(\\b|_)" + ele + "$", 'i')) != null; - }); -}; - -// Returns the plural form of the word in the string. -// -// "post".pluralize() // => "posts" -// "octopus".pluralize() // => "octopi" -// "sheep".pluralize() // => "sheep" -// "words".pluralize() // => "words" -// "CamelOctopus".pluralize() // => "CamelOctopi" -inflect.pluralize = function (word) { - var plural, result; - result = word; - if (word === '' || inflect.uncountability(word)) { - return result; - } else { - for (var i = 0; i < inflect.inflections.plurals.length; i++) { - plural = inflect.inflections.plurals[i]; - result = util.string.gsub(result, plural[0], plural[1]); - if (word.match(plural[0]) != null) break; - } - return result; - } -}; - -// The reverse of _pluralize_, returns the singular form of a word in a string. -// -// "posts".singularize() // => "post" -// "octopi".singularize() // => "octopus" -// "sheep".singularize() // => "sheep" -// "word".singularize() // => "word" -// "CamelOctopi".singularize() // => "CamelOctopus" -inflect.singularize = function (word) { - var result, singular; - result = word; - if (word === '' || inflect.uncountability(word)) { - return result; - } else { - for (var i = 0; i < inflect.inflections.singulars.length; i++) { - singular = inflect.inflections.singulars[i]; - result = util.string.gsub(result, singular[0], singular[1]); - if (word.match(singular[0])) break; - } - return result; - } -}; - -// Capitalizes the first word and turns underscores into spaces and strips a -// trailing "_id", if any. Like _titleize_, this is meant for creating pretty output. -// -// "employee_salary".humanize() // => "Employee salary" -// "author_id".humanize() // => "Author" -inflect.humanize = function (lower_case_and_underscored_word) { - var human, result; - result = lower_case_and_underscored_word; - for (var i = 0; i < inflect.inflections.humans.length; i++) { - human = inflect.inflections.humans[i]; - result = util.string.gsub(result, human[0], human[1]); - } - result = util.string.gsub(result, /_id$/, ""); - result = util.string.gsub(result, /_/, " "); - return util.string.capitalize(result, true); -}; - -// Capitalizes all the words and replaces some characters in the string to create -// a nicer looking title. _titleize_ is meant for creating pretty output. It is not -// used in the Bullet internals. -// -// -// "man from the boondocks".titleize() // => "Man From The Boondocks" -// "x-men: the last stand".titleize() // => "X Men: The Last Stand" -inflect.titleize = function (word) { - var self; - self = inflect.humanize(inflect.underscore(word)); - self = util.string.gsub(self, /[^a-zA-Z:']/, ' '); - return util.string.capitalize(self); -}; - -// Create the name of a table like Bullet does for models to table names. This method -// uses the _pluralize_ method on the last word in the string. -// -// "RawScaledScorer".tableize() // => "raw_scaled_scorers" -// "egg_and_ham".tableize() // => "egg_and_hams" -// "fancyCategory".tableize() // => "fancy_categories" -inflect.tableize = function (class_name) { - return inflect.pluralize(inflect.underscore(class_name)); -}; - -// Create a class name from a plural table name like Bullet does for table names to models. -// Note that this returns a string and not a Class. -// -// "egg_and_hams".classify() // => "EggAndHam" -// "posts".classify() // => "Post" -// -// Singular names are not handled correctly: -// -// "business".classify() // => "Busines" -inflect.classify = function (table_name) { - return inflect.camelize(inflect.singularize(util.string.gsub(table_name, /.*\./, ''))); -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/native.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/native.js deleted file mode 100644 index d2c8de10..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/native.js +++ /dev/null @@ -1,26 +0,0 @@ -module.exports = function (obj) { - - var addProperty = function (method, func) { - String.prototype.__defineGetter__(method, func); - } - - var stringPrototypeBlacklist = [ - '__defineGetter__', '__defineSetter__', '__lookupGetter__', '__lookupSetter__', 'charAt', 'constructor', - 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf', 'charCodeAt', - 'indexOf', 'lastIndexof', 'length', 'localeCompare', 'match', 'replace', 'search', 'slice', 'split', 'substring', - 'toLocaleLowerCase', 'toLocaleUpperCase', 'toLowerCase', 'toUpperCase', 'trim', 'trimLeft', 'trimRight', 'gsub' - ]; - - Object.keys(obj).forEach(function (key) { - if (key != 'inflect' && key != 'inflections') { - if (stringPrototypeBlacklist.indexOf(key) !== -1) { - console.log('warn: You should not override String.prototype.' + key); - } else { - addProperty(key, function () { - return obj[key](this); - }); - } - } - }); - -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/util.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/util.js deleted file mode 100644 index 87ebd3ef..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/lib/util.js +++ /dev/null @@ -1,136 +0,0 @@ -// Some utility functions in js - -var u = module.exports = { - array: { - // Returns a copy of the array with the value removed once - // - // [1, 2, 3, 1].del 1 #=> [2, 3, 1] - // [1, 2, 3].del 4 #=> [1, 2, 3] - del: function (arr, val) { - var index = arr.indexOf(val); - if (index != -1) { - if (index == 0) { - return arr.slice(1) - } else { - return arr.slice(0, index).concat(arr.slice(index+1)); - } - } else { - return arr; - } - }, - - // Returns the first element of the array - // - // [1, 2, 3].first() #=> 1 - first: function(arr) { - return arr[0]; - }, - - // Returns the last element of the array - // - // [1, 2, 3].last() #=> 3 - last: function(arr) { - return arr[arr.length-1]; - } - }, - string: { - // Returns a copy of str with all occurrences of pattern replaced with either replacement or the return value of a function. - // The pattern will typically be a Regexp; if it is a String then no regular expression metacharacters will be interpreted - // (that is /\d/ will match a digit, but ‘\d’ will match a backslash followed by a ‘d’). - // - // In the function form, the current match object is passed in as a parameter to the function, and variables such as - // $[1], $[2], $[3] (where $ is the match object) will be set appropriately. The value returned by the function will be - // substituted for the match on each call. - // - // The result inherits any tainting in the original string or any supplied replacement string. - // - // "hello".gsub /[aeiou]/, '*' #=> "h*ll*" - // "hello".gsub /[aeiou]/, '<$1>' #=> "hll" - // "hello".gsub /[aeiou]/, ($) { - // "<#{$[1]}>" #=> "hll" - // - gsub: function (str, pattern, replacement) { - var i, match, matchCmpr, matchCmprPrev, replacementStr, result, self; - if (!((pattern != null) && (replacement != null))) return u.string.value(str); - result = ''; - self = str; - while (self.length > 0) { - if ((match = self.match(pattern))) { - result += self.slice(0, match.index); - if (typeof replacement === 'function') { - match[1] = match[1] || match[0]; - result += replacement(match); - } else if (replacement.match(/\$[1-9]/)) { - matchCmprPrev = match; - matchCmpr = u.array.del(match, void 0); - while (matchCmpr !== matchCmprPrev) { - matchCmprPrev = matchCmpr; - matchCmpr = u.array.del(matchCmpr, void 0); - } - match[1] = match[1] || match[0]; - replacementStr = replacement; - for (i = 1; i <= 9; i++) { - if (matchCmpr[i]) { - replacementStr = u.string.gsub(replacementStr, new RegExp("\\\$" + i), matchCmpr[i]); - } - } - result += replacementStr; - } else { - result += replacement; - } - self = self.slice(match.index + match[0].length); - } else { - result += self; - self = ''; - } - } - return result; - }, - - // Returns a copy of the String with the first letter being upper case - // - // "hello".upcase #=> "Hello" - upcase: function(str) { - var self = u.string.gsub(str, /_([a-z])/, function ($) { - return "_" + $[1].toUpperCase(); - }); - self = u.string.gsub(self, /\/([a-z])/, function ($) { - return "/" + $[1].toUpperCase(); - }); - return self[0].toUpperCase() + self.substr(1); - }, - - // Returns a copy of capitalized string - // - // "employee salary" #=> "Employee Salary" - capitalize: function (str, spaces) { - var self = str.toLowerCase(); - if(!spaces) { - self = u.string.gsub(self, /\s([a-z])/, function ($) { - return " " + $[1].toUpperCase(); - }); - } - return self[0].toUpperCase() + self.substr(1); - }, - - // Returns a copy of the String with the first letter being lower case - // - // "HELLO".downcase #=> "hELLO" - downcase: function(str) { - var self = u.string.gsub(str, /_([A-Z])/, function ($) { - return "_" + $[1].toLowerCase(); - }); - self = u.string.gsub(self, /\/([A-Z])/, function ($) { - return "/" + $[1].toLowerCase(); - }); - return self[0].toLowerCase() + self.substr(1); - }, - - // Returns a string value for the String object - // - // "hello".value() #=> "hello" - value: function (str) { - return str.substr(0); - } - } -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/package.json deleted file mode 100644 index 4df7e838..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "i", - "version": "0.3.2", - "author": { - "name": "Pavan Kumar Sunkara", - "email": "pavan.sss1991@gmail.com", - "url": "pksunkara.github.com" - }, - "description": "custom inflections for nodejs", - "main": "./lib/inflect", - "repository": { - "type": "git", - "url": "git://github.com/pksunkara/inflect.git" - }, - "keywords": [ - "singular", - "plural", - "camelize", - "underscore", - "dasherize", - "demodulize", - "ordinalize", - "uncountable", - "pluralize", - "singularize", - "titleize", - "tableize", - "classify", - "foreign_key" - ], - "homepage": "http://pksunkara.github.com/inflect", - "scripts": { - "test": "./node_modules/.bin/vows --spec $(find test -name '*-test.js')" - }, - "contributors": [ - { - "name": "Pavan Kumar Sunkara", - "email": "pavan.sss1991@gmail.com" - } - ], - "dependencies": {}, - "devDependencies": { - "vows": "~0.6.1" - }, - "engines": { - "node": ">=0.4" - }, - "bugs": { - "url": "https://github.com/pksunkara/inflect/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/pksunkara/inflect/raw/master/LICENSE" - } - ], - "readme": "# inflect\n\ncustomizable inflections for nodejs\n\n## Installation\n\n```bash\nnpm install i\n```\n\n## Usage\n\nRequire the module before using\n\n```js\nvar inflect = require('i')();\n```\n\nAll the below api functions can be called directly on a string\n\n```js\ninflect.titleize('messages to store') // === 'Messages To Store'\n'messages to store'.titleize // === 'Messages To Store'\n```\n\nonly if `true` is passed while initiating\n\n```js\nvar inflect = require('i')(true);\n```\n\n### Pluralize\n\n```js\ninflect.pluralize('person'); // === 'people'\ninflect.pluralize('octopus'); // === 'octopi'\ninflect.pluralize('Hat'); // === 'Hats'\n```\n\n### Singularize\n\n```js\ninflect.singularize('people'); // === 'person'\ninflect.singularize('octopi'); // === 'octopus'\ninflect.singularize('Hats'); // === 'Hat'\n```\n\n### Camelize\n\n```js\ninflect.camelize('message_properties'); // === 'MessageProperties'\ninflect.camelize('message_properties', false); // === 'messageProperties'\n```\n\n### Underscore\n\n```js\ninflect.underscore('MessageProperties'); // === 'message_properties'\ninflect.underscore('messageProperties'); // === 'message_properties'\n```\n\n### Humanize\n\n```js\ninflect.humanize('message_id'); // === 'Message'\n```\n\n### Dasherize\n\n```js\ninflect.dasherize('message_properties'); // === 'message-properties'\ninflect.dasherize('Message Properties'); // === 'Message Properties'\n```\n\n### Titleize\n\n```js\ninflect.titleize('message_properties'); // === 'Message Properties'\ninflect.titleize('message properties to keep'); // === 'Message Properties to Keep'\n```\n\n### Demodulize\n\n```js\ninflect.demodulize('Message.Bus.Properties'); // === 'Properties'\n```\n\n### Tableize\n\n```js\ninflect.tableize('MessageBusProperty'); // === 'message_bus_properties'\n```\n\n### Classify\n\n```js\ninflect.classify('message_bus_properties'); // === 'MessageBusProperty'\n```\n\n### Foreign key\n\n```js\ninflect.foreign_key('MessageBusProperty'); // === 'message_bus_property_id'\ninflect.foreign_key('MessageBusProperty', false); // === 'message_bus_propertyid'\n```\n\n### Ordinalize\n\n```js\ninflect.ordinalize( '1' ); // === '1st'\n```\n\n## Custom rules for inflection\n\n### Custom plural\n\nWe can use regexp in any of these custom rules\n\n```js\ninflect.inflections.plural('person', 'guys');\ninflect.pluralize('person'); // === 'guys'\ninflect.singularize('guys'); // === 'guy'\n```\n\n### Custom singular\n\n```js\ninflect.inflections.singular('guys', 'person')\ninflect.singularize('guys'); // === 'person'\ninflect.pluralize('person'); // === 'people'\n```\n\n### Custom irregular\n\n```js\ninflect.inflections.irregular('person', 'guys')\ninflect.pluralize('person'); // === 'guys'\ninflect.singularize('guys'); // === 'person'\n```\n\n### Custom human\n\n```js\ninflect.inflections.human(/^(.*)_cnt$/i, '$1_count');\ninflect.inflections.humanize('jargon_cnt'); // === 'Jargon count'\n```\n\n### Custom uncountable\n\n```js\ninflect.inflections.uncountable('oil')\ninflect.pluralize('oil'); // === 'oil'\ninflect.singularize('oil'); // === 'oil'\n```\n\n## Contributors\nHere is a list of [Contributors](http://github.com/pksunkara/inflect/contributors)\n\n### TODO\n\n- More obscure test cases\n\n__I accept pull requests and guarantee a reply back within a day__\n\n## License\nMIT/X11\n\n## Bug Reports\nReport [here](http://github.com/pksunkara/inflect/issues). __Guaranteed reply within a day__.\n\n## Contact\nPavan Kumar Sunkara (pavan.sss1991@gmail.com)\n\nFollow me on [github](https://github.com/users/follow?target=pksunkara), [twitter](http://twitter.com/pksunkara)\n", - "readmeFilename": "README.md", - "_id": "i@0.3.2", - "_from": "i@0.3.x" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/cases.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/cases.js deleted file mode 100644 index 04c60302..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/cases.js +++ /dev/null @@ -1,209 +0,0 @@ -(function() { - - module.exports = { - SingularToPlural: { - "search": "searches", - "switch": "switches", - "fix": "fixes", - "box": "boxes", - "process": "processes", - "address": "addresses", - "case": "cases", - "stack": "stacks", - "wish": "wishes", - "fish": "fish", - "jeans": "jeans", - "funky jeans": "funky jeans", - "my money": "my money", - "category": "categories", - "query": "queries", - "ability": "abilities", - "agency": "agencies", - "movie": "movies", - "archive": "archives", - "index": "indices", - "wife": "wives", - "safe": "saves", - "half": "halves", - "move": "moves", - "salesperson": "salespeople", - "person": "people", - "spokesman": "spokesmen", - "man": "men", - "woman": "women", - "basis": "bases", - "diagnosis": "diagnoses", - "diagnosis_a": "diagnosis_as", - "datum": "data", - "medium": "media", - "stadium": "stadia", - "analysis": "analyses", - "node_child": "node_children", - "child": "children", - "experience": "experiences", - "day": "days", - "comment": "comments", - "foobar": "foobars", - "newsletter": "newsletters", - "old_news": "old_news", - "news": "news", - "series": "series", - "species": "species", - "quiz": "quizzes", - "perspective": "perspectives", - "ox": "oxen", - "photo": "photos", - "buffalo": "buffaloes", - "tomato": "tomatoes", - "dwarf": "dwarves", - "elf": "elves", - "information": "information", - "equipment": "equipment", - "bus": "buses", - "status": "statuses", - "status_code": "status_codes", - "mouse": "mice", - "louse": "lice", - "house": "houses", - "octopus": "octopi", - "virus": "viri", - "alias": "aliases", - "portfolio": "portfolios", - "vertex": "vertices", - "matrix": "matrices", - "matrix_fu": "matrix_fus", - "axis": "axes", - "testis": "testes", - "crisis": "crises", - "rice": "rice", - "shoe": "shoes", - "horse": "horses", - "prize": "prizes", - "edge": "edges", - "cow": "kine", - "database": "databases" - }, - CamelToUnderscore: { - "Product": "product", - "SpecialGuest": "special_guest", - "ApplicationController": "application_controller", - "Area51Controller": "area51_controller" - }, - UnderscoreToLowerCamel: { - "product": "product", - "Widget": "widget", - "special_guest": "specialGuest", - "application_controller": "applicationController", - "area51_controller": "area51Controller" - }, - CamelToUnderscoreWithoutReverse: { - "HTMLTidy": "html_tidy", - "HTMLTidyGenerator": "html_tidy_generator", - "FreeBSD": "free_bsd", - "HTML": "html" - }, - CamelWithModuleToUnderscoreWithSlash: { - "Admin.Product": "admin/product", - "Users.Commission.Department": "users/commission/department", - "UsersSection.CommissionDepartment": "users_section/commission_department" - }, - ClassNameToForeignKeyWithUnderscore: { - "Person": "person_id", - "MyApplication.Billing.Account": "account_id" - }, - ClassNameToForeignKeyWithoutUnderscore: { - "Person": "personid", - "MyApplication.Billing.Account": "accountid" - }, - ClassNameToTableName: { - "PrimarySpokesman": "primary_spokesmen", - "NodeChild": "node_children" - }, - UnderscoreToHuman: { - "employee_salary": "Employee salary", - "employee_id": "Employee", - "underground": "Underground" - }, - MixtureToTitleCase: { - 'bullet_record': 'Bullet Record', - 'BulletRecord': 'Bullet Record', - 'bullet web service': 'Bullet Web Service', - 'Bullet Web Service': 'Bullet Web Service', - 'Bullet web service': 'Bullet Web Service', - 'bulletwebservice': 'Bulletwebservice', - 'Bulletwebservice': 'Bulletwebservice', - "pavan's code": "Pavan's Code", - "Pavan's code": "Pavan's Code", - "pavan's Code": "Pavan's Code" - }, - OrdinalNumbers: { - "-1": "-1st", - "-2": "-2nd", - "-3": "-3rd", - "-4": "-4th", - "-5": "-5th", - "-6": "-6th", - "-7": "-7th", - "-8": "-8th", - "-9": "-9th", - "-10": "-10th", - "-11": "-11th", - "-12": "-12th", - "-13": "-13th", - "-14": "-14th", - "-20": "-20th", - "-21": "-21st", - "-22": "-22nd", - "-23": "-23rd", - "-24": "-24th", - "-100": "-100th", - "-101": "-101st", - "-102": "-102nd", - "-103": "-103rd", - "-104": "-104th", - "-110": "-110th", - "-111": "-111th", - "-112": "-112th", - "-113": "-113th", - "-1000": "-1000th", - "-1001": "-1001st", - "0": "0th", - "1": "1st", - "2": "2nd", - "3": "3rd", - "4": "4th", - "5": "5th", - "6": "6th", - "7": "7th", - "8": "8th", - "9": "9th", - "10": "10th", - "11": "11th", - "12": "12th", - "13": "13th", - "14": "14th", - "20": "20th", - "21": "21st", - "22": "22nd", - "23": "23rd", - "24": "24th", - "100": "100th", - "101": "101st", - "102": "102nd", - "103": "103rd", - "104": "104th", - "110": "110th", - "111": "111th", - "112": "112th", - "113": "113th", - "1000": "1000th", - "1001": "1001st" - }, - UnderscoresToDashes: { - "street": "street", - "street_address": "street-address", - "person_street_address": "person-street-address" - } - }; - -}).call(this); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/inflections-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/inflections-test.js deleted file mode 100644 index be8d9605..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/inflections-test.js +++ /dev/null @@ -1,87 +0,0 @@ -(function() { - var assert, vows; - - vows = require('vows'); - - assert = require('assert'); - - vows.describe('Module Inflector inflections').addBatch({ - 'Test inflector inflections': { - topic: require('../../lib/inflections'), - 'clear': { - 'single': function(topic) { - topic.uncountables = [1, 2, 3]; - topic.humans = [1, 2, 3]; - topic.clear('uncountables'); - assert.isEmpty(topic.uncountables); - return assert.deepEqual(topic.humans, [1, 2, 3]); - }, - 'all': function(topic) { - assert.deepEqual(topic.humans, [1, 2, 3]); - topic.uncountables = [1, 2, 3]; - topic.clear(); - assert.isEmpty(topic.uncountables); - return assert.isEmpty(topic.humans); - } - }, - 'uncountable': { - 'one item': function(topic) { - topic.clear(); - assert.isEmpty(topic.uncountables); - topic.uncountable('money'); - return assert.deepEqual(topic.uncountables, ['money']); - }, - 'many items': function(topic) { - topic.clear(); - assert.isEmpty(topic.uncountables); - topic.uncountable(['money', 'rice']); - return assert.deepEqual(topic.uncountables, ['money', 'rice']); - } - }, - 'human': function(topic) { - topic.clear(); - assert.isEmpty(topic.humans); - topic.human("legacy_col_person_name", "Name"); - return assert.deepEqual(topic.humans, [["legacy_col_person_name", "Name"]]); - }, - 'plural': function(topic) { - topic.clear(); - assert.isEmpty(topic.plurals); - topic.plural('ox', 'oxen'); - assert.deepEqual(topic.plurals, [['ox', 'oxen']]); - topic.uncountable('money'); - assert.deepEqual(topic.uncountables, ['money']); - topic.uncountable('monies'); - topic.plural('money', 'monies'); - assert.deepEqual(topic.plurals, [['money', 'monies'], ['ox', 'oxen']]); - return assert.isEmpty(topic.uncountables); - }, - 'singular': function(topic) { - topic.clear(); - assert.isEmpty(topic.singulars); - topic.singular('ox', 'oxen'); - assert.deepEqual(topic.singulars, [['ox', 'oxen']]); - topic.uncountable('money'); - assert.deepEqual(topic.uncountables, ['money']); - topic.uncountable('monies'); - topic.singular('money', 'monies'); - assert.deepEqual(topic.singulars, [['money', 'monies'], ['ox', 'oxen']]); - return assert.isEmpty(topic.uncountables); - }, - 'irregular': function(topic) { - topic.clear(); - topic.uncountable(['octopi', 'octopus']); - assert.deepEqual(topic.uncountables, ['octopi', 'octopus']); - topic.irregular('octopus', 'octopi'); - assert.isEmpty(topic.uncountables); - assert.equal(topic.singulars[0][0].toString(), /(o)ctopi$/i.toString()); - assert.equal(topic.singulars[0][1], '$1ctopus'); - assert.equal(topic.plurals[0][0].toString(), /(o)ctopi$/i.toString()); - assert.equal(topic.plurals[0][1], '$1ctopi'); - assert.equal(topic.plurals[1][0].toString(), /(o)ctopus$/i.toString()); - return assert.equal(topic.plurals[1][1].toString(), '$1ctopi'); - } - } - })["export"](module); - -}).call(this); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/methods-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/methods-test.js deleted file mode 100644 index d3f0c84d..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/inflector/methods-test.js +++ /dev/null @@ -1,342 +0,0 @@ -(function() { - var assert, cases, vows, util; - - vows = require('vows'); - - assert = require('assert'); - - util = require('../../lib/util'); - - cases = require('./cases'); - - vows.describe('Module Inflector methods').addBatch({ - 'Test inflector method': { - topic: require('../../lib/methods'), - 'camelize': { - 'word': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.CamelToUnderscore; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.camelize(words[i]), i)); - } - return _results; - }, - 'word with first letter lower': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.UnderscoreToLowerCamel; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.camelize(i, false), words[i])); - } - return _results; - }, - 'path': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.CamelWithModuleToUnderscoreWithSlash; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.camelize(words[i]), i)); - } - return _results; - }, - 'path with first letter lower': function(topic) { - return assert.equal(topic.camelize('bullet_record/errors', false), 'bulletRecord.Errors'); - } - }, - 'underscore': { - 'word': function(topic) { - var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; - words = cases.CamelToUnderscore; - _ref = Object.keys(words); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - assert.equal(topic.underscore(i), words[i]); - } - words = cases.CamelToUnderscoreWithoutReverse; - _ref2 = Object.keys(words); - _results = []; - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - i = _ref2[_j]; - _results.push(assert.equal(topic.underscore(i), words[i])); - } - return _results; - }, - 'path': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.CamelWithModuleToUnderscoreWithSlash; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.underscore(i), words[i])); - } - return _results; - }, - 'from dasherize': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.UnderscoresToDashes; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.underscore(topic.dasherize(i)), i)); - } - return _results; - } - }, - 'dasherize': { - 'underscored_word': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.UnderscoresToDashes; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.dasherize(i), words[i])); - } - return _results; - } - }, - 'demodulize': { - 'module name': function(topic) { - return assert.equal(topic.demodulize('BulletRecord.CoreExtensions.Inflections'), 'Inflections'); - }, - 'isolated module name': function(topic) { - return assert.equal(topic.demodulize('Inflections'), 'Inflections'); - } - }, - 'foreign_key': { - 'normal': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.ClassNameToForeignKeyWithoutUnderscore; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.foreign_key(i, false), words[i])); - } - return _results; - }, - 'with_underscore': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.ClassNameToForeignKeyWithUnderscore; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.foreign_key(i), words[i])); - } - return _results; - } - }, - 'ordinalize': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.OrdinalNumbers; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.ordinalize(i), words[i])); - } - return _results; - } - } - }).addBatch({ - 'Test inflector inflection methods': { - topic: function() { - var Inflector; - Inflector = require('../../lib/methods'); - Inflector.inflections["default"](); - return Inflector; - }, - 'pluralize': { - 'empty': function(topic) { - return assert.equal(topic.pluralize(''), ''); - }, - 'uncountable': function(topic) { - return assert.equal(topic.pluralize('money'), 'money'); - }, - 'normal': function(topic) { - topic.inflections.irregular('octopus', 'octopi'); - return assert.equal(topic.pluralize('octopus'), 'octopi'); - }, - 'cases': function(topic) { - var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; - words = cases.SingularToPlural; - _ref = Object.keys(words); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - assert.equal(topic.pluralize(i), words[i]); - } - _ref2 = Object.keys(words); - _results = []; - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - i = _ref2[_j]; - _results.push(assert.equal(topic.pluralize(util.string.capitalize(i)), util.string.capitalize(words[i]))); - } - return _results; - }, - 'cases plural': function(topic) { - var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; - words = cases.SingularToPlural; - _ref = Object.keys(words); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - assert.equal(topic.pluralize(words[i]), words[i]); - } - _ref2 = Object.keys(words); - _results = []; - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - i = _ref2[_j]; - _results.push(assert.equal(topic.pluralize(util.string.capitalize(words[i])), util.string.capitalize(words[i]))); - } - return _results; - } - }, - 'singuralize': { - 'empty': function(topic) { - return assert.equal(topic.singularize(''), ''); - }, - 'uncountable': function(topic) { - return assert.equal(topic.singularize('money'), 'money'); - }, - 'normal': function(topic) { - topic.inflections.irregular('octopus', 'octopi'); - return assert.equal(topic.singularize('octopi'), 'octopus'); - }, - 'cases': function(topic) { - var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; - words = cases.SingularToPlural; - _ref = Object.keys(words); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - assert.equal(topic.singularize(words[i]), i); - } - _ref2 = Object.keys(words); - _results = []; - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - i = _ref2[_j]; - _results.push(assert.equal(topic.singularize(util.string.capitalize(words[i])), util.string.capitalize(i))); - } - return _results; - } - }, - 'uncountablility': { - 'normal': function(topic) { - var i, words, _i, _j, _k, _len, _len2, _len3, _results; - words = topic.inflections.uncountables; - for (_i = 0, _len = words.length; _i < _len; _i++) { - i = words[_i]; - assert.equal(topic.singularize(i), i); - } - for (_j = 0, _len2 = words.length; _j < _len2; _j++) { - i = words[_j]; - assert.equal(topic.pluralize(i), i); - } - _results = []; - for (_k = 0, _len3 = words.length; _k < _len3; _k++) { - i = words[_k]; - _results.push(assert.equal(topic.singularize(i), topic.pluralize(i))); - } - return _results; - }, - 'greedy': function(topic) { - var countable_word, uncountable_word; - uncountable_word = "ors"; - countable_word = "sponsor"; - topic.inflections.uncountable(uncountable_word); - assert.equal(topic.singularize(uncountable_word), uncountable_word); - assert.equal(topic.pluralize(uncountable_word), uncountable_word); - assert.equal(topic.pluralize(uncountable_word), topic.singularize(uncountable_word)); - assert.equal(topic.singularize(countable_word), 'sponsor'); - assert.equal(topic.pluralize(countable_word), 'sponsors'); - return assert.equal(topic.singularize(topic.pluralize(countable_word)), 'sponsor'); - } - }, - 'humanize': { - 'normal': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.UnderscoreToHuman; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.humanize(i), words[i])); - } - return _results; - }, - 'with rule': function(topic) { - topic.inflections.human(/^(.*)_cnt$/i, '$1_count'); - topic.inflections.human(/^prefix_(.*)$/i, '$1'); - assert.equal(topic.humanize('jargon_cnt'), 'Jargon count'); - return assert.equal(topic.humanize('prefix_request'), 'Request'); - }, - 'with string': function(topic) { - topic.inflections.human('col_rpted_bugs', 'Reported bugs'); - assert.equal(topic.humanize('col_rpted_bugs'), 'Reported bugs'); - return assert.equal(topic.humanize('COL_rpted_bugs'), 'Col rpted bugs'); - }, - 'with _id': function(topic) { - return assert.equal(topic.humanize('author_id'), 'Author'); - } - }, - 'titleize': { - 'normal': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.MixtureToTitleCase; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.titleize(i), words[i])); - } - return _results; - }, - 'with hyphens': function(topic) { - return assert.equal(topic.titleize('x-men: the last stand'), 'X Men: The Last Stand'); - } - }, - 'tableize': function(topic) { - var i, words, _i, _len, _ref, _results; - words = cases.ClassNameToTableName; - _ref = Object.keys(words); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - _results.push(assert.equal(topic.tableize(i), words[i])); - } - return _results; - }, - 'classify': { - 'underscore': function(topic) { - var i, words, _i, _j, _len, _len2, _ref, _ref2, _results; - words = cases.ClassNameToTableName; - _ref = Object.keys(words); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - i = _ref[_i]; - assert.equal(topic.classify(words[i]), i); - } - _ref2 = Object.keys(words); - _results = []; - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - i = _ref2[_j]; - _results.push(assert.equal(topic.classify('table_prefix.' + words[i]), i)); - } - return _results; - }, - 'normal': function(topic) { - topic.inflections.irregular('octopus', 'octopi'); - return assert.equal(topic.classify('octopi'), 'Octopus'); - } - } - } - })["export"](module); - -}).call(this); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/utils/array-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/utils/array-test.js deleted file mode 100644 index 95ba2bc5..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/utils/array-test.js +++ /dev/null @@ -1,39 +0,0 @@ -(function() { - var assert, vows, util; - - vows = require('vows'); - - assert = require('assert'); - - util = require('../../lib/util'); - - vows.describe('Module core extension Array').addBatch({ - 'Testing del': { - topic: ['a', 'b', 'c'], - 'element exists': { - 'first element': function(topic) { - return assert.deepEqual(util.array.del(topic, 'a'), ['b', 'c']); - }, - 'middle element': function(topic) { - return assert.deepEqual(util.array.del(topic, 'b'), ['a', 'c']); - }, - 'last element': function(topic) { - return assert.deepEqual(util.array.del(topic, 'c'), ['a', 'b']); - } - }, - 'element does not exist': function(topic) { - return assert.deepEqual(util.array.del(topic, 'd'), ['a', 'b', 'c']); - } - }, - 'Testing utils': { - topic: ['a', 'b', 'c'], - 'first': function(topic) { - return assert.equal(util.array.first(topic), 'a'); - }, - 'last': function(topic) { - return assert.equal(util.array.last(topic), 'c'); - } - } - })["export"](module); - -}).call(this); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/utils/string-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/utils/string-test.js deleted file mode 100644 index e9322331..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/i/test/utils/string-test.js +++ /dev/null @@ -1,88 +0,0 @@ -(function() { - var assert, vows, util; - - vows = require('vows'); - - assert = require('assert'); - - util = require('../../lib/util'); - - vows.describe('Module core extension String').addBatch({ - 'Testing value': { - topic: 'bullet', - 'join the keys': function(topic) { - return assert.equal(util.string.value(topic), 'bullet'); - } - }, - 'Testing gsub': { - topic: 'bullet', - 'when no args': function(topic) { - return assert.equal(util.string.gsub(topic), 'bullet'); - }, - 'when only 1 arg': function(topic) { - return assert.equal(util.string.gsub(topic, /./), 'bullet'); - }, - 'when given proper args': function(topic) { - return assert.equal(util.string.gsub(topic, /[aeiou]/, '*'), 'b*ll*t'); - }, - 'when replacement is a function': { - 'with many groups': function(topic) { - var str; - str = util.string.gsub(topic, /([aeiou])(.)/, function($) { - return "<" + $[1] + ">" + $[2]; - }); - return assert.equal(str, 'bllt'); - }, - 'with no groups': function(topic) { - var str; - str = util.string.gsub(topic, /[aeiou]/, function($) { - return "<" + $[1] + ">"; - }); - return assert.equal(str, 'bllt'); - } - }, - 'when replacement is special': { - 'with many groups': function(topic) { - return assert.equal(util.string.gsub(topic, /([aeiou])(.)/, '<$1>$2'), 'bllt'); - }, - 'with no groups': function(topic) { - return assert.equal(util.string.gsub(topic, /[aeiou]/, '<$1>'), 'bllt'); - } - } - }, - 'Testing capitalize': { - topic: 'employee salary', - 'normal': function(topic) { - return assert.equal(util.string.capitalize(topic), 'Employee Salary'); - } - }, - 'Testing upcase': { - topic: 'bullet', - 'only first letter should be upcase': function(topic) { - return assert.equal(util.string.upcase(topic), 'Bullet'); - }, - 'letter after underscore': function(topic) { - return assert.equal(util.string.upcase('bullet_record'), 'Bullet_Record'); - }, - 'letter after slash': function(topic) { - return assert.equal(util.string.upcase('bullet_record/errors'), 'Bullet_Record/Errors'); - }, - 'no letter after space': function(topic) { - return assert.equal(util.string.upcase('employee salary'), 'Employee salary'); - } - }, - 'Testing downcase': { - topic: 'BULLET', - 'only first letter should be downcase': function(topic) { - return assert.equal(util.string.downcase(topic), 'bULLET'); - }, - 'letter after underscore': function(topic) { - return assert.equal(util.string.downcase('BULLET_RECORD'), 'bULLET_rECORD'); - }, - 'letter after slash': function(topic) { - return assert.equal(util.string.downcase('BULLET_RECORD/ERRORS'), 'bULLET_rECORD/eRRORS'); - } - } - })["export"](module); - -}).call(this); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/.npmignore b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/.npmignore deleted file mode 100644 index 9303c347..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -npm-debug.log \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/.travis.yml b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/.travis.yml deleted file mode 100644 index 84fd7ca2..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - 0.6 - - 0.8 - - 0.9 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/LICENSE b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/examples/pow.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/examples/pow.js deleted file mode 100644 index e6924212..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/examples/pow.js +++ /dev/null @@ -1,6 +0,0 @@ -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/index.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/index.js deleted file mode 100644 index fda6de8a..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/index.js +++ /dev/null @@ -1,82 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP; - -function mkdirP (p, mode, f, made) { - if (typeof mode === 'function' || mode === undefined) { - f = mode; - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - var cb = f || function () {}; - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - fs.mkdir(p, mode, function (er) { - if (!er) { - made = made || p; - return cb(null, made); - } - switch (er.code) { - case 'ENOENT': - mkdirP(path.dirname(p), mode, function (er, made) { - if (er) cb(er, made); - else mkdirP(p, mode, cb, made); - }); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - fs.stat(p, function (er2, stat) { - // if the stat fails, then that's super weird. - // let the original error be the failure reason. - if (er2 || !stat.isDirectory()) cb(er, made) - else cb(null, made); - }); - break; - } - }); -} - -mkdirP.sync = function sync (p, mode, made) { - if (mode === undefined) { - mode = 0777 & (~process.umask()); - } - if (!made) made = null; - - if (typeof mode === 'string') mode = parseInt(mode, 8); - p = path.resolve(p); - - try { - fs.mkdirSync(p, mode); - made = made || p; - } - catch (err0) { - switch (err0.code) { - case 'ENOENT' : - made = sync(path.dirname(p), mode, made); - sync(p, mode, made); - break; - - // In the case of any other error, just see if there's a dir - // there already. If so, then hooray! If not, then something - // is borked. - default: - var stat; - try { - stat = fs.statSync(p); - } - catch (err1) { - throw err0; - } - if (!stat.isDirectory()) throw err0; - break; - } - } - - return made; -}; diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/package.json deleted file mode 100644 index 504acb6a..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "mkdirp", - "description": "Recursively mkdir, like `mkdir -p`", - "version": "0.3.5", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "main": "./index", - "keywords": [ - "mkdir", - "directory" - ], - "repository": { - "type": "git", - "url": "http://github.com/substack/node-mkdirp.git" - }, - "scripts": { - "test": "tap test/*.js" - }, - "devDependencies": { - "tap": "~0.4.0" - }, - "license": "MIT", - "readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-mkdirp/issues" - }, - "homepage": "https://github.com/substack/node-mkdirp", - "_id": "mkdirp@0.3.5", - "_from": "mkdirp@0.x.x" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/readme.markdown b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/readme.markdown deleted file mode 100644 index 83b0216a..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/readme.markdown +++ /dev/null @@ -1,63 +0,0 @@ -# mkdirp - -Like `mkdir -p`, but in node.js! - -[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp) - -# example - -## pow.js - -```js -var mkdirp = require('mkdirp'); - -mkdirp('/tmp/foo/bar/baz', function (err) { - if (err) console.error(err) - else console.log('pow!') -}); -``` - -Output - -``` -pow! -``` - -And now /tmp/foo/bar/baz exists, huzzah! - -# methods - -```js -var mkdirp = require('mkdirp'); -``` - -## mkdirp(dir, mode, cb) - -Create a new directory and any necessary subdirectories at `dir` with octal -permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -`cb(err, made)` fires with the error or the first directory `made` -that had to be created, if any. - -## mkdirp.sync(dir, mode) - -Synchronously create a new directory and any necessary subdirectories at `dir` -with octal permission string `mode`. - -If `mode` isn't specified, it defaults to `0777 & (~process.umask())`. - -Returns the first directory that had to be created, if any. - -# install - -With [npm](http://npmjs.org) do: - -``` -npm install mkdirp -``` - -# license - -MIT diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/chmod.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/chmod.js deleted file mode 100644 index 520dcb8e..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/chmod.js +++ /dev/null @@ -1,38 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -test('chmod-pre', function (t) { - var mode = 0744 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.equal(stat && stat.mode & 0777, mode, 'should be 0744'); - t.end(); - }); - }); -}); - -test('chmod', function (t) { - var mode = 0755 - mkdirp(file, mode, function (er) { - t.ifError(er, 'should not error'); - fs.stat(file, function (er, stat) { - t.ifError(er, 'should exist'); - t.ok(stat && stat.isDirectory(), 'should be directory'); - t.end(); - }); - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/clobber.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/clobber.js deleted file mode 100644 index 0eb70998..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/clobber.js +++ /dev/null @@ -1,37 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -var ps = [ '', 'tmp' ]; - -for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); -} - -var file = ps.join('/'); - -// a file in the way -var itw = ps.slice(0, 3).join('/'); - - -test('clobber-pre', function (t) { - console.error("about to write to "+itw) - fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.'); - - fs.stat(itw, function (er, stat) { - t.ifError(er) - t.ok(stat && stat.isFile(), 'should be file') - t.end() - }) -}) - -test('clobber', function (t) { - t.plan(2); - mkdirp(file, 0755, function (err) { - t.ok(err); - t.equal(err.code, 'ENOTDIR'); - t.end(); - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/mkdirp.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/mkdirp.js deleted file mode 100644 index b07cd70c..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/mkdirp.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('woo', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/perm.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/perm.js deleted file mode 100644 index 23a7abbd..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/perm.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('async perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); - -test('async root perm', function (t) { - mkdirp('/tmp', 0755, function (err) { - if (err) t.fail(err); - t.end(); - }); - t.end(); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/perm_sync.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/perm_sync.js deleted file mode 100644 index f685f609..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/perm_sync.js +++ /dev/null @@ -1,39 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync perm', function (t) { - t.plan(2); - var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json'; - - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); - -test('sync root perm', function (t) { - t.plan(1); - - var file = '/tmp'; - mkdirp.sync(file, 0755); - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/race.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/race.js deleted file mode 100644 index 96a04476..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/race.js +++ /dev/null @@ -1,41 +0,0 @@ -var mkdirp = require('../').mkdirp; -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('race', function (t) { - t.plan(4); - var ps = [ '', 'tmp' ]; - - for (var i = 0; i < 25; i++) { - var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - ps.push(dir); - } - var file = ps.join('/'); - - var res = 2; - mk(file, function () { - if (--res === 0) t.end(); - }); - - mk(file, function () { - if (--res === 0) t.end(); - }); - - function mk (file, cb) { - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - if (cb) cb(); - } - }) - }) - }); - } -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/rel.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/rel.js deleted file mode 100644 index 79858243..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/rel.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('rel', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var cwd = process.cwd(); - process.chdir('/tmp'); - - var file = [x,y,z].join('/'); - - mkdirp(file, 0755, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - process.chdir(cwd); - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/return.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/return.js deleted file mode 100644 index bce68e56..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/return.js +++ /dev/null @@ -1,25 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(4); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, '/tmp/' + x); - mkdirp(file, function (err, made) { - t.ifError(err); - t.equal(made, null); - }); - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/return_sync.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/return_sync.js deleted file mode 100644 index 7c222d35..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/return_sync.js +++ /dev/null @@ -1,24 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('return value', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - // should return the first dir created. - // By this point, it would be profoundly surprising if /tmp didn't - // already exist, since every other test makes things in there. - // Note that this will throw on failure, which will fail the test. - var made = mkdirp.sync(file); - t.equal(made, '/tmp/' + x); - - // making the same file again should have no effect. - made = mkdirp.sync(file); - t.equal(made, null); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/root.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/root.js deleted file mode 100644 index 97ad7a2f..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/root.js +++ /dev/null @@ -1,18 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('root', function (t) { - // '/' on unix, 'c:/' on windows. - var file = path.resolve('/'); - - mkdirp(file, 0755, function (err) { - if (err) throw err - fs.stat(file, function (er, stat) { - if (er) throw er - t.ok(stat.isDirectory(), 'target is a directory'); - t.end(); - }) - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/sync.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/sync.js deleted file mode 100644 index 7530cada..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('sync', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file, 0755); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0755); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/umask.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/umask.js deleted file mode 100644 index 64ccafe2..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/umask.js +++ /dev/null @@ -1,28 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('implicit mode from umask', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - mkdirp(file, function (err) { - if (err) t.fail(err); - else path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, 0777 & (~process.umask())); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }) - }) - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/umask_sync.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/umask_sync.js deleted file mode 100644 index 35bd5cbb..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/mkdirp/test/umask_sync.js +++ /dev/null @@ -1,32 +0,0 @@ -var mkdirp = require('../'); -var path = require('path'); -var fs = require('fs'); -var test = require('tap').test; - -test('umask sync modes', function (t) { - t.plan(2); - var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); - - var file = '/tmp/' + [x,y,z].join('/'); - - try { - mkdirp.sync(file); - } catch (err) { - t.fail(err); - return t.end(); - } - - path.exists(file, function (ex) { - if (!ex) t.fail('file not created') - else fs.stat(file, function (err, stat) { - if (err) t.fail(err) - else { - t.equal(stat.mode & 0777, (0777 & (~process.umask()))); - t.ok(stat.isDirectory(), 'target not a directory'); - t.end(); - } - }); - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/.npmignore b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/.npmignore deleted file mode 100644 index 9ecd205c..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -node_modules -.*.sw[op] -.DS_Store -test/fixtures/out diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/.travis.yml b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/.travis.yml deleted file mode 100644 index 3a05aef8..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js - -node_js: - - 0.4 - - 0.6 - - 0.7 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/LICENSE.md b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/LICENSE.md deleted file mode 100644 index e2b9b413..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/LICENSE.md +++ /dev/null @@ -1,21 +0,0 @@ -# MIT License - -###Copyright (C) 2011 by Charlie McConnell - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/README.md b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/README.md deleted file mode 100644 index 745fe99c..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/README.md +++ /dev/null @@ -1,46 +0,0 @@ -# ncp - Asynchronous recursive file & directory copying - -[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp) - -Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically. - -## Command Line usage - -Usage is simple: `ncp [source] [dest] [--limit=concurrency limit] -[--filter=filter] --stopOnErr` - -The 'filter' is a Regular Expression - matched files will be copied. - -The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time. - -'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any -errors arise, rather than attempting to continue while logging errors. - -If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue. - -## Programmatic usage - -Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. - -```javascript -var ncp = require('ncp').ncp; - -ncp.limit = 16; - -ncp(source, destination, function (err) { - if (err) { - return console.error(err); - } - console.log('done!'); -}); -``` - -You can also call ncp like `ncp(source, destination, options, callback)`. -`options` should be a dictionary. Currently, such options are available: - - * `options.filter` - a `RegExp` instance, against which each file name is - tested to determine whether to copy it or not, or a function taking single - parameter: copied file name, returning `true` or `false`, determining - whether to copy file or not. - -Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/bin/ncp b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/bin/ncp deleted file mode 100755 index 388eaba6..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/bin/ncp +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env node - - - - -var ncp = require('../lib/ncp'), - args = process.argv.slice(2), - source, dest; - -if (args.length < 2) { - console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]'); - process.exit(1); -} - -// parse arguments the hard way -function startsWith(str, prefix) { - return str.substr(0, prefix.length) == prefix; -} - -var options = {}; -args.forEach(function (arg) { - if (startsWith(arg, "--limit=")) { - options.limit = parseInt(arg.split('=', 2)[1], 10); - } - if (startsWith(arg, "--filter=")) { - options.filter = new RegExp(arg.split('=', 2)[1]); - } - if (startsWith(arg, "--stoponerr")) { - options.stopOnErr = true; - } -}); - -ncp.ncp(args[0], args[1], options, function (err) { - if (Array.isArray(err)) { - console.error('There were errors during the copy.'); - err.forEach(function (err) { - console.error(err.stack || err.message); - }); - process.exit(1); - } - else if (err) { - console.error('An error has occurred.'); - console.error(err.stack || err.message); - process.exit(1); - } -}); - - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/lib/ncp.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/lib/ncp.js deleted file mode 100644 index 82d64c39..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/lib/ncp.js +++ /dev/null @@ -1,216 +0,0 @@ -var fs = require('fs'), - path = require('path'); - -var ncp = exports; - -ncp.ncp = function (source, dest, options, callback) { - if (!callback) { - callback = options; - options = {}; - } - - var basePath = process.cwd(), - currentPath = path.resolve(basePath, source), - targetPath = path.resolve(basePath, dest), - filter = options.filter, - errs = null, - started = 0, - finished = 0, - running = 0, - limit = options.limit || ncp.limit || 16; - - limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit; - - startCopy(currentPath); - - function startCopy(source) { - started++; - if (filter) { - if (filter instanceof RegExp) { - if (!filter.test(source)) { - return cb(true); - } - } - else if (typeof filter === 'function') { - if (!filter(source)) { - return cb(true); - } - } - } - return getStats(source); - } - - function defer(fn) { - if (typeof(setImmediate) === 'function') - return setImmediate(fn); - return process.nextTick(fn); - } - - function getStats(source) { - if (running >= limit) { - return defer(function () { - getStats(source); - }); - } - running++; - fs.lstat(source, function (err, stats) { - var item = {}; - if (err) { - return onError(err); - } - - // We need to get the mode from the stats object and preserve it. - item.name = source; - item.mode = stats.mode; - - if (stats.isDirectory()) { - return onDir(item); - } - else if (stats.isFile()) { - return onFile(item); - } - else if (stats.isSymbolicLink()) { - // Symlinks don't really need to know about the mode. - return onLink(source); - } - }); - } - - function onFile(file) { - var target = file.name.replace(currentPath, targetPath); - isWritable(target, function (writable) { - if (writable) { - return copyFile(file, target); - } - rmFile(target, function () { - copyFile(file, target); - }); - }); - } - - function copyFile(file, target) { - var readStream = fs.createReadStream(file.name), - writeStream = fs.createWriteStream(target, { mode: file.mode }); - readStream.pipe(writeStream); - readStream.once('end', cb); - } - - function rmFile(file, done) { - fs.unlink(file, function (err) { - if (err) { - return onError(err); - } - return done(); - }); - } - - function onDir(dir) { - var target = dir.name.replace(currentPath, targetPath); - isWritable(target, function (writable) { - if (writable) { - return mkDir(dir, target); - } - copyDir(dir.name); - }); - } - - function mkDir(dir, target) { - fs.mkdir(target, dir.mode, function (err) { - if (err) { - return onError(err); - } - copyDir(dir.name); - }); - } - - function copyDir(dir) { - fs.readdir(dir, function (err, items) { - if (err) { - return onError(err); - } - items.forEach(function (item) { - startCopy(dir + '/' + item); - }); - return cb(); - }); - } - - function onLink(link) { - var target = link.replace(currentPath, targetPath); - fs.readlink(link, function (err, resolvedPath) { - if (err) { - return onError(err); - } - checkLink(resolvedPath, target); - }); - } - - function checkLink(resolvedPath, target) { - isWritable(target, function (writable) { - if (writable) { - return makeLink(resolvedPath, target); - } - fs.readlink(target, function (err, targetDest) { - if (err) { - return onError(err); - } - if (targetDest === resolvedPath) { - return cb(); - } - return rmFile(target, function () { - makeLink(resolvedPath, target); - }); - }); - }); - } - - function makeLink(linkPath, target) { - fs.symlink(linkPath, target, function (err) { - if (err) { - return onError(err); - } - return cb(); - }); - } - - function isWritable(path, done) { - fs.lstat(path, function (err, stats) { - if (err) { - if (err.code === 'ENOENT') return done(true); - return done(false); - } - return done(false); - }); - } - - function onError(err) { - if (options.stopOnError) { - return callback(err); - } - else if (!errs && options.errs) { - errs = fs.createWriteStream(options.errs); - } - else if (!errs) { - errs = []; - } - else if (options.errs) { - if (typeof errs.write === 'undefined') { - errs.push(err); - } - else { - errs.write(err.stack + '\n\n'); - } - } - return cb(); - } - - function cb(skipped) { - if (!skipped) running--; - finished++; - if ((started === finished) && (running === 0)) { - return errs ? callback(errs) : callback(null); - } - } -}; - - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/package.json deleted file mode 100644 index 1482b6a5..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/package.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "name": "ncp", - "version": "0.2.7", - "author": { - "name": "AvianFlu", - "email": "charlie@charlieistheman.com" - }, - "description": "Asynchronous recursive file copy utility.", - "bin": { - "ncp": "./bin/ncp" - }, - "devDependencies": { - "vows": "0.6.x", - "rimraf": "1.0.x", - "read-dir-files": "0.0.x" - }, - "main": "./lib/ncp.js", - "repository": { - "type": "git", - "url": "https://github.com/AvianFlu/ncp.git" - }, - "keywords": [ - "cli", - "copy" - ], - "license": "MIT", - "engine": { - "node": ">=0.4" - }, - "scripts": { - "test": "vows --isolate --spec" - }, - "readme": "# ncp - Asynchronous recursive file & directory copying\n\n[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)\n\nThink `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.\n\n## Command Line usage\n\nUsage is simple: `ncp [source] [dest] [--limit=concurrency limit]\n[--filter=filter] --stopOnErr`\n\nThe 'filter' is a Regular Expression - matched files will be copied.\n\nThe 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.\n\n'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any\nerrors arise, rather than attempting to continue while logging errors.\n\nIf there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.\n\n## Programmatic usage\n\nProgrammatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. \n\n```javascript\nvar ncp = require('ncp').ncp;\n\nncp.limit = 16;\n\nncp(source, destination, function (err) {\n if (err) {\n return console.error(err);\n }\n console.log('done!');\n});\n```\n\nYou can also call ncp like `ncp(source, destination, options, callback)`. \n`options` should be a dictionary. Currently, such options are available:\n\n * `options.filter` - a `RegExp` instance, against which each file name is\n tested to determine whether to copy it or not, or a function taking single\n parameter: copied file name, returning `true` or `false`, determining\n whether to copy file or not.\n\nPlease open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/AvianFlu/ncp/issues" - }, - "homepage": "https://github.com/AvianFlu/ncp", - "_id": "ncp@0.2.7", - "_from": "ncp@0.2.x" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/a b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/a deleted file mode 100644 index 802992c4..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/a +++ /dev/null @@ -1 +0,0 @@ -Hello world diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/b b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/b deleted file mode 100644 index 9f6bb185..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/b +++ /dev/null @@ -1 +0,0 @@ -Hello ncp diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/c b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/c deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/d b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/d deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/e b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/e deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/f b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/f deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/sub/a b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/sub/a deleted file mode 100644 index cf291b5e..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/sub/a +++ /dev/null @@ -1 +0,0 @@ -Hello nodejitsu diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/sub/b b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/fixtures/src/sub/b deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/ncp-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/ncp-test.js deleted file mode 100644 index 3783f603..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/ncp/test/ncp-test.js +++ /dev/null @@ -1,74 +0,0 @@ -var assert = require('assert'), - path = require('path'), - rimraf = require('rimraf'), - vows = require('vows'), - readDirFiles = require('read-dir-files'), - ncp = require('../').ncp; - -var fixtures = path.join(__dirname, 'fixtures'), - src = path.join(fixtures, 'src'), - out = path.join(fixtures, 'out'); - -vows.describe('ncp').addBatch({ - 'When copying a directory of files': { - topic: function () { - var cb = this.callback; - rimraf(out, function () { - ncp(src, out, cb); - }); - }, - 'files should be copied': { - topic: function () { - var cb = this.callback; - - readDirFiles(src, 'utf8', function (srcErr, srcFiles) { - readDirFiles(out, 'utf8', function (outErr, outFiles) { - cb(outErr, srcFiles, outFiles); - }); - }); - }, - 'and the destination should match the source': function (err, srcFiles, outFiles) { - assert.isNull(err); - assert.deepEqual(srcFiles, outFiles); - } - } - } -}).addBatch({ - 'When copying files using filter': { - topic: function() { - var cb = this.callback; - var filter = function(name) { - return name.substr(name.length - 1) != 'a' - } - rimraf(out, function () { - ncp(src, out, {filter: filter}, cb); - }); - }, - 'it should copy files': { - topic: function () { - var cb = this.callback; - - readDirFiles(src, 'utf8', function (srcErr, srcFiles) { - function filter(files) { - for (var fileName in files) { - var curFile = files[fileName]; - if (curFile instanceof Object) - return filter(curFile); - if (fileName.substr(fileName.length - 1) == 'a') - delete files[fileName]; - } - } - filter(srcFiles); - readDirFiles(out, 'utf8', function (outErr, outFiles) { - cb(outErr, srcFiles, outFiles); - }); - }); - }, - 'and destination files should match source files that pass filter': function (err, srcFiles, outFiles) { - assert.isNull(err); - assert.deepEqual(srcFiles, outFiles); - } - } - } -}).export(module); - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/AUTHORS b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/AUTHORS deleted file mode 100644 index 008cbe7d..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/AUTHORS +++ /dev/null @@ -1,5 +0,0 @@ -# Authors sorted by whether or not they're me. -Isaac Z. Schlueter (http://blog.izs.me) -Wayne Larsen (http://github.com/wvl) -ritch -Marcel Laverdet diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/LICENSE b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/README.md b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/README.md deleted file mode 100644 index 99983dc4..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/README.md +++ /dev/null @@ -1,32 +0,0 @@ -A `rm -rf` for node. - -Install with `npm install rimraf`, or just drop rimraf.js somewhere. - -## API - -`rimraf(f, [options,] callback)` - -The callback will be called with an error if there is one. Certain -errors are handled for you: - -* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times - before giving up. -* `EMFILE` - If too many file descriptors get opened, rimraf will - patiently wait until more become available. - -## Options - -The options object is optional. These fields are respected: - -* `maxBusyTries` - The number of times to retry a file or folder in the - event of an `EBUSY` error. The default is 3. -* `gently` - If provided a `gently` path, then rimraf will only delete - files and folders that are beneath this path, and only delete symbolic - links that point to a place within this path. (This is very important - to npm's use-case, and shows rimraf's pedigree.) - - -## rimraf.sync - -It can remove stuff synchronously, too. But that's not so good. Use -the async API. It's better. diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/fiber.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/fiber.js deleted file mode 100644 index 8812a6b4..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/fiber.js +++ /dev/null @@ -1,86 +0,0 @@ -// fiber/future port originally written by Marcel Laverdet -// https://gist.github.com/1131093 -// I updated it to bring to feature parity with cb version. -// The bugs are probably mine, not Marcel's. -// -- isaacs - -var path = require('path') - , fs = require('fs') - , Future = require('fibers/future') - -// Create future-returning fs functions -var fs2 = {} -for (var ii in fs) { - fs2[ii] = Future.wrap(fs[ii]) -} - -// Return a future which just pauses for a certain amount of time - -function timer (ms) { - var future = new Future - setTimeout(function () { - future.return() - }, ms) - return future -} - -function realish (p) { - return path.resolve(path.dirname(fs2.readlink(p))) -} - -// for EMFILE backoff. -var timeout = 0 - , EMFILE_MAX = 1000 - -function rimraf_ (p, opts) { - opts = opts || {} - opts.maxBusyTries = opts.maxBusyTries || 3 - if (opts.gently) opts.gently = path.resolve(opts.gently) - var busyTries = 0 - - // exits by throwing or returning. - // loops on handled errors. - while (true) { - try { - var stat = fs2.lstat(p).wait() - - // check to make sure that symlinks are ours. - if (opts.gently) { - var rp = stat.isSymbolicLink() ? realish(p) : path.resolve(p) - if (rp.indexOf(opts.gently) !== 0) { - var er = new Error("Refusing to delete: "+p+" not in "+opts.gently) - er.errno = require("constants").EEXIST - er.code = "EEXIST" - er.path = p - throw er - } - } - - if (!stat.isDirectory()) return fs2.unlink(p).wait() - - var rimrafs = fs2.readdir(p).wait().map(function (file) { - return rimraf(path.join(p, file), opts) - }) - - Future.wait(rimrafs) - fs2.rmdir(p).wait() - timeout = 0 - return - - } catch (er) { - if (er.message.match(/^EMFILE/) && timeout < EMFILE_MAX) { - timer(timeout++).wait() - } else if (er.message.match(/^EBUSY/) - && busyTries < opt.maxBusyTries) { - timer(++busyTries * 100).wait() - } else if (er.message.match(/^ENOENT/)) { - // already gone - return - } else { - throw er - } - } - } -} - -var rimraf = module.exports = rimraf_.future() diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/package.json deleted file mode 100644 index ef61a38f..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/package.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "rimraf", - "version": "1.0.9", - "main": "rimraf.js", - "description": "A deep deletion module for node (like `rm -rf`)", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/rimraf/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/rimraf.git" - }, - "scripts": { - "test": "cd test && bash run.sh" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - { - "name": "Wayne Larsen", - "email": "wayne@larsen.st", - "url": "http://github.com/wvl" - }, - { - "name": "ritch", - "email": "skawful@gmail.com" - }, - { - "name": "Marcel Laverdet" - } - ], - "readme": "A `rm -rf` for node.\n\nInstall with `npm install rimraf`, or just drop rimraf.js somewhere.\n\n## API\n\n`rimraf(f, [options,] callback)`\n\nThe callback will be called with an error if there is one. Certain\nerrors are handled for you:\n\n* `EBUSY` - rimraf will back off a maximum of opts.maxBusyTries times\n before giving up.\n* `EMFILE` - If too many file descriptors get opened, rimraf will\n patiently wait until more become available.\n\n## Options\n\nThe options object is optional. These fields are respected:\n\n* `maxBusyTries` - The number of times to retry a file or folder in the\n event of an `EBUSY` error. The default is 3.\n* `gently` - If provided a `gently` path, then rimraf will only delete\n files and folders that are beneath this path, and only delete symbolic\n links that point to a place within this path. (This is very important\n to npm's use-case, and shows rimraf's pedigree.)\n\n\n## rimraf.sync\n\nIt can remove stuff synchronously, too. But that's not so good. Use\nthe async API. It's better.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/rimraf/issues" - }, - "homepage": "https://github.com/isaacs/rimraf", - "_id": "rimraf@1.0.9", - "_from": "rimraf@1.x.x" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/rimraf.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/rimraf.js deleted file mode 100644 index e8104e9e..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/rimraf.js +++ /dev/null @@ -1,145 +0,0 @@ -module.exports = rimraf -rimraf.sync = rimrafSync - -var path = require("path") - , fs - -try { - // optional dependency - fs = require("graceful-fs") -} catch (er) { - fs = require("fs") -} - -var lstat = process.platform === "win32" ? "stat" : "lstat" - , lstatSync = lstat + "Sync" - -// for EMFILE handling -var timeout = 0 - , EMFILE_MAX = 1000 - -function rimraf (p, opts, cb) { - if (typeof opts === "function") cb = opts, opts = {} - - if (!cb) throw new Error("No callback passed to rimraf()") - if (!opts) opts = {} - - var busyTries = 0 - opts.maxBusyTries = opts.maxBusyTries || 3 - - if (opts.gently) opts.gently = path.resolve(opts.gently) - - rimraf_(p, opts, function CB (er) { - if (er) { - if (er.code === "EBUSY" && busyTries < opts.maxBusyTries) { - var time = (opts.maxBusyTries - busyTries) * 100 - busyTries ++ - // try again, with the same exact callback as this one. - return setTimeout(function () { - rimraf_(p, opts, CB) - }) - } - - // this one won't happen if graceful-fs is used. - if (er.code === "EMFILE" && timeout < EMFILE_MAX) { - return setTimeout(function () { - rimraf_(p, opts, CB) - }, timeout ++) - } - - // already gone - if (er.code === "ENOENT") er = null - } - - timeout = 0 - cb(er) - }) -} - -function rimraf_ (p, opts, cb) { - fs[lstat](p, function (er, s) { - // if the stat fails, then assume it's already gone. - if (er) { - // already gone - if (er.code === "ENOENT") return cb() - // some other kind of error, permissions, etc. - return cb(er) - } - - // don't delete that don't point actually live in the "gently" path - if (opts.gently) return clobberTest(p, s, opts, cb) - return rm_(p, s, opts, cb) - }) -} - -function rm_ (p, s, opts, cb) { - if (!s.isDirectory()) return fs.unlink(p, cb) - fs.readdir(p, function (er, files) { - if (er) return cb(er) - asyncForEach(files.map(function (f) { - return path.join(p, f) - }), function (file, cb) { - rimraf(file, opts, cb) - }, function (er) { - if (er) return cb(er) - fs.rmdir(p, cb) - }) - }) -} - -function clobberTest (p, s, opts, cb) { - var gently = opts.gently - if (!s.isSymbolicLink()) next(null, path.resolve(p)) - else realish(p, next) - - function next (er, rp) { - if (er) return rm_(p, s, cb) - if (rp.indexOf(gently) !== 0) return clobberFail(p, gently, cb) - else return rm_(p, s, opts, cb) - } -} - -function realish (p, cb) { - fs.readlink(p, function (er, r) { - if (er) return cb(er) - return cb(null, path.resolve(path.dirname(p), r)) - }) -} - -function clobberFail (p, g, cb) { - var er = new Error("Refusing to delete: "+p+" not in "+g) - , constants = require("constants") - er.errno = constants.EEXIST - er.code = "EEXIST" - er.path = p - return cb(er) -} - -function asyncForEach (list, fn, cb) { - if (!list.length) cb() - var c = list.length - , errState = null - list.forEach(function (item, i, list) { - fn(item, function (er) { - if (errState) return - if (er) return cb(errState = er) - if (-- c === 0) return cb() - }) - }) -} - -// this looks simpler, but it will fail with big directory trees, -// or on slow stupid awful cygwin filesystems -function rimrafSync (p) { - try { - var s = fs[lstatSync](p) - } catch (er) { - if (er.code === "ENOENT") return - throw er - } - if (!s.isDirectory()) return fs.unlinkSync(p) - fs.readdirSync(p).forEach(function (f) { - rimrafSync(path.join(p, f)) - }) - fs.rmdirSync(p) -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/run.sh b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/run.sh deleted file mode 100644 index 598f0163..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/run.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -set -e -for i in test-*.js; do - echo -n $i ... - bash setup.sh - node $i - ! [ -d target ] - echo "pass" -done -rm -rf target diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/setup.sh b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/setup.sh deleted file mode 100644 index 2602e631..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/setup.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash - -set -e - -files=10 -folders=2 -depth=4 -target="$PWD/target" - -rm -rf target - -fill () { - local depth=$1 - local files=$2 - local folders=$3 - local target=$4 - - if ! [ -d $target ]; then - mkdir -p $target - fi - - local f - - f=$files - while [ $f -gt 0 ]; do - touch "$target/f-$depth-$f" - let f-- - done - - let depth-- - - if [ $depth -le 0 ]; then - return 0 - fi - - f=$folders - while [ $f -gt 0 ]; do - mkdir "$target/folder-$depth-$f" - fill $depth $files $folders "$target/d-$depth-$f" - let f-- - done -} - -fill $depth $files $folders $target - -# sanity assert -[ -d $target ] diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-async.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-async.js deleted file mode 100644 index 9c2e0b7b..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-async.js +++ /dev/null @@ -1,5 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf(path.join(__dirname, "target"), function (er) { - if (er) throw er -}) diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-fiber.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-fiber.js deleted file mode 100644 index 20d61a10..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-fiber.js +++ /dev/null @@ -1,15 +0,0 @@ -var rimraf - , path = require("path") - -try { - rimraf = require("../fiber") -} catch (er) { - console.error("skipping fiber test") -} - -if (rimraf) { - Fiber(function () { - rimraf(path.join(__dirname, "target")).wait() - }).run() -} - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-sync.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-sync.js deleted file mode 100644 index eb71f104..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/node_modules/rimraf/test/test-sync.js +++ /dev/null @@ -1,3 +0,0 @@ -var rimraf = require("../rimraf") - , path = require("path") -rimraf.sync(path.join(__dirname, "target")) diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/package.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/package.json deleted file mode 100644 index 1f316353..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "utile", - "description": "A drop-in replacement for `util` with some additional advantageous functions", - "version": "0.1.7", - "author": { - "name": "Nodejitsu Inc.", - "email": "info@nodejitsu.com" - }, - "maintainers": [ - { - "name": "indexzero", - "email": "charlie@nodejitsu.com" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/flatiron/utile.git" - }, - "dependencies": { - "async": "0.1.x", - "deep-equal": "*", - "i": "0.3.x", - "mkdirp": "0.x.x", - "ncp": "0.2.x", - "rimraf": "1.x.x" - }, - "devDependencies": { - "vows": "0.6.x" - }, - "scripts": { - "test": "vows --spec" - }, - "main": "./lib/index", - "engines": { - "node": ">= 0.6.4" - }, - "readme": "# utile [![Build Status](https://secure.travis-ci.org/flatiron/utile.png)](http://travis-ci.org/flatiron/utile)\n\nA drop-in replacement for `util` with some additional advantageous functions\n\n## Motivation\nJavascript is definitely a \"batteries not included language\" when compared to languages like Ruby or Python. Node.js has a simple utility library which exposes some basic (but important) functionality:\n\n```\n$ node\n> var util = require('util');\n> util.\n(...)\n\nutil.debug util.error util.exec util.inherits util.inspect\nutil.log util.p util.print util.pump util.puts\n```\n\nWhen one considers their own utility library, why ever bother requiring `util` again? That is the approach taken by this module. To compare:\n\n```\n$ node\n> var utile = require('./lib')\n> utile.\n(...)\n\nutile.async utile.capitalize utile.clone utile.cpr utile.createPath utile.debug\nutile.each utile.error utile.exec utile.file utile.filter utile.find\nutile.inherits utile.log utile.mixin utile.mkdirp utile.p utile.path\nutile.print utile.pump utile.puts utile.randomString utile.requireDir uile.requireDirLazy\nutile.rimraf\n```\n\nAs you can see all of the original methods from `util` are there, but there are several new methods specific to `utile`. A note about implementation: _no node.js native modules are modified by utile, it simply copies those methods._\n\n## Methods\nThe `utile` modules exposes some simple utility methods:\n\n* `.each(obj, iterator)`: Iterate over the keys of an object.\n* `.mixin(target [source0, source1, ...])`: Copies enumerable properties from `source0 ... sourceN` onto `target` and returns the resulting object.\n* `.clone(obj)`: Shallow clones the specified object.\n* `.capitalize(str)`: Capitalizes the specified `str`.\n* `.randomString(length)`: randomString returns a pseudo-random ASCII string (subset) the return value is a string of length ⌈bits/6⌉ of characters from the base64 alphabet.\n* `.filter(obj, test)`: return an object with the properties that `test` returns true on.\n* `.args(arguments)`: Converts function arguments into actual array with special `callback`, `cb`, `array`, and `last` properties. Also supports *optional* argument contracts. See [the example](https://github.com/flatiron/utile/blob/master/examples/utile-args.js) for more details.\n* `.requireDir(directory)`: Requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values being return values of `require(filename)`.\n* `.requireDirLazy(directory)`: Lazily requires all files and directories from `directory`, returning an object with keys being filenames (without trailing `.js`) and respective values (getters) being return values of `require(filename)`.\n* `.format([string] text, [array] formats, [array] replacements)`: Replace `formats` in `text` with `replacements`. This will fall back to the original `util.format` command if it is called improperly.\n\n## Packaged Dependencies\nIn addition to the methods that are built-in, utile includes a number of commonly used dependencies to reduce the number of includes in your package.json. These modules _are not eagerly loaded to be respectful of startup time,_ but instead are lazy-loaded getters on the `utile` object\n\n* `.async`: [Async utilities for node and the browser][0]\n* `.inflect`: [Customizable inflections for node.js][6]\n* `.mkdirp`: [Recursively mkdir, like mkdir -p, but in node.js][1]\n* `.rimraf`: [A rm -rf util for nodejs][2]\n* `.cpr`: [Asynchronous recursive file copying with Node.js][3]\n\n## Installation\n\n### Installing npm (node package manager)\n```\n curl http://npmjs.org/install.sh | sh\n```\n\n### Installing utile\n```\n [sudo] npm install utile\n```\n\n## Tests\nAll tests are written with [vows][4] and should be run with [npm][5]:\n\n``` bash\n $ npm test\n```\n\n#### Author: [Nodejitsu Inc.](http://www.nodejitsu.com)\n#### Contributors: [Charlie Robbins](http://github.com/indexzero), [Dominic Tarr](http://github.com/dominictarr)\n#### License: MIT\n\n[0]: https://github.com/caolan/async\n[1]: https://github.com/substack/node-mkdirp\n[2]: https://github.com/isaacs/rimraf\n[3]: https://github.com/avianflu/ncp\n[4]: https://vowsjs.org\n[5]: https://npmjs.org\n[6]: https://github.com/pksunkara/inflect\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/flatiron/utile/issues" - }, - "homepage": "https://github.com/flatiron/utile", - "_id": "utile@0.1.7", - "_from": "utile@~0.1.7" -} diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js deleted file mode 100644 index 93ea089e..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/file-test.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * file-test.js: Tests for `utile.file` module. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var assert = require('assert'), - path = require('path'), - vows = require('vows'), - macros = require('./helpers/macros'), - utile = require('../'); - -var fixture = path.join(__dirname, 'fixtures', 'read-json-file', 'config.json'); - -vows.describe('utile/file').addBatch({ - 'When using utile': { - 'the `.file.readJson()` function': { - topic: function () { - utile.file.readJson(fixture, this.callback); - }, - 'should return correct JSON structure': macros.assertReadCorrectJson - }, - 'the `.file.readJsonSync()` function': { - topic: utile.file.readJsonSync(fixture), - 'should return correct JSON structure': macros.assertReadCorrectJson - } - } -}).export(module); - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/read-json-file/config.json b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/read-json-file/config.json deleted file mode 100644 index e12a1068..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/read-json-file/config.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "hello": "World", - "I am": ["the utile module"], - "thisMakesMe": { - "really": 1337, - "right?": true - } -} - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/require-directory/directory/index.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/require-directory/directory/index.js deleted file mode 100644 index 1afb4897..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/require-directory/directory/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.me = 'directory/index.js'; - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/require-directory/helloWorld.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/require-directory/helloWorld.js deleted file mode 100644 index 1c842ec9..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/fixtures/require-directory/helloWorld.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.me = 'helloWorld.js'; - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js deleted file mode 100644 index fb1a2b74..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/format-test.js +++ /dev/null @@ -1,31 +0,0 @@ -/* - * format-test.js: Tests for `utile.format` module. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var vows = require('vows'), - assert = require('assert'), - utile = require('../lib'); - -vows.describe('utile/format').addBatch({ - - 'Should use the original `util.format` if there are no custom parameters to replace.': function() { - assert.equal(utile.format('%s %s %s', 'test', 'test2', 'test3'), 'test test2 test3'); - }, - - 'Should use `utile.format` if custom parameters are provided.': function() { - assert.equal(utile.format('%a %b %c', [ - '%a', - '%b', - '%c' - ], [ - 'test', - 'test2', - 'test3' - ]), 'test test2 test3'); - } - -}).export(module); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/function-args-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/function-args-test.js deleted file mode 100644 index b2852eb8..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/function-args-test.js +++ /dev/null @@ -1,104 +0,0 @@ -/* - * function-args-test.js: Tests for `args` method - * - * (C) 2012, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var assert = require('assert'), - path = require('path'), - vows = require('vows'), - macros = require('./helpers/macros'), - utile = require('../'); - -vows.describe('utile/args').addBatch({ - 'When using utile': { - 'the `args` function': { - topic: utile, - 'should be a function': function (_utile) { - assert.isFunction(_utile.args); - }, - } - }, - 'utile.rargs()': { - 'with no arguments': { - topic: utile.rargs(), - 'should return an empty object': function (result) { - assert.isArray(result); - assert.lengthOf(result, 0); - } - }, - 'with simple arguments': { - topic: function () { - return (function () { - return utile.rargs(arguments); - })('a', 'b', 'c'); - }, - 'should return an array with three items': function (result) { - assert.isArray(result); - assert.equal(3, result.length); - assert.equal(result[0], 'a'); - assert.equal(result[1], 'b'); - assert.equal(result[2], 'c'); - } - }, - 'with a simple slice': { - topic: function () { - return (function () { - return utile.rargs(arguments, 1); - })('a', 'b', 'c'); - }, - 'should return an array with three items': function (result) { - assert.isArray(result); - assert.equal(2, result.length); - assert.equal(result[0], 'b'); - assert.equal(result[1], 'c'); - } - } - }, - 'utile.args()': { - 'with no arguments': { - topic: utile.args(), - 'should return an empty Array': function (result) { - assert.isUndefined(result.callback); - assert.isArray(result); - assert.lengthOf(result, 0); - } - }, - 'with simple arguments': { - topic: function () { - return (function () { - return utile.args(arguments); - })('a', 'b', 'c', function () { - return 'ok'; - }); - }, - 'should return an array with three items': function (result) { - assert.isArray(result); - assert.equal(3, result.length); - assert.equal(result[0], 'a'); - assert.equal(result[1], 'b'); - assert.equal(result[2], 'c'); - - // - // Ensure that the Array returned - // by `utile.args()` enumerates correctly - // - var length = 0; - result.forEach(function (item) { - length++; - }); - - assert.equal(length, 3); - }, - 'should return lookup helpers': function (result) { - assert.isArray(result); - assert.equal(result.first, 'a'); - assert.equal(result.last, 'c'); - assert.isFunction(result.callback); - assert.isFunction(result.cb); - } - } - } -}).export(module); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/helpers/macros.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/helpers/macros.js deleted file mode 100644 index 66f386d2..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/helpers/macros.js +++ /dev/null @@ -1,37 +0,0 @@ -/* - * macros.js: Test macros for `utile` module. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var assert = require('assert'), - utile = require('../../lib'); - -var macros = exports; - -macros.assertReadCorrectJson = function (obj) { - assert.isObject(obj); - utile.deepEqual(obj, { - hello: 'World', - 'I am': ['the utile module'], - thisMakesMe: { - really: 1337, - 'right?': true - } - }); -}; - -macros.assertDirectoryRequired = function (obj) { - assert.isObject(obj); - utile.deepEqual(obj, { - directory: { - me: 'directory/index.js' - }, - helloWorld: { - me: 'helloWorld.js' - } - }); -}; - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/random-string-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/random-string-test.js deleted file mode 100644 index c21af3fc..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/random-string-test.js +++ /dev/null @@ -1,39 +0,0 @@ -/* - * common-test.js : testing common.js for expected functionality - * - * (C) 2011, Nodejitsu Inc. - * - */ - -var assert = require('assert'), - vows = require('vows'), - utile = require('../lib'); - -vows.describe('utile/randomString').addBatch({ - "When using utile": { - "the randomString() function": { - topic: function () { - return utile.randomString(); - }, - "should return 16 characters that are actually random by default": function (random) { - assert.isString(random); - assert.lengthOf(random, 16); - assert.notEqual(random, utile.randomString()); - }, - "when you can asked for different length strings": { - topic: function () { - return [utile.randomString(4), utile.randomString(128)]; - }, - "where they actually are of length 4, 128": function (strings) { - assert.isArray(strings); - assert.lengthOf(strings,2); - assert.isString(strings[0]); - assert.isString(strings[1]); - assert.lengthOf(strings[0], 4); - assert.lengthOf(strings[1], 128); - assert.notEqual(strings[0], strings[1].substr(0,4)); - } - } - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js deleted file mode 100644 index ce7ea835..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/require-directory-test.js +++ /dev/null @@ -1,35 +0,0 @@ -/* - * require-directory-test.js: Tests for `requireDir` and `requireDirLazy` - * methods. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var assert = require('assert'), - path = require('path'), - vows = require('vows'), - macros = require('./helpers/macros'), - utile = require('../'); - -var requireFixtures = path.join(__dirname, 'fixtures', 'require-directory'); - -vows.describe('utile/require-directory').addBatch({ - 'When using utile': { - 'the `requireDir()` function': { - topic: utile.requireDir(requireFixtures), - 'should contain all wanted modules': macros.assertDirectoryRequired - }, - 'the `requireDirLazy()` function': { - topic: utile.requireDirLazy(requireFixtures), - 'all properties should be getters': function (obj) { - assert.isObject(obj); - assert.isTrue(!!Object.getOwnPropertyDescriptor(obj, 'directory').get); - assert.isTrue(!!Object.getOwnPropertyDescriptor(obj, 'helloWorld').get); - }, - 'should contain all wanted modules': macros.assertDirectoryRequired - } - } -}).export(module); - diff --git a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/utile-test.js b/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/utile-test.js deleted file mode 100644 index 7dd5b0f9..00000000 --- a/node_modules/karma/node_modules/http-proxy/node_modules/utile/test/utile-test.js +++ /dev/null @@ -1,126 +0,0 @@ -/* - * utile-test.js: Tests for `utile` module. - * - * (C) 2011, Nodejitsu Inc. - * MIT LICENSE - * - */ - -var assert = require('assert'), - vows = require('vows'), - utile = require('../lib'); - -var obj1, obj2; - -obj1 = { - foo: true, - bar: { - bar1: true, - bar2: 'bar2' - } -}; - -obj2 = { - baz: true, - buzz: 'buzz' -}; - -Object.defineProperties(obj2, { - - 'bazz': { - get: function() { - return 'bazz'; - }, - - set: function() { - return 'bazz'; - } - }, - - 'wat': { - set: function() { - return 'wat'; - } - } - -}); - -vows.describe('utile').addBatch({ - "When using utile": { - "it should have the same methods as the `util` module": function () { - Object.keys(require('util')).forEach(function (fn) { - assert.isFunction(utile[fn]); - }); - }, - "it should have the correct methods defined": function () { - assert.isFunction(utile.mixin); - assert.isFunction(utile.clone); - assert.isFunction(utile.rimraf); - assert.isFunction(utile.mkdirp); - assert.isFunction(utile.cpr); - }, - "the mixin() method": function () { - var mixed = utile.mixin({}, obj1, obj2); - assert.isTrue(mixed.foo); - assert.isObject(mixed.bar); - assert.isTrue(mixed.baz); - assert.isString(mixed.buzz); - assert.isTrue(!!Object.getOwnPropertyDescriptor(mixed, 'bazz').get); - assert.isTrue(!!Object.getOwnPropertyDescriptor(mixed, 'bazz').set); - assert.isTrue(!!Object.getOwnPropertyDescriptor(mixed, 'wat').set); - assert.isString(mixed.bazz); - }, - "the clone() method": function () { - var clone = utile.clone(obj1); - assert.isTrue(clone.foo); - assert.isObject(clone.bar); - assert.notStrictEqual(obj1, clone); - }, - "the createPath() method": function () { - var x = {}, - r = Math.random(); - - utile.createPath(x, ['a','b','c'], r) - assert.equal(x.a.b.c, r) - }, - "the capitalize() method": function () { - assert.isFunction(utile.capitalize); - assert.equal(utile.capitalize('bullet'), 'Bullet'); - assert.equal(utile.capitalize('bullet_train'), 'BulletTrain'); - }, - "the escapeRegExp() method": function () { - var ans = "\\/path\\/to\\/resource\\.html\\?search=query"; - assert.isFunction(utile.escapeRegExp); - assert.equal(utile.escapeRegExp('/path/to/resource.html?search=query'), ans); - }, - "the underscoreToCamel() method": function () { - var obj = utile.underscoreToCamel({ - key_with_underscore: { - andNested: 'values', - several: [1, 2, 3], - nested_underscores: true - }, - just_one: 'underscore' - }); - - assert.isObject(obj.keyWithUnderscore); - assert.isString(obj.justOne); - assert.isTrue(obj.keyWithUnderscore.nestedUnderscores); - }, - "the camelToUnderscore() method": function () { - var obj = utile.camelToUnderscore({ - keyWithCamel: { - andNested: 'values', - several: [1, 2, 3], - nestedCamel: true - }, - justOne: 'camel' - }); - - assert.isObject(obj.key_with_camel); - assert.isString(obj.just_one); - assert.isTrue(obj.key_with_camel.nested_camel); - } - } -}).export(module); - diff --git a/node_modules/karma/node_modules/http-proxy/package.json b/node_modules/karma/node_modules/http-proxy/package.json deleted file mode 100644 index 69a68dc6..00000000 --- a/node_modules/karma/node_modules/http-proxy/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "http-proxy", - "version": "0.10.3", - "description": "A full-featured http reverse proxy for node.js", - "author": { - "name": "Nodejitsu Inc.", - "email": "info@nodejitsu.com" - }, - "maintainers": [ - { - "name": "indexzero", - "email": "charlie@nodejitsu.com" - }, - { - "name": "AvianFlu", - "email": "avianflu@nodejitsu.com" - } - ], - "repository": { - "type": "git", - "url": "http://github.com/nodejitsu/node-http-proxy.git" - }, - "keywords": [ - "reverse", - "proxy", - "http" - ], - "dependencies": { - "colors": "0.x.x", - "optimist": "0.3.x", - "pkginfo": "0.2.x", - "utile": "~0.1.7" - }, - "devDependencies": { - "request": "2.14.x", - "vows": "0.7.x", - "async": "0.2.x", - "socket.io": "0.9.11", - "socket.io-client": "0.9.11", - "ws": "0.4.23" - }, - "main": "./lib/node-http-proxy", - "bin": { - "node-http-proxy": "./bin/node-http-proxy" - }, - "scripts": { - "test": "npm run-script test-http && npm run-script test-https && npm run-script test-core", - "test-http": "vows --spec && vows --spec --target=https", - "test-https": "vows --spec --proxy=https && vows --spec --proxy=https --target=https", - "test-core": "test/core/run" - }, - "engines": { - "node": ">= 0.6.6" - }, - "readme": "# node-http-proxy [![Build Status](https://secure.travis-ci.org/nodejitsu/node-http-proxy.png)](http://travis-ci.org/nodejitsu/node-http-proxy)\n\n\n\n## Battle-hardened node.js http proxy\n\n### Features\n\n* Reverse proxies incoming http.ServerRequest streams\n* Can be used as a CommonJS module in node.js\n* Uses event buffering to support application latency in proxied requests\n* Reverse or Forward Proxy based on simple JSON-based configuration\n* Supports [WebSockets][1]\n* Supports [HTTPS][2]\n* Minimal request overhead and latency\n* Full suite of functional tests\n* Battled-hardened through __production usage__ @ [nodejitsu.com][0]\n* Written entirely in Javascript\n* Easy to use API\n\n### When to use node-http-proxy\n\nLet's suppose you were running multiple http application servers, but you only wanted to expose one machine to the internet. You could setup node-http-proxy on that one machine and then reverse-proxy the incoming http requests to locally running services which were not exposed to the outside network. \n\n### Installing npm (node package manager)\n\n```\ncurl https://npmjs.org/install.sh | sh\n```\n\n### Installing node-http-proxy\n\n```\nnpm install http-proxy\n```\n\n## Using node-http-proxy\n\nThere are several ways to use node-http-proxy; the library is designed to be flexible so that it can be used by itself, or in conjunction with other node.js libraries / tools:\n\n1. Standalone HTTP Proxy server\n2. Inside of another HTTP server (like Connect)\n3. In conjunction with a Proxy Routing Table\n4. As a forward-proxy with a reverse proxy \n5. From the command-line as a long running process\n6. customized with 3rd party middleware.\n\nIn each of these scenarios node-http-proxy can handle any of these types of requests:\n\n1. HTTP Requests (http://)\n2. HTTPS Requests (https://)\n3. WebSocket Requests (ws://)\n4. Secure WebSocket Requests (wss://)\n\nSee the [examples][3] for more working sample code.\n\n### Setup a basic stand-alone proxy server\n\n``` js\nvar http = require('http'),\n httpProxy = require('http-proxy');\n//\n// Create your proxy server\n//\nhttpProxy.createServer(9000, 'localhost').listen(8000);\n\n//\n// Create your target server\n//\nhttp.createServer(function (req, res) {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.write('request successfully proxied!' + '\\n' + JSON.stringify(req.headers, true, 2));\n res.end();\n}).listen(9000);\n```\n\n### Setup a stand-alone proxy server with custom server logic\n\n``` js\nvar http = require('http'),\n httpProxy = require('http-proxy');\n \n//\n// Create a proxy server with custom application logic\n//\nhttpProxy.createServer(function (req, res, proxy) {\n //\n // Put your custom server logic here\n //\n proxy.proxyRequest(req, res, {\n host: 'localhost',\n port: 9000\n });\n}).listen(8000);\n\nhttp.createServer(function (req, res) {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.write('request successfully proxied: ' + req.url +'\\n' + JSON.stringify(req.headers, true, 2));\n res.end();\n}).listen(9000);\n```\n\n### Setup a stand-alone proxy server with latency (e.g. IO, etc)\n\n``` js\nvar http = require('http'),\n httpProxy = require('http-proxy');\n\n//\n// Create a proxy server with custom application logic\n//\nhttpProxy.createServer(function (req, res, proxy) {\n //\n // Buffer the request so that `data` and `end` events\n // are not lost during async operation(s).\n //\n var buffer = httpProxy.buffer(req);\n \n //\n // Wait for two seconds then respond: this simulates\n // performing async actions before proxying a request\n //\n setTimeout(function () {\n proxy.proxyRequest(req, res, {\n host: 'localhost',\n port: 9000, \n buffer: buffer\n }); \n }, 2000);\n}).listen(8000);\n\nhttp.createServer(function (req, res) {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.write('request successfully proxied: ' + req.url +'\\n' + JSON.stringify(req.headers, true, 2));\n res.end();\n}).listen(9000);\n```\n\n### Proxy requests within another http server\n\n``` js\nvar http = require('http'),\n httpProxy = require('http-proxy');\n \n//\n// Create a new instance of HttProxy to use in your server\n//\nvar proxy = new httpProxy.RoutingProxy();\n\n//\n// Create a regular http server and proxy its handler\n//\nhttp.createServer(function (req, res) {\n //\n // Put your custom server logic here, then proxy\n //\n proxy.proxyRequest(req, res, {\n host: 'localhost',\n port: 9000\n });\n}).listen(8001);\n\nhttp.createServer(function (req, res) {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.write('request successfully proxied: ' + req.url +'\\n' + JSON.stringify(req.headers, true, 2));\n res.end();\n}).listen(9000); \n```\n\n### Proxy requests using a ProxyTable\nA Proxy Table is a simple lookup table that maps incoming requests to proxy target locations. Take a look at an example of the options you need to pass to httpProxy.createServer:\n\n``` js\nvar options = {\n router: {\n 'foo.com/baz': '127.0.0.1:8001',\n 'foo.com/buz': '127.0.0.1:8002',\n 'bar.com/buz': '127.0.0.1:8003'\n }\n};\n```\n\nThe above route table will take incoming requests to 'foo.com/baz' and forward them to '127.0.0.1:8001'. Likewise it will take incoming requests to 'foo.com/buz' and forward them to '127.0.0.1:8002'. The routes themselves are later converted to regular expressions to enable more complex matching functionality. We can create a proxy server with these options by using the following code:\n\n``` js\nvar proxyServer = httpProxy.createServer(options);\nproxyServer.listen(80);\n```\n\n### Proxy requests using a 'Hostname Only' ProxyTable\nAs mentioned in the previous section, all routes passes to the ProxyTable are by default converted to regular expressions that are evaluated at proxy-time. This is good for complex URL rewriting of proxy requests, but less efficient when one simply wants to do pure hostname routing based on the HTTP 'Host' header. If you are only concerned with hostname routing, you change the lookup used by the internal ProxyTable:\n\n``` js\nvar options = {\n hostnameOnly: true,\n router: {\n 'foo.com': '127.0.0.1:8001',\n 'bar.com': '127.0.0.1:8002'\n }\n}\n```\n\nNotice here that I have not included paths on the individual domains because this is not possible when using only the HTTP 'Host' header. Care to learn more? See [RFC2616: HTTP/1.1, Section 14.23, \"Host\"][4].\n\n### Proxy requests using a 'Pathname Only' ProxyTable\n\nIf you dont care about forwarding to different hosts, you can redirect based on the request path.\n\n``` js\nvar options = {\n pathnameOnly: true,\n router: {\n '/wiki': '127.0.0.1:8001',\n '/blog': '127.0.0.1:8002',\n '/api': '127.0.0.1:8003'\n }\n}\n```\n\nThis comes in handy if you are running separate services or applications on separate paths. Note, using this option disables routing by hostname entirely.\n\n\n### Proxy requests with an additional forward proxy\nSometimes in addition to a reverse proxy, you may want your front-facing server to forward traffic to another location. For example, if you wanted to load test your staging environment. This is possible when using node-http-proxy using similar JSON-based configuration to a proxy table: \n\n``` js\nvar proxyServerWithForwarding = httpProxy.createServer(9000, 'localhost', {\n forward: {\n port: 9000,\n host: 'staging.com'\n }\n});\nproxyServerWithForwarding.listen(80);\n```\n\nThe forwarding option can be used in conjunction with the proxy table options by simply including both the 'forward' and 'router' properties in the options passed to 'createServer'.\n\n### Listening for proxy events\nSometimes you want to listen to an event on a proxy. For example, you may want to listen to the 'end' event, which represents when the proxy has finished proxying a request.\n\n``` js\nvar httpProxy = require('http-proxy');\n\nvar server = httpProxy.createServer(function (req, res, proxy) {\n var buffer = httpProxy.buffer(req);\n\n proxy.proxyRequest(req, res, {\n host: '127.0.0.1',\n port: 9000,\n buffer: buffer\n });\n});\n\nserver.proxy.on('end', function () {\n console.log(\"The request was proxied.\");\n});\n\nserver.listen(8000);\n```\n\nIt's important to remember not to listen for events on the proxy object in the function passed to `httpProxy.createServer`. Doing so would add a new listener on every request, which would end up being a disaster.\n\n## Using HTTPS\nYou have all the full flexibility of node-http-proxy offers in HTTPS as well as HTTP. The two basic scenarios are: with a stand-alone proxy server or in conjunction with another HTTPS server.\n\n### Proxying to HTTP from HTTPS\nThis is probably the most common use-case for proxying in conjunction with HTTPS. You have some front-facing HTTPS server, but all of your internal traffic is HTTP. In this way, you can reduce the number of servers to which your CA and other important security files are deployed and reduce the computational overhead from HTTPS traffic. \n\nUsing HTTPS in `node-http-proxy` is relatively straight-forward:\n \n``` js\nvar fs = require('fs'),\n http = require('http'),\n https = require('https'),\n httpProxy = require('http-proxy');\n \nvar options = {\n https: {\n key: fs.readFileSync('path/to/your/key.pem', 'utf8'),\n cert: fs.readFileSync('path/to/your/cert.pem', 'utf8')\n }\n};\n\n//\n// Create a standalone HTTPS proxy server\n//\nhttpProxy.createServer(8000, 'localhost', options).listen(8001);\n\n//\n// Create an instance of HttpProxy to use with another HTTPS server\n//\nvar proxy = new httpProxy.HttpProxy({\n target: {\n host: 'localhost', \n port: 8000\n }\n});\nhttps.createServer(options.https, function (req, res) {\n proxy.proxyRequest(req, res)\n}).listen(8002);\n\n//\n// Create the target HTTPS server for both cases\n//\nhttp.createServer(function (req, res) {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.write('hello https\\n');\n res.end();\n}).listen(8000);\n```\n\n### Using two certificates\n\nSuppose that your reverse proxy will handle HTTPS traffic for two different domains `fobar.com` and `barbaz.com`.\nIf you need to use two different certificates you can take advantage of [Server Name Indication](http://en.wikipedia.org/wiki/Server_Name_Indication).\n\n``` js\nvar https = require('https'),\n path = require(\"path\"),\n fs = require(\"fs\"),\n crypto = require(\"crypto\");\n\n//\n// generic function to load the credentials context from disk\n//\nfunction getCredentialsContext (cer) {\n return crypto.createCredentials({\n key: fs.readFileSync(path.join(__dirname, 'certs', cer + '.key')),\n cert: fs.readFileSync(path.join(__dirname, 'certs', cer + '.crt'))\n }).context;\n}\n\n//\n// A certificate per domain hash\n//\nvar certs = {\n \"fobar.com\": getCredentialsContext(\"foobar\"),\n \"barbaz.com\": getCredentialsContext(\"barbaz\")\n};\n\n//\n// Proxy options\n//\nvar options = {\n https: {\n SNICallback: function (hostname) {\n return certs[hostname];\n },\n cert: myCert,\n key: myKey,\n ca: [myCa]\n },\n hostnameOnly: true,\n router: {\n 'fobar.com': '127.0.0.1:8001',\n 'barbaz.com': '127.0.0.1:8002'\n }\n};\n\n//\n// Create a standalone HTTPS proxy server\n//\nhttpProxy.createServer(options).listen(8001);\n\n//\n// Create the target HTTPS server\n//\nhttp.createServer(function (req, res) {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.write('hello https\\n');\n res.end();\n}).listen(8000);\n\n```\n\n### Proxying to HTTPS from HTTPS\nProxying from HTTPS to HTTPS is essentially the same as proxying from HTTPS to HTTP, but you must include the `target` option in when calling `httpProxy.createServer` or instantiating a new instance of `HttpProxy`.\n\n``` js\nvar fs = require('fs'),\n https = require('https'),\n httpProxy = require('http-proxy');\n \nvar options = {\n https: {\n key: fs.readFileSync('path/to/your/key.pem', 'utf8'),\n cert: fs.readFileSync('path/to/your/cert.pem', 'utf8')\n },\n target: {\n https: true // This could also be an Object with key and cert properties\n }\n};\n\n//\n// Create a standalone HTTPS proxy server\n//\nhttpProxy.createServer(8000, 'localhost', options).listen(8001);\n\n//\n// Create an instance of HttpProxy to use with another HTTPS server\n//\nvar proxy = new httpProxy.HttpProxy({ \n target: {\n host: 'localhost', \n port: 8000,\n https: true\n }\n});\n\nhttps.createServer(options.https, function (req, res) {\n proxy.proxyRequest(req, res);\n}).listen(8002);\n\n//\n// Create the target HTTPS server for both cases\n//\nhttps.createServer(options.https, function (req, res) {\n res.writeHead(200, { 'Content-Type': 'text/plain' });\n res.write('hello https\\n');\n res.end();\n}).listen(8000);\n```\n## Middleware\n\n`node-http-proxy` now supports connect middleware. Add middleware functions to your createServer call:\n\n``` js\nhttpProxy.createServer(\n require('connect-gzip').gzip(),\n 9000, 'localhost'\n).listen(8000);\n```\n\nA regular request we receive is to support the modification of html/xml content that is returned in the response from an upstream server. \n\n[Harmon](https://github.com/No9/harmon/) is a stream based middleware plugin that is designed to solve that problem in the most effective way possible. \n\n## Proxying WebSockets\nWebsockets are handled automatically when using `httpProxy.createServer()`, however, if you supply a callback inside the createServer call, you will need to handle the 'upgrade' proxy event yourself. Here's how:\n\n```js\n\nvar options = {\n ....\n};\n\nvar server = httpProxy.createServer(\n callback/middleware, \n options\n);\n\nserver.listen(port, function () { ... });\nserver.on('upgrade', function (req, socket, head) {\n server.proxy.proxyWebSocketRequest(req, socket, head);\n});\n```\n\nIf you would rather not use createServer call, and create the server that proxies yourself, see below:\n\n``` js\nvar http = require('http'),\n httpProxy = require('http-proxy');\n \n//\n// Create an instance of node-http-proxy\n//\nvar proxy = new httpProxy.HttpProxy({\n target: {\n host: 'localhost',\n port: 8000\n }\n});\n\nvar server = http.createServer(function (req, res) {\n //\n // Proxy normal HTTP requests\n //\n proxy.proxyRequest(req, res);\n});\n\nserver.on('upgrade', function (req, socket, head) {\n //\n // Proxy websocket requests too\n //\n proxy.proxyWebSocketRequest(req, socket, head);\n});\n\nserver.listen(8080);\n```\n\n### with custom server logic\n\n``` js\nvar httpProxy = require('http-proxy')\n\nvar server = httpProxy.createServer(function (req, res, proxy) {\n //\n // Put your custom server logic here\n //\n proxy.proxyRequest(req, res, {\n host: 'localhost',\n port: 9000\n });\n})\n\nserver.on('upgrade', function (req, socket, head) {\n //\n // Put your custom server logic here\n //\n server.proxy.proxyWebSocketRequest(req, socket, head, {\n host: 'localhost',\n port: 9000\n });\n});\n\nserver.listen(8080);\n```\n\n### Configuring your Socket limits\n\nBy default, `node-http-proxy` will set a 100 socket limit for all `host:port` proxy targets. You can change this in two ways: \n\n1. By passing the `maxSockets` option to `httpProxy.createServer()`\n2. By calling `httpProxy.setMaxSockets(n)`, where `n` is the number of sockets you with to use. \n\n## POST requests and buffering\n\nexpress.bodyParser will interfere with proxying of POST requests (and other methods that have a request \nbody). With bodyParser active, proxied requests will never send anything to the upstream server, and \nthe original client will just hang. See https://github.com/nodejitsu/node-http-proxy/issues/180 for options.\n\n## Using node-http-proxy from the command line\nWhen you install this package with npm, a node-http-proxy binary will become available to you. Using this binary is easy with some simple options:\n\n``` js\nusage: node-http-proxy [options] \n\nAll options should be set with the syntax --option=value\n\noptions:\n --port PORT Port that the proxy server should run on\n --target HOST:PORT Location of the server the proxy will target\n --config OUTFILE Location of the configuration file for the proxy server\n --silent Silence the log output from the proxy server\n -h, --help You're staring at it\n```\n\n
    \n## Why doesn't node-http-proxy have more advanced features like x, y, or z?\n\nIf you have a suggestion for a feature currently not supported, feel free to open a [support issue][6]. node-http-proxy is designed to just proxy http requests from one server to another, but we will be soon releasing many other complimentary projects that can be used in conjunction with node-http-proxy.\n\n## Options\n\n### Http Proxy\n\n`createServer()` supports the following options\n\n```javascript\n{\n forward: { // options for forward-proxy\n port: 8000,\n host: 'staging.com'\n },\n target : { // options for proxy target\n port : 8000, \n host : 'localhost',\n };\n source : { // additional options for websocket proxying \n host : 'localhost',\n port : 8000,\n https: true\n },\n enable : {\n xforward: true // enables X-Forwarded-For\n },\n changeOrigin: false, // changes the origin of the host header to the target URL\n timeout: 120000 // override the default 2 minute http socket timeout value in milliseconds\n}\n```\n\n## Run Tests\nThe test suite is designed to fully cover the combinatoric possibilities of HTTP and HTTPS proxying:\n\n1. HTTP --> HTTP\n2. HTTPS --> HTTP\n3. HTTPS --> HTTPS\n4. HTTP --> HTTPS\n\n```\nvows test/*-test.js --spec\nvows test/*-test.js --spec --https\nvows test/*-test.js --spec --https --target=https\nvows test/*-test.js --spec --target=https\n```\n\n
    \n### License\n\n(The MIT License)\n\nCopyright (c) 2010 Charlie Robbins, Mikeal Rogers, Fedor Indutny, & Marak Squires\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n[0]: http://nodejitsu.com\n[1]: https://github.com/nodejitsu/node-http-proxy/blob/master/examples/websocket/websocket-proxy.js\n[2]: https://github.com/nodejitsu/node-http-proxy/blob/master/examples/http/proxy-https-to-http.js\n[3]: https://github.com/nodejitsu/node-http-proxy/tree/master/examples\n[4]: http://www.ietf.org/rfc/rfc2616.txt\n[5]: http://socket.io\n[6]: http://github.com/nodejitsu/node-http-proxy/issues\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/nodejitsu/node-http-proxy/issues" - }, - "homepage": "https://github.com/nodejitsu/node-http-proxy", - "_id": "http-proxy@0.10.3", - "_from": "http-proxy@~0.10" -} diff --git a/node_modules/karma/node_modules/http-proxy/test/core/README.md b/node_modules/karma/node_modules/http-proxy/test/core/README.md deleted file mode 100644 index 152e5c66..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# `test/core` - -`test/core` directory is a place where tests from node.js core go. They are -here to ensure that node-http-proxy works just fine with all kinds of -different situations, which are covered in core tests, but are not covered in -our tests. - -All these tests require little modifications to make them test node-http-proxy, -but we try to keep them as vanilla as possible. - diff --git a/node_modules/karma/node_modules/http-proxy/test/core/common.js b/node_modules/karma/node_modules/http-proxy/test/core/common.js deleted file mode 100644 index 3f584a54..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/common.js +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = 12346; -exports.PROXY_PORT = 1234567; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function (obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function (filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnPwd = function (options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function () { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - clearTimeout, - clearInterval, - console, - Buffer, - process, - global]; - - if (global.setImmediate) { - knownGlobals.push(setImmediate); - knownGlobals.push(clearImmediate); - } - - if (global.errno) { - knownGlobals.push(errno); - } - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - - if (global.Uint8ClampedArray) { - knownGlobals.push(Uint8ClampedArray); - } - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks() { - var failed = mustCallChecks.filter(function (context) { - return context.actual !== context.expected; - }); - - failed.forEach(function (context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function (fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function () { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/karma/node_modules/http-proxy/test/core/pummel/test-http-upload-timeout.js b/node_modules/karma/node_modules/http-proxy/test/core/pummel/test-http-upload-timeout.js deleted file mode 100644 index 74b458f8..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/pummel/test-http-upload-timeout.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// This tests setTimeout() by having multiple clients connecting and sending -// data in random intervals. Clients are also randomly disconnecting until there -// are no more clients left. If no false timeout occurs, this test has passed. -var common = require('../common'), - assert = require('assert'), - http = require('http'), - server = http.createServer(), - connections = 0; - -server.on('request', function (req, res) { - req.socket.setTimeout(1000); - req.socket.on('timeout', function () { - throw new Error('Unexpected timeout'); - }); - req.on('end', function () { - connections--; - res.writeHead(200); - res.end('done\n'); - if (connections == 0) { - server.close(); - } - }); -}); - -server.listen(common.PORT, '127.0.0.1', function () { - for (var i = 0; i < 10; i++) { - connections++; - - setTimeout(function () { - var request = http.request({ - port: common.PROXY_PORT, - method: 'POST', - path: '/' - }); - - function ping() { - var nextPing = (Math.random() * 900).toFixed(); - if (nextPing > 600) { - request.end(); - return; - } - request.write('ping'); - setTimeout(ping, nextPing); - } - ping(); - }, i * 50); - } -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/run b/node_modules/karma/node_modules/http-proxy/test/core/run deleted file mode 100755 index adec53ba..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/run +++ /dev/null @@ -1,90 +0,0 @@ -#!/usr/bin/env node -/* - run.js: test runner for core tests - - Copyright (c) 2011 Nodejitsu - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var fs = require('fs'), - path = require('path'), - spawn = require('child_process').spawn, - async = require('async'), - colors = require('colors'), - optimist = require('optimist'); - -optimist.argv.color && (colors.mode = optimist.argv.color); - -var testTimeout = 15000; -var results = {}; - -function runTest(test, callback) { - var child = spawn(path.join(__dirname, 'run-single'), [ test ]); - - var killTimeout = setTimeout(function () { - child.kill(); - console.log(' ' + path.basename(test).yellow + ' timed out'.red); - }, testTimeout); - - child.on('exit', function (exitCode) { - clearTimeout(killTimeout); - - console.log(' ' + ((exitCode) ? '✘'.red : '✔'.green) + ' ' + - path.basename(test) + - (exitCode ? (' (exit code: ' + exitCode + ')') : '')); - results[test] = { exitCode: exitCode }; - callback(); - // - // We don't want tests to be stopped after first failure, and that's what - // async does when it receives truthy value in callback. - // - }); -}; - -var tests = process.argv.slice(2).filter(function (test) { - return test.substr(0, 2) != '--'; -}); - -if (!tests.length) { - var pathPrefix = path.join(__dirname, 'simple'); - tests = fs.readdirSync(pathPrefix).map(function (test) { - return path.join(pathPrefix, test); - }); - // - // We only run simple tests by default. - // -} - -console.log('Running tests:'.bold); -async.forEachSeries(tests, runTest, function () { - var failed = [], ok = []; - for (var test in results) { - (results[test].exitCode != 0 ? failed : ok).push(test); - } - - console.log('\nSummary:'.bold); - console.log((' ' + ok.length + '\tpassed tests').green); - console.log((' ' + failed.length + '\tfailed tests').red); -}); - -// vim:filetype=javascript - diff --git a/node_modules/karma/node_modules/http-proxy/test/core/run-single b/node_modules/karma/node_modules/http-proxy/test/core/run-single deleted file mode 100755 index ae53588a..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/run-single +++ /dev/null @@ -1,70 +0,0 @@ -#!/usr/bin/env node -/* - run-single.js: test runner for core tests - - Copyright (c) 2011 Nodejitsu - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -// -// Basic idea behind core test runner is to modify core tests as little as -// possible. That's why we start up node-http-proxy here instead of embeeding -// this code in tests. -// -// In most cases only modification to core tests you'll need is changing port -// of http client to common.PROXY_PORT. -// - -var path = require('path'), - spawn = require('child_process').spawn, - httpProxy = require('../../'), - common = require('./common'); - -var test = process.argv[2], - testProcess; - -if (!test) { - return console.error('Need test to run'); -} - -console.log('Running test ' + test); - -var proxy = httpProxy.createServer(common.PORT, 'localhost'); -proxy.listen(common.PROXY_PORT); - -proxy.on('listening', function () { - console.log('Proxy server listening on ' + common.PROXY_PORT); - testProcess = spawn(process.argv[0], [ process.argv[2] ]); - testProcess.stdout.pipe(process.stdout); - testProcess.stderr.pipe(process.stderr); - - testProcess.on('exit', function (code) { - process.exit(code); - }); -}); - -process.on('SIGTERM', function () { - testProcess.kill(); - process.exit(1); -}); - -// vim:filetype=javascript diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-chunked.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-chunked.js deleted file mode 100644 index b1cbf0db..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-chunked.js +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var UTF8_STRING = '南越国是前203年至前111年存在于岭南地区的一个国家,' + - '国都位于番禺,疆域包括今天中国的广东、广西两省区的大部份地区,福建省、湖南、' + - '贵州、云南的一小部份地区和越南的北部。南越国是秦朝灭亡后,' + - '由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。前196年和前179年,' + - '南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + - '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。' + - '南越国共存在93年,历经五代君主。南越国是岭南地区的第一个有记载的政权国家,' + - '采用封建制和郡县制并存的制度,它的建立保证了秦末乱世岭南地区社会秩序的稳定,' + - '有效的改善了岭南地区落后的政治、经济现状。'; - -var server = http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/plain; charset=utf8'}); - res.end(UTF8_STRING, 'utf8'); -}); -server.listen(common.PORT, function () { - var data = ''; - var get = http.get({ - path: '/', - host: 'localhost', - port: common.PROXY_PORT - }, function (x) { - x.setEncoding('utf8'); - x.on('data', function (c) {data += c}); - x.on('error', function (e) { - throw e; - }); - x.on('end', function () { - assert.equal('string', typeof data); - console.log('here is the response:'); - assert.equal(UTF8_STRING, data); - console.log(data); - server.close(); - }); - }); - get.on('error', function (e) {throw e}); - get.end(); - -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-abort.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-abort.js deleted file mode 100644 index 78d0a6f9..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-abort.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var clientAborts = 0; - -var server = http.Server(function (req, res) { - console.log('Got connection'); - res.writeHead(200); - res.write('Working on it...'); - - // I would expect an error event from req or res that the client aborted - // before completing the HTTP request / response cycle, or maybe a new - // event like "aborted" or something. - req.on('aborted', function () { - clientAborts++; - console.log('Got abort ' + clientAborts); - if (clientAborts === N) { - console.log('All aborts detected, you win.'); - server.close(); - } - }); - - // since there is already clientError, maybe that would be appropriate, - // since "error" is magical - req.on('clientError', function () { - console.log('Got clientError'); - }); -}); - -var responses = 0; -var N = http.Agent.defaultMaxSockets - 1; -var requests = []; - -server.listen(common.PORT, function () { - console.log('Server listening.'); - - for (var i = 0; i < N; i++) { - console.log('Making client ' + i); - var options = { port: common.PROXY_PORT, path: '/?id=' + i }; - var req = http.get(options, function (res) { - console.log('Client response code ' + res.statusCode); - - if (++responses == N) { - console.log('All clients connected, destroying.'); - requests.forEach(function (outReq) { - console.log('abort'); - outReq.abort(); - }); - } - }); - - requests.push(req); - } -}); - -process.on('exit', function () { - assert.equal(N, clientAborts); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-abort2.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-abort2.js deleted file mode 100644 index eef05fb4..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-abort2.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// libuv-broken - - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var server = http.createServer(function (req, res) { - res.end('Hello'); -}); - -server.listen(common.PORT, function () { - var req = http.get({port: common.PROXY_PORT}, function (res) { - res.on('data', function (data) { - req.abort(); - server.close(); - }); - }); -}); - diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-upload-buf.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-upload-buf.js deleted file mode 100644 index 3b8e9abc..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-upload-buf.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var N = 1024; -var bytesRecieved = 0; -var server_req_complete = false; -var client_res_complete = false; - -var server = http.createServer(function (req, res) { - assert.equal('POST', req.method); - - req.on('data', function (chunk) { - bytesRecieved += chunk.length; - }); - - req.on('end', function () { - server_req_complete = true; - console.log('request complete from server'); - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.write('hello\n'); - res.end(); - }); -}); -server.listen(common.PORT); - -server.on('listening', function () { - var req = http.request({ - port: common.PROXY_PORT, - method: 'POST', - path: '/' - }, function (res) { - res.setEncoding('utf8'); - res.on('data', function (chunk) { - console.log(chunk); - }); - res.on('end', function () { - client_res_complete = true; - server.close(); - }); - }); - - req.write(new Buffer(N)); - req.end(); - - common.error('client finished sending request'); -}); - -process.on('exit', function () { - assert.equal(N, bytesRecieved); - assert.equal(true, server_req_complete); - assert.equal(true, client_res_complete); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-upload.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-upload.js deleted file mode 100644 index fef706f2..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-client-upload.js +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var sent_body = ''; -var server_req_complete = false; -var client_res_complete = false; - -var server = http.createServer(function (req, res) { - assert.equal('POST', req.method); - req.setEncoding('utf8'); - - req.on('data', function (chunk) { - console.log('server got: ' + JSON.stringify(chunk)); - sent_body += chunk; - }); - - req.on('end', function () { - server_req_complete = true; - console.log('request complete from server'); - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.write('hello\n'); - res.end(); - }); -}); -server.listen(common.PORT); - -server.on('listening', function () { - var req = http.request({ - port: common.PROXY_PORT, - method: 'POST', - path: '/' - }, function (res) { - res.setEncoding('utf8'); - res.on('data', function (chunk) { - console.log(chunk); - }); - res.on('end', function () { - client_res_complete = true; - server.close(); - }); - }); - - req.write('1\n'); - req.write('2\n'); - req.write('3\n'); - req.end(); - - common.error('client finished sending request'); -}); - -process.on('exit', function () { - assert.equal('1\n2\n3\n', sent_body); - assert.equal(true, server_req_complete); - assert.equal(true, client_res_complete); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-contentLength0.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-contentLength0.js deleted file mode 100644 index abc3747e..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-contentLength0.js +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var http = require('http'); - -// Simple test of Node's HTTP Client choking on a response -// with a 'Content-Length: 0 ' response header. -// I.E. a space character after the 'Content-Length' throws an `error` event. - - -var s = http.createServer(function (req, res) { - res.writeHead(200, {'Content-Length': '0 '}); - res.end(); -}); -s.listen(common.PORT, function () { - - var request = http.request({ port: common.PROXY_PORT }, function (response) { - console.log('STATUS: ' + response.statusCode); - s.close(); - }); - - request.end(); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-eof-on-connect.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-eof-on-connect.js deleted file mode 100644 index d02ee6d1..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-eof-on-connect.js +++ /dev/null @@ -1,40 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var net = require('net'); -var http = require('http'); - -// This is a regression test for http://github.com/ry/node/issues/#issue/44 -// It is separate from test-http-malformed-request.js because it is only -// reproduceable on the first packet on the first connection to a server. - -var server = http.createServer(function (req, res) {}); -server.listen(common.PORT); - -server.on('listening', function () { - net.createConnection(common.PROXY_PORT).on('connect', function () { - this.destroy(); - }).on('close', function () { - server.close(); - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-extra-response.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-extra-response.js deleted file mode 100644 index a3d27462..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-extra-response.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var net = require('net'); - -// If an HTTP server is broken and sends data after the end of the response, -// node should ignore it and drop the connection. -// Demos this bug: https://github.com/ry/node/issues/680 - -var body = 'hello world\r\n'; -var fullResponse = - 'HTTP/1.1 500 Internal Server Error\r\n' + - 'Content-Length: ' + body.length + '\r\n' + - 'Content-Type: text/plain\r\n' + - 'Date: Fri + 18 Feb 2011 06:22:45 GMT\r\n' + - 'Host: 10.20.149.2\r\n' + - 'Access-Control-Allow-Credentials: true\r\n' + - 'Server: badly broken/0.1 (OS NAME)\r\n' + - '\r\n' + - body; - -var gotResponse = false; - - -var server = net.createServer(function (socket) { - var postBody = ''; - - socket.setEncoding('utf8'); - - socket.on('data', function (chunk) { - postBody += chunk; - - if (postBody.indexOf('\r\n') > -1) { - socket.write(fullResponse); - // omg, I wrote the response twice, what a terrible HTTP server I am. - socket.end(fullResponse); - } - }); -}); - - -server.listen(common.PORT, function () { - http.get({ port: common.PROXY_PORT }, function (res) { - var buffer = ''; - console.log('Got res code: ' + res.statusCode); - - res.setEncoding('utf8'); - res.on('data', function (chunk) { - buffer += chunk; - }); - - res.on('end', function () { - console.log('Response ended, read ' + buffer.length + ' bytes'); - assert.equal(body, buffer); - server.close(); - gotResponse = true; - }); - }); -}); - - -process.on('exit', function () { - assert.ok(gotResponse); -}); - diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-request.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-request.js deleted file mode 100644 index e8c203ef..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-request.js +++ /dev/null @@ -1,56 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var util = require('util'); - - -var body = 'hello world\n'; - -var server = http.createServer(function (req, res) { - common.error('req: ' + req.method); - res.writeHead(200, {'Content-Length': body.length}); - res.end(); - server.close(); -}); - -var gotEnd = false; - -server.listen(common.PORT, function () { - var request = http.request({ - port: common.PROXY_PORT, - method: 'HEAD', - path: '/' - }, function (response) { - common.error('response start'); - response.on('end', function () { - common.error('response end'); - gotEnd = true; - }); - }); - request.end(); -}); - -process.on('exit', function () { - assert.ok(gotEnd); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-response-has-no-body-end.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-response-has-no-body-end.js deleted file mode 100644 index 6d89bee9..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-response-has-no-body-end.js +++ /dev/null @@ -1,61 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// libuv-broken - - -var common = require('../common'); -var assert = require('assert'); - -var http = require('http'); - -// This test is to make sure that when the HTTP server -// responds to a HEAD request with data to res.end, -// it does not send any body. - -var server = http.createServer(function (req, res) { - res.writeHead(200); - res.end('FAIL'); // broken: sends FAIL from hot path. -}); -server.listen(common.PORT); - -var responseComplete = false; - -server.on('listening', function () { - var req = http.request({ - port: common.PROXY_PORT, - method: 'HEAD', - path: '/' - }, function (res) { - common.error('response'); - res.on('end', function () { - common.error('response end'); - server.close(); - responseComplete = true; - }); - }); - common.error('req'); - req.end(); -}); - -process.on('exit', function () { - assert.ok(responseComplete); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-response-has-no-body.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-response-has-no-body.js deleted file mode 100644 index aa7a281b..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-head-response-has-no-body.js +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); - -var http = require('http'); - -// This test is to make sure that when the HTTP server -// responds to a HEAD request, it does not send any body. -// In this case it was sending '0\r\n\r\n' - -var server = http.createServer(function (req, res) { - res.writeHead(200); // broken: defaults to TE chunked - res.end(); -}); -server.listen(common.PORT); - -var responseComplete = false; - -server.on('listening', function () { - var req = http.request({ - port: common.PROXY_PORT, - method: 'HEAD', - path: '/' - }, function (res) { - common.error('response'); - res.on('end', function () { - common.error('response end'); - server.close(); - responseComplete = true; - }); - }); - common.error('req'); - req.end(); -}); - -process.on('exit', function () { - assert.ok(responseComplete); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-host-headers.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-host-headers.js deleted file mode 100644 index 2dae1182..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-host-headers.js +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// libuv-broken - - -var http = require('http'), - common = require('../common'), - assert = require('assert'), - httpServer = http.createServer(reqHandler); - -function reqHandler(req, res) { - console.log('Got request: ' + req.headers.host + ' ' + req.url); - if (req.url === '/setHostFalse5') { - assert.equal(req.headers.host, undefined); - } else { - assert.equal(req.headers.host, 'localhost:' + common.PROXY_PORT, - 'Wrong host header for req[' + req.url + ']: ' + - req.headers.host); - } - res.writeHead(200, {}); - //process.nextTick(function () { res.end('ok'); }); - res.end('ok'); -} - -function thrower(er) { - throw er; -} - -testHttp(); - -function testHttp() { - - console.log('testing http on port ' + common.PROXY_PORT + ' (proxied to ' + - common.PORT + ')'); - - var counter = 0; - - function cb() { - counter--; - console.log('back from http request. counter = ' + counter); - if (counter === 0) { - httpServer.close(); - } - } - - httpServer.listen(common.PORT, function (er) { - console.error('listening on ' + common.PORT); - - if (er) throw er; - - http.get({ method: 'GET', - path: '/' + (counter++), - host: 'localhost', - //agent: false, - port: common.PROXY_PORT }, cb).on('error', thrower); - - http.request({ method: 'GET', - path: '/' + (counter++), - host: 'localhost', - //agent: false, - port: common.PROXY_PORT }, cb).on('error', thrower).end(); - - http.request({ method: 'POST', - path: '/' + (counter++), - host: 'localhost', - //agent: false, - port: common.PROXY_PORT }, cb).on('error', thrower).end(); - - http.request({ method: 'PUT', - path: '/' + (counter++), - host: 'localhost', - //agent: false, - port: common.PROXY_PORT }, cb).on('error', thrower).end(); - - http.request({ method: 'DELETE', - path: '/' + (counter++), - host: 'localhost', - //agent: false, - port: common.PROXY_PORT }, cb).on('error', thrower).end(); - }); -} - diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-many-keep-alive-connections.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-many-keep-alive-connections.js deleted file mode 100644 index 6b79619b..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-many-keep-alive-connections.js +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var expected = 10000; -var responses = 0; -var requests = 0; -var connection; - -var server = http.Server(function (req, res) { - requests++; - assert.equal(req.connection, connection); - res.writeHead(200); - res.end('hello world\n'); -}); - -server.once('connection', function (c) { - connection = c; -}); - -server.listen(common.PORT, function () { - var callee = arguments.callee; - var request = http.get({ - port: common.PROXY_PORT, - path: '/', - headers: { - 'Connection': 'Keep-alive' - } - }, function (res) { - res.on('end', function () { - if (++responses < expected) { - callee(); - } else { - process.exit(); - } - }); - }).on('error', function (e) { - console.log(e.message); - process.exit(1); - }); - request.agent.maxSockets = 1; -}); - -process.on('exit', function () { - assert.equal(expected, responses); - assert.equal(expected, requests); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-multi-line-headers.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-multi-line-headers.js deleted file mode 100644 index e0eeb2c1..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-multi-line-headers.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); - -var http = require('http'); -var net = require('net'); - -var gotResponse = false; - -var server = net.createServer(function (conn) { - var body = 'Yet another node.js server.'; - - var response = - 'HTTP/1.1 200 OK\r\n' + - 'Connection: close\r\n' + - 'Content-Length: ' + body.length + '\r\n' + - 'Content-Type: text/plain;\r\n' + - ' x-unix-mode=0600;\r\n' + - ' name=\"hello.txt\"\r\n' + - '\r\n' + - body; - - conn.write(response, function () { - conn.destroy(); - server.close(); - }); -}); - -server.listen(common.PORT, function () { - http.get({host: '127.0.0.1', port: common.PROXY_PORT}, function (res) { - assert.equal(res.headers['content-type'], - 'text/plain;x-unix-mode=0600;name="hello.txt"'); - gotResponse = true; - }); -}); - -process.on('exit', function () { - assert.ok(gotResponse); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-proxy.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-proxy.js deleted file mode 100644 index fdddb3cd..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-proxy.js +++ /dev/null @@ -1,109 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var url = require('url'); - -var PROXY_PORT = common.PORT; -var BACKEND_PORT = common.PORT + 1; - -var cookies = [ - 'session_token=; path=/; expires=Sun, 15-Sep-2030 13:48:52 GMT', - 'prefers_open_id=; path=/; expires=Thu, 01-Jan-1970 00:00:00 GMT' -]; - -var headers = {'content-type': 'text/plain', - 'set-cookie': cookies, - 'hello': 'world' }; - -var backend = http.createServer(function (req, res) { - common.debug('backend request'); - res.writeHead(200, headers); - res.write('hello world\n'); - res.end(); -}); - -var proxy = http.createServer(function (req, res) { - common.debug('proxy req headers: ' + JSON.stringify(req.headers)); - var proxy_req = http.get({ - port: BACKEND_PORT, - path: url.parse(req.url).pathname - }, function (proxy_res) { - - common.debug('proxy res headers: ' + JSON.stringify(proxy_res.headers)); - - assert.equal('world', proxy_res.headers['hello']); - assert.equal('text/plain', proxy_res.headers['content-type']); - assert.deepEqual(cookies, proxy_res.headers['set-cookie']); - - res.writeHead(proxy_res.statusCode, proxy_res.headers); - - proxy_res.on('data', function (chunk) { - res.write(chunk); - }); - - proxy_res.on('end', function () { - res.end(); - common.debug('proxy res'); - }); - }); -}); - -var body = ''; - -var nlistening = 0; -function startReq() { - nlistening++; - if (nlistening < 2) return; - - var client = http.get({ - port: common.PROXY_PORT, - path: '/test' - }, function (res) { - common.debug('got res'); - assert.equal(200, res.statusCode); - - assert.equal('world', res.headers['hello']); - assert.equal('text/plain', res.headers['content-type']); - assert.deepEqual(cookies, res.headers['set-cookie']); - - res.setEncoding('utf8'); - res.on('data', function (chunk) { body += chunk; }); - res.on('end', function () { - proxy.close(); - backend.close(); - common.debug('closed both'); - }); - }); - common.debug('client req'); -} - -common.debug('listen proxy'); -proxy.listen(PROXY_PORT, startReq); - -common.debug('listen backend'); -backend.listen(BACKEND_PORT, startReq); - -process.on('exit', function () { - assert.equal(body, 'hello world\n'); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-response-close.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-response-close.js deleted file mode 100644 index b92abb01..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-response-close.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var gotEnd = false; - -var server = http.createServer(function (req, res) { - res.writeHead(200); - res.write('a'); - - req.on('close', function () { - console.error('aborted'); - gotEnd = true; - }); -}); -server.listen(common.PORT); - -server.on('listening', function () { - console.error('make req'); - http.get({ - port: common.PROXY_PORT - }, function (res) { - console.error('got res'); - res.on('data', function (data) { - console.error('destroy res'); - res.destroy(); - server.close(); - }); - }); -}); - -process.on('exit', function () { - assert.ok(gotEnd); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-server-multiheaders.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-server-multiheaders.js deleted file mode 100644 index 6a5b8be7..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-server-multiheaders.js +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// Verify that the HTTP server implementation handles multiple instances -// of the same header as per RFC2616: joining the handful of fields by ', ' -// that support it, and dropping duplicates for other fields. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var srv = http.createServer(function (req, res) { - assert.equal(req.headers.accept, 'abc, def, ghijklmnopqrst'); - assert.equal(req.headers.host, 'foo'); - assert.equal(req.headers['x-foo'], 'bingo'); - assert.equal(req.headers['x-bar'], 'banjo, bango'); - - res.writeHead(200, {'Content-Type' : 'text/plain'}); - res.end('EOF'); - - srv.close(); -}); - -srv.listen(common.PORT, function () { - http.get({ - host: 'localhost', - port: common.PROXY_PORT, - path: '/', - headers: [ - ['accept', 'abc'], - ['accept', 'def'], - ['Accept', 'ghijklmnopqrst'], - ['host', 'foo'], - ['Host', 'bar'], - ['hOst', 'baz'], - ['x-foo', 'bingo'], - ['x-bar', 'banjo'], - ['x-bar', 'bango'] - ] - }); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-set-cookies.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-set-cookies.js deleted file mode 100644 index aac29940..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-set-cookies.js +++ /dev/null @@ -1,84 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -var nresponses = 0; - -var server = http.createServer(function (req, res) { - if (req.url == '/one') { - res.writeHead(200, [['set-cookie', 'A'], - ['content-type', 'text/plain']]); - res.end('one\n'); - } else { - res.writeHead(200, [['set-cookie', 'A'], - ['set-cookie', 'B'], - ['content-type', 'text/plain']]); - res.end('two\n'); - } -}); -server.listen(common.PORT); - -server.on('listening', function () { - // - // one set-cookie header - // - http.get({ port: common.PROXY_PORT, path: '/one' }, function (res) { - // set-cookie headers are always return in an array. - // even if there is only one. - assert.deepEqual(['A'], res.headers['set-cookie']); - assert.equal('text/plain', res.headers['content-type']); - - res.on('data', function (chunk) { - console.log(chunk.toString()); - }); - - res.on('end', function () { - if (++nresponses == 2) { - server.close(); - } - }); - }); - - // two set-cookie headers - - http.get({ port: common.PROXY_PORT, path: '/two' }, function (res) { - assert.deepEqual(['A', 'B'], res.headers['set-cookie']); - assert.equal('text/plain', res.headers['content-type']); - - res.on('data', function (chunk) { - console.log(chunk.toString()); - }); - - res.on('end', function () { - if (++nresponses == 2) { - server.close(); - } - }); - }); - -}); - -process.on('exit', function () { - assert.equal(2, nresponses); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-status-code.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-status-code.js deleted file mode 100644 index dffbaf7c..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-status-code.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// libuv-broken - - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); - -// Simple test of Node's HTTP ServerResponse.statusCode -// ServerResponse.prototype.statusCode - -var testsComplete = 0; -var tests = [200, 202, 300, 404, 500]; -var testIdx = 0; - -var s = http.createServer(function (req, res) { - var t = tests[testIdx]; - res.writeHead(t, {'Content-Type': 'text/plain'}); - console.log('--\nserver: statusCode after writeHead: ' + res.statusCode); - assert.equal(res.statusCode, t); - res.end('hello world\n'); -}); - -s.listen(common.PORT, nextTest); - - -function nextTest() { - if (testIdx + 1 === tests.length) { - return s.close(); - } - var test = tests[testIdx]; - - http.get({ port: common.PROXY_PORT }, function (response) { - console.log('client: expected status: ' + test); - console.log('client: statusCode: ' + response.statusCode); - assert.equal(response.statusCode, test); - response.on('end', function () { - testsComplete++; - testIdx += 1; - nextTest(); - }); - }); -} - - -process.on('exit', function () { - assert.equal(4, testsComplete); -}); - diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-upgrade-server2.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-upgrade-server2.js deleted file mode 100644 index a5273761..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http-upgrade-server2.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var net = require('net'); - -var server = http.createServer(function (req, res) { - common.error('got req'); - throw new Error('This shouldn\'t happen.'); -}); - -server.on('upgrade', function (req, socket, upgradeHead) { - common.error('got upgrade event'); - // test that throwing an error from upgrade gets - // is uncaught - throw new Error('upgrade error'); -}); - -var gotError = false; - -process.on('uncaughtException', function (e) { - common.error('got \'clientError\' event'); - assert.equal('upgrade error', e.message); - gotError = true; - process.exit(0); -}); - - -server.listen(common.PORT, function () { - var c = net.createConnection(common.PROXY_PORT); - - c.on('connect', function () { - common.error('client wrote message'); - c.write('GET /blah HTTP/1.1\r\n' + - 'Upgrade: WebSocket\r\n' + - 'Connection: Upgrade\r\n' + - '\r\n\r\nhello world'); - }); - - c.on('end', function () { - c.end(); - }); - - c.on('close', function () { - common.error('client close'); - server.close(); - }); -}); - -process.on('exit', function () { - assert.ok(gotError); -}); diff --git a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http.js b/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http.js deleted file mode 100644 index e082eb2c..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/core/simple/test-http.js +++ /dev/null @@ -1,108 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var http = require('http'); -var url = require('url'); - -function p(x) { - common.error(common.inspect(x)); -} - -var responses_sent = 0; -var responses_recvd = 0; -var body0 = ''; -var body1 = ''; - -var server = http.Server(function (req, res) { - if (responses_sent == 0) { - assert.equal('GET', req.method); - assert.equal('/hello', url.parse(req.url).pathname); - - console.dir(req.headers); - assert.equal(true, 'accept' in req.headers); - assert.equal('*/*', req.headers['accept']); - - assert.equal(true, 'foo' in req.headers); - assert.equal('bar', req.headers['foo']); - } - - if (responses_sent == 1) { - assert.equal('POST', req.method); - assert.equal('/world', url.parse(req.url).pathname); - this.close(); - } - - req.on('end', function () { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.write('The path was ' + url.parse(req.url).pathname); - res.end(); - responses_sent += 1; - }); - - //assert.equal('127.0.0.1', res.connection.remoteAddress); -}); -server.listen(common.PORT); - -server.on('listening', function () { - var agent = new http.Agent({ port: common.PROXY_PORT, maxSockets: 1 }); - http.get({ - port: common.PROXY_PORT, - path: '/hello', - headers: {'Accept': '*/*', 'Foo': 'bar'}, - agent: agent - }, function (res) { - assert.equal(200, res.statusCode); - responses_recvd += 1; - res.setEncoding('utf8'); - res.on('data', function (chunk) { body0 += chunk; }); - common.debug('Got /hello response'); - }); - - setTimeout(function () { - var req = http.request({ - port: common.PROXY_PORT, - method: 'POST', - path: '/world', - agent: agent - }, function (res) { - assert.equal(200, res.statusCode); - responses_recvd += 1; - res.setEncoding('utf8'); - res.on('data', function (chunk) { body1 += chunk; }); - common.debug('Got /world response'); - }); - req.end(); - }, 1); -}); - -process.on('exit', function () { - common.debug('responses_recvd: ' + responses_recvd); - assert.equal(2, responses_recvd); - - common.debug('responses_sent: ' + responses_sent); - assert.equal(2, responses_sent); - - assert.equal('The path was /hello', body0); - assert.equal('The path was /world', body1); -}); - diff --git a/node_modules/karma/node_modules/http-proxy/test/examples-test.js b/node_modules/karma/node_modules/http-proxy/test/examples-test.js deleted file mode 100644 index 36beb89a..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/examples-test.js +++ /dev/null @@ -1,26 +0,0 @@ -/* - * examples.js: Tests which ensure all examples do not throw errors. - * - * (C) 2010, Charlie Robbins - * - */ - -var vows = require('vows') - macros = require('./macros'), - examples = macros.examples; - -// -// Suppress `EADDRINUSE` errors since -// we are just checking for require-time errors -// -process.on('uncaughtException', function (err) { - if (err.code !== 'EADDRINUSE') { - throw err; - } -}); - -vows.describe('node-http-proxy/examples').addBatch( - examples.shouldHaveDeps() -).addBatch( - examples.shouldHaveNoErrors() -).export(module); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-cert.pem b/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-cert.pem deleted file mode 100644 index 8e4354db..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-cert.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIB7DCCAZYCCQC7gs0MDNn6MTANBgkqhkiG9w0BAQUFADB9MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEgMB4GCSqGSIb3DQEJARYR -cnlAdGlueWNsb3Vkcy5vcmcwHhcNMTEwMzE0MTgyOTEyWhcNMzgwNzI5MTgyOTEy -WjB9MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYD -VQQKEwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MjEg -MB4GCSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwXDANBgkqhkiG9w0BAQEF -AANLADBIAkEAyXb8FrRdKbhrKLgLSsn61i1C7w7fVVVd7OQsmV/7p9WB2lWFiDlC -WKGU9SiIz/A6wNZDUAuc2E+VwtpCT561AQIDAQABMA0GCSqGSIb3DQEBBQUAA0EA -C8HzpuNhFLCI3A5KkBS5zHAQax6TFUOhbpBCR0aTDbJ6F1liDTK1lmU/BjvPoj+9 -1LHwrmh29rK8kBPEjmymCQ== ------END CERTIFICATE----- diff --git a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-csr.pem b/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-csr.pem deleted file mode 100644 index a670c4c6..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-csr.pem +++ /dev/null @@ -1,10 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBXTCCAQcCAQAwfTELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMQswCQYDVQQH -EwJTRjEPMA0GA1UEChMGSm95ZW50MRAwDgYDVQQLEwdOb2RlLmpzMQ8wDQYDVQQD -EwZhZ2VudDIxIDAeBgkqhkiG9w0BCQEWEXJ5QHRpbnljbG91ZHMub3JnMFwwDQYJ -KoZIhvcNAQEBBQADSwAwSAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf -+6fVgdpVhYg5QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAaAlMCMGCSqG -SIb3DQEJBzEWExRBIGNoYWxsZW5nZSBwYXNzd29yZDANBgkqhkiG9w0BAQUFAANB -AJnll2pt5l0pzskQSpjjLVTlFDFmJr/AZ3UK8v0WxBjYjCe5Jx4YehkChpxIyDUm -U3J9q9MDUf0+Y2+EGkssFfk= ------END CERTIFICATE REQUEST----- diff --git a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-key.pem b/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-key.pem deleted file mode 100644 index 522903c6..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2-key.pem +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOgIBAAJBAMl2/Ba0XSm4ayi4C0rJ+tYtQu8O31VVXezkLJlf+6fVgdpVhYg5 -QlihlPUoiM/wOsDWQ1ALnNhPlcLaQk+etQECAwEAAQJBAMT6Bf34+UHKY1ObpsbH -9u2jsVblFq1rWvs8GPMY6oertzvwm3DpuSUp7PTgOB1nLTLYtCERbQ4ovtN8tn3p -OHUCIQDzIEGsoCr5vlxXvy2zJwu+fxYuhTZWMVuo1397L0VyhwIhANQh+yzqUgaf -WRtSB4T2W7ADtJI35ET61jKBty3CqJY3AiAIwju7dVW3A5WeD6Qc1SZGKZvp9yCb -AFI2BfVwwaY11wIgXF3PeGcvACMyMWsuSv7aPXHfliswAbkWuzcwA4TW01ECIGWa -cgsDvVFxmfM5NPSuT/UDTa6R5BFISB5ea0N0AR3I ------END RSA PRIVATE KEY----- diff --git a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2.cnf b/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2.cnf deleted file mode 100644 index 0a9f2c73..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/fixtures/agent2.cnf +++ /dev/null @@ -1,19 +0,0 @@ -[ req ] -default_bits = 1024 -days = 999 -distinguished_name = req_distinguished_name -attributes = req_attributes -prompt = no - -[ req_distinguished_name ] -C = US -ST = CA -L = SF -O = Joyent -OU = Node.js -CN = agent2 -emailAddress = ry@tinyclouds.org - -[ req_attributes ] -challengePassword = A challenge password - diff --git a/node_modules/karma/node_modules/http-proxy/test/helpers/http.js b/node_modules/karma/node_modules/http-proxy/test/helpers/http.js deleted file mode 100644 index aaf7a804..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/helpers/http.js +++ /dev/null @@ -1,182 +0,0 @@ -/* - * http.js: Top level include for node-http-proxy http helpers - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var assert = require('assert'), - http = require('http'), - https = require('https'), - url = require('url'), - async = require('async'), - helpers = require('./index'), - protocols = helpers.protocols, - httpProxy = require('../../lib/node-http-proxy'); - -// -// ### function createServerPair (options, callback) -// #### @options {Object} Options to create target and proxy server. -// #### @callback {function} Continuation to respond to when complete. -// -// Creates http target and proxy servers -// -exports.createServerPair = function (options, callback) { - async.series([ - // - // 1. Create the target server - // - function createTarget(next) { - exports.createServer(options.target, next); - }, - // - // 2. Create the proxy server - // - function createTarget(next) { - exports.createProxyServer(options.proxy, next); - } - ], callback); -}; - -// -// ### function createServer (options, callback) -// #### @options {Object} Options for creatig an http server. -// #### @port {number} Port to listen on -// #### @output {string} String to write to each HTTP response -// #### @headers {Object} Headers to assert are sent by `node-http-proxy`. -// #### @callback {function} Continuation to respond to when complete. -// -// Creates a target server that the tests will proxy to. -// -exports.createServer = function (options, callback) { - // - // Request handler to use in either `http` - // or `https` server. - // - function requestHandler(req, res) { - if (options.headers) { - Object.keys(options.headers).forEach(function (key) { - assert.equal(req.headers[key], options.headers[key]); - }); - } - - if (options.outputHeaders) { - Object.keys(options.outputHeaders).forEach(function (header) { - res.setHeader(header, options.outputHeaders[header]); - }); - } - - setTimeout(function() { - res.writeHead(200, { 'Content-Type': 'text/plain' }); - res.write(options.output || 'hello proxy'); - res.end(); - }, options.latency || 1); - } - - var server = protocols.target === 'https' - ? https.createServer(helpers.https, requestHandler) - : http.createServer(requestHandler); - - server.listen(options.port, function () { - callback(null, this); - }); -}; - -// -// ### function createProxyServer (options, callback) -// #### @options {Object} Options for creatig an http server. -// #### @port {number} Port to listen on -// #### @latency {number} Latency of this server in milliseconds -// #### @proxy {Object} Options to pass to the HttpProxy. -// #### @routing {boolean} Enables `httpProxy.RoutingProxy` -// #### @callback {function} Continuation to respond to when complete. -// -// Creates a proxy server that the tests will request against. -// -exports.createProxyServer = function (options, callback) { - if (!options.latency) { - if (protocols.proxy === 'https') { - options.proxy.https = helpers.https; - } - options.proxy.rejectUnauthorized = false; - - return httpProxy - .createServer(options.proxy) - .listen(options.port, function () { - callback(null, this); - }); - } - - var server, - proxy; - - proxy = options.routing - ? new httpProxy.RoutingProxy(options.proxy) - : new httpProxy.HttpProxy(options.proxy); - - // - // Request handler to use in either `http` - // or `https` server. - // - function requestHandler(req, res) { - var buffer = httpProxy.buffer(req); - - if (options.outputHeaders) { - Object.keys(options.outputHeaders).forEach(function (header) { - res.setHeader(header, options.outputHeaders[header]); - }); - } - setTimeout(function () { - // - // Setup options dynamically for `RoutingProxy.prototype.proxyRequest` - // or `HttpProxy.prototype.proxyRequest`. - // - buffer = options.routing ? { buffer: buffer } : buffer; - proxy.proxyRequest(req, res, buffer); - }, options.latency); - } - - server = protocols.proxy === 'https' - ? https.createServer(helpers.https, requestHandler) - : http.createServer(requestHandler); - - server.listen(options.port, function () { - callback(null, this); - }); -}; - -// -// ### function assignPortsToRoutes (routes) -// #### @routes {Object} Routing table to assign ports to -// -// Assigns dynamic ports to the `routes` for runtime testing. -// -exports.assignPortsToRoutes = function (routes) { - Object.keys(routes).forEach(function (source) { - routes[source] = routes[source].replace('{PORT}', helpers.nextPort); - }); - - return routes; -}; - -// -// ### function parseRoutes (options) -// #### @options {Object} Options to use when parsing routes -// #### @protocol {string} Protocol to use in the routes -// #### @routes {Object} Routes to parse. -// -// Returns an Array of fully-parsed URLs for the source and -// target of `options.routes`. -// -exports.parseRoutes = function (options) { - var protocol = options.protocol || 'http', - routes = options.routes; - - return Object.keys(routes).map(function (source) { - return { - source: url.parse(protocol + '://' + source), - target: url.parse(protocol + '://' + routes[source]) - }; - }); -}; diff --git a/node_modules/karma/node_modules/http-proxy/test/helpers/index.js b/node_modules/karma/node_modules/http-proxy/test/helpers/index.js deleted file mode 100644 index 7e3c3f48..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/helpers/index.js +++ /dev/null @@ -1,105 +0,0 @@ -/* - * index.js: Top level include for node-http-proxy helpers - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var fs = require('fs'), - path = require('path'); - -var fixturesDir = path.join(__dirname, '..', 'fixtures'); - -// -// @https {Object} -// Returns the necessary `https` credentials. -// -Object.defineProperty(exports, 'https', { - get: function () { - delete this.https; - return this.https = { - key: fs.readFileSync(path.join(fixturesDir, 'agent2-key.pem'), 'utf8'), - cert: fs.readFileSync(path.join(fixturesDir, 'agent2-cert.pem'), 'utf8') - }; - } -}); - -// -// @protocols {Object} -// Returns an object representing the desired protocols -// for the `proxy` and `target` server. -// -Object.defineProperty(exports, 'protocols', { - get: function () { - delete this.protocols; - return this.protocols = { - target: exports.argv.target || 'http', - proxy: exports.argv.proxy || 'http' - }; - } -}); - -// -// @nextPort {number} -// Returns an auto-incrementing port for tests. -// -Object.defineProperty(exports, 'nextPort', { - get: function () { - var current = this.port || 9050; - this.port = current + 1; - return current; - } -}); - -// -// @nextPortPair {Object} -// Returns an auto-incrementing pair of ports for tests. -// -Object.defineProperty(exports, 'nextPortPair', { - get: function () { - return { - target: this.nextPort, - proxy: this.nextPort - }; - } -}); - -// -// ### function describe(prefix) -// #### @prefix {string} Prefix to use before the description -// -// Returns a string representing the protocols that this suite -// is testing based on CLI arguments. -// -exports.describe = function (prefix, base) { - prefix = prefix || ''; - base = base || 'http'; - - function protocol(endpoint) { - return exports.protocols[endpoint] === 'https' - ? base + 's' - : base; - } - - return [ - 'node-http-proxy', - prefix, - [ - protocol('proxy'), - '-to-', - protocol('target') - ].join('') - ].filter(Boolean).join('/'); -}; - -// -// Expose the CLI arguments -// -exports.argv = require('optimist').argv; - -// -// Export additional helpers for `http` and `websockets`. -// -exports.http = require('./http'); -exports.ws = require('./ws'); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/helpers/ws.js b/node_modules/karma/node_modules/http-proxy/test/helpers/ws.js deleted file mode 100644 index a4905227..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/helpers/ws.js +++ /dev/null @@ -1,112 +0,0 @@ -/* - * ws.js: Top level include for node-http-proxy websocket helpers - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var assert = require('assert'), - https = require('https'), - async = require('async'), - io = require('socket.io'), - ws = require('ws'), - helpers = require('./index'), - protocols = helpers.protocols, - http = require('./http'); - -// -// ### function createServerPair (options, callback) -// #### @options {Object} Options to create target and proxy server. -// #### @target {Object} Options for the target server. -// #### @proxy {Object} Options for the proxy server. -// #### @callback {function} Continuation to respond to when complete. -// -// Creates http target and proxy servers -// -exports.createServerPair = function (options, callback) { - async.series([ - // - // 1. Create the target server - // - function createTarget(next) { - exports.createServer(options.target, next); - }, - // - // 2. Create the proxy server - // - function createTarget(next) { - http.createProxyServer(options.proxy, next); - } - ], callback); -}; - -// -// ### function createServer (options, callback) -// #### @options {Object} Options for creating the socket.io or ws server. -// #### @raw {boolean} Enables ws.Websocket server. -// -// Creates a socket.io or ws server using the specified `options`. -// -exports.createServer = function (options, callback) { - return options.raw - ? exports.createWsServer(options, callback) - : exports.createSocketIoServer(options, callback); -}; - -// -// ### function createSocketIoServer (options, callback) -// #### @options {Object} Options for creating the socket.io server -// #### @port {number} Port to listen on -// #### @input {string} Input to expect from the only socket -// #### @output {string} Output to send the only socket -// -// Creates a socket.io server on the specified `options.port` which -// will expect `options.input` and then send `options.output`. -// -exports.createSocketIoServer = function (options, callback) { - var server = protocols.target === 'https' - ? io.listen(options.port, helpers.https, callback) - : io.listen(options.port, callback); - - server.sockets.on('connection', function (socket) { - socket.on('incoming', function (data) { - assert.equal(data, options.input); - socket.emit('outgoing', options.output); - }); - }); -}; - -// -// ### function createWsServer (options, callback) -// #### @options {Object} Options for creating the ws.Server instance -// #### @port {number} Port to listen on -// #### @input {string} Input to expect from the only socket -// #### @output {string} Output to send the only socket -// -// Creates a ws.Server instance on the specified `options.port` which -// will expect `options.input` and then send `options.output`. -// -exports.createWsServer = function (options, callback) { - var server, - wss; - - if (protocols.target === 'https') { - server = https.createServer(helpers.https, function (req, res) { - req.writeHead(200); - req.end(); - }).listen(options.port, callback); - - wss = new ws.Server({ server: server }); - } - else { - wss = new ws.Server({ port: options.port }, callback); - } - - wss.on('connection', function (socket) { - socket.on('message', function (data) { - assert.equal(data, options.input); - socket.send(options.output); - }); - }); -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/http/http-test.js b/node_modules/karma/node_modules/http-proxy/test/http/http-test.js deleted file mode 100644 index 81f8726a..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/http/http-test.js +++ /dev/null @@ -1,102 +0,0 @@ -/* - node-http-proxy-test.js: http proxy for node.js - - Copyright (c) 2010 Charlie Robbins, Marak Squires and Fedor Indutny - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - The above copyright notice and this permission notice shall be - included in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE - LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION - OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION - WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -*/ - -var assert = require('assert'), - fs = require('fs'), - path = require('path'), - async = require('async'), - request = require('request'), - vows = require('vows'), - macros = require('../macros'), - helpers = require('../helpers'); - -var routeFile = path.join(__dirname, 'config.json'); - -vows.describe(helpers.describe()).addBatch({ - "With a valid target server": { - "and no latency": { - "and no headers": macros.http.assertProxied(), - "and headers": macros.http.assertProxied({ - request: { headers: { host: 'unknown.com' } } - }), - "and request close connection header": macros.http.assertProxied({ - request: { headers: { connection: "close" } }, - outputHeaders: { connection: "close" } - }), - "and request keep alive connection header": macros.http.assertProxied({ - request: { headers: { connection: "keep-alive" } }, - outputHeaders: { connection: "keep-alive" } - }), - "and response close connection header": macros.http.assertProxied({ - request: { headers: { connection: "" } }, // Must explicitly set to "" because otherwise node will automatically add a "connection: keep-alive" header - targetHeaders: { connection: "close" }, - outputHeaders: { connection: "close" } - }), - "and response keep-alive connection header": macros.http.assertProxied({ - request: { headers: { connection: "" } }, // Must explicitly set to "" because otherwise node will automatically add a "connection: keep-alive" header - targetHeaders: { connection: "keep-alive" }, - outputHeaders: { connection: "keep-alive" } - }), - "and response keep-alive connection header from http 1.0 client": macros.http.assertRawHttpProxied({ - rawRequest: "GET / HTTP/1.0\r\n\r\n", - targetHeaders: { connection: "keep-alive" }, - match: /connection: close/i - }), - "and request keep alive from http 1.0 client": macros.http.assertRawHttpProxied({ - rawRequest: "GET / HTTP/1.0\r\nConnection: Keep-Alive\r\n\r\n", - targetHeaders: { connection: "keep-alive" }, - match: /connection: keep-alive/i - }), - "and no connection header": macros.http.assertProxied({ - request: { headers: { connection: "" } }, // Must explicitly set to "" because otherwise node will automatically add a "connection: keep-alive" header - outputHeaders: { connection: "keep-alive" } - }), - "and forwarding enabled": macros.http.assertForwardProxied() - }, - "and latency": { - "and no headers": macros.http.assertProxied({ - latency: 2000 - }), - "and response headers": macros.http.assertProxied({ - targetHeaders: { "x-testheader": "target" }, - proxyHeaders: { "X-TestHeader": "proxy" }, - outputHeaders: { "x-testheader": "target" }, - latency: 1000 - }) - }, - "and timeout set": macros.http.assertProxied({ - shouldFail: true, - timeout: 2000, - requestLatency: 4000 - }) - }, - "With a no valid target server": { - "and no latency": macros.http.assertInvalidProxy(), - "and latency": macros.http.assertInvalidProxy({ - latency: 2000 - }) - } -}).export(module); diff --git a/node_modules/karma/node_modules/http-proxy/test/http/routing-table-test.js b/node_modules/karma/node_modules/http-proxy/test/http/routing-table-test.js deleted file mode 100644 index f3dcf31e..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/http/routing-table-test.js +++ /dev/null @@ -1,107 +0,0 @@ -/* - * routing-table-test.js: Tests for the proxying using the ProxyTable object. - * - * (C) 2010, Charlie Robbins - * - */ - -var assert = require('assert'), - fs = require('fs'), - path = require('path'), - async = require('async'), - request = require('request'), - vows = require('vows'), - macros = require('../macros'), - helpers = require('../helpers'); - -var routeFile = path.join(__dirname, 'config.json'); - -vows.describe(helpers.describe('routing-table')).addBatch({ - "With a routing table": { - "with latency": macros.http.assertProxiedToRoutes({ - latency: 2000, - routes: { - "icanhaz.com": "127.0.0.1:{PORT}", - "latency.com": "127.0.0.1:{PORT}" - } - }), - "addHost() / removeHost()": macros.http.assertDynamicProxy({ - hostnameOnly: true, - routes: { - "static.com": "127.0.0.1:{PORT}", - "removed.com": "127.0.0.1:{PORT}" - } - }, { - add: [{ host: 'dynamic1.com', target: '127.0.0.1:' }], - drop: ['removed.com'] - }), - "using RegExp": macros.http.assertProxiedToRoutes({ - routes: { - "foo.com": "127.0.0.1:{PORT}", - "bar.com": "127.0.0.1:{PORT}", - "baz.com/taco": "127.0.0.1:{PORT}", - "pizza.com/taco/muffins": "127.0.0.1:{PORT}", - "blah.com/me": "127.0.0.1:{PORT}/remapped", - "bleh.com/remap/this": "127.0.0.1:{PORT}/remap/remapped", - "test.com/double/tap": "127.0.0.1:{PORT}/remap" - } - }), - "using hostnameOnly": macros.http.assertProxiedToRoutes({ - hostnameOnly: true, - routes: { - "foo.com": "127.0.0.1:{PORT}", - "bar.com": "127.0.0.1:{PORT}" - } - }), - "using pathnameOnly": macros.http.assertProxiedToRoutes({ - pathnameOnly: true, - routes: { - "/foo": "127.0.0.1:{PORT}", - "/bar": "127.0.0.1:{PORT}", - "/pizza": "127.0.0.1:{PORT}" - } - }), - "using a routing file": macros.http.assertProxiedToRoutes({ - filename: routeFile, - routes: { - "foo.com": "127.0.0.1:{PORT}", - "bar.com": "127.0.0.1:{PORT}" - } - }, { - "after the file has been modified": { - topic: function () { - var config = JSON.parse(fs.readFileSync(routeFile, 'utf8')), - protocol = helpers.protocols.proxy, - port = helpers.nextPort, - that = this; - - config.router['dynamic.com'] = "127.0.0.1:" + port; - fs.writeFileSync(routeFile, JSON.stringify(config)); - - async.parallel([ - function waitForRoutes(next) { - that.proxyServer.on('routes', next); - }, - async.apply( - helpers.http.createServer, - { - port: port, - output: 'hello from dynamic.com' - } - ) - ], function () { - request({ - uri: protocol + '://127.0.0.1:' + that.port, - headers: { - host: 'dynamic.com' - } - }, that.callback); - }); - }, - "should receive 'hello from dynamic.com'": function (err, res, body) { - assert.equal(body, 'hello from dynamic.com'); - } - } - }) - } -}).export(module); diff --git a/node_modules/karma/node_modules/http-proxy/test/macros/examples.js b/node_modules/karma/node_modules/http-proxy/test/macros/examples.js deleted file mode 100644 index 9d4202e6..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/macros/examples.js +++ /dev/null @@ -1,101 +0,0 @@ -/* - * examples.js: Macros for testing code in examples/ - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var assert = require('assert'), - fs = require('fs'), - path = require('path'), - spawn = require('child_process').spawn, - async = require('async'); - -var rootDir = path.join(__dirname, '..', '..'), - examplesDir = path.join(rootDir, 'examples'); - -// -// ### function shouldHaveDeps () -// -// Ensures that all `npm` dependencies are installed in `/examples`. -// -exports.shouldHaveDeps = function () { - return { - "Before testing examples": { - topic: function () { - async.waterfall([ - // - // 1. Read files in examples dir - // - async.apply(fs.readdir, examplesDir), - // - // 2. If node_modules exists, continue. Otherwise - // exec `npm` to install them - // - function checkNodeModules(files, next) { - if (files.indexOf('node_modules') !== -1) { - return next(); - } - - var child = spawn('npm', ['install', '-f'], { - cwd: examplesDir - }); - - child.on('exit', function (code) { - return code - ? next(new Error('npm install exited with non-zero exit code')) - : next(); - }); - }, - // - // 3. Read files in examples dir again to ensure the install - // worked as expected. - // - async.apply(fs.readdir, examplesDir), - ], this.callback); - }, - "examples/node_modules should exist": function (err, files) { - assert.notEqual(files.indexOf('node_modules'), -1); - } - } - } -}; - -// -// ### function shouldRequire (file) -// #### @file {string} File to attempt to require -// -// Returns a test which attempts to require `file`. -// -exports.shouldRequire = function (file) { - return { - "should have no errors": function () { - try { assert.isObject(require(file)) } - catch (ex) { assert.isNull(ex) } - } - }; -}; - -// -// ### function shouldHaveNoErrors () -// -// Returns a vows context that attempts to require -// every relevant example file in `examples`. -// -exports.shouldHaveNoErrors = function () { - var context = {}; - - ['balancer', 'http', 'middleware', 'websocket'].forEach(function (dir) { - var name = 'examples/' + dir, - files = fs.readdirSync(path.join(rootDir, 'examples', dir)); - - files.forEach(function (file) { - context[name + '/' + file] = exports.shouldRequire(path.join( - examplesDir, dir, file - )); - }); - }); - - return context; -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/macros/http.js b/node_modules/karma/node_modules/http-proxy/test/macros/http.js deleted file mode 100644 index d3d83426..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/macros/http.js +++ /dev/null @@ -1,531 +0,0 @@ -/* - * http.js: Macros for proxying HTTP requests - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var assert = require('assert'), - fs = require('fs'), - async = require('async'), - net = require('net'), - request = require('request'), - helpers = require('../helpers/index'); - -// -// ### function assertRequest (options) -// #### @options {Object} Options for this request assertion. -// #### @request {Object} Options to use for `request`. -// #### @assert {Object} Test assertions against the response. -// -// Makes a request using `options.request` and then asserts the response -// and body against anything in `options.assert`. -// -exports.assertRequest = function (options) { - return { - topic: function () { - // - // Now make the HTTP request and assert. - // - options.request.rejectUnauthorized = false; - request(options.request, this.callback); - }, - "should succeed": function (err, res, body) { - assert.isNull(err); - if (options.assert.headers) { - Object.keys(options.assert.headers).forEach(function(header){ - assert.equal(res.headers[header], options.assert.headers[header]); - }); - } - - if (options.assert.body) { - assert.equal(body, options.assert.body); - } - - if (options.assert.statusCode) { - assert.equal(res.statusCode, options.assert.statusCode); - } - } - }; -}; - -// -// ### function assertFailedRequest (options) -// #### @options {Object} Options for this failed request assertion. -// #### @request {Object} Options to use for `request`. -// #### @assert {Object} Test assertions against the response. -// -// Makes a request using `options.request` and then asserts the response -// and body against anything in `options.assert`. -// -exports.assertFailedRequest = function (options) { - return { - topic: function () { - // - // Now make the HTTP request and assert. - // - options.request.rejectUnauthorized = false; - request(options.request, this.callback); - }, - "should not succeed": function (err, res, body) { - assert.notStrictEqual(err,null); - } - }; -}; - -// -// ### function assertProxied (options) -// #### @options {Object} Options for this test -// #### @latency {number} Latency in milliseconds for the proxy server. -// #### @ports {Object} Ports for the request (target, proxy). -// #### @output {string} Output to assert from. -// #### @forward {Object} Options for forward proxying. -// -// Creates a complete end-to-end test for requesting against an -// http proxy. -// -exports.assertProxied = function (options) { - options = options || {}; - - var ports = options.ports || helpers.nextPortPair, - output = options.output || 'hello world from ' + ports.target, - outputHeaders = options.outputHeaders, - targetHeaders = options.targetHeaders, - proxyHeaders = options.proxyHeaders, - protocol = helpers.protocols.proxy, - req = options.request || {}, - timeout = options.timeout || null, - assertFn = options.shouldFail - ? exports.assertFailedRequest - : exports.assertRequest; - - req.uri = req.uri || protocol + '://127.0.0.1:' + ports.proxy; - - return { - topic: function () { - // - // Create a target server and a proxy server - // using the `options` supplied. - // - helpers.http.createServerPair({ - target: { - output: output, - outputHeaders: targetHeaders, - port: ports.target, - headers: req.headers, - latency: options.requestLatency - }, - proxy: { - latency: options.latency, - port: ports.proxy, - outputHeaders: proxyHeaders, - proxy: { - forward: options.forward, - target: { - https: helpers.protocols.target === 'https', - host: '127.0.0.1', - port: ports.target - }, - timeout: timeout - } - } - }, this.callback); - }, - "the proxy request": assertFn({ - request: req, - assert: { - headers: outputHeaders, - body: output - } - }) - }; -}; - -// -// ### function assertRawHttpProxied (options) -// #### @options {Object} Options for this test -// #### @rawRequest {string} Raw HTTP request to perform. -// #### @match {RegExp} Output to match in the response. -// #### @latency {number} Latency in milliseconds for the proxy server. -// #### @ports {Object} Ports for the request (target, proxy). -// #### @output {string} Output to assert from. -// #### @forward {Object} Options for forward proxying. -// -// Creates a complete end-to-end test for requesting against an -// http proxy. -// -exports.assertRawHttpProxied = function (options) { - // Don't test raw requests over HTTPS since options.rawRequest won't be - // encrypted. - if(helpers.protocols.proxy == 'https') { - return true; - } - - options = options || {}; - - var ports = options.ports || helpers.nextPortPair, - output = options.output || 'hello world from ' + ports.target, - outputHeaders = options.outputHeaders, - targetHeaders = options.targetHeaders, - proxyHeaders = options.proxyHeaders, - protocol = helpers.protocols.proxy, - timeout = options.timeout || null, - assertFn = options.shouldFail - ? exports.assertFailedRequest - : exports.assertRequest; - - return { - topic: function () { - var topicCallback = this.callback; - - // - // Create a target server and a proxy server - // using the `options` supplied. - // - helpers.http.createServerPair({ - target: { - output: output, - outputHeaders: targetHeaders, - port: ports.target, - latency: options.requestLatency - }, - proxy: { - latency: options.latency, - port: ports.proxy, - outputHeaders: proxyHeaders, - proxy: { - forward: options.forward, - target: { - https: helpers.protocols.target === 'https', - host: '127.0.0.1', - port: ports.target - }, - timeout: timeout - } - } - }, function() { - var response = ''; - var client = net.connect(ports.proxy, '127.0.0.1', function() { - client.write(options.rawRequest); - }); - - client.on('data', function(data) { - response += data.toString(); - }); - - client.on('end', function() { - topicCallback(null, options.match, response); - }); - }); - }, - "should succeed": function(err, match, response) { - assert.match(response, match); - } - }; -}; - -// -// ### function assertInvalidProxy (options) -// #### @options {Object} Options for this test -// #### @latency {number} Latency in milliseconds for the proxy server -// #### @ports {Object} Ports for the request (target, proxy) -// -// Creates a complete end-to-end test for requesting against an -// http proxy with no target server. -// -exports.assertInvalidProxy = function (options) { - options = options || {}; - - var ports = options.ports || helpers.nextPortPair, - req = options.request || {}, - protocol = helpers.protocols.proxy; - - - req.uri = req.uri || protocol + '://127.0.0.1:' + ports.proxy; - - return { - topic: function () { - // - // Only create the proxy server, simulating a reverse-proxy - // to an invalid location. - // - helpers.http.createProxyServer({ - latency: options.latency, - port: ports.proxy, - proxy: { - target: { - host: '127.0.0.1', - port: ports.target - } - } - }, this.callback); - }, - "the proxy request": exports.assertRequest({ - request: req, - assert: { - statusCode: 500 - } - }) - }; -}; - -// -// ### function assertForwardProxied (options) -// #### @options {Object} Options for this test. -// -// Creates a complete end-to-end test for requesting against an -// http proxy with both a valid and invalid forward target. -// -exports.assertForwardProxied = function (options) { - var forwardPort = helpers.nextPort; - - return { - topic: function () { - helpers.http.createServer({ - output: 'hello from forward', - port: forwardPort - }, this.callback); - }, - "and a valid forward target": exports.assertProxied({ - forward: { - port: forwardPort, - host: '127.0.0.1' - } - }), - "and an invalid forward target": exports.assertProxied({ - forward: { - port: 9898, - host: '127.0.0.1' - } - }) - }; -}; - -// -// ### function assertProxiedtoRoutes (options, nested) -// #### @options {Object} Options for this ProxyTable-based test -// #### @routes {Object|string} Routes to use for the proxy. -// #### @hostnameOnly {boolean} Enables hostnameOnly routing. -// #### @nested {Object} Nested vows to add to the returned context. -// -// Creates a complete end-to-end test for requesting against an -// http proxy using `options.routes`: -// -// 1. Creates target servers for all routes in `options.routes.` -// 2. Creates a proxy server. -// 3. Ensure requests to the proxy server for all route targets -// returns the unique expected output. -// -exports.assertProxiedToRoutes = function (options, nested) { - // - // Assign dynamic ports to the routes to use. - // - options.routes = helpers.http.assignPortsToRoutes(options.routes); - - // - // Parse locations from routes for making assertion requests. - // - var locations = helpers.http.parseRoutes(options), - port = options.pport || helpers.nextPort, - protocol = helpers.protocols.proxy, - context, - proxy; - - if (options.filename) { - // - // If we've been passed a filename write the routes to it - // and setup the proxy options to use that file. - // - fs.writeFileSync(options.filename, JSON.stringify({ router: options.routes })); - proxy = { router: options.filename }; - } - else { - // - // Otherwise just use the routes themselves. - // - proxy = { - hostnameOnly: options.hostnameOnly, - pathnameOnly: options.pathnameOnly, - router: options.routes - }; - } - - // - // Set the https options if necessary - // - if (helpers.protocols.target === 'https') { - proxy.target = { https: true }; - } - - // - // Create the test context which creates all target - // servers for all routes and a proxy server. - // - context = { - topic: function () { - var that = this; - - async.waterfall([ - // - // 1. Create all the target servers - // - async.apply( - async.forEach, - locations, - function createRouteTarget(location, next) { - helpers.http.createServer({ - port: location.target.port, - output: 'hello from ' + location.source.href - }, next); - } - ), - // - // 2. Create the proxy server - // - async.apply( - helpers.http.createProxyServer, - { - port: port, - latency: options.latency, - routing: true, - proxy: proxy - } - ) - ], function (_, server) { - // - // 3. Set the proxy server for later use - // - that.proxyServer = server; - that.callback(); - }); - - // - // 4. Assign the port to the context for later use - // - this.port = port; - }, - // - // Add an extra assertion to a route which - // should respond with 404 - // - "a request to unknown.com": exports.assertRequest({ - assert: { statusCode: 404 }, - request: { - uri: protocol + '://127.0.0.1:' + port, - headers: { - host: 'unknown.com' - } - } - }) - }; - - // - // Add test assertions for each of the route locations. - // - locations.forEach(function (location) { - context[location.source.href] = exports.assertRequest({ - request: { - uri: protocol + '://127.0.0.1:' + port + location.source.path, - headers: { - host: location.source.hostname - } - }, - assert: { - body: 'hello from ' + location.source.href - } - }); - }); - - // - // If there are any nested vows to add to the context - // add them before returning the full context. - // - if (nested) { - Object.keys(nested).forEach(function (key) { - context[key] = nested[key]; - }); - } - - return context; -}; - -// -// ### function assertDynamicProxy (static, dynamic) -// Asserts that after the `static` routes have been tested -// and the `dynamic` routes are added / removed the appropriate -// proxy responses are received. -// -exports.assertDynamicProxy = function (static, dynamic) { - var proxyPort = helpers.nextPort, - protocol = helpers.protocols.proxy, - context; - - if (dynamic.add) { - dynamic.add = dynamic.add.map(function (dyn) { - dyn.port = helpers.nextPort; - dyn.target = dyn.target + dyn.port; - return dyn; - }); - } - - context = { - topic: function () { - var that = this; - - setTimeout(function () { - if (dynamic.drop) { - dynamic.drop.forEach(function (dropHost) { - that.proxyServer.proxy.removeHost(dropHost); - }); - } - - if (dynamic.add) { - async.forEachSeries(dynamic.add, function addOne (dyn, next) { - that.proxyServer.proxy.addHost(dyn.host, dyn.target); - helpers.http.createServer({ - port: dyn.port, - output: 'hello ' + dyn.host - }, next); - }, that.callback); - } - else { - that.callback(); - } - }, 200); - } - }; - - if (dynamic.drop) { - dynamic.drop.forEach(function (dropHost) { - context[dropHost] = exports.assertRequest({ - assert: { statusCode: 404 }, - request: { - uri: protocol + '://127.0.0.1:' + proxyPort, - headers: { - host: dropHost - } - } - }); - }); - } - - if (dynamic.add) { - dynamic.add.forEach(function (dyn) { - context[dyn.host] = exports.assertRequest({ - assert: { body: 'hello ' + dyn.host }, - request: { - uri: protocol + '://127.0.0.1:' + proxyPort, - headers: { - host: dyn.host - } - } - }); - }); - } - - static.pport = proxyPort; - return exports.assertProxiedToRoutes(static, { - "once the server has started": context - }); -}; diff --git a/node_modules/karma/node_modules/http-proxy/test/macros/index.js b/node_modules/karma/node_modules/http-proxy/test/macros/index.js deleted file mode 100644 index c01f962b..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/macros/index.js +++ /dev/null @@ -1,11 +0,0 @@ -/* - * index.js: Top level include for node-http-proxy macros - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -exports.examples = require('./examples'); -exports.http = require('./http'); -exports.ws = require('./ws'); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/macros/ws.js b/node_modules/karma/node_modules/http-proxy/test/macros/ws.js deleted file mode 100644 index 508725a4..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/macros/ws.js +++ /dev/null @@ -1,232 +0,0 @@ -/* - * ws.js: Macros for proxying Websocket requests - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var assert = require('assert'), - fs = require('fs'), - async = require('async'), - io = require('socket.io-client'), - WebSocket = require('ws'), - helpers = require('../helpers/index'); - -// -// ### function assertSendRecieve (options) -// #### @options {Object} Options for creating this assertion. -// #### @raw {boolean} Enables raw `ws.WebSocket`. -// #### @uri {string} URI of the proxy server. -// #### @input {string} Input to assert sent to the target ws server. -// #### @output {string} Output to assert from the taget ws server. -// -// Creates a `socket.io` or raw `WebSocket` connection and asserts that -// `options.input` is sent to and `options.output` is received from the -// connection. -// -exports.assertSendReceive = function (options) { - if (!options.raw) { - return { - topic: function () { - var socket = io.connect(options.uri); - socket.on('outgoing', this.callback.bind(this, null)); - socket.emit('incoming', options.input); - }, - "should send input and receive output": function (_, data) { - assert.equal(data, options.output); - } - }; - } - - return { - topic: function () { - var socket = new WebSocket(options.uri); - socket.on('message', this.callback.bind(this, null)); - socket.on('open', function () { - socket.send(options.input); - }); - }, - "should send input and recieve output": function (_, data, flags) { - assert.equal(data, options.output); - } - }; -}; - -// -// ### function assertProxied (options) -// #### @options {Object} Options for this test -// #### @latency {number} Latency in milliseconds for the proxy server. -// #### @ports {Object} Ports for the request (target, proxy). -// #### @input {string} Input to assert sent to the target ws server. -// #### @output {string} Output to assert from the taget ws server. -// #### @raw {boolean} Enables raw `ws.Server` usage. -// -// Creates a complete end-to-end test for requesting against an -// http proxy. -// -exports.assertProxied = function (options) { - options = options || {}; - - var ports = options.ports || helpers.nextPortPair, - input = options.input || 'hello world to ' + ports.target, - output = options.output || 'hello world from ' + ports.target, - protocol = helpers.protocols.proxy; - - if (options.raw) { - protocol = helpers.protocols.proxy === 'https' - ? 'wss' - : 'ws'; - } - - return { - topic: function () { - helpers.ws.createServerPair({ - target: { - input: input, - output: output, - port: ports.target, - raw: options.raw - }, - proxy: { - latency: options.latency, - port: ports.proxy, - proxy: { - target: { - https: helpers.protocols.target === 'https', - host: '127.0.0.1', - port: ports.target - } - } - } - }, this.callback); - }, - "the proxy Websocket connection": exports.assertSendReceive({ - uri: protocol + '://127.0.0.1:' + ports.proxy, - input: input, - output: output, - raw: options.raw - }) - }; -}; - -// -// ### function assertProxiedtoRoutes (options, nested) -// #### @options {Object} Options for this ProxyTable-based test -// #### @raw {boolean} Enables ws.Server usage. -// #### @routes {Object|string} Routes to use for the proxy. -// #### @hostnameOnly {boolean} Enables hostnameOnly routing. -// #### @nested {Object} Nested vows to add to the returned context. -// -// Creates a complete end-to-end test for requesting against an -// http proxy using `options.routes`: -// -// 1. Creates target servers for all routes in `options.routes.` -// 2. Creates a proxy server. -// 3. Ensure Websocket connections to the proxy server for all route targets -// can send input and recieve output. -// -exports.assertProxiedToRoutes = function (options, nested) { - // - // Assign dynamic ports to the routes to use. - // - options.routes = helpers.http.assignPortsToRoutes(options.routes); - - // - // Parse locations from routes for making assertion requests. - // - var locations = helpers.http.parseRoutes(options), - protocol = helpers.protocols.proxy, - port = helpers.nextPort, - context, - proxy; - - if (options.raw) { - protocol = helpers.protocols.proxy === 'https' - ? 'wss' - : 'ws'; - } - - if (options.filename) { - // - // If we've been passed a filename write the routes to it - // and setup the proxy options to use that file. - // - fs.writeFileSync(options.filename, JSON.stringify({ router: options.routes })); - proxy = { router: options.filename }; - } - else { - // - // Otherwise just use the routes themselves. - // - proxy = { - hostnameOnly: options.hostnameOnly, - router: options.routes - }; - } - - // - // Create the test context which creates all target - // servers for all routes and a proxy server. - // - context = { - topic: function () { - var that = this; - - async.waterfall([ - // - // 1. Create all the target servers - // - async.apply( - async.forEach, - locations, - function createRouteTarget(location, next) { - helpers.ws.createServer({ - raw: options.raw, - port: location.target.port, - output: 'hello from ' + location.source.href, - input: 'hello to ' + location.source.href - }, next); - } - ), - // - // 2. Create the proxy server - // - async.apply( - helpers.http.createProxyServer, - { - port: port, - latency: options.latency, - routing: true, - proxy: proxy - } - ) - ], function (_, server) { - // - // 3. Set the proxy server for later use - // - that.proxyServer = server; - that.callback(); - }); - - // - // 4. Assign the port to the context for later use - // - this.port = port; - } - }; - - // - // Add test assertions for each of the route locations. - // - locations.forEach(function (location) { - context[location.source.href] = exports.assertSendRecieve({ - uri: protocol + '://127.0.0.1:' + port + location.source.path, - output: 'hello from ' + location.source.href, - input: 'hello to ' + location.source.href, - raw: options.raw - }); - }); - - return context; -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/ws/routing-table-test.js b/node_modules/karma/node_modules/http-proxy/test/ws/routing-table-test.js deleted file mode 100644 index e04d6475..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/ws/routing-table-test.js +++ /dev/null @@ -1,25 +0,0 @@ -/* - * routing-tabletest.js: Test for proxying `socket.io` and raw `WebSocket` requests using a ProxyTable. - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var vows = require('vows'), - macros = require('../macros'), - helpers = require('../helpers/index'); - -vows.describe(helpers.describe('routing-proxy', 'ws')).addBatch({ - "With a valid target server": { - "and no latency": { - "using ws": macros.ws.assertProxied(), - "using socket.io": macros.ws.assertProxied({ - raw: true - }), - }, - // "and latency": macros.websocket.assertProxied({ - // latency: 2000 - // }) - } -}).export(module); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/ws/socket.io-test.js b/node_modules/karma/node_modules/http-proxy/test/ws/socket.io-test.js deleted file mode 100644 index d833109e..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/ws/socket.io-test.js +++ /dev/null @@ -1,20 +0,0 @@ -/* - * socket.io-test.js: Test for proxying `socket.io` requests. - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var vows = require('vows'), - macros = require('../macros'), - helpers = require('../helpers/index'); - -vows.describe(helpers.describe('socket.io', 'ws')).addBatch({ - "With a valid target server": { - "and no latency": macros.ws.assertProxied(), - // "and latency": macros.ws.assertProxied({ - // latency: 2000 - // }) - } -}).export(module); \ No newline at end of file diff --git a/node_modules/karma/node_modules/http-proxy/test/ws/ws-test.js b/node_modules/karma/node_modules/http-proxy/test/ws/ws-test.js deleted file mode 100644 index f3549152..00000000 --- a/node_modules/karma/node_modules/http-proxy/test/ws/ws-test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* - * ws-test.js: Tests for proxying raw Websocket requests. - * - * (C) 2010 Nodejitsu Inc. - * MIT LICENCE - * - */ - -var vows = require('vows'), - macros = require('../macros'), - helpers = require('../helpers/index'); - -vows.describe(helpers.describe('websocket', 'ws')).addBatch({ - "With a valid target server": { - "and no latency": macros.ws.assertProxied({ - raw: true - }), - // "and latency": macros.ws.assertProxied({ - // raw: true, - // latency: 2000 - // }) - } -}).export(module); \ No newline at end of file diff --git a/node_modules/karma/node_modules/lodash/README.md b/node_modules/karma/node_modules/lodash/README.md deleted file mode 100644 index 02945e87..00000000 --- a/node_modules/karma/node_modules/lodash/README.md +++ /dev/null @@ -1,178 +0,0 @@ -# Lo-Dash v1.1.1 - -A utility library delivering consistency, [customization](http://lodash.com/custom-builds), [performance](http://lodash.com/benchmarks), & [extras](http://lodash.com/#features). - -## Download - -* Lo-Dash builds (for modern environments):
    -[Development](https://raw.github.com/lodash/lodash/1.1.1/dist/lodash.js) and -[Production](https://raw.github.com/lodash/lodash/1.1.1/dist/lodash.min.js) - -* Lo-Dash compatibility builds (for legacy and modern environments):
    -[Development](https://raw.github.com/lodash/lodash/1.1.1/dist/lodash.compat.js) and -[Production](https://raw.github.com/lodash/lodash/1.1.1/dist/lodash.compat.min.js) - -* Underscore compatibility builds:
    -[Development](https://raw.github.com/lodash/lodash/1.1.1/dist/lodash.underscore.js) and -[Production](https://raw.github.com/lodash/lodash/1.1.1/dist/lodash.underscore.min.js) - -* CDN copies of ≤ v1.1.1’s builds are available on [cdnjs](http://cdnjs.com/) thanks to [CloudFlare](http://www.cloudflare.com/):
    -[Lo-Dash dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.1.1/lodash.js), -[Lo-Dash prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.1.1/lodash.min.js),
    -[Lo-Dash compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.1.1/lodash.compat.js), -[Lo-Dash compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.1.1/lodash.compat.min.js),
    -[Underscore compat-dev](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.1.1/lodash.underscore.js), and -[Underscore compat-prod](http://cdnjs.cloudflare.com/ajax/libs/lodash.js/1.1.1/lodash.underscore.min.js) - -* For optimal file size, [create a custom build](http://lodash.com/custom-builds) with only the features you need - -## Dive in - -We’ve got [API docs](http://lodash.com/docs), [benchmarks](http://lodash.com/benchmarks), and [unit tests](http://lodash.com/tests). - -For a list of upcoming features, check out our [roadmap](https://github.com/lodash/lodash/wiki/Roadmap). - -## Resources - -For more information check out these articles, screencasts, and other videos over Lo-Dash: - - * Posts - - [Say “Hello” to Lo-Dash](http://kitcambridge.be/blog/say-hello-to-lo-dash/) - - * Videos - - [Introducing Lo-Dash](https://vimeo.com/44154599) - - [Lo-Dash optimizations and custom builds](https://vimeo.com/44154601) - - [Lo-Dash’s origin and why it’s a better utility belt](https://vimeo.com/44154600) - - [Unit testing in Lo-Dash](https://vimeo.com/45865290) - - [Lo-Dash’s approach to native method use](https://vimeo.com/48576012) - - [CascadiaJS: Lo-Dash for a better utility belt](http://www.youtube.com/watch?v=dpPy4f_SeEk) - -## Features - - * AMD loader support ([RequireJS](http://requirejs.org/), [curl.js](https://github.com/cujojs/curl), etc.) - * [_(…)](http://lodash.com/docs#_) supports intuitive chaining - * [_.at](http://lodash.com/docs#at) for cherry-picking collection values - * [_.bindKey](http://lodash.com/docs#bindKey) for binding [*“lazy”* defined](http://michaux.ca/articles/lazy-function-definition-pattern) methods - * [_.cloneDeep](http://lodash.com/docs#cloneDeep) for deep cloning arrays and objects - * [_.contains](http://lodash.com/docs#contains) accepts a `fromIndex` argument - * [_.createCallback](http://lodash.com/docs#createCallback) to customize how callback arguments are handled and support callback shorthands in mixins - * [_.findIndex](http://lodash.com/docs#findIndex) and [_.findKey](http://lodash.com/docs#findKey) for finding indexes and keys of collections - * [_.forEach](http://lodash.com/docs#forEach) is chainable and supports exiting iteration early - * [_.forIn](http://lodash.com/docs#forIn) for iterating over an object’s own and inherited properties - * [_.forOwn](http://lodash.com/docs#forOwn) for iterating over an object’s own properties - * [_.isPlainObject](http://lodash.com/docs#isPlainObject) checks if values are created by the `Object` constructor - * [_.merge](http://lodash.com/docs#merge) for a deep [_.extend](http://lodash.com/docs#extend) - * [_.parseInt](http://lodash.com/docs#parseInt) for consistent cross-environment behavior - * [_.partial](http://lodash.com/docs#partial) and [_.partialRight](http://lodash.com/docs#partialRight) for partial application without `this` binding - * [_.runInContext](http://lodash.com/docs#runInContext) for easier mocking and extended environment support - * [_.support](http://lodash.com/docs#support) to flag environment features - * [_.template](http://lodash.com/docs#template) supports [*“imports”* options](http://lodash.com/docs#templateSettings_imports), [ES6 template delimiters](http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6), and [sourceURLs](http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl) - * [_.where](http://lodash.com/docs#where) supports deep object comparisons - * [_.clone](http://lodash.com/docs#clone), [_.omit](http://lodash.com/docs#omit), [_.pick](http://lodash.com/docs#pick), - [and more…](http://lodash.com/docs "_.assign, _.cloneDeep, _.first, _.initial, _.isEqual, _.last, _.merge, _.rest") accept `callback` and `thisArg` arguments - * [_.contains](http://lodash.com/docs#contains), [_.size](http://lodash.com/docs#size), [_.toArray](http://lodash.com/docs#toArray), - [and more…](http://lodash.com/docs "_.at, _.countBy, _.every, _.filter, _.find, _.forEach, _.groupBy, _.invoke, _.map, _.max, _.min, _.pluck, _.reduce, _.reduceRight, _.reject, _.shuffle, _.some, _.sortBy, _.where") accept strings - * [_.filter](http://lodash.com/docs#filter), [_.find](http://lodash.com/docs#find), [_.map](http://lodash.com/docs#map), - [and more…](http://lodash.com/docs "_.countBy, _.every, _.first, _.groupBy, _.initial, _.last, _.max, _.min, _.reject, _.rest, _.some, _.sortBy, _.sortedIndex, _.uniq") support *“_.pluck”* and *“_.where”* `callback` shorthands - -## Support - -Lo-Dash has been tested in at least Chrome 5~25, Firefox 2~19, IE 6-10, Opera 9.25-12, Safari 3-6, Node.js 0.4.8-0.10.1, Narwhal 0.3.2, PhantomJS 1.8.1, RingoJS 0.9, and Rhino 1.7RC5. - -## Installation and usage - -In browsers: - -```html - -``` - -Using [`npm`](http://npmjs.org/): - -```bash -npm install lodash - -npm install -g lodash -npm link lodash -``` - -To avoid potential issues, update `npm` before installing Lo-Dash: - -```bash -npm install npm -g -``` - -In [Node.js](http://nodejs.org/) and [RingoJS ≥ v0.8.0](http://ringojs.org/): - -```js -var _ = require('lodash'); - -// or as a drop-in replacement for Underscore -var _ = require('lodash/dist/lodash.underscore'); -``` - -**Note:** If Lo-Dash is installed globally, run [`npm link lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory before requiring it. - -In [RingoJS ≤ v0.7.0](http://ringojs.org/): - -```js -var _ = require('lodash')._; -``` - -In [Rhino](http://www.mozilla.org/rhino/): - -```js -load('lodash.js'); -``` - -In an AMD loader like [RequireJS](http://requirejs.org/): - -```js -require({ - 'paths': { - 'underscore': 'path/to/lodash' - } -}, -['underscore'], function(_) { - console.log(_.VERSION); -}); -``` - -## Release Notes - -### v1.1.1 - - * Ensured the `underscore` build version of `_.forEach` accepts a `thisArg` argument - * Updated vendor/tar to work with Node v0.10.x - -### v1.1.0 - - * Added `rhino -require` support - * Added `_.createCallback`, `_findIndex`, `_.findKey`, `_.parseInt`, `_.runInContext`, and `_.support` - * Added support for `callback` and `thisArg` arguments to `_.flatten` - * Added CommonJS/Node support to precompiled templates - * Ensured the `exports` object is not a DOM element - * Ensured `_.isPlainObject` returns `false` for objects without a `[[Class]]` of “Object” - * Made `_.cloneDeep`’s `callback` support more closely follow its documentation - * Made the template precompiler create nonexistent directories of `--output` paths - * Made `_.object` an alias of `_.zipObject` - * Optimized method chaining, object iteration, `_.find`, and `_.pluck` (an average of 18% overall better performance) - * Updated `backbone` build Lo-Dash method dependencies - -The full changelog is available [here](https://github.com/lodash/lodash/wiki/Changelog). - -## BestieJS - -Lo-Dash is part of the [BestieJS](https://github.com/bestiejs) *“Best in Class”* module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, and plenty of documentation. - -## Author - -| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton "Follow @jdalton on Twitter") | -|---| -| [John-David Dalton](http://allyoucanleet.com/) | - -## Contributors - -| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](http://twitter.com/blainebublitz "Follow @BlaineBublitz on Twitter") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge "Follow @kitcambridge on Twitter") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias "Follow @mathias on Twitter") | -|---|---|---| -| [Blaine Bublitz](http://iceddev.com/) | [Kit Cambridge](http://kitcambridge.github.io/) | [Mathias Bynens](http://mathiasbynens.be/) | diff --git a/node_modules/karma/node_modules/lodash/dist/lodash.compat.js b/node_modules/karma/node_modules/lodash/dist/lodash.compat.js deleted file mode 100644 index c53a906c..00000000 --- a/node_modules/karma/node_modules/lodash/dist/lodash.compat.js +++ /dev/null @@ -1,5438 +0,0 @@ -/** - * @license - * Lo-Dash 1.1.1 (Custom Build) - * Build: `lodash -o ./dist/lodash.compat.js` - * Copyright 2012-2013 The Dojo Foundation - * Based on Underscore.js 1.4.4 - * Copyright 2009-2013 Jeremy Ashkenas, DocumentCloud Inc. - * Available under MIT license - */ -;(function(window) { - - /** Used as a safe reference for `undefined` in pre ES5 environments */ - var undefined; - - /** Detect free variable `exports` */ - var freeExports = typeof exports == 'object' && exports; - - /** Detect free variable `module` */ - var freeModule = typeof module == 'object' && module && module.exports == freeExports && module; - - /** Detect free variable `global` and use it as `window` */ - var freeGlobal = typeof global == 'object' && global; - if (freeGlobal.global === freeGlobal) { - window = freeGlobal; - } - - /** Used to generate unique IDs */ - var idCounter = 0; - - /** Used internally to indicate various things */ - var indicatorObject = {}; - - /** Used to match empty string literals in compiled template source */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; - - /** Used to match HTML entities */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g; - - /** - * Used to match ES6 template delimiters - * http://people.mozilla.org/~jorendorff/es6-draft.html#sec-7.8.6 - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; - - /** Used to match regexp flags from their coerced string values */ - var reFlags = /\w*$/; - - /** Used to match "interpolate" template delimiters */ - var reInterpolate = /<%=([\s\S]+?)%>/g; - - /** Used to match leading zeros to be removed */ - var reLeadingZeros = /^0+(?=.$)/; - - /** Used to ensure capturing order of template delimiters */ - var reNoMatch = /($^)/; - - /** Used to match HTML characters */ - var reUnescapedHtml = /[&<>"']/g; - - /** Used to match unescaped characters in compiled string literals */ - var reUnescapedString = /['\n\r\t\u2028\u2029\\]/g; - - /** Used to assign default `context` object properties */ - var contextProps = [ - 'Array', 'Boolean', 'Date', 'Function', 'Math', 'Number', 'Object', 'RegExp', - 'String', '_', 'attachEvent', 'clearTimeout', 'isFinite', 'isNaN', 'parseInt', - 'setImmediate', 'setTimeout' - ]; - - /** Used to fix the JScript [[DontEnum]] bug */ - var shadowedProps = [ - 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', - 'toLocaleString', 'toString', 'valueOf' - ]; - - /** Used to make template sourceURLs easier to identify */ - var templateCounter = 0; - - /** `Object#toString` result shortcuts */ - var argsClass = '[object Arguments]', - arrayClass = '[object Array]', - boolClass = '[object Boolean]', - dateClass = '[object Date]', - funcClass = '[object Function]', - numberClass = '[object Number]', - objectClass = '[object Object]', - regexpClass = '[object RegExp]', - stringClass = '[object String]'; - - /** Used to identify object classifications that `_.clone` supports */ - var cloneableClasses = {}; - cloneableClasses[funcClass] = false; - cloneableClasses[argsClass] = cloneableClasses[arrayClass] = - cloneableClasses[boolClass] = cloneableClasses[dateClass] = - cloneableClasses[numberClass] = cloneableClasses[objectClass] = - cloneableClasses[regexpClass] = cloneableClasses[stringClass] = true; - - /** Used to determine if values are of the language type Object */ - var objectTypes = { - 'boolean': false, - 'function': true, - 'object': true, - 'number': false, - 'string': false, - 'undefined': false - }; - - /** Used to escape characters for inclusion in compiled string literals */ - var stringEscapes = { - '\\': '\\', - "'": "'", - '\n': 'n', - '\r': 'r', - '\t': 't', - '\u2028': 'u2028', - '\u2029': 'u2029' - }; - - /*--------------------------------------------------------------------------*/ - - /** - * Create a new `lodash` function using the given `context` object. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Object} [context=window] The context object. - * @returns {Function} Returns the `lodash` function. - */ - function runInContext(context) { - // Avoid issues with some ES3 environments that attempt to use values, named - // after built-in constructors like `Object`, for the creation of literals. - // ES5 clears this up by stating that literals must use built-in constructors. - // See http://es5.github.com/#x11.1.5. - context = context ? _.defaults(window.Object(), context, _.pick(window, contextProps)) : window; - - /** Native constructor references */ - var Array = context.Array, - Boolean = context.Boolean, - Date = context.Date, - Function = context.Function, - Math = context.Math, - Number = context.Number, - Object = context.Object, - RegExp = context.RegExp, - String = context.String, - TypeError = context.TypeError; - - /** Used for `Array` and `Object` method references */ - var arrayRef = Array(), - objectRef = Object(); - - /** Used to restore the original `_` reference in `noConflict` */ - var oldDash = context._; - - /** Used to detect if a method is native */ - var reNative = RegExp('^' + - String(objectRef.valueOf) - .replace(/[.*+?^${}()|[\]\\]/g, '\\$&') - .replace(/valueOf|for [^\]]+/g, '.+?') + '$' - ); - - /** Native method shortcuts */ - var ceil = Math.ceil, - clearTimeout = context.clearTimeout, - concat = arrayRef.concat, - floor = Math.floor, - getPrototypeOf = reNative.test(getPrototypeOf = Object.getPrototypeOf) && getPrototypeOf, - hasOwnProperty = objectRef.hasOwnProperty, - push = arrayRef.push, - setImmediate = context.setImmediate, - setTimeout = context.setTimeout, - toString = objectRef.toString; - - /* Native method shortcuts for methods with the same name as other `lodash` methods */ - var nativeBind = reNative.test(nativeBind = slice.bind) && nativeBind, - nativeIsArray = reNative.test(nativeIsArray = Array.isArray) && nativeIsArray, - nativeIsFinite = context.isFinite, - nativeIsNaN = context.isNaN, - nativeKeys = reNative.test(nativeKeys = Object.keys) && nativeKeys, - nativeMax = Math.max, - nativeMin = Math.min, - nativeParseInt = context.parseInt, - nativeRandom = Math.random; - - /** Detect various environments */ - var isIeOpera = reNative.test(context.attachEvent), - isV8 = nativeBind && !/\n|true/.test(nativeBind + isIeOpera); - - /** Used to lookup a built-in constructor by [[Class]] */ - var ctorByClass = {}; - ctorByClass[arrayClass] = Array; - ctorByClass[boolClass] = Boolean; - ctorByClass[dateClass] = Date; - ctorByClass[objectClass] = Object; - ctorByClass[numberClass] = Number; - ctorByClass[regexpClass] = RegExp; - ctorByClass[stringClass] = String; - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a `lodash` object, that wraps the given `value`, to enable method - * chaining. - * - * In addition to Lo-Dash methods, wrappers also have the following `Array` methods: - * `concat`, `join`, `pop`, `push`, `reverse`, `shift`, `slice`, `sort`, `splice`, - * and `unshift` - * - * Chaining is supported in custom builds as long as the `value` method is - * implicitly or explicitly included in the build. - * - * The chainable wrapper functions are: - * `after`, `assign`, `bind`, `bindAll`, `bindKey`, `chain`, `compact`, - * `compose`, `concat`, `countBy`, `createCallback`, `debounce`, `defaults`, - * `defer`, `delay`, `difference`, `filter`, `flatten`, `forEach`, `forIn`, - * `forOwn`, `functions`, `groupBy`, `initial`, `intersection`, `invert`, - * `invoke`, `keys`, `map`, `max`, `memoize`, `merge`, `min`, `object`, `omit`, - * `once`, `pairs`, `partial`, `partialRight`, `pick`, `pluck`, `push`, `range`, - * `reject`, `rest`, `reverse`, `shuffle`, `slice`, `sort`, `sortBy`, `splice`, - * `tap`, `throttle`, `times`, `toArray`, `union`, `uniq`, `unshift`, `values`, - * `where`, `without`, `wrap`, and `zip` - * - * The non-chainable wrapper functions are: - * `clone`, `cloneDeep`, `contains`, `escape`, `every`, `find`, `has`, - * `identity`, `indexOf`, `isArguments`, `isArray`, `isBoolean`, `isDate`, - * `isElement`, `isEmpty`, `isEqual`, `isFinite`, `isFunction`, `isNaN`, - * `isNull`, `isNumber`, `isObject`, `isPlainObject`, `isRegExp`, `isString`, - * `isUndefined`, `join`, `lastIndexOf`, `mixin`, `noConflict`, `parseInt`, - * `pop`, `random`, `reduce`, `reduceRight`, `result`, `shift`, `size`, `some`, - * `sortedIndex`, `runInContext`, `template`, `unescape`, `uniqueId`, and `value` - * - * The wrapper functions `first` and `last` return wrapped values when `n` is - * passed, otherwise they return unwrapped values. - * - * @name _ - * @constructor - * @category Chaining - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. - */ - function lodash(value) { - // don't wrap if already wrapped, even if wrapped by a different `lodash` constructor - return (value && typeof value == 'object' && !isArray(value) && hasOwnProperty.call(value, '__wrapped__')) - ? value - : new lodashWrapper(value); - } - - /** - * An object used to flag environments features. - * - * @static - * @memberOf _ - * @type Object - */ - var support = lodash.support = {}; - - (function() { - var ctor = function() { this.x = 1; }, - object = { '0': 1, 'length': 1 }, - props = []; - - ctor.prototype = { 'valueOf': 1, 'y': 1 }; - for (var prop in new ctor) { props.push(prop); } - for (prop in arguments) { } - - /** - * Detect if `arguments` objects are `Object` objects (all but Opera < 10.5). - * - * @memberOf _.support - * @type Boolean - */ - support.argsObject = arguments.constructor == Object; - - /** - * Detect if an `arguments` object's [[Class]] is resolvable (all but Firefox < 4, IE < 9). - * - * @memberOf _.support - * @type Boolean - */ - support.argsClass = isArguments(arguments); - - /** - * Detect if `prototype` properties are enumerable by default. - * - * Firefox < 3.6, Opera > 9.50 - Opera < 11.60, and Safari < 5.1 - * (if the prototype or a property on the prototype has been set) - * incorrectly sets a function's `prototype` property [[Enumerable]] - * value to `true`. - * - * @memberOf _.support - * @type Boolean - */ - support.enumPrototypes = ctor.propertyIsEnumerable('prototype'); - - /** - * Detect if `Function#bind` exists and is inferred to be fast (all but V8). - * - * @memberOf _.support - * @type Boolean - */ - support.fastBind = nativeBind && !isV8; - - /** - * Detect if own properties are iterated after inherited properties (all but IE < 9). - * - * @memberOf _.support - * @type Boolean - */ - support.ownLast = props[0] != 'x'; - - /** - * Detect if `arguments` object indexes are non-enumerable - * (Firefox < 4, IE < 9, PhantomJS, Safari < 5.1). - * - * @memberOf _.support - * @type Boolean - */ - support.nonEnumArgs = prop != 0; - - /** - * Detect if properties shadowing those on `Object.prototype` are non-enumerable. - * - * In IE < 9 an objects own properties, shadowing non-enumerable ones, are - * made non-enumerable as well (a.k.a the JScript [[DontEnum]] bug). - * - * @memberOf _.support - * @type Boolean - */ - support.nonEnumShadows = !/valueOf/.test(props); - - /** - * Detect if `Array#shift` and `Array#splice` augment array-like objects correctly. - * - * Firefox < 10, IE compatibility mode, and IE < 9 have buggy Array `shift()` - * and `splice()` functions that fail to remove the last element, `value[0]`, - * of array-like objects even though the `length` property is set to `0`. - * The `shift()` method is buggy in IE 8 compatibility mode, while `splice()` - * is buggy regardless of mode in IE < 9 and buggy in compatibility mode in IE 9. - * - * @memberOf _.support - * @type Boolean - */ - support.spliceObjects = (arrayRef.splice.call(object, 0, 1), !object[0]); - - /** - * Detect lack of support for accessing string characters by index. - * - * IE < 8 can't access characters by index and IE 8 can only access - * characters by index on string literals. - * - * @memberOf _.support - * @type Boolean - */ - support.unindexedChars = ('x'[0] + Object('x')[0]) != 'xx'; - - /** - * Detect if a DOM node's [[Class]] is resolvable (all but IE < 9) - * and that the JS engine errors when attempting to coerce an object to - * a string without a `toString` function. - * - * @memberOf _.support - * @type Boolean - */ - try { - support.nodeClass = !(toString.call(document) == objectClass && !({ 'toString': 0 } + '')); - } catch(e) { - support.nodeClass = true; - } - }(1)); - - /** - * By default, the template delimiters used by Lo-Dash are similar to those in - * embedded Ruby (ERB). Change the following template settings to use alternative - * delimiters. - * - * @static - * @memberOf _ - * @type Object - */ - lodash.templateSettings = { - - /** - * Used to detect `data` property values to be HTML-escaped. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'escape': /<%-([\s\S]+?)%>/g, - - /** - * Used to detect code to be evaluated. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'evaluate': /<%([\s\S]+?)%>/g, - - /** - * Used to detect `data` property values to inject. - * - * @memberOf _.templateSettings - * @type RegExp - */ - 'interpolate': reInterpolate, - - /** - * Used to reference the data object in the template text. - * - * @memberOf _.templateSettings - * @type String - */ - 'variable': '', - - /** - * Used to import variables into the compiled template. - * - * @memberOf _.templateSettings - * @type Object - */ - 'imports': { - - /** - * A reference to the `lodash` function. - * - * @memberOf _.templateSettings.imports - * @type Function - */ - '_': lodash - } - }; - - /*--------------------------------------------------------------------------*/ - - /** - * The template used to create iterator functions. - * - * @private - * @param {Obect} data The data object used to populate the text. - * @returns {String} Returns the interpolated text. - */ - var iteratorTemplate = function(obj) { - - var __p = 'var index, iterable = ' + - (obj.firstArg) + - ', result = ' + - (obj.init) + - ';\nif (!iterable) return result;\n' + - (obj.top) + - ';\n'; - if (obj.arrays) { - __p += 'var length = iterable.length; index = -1;\nif (' + - (obj.arrays) + - ') { '; - if (support.unindexedChars) { - __p += '\n if (isString(iterable)) {\n iterable = iterable.split(\'\')\n } '; - } - __p += '\n while (++index < length) {\n ' + - (obj.loop) + - '\n }\n}\nelse { '; - } else if (support.nonEnumArgs) { - __p += '\n var length = iterable.length; index = -1;\n if (length && isArguments(iterable)) {\n while (++index < length) {\n index += \'\';\n ' + - (obj.loop) + - '\n }\n } else { '; - } - - if (support.enumPrototypes) { - __p += '\n var skipProto = typeof iterable == \'function\';\n '; - } - - if (obj.useHas && obj.useKeys) { - __p += '\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? keys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n '; - if (support.enumPrototypes) { - __p += 'if (!(skipProto && index == \'prototype\')) {\n '; - } - __p += - (obj.loop); - if (support.enumPrototypes) { - __p += '}\n'; - } - __p += ' } '; - } else { - __p += '\n for (index in iterable) {'; - if (support.enumPrototypes || obj.useHas) { - __p += '\n if ('; - if (support.enumPrototypes) { - __p += '!(skipProto && index == \'prototype\')'; - } if (support.enumPrototypes && obj.useHas) { - __p += ' && '; - } if (obj.useHas) { - __p += 'hasOwnProperty.call(iterable, index)'; - } - __p += ') { '; - } - __p += - (obj.loop) + - '; '; - if (support.enumPrototypes || obj.useHas) { - __p += '\n }'; - } - __p += '\n } '; - if (support.nonEnumShadows) { - __p += '\n\n var ctor = iterable.constructor;\n '; - for (var k = 0; k < 7; k++) { - __p += '\n index = \'' + - (obj.shadowedProps[k]) + - '\';\n if ('; - if (obj.shadowedProps[k] == 'constructor') { - __p += '!(ctor && ctor.prototype === iterable) && '; - } - __p += 'hasOwnProperty.call(iterable, index)) {\n ' + - (obj.loop) + - '\n } '; - } - - } - - } - - if (obj.arrays || support.nonEnumArgs) { - __p += '\n}'; - } - __p += - (obj.bottom) + - ';\nreturn result'; - - return __p - }; - - /** Reusable iterator options for `assign` and `defaults` */ - var defaultsIteratorOptions = { - 'args': 'object, source, guard', - 'top': - 'var args = arguments,\n' + - ' argsIndex = 0,\n' + - " argsLength = typeof guard == 'number' ? 2 : args.length;\n" + - 'while (++argsIndex < argsLength) {\n' + - ' iterable = args[argsIndex];\n' + - ' if (iterable && objectTypes[typeof iterable]) {', - 'loop': "if (typeof result[index] == 'undefined') result[index] = iterable[index]", - 'bottom': ' }\n}' - }; - - /** Reusable iterator options shared by `each`, `forIn`, and `forOwn` */ - var eachIteratorOptions = { - 'args': 'collection, callback, thisArg', - 'top': "callback = callback && typeof thisArg == 'undefined' ? callback : lodash.createCallback(callback, thisArg)", - 'arrays': "typeof length == 'number'", - 'loop': 'if (callback(iterable[index], index, collection) === false) return result' - }; - - /** Reusable iterator options for `forIn` and `forOwn` */ - var forOwnIteratorOptions = { - 'top': 'if (!objectTypes[typeof iterable]) return result;\n' + eachIteratorOptions.top, - 'arrays': false - }; - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a function optimized to search large arrays for a given `value`, - * starting at `fromIndex`, using strict equality for comparisons, i.e. `===`. - * - * @private - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} fromIndex The index to search from. - * @param {Number} largeSize The length at which an array is considered large. - * @returns {Boolean} Returns `true`, if `value` is found, else `false`. - */ - function cachedContains(array, fromIndex, largeSize) { - var length = array.length, - isLarge = (length - fromIndex) >= largeSize; - - if (isLarge) { - var cache = {}, - index = fromIndex - 1; - - while (++index < length) { - // manually coerce `value` to a string because `hasOwnProperty`, in some - // older versions of Firefox, coerces objects incorrectly - var key = String(array[index]); - (hasOwnProperty.call(cache, key) ? cache[key] : (cache[key] = [])).push(array[index]); - } - } - return function(value) { - if (isLarge) { - var key = String(value); - return hasOwnProperty.call(cache, key) && indexOf(cache[key], value) > -1; - } - return indexOf(array, value, fromIndex) > -1; - } - } - - /** - * Used by `_.max` and `_.min` as the default `callback` when a given - * `collection` is a string value. - * - * @private - * @param {String} value The character to inspect. - * @returns {Number} Returns the code unit of given character. - */ - function charAtCallback(value) { - return value.charCodeAt(0); - } - - /** - * Used by `sortBy` to compare transformed `collection` values, stable sorting - * them in ascending order. - * - * @private - * @param {Object} a The object to compare to `b`. - * @param {Object} b The object to compare to `a`. - * @returns {Number} Returns the sort order indicator of `1` or `-1`. - */ - function compareAscending(a, b) { - var ai = a.index, - bi = b.index; - - a = a.criteria; - b = b.criteria; - - // ensure a stable sort in V8 and other engines - // http://code.google.com/p/v8/issues/detail?id=90 - if (a !== b) { - if (a > b || typeof a == 'undefined') { - return 1; - } - if (a < b || typeof b == 'undefined') { - return -1; - } - } - return ai < bi ? -1 : 1; - } - - /** - * Creates a function that, when called, invokes `func` with the `this` binding - * of `thisArg` and prepends any `partialArgs` to the arguments passed to the - * bound function. - * - * @private - * @param {Function|String} func The function to bind or the method name. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Array} partialArgs An array of arguments to be partially applied. - * @param {Object} [idicator] Used to indicate binding by key or partially - * applying arguments from the right. - * @returns {Function} Returns the new bound function. - */ - function createBound(func, thisArg, partialArgs, indicator) { - var isFunc = isFunction(func), - isPartial = !partialArgs, - key = thisArg; - - // juggle arguments - if (isPartial) { - var rightIndicator = indicator; - partialArgs = thisArg; - } - else if (!isFunc) { - if (!indicator) { - throw new TypeError; - } - thisArg = func; - } - - function bound() { - // `Function#bind` spec - // http://es5.github.com/#x15.3.4.5 - var args = arguments, - thisBinding = isPartial ? this : thisArg; - - if (!isFunc) { - func = thisArg[key]; - } - if (partialArgs.length) { - args = args.length - ? (args = slice(args), rightIndicator ? args.concat(partialArgs) : partialArgs.concat(args)) - : partialArgs; - } - if (this instanceof bound) { - // ensure `new bound` is an instance of `func` - noop.prototype = func.prototype; - thisBinding = new noop; - noop.prototype = null; - - // mimic the constructor's `return` behavior - // http://es5.github.com/#x13.2.2 - var result = func.apply(thisBinding, args); - return isObject(result) ? result : thisBinding; - } - return func.apply(thisBinding, args); - } - return bound; - } - - /** - * Creates compiled iteration functions. - * - * @private - * @param {Object} [options1, options2, ...] The compile options object(s). - * arrays - A string of code to determine if the iterable is an array or array-like. - * useHas - A boolean to specify using `hasOwnProperty` checks in the object loop. - * args - A string of comma separated arguments the iteration function will accept. - * top - A string of code to execute before the iteration branches. - * loop - A string of code to execute in the object loop. - * bottom - A string of code to execute after the iteration branches. - * @returns {Function} Returns the compiled function. - */ - function createIterator() { - var data = { - // data properties - 'shadowedProps': shadowedProps, - // iterator options - 'arrays': 'isArray(iterable)', - 'bottom': '', - 'init': 'iterable', - 'loop': '', - 'top': '', - 'useHas': true, - 'useKeys': !!keys - }; - - // merge options into a template data object - for (var object, index = 0; object = arguments[index]; index++) { - for (var key in object) { - data[key] = object[key]; - } - } - var args = data.args; - data.firstArg = /^[^,]+/.exec(args)[0]; - - // create the function factory - var factory = Function( - 'hasOwnProperty, isArguments, isArray, isString, keys, ' + - 'lodash, objectTypes', - 'return function(' + args + ') {\n' + iteratorTemplate(data) + '\n}' - ); - // return the compiled function - return factory( - hasOwnProperty, isArguments, isArray, isString, keys, - lodash, objectTypes - ); - } - - /** - * Used by `template` to escape characters for inclusion in compiled - * string literals. - * - * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. - */ - function escapeStringChar(match) { - return '\\' + stringEscapes[match]; - } - - /** - * Used by `escape` to convert characters to HTML entities. - * - * @private - * @param {String} match The matched character to escape. - * @returns {String} Returns the escaped character. - */ - function escapeHtmlChar(match) { - return htmlEscapes[match]; - } - - /** - * Checks if `value` is a DOM node in IE < 9. - * - * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true` if the `value` is a DOM node, else `false`. - */ - function isNode(value) { - // IE < 9 presents DOM nodes as `Object` objects except they have `toString` - // methods that are `typeof` "string" and still can coerce nodes to strings - return typeof value.toString != 'function' && typeof (value + '') == 'string'; - } - - /** - * A fast path for creating `lodash` wrapper objects. - * - * @private - * @param {Mixed} value The value to wrap in a `lodash` instance. - * @returns {Object} Returns a `lodash` instance. - */ - function lodashWrapper(value) { - this.__wrapped__ = value; - } - // ensure `new lodashWrapper` is an instance of `lodash` - lodashWrapper.prototype = lodash.prototype; - - /** - * A no-operation function. - * - * @private - */ - function noop() { - // no operation performed - } - - /** - * A fallback implementation of `isPlainObject` that checks if a given `value` - * is an object created by the `Object` constructor, assuming objects created - * by the `Object` constructor have no inherited enumerable properties and that - * there are no `Object.prototype` extensions. - * - * @private - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`. - */ - function shimIsPlainObject(value) { - // avoid non-objects and false positives for `arguments` objects - var result = false; - if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { - return result; - } - // check that the constructor is `Object` (i.e. `Object instanceof Object`) - var ctor = value.constructor; - - if (isFunction(ctor) ? ctor instanceof ctor : (support.nodeClass || !isNode(value))) { - // IE < 9 iterates inherited properties before own properties. If the first - // iterated property is an object's own property then there are no inherited - // enumerable properties. - if (support.ownLast) { - forIn(value, function(value, key, object) { - result = hasOwnProperty.call(object, key); - return false; - }); - return result === true; - } - // In most environments an object's own properties are iterated before - // its inherited properties. If the last iterated property is an object's - // own property then there are no inherited enumerable properties. - forIn(value, function(value, key) { - result = key; - }); - return result === false || hasOwnProperty.call(value, result); - } - return result; - } - - /** - * Slices the `collection` from the `start` index up to, but not including, - * the `end` index. - * - * Note: This function is used, instead of `Array#slice`, to support node lists - * in IE < 9 and to ensure dense arrays are returned. - * - * @private - * @param {Array|Object|String} collection The collection to slice. - * @param {Number} start The start index. - * @param {Number} end The end index. - * @returns {Array} Returns the new array. - */ - function slice(array, start, end) { - start || (start = 0); - if (typeof end == 'undefined') { - end = array ? array.length : 0; - } - var index = -1, - length = end - start || 0, - result = Array(length < 0 ? 0 : length); - - while (++index < length) { - result[index] = array[start + index]; - } - return result; - } - - /** - * Used by `unescape` to convert HTML entities to characters. - * - * @private - * @param {String} match The matched character to unescape. - * @returns {String} Returns the unescaped character. - */ - function unescapeHtmlChar(match) { - return htmlUnescapes[match]; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Checks if `value` is an `arguments` object. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is an `arguments` object, else `false`. - * @example - * - * (function() { return _.isArguments(arguments); })(1, 2, 3); - * // => true - * - * _.isArguments([1, 2, 3]); - * // => false - */ - function isArguments(value) { - return toString.call(value) == argsClass; - } - // fallback for browsers that can't detect `arguments` objects by [[Class]] - if (!support.argsClass) { - isArguments = function(value) { - return value ? hasOwnProperty.call(value, 'callee') : false; - }; - } - - /** - * Checks if `value` is an array. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is an array, else `false`. - * @example - * - * (function() { return _.isArray(arguments); })(); - * // => false - * - * _.isArray([1, 2, 3]); - * // => true - */ - var isArray = nativeIsArray || function(value) { - // `instanceof` may cause a memory leak in IE 7 if `value` is a host object - // http://ajaxian.com/archives/working-aroung-the-instanceof-memory-leak - return (support.argsObject && value instanceof Array) || toString.call(value) == arrayClass; - }; - - /** - * A fallback implementation of `Object.keys` that produces an array of the - * given object's own enumerable property names. - * - * @private - * @type Function - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names. - */ - var shimKeys = createIterator({ - 'args': 'object', - 'init': '[]', - 'top': 'if (!(objectTypes[typeof object])) return result', - 'loop': 'result.push(index)', - 'arrays': false - }); - - /** - * Creates an array composed of the own enumerable property names of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names. - * @example - * - * _.keys({ 'one': 1, 'two': 2, 'three': 3 }); - * // => ['one', 'two', 'three'] (order is not guaranteed) - */ - var keys = !nativeKeys ? shimKeys : function(object) { - if (!isObject(object)) { - return []; - } - if ((support.enumPrototypes && typeof object == 'function') || - (support.nonEnumArgs && object.length && isArguments(object))) { - return shimKeys(object); - } - return nativeKeys(object); - }; - - /** - * A function compiled to iterate `arguments` objects, arrays, objects, and - * strings consistenly across environments, executing the `callback` for each - * element in the `collection`. The `callback` is bound to `thisArg` and invoked - * with three arguments; (value, index|key, collection). Callbacks may exit - * iteration early by explicitly returning `false`. - * - * @private - * @type Function - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. - */ - var each = createIterator(eachIteratorOptions); - - /** - * Used to convert characters to HTML entities: - * - * Though the `>` character is escaped for symmetry, characters like `>` and `/` - * don't require escaping in HTML and have no special meaning unless they're part - * of a tag or an unquoted attribute value. - * http://mathiasbynens.be/notes/ambiguous-ampersands (under "semi-related fun fact") - */ - var htmlEscapes = { - '&': '&', - '<': '<', - '>': '>', - '"': '"', - "'": ''' - }; - - /** Used to convert HTML entities to characters */ - var htmlUnescapes = invert(htmlEscapes); - - /*--------------------------------------------------------------------------*/ - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object. Subsequent sources will overwrite property assignments of previous - * sources. If a `callback` function is passed, it will be executed to produce - * the assigned values. The `callback` is bound to `thisArg` and invoked with - * two arguments; (objectValue, sourceValue). - * - * @static - * @memberOf _ - * @type Function - * @alias extend - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize assigning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the destination object. - * @example - * - * _.assign({ 'name': 'moe' }, { 'age': 40 }); - * // => { 'name': 'moe', 'age': 40 } - * - * var defaults = _.partialRight(_.assign, function(a, b) { - * return typeof a == 'undefined' ? b : a; - * }); - * - * var food = { 'name': 'apple' }; - * defaults(food, { 'name': 'banana', 'type': 'fruit' }); - * // => { 'name': 'apple', 'type': 'fruit' } - */ - var assign = createIterator(defaultsIteratorOptions, { - 'top': - defaultsIteratorOptions.top.replace(';', - ';\n' + - "if (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n" + - ' var callback = lodash.createCallback(args[--argsLength - 1], args[argsLength--], 2);\n' + - "} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n" + - ' callback = args[--argsLength];\n' + - '}' - ), - 'loop': 'result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]' - }); - - /** - * Creates a clone of `value`. If `deep` is `true`, nested objects will also - * be cloned, otherwise they will be assigned by reference. If a `callback` - * function is passed, it will be executed to produce the cloned values. If - * `callback` returns `undefined`, cloning will be handled by the method instead. - * The `callback` is bound to `thisArg` and invoked with one argument; (value). - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to clone. - * @param {Boolean} [deep=false] A flag to indicate a deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @param- {Array} [stackA=[]] Tracks traversed source objects. - * @param- {Array} [stackB=[]] Associates clones with source counterparts. - * @returns {Mixed} Returns the cloned `value`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * var shallow = _.clone(stooges); - * shallow[0] === stooges[0]; - * // => true - * - * var deep = _.clone(stooges, true); - * deep[0] === stooges[0]; - * // => false - * - * _.mixin({ - * 'clone': _.partialRight(_.clone, function(value) { - * return _.isElement(value) ? value.cloneNode(false) : undefined; - * }) - * }); - * - * var clone = _.clone(document.body); - * clone.childNodes.length; - * // => 0 - */ - function clone(value, deep, callback, thisArg, stackA, stackB) { - var result = value; - - // allows working with "Collections" methods without using their `callback` - // argument, `index|key`, for this method's `callback` - if (typeof deep == 'function') { - thisArg = callback; - callback = deep; - deep = false; - } - if (typeof callback == 'function') { - callback = (typeof thisArg == 'undefined') - ? callback - : lodash.createCallback(callback, thisArg, 1); - - result = callback(result); - if (typeof result != 'undefined') { - return result; - } - result = value; - } - // inspect [[Class]] - var isObj = isObject(result); - if (isObj) { - var className = toString.call(result); - if (!cloneableClasses[className] || (!support.nodeClass && isNode(result))) { - return result; - } - var isArr = isArray(result); - } - // shallow clone - if (!isObj || !deep) { - return isObj - ? (isArr ? slice(result) : assign({}, result)) - : result; - } - var ctor = ctorByClass[className]; - switch (className) { - case boolClass: - case dateClass: - return new ctor(+result); - - case numberClass: - case stringClass: - return new ctor(result); - - case regexpClass: - return ctor(result.source, reFlags.exec(result)); - } - // check for circular references and return corresponding clone - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == value) { - return stackB[length]; - } - } - // init cloned object - result = isArr ? ctor(result.length) : {}; - - // add array properties assigned by `RegExp#exec` - if (isArr) { - if (hasOwnProperty.call(value, 'index')) { - result.index = value.index; - } - if (hasOwnProperty.call(value, 'input')) { - result.input = value.input; - } - } - // add the source value to the stack of traversed objects - // and associate it with its clone - stackA.push(value); - stackB.push(result); - - // recursively populate clone (susceptible to call stack limits) - (isArr ? forEach : forOwn)(value, function(objValue, key) { - result[key] = clone(objValue, deep, callback, undefined, stackA, stackB); - }); - - return result; - } - - /** - * Creates a deep clone of `value`. If a `callback` function is passed, - * it will be executed to produce the cloned values. If `callback` returns - * `undefined`, cloning will be handled by the method instead. The `callback` - * is bound to `thisArg` and invoked with one argument; (value). - * - * Note: This function is loosely based on the structured clone algorithm. Functions - * and DOM nodes are **not** cloned. The enumerable properties of `arguments` objects and - * objects created by constructors other than `Object` are cloned to plain `Object` objects. - * See http://www.w3.org/TR/html5/infrastructure.html#internal-structured-cloning-algorithm. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to deep clone. - * @param {Function} [callback] The function to customize cloning values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the deep cloned `value`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * var deep = _.cloneDeep(stooges); - * deep[0] === stooges[0]; - * // => false - * - * var view = { - * 'label': 'docs', - * 'node': element - * }; - * - * var clone = _.cloneDeep(view, function(value) { - * return _.isElement(value) ? value.cloneNode(true) : undefined; - * }); - * - * clone.node == view.node; - * // => false - */ - function cloneDeep(value, callback, thisArg) { - return clone(value, true, callback, thisArg); - } - - /** - * Assigns own enumerable properties of source object(s) to the destination - * object for all destination properties that resolve to `undefined`. Once a - * property is set, additional defaults of the same property will be ignored. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param- {Object} [guard] Allows working with `_.reduce` without using its - * callback's `key` and `object` arguments as sources. - * @returns {Object} Returns the destination object. - * @example - * - * var food = { 'name': 'apple' }; - * _.defaults(food, { 'name': 'banana', 'type': 'fruit' }); - * // => { 'name': 'apple', 'type': 'fruit' } - */ - var defaults = createIterator(defaultsIteratorOptions); - - /** - * This method is similar to `_.find`, except that it returns the key of the - * element that passes the callback check, instead of the element itself. - * - * @static - * @memberOf _ - * @category Objects - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the key of the found element, else `undefined`. - * @example - * - * _.findKey({ 'a': 1, 'b': 2, 'c': 3, 'd': 4 }, function(num) { return num % 2 == 0; }); - * // => 'b' - */ - function findKey(collection, callback, thisArg) { - var result; - callback = lodash.createCallback(callback, thisArg); - forOwn(collection, function(value, key, collection) { - if (callback(value, key, collection)) { - result = key; - return false; - } - }); - return result; - } - - /** - * Iterates over `object`'s own and inherited enumerable properties, executing - * the `callback` for each property. The `callback` is bound to `thisArg` and - * invoked with three arguments; (value, key, object). Callbacks may exit iteration - * early by explicitly returning `false`. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * function Dog(name) { - * this.name = name; - * } - * - * Dog.prototype.bark = function() { - * alert('Woof, woof!'); - * }; - * - * _.forIn(new Dog('Dagny'), function(value, key) { - * alert(key); - * }); - * // => alerts 'name' and 'bark' (order is not guaranteed) - */ - var forIn = createIterator(eachIteratorOptions, forOwnIteratorOptions, { - 'useHas': false - }); - - /** - * Iterates over an object's own enumerable properties, executing the `callback` - * for each property. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, key, object). Callbacks may exit iteration early by explicitly - * returning `false`. - * - * @static - * @memberOf _ - * @type Function - * @category Objects - * @param {Object} object The object to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns `object`. - * @example - * - * _.forOwn({ '0': 'zero', '1': 'one', 'length': 2 }, function(num, key) { - * alert(key); - * }); - * // => alerts '0', '1', and 'length' (order is not guaranteed) - */ - var forOwn = createIterator(eachIteratorOptions, forOwnIteratorOptions); - - /** - * Creates a sorted array of all enumerable properties, own and inherited, - * of `object` that have function values. - * - * @static - * @memberOf _ - * @alias methods - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property names that have function values. - * @example - * - * _.functions(_); - * // => ['all', 'any', 'bind', 'bindAll', 'clone', 'compact', 'compose', ...] - */ - function functions(object) { - var result = []; - forIn(object, function(value, key) { - if (isFunction(value)) { - result.push(key); - } - }); - return result.sort(); - } - - /** - * Checks if the specified object `property` exists and is a direct property, - * instead of an inherited property. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to check. - * @param {String} property The property to check for. - * @returns {Boolean} Returns `true` if key is a direct property, else `false`. - * @example - * - * _.has({ 'a': 1, 'b': 2, 'c': 3 }, 'b'); - * // => true - */ - function has(object, property) { - return object ? hasOwnProperty.call(object, property) : false; - } - - /** - * Creates an object composed of the inverted keys and values of the given `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to invert. - * @returns {Object} Returns the created inverted object. - * @example - * - * _.invert({ 'first': 'moe', 'second': 'larry' }); - * // => { 'moe': 'first', 'larry': 'second' } - */ - function invert(object) { - var index = -1, - props = keys(object), - length = props.length, - result = {}; - - while (++index < length) { - var key = props[index]; - result[object[key]] = key; - } - return result; - } - - /** - * Checks if `value` is a boolean value. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a boolean value, else `false`. - * @example - * - * _.isBoolean(null); - * // => false - */ - function isBoolean(value) { - return value === true || value === false || toString.call(value) == boolClass; - } - - /** - * Checks if `value` is a date. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a date, else `false`. - * @example - * - * _.isDate(new Date); - * // => true - */ - function isDate(value) { - return value instanceof Date || toString.call(value) == dateClass; - } - - /** - * Checks if `value` is a DOM element. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a DOM element, else `false`. - * @example - * - * _.isElement(document.body); - * // => true - */ - function isElement(value) { - return value ? value.nodeType === 1 : false; - } - - /** - * Checks if `value` is empty. Arrays, strings, or `arguments` objects with a - * length of `0` and objects with no own enumerable properties are considered - * "empty". - * - * @static - * @memberOf _ - * @category Objects - * @param {Array|Object|String} value The value to inspect. - * @returns {Boolean} Returns `true`, if the `value` is empty, else `false`. - * @example - * - * _.isEmpty([1, 2, 3]); - * // => false - * - * _.isEmpty({}); - * // => true - * - * _.isEmpty(''); - * // => true - */ - function isEmpty(value) { - var result = true; - if (!value) { - return result; - } - var className = toString.call(value), - length = value.length; - - if ((className == arrayClass || className == stringClass || - (support.argsClass ? className == argsClass : isArguments(value))) || - (className == objectClass && typeof length == 'number' && isFunction(value.splice))) { - return !length; - } - forOwn(value, function() { - return (result = false); - }); - return result; - } - - /** - * Performs a deep comparison between two values to determine if they are - * equivalent to each other. If `callback` is passed, it will be executed to - * compare values. If `callback` returns `undefined`, comparisons will be handled - * by the method instead. The `callback` is bound to `thisArg` and invoked with - * two arguments; (a, b). - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} a The value to compare. - * @param {Mixed} b The other value to compare. - * @param {Function} [callback] The function to customize comparing values. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @param- {Array} [stackA=[]] Tracks traversed `a` objects. - * @param- {Array} [stackB=[]] Tracks traversed `b` objects. - * @returns {Boolean} Returns `true`, if the values are equivalent, else `false`. - * @example - * - * var moe = { 'name': 'moe', 'age': 40 }; - * var copy = { 'name': 'moe', 'age': 40 }; - * - * moe == copy; - * // => false - * - * _.isEqual(moe, copy); - * // => true - * - * var words = ['hello', 'goodbye']; - * var otherWords = ['hi', 'goodbye']; - * - * _.isEqual(words, otherWords, function(a, b) { - * var reGreet = /^(?:hello|hi)$/i, - * aGreet = _.isString(a) && reGreet.test(a), - * bGreet = _.isString(b) && reGreet.test(b); - * - * return (aGreet || bGreet) ? (aGreet == bGreet) : undefined; - * }); - * // => true - */ - function isEqual(a, b, callback, thisArg, stackA, stackB) { - // used to indicate that when comparing objects, `a` has at least the properties of `b` - var whereIndicator = callback === indicatorObject; - if (callback && !whereIndicator) { - callback = (typeof thisArg == 'undefined') - ? callback - : lodash.createCallback(callback, thisArg, 2); - - var result = callback(a, b); - if (typeof result != 'undefined') { - return !!result; - } - } - // exit early for identical values - if (a === b) { - // treat `+0` vs. `-0` as not equal - return a !== 0 || (1 / a == 1 / b); - } - var type = typeof a, - otherType = typeof b; - - // exit early for unlike primitive values - if (a === a && - (!a || (type != 'function' && type != 'object')) && - (!b || (otherType != 'function' && otherType != 'object'))) { - return false; - } - // exit early for `null` and `undefined`, avoiding ES3's Function#call behavior - // http://es5.github.com/#x15.3.4.4 - if (a == null || b == null) { - return a === b; - } - // compare [[Class]] names - var className = toString.call(a), - otherClass = toString.call(b); - - if (className == argsClass) { - className = objectClass; - } - if (otherClass == argsClass) { - otherClass = objectClass; - } - if (className != otherClass) { - return false; - } - switch (className) { - case boolClass: - case dateClass: - // coerce dates and booleans to numbers, dates to milliseconds and booleans - // to `1` or `0`, treating invalid dates coerced to `NaN` as not equal - return +a == +b; - - case numberClass: - // treat `NaN` vs. `NaN` as equal - return (a != +a) - ? b != +b - // but treat `+0` vs. `-0` as not equal - : (a == 0 ? (1 / a == 1 / b) : a == +b); - - case regexpClass: - case stringClass: - // coerce regexes to strings (http://es5.github.com/#x15.10.6.4) - // treat string primitives and their corresponding object instances as equal - return a == String(b); - } - var isArr = className == arrayClass; - if (!isArr) { - // unwrap any `lodash` wrapped values - if (hasOwnProperty.call(a, '__wrapped__ ') || hasOwnProperty.call(b, '__wrapped__')) { - return isEqual(a.__wrapped__ || a, b.__wrapped__ || b, callback, thisArg, stackA, stackB); - } - // exit for functions and DOM nodes - if (className != objectClass || (!support.nodeClass && (isNode(a) || isNode(b)))) { - return false; - } - // in older versions of Opera, `arguments` objects have `Array` constructors - var ctorA = !support.argsObject && isArguments(a) ? Object : a.constructor, - ctorB = !support.argsObject && isArguments(b) ? Object : b.constructor; - - // non `Object` object instances with different constructors are not equal - if (ctorA != ctorB && !( - isFunction(ctorA) && ctorA instanceof ctorA && - isFunction(ctorB) && ctorB instanceof ctorB - )) { - return false; - } - } - // assume cyclic structures are equal - // the algorithm for detecting cyclic structures is adapted from ES 5.1 - // section 15.12.3, abstract operation `JO` (http://es5.github.com/#x15.12.3) - stackA || (stackA = []); - stackB || (stackB = []); - - var length = stackA.length; - while (length--) { - if (stackA[length] == a) { - return stackB[length] == b; - } - } - var size = 0; - result = true; - - // add `a` and `b` to the stack of traversed objects - stackA.push(a); - stackB.push(b); - - // recursively compare objects and arrays (susceptible to call stack limits) - if (isArr) { - length = a.length; - size = b.length; - - // compare lengths to determine if a deep comparison is necessary - result = size == a.length; - if (!result && !whereIndicator) { - return result; - } - // deep compare the contents, ignoring non-numeric properties - while (size--) { - var index = length, - value = b[size]; - - if (whereIndicator) { - while (index--) { - if ((result = isEqual(a[index], value, callback, thisArg, stackA, stackB))) { - break; - } - } - } else if (!(result = isEqual(a[size], value, callback, thisArg, stackA, stackB))) { - break; - } - } - return result; - } - // deep compare objects using `forIn`, instead of `forOwn`, to avoid `Object.keys` - // which, in this case, is more costly - forIn(b, function(value, key, b) { - if (hasOwnProperty.call(b, key)) { - // count the number of properties. - size++; - // deep compare each property value. - return (result = hasOwnProperty.call(a, key) && isEqual(a[key], value, callback, thisArg, stackA, stackB)); - } - }); - - if (result && !whereIndicator) { - // ensure both objects have the same number of properties - forIn(a, function(value, key, a) { - if (hasOwnProperty.call(a, key)) { - // `size` will be `-1` if `a` has more properties than `b` - return (result = --size > -1); - } - }); - } - return result; - } - - /** - * Checks if `value` is, or can be coerced to, a finite number. - * - * Note: This is not the same as native `isFinite`, which will return true for - * booleans and empty strings. See http://es5.github.com/#x15.1.2.5. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is finite, else `false`. - * @example - * - * _.isFinite(-101); - * // => true - * - * _.isFinite('10'); - * // => true - * - * _.isFinite(true); - * // => false - * - * _.isFinite(''); - * // => false - * - * _.isFinite(Infinity); - * // => false - */ - function isFinite(value) { - return nativeIsFinite(value) && !nativeIsNaN(parseFloat(value)); - } - - /** - * Checks if `value` is a function. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a function, else `false`. - * @example - * - * _.isFunction(_); - * // => true - */ - function isFunction(value) { - return typeof value == 'function'; - } - // fallback for older versions of Chrome and Safari - if (isFunction(/x/)) { - isFunction = function(value) { - return value instanceof Function || toString.call(value) == funcClass; - }; - } - - /** - * Checks if `value` is the language type of Object. - * (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is an object, else `false`. - * @example - * - * _.isObject({}); - * // => true - * - * _.isObject([1, 2, 3]); - * // => true - * - * _.isObject(1); - * // => false - */ - function isObject(value) { - // check if the value is the ECMAScript language type of Object - // http://es5.github.com/#x8 - // and avoid a V8 bug - // http://code.google.com/p/v8/issues/detail?id=2291 - return value ? objectTypes[typeof value] : false; - } - - /** - * Checks if `value` is `NaN`. - * - * Note: This is not the same as native `isNaN`, which will return `true` for - * `undefined` and other values. See http://es5.github.com/#x15.1.2.4. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is `NaN`, else `false`. - * @example - * - * _.isNaN(NaN); - * // => true - * - * _.isNaN(new Number(NaN)); - * // => true - * - * isNaN(undefined); - * // => true - * - * _.isNaN(undefined); - * // => false - */ - function isNaN(value) { - // `NaN` as a primitive is the only value that is not equal to itself - // (perform the [[Class]] check first to avoid errors with some host objects in IE) - return isNumber(value) && value != +value - } - - /** - * Checks if `value` is `null`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is `null`, else `false`. - * @example - * - * _.isNull(null); - * // => true - * - * _.isNull(undefined); - * // => false - */ - function isNull(value) { - return value === null; - } - - /** - * Checks if `value` is a number. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a number, else `false`. - * @example - * - * _.isNumber(8.4 * 5); - * // => true - */ - function isNumber(value) { - return typeof value == 'number' || toString.call(value) == numberClass; - } - - /** - * Checks if a given `value` is an object created by the `Object` constructor. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if `value` is a plain object, else `false`. - * @example - * - * function Stooge(name, age) { - * this.name = name; - * this.age = age; - * } - * - * _.isPlainObject(new Stooge('moe', 40)); - * // => false - * - * _.isPlainObject([1, 2, 3]); - * // => false - * - * _.isPlainObject({ 'name': 'moe', 'age': 40 }); - * // => true - */ - var isPlainObject = !getPrototypeOf ? shimIsPlainObject : function(value) { - if (!(value && toString.call(value) == objectClass) || (!support.argsClass && isArguments(value))) { - return false; - } - var valueOf = value.valueOf, - objProto = typeof valueOf == 'function' && (objProto = getPrototypeOf(valueOf)) && getPrototypeOf(objProto); - - return objProto - ? (value == objProto || getPrototypeOf(value) == objProto) - : shimIsPlainObject(value); - }; - - /** - * Checks if `value` is a regular expression. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a regular expression, else `false`. - * @example - * - * _.isRegExp(/moe/); - * // => true - */ - function isRegExp(value) { - return value instanceof RegExp || toString.call(value) == regexpClass; - } - - /** - * Checks if `value` is a string. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is a string, else `false`. - * @example - * - * _.isString('moe'); - * // => true - */ - function isString(value) { - return typeof value == 'string' || toString.call(value) == stringClass; - } - - /** - * Checks if `value` is `undefined`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Mixed} value The value to check. - * @returns {Boolean} Returns `true`, if the `value` is `undefined`, else `false`. - * @example - * - * _.isUndefined(void 0); - * // => true - */ - function isUndefined(value) { - return typeof value == 'undefined'; - } - - /** - * Recursively merges own enumerable properties of the source object(s), that - * don't resolve to `undefined`, into the destination object. Subsequent sources - * will overwrite property assignments of previous sources. If a `callback` function - * is passed, it will be executed to produce the merged values of the destination - * and source properties. If `callback` returns `undefined`, merging will be - * handled by the method instead. The `callback` is bound to `thisArg` and - * invoked with two arguments; (objectValue, sourceValue). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The destination object. - * @param {Object} [source1, source2, ...] The source objects. - * @param {Function} [callback] The function to customize merging properties. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @param- {Object} [deepIndicator] Indicates that `stackA` and `stackB` are - * arrays of traversed objects, instead of source objects. - * @param- {Array} [stackA=[]] Tracks traversed source objects. - * @param- {Array} [stackB=[]] Associates values with source counterparts. - * @returns {Object} Returns the destination object. - * @example - * - * var names = { - * 'stooges': [ - * { 'name': 'moe' }, - * { 'name': 'larry' } - * ] - * }; - * - * var ages = { - * 'stooges': [ - * { 'age': 40 }, - * { 'age': 50 } - * ] - * }; - * - * _.merge(names, ages); - * // => { 'stooges': [{ 'name': 'moe', 'age': 40 }, { 'name': 'larry', 'age': 50 }] } - * - * var food = { - * 'fruits': ['apple'], - * 'vegetables': ['beet'] - * }; - * - * var otherFood = { - * 'fruits': ['banana'], - * 'vegetables': ['carrot'] - * }; - * - * _.merge(food, otherFood, function(a, b) { - * return _.isArray(a) ? a.concat(b) : undefined; - * }); - * // => { 'fruits': ['apple', 'banana'], 'vegetables': ['beet', 'carrot] } - */ - function merge(object, source, deepIndicator) { - var args = arguments, - index = 0, - length = 2; - - if (!isObject(object)) { - return object; - } - if (deepIndicator === indicatorObject) { - var callback = args[3], - stackA = args[4], - stackB = args[5]; - } else { - stackA = []; - stackB = []; - - // allows working with `_.reduce` and `_.reduceRight` without - // using their `callback` arguments, `index|key` and `collection` - if (typeof deepIndicator != 'number') { - length = args.length; - } - if (length > 3 && typeof args[length - 2] == 'function') { - callback = lodash.createCallback(args[--length - 1], args[length--], 2); - } else if (length > 2 && typeof args[length - 1] == 'function') { - callback = args[--length]; - } - } - while (++index < length) { - (isArray(args[index]) ? forEach : forOwn)(args[index], function(source, key) { - var found, - isArr, - result = source, - value = object[key]; - - if (source && ((isArr = isArray(source)) || isPlainObject(source))) { - // avoid merging previously merged cyclic sources - var stackLength = stackA.length; - while (stackLength--) { - if ((found = stackA[stackLength] == source)) { - value = stackB[stackLength]; - break; - } - } - if (!found) { - value = isArr - ? (isArray(value) ? value : []) - : (isPlainObject(value) ? value : {}); - - if (callback) { - result = callback(value, source); - if (typeof result != 'undefined') { - value = result; - } - } - // add `source` and associated `value` to the stack of traversed objects - stackA.push(source); - stackB.push(value); - - // recursively merge objects and arrays (susceptible to call stack limits) - if (!callback) { - value = merge(value, source, indicatorObject, callback, stackA, stackB); - } - } - } - else { - if (callback) { - result = callback(value, source); - if (typeof result == 'undefined') { - result = source; - } - } - if (typeof result != 'undefined') { - value = result; - } - } - object[key] = value; - }); - } - return object; - } - - /** - * Creates a shallow clone of `object` excluding the specified properties. - * Property names may be specified as individual arguments or as arrays of - * property names. If a `callback` function is passed, it will be executed - * for each property in the `object`, omitting the properties `callback` - * returns truthy for. The `callback` is bound to `thisArg` and invoked - * with three arguments; (value, key, object). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The source object. - * @param {Function|String} callback|[prop1, prop2, ...] The properties to omit - * or the function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object without the omitted properties. - * @example - * - * _.omit({ 'name': 'moe', 'age': 40 }, 'age'); - * // => { 'name': 'moe' } - * - * _.omit({ 'name': 'moe', 'age': 40 }, function(value) { - * return typeof value == 'number'; - * }); - * // => { 'name': 'moe' } - */ - function omit(object, callback, thisArg) { - var isFunc = typeof callback == 'function', - result = {}; - - if (isFunc) { - callback = lodash.createCallback(callback, thisArg); - } else { - var props = concat.apply(arrayRef, arguments); - } - forIn(object, function(value, key, object) { - if (isFunc - ? !callback(value, key, object) - : indexOf(props, key, 1) < 0 - ) { - result[key] = value; - } - }); - return result; - } - - /** - * Creates a two dimensional array of the given object's key-value pairs, - * i.e. `[[key1, value1], [key2, value2]]`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns new array of key-value pairs. - * @example - * - * _.pairs({ 'moe': 30, 'larry': 40 }); - * // => [['moe', 30], ['larry', 40]] (order is not guaranteed) - */ - function pairs(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - var key = props[index]; - result[index] = [key, object[key]]; - } - return result; - } - - /** - * Creates a shallow clone of `object` composed of the specified properties. - * Property names may be specified as individual arguments or as arrays of property - * names. If `callback` is passed, it will be executed for each property in the - * `object`, picking the properties `callback` returns truthy for. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, key, object). - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The source object. - * @param {Array|Function|String} callback|[prop1, prop2, ...] The function called - * per iteration or properties to pick, either as individual arguments or arrays. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns an object composed of the picked properties. - * @example - * - * _.pick({ 'name': 'moe', '_userid': 'moe1' }, 'name'); - * // => { 'name': 'moe' } - * - * _.pick({ 'name': 'moe', '_userid': 'moe1' }, function(value, key) { - * return key.charAt(0) != '_'; - * }); - * // => { 'name': 'moe' } - */ - function pick(object, callback, thisArg) { - var result = {}; - if (typeof callback != 'function') { - var index = 0, - props = concat.apply(arrayRef, arguments), - length = isObject(object) ? props.length : 0; - - while (++index < length) { - var key = props[index]; - if (key in object) { - result[key] = object[key]; - } - } - } else { - callback = lodash.createCallback(callback, thisArg); - forIn(object, function(value, key, object) { - if (callback(value, key, object)) { - result[key] = value; - } - }); - } - return result; - } - - /** - * Creates an array composed of the own enumerable property values of `object`. - * - * @static - * @memberOf _ - * @category Objects - * @param {Object} object The object to inspect. - * @returns {Array} Returns a new array of property values. - * @example - * - * _.values({ 'one': 1, 'two': 2, 'three': 3 }); - * // => [1, 2, 3] (order is not guaranteed) - */ - function values(object) { - var index = -1, - props = keys(object), - length = props.length, - result = Array(length); - - while (++index < length) { - result[index] = object[props[index]]; - } - return result; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Creates an array of elements from the specified indexes, or keys, of the - * `collection`. Indexes may be specified as individual arguments or as arrays - * of indexes. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Array|Number|String} [index1, index2, ...] The indexes of - * `collection` to retrieve, either as individual arguments or arrays. - * @returns {Array} Returns a new array of elements corresponding to the - * provided indexes. - * @example - * - * _.at(['a', 'b', 'c', 'd', 'e'], [0, 2, 4]); - * // => ['a', 'c', 'e'] - * - * _.at(['moe', 'larry', 'curly'], 0, 2); - * // => ['moe', 'curly'] - */ - function at(collection) { - var index = -1, - props = concat.apply(arrayRef, slice(arguments, 1)), - length = props.length, - result = Array(length); - - if (support.unindexedChars && isString(collection)) { - collection = collection.split(''); - } - while(++index < length) { - result[index] = collection[props[index]]; - } - return result; - } - - /** - * Checks if a given `target` element is present in a `collection` using strict - * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used - * as the offset from the end of the collection. - * - * @static - * @memberOf _ - * @alias include - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Mixed} target The value to check for. - * @param {Number} [fromIndex=0] The index to search from. - * @returns {Boolean} Returns `true` if the `target` element is found, else `false`. - * @example - * - * _.contains([1, 2, 3], 1); - * // => true - * - * _.contains([1, 2, 3], 1, 2); - * // => false - * - * _.contains({ 'name': 'moe', 'age': 40 }, 'moe'); - * // => true - * - * _.contains('curly', 'ur'); - * // => true - */ - function contains(collection, target, fromIndex) { - var index = -1, - length = collection ? collection.length : 0, - result = false; - - fromIndex = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex) || 0; - if (typeof length == 'number') { - result = (isString(collection) - ? collection.indexOf(target, fromIndex) - : indexOf(collection, target, fromIndex) - ) > -1; - } else { - each(collection, function(value) { - if (++index >= fromIndex) { - return !(result = value === target); - } - }); - } - return result; - } - - /** - * Creates an object composed of keys returned from running each element of the - * `collection` through the given `callback`. The corresponding value of each key - * is the number of times the key was returned by the `callback`. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.countBy([4.3, 6.1, 6.4], function(num) { return Math.floor(num); }); - * // => { '4': 1, '6': 2 } - * - * _.countBy([4.3, 6.1, 6.4], function(num) { return this.floor(num); }, Math); - * // => { '4': 1, '6': 2 } - * - * _.countBy(['one', 'two', 'three'], 'length'); - * // => { '3': 2, '5': 1 } - */ - function countBy(collection, callback, thisArg) { - var result = {}; - callback = lodash.createCallback(callback, thisArg); - - forEach(collection, function(value, key, collection) { - key = String(callback(value, key, collection)); - (hasOwnProperty.call(result, key) ? result[key]++ : result[key] = 1); - }); - return result; - } - - /** - * Checks if the `callback` returns a truthy value for **all** elements of a - * `collection`. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias all - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if all elements pass the callback check, - * else `false`. - * @example - * - * _.every([true, 1, null, 'yes'], Boolean); - * // => false - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * // using "_.pluck" callback shorthand - * _.every(stooges, 'age'); - * // => true - * - * // using "_.where" callback shorthand - * _.every(stooges, { 'age': 50 }); - * // => false - */ - function every(collection, callback, thisArg) { - var result = true; - callback = lodash.createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if (!(result = !!callback(collection[index], index, collection))) { - break; - } - } - } else { - each(collection, function(value, index, collection) { - return (result = !!callback(value, index, collection)); - }); - } - return result; - } - - /** - * Examines each element in a `collection`, returning an array of all elements - * the `callback` returns truthy for. The `callback` is bound to `thisArg` and - * invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias select - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that passed the callback check. - * @example - * - * var evens = _.filter([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => [2, 4, 6] - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } - * ]; - * - * // using "_.pluck" callback shorthand - * _.filter(food, 'organic'); - * // => [{ 'name': 'carrot', 'organic': true, 'type': 'vegetable' }] - * - * // using "_.where" callback shorthand - * _.filter(food, { 'type': 'fruit' }); - * // => [{ 'name': 'apple', 'organic': false, 'type': 'fruit' }] - */ - function filter(collection, callback, thisArg) { - var result = []; - callback = lodash.createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - if (callback(value, index, collection)) { - result.push(value); - } - } - } else { - each(collection, function(value, index, collection) { - if (callback(value, index, collection)) { - result.push(value); - } - }); - } - return result; - } - - /** - * Examines each element in a `collection`, returning the first that the `callback` - * returns truthy for. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias detect - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the found element, else `undefined`. - * @example - * - * _.find([1, 2, 3, 4], function(num) { return num % 2 == 0; }); - * // => 2 - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'banana', 'organic': true, 'type': 'fruit' }, - * { 'name': 'beet', 'organic': false, 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.find(food, { 'type': 'vegetable' }); - * // => { 'name': 'beet', 'organic': false, 'type': 'vegetable' } - * - * // using "_.pluck" callback shorthand - * _.find(food, 'organic'); - * // => { 'name': 'banana', 'organic': true, 'type': 'fruit' } - */ - function find(collection, callback, thisArg) { - callback = lodash.createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - if (callback(value, index, collection)) { - return value; - } - } - } else { - var result; - each(collection, function(value, index, collection) { - if (callback(value, index, collection)) { - result = value; - return false; - } - }); - return result; - } - } - - /** - * Iterates over a `collection`, executing the `callback` for each element in - * the `collection`. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). Callbacks may exit iteration early - * by explicitly returning `false`. - * - * @static - * @memberOf _ - * @alias each - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array|Object|String} Returns `collection`. - * @example - * - * _([1, 2, 3]).forEach(alert).join(','); - * // => alerts each number and returns '1,2,3' - * - * _.forEach({ 'one': 1, 'two': 2, 'three': 3 }, alert); - * // => alerts each number value (order is not guaranteed) - */ - function forEach(collection, callback, thisArg) { - if (callback && typeof thisArg == 'undefined' && isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if (callback(collection[index], index, collection) === false) { - break; - } - } - } else { - each(collection, callback, thisArg); - } - return collection; - } - - /** - * Creates an object composed of keys returned from running each element of the - * `collection` through the `callback`. The corresponding value of each key is - * an array of elements passed to `callback` that returned the key. The `callback` - * is bound to `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false` - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Object} Returns the composed aggregate object. - * @example - * - * _.groupBy([4.2, 6.1, 6.4], function(num) { return Math.floor(num); }); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * _.groupBy([4.2, 6.1, 6.4], function(num) { return this.floor(num); }, Math); - * // => { '4': [4.2], '6': [6.1, 6.4] } - * - * // using "_.pluck" callback shorthand - * _.groupBy(['one', 'two', 'three'], 'length'); - * // => { '3': ['one', 'two'], '5': ['three'] } - */ - function groupBy(collection, callback, thisArg) { - var result = {}; - callback = lodash.createCallback(callback, thisArg); - - forEach(collection, function(value, key, collection) { - key = String(callback(value, key, collection)); - (hasOwnProperty.call(result, key) ? result[key] : result[key] = []).push(value); - }); - return result; - } - - /** - * Invokes the method named by `methodName` on each element in the `collection`, - * returning an array of the results of each invoked method. Additional arguments - * will be passed to each invoked method. If `methodName` is a function, it will - * be invoked for, and `this` bound to, each element in the `collection`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|String} methodName The name of the method to invoke or - * the function invoked per iteration. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the method with. - * @returns {Array} Returns a new array of the results of each invoked method. - * @example - * - * _.invoke([[5, 1, 7], [3, 2, 1]], 'sort'); - * // => [[1, 5, 7], [1, 2, 3]] - * - * _.invoke([123, 456], String.prototype.split, ''); - * // => [['1', '2', '3'], ['4', '5', '6']] - */ - function invoke(collection, methodName) { - var args = slice(arguments, 2), - index = -1, - isFunc = typeof methodName == 'function', - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - forEach(collection, function(value) { - result[++index] = (isFunc ? methodName : value[methodName]).apply(value, args); - }); - return result; - } - - /** - * Creates an array of values by running each element in the `collection` - * through the `callback`. The `callback` is bound to `thisArg` and invoked with - * three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias collect - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of the results of each `callback` execution. - * @example - * - * _.map([1, 2, 3], function(num) { return num * 3; }); - * // => [3, 6, 9] - * - * _.map({ 'one': 1, 'two': 2, 'three': 3 }, function(num) { return num * 3; }); - * // => [3, 6, 9] (order is not guaranteed) - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * // using "_.pluck" callback shorthand - * _.map(stooges, 'name'); - * // => ['moe', 'larry'] - */ - function map(collection, callback, thisArg) { - var index = -1, - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - callback = lodash.createCallback(callback, thisArg); - if (isArray(collection)) { - while (++index < length) { - result[index] = callback(collection[index], index, collection); - } - } else { - each(collection, function(value, key, collection) { - result[++index] = callback(value, key, collection); - }); - } - return result; - } - - /** - * Retrieves the maximum value of an `array`. If `callback` is passed, - * it will be executed for each value in the `array` to generate the - * criterion by which the value is ranked. The `callback` is bound to - * `thisArg` and invoked with three arguments; (value, index, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the maximum value. - * @example - * - * _.max([4, 2, 8, 6]); - * // => 8 - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.max(stooges, function(stooge) { return stooge.age; }); - * // => { 'name': 'larry', 'age': 50 }; - * - * // using "_.pluck" callback shorthand - * _.max(stooges, 'age'); - * // => { 'name': 'larry', 'age': 50 }; - */ - function max(collection, callback, thisArg) { - var computed = -Infinity, - result = computed; - - if (!callback && isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - if (value > result) { - result = value; - } - } - } else { - callback = (!callback && isString(collection)) - ? charAtCallback - : lodash.createCallback(callback, thisArg); - - each(collection, function(value, index, collection) { - var current = callback(value, index, collection); - if (current > computed) { - computed = current; - result = value; - } - }); - } - return result; - } - - /** - * Retrieves the minimum value of an `array`. If `callback` is passed, - * it will be executed for each value in the `array` to generate the - * criterion by which the value is ranked. The `callback` is bound to `thisArg` - * and invoked with three arguments; (value, index, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the minimum value. - * @example - * - * _.min([4, 2, 8, 6]); - * // => 2 - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.min(stooges, function(stooge) { return stooge.age; }); - * // => { 'name': 'moe', 'age': 40 }; - * - * // using "_.pluck" callback shorthand - * _.min(stooges, 'age'); - * // => { 'name': 'moe', 'age': 40 }; - */ - function min(collection, callback, thisArg) { - var computed = Infinity, - result = computed; - - if (!callback && isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - var value = collection[index]; - if (value < result) { - result = value; - } - } - } else { - callback = (!callback && isString(collection)) - ? charAtCallback - : lodash.createCallback(callback, thisArg); - - each(collection, function(value, index, collection) { - var current = callback(value, index, collection); - if (current < computed) { - computed = current; - result = value; - } - }); - } - return result; - } - - /** - * Retrieves the value of a specified property from all elements in the `collection`. - * - * @static - * @memberOf _ - * @type Function - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {String} property The property to pluck. - * @returns {Array} Returns a new array of property values. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.pluck(stooges, 'name'); - * // => ['moe', 'larry'] - */ - var pluck = map; - - /** - * Reduces a `collection` to a value that is the accumulated result of running - * each element in the `collection` through the `callback`, where each successive - * `callback` execution consumes the return value of the previous execution. - * If `accumulator` is not passed, the first element of the `collection` will be - * used as the initial `accumulator` value. The `callback` is bound to `thisArg` - * and invoked with four arguments; (accumulator, value, index|key, collection). - * - * @static - * @memberOf _ - * @alias foldl, inject - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. - * @example - * - * var sum = _.reduce([1, 2, 3], function(sum, num) { - * return sum + num; - * }); - * // => 6 - * - * var mapped = _.reduce({ 'a': 1, 'b': 2, 'c': 3 }, function(result, num, key) { - * result[key] = num * 3; - * return result; - * }, {}); - * // => { 'a': 3, 'b': 6, 'c': 9 } - */ - function reduce(collection, callback, accumulator, thisArg) { - var noaccum = arguments.length < 3; - callback = lodash.createCallback(callback, thisArg, 4); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - if (noaccum) { - accumulator = collection[++index]; - } - while (++index < length) { - accumulator = callback(accumulator, collection[index], index, collection); - } - } else { - each(collection, function(value, index, collection) { - accumulator = noaccum - ? (noaccum = false, value) - : callback(accumulator, value, index, collection) - }); - } - return accumulator; - } - - /** - * This method is similar to `_.reduce`, except that it iterates over a - * `collection` from right to left. - * - * @static - * @memberOf _ - * @alias foldr - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function} [callback=identity] The function called per iteration. - * @param {Mixed} [accumulator] Initial value of the accumulator. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the accumulated value. - * @example - * - * var list = [[0, 1], [2, 3], [4, 5]]; - * var flat = _.reduceRight(list, function(a, b) { return a.concat(b); }, []); - * // => [4, 5, 2, 3, 0, 1] - */ - function reduceRight(collection, callback, accumulator, thisArg) { - var iterable = collection, - length = collection ? collection.length : 0, - noaccum = arguments.length < 3; - - if (typeof length != 'number') { - var props = keys(collection); - length = props.length; - } else if (support.unindexedChars && isString(collection)) { - iterable = collection.split(''); - } - callback = lodash.createCallback(callback, thisArg, 4); - forEach(collection, function(value, index, collection) { - index = props ? props[--length] : --length; - accumulator = noaccum - ? (noaccum = false, iterable[index]) - : callback(accumulator, iterable[index], index, collection); - }); - return accumulator; - } - - /** - * The opposite of `_.filter`, this method returns the elements of a - * `collection` that `callback` does **not** return truthy for. - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of elements that did **not** pass the - * callback check. - * @example - * - * var odds = _.reject([1, 2, 3, 4, 5, 6], function(num) { return num % 2 == 0; }); - * // => [1, 3, 5] - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } - * ]; - * - * // using "_.pluck" callback shorthand - * _.reject(food, 'organic'); - * // => [{ 'name': 'apple', 'organic': false, 'type': 'fruit' }] - * - * // using "_.where" callback shorthand - * _.reject(food, { 'type': 'fruit' }); - * // => [{ 'name': 'carrot', 'organic': true, 'type': 'vegetable' }] - */ - function reject(collection, callback, thisArg) { - callback = lodash.createCallback(callback, thisArg); - return filter(collection, function(value, index, collection) { - return !callback(value, index, collection); - }); - } - - /** - * Creates an array of shuffled `array` values, using a version of the - * Fisher-Yates shuffle. See http://en.wikipedia.org/wiki/Fisher-Yates_shuffle. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to shuffle. - * @returns {Array} Returns a new shuffled collection. - * @example - * - * _.shuffle([1, 2, 3, 4, 5, 6]); - * // => [4, 1, 6, 3, 5, 2] - */ - function shuffle(collection) { - var index = -1, - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - forEach(collection, function(value) { - var rand = floor(nativeRandom() * (++index + 1)); - result[index] = result[rand]; - result[rand] = value; - }); - return result; - } - - /** - * Gets the size of the `collection` by returning `collection.length` for arrays - * and array-like objects or the number of own enumerable properties for objects. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to inspect. - * @returns {Number} Returns `collection.length` or number of own enumerable properties. - * @example - * - * _.size([1, 2]); - * // => 2 - * - * _.size({ 'one': 1, 'two': 2, 'three': 3 }); - * // => 3 - * - * _.size('curly'); - * // => 5 - */ - function size(collection) { - var length = collection ? collection.length : 0; - return typeof length == 'number' ? length : keys(collection).length; - } - - /** - * Checks if the `callback` returns a truthy value for **any** element of a - * `collection`. The function returns as soon as it finds passing value, and - * does not iterate over the entire `collection`. The `callback` is bound to - * `thisArg` and invoked with three arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias any - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Boolean} Returns `true` if any element passes the callback check, - * else `false`. - * @example - * - * _.some([null, 0, 'yes', false], Boolean); - * // => true - * - * var food = [ - * { 'name': 'apple', 'organic': false, 'type': 'fruit' }, - * { 'name': 'carrot', 'organic': true, 'type': 'vegetable' } - * ]; - * - * // using "_.pluck" callback shorthand - * _.some(food, 'organic'); - * // => true - * - * // using "_.where" callback shorthand - * _.some(food, { 'type': 'meat' }); - * // => false - */ - function some(collection, callback, thisArg) { - var result; - callback = lodash.createCallback(callback, thisArg); - - if (isArray(collection)) { - var index = -1, - length = collection.length; - - while (++index < length) { - if ((result = callback(collection[index], index, collection))) { - break; - } - } - } else { - each(collection, function(value, index, collection) { - return !(result = callback(value, index, collection)); - }); - } - return !!result; - } - - /** - * Creates an array of elements, sorted in ascending order by the results of - * running each element in the `collection` through the `callback`. This method - * performs a stable sort, that is, it will preserve the original sort order of - * equal elements. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index|key, collection). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new array of sorted elements. - * @example - * - * _.sortBy([1, 2, 3], function(num) { return Math.sin(num); }); - * // => [3, 1, 2] - * - * _.sortBy([1, 2, 3], function(num) { return this.sin(num); }, Math); - * // => [3, 1, 2] - * - * // using "_.pluck" callback shorthand - * _.sortBy(['banana', 'strawberry', 'apple'], 'length'); - * // => ['apple', 'banana', 'strawberry'] - */ - function sortBy(collection, callback, thisArg) { - var index = -1, - length = collection ? collection.length : 0, - result = Array(typeof length == 'number' ? length : 0); - - callback = lodash.createCallback(callback, thisArg); - forEach(collection, function(value, key, collection) { - result[++index] = { - 'criteria': callback(value, key, collection), - 'index': index, - 'value': value - }; - }); - - length = result.length; - result.sort(compareAscending); - while (length--) { - result[length] = result[length].value; - } - return result; - } - - /** - * Converts the `collection` to an array. - * - * @static - * @memberOf _ - * @category Collections - * @param {Array|Object|String} collection The collection to convert. - * @returns {Array} Returns the new converted array. - * @example - * - * (function() { return _.toArray(arguments).slice(1); })(1, 2, 3, 4); - * // => [2, 3, 4] - */ - function toArray(collection) { - if (collection && typeof collection.length == 'number') { - return (support.unindexedChars && isString(collection)) - ? collection.split('') - : slice(collection); - } - return values(collection); - } - - /** - * Examines each element in a `collection`, returning an array of all elements - * that have the given `properties`. When checking `properties`, this method - * performs a deep comparison between values to determine if they are equivalent - * to each other. - * - * @static - * @memberOf _ - * @type Function - * @category Collections - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Object} properties The object of property values to filter by. - * @returns {Array} Returns a new array of elements that have the given `properties`. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * _.where(stooges, { 'age': 40 }); - * // => [{ 'name': 'moe', 'age': 40 }] - */ - var where = filter; - - /*--------------------------------------------------------------------------*/ - - /** - * Creates an array with all falsey values of `array` removed. The values - * `false`, `null`, `0`, `""`, `undefined` and `NaN` are all falsey. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to compact. - * @returns {Array} Returns a new filtered array. - * @example - * - * _.compact([0, 1, false, 2, '', 3]); - * // => [1, 2, 3] - */ - function compact(array) { - var index = -1, - length = array ? array.length : 0, - result = []; - - while (++index < length) { - var value = array[index]; - if (value) { - result.push(value); - } - } - return result; - } - - /** - * Creates an array of `array` elements not present in the other arrays - * using strict equality for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to process. - * @param {Array} [array1, array2, ...] Arrays to check. - * @returns {Array} Returns a new array of `array` elements not present in the - * other arrays. - * @example - * - * _.difference([1, 2, 3, 4, 5], [5, 2, 10]); - * // => [1, 3, 4] - */ - function difference(array) { - var index = -1, - length = array ? array.length : 0, - flattened = concat.apply(arrayRef, arguments), - contains = cachedContains(flattened, length, 100), - result = []; - - while (++index < length) { - var value = array[index]; - if (!contains(value)) { - result.push(value); - } - } - return result; - } - - /** - * This method is similar to `_.find`, except that it returns the index of - * the element that passes the callback check, instead of the element itself. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array|Object|String} collection The collection to iterate over. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the index of the found element, else `-1`. - * @example - * - * _.findIndex(['apple', 'banana', 'beet'], function(food) { return /^b/.test(food); }); - * // => 1 - */ - function findIndex(collection, callback, thisArg) { - var index = -1, - length = collection ? collection.length : 0; - - callback = lodash.createCallback(callback, thisArg); - while (++index < length) { - if (callback(collection[index], index, collection)) { - return index; - } - } - return -1; - } - - /** - * Gets the first element of the `array`. If a number `n` is passed, the first - * `n` elements of the `array` are returned. If a `callback` function is passed, - * elements at the beginning of the array are returned as long as the `callback` - * returns truthy. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias head, take - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called - * per element or the number of elements to return. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the first element(s) of `array`. - * @example - * - * _.first([1, 2, 3]); - * // => 1 - * - * _.first([1, 2, 3], 2); - * // => [1, 2] - * - * _.first([1, 2, 3], function(num) { - * return num < 3; - * }); - * // => [1, 2] - * - * var food = [ - * { 'name': 'banana', 'organic': true }, - * { 'name': 'beet', 'organic': false }, - * ]; - * - * // using "_.pluck" callback shorthand - * _.first(food, 'organic'); - * // => [{ 'name': 'banana', 'organic': true }] - * - * var food = [ - * { 'name': 'apple', 'type': 'fruit' }, - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.first(food, { 'type': 'fruit' }); - * // => [{ 'name': 'apple', 'type': 'fruit' }, { 'name': 'banana', 'type': 'fruit' }] - */ - function first(array, callback, thisArg) { - if (array) { - var n = 0, - length = array.length; - - if (typeof callback != 'number' && callback != null) { - var index = -1; - callback = lodash.createCallback(callback, thisArg); - while (++index < length && callback(array[index], index, array)) { - n++; - } - } else { - n = callback; - if (n == null || thisArg) { - return array[0]; - } - } - return slice(array, 0, nativeMin(nativeMax(0, n), length)); - } - } - - /** - * Flattens a nested array (the nesting can be to any depth). If `isShallow` - * is truthy, `array` will only be flattened a single level. If `callback` - * is passed, each element of `array` is passed through a callback` before - * flattening. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to compact. - * @param {Boolean} [isShallow=false] A flag to indicate only flattening a single level. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a new flattened array. - * @example - * - * _.flatten([1, [2], [3, [[4]]]]); - * // => [1, 2, 3, 4]; - * - * _.flatten([1, [2], [3, [[4]]]], true); - * // => [1, 2, 3, [[4]]]; - * - * var stooges = [ - * { 'name': 'curly', 'quotes': ['Oh, a wise guy, eh?', 'Poifect!'] }, - * { 'name': 'moe', 'quotes': ['Spread out!', 'You knucklehead!'] } - * ]; - * - * // using "_.pluck" callback shorthand - * _.flatten(stooges, 'quotes'); - * // => ['Oh, a wise guy, eh?', 'Poifect!', 'Spread out!', 'You knucklehead!'] - */ - function flatten(array, isShallow, callback, thisArg) { - var index = -1, - length = array ? array.length : 0, - result = []; - - // juggle arguments - if (typeof isShallow != 'boolean' && isShallow != null) { - thisArg = callback; - callback = isShallow; - isShallow = false; - } - if (callback != null) { - callback = lodash.createCallback(callback, thisArg); - } - while (++index < length) { - var value = array[index]; - if (callback) { - value = callback(value, index, array); - } - // recursively flatten arrays (susceptible to call stack limits) - if (isArray(value)) { - push.apply(result, isShallow ? value : flatten(value)); - } else { - result.push(value); - } - } - return result; - } - - /** - * Gets the index at which the first occurrence of `value` is found using - * strict equality for comparisons, i.e. `===`. If the `array` is already - * sorted, passing `true` for `fromIndex` will run a faster binary search. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Boolean|Number} [fromIndex=0] The index to search from or `true` to - * perform a binary search on a sorted `array`. - * @returns {Number} Returns the index of the matched value or `-1`. - * @example - * - * _.indexOf([1, 2, 3, 1, 2, 3], 2); - * // => 1 - * - * _.indexOf([1, 2, 3, 1, 2, 3], 2, 3); - * // => 4 - * - * _.indexOf([1, 1, 2, 2, 3, 3], 2, true); - * // => 2 - */ - function indexOf(array, value, fromIndex) { - var index = -1, - length = array ? array.length : 0; - - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(0, length + fromIndex) : fromIndex || 0) - 1; - } else if (fromIndex) { - index = sortedIndex(array, value); - return array[index] === value ? index : -1; - } - while (++index < length) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Gets all but the last element of `array`. If a number `n` is passed, the - * last `n` elements are excluded from the result. If a `callback` function - * is passed, elements at the end of the array are excluded from the result - * as long as the `callback` returns truthy. The `callback` is bound to - * `thisArg` and invoked with three arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called - * per element or the number of elements to exclude. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. - * @example - * - * _.initial([1, 2, 3]); - * // => [1, 2] - * - * _.initial([1, 2, 3], 2); - * // => [1] - * - * _.initial([1, 2, 3], function(num) { - * return num > 1; - * }); - * // => [1] - * - * var food = [ - * { 'name': 'beet', 'organic': false }, - * { 'name': 'carrot', 'organic': true } - * ]; - * - * // using "_.pluck" callback shorthand - * _.initial(food, 'organic'); - * // => [{ 'name': 'beet', 'organic': false }] - * - * var food = [ - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' }, - * { 'name': 'carrot', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.initial(food, { 'type': 'vegetable' }); - * // => [{ 'name': 'banana', 'type': 'fruit' }] - */ - function initial(array, callback, thisArg) { - if (!array) { - return []; - } - var n = 0, - length = array.length; - - if (typeof callback != 'number' && callback != null) { - var index = length; - callback = lodash.createCallback(callback, thisArg); - while (index-- && callback(array[index], index, array)) { - n++; - } - } else { - n = (callback == null || thisArg) ? 1 : callback || n; - } - return slice(array, 0, nativeMin(nativeMax(0, length - n), length)); - } - - /** - * Computes the intersection of all the passed-in arrays using strict equality - * for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of unique elements that are present - * in **all** of the arrays. - * @example - * - * _.intersection([1, 2, 3], [101, 2, 1, 10], [2, 1]); - * // => [1, 2] - */ - function intersection(array) { - var args = arguments, - argsLength = args.length, - cache = { '0': {} }, - index = -1, - length = array ? array.length : 0, - isLarge = length >= 100, - result = [], - seen = result; - - outer: - while (++index < length) { - var value = array[index]; - if (isLarge) { - var key = String(value); - var inited = hasOwnProperty.call(cache[0], key) - ? !(seen = cache[0][key]) - : (seen = cache[0][key] = []); - } - if (inited || indexOf(seen, value) < 0) { - if (isLarge) { - seen.push(value); - } - var argsIndex = argsLength; - while (--argsIndex) { - if (!(cache[argsIndex] || (cache[argsIndex] = cachedContains(args[argsIndex], 0, 100)))(value)) { - continue outer; - } - } - result.push(value); - } - } - return result; - } - - /** - * Gets the last element of the `array`. If a number `n` is passed, the - * last `n` elements of the `array` are returned. If a `callback` function - * is passed, elements at the end of the array are returned as long as the - * `callback` returns truthy. The `callback` is bound to `thisArg` and - * invoked with three arguments;(value, index, array). - * - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n] The function called - * per element or the number of elements to return. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Mixed} Returns the last element(s) of `array`. - * @example - * - * _.last([1, 2, 3]); - * // => 3 - * - * _.last([1, 2, 3], 2); - * // => [2, 3] - * - * _.last([1, 2, 3], function(num) { - * return num > 1; - * }); - * // => [2, 3] - * - * var food = [ - * { 'name': 'beet', 'organic': false }, - * { 'name': 'carrot', 'organic': true } - * ]; - * - * // using "_.pluck" callback shorthand - * _.last(food, 'organic'); - * // => [{ 'name': 'carrot', 'organic': true }] - * - * var food = [ - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' }, - * { 'name': 'carrot', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.last(food, { 'type': 'vegetable' }); - * // => [{ 'name': 'beet', 'type': 'vegetable' }, { 'name': 'carrot', 'type': 'vegetable' }] - */ - function last(array, callback, thisArg) { - if (array) { - var n = 0, - length = array.length; - - if (typeof callback != 'number' && callback != null) { - var index = length; - callback = lodash.createCallback(callback, thisArg); - while (index-- && callback(array[index], index, array)) { - n++; - } - } else { - n = callback; - if (n == null || thisArg) { - return array[length - 1]; - } - } - return slice(array, nativeMax(0, length - n)); - } - } - - /** - * Gets the index at which the last occurrence of `value` is found using strict - * equality for comparisons, i.e. `===`. If `fromIndex` is negative, it is used - * as the offset from the end of the collection. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to search. - * @param {Mixed} value The value to search for. - * @param {Number} [fromIndex=array.length-1] The index to search from. - * @returns {Number} Returns the index of the matched value or `-1`. - * @example - * - * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2); - * // => 4 - * - * _.lastIndexOf([1, 2, 3, 1, 2, 3], 2, 3); - * // => 1 - */ - function lastIndexOf(array, value, fromIndex) { - var index = array ? array.length : 0; - if (typeof fromIndex == 'number') { - index = (fromIndex < 0 ? nativeMax(0, index + fromIndex) : nativeMin(fromIndex, index - 1)) + 1; - } - while (index--) { - if (array[index] === value) { - return index; - } - } - return -1; - } - - /** - * Creates an array of numbers (positive and/or negative) progressing from - * `start` up to but not including `end`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Number} [start=0] The start of the range. - * @param {Number} end The end of the range. - * @param {Number} [step=1] The value to increment or decrement by. - * @returns {Array} Returns a new range array. - * @example - * - * _.range(10); - * // => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] - * - * _.range(1, 11); - * // => [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] - * - * _.range(0, 30, 5); - * // => [0, 5, 10, 15, 20, 25] - * - * _.range(0, -10, -1); - * // => [0, -1, -2, -3, -4, -5, -6, -7, -8, -9] - * - * _.range(0); - * // => [] - */ - function range(start, end, step) { - start = +start || 0; - step = +step || 1; - - if (end == null) { - end = start; - start = 0; - } - // use `Array(length)` so V8 will avoid the slower "dictionary" mode - // http://youtu.be/XAqIpGU8ZZk#t=17m25s - var index = -1, - length = nativeMax(0, ceil((end - start) / step)), - result = Array(length); - - while (++index < length) { - result[index] = start; - start += step; - } - return result; - } - - /** - * The opposite of `_.initial`, this method gets all but the first value of - * `array`. If a number `n` is passed, the first `n` values are excluded from - * the result. If a `callback` function is passed, elements at the beginning - * of the array are excluded from the result as long as the `callback` returns - * truthy. The `callback` is bound to `thisArg` and invoked with three - * arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias drop, tail - * @category Arrays - * @param {Array} array The array to query. - * @param {Function|Object|Number|String} [callback|n=1] The function called - * per element or the number of elements to exclude. If a property name or - * object is passed, it will be used to create a "_.pluck" or "_.where" - * style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a slice of `array`. - * @example - * - * _.rest([1, 2, 3]); - * // => [2, 3] - * - * _.rest([1, 2, 3], 2); - * // => [3] - * - * _.rest([1, 2, 3], function(num) { - * return num < 3; - * }); - * // => [3] - * - * var food = [ - * { 'name': 'banana', 'organic': true }, - * { 'name': 'beet', 'organic': false }, - * ]; - * - * // using "_.pluck" callback shorthand - * _.rest(food, 'organic'); - * // => [{ 'name': 'beet', 'organic': false }] - * - * var food = [ - * { 'name': 'apple', 'type': 'fruit' }, - * { 'name': 'banana', 'type': 'fruit' }, - * { 'name': 'beet', 'type': 'vegetable' } - * ]; - * - * // using "_.where" callback shorthand - * _.rest(food, { 'type': 'fruit' }); - * // => [{ 'name': 'beet', 'type': 'vegetable' }] - */ - function rest(array, callback, thisArg) { - if (typeof callback != 'number' && callback != null) { - var n = 0, - index = -1, - length = array ? array.length : 0; - - callback = lodash.createCallback(callback, thisArg); - while (++index < length && callback(array[index], index, array)) { - n++; - } - } else { - n = (callback == null || thisArg) ? 1 : nativeMax(0, callback); - } - return slice(array, n); - } - - /** - * Uses a binary search to determine the smallest index at which the `value` - * should be inserted into `array` in order to maintain the sort order of the - * sorted `array`. If `callback` is passed, it will be executed for `value` and - * each element in `array` to compute their sort ranking. The `callback` is - * bound to `thisArg` and invoked with one argument; (value). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to iterate over. - * @param {Mixed} value The value to evaluate. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Number} Returns the index at which the value should be inserted - * into `array`. - * @example - * - * _.sortedIndex([20, 30, 50], 40); - * // => 2 - * - * // using "_.pluck" callback shorthand - * _.sortedIndex([{ 'x': 20 }, { 'x': 30 }, { 'x': 50 }], { 'x': 40 }, 'x'); - * // => 2 - * - * var dict = { - * 'wordToNumber': { 'twenty': 20, 'thirty': 30, 'fourty': 40, 'fifty': 50 } - * }; - * - * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { - * return dict.wordToNumber[word]; - * }); - * // => 2 - * - * _.sortedIndex(['twenty', 'thirty', 'fifty'], 'fourty', function(word) { - * return this.wordToNumber[word]; - * }, dict); - * // => 2 - */ - function sortedIndex(array, value, callback, thisArg) { - var low = 0, - high = array ? array.length : low; - - // explicitly reference `identity` for better inlining in Firefox - callback = callback ? lodash.createCallback(callback, thisArg, 1) : identity; - value = callback(value); - - while (low < high) { - var mid = (low + high) >>> 1; - (callback(array[mid]) < value) - ? low = mid + 1 - : high = mid; - } - return low; - } - - /** - * Computes the union of the passed-in arrays using strict equality for - * comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of unique values, in order, that are - * present in one or more of the arrays. - * @example - * - * _.union([1, 2, 3], [101, 2, 1, 10], [2, 1]); - * // => [1, 2, 3, 101, 10] - */ - function union() { - return uniq(concat.apply(arrayRef, arguments)); - } - - /** - * Creates a duplicate-value-free version of the `array` using strict equality - * for comparisons, i.e. `===`. If the `array` is already sorted, passing `true` - * for `isSorted` will run a faster algorithm. If `callback` is passed, each - * element of `array` is passed through a callback` before uniqueness is computed. - * The `callback` is bound to `thisArg` and invoked with three arguments; (value, index, array). - * - * If a property name is passed for `callback`, the created "_.pluck" style - * callback will return the property value of the given element. - * - * If an object is passed for `callback`, the created "_.where" style callback - * will return `true` for elements that have the properties of the given object, - * else `false`. - * - * @static - * @memberOf _ - * @alias unique - * @category Arrays - * @param {Array} array The array to process. - * @param {Boolean} [isSorted=false] A flag to indicate that the `array` is already sorted. - * @param {Function|Object|String} [callback=identity] The function called per - * iteration. If a property name or object is passed, it will be used to create - * a "_.pluck" or "_.where" style callback, respectively. - * @param {Mixed} [thisArg] The `this` binding of `callback`. - * @returns {Array} Returns a duplicate-value-free array. - * @example - * - * _.uniq([1, 2, 1, 3, 1]); - * // => [1, 2, 3] - * - * _.uniq([1, 1, 2, 2, 3], true); - * // => [1, 2, 3] - * - * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return Math.floor(num); }); - * // => [1, 2, 3] - * - * _.uniq([1, 2, 1.5, 3, 2.5], function(num) { return this.floor(num); }, Math); - * // => [1, 2, 3] - * - * // using "_.pluck" callback shorthand - * _.uniq([{ 'x': 1 }, { 'x': 2 }, { 'x': 1 }], 'x'); - * // => [{ 'x': 1 }, { 'x': 2 }] - */ - function uniq(array, isSorted, callback, thisArg) { - var index = -1, - length = array ? array.length : 0, - result = [], - seen = result; - - // juggle arguments - if (typeof isSorted != 'boolean' && isSorted != null) { - thisArg = callback; - callback = isSorted; - isSorted = false; - } - // init value cache for large arrays - var isLarge = !isSorted && length >= 75; - if (isLarge) { - var cache = {}; - } - if (callback != null) { - seen = []; - callback = lodash.createCallback(callback, thisArg); - } - while (++index < length) { - var value = array[index], - computed = callback ? callback(value, index, array) : value; - - if (isLarge) { - var key = String(computed); - var inited = hasOwnProperty.call(cache, key) - ? !(seen = cache[key]) - : (seen = cache[key] = []); - } - if (isSorted - ? !index || seen[seen.length - 1] !== computed - : inited || indexOf(seen, computed) < 0 - ) { - if (callback || isLarge) { - seen.push(computed); - } - result.push(value); - } - } - return result; - } - - /** - * Creates an array with all occurrences of the passed values removed using - * strict equality for comparisons, i.e. `===`. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} array The array to filter. - * @param {Mixed} [value1, value2, ...] Values to remove. - * @returns {Array} Returns a new filtered array. - * @example - * - * _.without([1, 2, 1, 0, 3, 1, 4], 0, 1); - * // => [2, 3, 4] - */ - function without(array) { - var index = -1, - length = array ? array.length : 0, - contains = cachedContains(arguments, 1, 30), - result = []; - - while (++index < length) { - var value = array[index]; - if (!contains(value)) { - result.push(value); - } - } - return result; - } - - /** - * Groups the elements of each array at their corresponding indexes. Useful for - * separate data sources that are coordinated through matching array indexes. - * For a matrix of nested arrays, `_.zip.apply(...)` can transpose the matrix - * in a similar fashion. - * - * @static - * @memberOf _ - * @category Arrays - * @param {Array} [array1, array2, ...] Arrays to process. - * @returns {Array} Returns a new array of grouped elements. - * @example - * - * _.zip(['moe', 'larry'], [30, 40], [true, false]); - * // => [['moe', 30, true], ['larry', 40, false]] - */ - function zip(array) { - var index = -1, - length = array ? max(pluck(arguments, 'length')) : 0, - result = Array(length); - - while (++index < length) { - result[index] = pluck(arguments, index); - } - return result; - } - - /** - * Creates an object composed from arrays of `keys` and `values`. Pass either - * a single two dimensional array, i.e. `[[key1, value1], [key2, value2]]`, or - * two arrays, one of `keys` and one of corresponding `values`. - * - * @static - * @memberOf _ - * @alias object - * @category Arrays - * @param {Array} keys The array of keys. - * @param {Array} [values=[]] The array of values. - * @returns {Object} Returns an object composed of the given keys and - * corresponding values. - * @example - * - * _.zipObject(['moe', 'larry'], [30, 40]); - * // => { 'moe': 30, 'larry': 40 } - */ - function zipObject(keys, values) { - var index = -1, - length = keys ? keys.length : 0, - result = {}; - - while (++index < length) { - var key = keys[index]; - if (values) { - result[key] = values[index]; - } else { - result[key[0]] = key[1]; - } - } - return result; - } - - /*--------------------------------------------------------------------------*/ - - /** - * If `n` is greater than `0`, a function is created that is restricted to - * executing `func`, with the `this` binding and arguments of the created - * function, only after it is called `n` times. If `n` is less than `1`, - * `func` is executed immediately, without a `this` binding or additional - * arguments, and its result is returned. - * - * @static - * @memberOf _ - * @category Functions - * @param {Number} n The number of times the function must be called before - * it is executed. - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var renderNotes = _.after(notes.length, render); - * _.forEach(notes, function(note) { - * note.asyncSave({ 'success': renderNotes }); - * }); - * // `renderNotes` is run once, after all notes have saved - */ - function after(n, func) { - if (n < 1) { - return func(); - } - return function() { - if (--n < 1) { - return func.apply(this, arguments); - } - }; - } - - /** - * Creates a function that, when called, invokes `func` with the `this` - * binding of `thisArg` and prepends any additional `bind` arguments to those - * passed to the bound function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to bind. - * @param {Mixed} [thisArg] The `this` binding of `func`. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var func = function(greeting) { - * return greeting + ' ' + this.name; - * }; - * - * func = _.bind(func, { 'name': 'moe' }, 'hi'); - * func(); - * // => 'hi moe' - */ - function bind(func, thisArg) { - // use `Function#bind` if it exists and is fast - // (in V8 `Function#bind` is slower except when partially applied) - return support.fastBind || (nativeBind && arguments.length > 2) - ? nativeBind.call.apply(nativeBind, arguments) - : createBound(func, thisArg, slice(arguments, 2)); - } - - /** - * Binds methods on `object` to `object`, overwriting the existing method. - * Method names may be specified as individual arguments or as arrays of method - * names. If no method names are provided, all the function properties of `object` - * will be bound. - * - * @static - * @memberOf _ - * @category Functions - * @param {Object} object The object to bind and assign the bound methods to. - * @param {String} [methodName1, methodName2, ...] Method names on the object to bind. - * @returns {Object} Returns `object`. - * @example - * - * var view = { - * 'label': 'docs', - * 'onClick': function() { alert('clicked ' + this.label); } - * }; - * - * _.bindAll(view); - * jQuery('#docs').on('click', view.onClick); - * // => alerts 'clicked docs', when the button is clicked - */ - function bindAll(object) { - var funcs = concat.apply(arrayRef, arguments), - index = funcs.length > 1 ? 0 : (funcs = functions(object), -1), - length = funcs.length; - - while (++index < length) { - var key = funcs[index]; - object[key] = bind(object[key], object); - } - return object; - } - - /** - * Creates a function that, when called, invokes the method at `object[key]` - * and prepends any additional `bindKey` arguments to those passed to the bound - * function. This method differs from `_.bind` by allowing bound functions to - * reference methods that will be redefined or don't yet exist. - * See http://michaux.ca/articles/lazy-function-definition-pattern. - * - * @static - * @memberOf _ - * @category Functions - * @param {Object} object The object the method belongs to. - * @param {String} key The key of the method. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new bound function. - * @example - * - * var object = { - * 'name': 'moe', - * 'greet': function(greeting) { - * return greeting + ' ' + this.name; - * } - * }; - * - * var func = _.bindKey(object, 'greet', 'hi'); - * func(); - * // => 'hi moe' - * - * object.greet = function(greeting) { - * return greeting + ', ' + this.name + '!'; - * }; - * - * func(); - * // => 'hi, moe!' - */ - function bindKey(object, key) { - return createBound(object, key, slice(arguments, 2), indicatorObject); - } - - /** - * Creates a function that is the composition of the passed functions, - * where each function consumes the return value of the function that follows. - * For example, composing the functions `f()`, `g()`, and `h()` produces `f(g(h()))`. - * Each function is executed with the `this` binding of the composed function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} [func1, func2, ...] Functions to compose. - * @returns {Function} Returns the new composed function. - * @example - * - * var greet = function(name) { return 'hi ' + name; }; - * var exclaim = function(statement) { return statement + '!'; }; - * var welcome = _.compose(exclaim, greet); - * welcome('moe'); - * // => 'hi moe!' - */ - function compose() { - var funcs = arguments; - return function() { - var args = arguments, - length = funcs.length; - - while (length--) { - args = [funcs[length].apply(this, args)]; - } - return args[0]; - }; - } - - /** - * Produces a callback bound to an optional `thisArg`. If `func` is a property - * name, the created callback will return the property value for a given element. - * If `func` is an object, the created callback will return `true` for elements - * that contain the equivalent object properties, otherwise it will return `false`. - * - * Note: All Lo-Dash methods, that accept a `callback` argument, use `_.createCallback`. - * - * @static - * @memberOf _ - * @category Functions - * @param {Mixed} [func=identity] The value to convert to a callback. - * @param {Mixed} [thisArg] The `this` binding of the created callback. - * @param {Number} [argCount=3] The number of arguments the callback accepts. - * @returns {Function} Returns a callback function. - * @example - * - * var stooges = [ - * { 'name': 'moe', 'age': 40 }, - * { 'name': 'larry', 'age': 50 } - * ]; - * - * // wrap to create custom callback shorthands - * _.createCallback = _.wrap(_.createCallback, function(func, callback, thisArg) { - * var match = /^(.+?)__([gl]t)(.+)$/.exec(callback); - * return !match ? func(callback, thisArg) : function(object) { - * return match[2] == 'gt' ? object[match[1]] > match[3] : object[match[1]] < match[3]; - * }; - * }); - * - * _.filter(stooges, 'age__gt45'); - * // => [{ 'name': 'larry', 'age': 50 }] - * - * // create mixins with support for "_.pluck" and "_.where" callback shorthands - * _.mixin({ - * 'toLookup': function(collection, callback, thisArg) { - * callback = _.createCallback(callback, thisArg); - * return _.reduce(collection, function(result, value, index, collection) { - * return (result[callback(value, index, collection)] = value, result); - * }, {}); - * } - * }); - * - * _.toLookup(stooges, 'name'); - * // => { 'moe': { 'name': 'moe', 'age': 40 }, 'larry': { 'name': 'larry', 'age': 50 } } - */ - function createCallback(func, thisArg, argCount) { - if (func == null) { - return identity; - } - var type = typeof func; - if (type != 'function') { - if (type != 'object') { - return function(object) { - return object[func]; - }; - } - var props = keys(func); - return function(object) { - var length = props.length, - result = false; - while (length--) { - if (!(result = isEqual(object[props[length]], func[props[length]], indicatorObject))) { - break; - } - } - return result; - }; - } - if (typeof thisArg != 'undefined') { - if (argCount === 1) { - return function(value) { - return func.call(thisArg, value); - }; - } - if (argCount === 2) { - return function(a, b) { - return func.call(thisArg, a, b); - }; - } - if (argCount === 4) { - return function(accumulator, value, index, collection) { - return func.call(thisArg, accumulator, value, index, collection); - }; - } - return function(value, index, collection) { - return func.call(thisArg, value, index, collection); - }; - } - return func; - } - - /** - * Creates a function that will delay the execution of `func` until after - * `wait` milliseconds have elapsed since the last time it was invoked. Pass - * `true` for `immediate` to cause debounce to invoke `func` on the leading, - * instead of the trailing, edge of the `wait` timeout. Subsequent calls to - * the debounced function will return the result of the last `func` call. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to debounce. - * @param {Number} wait The number of milliseconds to delay. - * @param {Boolean} immediate A flag to indicate execution is on the leading - * edge of the timeout. - * @returns {Function} Returns the new debounced function. - * @example - * - * var lazyLayout = _.debounce(calculateLayout, 300); - * jQuery(window).on('resize', lazyLayout); - */ - function debounce(func, wait, immediate) { - var args, - result, - thisArg, - timeoutId; - - function delayed() { - timeoutId = null; - if (!immediate) { - result = func.apply(thisArg, args); - } - } - return function() { - var isImmediate = immediate && !timeoutId; - args = arguments; - thisArg = this; - - clearTimeout(timeoutId); - timeoutId = setTimeout(delayed, wait); - - if (isImmediate) { - result = func.apply(thisArg, args); - } - return result; - }; - } - - /** - * Defers executing the `func` function until the current call stack has cleared. - * Additional arguments will be passed to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to defer. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. - * @example - * - * _.defer(function() { alert('deferred'); }); - * // returns from the function before `alert` is called - */ - function defer(func) { - var args = slice(arguments, 1); - return setTimeout(function() { func.apply(undefined, args); }, 1); - } - // use `setImmediate` if it's available in Node.js - if (isV8 && freeModule && typeof setImmediate == 'function') { - defer = bind(setImmediate, context); - } - - /** - * Executes the `func` function after `wait` milliseconds. Additional arguments - * will be passed to `func` when it is invoked. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to delay. - * @param {Number} wait The number of milliseconds to delay execution. - * @param {Mixed} [arg1, arg2, ...] Arguments to invoke the function with. - * @returns {Number} Returns the timer id. - * @example - * - * var log = _.bind(console.log, console); - * _.delay(log, 1000, 'logged later'); - * // => 'logged later' (Appears after one second.) - */ - function delay(func, wait) { - var args = slice(arguments, 2); - return setTimeout(function() { func.apply(undefined, args); }, wait); - } - - /** - * Creates a function that memoizes the result of `func`. If `resolver` is - * passed, it will be used to determine the cache key for storing the result - * based on the arguments passed to the memoized function. By default, the first - * argument passed to the memoized function is used as the cache key. The `func` - * is executed with the `this` binding of the memoized function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to have its output memoized. - * @param {Function} [resolver] A function used to resolve the cache key. - * @returns {Function} Returns the new memoizing function. - * @example - * - * var fibonacci = _.memoize(function(n) { - * return n < 2 ? n : fibonacci(n - 1) + fibonacci(n - 2); - * }); - */ - function memoize(func, resolver) { - var cache = {}; - return function() { - var key = String(resolver ? resolver.apply(this, arguments) : arguments[0]); - return hasOwnProperty.call(cache, key) - ? cache[key] - : (cache[key] = func.apply(this, arguments)); - }; - } - - /** - * Creates a function that is restricted to execute `func` once. Repeat calls to - * the function will return the value of the first call. The `func` is executed - * with the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to restrict. - * @returns {Function} Returns the new restricted function. - * @example - * - * var initialize = _.once(createApplication); - * initialize(); - * initialize(); - * // `initialize` executes `createApplication` once - */ - function once(func) { - var ran, - result; - - return function() { - if (ran) { - return result; - } - ran = true; - result = func.apply(this, arguments); - - // clear the `func` variable so the function may be garbage collected - func = null; - return result; - }; - } - - /** - * Creates a function that, when called, invokes `func` with any additional - * `partial` arguments prepended to those passed to the new function. This - * method is similar to `_.bind`, except it does **not** alter the `this` binding. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var greet = function(greeting, name) { return greeting + ' ' + name; }; - * var hi = _.partial(greet, 'hi'); - * hi('moe'); - * // => 'hi moe' - */ - function partial(func) { - return createBound(func, slice(arguments, 1)); - } - - /** - * This method is similar to `_.partial`, except that `partial` arguments are - * appended to those passed to the new function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to partially apply arguments to. - * @param {Mixed} [arg1, arg2, ...] Arguments to be partially applied. - * @returns {Function} Returns the new partially applied function. - * @example - * - * var defaultsDeep = _.partialRight(_.merge, _.defaults); - * - * var options = { - * 'variable': 'data', - * 'imports': { 'jq': $ } - * }; - * - * defaultsDeep(options, _.templateSettings); - * - * options.variable - * // => 'data' - * - * options.imports - * // => { '_': _, 'jq': $ } - */ - function partialRight(func) { - return createBound(func, slice(arguments, 1), null, indicatorObject); - } - - /** - * Creates a function that, when executed, will only call the `func` - * function at most once per every `wait` milliseconds. If the throttled - * function is invoked more than once during the `wait` timeout, `func` will - * also be called on the trailing edge of the timeout. Subsequent calls to the - * throttled function will return the result of the last `func` call. - * - * @static - * @memberOf _ - * @category Functions - * @param {Function} func The function to throttle. - * @param {Number} wait The number of milliseconds to throttle executions to. - * @returns {Function} Returns the new throttled function. - * @example - * - * var throttled = _.throttle(updatePosition, 100); - * jQuery(window).on('scroll', throttled); - */ - function throttle(func, wait) { - var args, - result, - thisArg, - timeoutId, - lastCalled = 0; - - function trailingCall() { - lastCalled = new Date; - timeoutId = null; - result = func.apply(thisArg, args); - } - return function() { - var now = new Date, - remaining = wait - (now - lastCalled); - - args = arguments; - thisArg = this; - - if (remaining <= 0) { - clearTimeout(timeoutId); - timeoutId = null; - lastCalled = now; - result = func.apply(thisArg, args); - } - else if (!timeoutId) { - timeoutId = setTimeout(trailingCall, remaining); - } - return result; - }; - } - - /** - * Creates a function that passes `value` to the `wrapper` function as its - * first argument. Additional arguments passed to the function are appended - * to those passed to the `wrapper` function. The `wrapper` is executed with - * the `this` binding of the created function. - * - * @static - * @memberOf _ - * @category Functions - * @param {Mixed} value The value to wrap. - * @param {Function} wrapper The wrapper function. - * @returns {Function} Returns the new function. - * @example - * - * var hello = function(name) { return 'hello ' + name; }; - * hello = _.wrap(hello, function(func) { - * return 'before, ' + func('moe') + ', after'; - * }); - * hello(); - * // => 'before, hello moe, after' - */ - function wrap(value, wrapper) { - return function() { - var args = [value]; - push.apply(args, arguments); - return wrapper.apply(this, args); - }; - } - - /*--------------------------------------------------------------------------*/ - - /** - * Converts the characters `&`, `<`, `>`, `"`, and `'` in `string` to their - * corresponding HTML entities. - * - * @static - * @memberOf _ - * @category Utilities - * @param {String} string The string to escape. - * @returns {String} Returns the escaped string. - * @example - * - * _.escape('Moe, Larry & Curly'); - * // => 'Moe, Larry & Curly' - */ - function escape(string) { - return string == null ? '' : String(string).replace(reUnescapedHtml, escapeHtmlChar); - } - - /** - * This function returns the first argument passed to it. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Mixed} value Any value. - * @returns {Mixed} Returns `value`. - * @example - * - * var moe = { 'name': 'moe' }; - * moe === _.identity(moe); - * // => true - */ - function identity(value) { - return value; - } - - /** - * Adds functions properties of `object` to the `lodash` function and chainable - * wrapper. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Object} object The object of function properties to add to `lodash`. - * @example - * - * _.mixin({ - * 'capitalize': function(string) { - * return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase(); - * } - * }); - * - * _.capitalize('moe'); - * // => 'Moe' - * - * _('moe').capitalize(); - * // => 'Moe' - */ - function mixin(object) { - forEach(functions(object), function(methodName) { - var func = lodash[methodName] = object[methodName]; - - lodash.prototype[methodName] = function() { - var value = this.__wrapped__, - args = [value]; - - push.apply(args, arguments); - var result = func.apply(lodash, args); - return (value && typeof value == 'object' && value == result) - ? this - : new lodashWrapper(result); - }; - }); - } - - /** - * Reverts the '_' variable to its previous value and returns a reference to - * the `lodash` function. - * - * @static - * @memberOf _ - * @category Utilities - * @returns {Function} Returns the `lodash` function. - * @example - * - * var lodash = _.noConflict(); - */ - function noConflict() { - context._ = oldDash; - return this; - } - - /** - * Converts the given `value` into an integer of the specified `radix`. - * - * Note: This method avoids differences in native ES3 and ES5 `parseInt` - * implementations. See http://es5.github.com/#E. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Mixed} value The value to parse. - * @returns {Number} Returns the new integer value. - * @example - * - * _.parseInt('08'); - * // => 8 - */ - var parseInt = nativeParseInt('08') == 8 ? nativeParseInt : function(value, radix) { - // Firefox and Opera still follow the ES3 specified implementation of `parseInt` - return nativeParseInt(isString(value) ? value.replace(reLeadingZeros, '') : value, radix || 0); - }; - - /** - * Produces a random number between `min` and `max` (inclusive). If only one - * argument is passed, a number between `0` and the given number will be returned. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Number} [min=0] The minimum possible value. - * @param {Number} [max=1] The maximum possible value. - * @returns {Number} Returns a random number. - * @example - * - * _.random(0, 5); - * // => a number between 0 and 5 - * - * _.random(5); - * // => also a number between 0 and 5 - */ - function random(min, max) { - if (min == null && max == null) { - max = 1; - } - min = +min || 0; - if (max == null) { - max = min; - min = 0; - } - return min + floor(nativeRandom() * ((+max || 0) - min + 1)); - } - - /** - * Resolves the value of `property` on `object`. If `property` is a function, - * it will be invoked with the `this` binding of `object` and its result returned, - * else the property value is returned. If `object` is falsey, then `undefined` - * is returned. - * - * @static - * @memberOf _ - * @category Utilities - * @param {Object} object The object to inspect. - * @param {String} property The property to get the value of. - * @returns {Mixed} Returns the resolved value. - * @example - * - * var object = { - * 'cheese': 'crumpets', - * 'stuff': function() { - * return 'nonsense'; - * } - * }; - * - * _.result(object, 'cheese'); - * // => 'crumpets' - * - * _.result(object, 'stuff'); - * // => 'nonsense' - */ - function result(object, property) { - var value = object ? object[property] : undefined; - return isFunction(value) ? object[property]() : value; - } - - /** - * A micro-templating method that handles arbitrary delimiters, preserves - * whitespace, and correctly escapes quotes within interpolated code. - * - * Note: In the development build, `_.template` utilizes sourceURLs for easier - * debugging. See http://www.html5rocks.com/en/tutorials/developertools/sourcemaps/#toc-sourceurl - * - * Note: Lo-Dash may be used in Chrome extensions by either creating a `lodash csp` - * build and using precompiled templates, or loading Lo-Dash in a sandbox. - * - * For more information on precompiling templates see: - * http://lodash.com/#custom-builds - * - * For more information on Chrome extension sandboxes see: - * http://developer.chrome.com/stable/extensions/sandboxingEval.html - * - * @static - * @memberOf _ - * @category Utilities - * @param {String} text The template text. - * @param {Obect} data The data object used to populate the text. - * @param {Object} options The options object. - * escape - The "escape" delimiter regexp. - * evaluate - The "evaluate" delimiter regexp. - * interpolate - The "interpolate" delimiter regexp. - * sourceURL - The sourceURL of the template's compiled source. - * variable - The data object variable name. - * @returns {Function|String} Returns a compiled function when no `data` object - * is given, else it returns the interpolated text. - * @example - * - * // using a compiled template - * var compiled = _.template('hello <%= name %>'); - * compiled({ 'name': 'moe' }); - * // => 'hello moe' - * - * var list = '<% _.forEach(people, function(name) { %>
  • <%= name %>
  • <% }); %>'; - * _.template(list, { 'people': ['moe', 'larry'] }); - * // => '
  • moe
  • larry
  • ' - * - * // using the "escape" delimiter to escape HTML in data property values - * _.template('<%- value %>', { 'value': '\n```\n\nUsing [`npm`](http://npmjs.org/):\n\n```bash\nnpm install lodash\n\nnpm install -g lodash\nnpm link lodash\n```\n\nTo avoid potential issues, update `npm` before installing Lo-Dash:\n\n```bash\nnpm install npm -g\n```\n\nIn [Node.js](http://nodejs.org/) and [RingoJS ≥ v0.8.0](http://ringojs.org/):\n\n```js\nvar _ = require('lodash');\n\n// or as a drop-in replacement for Underscore\nvar _ = require('lodash/dist/lodash.underscore');\n```\n\n**Note:** If Lo-Dash is installed globally, run [`npm link lodash`](http://blog.nodejs.org/2011/03/23/npm-1-0-global-vs-local-installation/) in your project’s root directory before requiring it.\n\nIn [RingoJS ≤ v0.7.0](http://ringojs.org/):\n\n```js\nvar _ = require('lodash')._;\n```\n\nIn [Rhino](http://www.mozilla.org/rhino/):\n\n```js\nload('lodash.js');\n```\n\nIn an AMD loader like [RequireJS](http://requirejs.org/):\n\n```js\nrequire({\n 'paths': {\n 'underscore': 'path/to/lodash'\n }\n},\n['underscore'], function(_) {\n console.log(_.VERSION);\n});\n```\n\n## Release Notes\n\n### v1.1.1\n\n * Ensured the `underscore` build version of `_.forEach` accepts a `thisArg` argument\n * Updated vendor/tar to work with Node v0.10.x\n\n### v1.1.0\n\n * Added `rhino -require` support\n * Added `_.createCallback`, `_findIndex`, `_.findKey`, `_.parseInt`, `_.runInContext`, and `_.support`\n * Added support for `callback` and `thisArg` arguments to `_.flatten`\n * Added CommonJS/Node support to precompiled templates\n * Ensured the `exports` object is not a DOM element\n * Ensured `_.isPlainObject` returns `false` for objects without a `[[Class]]` of “Object”\n * Made `_.cloneDeep`’s `callback` support more closely follow its documentation\n * Made the template precompiler create nonexistent directories of `--output` paths\n * Made `_.object` an alias of `_.zipObject`\n * Optimized method chaining, object iteration, `_.find`, and `_.pluck` (an average of 18% overall better performance)\n * Updated `backbone` build Lo-Dash method dependencies\n\nThe full changelog is available [here](https://github.com/lodash/lodash/wiki/Changelog).\n\n## BestieJS\n\nLo-Dash is part of the [BestieJS](https://github.com/bestiejs) *“Best in Class”* module collection. This means we promote solid browser/environment support, ES5+ precedents, unit testing, and plenty of documentation.\n\n## Author\n\n| [![twitter/jdalton](http://gravatar.com/avatar/299a3d891ff1920b69c364d061007043?s=70)](http://twitter.com/jdalton \"Follow @jdalton on Twitter\") |\n|---|\n| [John-David Dalton](http://allyoucanleet.com/) |\n\n## Contributors\n\n| [![twitter/blainebublitz](http://gravatar.com/avatar/ac1c67fd906c9fecd823ce302283b4c1?s=70)](http://twitter.com/blainebublitz \"Follow @BlaineBublitz on Twitter\") | [![twitter/kitcambridge](http://gravatar.com/avatar/6662a1d02f351b5ef2f8b4d815804661?s=70)](https://twitter.com/kitcambridge \"Follow @kitcambridge on Twitter\") | [![twitter/mathias](http://gravatar.com/avatar/24e08a9ea84deb17ae121074d0f17125?s=70)](http://twitter.com/mathias \"Follow @mathias on Twitter\") |\n|---|---|---|\n| [Blaine Bublitz](http://iceddev.com/) | [Kit Cambridge](http://kitcambridge.github.io/) | [Mathias Bynens](http://mathiasbynens.be/) |\n", - "readmeFilename": "README.md", - "_id": "lodash@1.1.1", - "_from": "lodash@~1.1" -} diff --git a/node_modules/karma/node_modules/log4js/.bob.json b/node_modules/karma/node_modules/log4js/.bob.json deleted file mode 100644 index c8c1e02c..00000000 --- a/node_modules/karma/node_modules/log4js/.bob.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "build": "clean lint coverage test", - "lint": { - "type": "jshint" - }, - "coverage": { - "type": "vows" - }, - "test": { - "type": "vows" - } -} diff --git a/node_modules/karma/node_modules/log4js/.bob/report/lint.out b/node_modules/karma/node_modules/log4js/.bob/report/lint.out deleted file mode 100644 index fb802245..00000000 --- a/node_modules/karma/node_modules/log4js/.bob/report/lint.out +++ /dev/null @@ -1,26 +0,0 @@ -lib/appenders/clustered.js: line 14, col 106, Line is too long. -lib/appenders/clustered.js: line 26, col 108, Line is too long. -lib/appenders/clustered.js: line 29, col 117, Line is too long. -lib/appenders/clustered.js: line 60, col 102, Line is too long. -lib/appenders/clustered.js: line 77, col 6, Missing semicolon. -lib/appenders/clustered.js: line 84, col 113, Line is too long. -lib/appenders/clustered.js: line 103, col 6, Missing semicolon. -lib/appenders/clustered.js: line 117, col 112, Line is too long. - -lib/appenders/multiprocess.js: line 99, col 128, Line is too long. -lib/appenders/multiprocess.js: line 99, col 3, Expected 'if' to have an indentation at 5 instead at 3. -lib/appenders/multiprocess.js: line 100, col 5, Expected 'loggingEvent' to have an indentation at 7 instead at 5. -lib/appenders/multiprocess.js: line 101, col 3, Expected '}' to have an indentation at 5 instead at 3. - -lib/layouts.js: line 163, col 24, This function's cyclomatic complexity is too high. (6) - -test/clusteredAppender-test.js: line 30, col 8, Missing semicolon. -test/clusteredAppender-test.js: line 112, col 102, Line is too long. -test/clusteredAppender-test.js: line 120, col 105, Line is too long. - -test/multiprocess-test.js: line 78, col 1, Mixed spaces and tabs. -test/multiprocess-test.js: line 78, col 5, Expected 'appender' to have an indentation at 7 instead at 5. -test/multiprocess-test.js: line 104, col 111, Line is too long. -test/multiprocess-test.js: line 107, col 105, Line is too long. - -20 errors diff --git a/node_modules/karma/node_modules/log4js/.jshintrc b/node_modules/karma/node_modules/log4js/.jshintrc deleted file mode 100644 index fe10cbad..00000000 --- a/node_modules/karma/node_modules/log4js/.jshintrc +++ /dev/null @@ -1,15 +0,0 @@ -{ - "node": true, - "laxcomma": true, - "indent": 2, - "globalstrict": true, - "maxparams": 5, - "maxdepth": 3, - "maxstatements": 20, - "maxcomplexity": 5, - "maxlen": 100, - "globals": { - "describe": true, - "it": true - } -} diff --git a/node_modules/karma/node_modules/log4js/.npmignore b/node_modules/karma/node_modules/log4js/.npmignore deleted file mode 100644 index 7a3a12bc..00000000 --- a/node_modules/karma/node_modules/log4js/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -*.log -*.log?? diff --git a/node_modules/karma/node_modules/log4js/.travis.yml b/node_modules/karma/node_modules/log4js/.travis.yml deleted file mode 100644 index 85fc71b2..00000000 --- a/node_modules/karma/node_modules/log4js/.travis.yml +++ /dev/null @@ -1,5 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.8" - diff --git a/node_modules/karma/node_modules/log4js/README.md b/node_modules/karma/node_modules/log4js/README.md deleted file mode 100644 index 6e479d63..00000000 --- a/node_modules/karma/node_modules/log4js/README.md +++ /dev/null @@ -1,143 +0,0 @@ -# log4js-node [![Build Status](https://secure.travis-ci.org/nomiddlename/log4js-node.png?branch=master)](http://travis-ci.org/nomiddlename/log4js-node) - - -This is a conversion of the [log4js](http://log4js.berlios.de/index.html) -framework to work with [node](http://nodejs.org). I've mainly stripped out the browser-specific code and tidied up some of the javascript. - -Out of the box it supports the following features: - -* coloured console logging -* replacement of node's console.log functions (optional) -* file appender, with log rolling based on file size -* SMTP appender -* GELF appender -* hook.io appender -* multiprocess appender (useful when you've got worker processes) -* a logger for connect/express servers -* configurable log message layout/patterns -* different log levels for different log categories (make some parts of your app log as DEBUG, others only ERRORS, etc.) - -NOTE: from log4js 0.5 onwards you'll need to explicitly enable replacement of node's console.log functions. Do this either by calling `log4js.replaceConsole()` or configuring with an object or json file like this: - -```javascript -{ - appenders: [ - { type: "console" } - ], - replaceConsole: true -} -``` - -## installation - -npm install log4js - - -## usage - -Minimalist version: -```javascript -var log4js = require('log4js'); -var logger = log4js.getLogger(); -logger.debug("Some debug messages"); -``` -By default, log4js outputs to stdout with the coloured layout (thanks to [masylum](http://github.com/masylum)), so for the above you would see: -```bash -[2010-01-17 11:43:37.987] [DEBUG] [default] - Some debug messages -``` -See example.js for a full example, but here's a snippet (also in fromreadme.js): -```javascript -var log4js = require('log4js'); -//console log is loaded by default, so you won't normally need to do this -//log4js.loadAppender('console'); -log4js.loadAppender('file'); -//log4js.addAppender(log4js.appenders.console()); -log4js.addAppender(log4js.appenders.file('logs/cheese.log'), 'cheese'); - -var logger = log4js.getLogger('cheese'); -logger.setLevel('ERROR'); - -logger.trace('Entering cheese testing'); -logger.debug('Got cheese.'); -logger.info('Cheese is Gouda.'); -logger.warn('Cheese is quite smelly.'); -logger.error('Cheese is too ripe!'); -logger.fatal('Cheese was breeding ground for listeria.'); -``` -Output: -```bash -[2010-01-17 11:43:37.987] [ERROR] cheese - Cheese is too ripe! -[2010-01-17 11:43:37.990] [FATAL] cheese - Cheese was breeding ground for listeria. -``` -The first 5 lines of the code above could also be written as: -```javascript -var log4js = require('log4js'); -log4js.configure({ - appenders: [ - { type: 'console' }, - { type: 'file', filename: 'logs/cheese.log', category: 'cheese' } - ] -}); -``` - -## configuration - -You can configure the appenders and log levels manually (as above), or provide a -configuration file (`log4js.configure('path/to/file.json')`), or a configuration object. The -configuration file location may also be specified via the environment variable -LOG4JS_CONFIG (`export LOG4JS_CONFIG=path/to/file.json`). -An example file can be found in `test/log4js.json`. An example config file with log rolling is in `test/with-log-rolling.json`. -By default, the configuration file is checked for changes every 60 seconds, and if changed, reloaded. This allows changes to logging levels to occur without restarting the application. - -To turn off configuration file change checking, configure with: - -```javascript -var log4js = require('log4js'); -log4js.configure('my_log4js_configuration.json', {}); -``` -To specify a different period: - -```javascript -log4js.configure('file.json', { reloadSecs: 300 }); -``` -For FileAppender you can also pass the path to the log directory as an option where all your log files would be stored. - -```javascript -log4js.configure('my_log4js_configuration.json', { cwd: '/absolute/path/to/log/dir' }); -``` -If you have already defined an absolute path for one of the FileAppenders in the configuration file, you could add a "absolute": true to the particular FileAppender to override the cwd option passed. Here is an example configuration file: -```json -#### my_log4js_configuration.json #### -{ - "appenders": [ - { - "type": "file", - "filename": "relative/path/to/log_file.log", - "maxLogSize": 20480, - "backups": 3, - "category": "relative-logger" - }, - { - "type": "file", - "absolute": true, - "filename": "/absolute/path/to/log_file.log", - "maxLogSize": 20480, - "backups": 10, - "category": "absolute-logger" - } - ] -} -``` -Documentation for most of the core appenders can be found on the [wiki](https://github.com/nomiddlename/log4js-node/wiki/Appenders), otherwise take a look at the tests and the examples. - -## Documentation -See the [wiki](https://github.com/nomiddlename/log4js-node/wiki). Improve the [wiki](https://github.com/nomiddlename/log4js-node/wiki), please. - -## Contributing -Contributions welcome, but take a look at the [rules](https://github.com/nomiddlename/log4js-node/wiki/Contributing) first. - -## License - -The original log4js was distributed under the Apache 2.0 License, and so is this. I've tried to -keep the original copyright and author credits in place, except in sections that I have rewritten -extensively. diff --git a/node_modules/karma/node_modules/log4js/examples/example-connect-logger.js b/node_modules/karma/node_modules/log4js/examples/example-connect-logger.js deleted file mode 100644 index ed7b0133..00000000 --- a/node_modules/karma/node_modules/log4js/examples/example-connect-logger.js +++ /dev/null @@ -1,46 +0,0 @@ -//The connect/express logger was added to log4js by danbell. This allows connect/express servers to log using log4js. -//https://github.com/nomiddlename/log4js-node/wiki/Connect-Logger - -// load modules -var log4js = require('log4js'); -var express = require("express"); -var app = express(); - -//config -log4js.configure({ - appenders: [ - { type: 'console' }, - { type: 'file', filename: 'logs/log4jsconnect.log', category: 'log4jslog' } - ] -}); - -//define logger -var logger = log4js.getLogger('log4jslog'); - -// set at which time msg is logged print like: only on error & above -// logger.setLevel('ERROR'); - -//express app -app.configure(function() { - app.use(express.favicon('')); - // app.use(log4js.connectLogger(logger, { level: log4js.levels.INFO })); - // app.use(log4js.connectLogger(logger, { level: 'auto', format: ':method :url :status' })); - - //### AUTO LEVEL DETECTION - //http responses 3xx, level = WARN - //http responses 4xx & 5xx, level = ERROR - //else.level = INFO - app.use(log4js.connectLogger(logger, { level: 'auto' })); -}); - -//route -app.get('/', function(req,res) { - res.send('hello world'); -}); - -//start app -app.listen(5000); - -console.log('server runing at localhost:5000'); -console.log('Simulation of normal response: goto localhost:5000'); -console.log('Simulation of error response: goto localhost:5000/xxx'); diff --git a/node_modules/karma/node_modules/log4js/examples/example-socket.js b/node_modules/karma/node_modules/log4js/examples/example-socket.js deleted file mode 100644 index 31bb5ab2..00000000 --- a/node_modules/karma/node_modules/log4js/examples/example-socket.js +++ /dev/null @@ -1,45 +0,0 @@ -var log4js = require('./lib/log4js') -, cluster = require('cluster') -, numCPUs = require('os').cpus().length -, i = 0; - -if (cluster.isMaster) { - log4js.configure({ - appenders: [ - { - type: "multiprocess", - mode: "master", - appender: { - type: "console" - } - } - ] - }); - - console.info("Master creating %d workers", numCPUs); - for (i=0; i < numCPUs; i++) { - cluster.fork(); - } - - cluster.on('death', function(worker) { - console.info("Worker %d died.", worker.pid); - }); -} else { - log4js.configure({ - appenders: [ - { - type: "multiprocess", - mode: "worker" - } - ] - }); - var logger = log4js.getLogger('example-socket'); - - console.info("Worker %d started.", process.pid); - for (i=0; i < 1000; i++) { - logger.info("Worker %d - logging something %d", process.pid, i); - } -} - - - diff --git a/node_modules/karma/node_modules/log4js/examples/example.js b/node_modules/karma/node_modules/log4js/examples/example.js deleted file mode 100644 index 25c95444..00000000 --- a/node_modules/karma/node_modules/log4js/examples/example.js +++ /dev/null @@ -1,58 +0,0 @@ -var log4js = require('../lib/log4js'); -//log the cheese logger messages to a file, and the console ones as well. -log4js.configure({ - appenders: [ - { - type: "file", - filename: "cheese.log", - category: [ 'cheese','console' ] - }, - { - type: "console" - } - ], - replaceConsole: true -}); - -//to add an appender programmatically, and without clearing other appenders -//loadAppender is only necessary if you haven't already configured an appender of this type -log4js.loadAppender('file'); -log4js.addAppender(log4js.appenders.file('pants.log'), 'pants'); -//a custom logger outside of the log4js/lib/appenders directory can be accessed like so -//log4js.loadAppender('what/you/would/put/in/require'); -//log4js.addAppender(log4js.appenders['what/you/would/put/in/require'](args)); -//or through configure as: -//log4js.configure({ -// appenders: [ { type: 'what/you/would/put/in/require', otherArgs: 'blah' } ] -//}); - -var logger = log4js.getLogger('cheese'); -//only errors and above get logged. -//you can also set this log level in the config object -//via the levels field. -logger.setLevel('ERROR'); - -//console logging methods have been replaced with log4js ones. -//so this will get coloured output on console, and appear in cheese.log -console.error("AAArgh! Something went wrong", { some: "otherObject", useful_for: "debug purposes" }); - -//these will not appear (logging level beneath error) -logger.trace('Entering cheese testing'); -logger.debug('Got cheese.'); -logger.info('Cheese is Gouda.'); -logger.warn('Cheese is quite smelly.'); -//these end up on the console and in cheese.log -logger.error('Cheese %s is too ripe!', "gouda"); -logger.fatal('Cheese was breeding ground for listeria.'); - -//these don't end up in cheese.log, but will appear on the console -var anotherLogger = log4js.getLogger('another'); -anotherLogger.debug("Just checking"); - -//one for pants.log -//will also go to console, since that's configured for all categories -var pantsLog = log4js.getLogger('pants'); -pantsLog.debug("Something for pants"); - - - diff --git a/node_modules/karma/node_modules/log4js/examples/fromreadme.js b/node_modules/karma/node_modules/log4js/examples/fromreadme.js deleted file mode 100644 index 71b399ad..00000000 --- a/node_modules/karma/node_modules/log4js/examples/fromreadme.js +++ /dev/null @@ -1,19 +0,0 @@ -//remember to change the require to just 'log4js' if you've npm install'ed it -var log4js = require('./lib/log4js'); -//by default the console appender is loaded -//log4js.loadAppender('console'); -//you'd only need to add the console appender if you -//had previously called log4js.clearAppenders(); -//log4js.addAppender(log4js.appenders.console()); -log4js.loadAppender('file'); -log4js.addAppender(log4js.appenders.file('cheese.log'), 'cheese'); - -var logger = log4js.getLogger('cheese'); -logger.setLevel('ERROR'); - -logger.trace('Entering cheese testing'); -logger.debug('Got cheese.'); -logger.info('Cheese is Gouda.'); -logger.warn('Cheese is quite smelly.'); -logger.error('Cheese is too ripe!'); -logger.fatal('Cheese was breeding ground for listeria.'); diff --git a/node_modules/karma/node_modules/log4js/examples/log-rolling.js b/node_modules/karma/node_modules/log4js/examples/log-rolling.js deleted file mode 100644 index 7519c5f2..00000000 --- a/node_modules/karma/node_modules/log4js/examples/log-rolling.js +++ /dev/null @@ -1,27 +0,0 @@ -var log4js = require('../lib/log4js') -, log -, i = 0; -log4js.configure({ - "appenders": [ - { - type: "console" - , category: "console" - }, - { - "type": "file", - "filename": "tmp-test.log", - "maxLogSize": 1024, - "backups": 3, - "category": "test" - } - ] -}); -log = log4js.getLogger("test"); - -function doTheLogging(x) { - log.info("Logging something %d", x); -} - -for ( ; i < 5000; i++) { - doTheLogging(i); -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/examples/memory-test.js b/node_modules/karma/node_modules/log4js/examples/memory-test.js deleted file mode 100644 index ac2ae044..00000000 --- a/node_modules/karma/node_modules/log4js/examples/memory-test.js +++ /dev/null @@ -1,37 +0,0 @@ -var log4js = require('./lib/log4js') -, logger -, usage -, i; - -log4js.configure( - { - appenders: [ - { - category: "memory-test" - , type: "file" - , filename: "memory-test.log" - }, - { - type: "console" - , category: "memory-usage" - }, - { - type: "file" - , filename: "memory-usage.log" - , category: "memory-usage" - , layout: { - type: "messagePassThrough" - } - } - ] - } -); -logger = log4js.getLogger("memory-test"); -usage = log4js.getLogger("memory-usage"); - -for (i=0; i < 1000000; i++) { - if ( (i % 5000) === 0) { - usage.info("%d %d", i, process.memoryUsage().rss); - } - logger.info("Doing something."); -} diff --git a/node_modules/karma/node_modules/log4js/examples/patternLayout-tokens.js b/node_modules/karma/node_modules/log4js/examples/patternLayout-tokens.js deleted file mode 100644 index 84b171c4..00000000 --- a/node_modules/karma/node_modules/log4js/examples/patternLayout-tokens.js +++ /dev/null @@ -1,21 +0,0 @@ -var log4js = require('./lib/log4js'); - -var config = { - "appenders": [ - { - "type": "console", - "layout": { - "type": "pattern", - "pattern": "%[%r (%x{pid}) %p %c -%] %m%n", - "tokens": { - "pid" : function() { return process.pid; } - } - } - } - ] - }; - -log4js.configure(config, {}); - -var logger = log4js.getLogger("app"); -logger.info("Test log message"); \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/examples/smtp-appender.js b/node_modules/karma/node_modules/log4js/examples/smtp-appender.js deleted file mode 100644 index 134ce900..00000000 --- a/node_modules/karma/node_modules/log4js/examples/smtp-appender.js +++ /dev/null @@ -1,43 +0,0 @@ -//Note that smtp appender needs nodemailer to work. -//If you haven't got nodemailer installed, you'll get cryptic -//"cannot find module" errors when using the smtp appender -var log4js = require('../lib/log4js') -, log -, logmailer -, i = 0; -log4js.configure({ - "appenders": [ - { - type: "console", - category: "test" - }, - { - "type": "smtp", - "recipients": "logfilerecipient@logging.com", - "sendInterval": 5, - "transport": "SMTP", - "SMTP": { - "host": "smtp.gmail.com", - "secureConnection": true, - "port": 465, - "auth": { - "user": "someone@gmail", - "pass": "********************" - }, - "debug": true - }, - "category": "mailer" - } - ] -}); -log = log4js.getLogger("test"); -logmailer = log4js.getLogger("mailer"); - -function doTheLogging(x) { - log.info("Logging something %d", x); - logmailer.info("Logging something %d", x); -} - -for ( ; i < 500; i++) { - doTheLogging(i); -} diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js b/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js deleted file mode 100644 index f854f65e..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/categoryFilter.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -var log4js = require('../log4js'); - -function categoryFilter (excludes, appender) { - if (typeof(excludes) === 'string') excludes = [excludes]; - return function(logEvent) { - if (excludes.indexOf(logEvent.categoryName) === -1) { - appender(logEvent); - } - }; -} - -function configure(config) { - log4js.loadAppender(config.appender.type); - var appender = log4js.appenderMakers[config.appender.type](config.appender); - return categoryFilter(config.exclude, appender); -} - -exports.appender = categoryFilter; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/clustered.js b/node_modules/karma/node_modules/log4js/lib/appenders/clustered.js deleted file mode 100755 index aae3a4c8..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/clustered.js +++ /dev/null @@ -1,126 +0,0 @@ -"use strict"; - -var cluster = require('cluster'); -var log4js = require('../log4js'); - -/** - * Takes a loggingEvent object, returns string representation of it. - */ -function serializeLoggingEvent(loggingEvent) { - // JSON.stringify(new Error('test')) returns {}, which is not really useful for us. - // The following allows us to serialize errors correctly. - for (var i = 0; i < loggingEvent.data.length; i++) { - var item = loggingEvent.data[i]; - if (item && item.stack && JSON.stringify(item) === '{}') { // Validate that we really are in this case - loggingEvent.data[i] = {stack : item.stack}; - } - } - return JSON.stringify(loggingEvent); -} - -/** - * Takes a string, returns an object with - * the correct log properties. - * - * This method has been "borrowed" from the `multiprocess` appender - * by `nomiddlename` (https://github.com/nomiddlename/log4js-node/blob/master/lib/appenders/multiprocess.js) - * - * Apparently, node.js serializes everything to strings when using `process.send()`, - * so we need smart deserialization that will recreate log date and level for further processing by log4js internals. - */ -function deserializeLoggingEvent(loggingEventString) { - - var loggingEvent; - - try { - - loggingEvent = JSON.parse(loggingEventString); - loggingEvent.startTime = new Date(loggingEvent.startTime); - loggingEvent.level = log4js.levels.toLevel(loggingEvent.level.levelStr); - - } catch (e) { - - // JSON.parse failed, just log the contents probably a naughty. - loggingEvent = { - startTime: new Date(), - categoryName: 'log4js', - level: log4js.levels.ERROR, - data: [ 'Unable to parse log:', loggingEventString ] - }; - } - return loggingEvent; -} - -/** - * Creates an appender. - * - * If the current process is a master (`cluster.isMaster`), then this will be a "master appender". - * Otherwise this will be a worker appender, that just sends loggingEvents to the master process. - * - * If you are using this method directly, make sure to provide it with `config.actualAppenders` array - * of actual appender instances. - * - * Or better use `configure(config, options)` - */ -function createAppender(config) { - - if (cluster.isMaster) { - - var masterAppender = function(loggingEvent) { - - if (config.actualAppenders) { - var size = config.actualAppenders.length; - for(var i = 0; i < size; i++) { - config.actualAppenders[i](loggingEvent); - } - } - } - - // Listen on new workers - cluster.on('fork', function(worker) { - - worker.on('message', function(message) { - if (message.type && message.type === '::log-message') { - // console.log("master : " + cluster.isMaster + " received message: " + JSON.stringify(message.event)); - - var loggingEvent = deserializeLoggingEvent(message.event); - masterAppender(loggingEvent); - } - }); - - }); - - return masterAppender; - - } else { - - return function(loggingEvent) { - // If inside the worker process, then send the logger event to master. - if (cluster.isWorker) { - // console.log("worker " + cluster.worker.id + " is sending message"); - process.send({ type: '::log-message', event: serializeLoggingEvent(loggingEvent)}); - } - } - } -} - -function configure(config, options) { - - if (config.appenders && cluster.isMaster) { - - var size = config.appenders.length; - config.actualAppenders = new Array(size); - - for(var i = 0; i < size; i++) { - - log4js.loadAppender(config.appenders[i].type); - config.actualAppenders[i] = log4js.appenderMakers[config.appenders[i].type](config.appenders[i], options); - - } - } - - return createAppender(config); -} - -exports.appender = createAppender; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/console.js b/node_modules/karma/node_modules/log4js/lib/appenders/console.js deleted file mode 100644 index 7a470a34..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/console.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -var layouts = require('../layouts') -, consoleLog = console.log.bind(console); - -function consoleAppender (layout) { - layout = layout || layouts.colouredLayout; - return function(loggingEvent) { - consoleLog(layout(loggingEvent)); - }; -} - -function configure(config) { - var layout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - return consoleAppender(layout); -} - -exports.appender = consoleAppender; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/dateFile.js b/node_modules/karma/node_modules/log4js/lib/appenders/dateFile.js deleted file mode 100644 index 6317c688..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/dateFile.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var streams = require('../streams') -, layouts = require('../layouts') -, path = require('path') -, os = require('os') -, eol = os.EOL || '\n' -, openFiles = []; - -//close open files on process exit. -process.on('exit', function() { - openFiles.forEach(function (file) { - file.end(); - }); -}); - -/** - * File appender that rolls files according to a date pattern. - * @filename base filename. - * @pattern the format that will be added to the end of filename when rolling, - * also used to check when to roll files - defaults to '.yyyy-MM-dd' - * @layout layout function for log messages - defaults to basicLayout - */ -function appender(filename, pattern, alwaysIncludePattern, layout) { - layout = layout || layouts.basicLayout; - - var logFile = new streams.DateRollingFileStream( - filename, - pattern, - { alwaysIncludePattern: alwaysIncludePattern } - ); - openFiles.push(logFile); - - return function(logEvent) { - logFile.write(layout(logEvent) + eol, "utf8"); - }; - -} - -function configure(config, options) { - var layout; - - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - - if (!config.alwaysIncludePattern) { - config.alwaysIncludePattern = false; - } - - if (options && options.cwd && !config.absolute) { - config.filename = path.join(options.cwd, config.filename); - } - - return appender(config.filename, config.pattern, config.alwaysIncludePattern, layout); -} - -exports.appender = appender; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/file.js b/node_modules/karma/node_modules/log4js/lib/appenders/file.js deleted file mode 100644 index da0e80b3..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/file.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var layouts = require('../layouts') -, path = require('path') -, fs = require('fs') -, streams = require('../streams') -, os = require('os') -, eol = os.EOL || '\n' -, openFiles = []; - -//close open files on process exit. -process.on('exit', function() { - openFiles.forEach(function (file) { - file.end(); - }); -}); - -/** - * File Appender writing the logs to a text file. Supports rolling of logs by size. - * - * @param file file log messages will be written to - * @param layout a function that takes a logevent and returns a string - * (defaults to basicLayout). - * @param logSize - the maximum size (in bytes) for a log file, - * if not provided then logs won't be rotated. - * @param numBackups - the number of log files to keep after logSize - * has been reached (default 5) - */ -function fileAppender (file, layout, logSize, numBackups) { - var bytesWritten = 0; - file = path.normalize(file); - layout = layout || layouts.basicLayout; - numBackups = numBackups === undefined ? 5 : numBackups; - //there has to be at least one backup if logSize has been specified - numBackups = numBackups === 0 ? 1 : numBackups; - - function openTheStream(file, fileSize, numFiles) { - var stream; - if (fileSize) { - stream = new streams.RollingFileStream( - file, - fileSize, - numFiles - ); - } else { - stream = fs.createWriteStream( - file, - { encoding: "utf8", - mode: parseInt('0644', 8), - flags: 'a' } - ); - } - stream.on("error", function (err) { - console.error("log4js.fileAppender - Writing to file %s, error happened ", file, err); - }); - return stream; - } - - var logFile = openTheStream(file, logSize, numBackups); - - // push file to the stack of open handlers - openFiles.push(logFile); - - return function(loggingEvent) { - logFile.write(layout(loggingEvent) + eol, "utf8"); - }; -} - -function configure(config, options) { - var layout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - - if (options && options.cwd && !config.absolute) { - config.filename = path.join(options.cwd, config.filename); - } - - return fileAppender(config.filename, layout, config.maxLogSize, config.backups); -} - -exports.appender = fileAppender; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/gelf.js b/node_modules/karma/node_modules/log4js/lib/appenders/gelf.js deleted file mode 100644 index 8e075b57..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/gelf.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; -var zlib = require('zlib'); -var layouts = require('../layouts'); -var levels = require('../levels'); -var dgram = require('dgram'); -var util = require('util'); -var debug = require('../debug')('GELF Appender'); - -var LOG_EMERG=0; // system is unusable -var LOG_ALERT=1; // action must be taken immediately -var LOG_CRIT=2; // critical conditions -var LOG_ERR=3; // error conditions -var LOG_ERROR=3; // because people WILL typo -var LOG_WARNING=4; // warning conditions -var LOG_NOTICE=5; // normal, but significant, condition -var LOG_INFO=6; // informational message -var LOG_DEBUG=7; // debug-level message - -var levelMapping = {}; -levelMapping[levels.ALL] = LOG_DEBUG; -levelMapping[levels.TRACE] = LOG_DEBUG; -levelMapping[levels.DEBUG] = LOG_DEBUG; -levelMapping[levels.INFO] = LOG_INFO; -levelMapping[levels.WARN] = LOG_WARNING; -levelMapping[levels.ERROR] = LOG_ERR; -levelMapping[levels.FATAL] = LOG_CRIT; - -/** - * GELF appender that supports sending UDP packets to a GELF compatible server such as Graylog - * - * @param layout a function that takes a logevent and returns a string (defaults to none). - * @param host - host to which to send logs (default:localhost) - * @param port - port at which to send logs to (default:12201) - * @param hostname - hostname of the current host (default:os hostname) - * @param facility - facility to log to (default:nodejs-server) - */ -function gelfAppender (layout, host, port, hostname, facility) { - var config, customFields; - if (typeof(host) === 'object') { - config = host; - host = config.host; - port = config.port; - hostname = config.hostname; - facility = config.facility; - customFields = config.customFields; - } - - host = host || 'localhost'; - port = port || 12201; - hostname = hostname || require('os').hostname(); - facility = facility || 'nodejs-server'; - layout = layout || layouts.messagePassThroughLayout; - - var defaultCustomFields = customFields || {}; - - var client = dgram.createSocket("udp4"); - - process.on('exit', function() { - if (client) client.close(); - }); - - /** - * Add custom fields (start with underscore ) - * - if the first object passed to the logger contains 'GELF' field, - * copy the underscore fields to the message - * @param loggingEvent - * @param msg - */ - function addCustomFields(loggingEvent, msg){ - - /* append defaultCustomFields firsts */ - Object.keys(defaultCustomFields).forEach(function(key) { - // skip _id field for graylog2, skip keys not starts with UNDERSCORE - if (key.match(/^_/) && key !== "_id") { - msg[key] = defaultCustomFields[key]; - } - }); - - /* append custom fields per message */ - var data = loggingEvent.data; - if (!Array.isArray(data) || data.length === 0) return; - var firstData = data[0]; - - if (!firstData.GELF) return; // identify with GELF field defined - Object.keys(firstData).forEach(function(key) { - // skip _id field for graylog2, skip keys not starts with UNDERSCORE - if (key.match(/^_/) || key !== "_id") { - msg[key] = firstData[key]; - } - }); - - /* the custom field object should be removed, so it will not be looged by the later appenders */ - loggingEvent.data.shift(); - } - - function preparePacket(loggingEvent) { - var msg = {}; - addCustomFields(loggingEvent, msg); - msg.full_message = layout(loggingEvent); - msg.short_message = msg.full_message; - - msg.version="1.0"; - msg.timestamp = msg.timestamp || new Date().getTime() / 1000; // log should use millisecond - msg.host = hostname; - msg.level = levelMapping[loggingEvent.level || levels.DEBUG]; - msg.facility = facility; - return msg; - } - - function sendPacket(packet) { - try { - client.send(packet, 0, packet.length, port, host); - } catch(e) {} - } - - return function(loggingEvent) { - var message = preparePacket(loggingEvent); - zlib.gzip(new Buffer(JSON.stringify(message)), function(err, packet) { - if (err) { - console.error(err.stack); - } else { - if (packet.length > 8192) { - debug("Message packet length (" + packet.length + ") is larger than 8k. Not sending"); - } else { - sendPacket(packet); - } - } - }); - }; -} - -function configure(config) { - var layout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - return gelfAppender(layout, config); -} - -exports.appender = gelfAppender; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/hookio.js b/node_modules/karma/node_modules/log4js/lib/appenders/hookio.js deleted file mode 100644 index 7821d79b..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/hookio.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -var log4js = require('../log4js') -, layouts = require('../layouts') -, Hook = require('hook.io').Hook -, util = require('util'); - -var Logger = function createLogger(options) { - var self = this; - var actualAppender = options.actualAppender; - Hook.call(self, options); - self.on('hook::ready', function hookReady() { - self.on('*::' + options.name + '::log', function log(loggingEvent) { - deserializeLoggingEvent(loggingEvent); - actualAppender(loggingEvent); - }); - }); -}; -util.inherits(Logger, Hook); - -function deserializeLoggingEvent(loggingEvent) { - loggingEvent.startTime = new Date(loggingEvent.startTime); - loggingEvent.level.toString = function levelToString() { - return loggingEvent.level.levelStr; - }; -} - -function initHook(hookioOptions) { - var loggerHook; - if (hookioOptions.mode === 'master') { - // Start the master hook, handling the actual logging - loggerHook = new Logger(hookioOptions); - } else { - // Start a worker, just emitting events for a master - loggerHook = new Hook(hookioOptions); - } - loggerHook.start(); - return loggerHook; -} - -function getBufferedHook(hook, eventName) { - var hookBuffer = []; - var hookReady = false; - hook.on('hook::ready', function emptyBuffer() { - hookBuffer.forEach(function logBufferItem(loggingEvent) { - hook.emit(eventName, loggingEvent); - }); - hookReady = true; - }); - - return function log(loggingEvent) { - if (hookReady) { - hook.emit(eventName, loggingEvent); - } else { - hookBuffer.push(loggingEvent); - } - }; -} - -function createAppender(hookioOptions) { - var loggerHook = initHook(hookioOptions); - var loggerEvent = hookioOptions.name + '::log'; - return getBufferedHook(loggerHook, loggerEvent); -} - -function configure(config) { - var actualAppender; - if (config.appender && config.mode === 'master') { - log4js.loadAppender(config.appender.type); - actualAppender = log4js.appenderMakers[config.appender.type](config.appender); - config.actualAppender = actualAppender; - } - return createAppender(config); -} - -exports.appender = createAppender; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/logLevelFilter.js b/node_modules/karma/node_modules/log4js/lib/appenders/logLevelFilter.js deleted file mode 100644 index ddbb61cf..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/logLevelFilter.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -var levels = require('../levels') -, log4js = require('../log4js'); - -function logLevelFilter (levelString, appender) { - var level = levels.toLevel(levelString); - return function(logEvent) { - if (logEvent.level.isGreaterThanOrEqualTo(level)) { - appender(logEvent); - } - }; -} - -function configure(config) { - log4js.loadAppender(config.appender.type); - var appender = log4js.appenderMakers[config.appender.type](config.appender); - return logLevelFilter(config.level, appender); -} - -exports.appender = logLevelFilter; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/multiprocess.js b/node_modules/karma/node_modules/log4js/lib/appenders/multiprocess.js deleted file mode 100644 index 44441466..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/multiprocess.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; -var log4js = require('../log4js') -, net = require('net') -, END_MSG = '__LOG4JS__'; - -/** - * Creates a server, listening on config.loggerPort, config.loggerHost. - * Output goes to config.actualAppender (config.appender is used to - * set up that appender). - */ -function logServer(config) { - - /** - * Takes a utf-8 string, returns an object with - * the correct log properties. - */ - function deserializeLoggingEvent(clientSocket, msg) { - var loggingEvent; - try { - loggingEvent = JSON.parse(msg); - loggingEvent.startTime = new Date(loggingEvent.startTime); - loggingEvent.level = log4js.levels.toLevel(loggingEvent.level.levelStr); - } catch (e) { - // JSON.parse failed, just log the contents probably a naughty. - loggingEvent = { - startTime: new Date(), - categoryName: 'log4js', - level: log4js.levels.ERROR, - data: [ 'Unable to parse log:', msg ] - }; - } - - loggingEvent.remoteAddress = clientSocket.remoteAddress; - loggingEvent.remotePort = clientSocket.remotePort; - - return loggingEvent; - } - - var actualAppender = config.actualAppender, - server = net.createServer(function serverCreated(clientSocket) { - clientSocket.setEncoding('utf8'); - var logMessage = ''; - - function logTheMessage(msg) { - if (logMessage.length > 0) { - actualAppender(deserializeLoggingEvent(clientSocket, msg)); - } - } - - function chunkReceived(chunk) { - var event; - logMessage += chunk || ''; - if (logMessage.indexOf(END_MSG) > -1) { - event = logMessage.substring(0, logMessage.indexOf(END_MSG)); - logTheMessage(event); - logMessage = logMessage.substring(event.length + END_MSG.length) || ''; - //check for more, maybe it was a big chunk - chunkReceived(); - } - } - - clientSocket.on('data', chunkReceived); - clientSocket.on('end', chunkReceived); - }); - - server.listen(config.loggerPort || 5000, config.loggerHost || 'localhost'); - - return actualAppender; -} - -function workerAppender(config) { - var canWrite = false, - buffer = [], - socket; - - createSocket(); - - function createSocket() { - socket = net.createConnection(config.loggerPort || 5000, config.loggerHost || 'localhost'); - socket.on('connect', function() { - emptyBuffer(); - canWrite = true; - }); - socket.on('timeout', socket.end.bind(socket)); - //don't bother listening for 'error', 'close' gets called after that anyway - socket.on('close', createSocket); - } - - function emptyBuffer() { - var evt; - while ((evt = buffer.shift())) { - write(evt); - } - } - - function write(loggingEvent) { - // JSON.stringify(new Error('test')) returns {}, which is not really useful for us. - // The following allows us to serialize errors correctly. - if (loggingEvent && loggingEvent.stack && JSON.stringify(loggingEvent) === '{}') { // Validate that we really are in this case - loggingEvent = {stack : loggingEvent.stack}; - } - socket.write(JSON.stringify(loggingEvent), 'utf8'); - socket.write(END_MSG, 'utf8'); - } - - return function log(loggingEvent) { - if (canWrite) { - write(loggingEvent); - } else { - buffer.push(loggingEvent); - } - }; -} - -function createAppender(config) { - if (config.mode === 'master') { - return logServer(config); - } else { - return workerAppender(config); - } -} - -function configure(config, options) { - var actualAppender; - if (config.appender && config.mode === 'master') { - log4js.loadAppender(config.appender.type); - actualAppender = log4js.appenderMakers[config.appender.type](config.appender, options); - config.actualAppender = actualAppender; - } - return createAppender(config); -} - -exports.appender = createAppender; -exports.configure = configure; diff --git a/node_modules/karma/node_modules/log4js/lib/appenders/smtp.js b/node_modules/karma/node_modules/log4js/lib/appenders/smtp.js deleted file mode 100644 index 85accee4..00000000 --- a/node_modules/karma/node_modules/log4js/lib/appenders/smtp.js +++ /dev/null @@ -1,82 +0,0 @@ -"use strict"; -var layouts = require("../layouts") -, mailer = require("nodemailer") -, os = require('os'); - -/** -* SMTP Appender. Sends logging events using SMTP protocol. -* It can either send an email on each event or group several -* logging events gathered during specified interval. -* -* @param config appender configuration data -* config.sendInterval time between log emails (in seconds), if 0 -* then every event sends an email -* @param layout a function that takes a logevent and returns a string (defaults to basicLayout). -*/ -function smtpAppender(config, layout) { - layout = layout || layouts.basicLayout; - var subjectLayout = layouts.messagePassThroughLayout; - var sendInterval = config.sendInterval*1000 || 0; - - var logEventBuffer = []; - var sendTimer; - - function sendBuffer() { - if (logEventBuffer.length > 0) { - - var transport = mailer.createTransport(config.transport, config[config.transport]); - var firstEvent = logEventBuffer[0]; - var body = ""; - while (logEventBuffer.length > 0) { - body += layout(logEventBuffer.shift()) + "\n"; - } - - var msg = { - to: config.recipients, - subject: config.subject || subjectLayout(firstEvent), - text: body, - headers: { "Hostname": os.hostname() } - }; - if (config.sender) { - msg.from = config.sender; - } - transport.sendMail(msg, function(error, success) { - if (error) { - console.error("log4js.smtpAppender - Error happened", error); - } - transport.close(); - }); - } - } - - function scheduleSend() { - if (!sendTimer) { - sendTimer = setTimeout(function() { - sendTimer = null; - sendBuffer(); - }, sendInterval); - } - } - - return function(loggingEvent) { - logEventBuffer.push(loggingEvent); - if (sendInterval > 0) { - scheduleSend(); - } else { - sendBuffer(); - } - }; -} - -function configure(config) { - var layout; - if (config.layout) { - layout = layouts.layout(config.layout.type, config.layout); - } - return smtpAppender(config, layout); -} - -exports.name = "smtp"; -exports.appender = smtpAppender; -exports.configure = configure; - diff --git a/node_modules/karma/node_modules/log4js/lib/connect-logger.js b/node_modules/karma/node_modules/log4js/lib/connect-logger.js deleted file mode 100644 index a441be55..00000000 --- a/node_modules/karma/node_modules/log4js/lib/connect-logger.js +++ /dev/null @@ -1,194 +0,0 @@ -"use strict"; -var levels = require("./levels"); -var DEFAULT_FORMAT = ':remote-addr - -' + - ' ":method :url HTTP/:http-version"' + - ' :status :content-length ":referrer"' + - ' ":user-agent"'; -/** - * Log requests with the given `options` or a `format` string. - * - * Options: - * - * - `format` Format string, see below for tokens - * - `level` A log4js levels instance. Supports also 'auto' - * - * Tokens: - * - * - `:req[header]` ex: `:req[Accept]` - * - `:res[header]` ex: `:res[Content-Length]` - * - `:http-version` - * - `:response-time` - * - `:remote-addr` - * - `:date` - * - `:method` - * - `:url` - * - `:referrer` - * - `:user-agent` - * - `:status` - * - * @param {String|Function|Object} format or options - * @return {Function} - * @api public - */ - -function getLogger(logger4js, options) { - if ('object' == typeof options) { - options = options || {}; - } else if (options) { - options = { format: options }; - } else { - options = {}; - } - - var thislogger = logger4js - , level = levels.toLevel(options.level, levels.INFO) - , fmt = options.format || DEFAULT_FORMAT - , nolog = options.nolog ? createNoLogCondition(options.nolog) : null; - - return function (req, res, next) { - // mount safety - if (req._logging) return next(); - - // nologs - if (nolog && nolog.test(req.originalUrl)) return next(); - if (thislogger.isLevelEnabled(level) || options.level === 'auto') { - - var start = new Date() - , statusCode - , writeHead = res.writeHead - , end = res.end - , url = req.originalUrl; - - // flag as logging - req._logging = true; - - // proxy for statusCode. - res.writeHead = function(code, headers){ - res.writeHead = writeHead; - res.writeHead(code, headers); - res.__statusCode = statusCode = code; - res.__headers = headers || {}; - - //status code response level handling - if(options.level === 'auto'){ - level = levels.INFO; - if(code >= 300) level = levels.WARN; - if(code >= 400) level = levels.ERROR; - } else { - level = levels.toLevel(options.level, levels.INFO); - } - }; - - // proxy end to output a line to the provided logger. - res.end = function(chunk, encoding) { - res.end = end; - res.end(chunk, encoding); - res.responseTime = new Date() - start; - if (thislogger.isLevelEnabled(level)) { - if (typeof fmt === 'function') { - var line = fmt(req, res, function(str){ return format(str, req, res); }); - if (line) thislogger.log(level, line); - } else { - thislogger.log(level, format(fmt, req, res)); - } - } - }; - } - - //ensure next gets always called - next(); - }; -} - -/** - * Return formatted log line. - * - * @param {String} str - * @param {IncomingMessage} req - * @param {ServerResponse} res - * @return {String} - * @api private - */ - -function format(str, req, res) { - return str - .replace(':url', req.originalUrl) - .replace(':method', req.method) - .replace(':status', res.__statusCode || res.statusCode) - .replace(':response-time', res.responseTime) - .replace(':date', new Date().toUTCString()) - .replace(':referrer', req.headers.referer || req.headers.referrer || '') - .replace(':http-version', req.httpVersionMajor + '.' + req.httpVersionMinor) - .replace( - ':remote-addr', - req.socket && - (req.socket.remoteAddress || (req.socket.socket && req.socket.socket.remoteAddress)) - ) - .replace(':user-agent', req.headers['user-agent'] || '') - .replace( - ':content-length', - (res._headers && res._headers['content-length']) || - (res.__headers && res.__headers['Content-Length']) || - '-' - ) - .replace(/:req\[([^\]]+)\]/g, function(_, field){ return req.headers[field.toLowerCase()]; }) - .replace(/:res\[([^\]]+)\]/g, function(_, field){ - return res._headers ? - (res._headers[field.toLowerCase()] || res.__headers[field]) - : (res.__headers && res.__headers[field]); - }); -} - -/** - * Return RegExp Object about nolog - * - * @param {String} nolog - * @return {RegExp} - * @api private - * - * syntax - * 1. String - * 1.1 "\\.gif" - * NOT LOGGING http://example.com/hoge.gif and http://example.com/hoge.gif?fuga - * LOGGING http://example.com/hoge.agif - * 1.2 in "\\.gif|\\.jpg$" - * NOT LOGGING http://example.com/hoge.gif and - * http://example.com/hoge.gif?fuga and http://example.com/hoge.jpg?fuga - * LOGGING http://example.com/hoge.agif, - * http://example.com/hoge.ajpg and http://example.com/hoge.jpg?hoge - * 1.3 in "\\.(gif|jpe?g|png)$" - * NOT LOGGING http://example.com/hoge.gif and http://example.com/hoge.jpeg - * LOGGING http://example.com/hoge.gif?uid=2 and http://example.com/hoge.jpg?pid=3 - * 2. RegExp - * 2.1 in /\.(gif|jpe?g|png)$/ - * SAME AS 1.3 - * 3. Array - * 3.1 ["\\.jpg$", "\\.png", "\\.gif"] - * SAME AS "\\.jpg|\\.png|\\.gif" - */ -function createNoLogCondition(nolog) { - var regexp = null; - - if (nolog) { - if (nolog instanceof RegExp) { - regexp = nolog; - } - - if (typeof nolog === 'string') { - regexp = new RegExp(nolog); - } - - if (Array.isArray(nolog)) { - var regexpsAsStrings = nolog.map( - function convertToStrings(o) { - return o.source ? o.source : o; - } - ); - regexp = new RegExp(regexpsAsStrings.join('|')); - } - } - - return regexp; -} - -exports.connectLogger = getLogger; diff --git a/node_modules/karma/node_modules/log4js/lib/date_format.js b/node_modules/karma/node_modules/log4js/lib/date_format.js deleted file mode 100644 index d75ce20d..00000000 --- a/node_modules/karma/node_modules/log4js/lib/date_format.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -exports.ISO8601_FORMAT = "yyyy-MM-dd hh:mm:ss.SSS"; -exports.ISO8601_WITH_TZ_OFFSET_FORMAT = "yyyy-MM-ddThh:mm:ssO"; -exports.DATETIME_FORMAT = "dd MM yyyy hh:mm:ss.SSS"; -exports.ABSOLUTETIME_FORMAT = "hh:mm:ss.SSS"; - -function padWithZeros(vNumber, width) { - var numAsString = vNumber + ""; - while (numAsString.length < width) { - numAsString = "0" + numAsString; - } - return numAsString; -} - -function addZero(vNumber) { - return padWithZeros(vNumber, 2); -} - -/** - * Formats the TimeOffest - * Thanks to http://www.svendtofte.com/code/date_format/ - * @private - */ -function offset(date) { - // Difference to Greenwich time (GMT) in hours - var os = Math.abs(date.getTimezoneOffset()); - var h = String(Math.floor(os/60)); - var m = String(os%60); - if (h.length == 1) { - h = "0" + h; - } - if (m.length == 1) { - m = "0" + m; - } - return date.getTimezoneOffset() < 0 ? "+"+h+m : "-"+h+m; -} - -exports.asString = function(/*format,*/ date) { - var format = exports.ISO8601_FORMAT; - if (typeof(date) === "string") { - format = arguments[0]; - date = arguments[1]; - } - - var vDay = addZero(date.getDate()); - var vMonth = addZero(date.getMonth()+1); - var vYearLong = addZero(date.getFullYear()); - var vYearShort = addZero(date.getFullYear().toString().substring(2,4)); - var vYear = (format.indexOf("yyyy") > -1 ? vYearLong : vYearShort); - var vHour = addZero(date.getHours()); - var vMinute = addZero(date.getMinutes()); - var vSecond = addZero(date.getSeconds()); - var vMillisecond = padWithZeros(date.getMilliseconds(), 3); - var vTimeZone = offset(date); - var formatted = format - .replace(/dd/g, vDay) - .replace(/MM/g, vMonth) - .replace(/y{1,4}/g, vYear) - .replace(/hh/g, vHour) - .replace(/mm/g, vMinute) - .replace(/ss/g, vSecond) - .replace(/SSS/g, vMillisecond) - .replace(/O/g, vTimeZone); - return formatted; - -}; diff --git a/node_modules/karma/node_modules/log4js/lib/debug.js b/node_modules/karma/node_modules/log4js/lib/debug.js deleted file mode 100644 index e3e65816..00000000 --- a/node_modules/karma/node_modules/log4js/lib/debug.js +++ /dev/null @@ -1,15 +0,0 @@ -"use strict"; - -module.exports = function(label) { - var debug; - - if (process.env.NODE_DEBUG && /\blog4js\b/.test(process.env.NODE_DEBUG)) { - debug = function(message) { - console.error('LOG4JS: (%s) %s', label, message); - }; - } else { - debug = function() { }; - } - - return debug; -}; diff --git a/node_modules/karma/node_modules/log4js/lib/layouts.js b/node_modules/karma/node_modules/log4js/lib/layouts.js deleted file mode 100644 index 9cfd0353..00000000 --- a/node_modules/karma/node_modules/log4js/lib/layouts.js +++ /dev/null @@ -1,318 +0,0 @@ -"use strict"; -var dateFormat = require('./date_format') -, os = require('os') -, eol = os.EOL || '\n' -, util = require('util') -, replacementRegExp = /%[sdj]/g -, layoutMakers = { - "messagePassThrough": function() { return messagePassThroughLayout; }, - "basic": function() { return basicLayout; }, - "colored": function() { return colouredLayout; }, - "coloured": function() { return colouredLayout; }, - "pattern": function (config) { - return patternLayout(config && config.pattern, config && config.tokens); - } -} -, colours = { - ALL: "grey", - TRACE: "blue", - DEBUG: "cyan", - INFO: "green", - WARN: "yellow", - ERROR: "red", - FATAL: "magenta", - OFF: "grey" -}; - -function wrapErrorsWithInspect(items) { - return items.map(function(item) { - if ((item instanceof Error) && item.stack) { - return { inspect: function() { return util.format(item) + '\n' + item.stack; } }; - } else { - return item; - } - }); -} - -function formatLogData(logData) { - var data = Array.isArray(logData) ? logData : Array.prototype.slice.call(arguments); - return util.format.apply(util, wrapErrorsWithInspect(data)); -} - -var styles = { - //styles - 'bold' : [1, 22], - 'italic' : [3, 23], - 'underline' : [4, 24], - 'inverse' : [7, 27], - //grayscale - 'white' : [37, 39], - 'grey' : [90, 39], - 'black' : [90, 39], - //colors - 'blue' : [34, 39], - 'cyan' : [36, 39], - 'green' : [32, 39], - 'magenta' : [35, 39], - 'red' : [31, 39], - 'yellow' : [33, 39] -}; - -function colorizeStart(style) { - return style ? '\x1B[' + styles[style][0] + 'm' : ''; -} -function colorizeEnd(style) { - return style ? '\x1B[' + styles[style][1] + 'm' : ''; -} -/** - * Taken from masylum's fork (https://github.com/masylum/log4js-node) - */ -function colorize (str, style) { - return colorizeStart(style) + str + colorizeEnd(style); -} - -function timestampLevelAndCategory(loggingEvent, colour) { - var output = colorize( - formatLogData( - '[%s] [%s] %s - ' - , dateFormat.asString(loggingEvent.startTime) - , loggingEvent.level - , loggingEvent.categoryName - ) - , colour - ); - return output; -} - -/** - * BasicLayout is a simple layout for storing the logs. The logs are stored - * in following format: - *
    - * [startTime] [logLevel] categoryName - message\n
    - * 
    - * - * @author Stephan Strittmatter - */ -function basicLayout (loggingEvent) { - return timestampLevelAndCategory(loggingEvent) + formatLogData(loggingEvent.data); -} - -/** - * colouredLayout - taken from masylum's fork. - * same as basicLayout, but with colours. - */ -function colouredLayout (loggingEvent) { - return timestampLevelAndCategory( - loggingEvent, - colours[loggingEvent.level.toString()] - ) + formatLogData(loggingEvent.data); -} - -function messagePassThroughLayout (loggingEvent) { - return formatLogData(loggingEvent.data); -} - -/** - * PatternLayout - * Format for specifiers is %[padding].[truncation][field]{[format]} - * e.g. %5.10p - left pad the log level by 5 characters, up to a max of 10 - * Fields can be any of: - * - %r time in toLocaleTimeString format - * - %p log level - * - %c log category - * - %h hostname - * - %m log data - * - %d date in various formats - * - %% % - * - %n newline - * - %x{} add dynamic tokens to your log. Tokens are specified in the tokens parameter - * You can use %[ and %] to define a colored block. - * - * Tokens are specified as simple key:value objects. - * The key represents the token name whereas the value can be a string or function - * which is called to extract the value to put in the log message. If token is not - * found, it doesn't replace the field. - * - * A sample token would be: { "pid" : function() { return process.pid; } } - * - * Takes a pattern string, array of tokens and returns a layout function. - * @param {String} Log format pattern String - * @param {object} map object of different tokens - * @return {Function} - * @author Stephan Strittmatter - * @author Jan Schmidle - */ -function patternLayout (pattern, tokens) { - var TTCC_CONVERSION_PATTERN = "%r %p %c - %m%n"; - var regex = /%(-?[0-9]+)?(\.?[0-9]+)?([\[\]cdhmnprx%])(\{([^\}]+)\})?|([^%]+)/; - - pattern = pattern || TTCC_CONVERSION_PATTERN; - - function categoryName(loggingEvent, specifier) { - var loggerName = loggingEvent.categoryName; - if (specifier) { - var precision = parseInt(specifier, 10); - var loggerNameBits = loggerName.split("."); - if (precision < loggerNameBits.length) { - loggerName = loggerNameBits.slice(loggerNameBits.length - precision).join("."); - } - } - return loggerName; - } - - function formatAsDate(loggingEvent, specifier) { - var format = dateFormat.ISO8601_FORMAT; - if (specifier) { - format = specifier; - // Pick up special cases - if (format == "ISO8601") { - format = dateFormat.ISO8601_FORMAT; - } else if (format == "ISO8601_WITH_TZ_OFFSET") { - format = dateFormat.ISO8601_WITH_TZ_OFFSET_FORMAT; - } else if (format == "ABSOLUTE") { - format = dateFormat.ABSOLUTETIME_FORMAT; - } else if (format == "DATE") { - format = dateFormat.DATETIME_FORMAT; - } - } - // Format the date - return dateFormat.asString(format, loggingEvent.startTime); - } - - function hostname() { - return os.hostname().toString(); - } - - function formatMessage(loggingEvent) { - return formatLogData(loggingEvent.data); - } - - function endOfLine() { - return eol; - } - - function logLevel(loggingEvent) { - return loggingEvent.level.toString(); - } - - function startTime(loggingEvent) { - return "" + loggingEvent.startTime.toLocaleTimeString(); - } - - function startColour(loggingEvent) { - return colorizeStart(colours[loggingEvent.level.toString()]); - } - - function endColour(loggingEvent) { - return colorizeEnd(colours[loggingEvent.level.toString()]); - } - - function percent() { - return '%'; - } - - function userDefined(loggingEvent, specifier) { - if (typeof(tokens[specifier]) !== 'undefined') { - if (typeof(tokens[specifier]) === 'function') { - return tokens[specifier](loggingEvent); - } else { - return tokens[specifier]; - } - } - return null; - } - - var replacers = { - 'c': categoryName, - 'd': formatAsDate, - 'h': hostname, - 'm': formatMessage, - 'n': endOfLine, - 'p': logLevel, - 'r': startTime, - '[': startColour, - ']': endColour, - '%': percent, - 'x': userDefined - }; - - function replaceToken(conversionCharacter, loggingEvent, specifier) { - return replacers[conversionCharacter](loggingEvent, specifier); - } - - function truncate(truncation, toTruncate) { - var len; - if (truncation) { - len = parseInt(truncation.substr(1), 10); - return toTruncate.substring(0, len); - } - - return toTruncate; - } - - function pad(padding, toPad) { - var len; - if (padding) { - if (padding.charAt(0) == "-") { - len = parseInt(padding.substr(1), 10); - // Right pad with spaces - while (toPad.length < len) { - toPad += " "; - } - } else { - len = parseInt(padding, 10); - // Left pad with spaces - while (toPad.length < len) { - toPad = " " + toPad; - } - } - } - return toPad; - } - - return function(loggingEvent) { - var formattedString = ""; - var result; - var searchString = pattern; - - while ((result = regex.exec(searchString))) { - var matchedString = result[0]; - var padding = result[1]; - var truncation = result[2]; - var conversionCharacter = result[3]; - var specifier = result[5]; - var text = result[6]; - - // Check if the pattern matched was just normal text - if (text) { - formattedString += "" + text; - } else { - // Create a raw replacement string based on the conversion - // character and specifier - var replacement = - replaceToken(conversionCharacter, loggingEvent, specifier) || - matchedString; - - // Format the replacement according to any padding or - // truncation specified - replacement = truncate(truncation, replacement); - replacement = pad(padding, replacement); - formattedString += replacement; - } - searchString = searchString.substr(result.index + result[0].length); - } - return formattedString; - }; - -} - -module.exports = { - basicLayout: basicLayout, - messagePassThroughLayout: messagePassThroughLayout, - patternLayout: patternLayout, - colouredLayout: colouredLayout, - coloredLayout: colouredLayout, - layout: function(name, config) { - return layoutMakers[name] && layoutMakers[name](config); - } -}; diff --git a/node_modules/karma/node_modules/log4js/lib/levels.js b/node_modules/karma/node_modules/log4js/lib/levels.js deleted file mode 100644 index 06370997..00000000 --- a/node_modules/karma/node_modules/log4js/lib/levels.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; - -function Level(level, levelStr) { - this.level = level; - this.levelStr = levelStr; -} - -/** - * converts given String to corresponding Level - * @param {String} sArg String value of Level OR Log4js.Level - * @param {Log4js.Level} defaultLevel default Level, if no String representation - * @return Level object - * @type Log4js.Level - */ -function toLevel(sArg, defaultLevel) { - - if (!sArg) { - return defaultLevel; - } - - if (typeof sArg == "string") { - var s = sArg.toUpperCase(); - if (module.exports[s]) { - return module.exports[s]; - } else { - return defaultLevel; - } - } - - return toLevel(sArg.toString()); -} - -Level.prototype.toString = function() { - return this.levelStr; -}; - -Level.prototype.isLessThanOrEqualTo = function(otherLevel) { - if (typeof otherLevel === "string") { - otherLevel = toLevel(otherLevel); - } - return this.level <= otherLevel.level; -}; - -Level.prototype.isGreaterThanOrEqualTo = function(otherLevel) { - if (typeof otherLevel === "string") { - otherLevel = toLevel(otherLevel); - } - return this.level >= otherLevel.level; -}; - -Level.prototype.isEqualTo = function(otherLevel) { - if (typeof otherLevel == "string") { - otherLevel = toLevel(otherLevel); - } - return this.level === otherLevel.level; -}; - -module.exports = { - ALL: new Level(Number.MIN_VALUE, "ALL"), - TRACE: new Level(5000, "TRACE"), - DEBUG: new Level(10000, "DEBUG"), - INFO: new Level(20000, "INFO"), - WARN: new Level(30000, "WARN"), - ERROR: new Level(40000, "ERROR"), - FATAL: new Level(50000, "FATAL"), - OFF: new Level(Number.MAX_VALUE, "OFF"), - toLevel: toLevel -}; diff --git a/node_modules/karma/node_modules/log4js/lib/log4js.js b/node_modules/karma/node_modules/log4js/lib/log4js.js deleted file mode 100644 index fc3bacad..00000000 --- a/node_modules/karma/node_modules/log4js/lib/log4js.js +++ /dev/null @@ -1,327 +0,0 @@ -"use strict"; -/* - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @fileoverview log4js is a library to log in JavaScript in similar manner - * than in log4j for Java. The API should be nearly the same. - * - *

    Example:

    - *
    - *  var logging = require('log4js');
    - *  //add an appender that logs all messages to stdout.
    - *  logging.addAppender(logging.consoleAppender());
    - *  //add an appender that logs "some-category" to a file
    - *  logging.addAppender(logging.fileAppender("file.log"), "some-category");
    - *  //get a logger
    - *  var log = logging.getLogger("some-category");
    - *  log.setLevel(logging.levels.TRACE); //set the Level
    - *
    - *  ...
    - *
    - *  //call the log
    - *  log.trace("trace me" );
    - * 
    - * - * NOTE: the authors below are the original browser-based log4js authors - * don't try to contact them about bugs in this version :) - * @version 1.0 - * @author Stephan Strittmatter - http://jroller.com/page/stritti - * @author Seth Chisamore - http://www.chisamore.com - * @since 2005-05-20 - * @static - * Website: http://log4js.berlios.de - */ -var events = require('events') -, fs = require('fs') -, path = require('path') -, util = require('util') -, layouts = require('./layouts') -, levels = require('./levels') -, LoggingEvent = require('./logger').LoggingEvent -, Logger = require('./logger').Logger -, ALL_CATEGORIES = '[all]' -, appenders = {} -, loggers = {} -, appenderMakers = {} -, defaultConfig = { - appenders: [ - { type: "console" } - ], - replaceConsole: false -}; - -/** - * Get a logger instance. Instance is cached on categoryName level. - * @param {String} categoryName name of category to log to. - * @return {Logger} instance of logger for the category - * @static - */ -function getLogger (categoryName) { - - // Use default logger if categoryName is not specified or invalid - if (typeof categoryName !== "string") { - categoryName = Logger.DEFAULT_CATEGORY; - } - - var appenderList; - if (!loggers[categoryName]) { - // Create the logger for this name if it doesn't already exist - loggers[categoryName] = new Logger(categoryName); - if (appenders[categoryName]) { - appenderList = appenders[categoryName]; - appenderList.forEach(function(appender) { - loggers[categoryName].addListener("log", appender); - }); - } - if (appenders[ALL_CATEGORIES]) { - appenderList = appenders[ALL_CATEGORIES]; - appenderList.forEach(function(appender) { - loggers[categoryName].addListener("log", appender); - }); - } - } - - return loggers[categoryName]; -} - -/** - * args are appender, then zero or more categories - */ -function addAppender () { - var args = Array.prototype.slice.call(arguments); - var appender = args.shift(); - if (args.length === 0 || args[0] === undefined) { - args = [ ALL_CATEGORIES ]; - } - //argument may already be an array - if (Array.isArray(args[0])) { - args = args[0]; - } - - args.forEach(function(category) { - addAppenderToCategory(appender, category); - - if (category === ALL_CATEGORIES) { - addAppenderToAllLoggers(appender); - } else if (loggers[category]) { - loggers[category].addListener("log", appender); - } - }); -} - -function addAppenderToAllLoggers(appender) { - for (var logger in loggers) { - if (loggers.hasOwnProperty(logger)) { - loggers[logger].addListener("log", appender); - } - } -} - -function addAppenderToCategory(appender, category) { - if (!appenders[category]) { - appenders[category] = []; - } - appenders[category].push(appender); -} - -function clearAppenders () { - appenders = {}; - for (var logger in loggers) { - if (loggers.hasOwnProperty(logger)) { - loggers[logger].removeAllListeners("log"); - } - } -} - -function configureAppenders(appenderList, options) { - clearAppenders(); - if (appenderList) { - appenderList.forEach(function(appenderConfig) { - loadAppender(appenderConfig.type); - var appender; - appenderConfig.makers = appenderMakers; - try { - appender = appenderMakers[appenderConfig.type](appenderConfig, options); - addAppender(appender, appenderConfig.category); - } catch(e) { - throw new Error("log4js configuration problem for " + util.inspect(appenderConfig), e); - } - }); - } -} - -function configureLevels(levels) { - if (levels) { - for (var category in levels) { - if (levels.hasOwnProperty(category)) { - getLogger(category).setLevel(levels[category]); - } - } - } -} - -function setGlobalLogLevel(level) { - Logger.prototype.level = levels.toLevel(level, levels.TRACE); -} - -/** - * Get the default logger instance. - * @return {Logger} instance of default logger - * @static - */ -function getDefaultLogger () { - return getLogger(Logger.DEFAULT_CATEGORY); -} - -var configState = {}; - -function loadConfigurationFile(filename) { - if (filename) { - return JSON.parse(fs.readFileSync(filename, "utf8")); - } - return undefined; -} - -function configureOnceOff(config, options) { - if (config) { - try { - configureAppenders(config.appenders, options); - configureLevels(config.levels); - - if (config.replaceConsole) { - replaceConsole(); - } else { - restoreConsole(); - } - } catch (e) { - throw new Error( - "Problem reading log4js config " + util.inspect(config) + - ". Error was \"" + e.message + "\" (" + e.stack + ")" - ); - } - } -} - -function reloadConfiguration() { - var mtime = getMTime(configState.filename); - if (!mtime) return; - - if (configState.lastMTime && (mtime.getTime() > configState.lastMTime.getTime())) { - configureOnceOff(loadConfigurationFile(configState.filename)); - } - configState.lastMTime = mtime; -} - -function getMTime(filename) { - var mtime; - try { - mtime = fs.statSync(configState.filename).mtime; - } catch (e) { - getLogger('log4js').warn('Failed to load configuration file ' + filename); - } - return mtime; -} - -function initReloadConfiguration(filename, options) { - if (configState.timerId) { - clearInterval(configState.timerId); - delete configState.timerId; - } - configState.filename = filename; - configState.lastMTime = getMTime(filename); - configState.timerId = setInterval(reloadConfiguration, options.reloadSecs*1000); -} - -function configure(configurationFileOrObject, options) { - var config = configurationFileOrObject; - config = config || process.env.LOG4JS_CONFIG; - options = options || {}; - - if (config === undefined || config === null || typeof(config) === 'string') { - if (options.reloadSecs) { - initReloadConfiguration(config, options); - } - config = loadConfigurationFile(config) || defaultConfig; - } else { - if (options.reloadSecs) { - getLogger('log4js').warn( - 'Ignoring configuration reload parameter for "object" configuration.' - ); - } - } - configureOnceOff(config, options); -} - -var originalConsoleFunctions = { - log: console.log, - debug: console.debug, - info: console.info, - warn: console.warn, - error: console.error -}; - -function replaceConsole(logger) { - function replaceWith(fn) { - return function() { - fn.apply(logger, arguments); - }; - } - logger = logger || getLogger("console"); - ['log','debug','info','warn','error'].forEach(function (item) { - console[item] = replaceWith(item === 'log' ? logger.info : logger[item]); - }); -} - -function restoreConsole() { - ['log', 'debug', 'info', 'warn', 'error'].forEach(function (item) { - console[item] = originalConsoleFunctions[item]; - }); -} - -function loadAppender(appender) { - var appenderModule; - try { - appenderModule = require('./appenders/' + appender); - } catch (e) { - appenderModule = require(appender); - } - module.exports.appenders[appender] = appenderModule.appender.bind(appenderModule); - appenderMakers[appender] = appenderModule.configure.bind(appenderModule); -} - -module.exports = { - getLogger: getLogger, - getDefaultLogger: getDefaultLogger, - - addAppender: addAppender, - loadAppender: loadAppender, - clearAppenders: clearAppenders, - configure: configure, - - replaceConsole: replaceConsole, - restoreConsole: restoreConsole, - - levels: levels, - setGlobalLogLevel: setGlobalLogLevel, - - layouts: layouts, - appenders: {}, - appenderMakers: appenderMakers, - connectLogger: require('./connect-logger').connectLogger -}; - -//set ourselves up -configure(); - diff --git a/node_modules/karma/node_modules/log4js/lib/log4js.json b/node_modules/karma/node_modules/log4js/lib/log4js.json deleted file mode 100644 index 7b6d3e7d..00000000 --- a/node_modules/karma/node_modules/log4js/lib/log4js.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "appenders": [ - { - "type": "console" - } - ] -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/lib/logger.js b/node_modules/karma/node_modules/log4js/lib/logger.js deleted file mode 100644 index 4da0dafb..00000000 --- a/node_modules/karma/node_modules/log4js/lib/logger.js +++ /dev/null @@ -1,80 +0,0 @@ -"use strict"; -var levels = require('./levels') -, util = require('util') -, events = require('events') -, DEFAULT_CATEGORY = '[default]'; - -/** - * Models a logging event. - * @constructor - * @param {String} categoryName name of category - * @param {Log4js.Level} level level of message - * @param {Array} data objects to log - * @param {Log4js.Logger} logger the associated logger - * @author Seth Chisamore - */ -function LoggingEvent (categoryName, level, data, logger) { - this.startTime = new Date(); - this.categoryName = categoryName; - this.data = data; - this.level = level; - this.logger = logger; -} - -/** - * Logger to log messages. - * use {@see Log4js#getLogger(String)} to get an instance. - * @constructor - * @param name name of category to log to - * @author Stephan Strittmatter - */ -function Logger (name, level) { - this.category = name || DEFAULT_CATEGORY; - - if (level) { - this.setLevel(level); - } -} -util.inherits(Logger, events.EventEmitter); -Logger.DEFAULT_CATEGORY = DEFAULT_CATEGORY; -Logger.prototype.level = levels.TRACE; - -Logger.prototype.setLevel = function(level) { - this.level = levels.toLevel(level, this.level || levels.TRACE); -}; - -Logger.prototype.removeLevel = function() { - delete this.level; -}; - -Logger.prototype.log = function() { - var args = Array.prototype.slice.call(arguments) - , logLevel = args.shift() - , loggingEvent = new LoggingEvent(this.category, logLevel, args, this); - this.emit("log", loggingEvent); -}; - -Logger.prototype.isLevelEnabled = function(otherLevel) { - return this.level.isLessThanOrEqualTo(otherLevel); -}; - -['Trace','Debug','Info','Warn','Error','Fatal'].forEach( - function(levelString) { - var level = levels.toLevel(levelString); - Logger.prototype['is'+levelString+'Enabled'] = function() { - return this.isLevelEnabled(level); - }; - - Logger.prototype[levelString.toLowerCase()] = function () { - if (this.isLevelEnabled(level)) { - var args = Array.prototype.slice.call(arguments); - args.unshift(level); - Logger.prototype.log.apply(this, args); - } - }; - } -); - - -exports.LoggingEvent = LoggingEvent; -exports.Logger = Logger; diff --git a/node_modules/karma/node_modules/log4js/lib/streams/BaseRollingFileStream.js b/node_modules/karma/node_modules/log4js/lib/streams/BaseRollingFileStream.js deleted file mode 100644 index 5f036159..00000000 --- a/node_modules/karma/node_modules/log4js/lib/streams/BaseRollingFileStream.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -var fs = require('fs') -, stream -, debug = require('../debug')('BaseRollingFileStream') -, util = require('util') -, semver = require('semver'); - -if (semver.satisfies(process.version, '>=0.10.0')) { - stream = require('stream'); -} else { - stream = require('readable-stream'); -} - -module.exports = BaseRollingFileStream; - -function BaseRollingFileStream(filename, options) { - debug("In BaseRollingFileStream"); - this.filename = filename; - this.options = options || { encoding: 'utf8', mode: parseInt('0644', 8), flags: 'a' }; - this.currentSize = 0; - - function currentFileSize(file) { - var fileSize = 0; - try { - fileSize = fs.statSync(file).size; - } catch (e) { - // file does not exist - } - return fileSize; - } - - function throwErrorIfArgumentsAreNotValid() { - if (!filename) { - throw new Error("You must specify a filename"); - } - } - - throwErrorIfArgumentsAreNotValid(); - debug("Calling BaseRollingFileStream.super"); - BaseRollingFileStream.super_.call(this); - this.openTheStream(); - this.currentSize = currentFileSize(this.filename); -} -util.inherits(BaseRollingFileStream, stream.Writable); - -BaseRollingFileStream.prototype._write = function(chunk, encoding, callback) { - var that = this; - function writeTheChunk() { - debug("writing the chunk to the underlying stream"); - that.currentSize += chunk.length; - that.theStream.write(chunk, encoding, callback); - } - - debug("in _write"); - - if (this.shouldRoll()) { - this.currentSize = 0; - this.roll(this.filename, writeTheChunk); - } else { - writeTheChunk(); - } -}; - -BaseRollingFileStream.prototype.openTheStream = function(cb) { - debug("opening the underlying stream"); - this.theStream = fs.createWriteStream(this.filename, this.options); - if (cb) { - this.theStream.on("open", cb); - } -}; - -BaseRollingFileStream.prototype.closeTheStream = function(cb) { - debug("closing the underlying stream"); - this.theStream.end(cb); -}; - -BaseRollingFileStream.prototype.shouldRoll = function() { - return false; // default behaviour is never to roll -}; - -BaseRollingFileStream.prototype.roll = function(filename, callback) { - callback(); // default behaviour is not to do anything -}; - diff --git a/node_modules/karma/node_modules/log4js/lib/streams/DateRollingFileStream.js b/node_modules/karma/node_modules/log4js/lib/streams/DateRollingFileStream.js deleted file mode 100644 index 9da029a8..00000000 --- a/node_modules/karma/node_modules/log4js/lib/streams/DateRollingFileStream.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; -var BaseRollingFileStream = require('./BaseRollingFileStream') -, debug = require('../debug')('DateRollingFileStream') -, format = require('../date_format') -, async = require('async') -, fs = require('fs') -, util = require('util'); - -module.exports = DateRollingFileStream; - -function DateRollingFileStream(filename, pattern, options, now) { - debug("Now is " + now); - if (pattern && typeof(pattern) === 'object') { - now = options; - options = pattern; - pattern = null; - } - this.pattern = pattern || '.yyyy-MM-dd'; - this.now = now || Date.now; - this.lastTimeWeWroteSomething = format.asString(this.pattern, new Date(this.now())); - this.baseFilename = filename; - this.alwaysIncludePattern = false; - - if (options) { - if (options.alwaysIncludePattern) { - this.alwaysIncludePattern = true; - filename = this.baseFilename + this.lastTimeWeWroteSomething; - } - delete options.alwaysIncludePattern; - if (Object.keys(options).length === 0) { - options = null; - } - } - debug("this.now is " + this.now + ", now is " + now); - - DateRollingFileStream.super_.call(this, filename, options); -} -util.inherits(DateRollingFileStream, BaseRollingFileStream); - -DateRollingFileStream.prototype.shouldRoll = function() { - var lastTime = this.lastTimeWeWroteSomething, - thisTime = format.asString(this.pattern, new Date(this.now())); - - debug("DateRollingFileStream.shouldRoll with now = " + - this.now() + ", thisTime = " + thisTime + ", lastTime = " + lastTime); - - this.lastTimeWeWroteSomething = thisTime; - this.previousTime = lastTime; - - return thisTime !== lastTime; -}; - -DateRollingFileStream.prototype.roll = function(filename, callback) { - var that = this; - - debug("Starting roll"); - - if (this.alwaysIncludePattern) { - this.filename = this.baseFilename + this.lastTimeWeWroteSomething; - async.series([ - this.closeTheStream.bind(this), - this.openTheStream.bind(this) - ], callback); - } else { - var newFilename = this.baseFilename + this.previousTime; - async.series([ - this.closeTheStream.bind(this), - deleteAnyExistingFile, - renameTheCurrentFile, - this.openTheStream.bind(this) - ], callback); - } - - function deleteAnyExistingFile(cb) { - //on windows, you can get a EEXIST error if you rename a file to an existing file - //so, we'll try to delete the file we're renaming to first - fs.unlink(newFilename, function (err) { - //ignore err: if we could not delete, it's most likely that it doesn't exist - cb(); - }); - } - - function renameTheCurrentFile(cb) { - debug("Renaming the " + filename + " -> " + newFilename); - fs.rename(filename, newFilename, cb); - } - -}; diff --git a/node_modules/karma/node_modules/log4js/lib/streams/RollingFileStream.js b/node_modules/karma/node_modules/log4js/lib/streams/RollingFileStream.js deleted file mode 100644 index 64a0725a..00000000 --- a/node_modules/karma/node_modules/log4js/lib/streams/RollingFileStream.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -var BaseRollingFileStream = require('./BaseRollingFileStream') -, debug = require('../debug')('RollingFileStream') -, util = require('util') -, path = require('path') -, fs = require('fs') -, async = require('async'); - -module.exports = RollingFileStream; - -function RollingFileStream (filename, size, backups, options) { - this.size = size; - this.backups = backups || 1; - - function throwErrorIfArgumentsAreNotValid() { - if (!filename || !size || size <= 0) { - throw new Error("You must specify a filename and file size"); - } - } - - throwErrorIfArgumentsAreNotValid(); - - RollingFileStream.super_.call(this, filename, options); -} -util.inherits(RollingFileStream, BaseRollingFileStream); - -RollingFileStream.prototype.shouldRoll = function() { - debug("should roll with current size %d, and max size %d", this.currentSize, this.size); - return this.currentSize >= this.size; -}; - -RollingFileStream.prototype.roll = function(filename, callback) { - var that = this, - nameMatcher = new RegExp('^' + path.basename(filename)); - - function justTheseFiles (item) { - return nameMatcher.test(item); - } - - function index(filename_) { - return parseInt(filename_.substring((path.basename(filename) + '.').length), 10) || 0; - } - - function byIndex(a, b) { - if (index(a) > index(b)) { - return 1; - } else if (index(a) < index(b) ) { - return -1; - } else { - return 0; - } - } - - function increaseFileIndex (fileToRename, cb) { - var idx = index(fileToRename); - debug('Index of ' + fileToRename + ' is ' + idx); - if (idx < that.backups) { - //on windows, you can get a EEXIST error if you rename a file to an existing file - //so, we'll try to delete the file we're renaming to first - fs.unlink(filename + '.' + (idx+1), function (err) { - //ignore err: if we could not delete, it's most likely that it doesn't exist - debug('Renaming ' + fileToRename + ' -> ' + filename + '.' + (idx+1)); - fs.rename(path.join(path.dirname(filename), fileToRename), filename + '.' + (idx + 1), cb); - }); - } else { - cb(); - } - } - - function renameTheFiles(cb) { - //roll the backups (rename file.n to file.n+1, where n <= numBackups) - debug("Renaming the old files"); - fs.readdir(path.dirname(filename), function (err, files) { - async.forEachSeries( - files.filter(justTheseFiles).sort(byIndex).reverse(), - increaseFileIndex, - cb - ); - }); - } - - debug("Rolling, rolling, rolling"); - async.series([ - this.closeTheStream.bind(this), - renameTheFiles, - this.openTheStream.bind(this) - ], callback); - -}; diff --git a/node_modules/karma/node_modules/log4js/lib/streams/index.js b/node_modules/karma/node_modules/log4js/lib/streams/index.js deleted file mode 100644 index f9f57b99..00000000 --- a/node_modules/karma/node_modules/log4js/lib/streams/index.js +++ /dev/null @@ -1,2 +0,0 @@ -exports.RollingFileStream = require('./RollingFileStream'); -exports.DateRollingFileStream = require('./DateRollingFileStream'); diff --git a/node_modules/karma/node_modules/log4js/node_modules/.bin/semver b/node_modules/karma/node_modules/log4js/node_modules/.bin/semver deleted file mode 100755 index d4e637e6..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/.bin/semver +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , semver = require("../semver") - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a - switch (a = argv.shift()) { - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.filter(semver.valid) - if (!versions.length) return fail() - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i]) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function fail () { process.exit(1) } - -function success () { - versions.sort(semver.compare) - .map(semver.clean) - .forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["Usage: semver -v [-r ]" - ,"Test if version(s) satisfy the supplied range(s)," - ,"and sort them." - ,"" - ,"Multiple versions or ranges may be supplied." - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no versions are valid, or ranges are not satisfied," - ,"then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} - - diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/.gitmodules b/node_modules/karma/node_modules/log4js/node_modules/async/.gitmodules deleted file mode 100644 index a9aae984..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/.gitmodules +++ /dev/null @@ -1,9 +0,0 @@ -[submodule "deps/nodeunit"] - path = deps/nodeunit - url = git://github.com/caolan/nodeunit.git -[submodule "deps/UglifyJS"] - path = deps/UglifyJS - url = https://github.com/mishoo/UglifyJS.git -[submodule "deps/nodelint"] - path = deps/nodelint - url = https://github.com/tav/nodelint.git diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/LICENSE b/node_modules/karma/node_modules/log4js/node_modules/async/LICENSE deleted file mode 100644 index b7f9d500..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Caolan McMahon - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/Makefile b/node_modules/karma/node_modules/log4js/node_modules/async/Makefile deleted file mode 100644 index 00f07ea0..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -PACKAGE = asyncjs -NODEJS = $(if $(shell test -f /usr/bin/nodejs && echo "true"),nodejs,node) - -BUILDDIR = dist - -all: build - -build: $(wildcard lib/*.js) - mkdir -p $(BUILDDIR) - uglifyjs lib/async.js > $(BUILDDIR)/async.min.js - -test: - nodeunit test - -clean: - rm -rf $(BUILDDIR) - -lint: - nodelint --config nodelint.cfg lib/async.js - -.PHONY: test build all diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/README.md b/node_modules/karma/node_modules/log4js/node_modules/async/README.md deleted file mode 100644 index f3c44ac8..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/README.md +++ /dev/null @@ -1,1009 +0,0 @@ -# Async.js - -Async is a utility module which provides straight-forward, powerful functions -for working with asynchronous JavaScript. Although originally designed for -use with [node.js](http://nodejs.org), it can also be used directly in the -browser. - -Async provides around 20 functions that include the usual 'functional' -suspects (map, reduce, filter, forEach…) as well as some common patterns -for asynchronous control flow (parallel, series, waterfall…). All these -functions assume you follow the node.js convention of providing a single -callback as the last argument of your async function. - - -## Quick Examples - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - - async.parallel([ - function(){ ... }, - function(){ ... } - ], callback); - - async.series([ - function(){ ... }, - function(){ ... } - ]); - -There are many more functions available so take a look at the docs below for a -full list. This module aims to be comprehensive, so if you feel anything is -missing please create a GitHub issue for it. - - -## Download - -Releases are available for download from -[GitHub](http://github.com/caolan/async/downloads). -Alternatively, you can install using Node Package Manager (npm): - - npm install async - - -__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed - -__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped - - -## In the Browser - -So far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage: - - - - - -## Documentation - -### Collections - -* [forEach](#forEach) -* [map](#map) -* [filter](#filter) -* [reject](#reject) -* [reduce](#reduce) -* [detect](#detect) -* [sortBy](#sortBy) -* [some](#some) -* [every](#every) -* [concat](#concat) - -### Control Flow - -* [series](#series) -* [parallel](#parallel) -* [whilst](#whilst) -* [until](#until) -* [waterfall](#waterfall) -* [queue](#queue) -* [auto](#auto) -* [iterator](#iterator) -* [apply](#apply) -* [nextTick](#nextTick) - -### Utils - -* [memoize](#memoize) -* [unmemoize](#unmemoize) -* [log](#log) -* [dir](#dir) -* [noConflict](#noConflict) - - -## Collections - -
    -### forEach(arr, iterator, callback) - -Applies an iterator function to each item in an array, in parallel. -The iterator is called with an item from the list and a callback for when it -has finished. If the iterator passes an error to this callback, the main -callback for the forEach function is immediately called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // assuming openFiles is an array of file names and saveFile is a function - // to save the modified contents of that file: - - async.forEach(openFiles, saveFile, function(err){ - // if any of the saves produced an error, err would equal that error - }); - ---------------------------------------- - - -### forEachSeries(arr, iterator, callback) - -The same as forEach only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. This means the iterator functions will complete in order. - - ---------------------------------------- - - -### forEachLimit(arr, limit, iterator, callback) - -The same as forEach only the iterator is applied to batches of items in the -array, in series. The next batch of iterators is only called once the current -one has completed processing. - -__Arguments__ - -* arr - An array to iterate over. -* limit - How many items should be in each batch. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(err) - A callback which is called after all the iterator functions - have finished, or an error has occurred. - -__Example__ - - // Assume documents is an array of JSON objects and requestApi is a - // function that interacts with a rate-limited REST api. - - async.forEachLimit(documents, 20, requestApi, function(err){ - // if any of the saves produced an error, err would equal that error - }); ---------------------------------------- - - -### map(arr, iterator, callback) - -Produces a new array of values by mapping each value in the given array through -the iterator function. The iterator is called with an item from the array and a -callback for when it has finished processing. The callback takes 2 arguments, -an error and the transformed item from the array. If the iterator passes an -error to this callback, the main callback for the map function is immediately -called with the error. - -Note, that since this function applies the iterator to each item in parallel -there is no guarantee that the iterator functions will complete in order, however -the results array will be in the same order as the original array. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a transformed item. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array of the - transformed items from the original array. - -__Example__ - - async.map(['file1','file2','file3'], fs.stat, function(err, results){ - // results is now an array of stats for each file - }); - ---------------------------------------- - - -### mapSeries(arr, iterator, callback) - -The same as map only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - - ---------------------------------------- - - -### filter(arr, iterator, callback) - -__Alias:__ select - -Returns a new array of all the values which pass an async truth test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. This operation is -performed in parallel, but the results array will be in the same order as the -original. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(results) - A callback which is called after all the iterator - functions have finished. - -__Example__ - - async.filter(['file1','file2','file3'], path.exists, function(results){ - // results now equals an array of the existing files - }); - ---------------------------------------- - - -### filterSeries(arr, iterator, callback) - -__alias:__ selectSeries - -The same as filter only the iterator is applied to each item in the array in -series. The next iterator is only called once the current one has completed -processing. The results array will be in the same order as the original. - ---------------------------------------- - - -### reject(arr, iterator, callback) - -The opposite of filter. Removes values that pass an async truth test. - ---------------------------------------- - - -### rejectSeries(arr, iterator, callback) - -The same as filter, only the iterator is applied to each item in the array -in series. - - ---------------------------------------- - - -### reduce(arr, memo, iterator, callback) - -__aliases:__ inject, foldl - -Reduces a list of values into a single value using an async iterator to return -each successive step. Memo is the initial state of the reduction. This -function only operates in series. For performance reasons, it may make sense to -split a call to this function into a parallel map, then use the normal -Array.prototype.reduce on the results. This function is for situations where -each step in the reduction needs to be async, if you can get the data before -reducing it then its probably a good idea to do so. - -__Arguments__ - -* arr - An array to iterate over. -* memo - The initial state of the reduction. -* iterator(memo, item, callback) - A function applied to each item in the - array to produce the next step in the reduction. The iterator is passed a - callback which accepts an optional error as its first argument, and the state - of the reduction as the second. If an error is passed to the callback, the - reduction is stopped and the main callback is immediately called with the - error. -* callback(err, result) - A callback which is called after all the iterator - functions have finished. Result is the reduced value. - -__Example__ - - async.reduce([1,2,3], 0, function(memo, item, callback){ - // pointless async: - process.nextTick(function(){ - callback(null, memo + item) - }); - }, function(err, result){ - // result is now equal to the last value of memo, which is 6 - }); - ---------------------------------------- - - -### reduceRight(arr, memo, iterator, callback) - -__Alias:__ foldr - -Same as reduce, only operates on the items in the array in reverse order. - - ---------------------------------------- - - -### detect(arr, iterator, callback) - -Returns the first value in a list that passes an async truth test. The -iterator is applied in parallel, meaning the first iterator to return true will -fire the detect callback with that result. That means the result might not be -the first item in the original array (in terms of order) that passes the test. - -If order within the original array is important then look at detectSeries. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - the first item in the array that passes the truth test (iterator) or the - value undefined if none passed. - -__Example__ - - async.detect(['file1','file2','file3'], path.exists, function(result){ - // result now equals the first file in the list that exists - }); - ---------------------------------------- - - -### detectSeries(arr, iterator, callback) - -The same as detect, only the iterator is applied to each item in the array -in series. This means the result is always the first in the original array (in -terms of array order) that passes the truth test. - - ---------------------------------------- - - -### sortBy(arr, iterator, callback) - -Sorts a list by the results of running each value through an async iterator. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and a value to use as the sort criteria. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is the items from - the original array sorted by the values returned by the iterator calls. - -__Example__ - - async.sortBy(['file1','file2','file3'], function(file, callback){ - fs.stat(file, function(err, stats){ - callback(err, stats.mtime); - }); - }, function(err, results){ - // results is now the original array of files sorted by - // modified date - }); - - ---------------------------------------- - - -### some(arr, iterator, callback) - -__Alias:__ any - -Returns true if at least one element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. Once any iterator -call returns true, the main callback is immediately called. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called as soon as any iterator returns - true, or after all the iterator functions have finished. Result will be - either true or false depending on the values of the async tests. - -__Example__ - - async.some(['file1','file2','file3'], path.exists, function(result){ - // if result is true then at least one of the files exists - }); - ---------------------------------------- - - -### every(arr, iterator, callback) - -__Alias:__ all - -Returns true if every element in the array satisfies an async test. -_The callback for each iterator call only accepts a single argument of true or -false, it does not accept an error argument first!_ This is in-line with the -way node libraries work with truth tests like path.exists. - -__Arguments__ - -* arr - An array to iterate over. -* iterator(item, callback) - A truth test to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed. -* callback(result) - A callback which is called after all the iterator - functions have finished. Result will be either true or false depending on - the values of the async tests. - -__Example__ - - async.every(['file1','file2','file3'], path.exists, function(result){ - // if result is true then every file exists - }); - ---------------------------------------- - - -### concat(arr, iterator, callback) - -Applies an iterator to each item in a list, concatenating the results. Returns the -concatenated list. The iterators are called in parallel, and the results are -concatenated as they return. There is no guarantee that the results array will -be returned in the original order of the arguments passed to the iterator function. - -__Arguments__ - -* arr - An array to iterate over -* iterator(item, callback) - A function to apply to each item in the array. - The iterator is passed a callback which must be called once it has completed - with an error (which can be null) and an array of results. -* callback(err, results) - A callback which is called after all the iterator - functions have finished, or an error has occurred. Results is an array containing - the concatenated results of the iterator function. - -__Example__ - - async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){ - // files is now a list of filenames that exist in the 3 directories - }); - ---------------------------------------- - - -### concatSeries(arr, iterator, callback) - -Same as async.concat, but executes in series instead of parallel. - - -## Control Flow - - -### series(tasks, [callback]) - -Run an array of functions in series, each one running once the previous -function has completed. If any functions in the series pass an error to its -callback, no more functions are run and the callback for the series is -immediately called with the value of the error. Once the tasks have completed, -the results are passed to the final callback as an array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.series. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed - a callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.series([ - function(callback){ - // do some stuff ... - callback(null, 'one'); - }, - function(callback){ - // do some more stuff ... - callback(null, 'two'); - }, - ], - // optional callback - function(err, results){ - // results is now equal to ['one', 'two'] - }); - - - // an example using an object instead of an array - async.series({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equal to: {one: 1, two: 2} - }); - - ---------------------------------------- - - -### parallel(tasks, [callback]) - -Run an array of functions in parallel, without waiting until the previous -function has completed. If any of the functions pass an error to its -callback, the main callback is immediately called with the value of the error. -Once the tasks have completed, the results are passed to the final callback as an -array. - -It is also possible to use an object instead of an array. Each property will be -run as a function and the results will be passed to the final callback as an object -instead of an array. This can be a more readable way of handling results from -async.parallel. - - -__Arguments__ - -* tasks - An array or object containing functions to run, each function is passed a - callback it must call on completion. -* callback(err, results) - An optional callback to run once all the functions - have completed. This function gets an array of all the arguments passed to - the callbacks used in the array. - -__Example__ - - async.parallel([ - function(callback){ - setTimeout(function(){ - callback(null, 'one'); - }, 200); - }, - function(callback){ - setTimeout(function(){ - callback(null, 'two'); - }, 100); - }, - ], - // optional callback - function(err, results){ - // in this case, the results array will equal ['two','one'] - // because the functions were run in parallel and the second - // function had a shorter timeout before calling the callback. - }); - - - // an example using an object instead of an array - async.parallel({ - one: function(callback){ - setTimeout(function(){ - callback(null, 1); - }, 200); - }, - two: function(callback){ - setTimeout(function(){ - callback(null, 2); - }, 100); - }, - }, - function(err, results) { - // results is now equals to: {one: 1, two: 2} - }); - - ---------------------------------------- - - -### whilst(test, fn, callback) - -Repeatedly call fn, while test returns true. Calls the callback when stopped, -or an error occurs. - -__Arguments__ - -* test() - synchronous truth test to perform before each execution of fn. -* fn(callback) - A function to call each time the test passes. The function is - passed a callback which must be called once it has completed with an optional - error as the first argument. -* callback(err) - A callback which is called after the test fails and repeated - execution of fn has stopped. - -__Example__ - - var count = 0; - - async.whilst( - function () { return count < 5; }, - function (callback) { - count++; - setTimeout(callback, 1000); - }, - function (err) { - // 5 seconds have passed - } - }); - - ---------------------------------------- - - -### until(test, fn, callback) - -Repeatedly call fn, until test returns true. Calls the callback when stopped, -or an error occurs. - -The inverse of async.whilst. - - ---------------------------------------- - - -### waterfall(tasks, [callback]) - -Runs an array of functions in series, each passing their results to the next in -the array. However, if any of the functions pass an error to the callback, the -next function is not executed and the main callback is immediately called with -the error. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. -* callback(err) - An optional callback to run once all the functions have - completed. This function gets passed any error that may have occurred. - -__Example__ - - async.waterfall([ - function(callback){ - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - callback(null, 'three'); - }, - function(arg1, callback){ - // arg1 now equals 'three' - callback(null, 'done'); - } - ]); - - ---------------------------------------- - - -### queue(worker, concurrency) - -Creates a queue object with the specified concurrency. Tasks added to the -queue will be processed in parallel (up to the concurrency limit). If all -workers are in progress, the task is queued until one is available. Once -a worker has completed a task, the task's callback is called. - -__Arguments__ - -* worker(task, callback) - An asynchronous function for processing a queued - task. -* concurrency - An integer for determining how many worker functions should be - run in parallel. - -__Queue objects__ - -The queue object returned by this function has the following properties and -methods: - -* length() - a function returning the number of items waiting to be processed. -* concurrency - an integer for determining how many worker functions should be - run in parallel. This property can be changed after a queue is created to - alter the concurrency on-the-fly. -* push(task, [callback]) - add a new task to the queue, the callback is called - once the worker has finished processing the task. -* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued -* empty - a callback that is called when the last item from the queue is given to a worker -* drain - a callback that is called when the last item from the queue has returned from the worker - -__Example__ - - // create a queue object with concurrency 2 - - var q = async.queue(function (task, callback) { - console.log('hello ' + task.name); - callback(); - }, 2); - - - // assign a callback - q.drain = function() { - console.log('all items have been processed'); - } - - // add some items to the queue - - q.push({name: 'foo'}, function (err) { - console.log('finished processing foo'); - }); - q.push({name: 'bar'}, function (err) { - console.log('finished processing bar'); - }); - - ---------------------------------------- - - -### auto(tasks, [callback]) - -Determines the best order for running functions based on their requirements. -Each function can optionally depend on other functions being completed first, -and each function is run as soon as its requirements are satisfied. If any of -the functions pass an error to their callback, that function will not complete -(so any other functions depending on it will not run) and the main callback -will be called immediately with the error. Functions also receive an object -containing the results of functions on which they depend. - -__Arguments__ - -* tasks - An object literal containing named functions or an array of - requirements, with the function itself the last item in the array. The key - used for each function or array is used when specifying requirements. The - syntax is easier to understand by looking at the example. -* callback(err) - An optional callback which is called when all the tasks have - been completed. The callback may receive an error as an argument. - -__Example__ - - async.auto({ - get_data: function(callback){ - // async code to get some data - }, - make_folder: function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - }, - write_file: ['get_data', 'make_folder', function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - callback(null, filename); - }], - email_link: ['write_file', function(callback, results){ - // once the file is written let's email a link to it... - // results.write_file contains the filename returned by write_file. - }] - }); - -This is a fairly trivial example, but to do this using the basic parallel and -series functions would look like this: - - async.parallel([ - function(callback){ - // async code to get some data - }, - function(callback){ - // async code to create a directory to store a file in - // this is run at the same time as getting the data - } - ], - function(results){ - async.series([ - function(callback){ - // once there is some data and the directory exists, - // write the data to a file in the directory - }, - email_link: ['write_file', function(callback){ - // once the file is written let's email a link to it... - } - ]); - }); - -For a complicated series of async tasks using the auto function makes adding -new tasks much easier and makes the code more readable. - - ---------------------------------------- - - -### iterator(tasks) - -Creates an iterator function which calls the next function in the array, -returning a continuation to call the next one after that. Its also possible to -'peek' the next iterator by doing iterator.next(). - -This function is used internally by the async module but can be useful when -you want to manually control the flow of functions in series. - -__Arguments__ - -* tasks - An array of functions to run, each function is passed a callback it - must call on completion. - -__Example__ - - var iterator = async.iterator([ - function(){ sys.p('one'); }, - function(){ sys.p('two'); }, - function(){ sys.p('three'); } - ]); - - node> var iterator2 = iterator(); - 'one' - node> var iterator3 = iterator2(); - 'two' - node> iterator3(); - 'three' - node> var nextfn = iterator2.next(); - node> nextfn(); - 'three' - - ---------------------------------------- - - -### apply(function, arguments..) - -Creates a continuation function with some arguments already applied, a useful -shorthand when combined with other control flow functions. Any arguments -passed to the returned function are added to the arguments originally passed -to apply. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to automatically apply when the - continuation is called. - -__Example__ - - // using apply - - async.parallel([ - async.apply(fs.writeFile, 'testfile1', 'test1'), - async.apply(fs.writeFile, 'testfile2', 'test2'), - ]); - - - // the same process without using apply - - async.parallel([ - function(callback){ - fs.writeFile('testfile1', 'test1', callback); - }, - function(callback){ - fs.writeFile('testfile2', 'test2', callback); - }, - ]); - -It's possible to pass any number of additional arguments when calling the -continuation: - - node> var fn = async.apply(sys.puts, 'one'); - node> fn('two', 'three'); - one - two - three - ---------------------------------------- - - -### nextTick(callback) - -Calls the callback on a later loop around the event loop. In node.js this just -calls process.nextTick, in the browser it falls back to setTimeout(callback, 0), -which means other higher priority events may precede the execution of the callback. - -This is used internally for browser-compatibility purposes. - -__Arguments__ - -* callback - The function to call on a later loop around the event loop. - -__Example__ - - var call_order = []; - async.nextTick(function(){ - call_order.push('two'); - // call_order now equals ['one','two] - }); - call_order.push('one') - - -## Utils - - -### memoize(fn, [hasher]) - -Caches the results of an async function. When creating a hash to store function -results against, the callback is omitted from the hash and an optional hash -function can be used. - -__Arguments__ - -* fn - the function you to proxy and cache results from. -* hasher - an optional function for generating a custom hash for storing - results, it has all the arguments applied to it apart from the callback, and - must be synchronous. - -__Example__ - - var slow_fn = function (name, callback) { - // do something - callback(null, result); - }; - var fn = async.memoize(slow_fn); - - // fn can now be used as if it were slow_fn - fn('some name', function () { - // callback - }); - - -### unmemoize(fn) - -Undoes a memoized function, reverting it to the original, unmemoized -form. Comes handy in tests. - -__Arguments__ - -* fn - the memoized function - - -### log(function, arguments) - -Logs the result of an async function to the console. Only works in node.js or -in browsers that support console.log and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.log is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, 'hello ' + name); - }, 1000); - }; - - node> async.log(hello, 'world'); - 'hello world' - - ---------------------------------------- - - -### dir(function, arguments) - -Logs the result of an async function to the console using console.dir to -display the properties of the resulting object. Only works in node.js or -in browsers that support console.dir and console.error (such as FF and Chrome). -If multiple arguments are returned from the async function, console.dir is -called on each argument in order. - -__Arguments__ - -* function - The function you want to eventually apply all arguments to. -* arguments... - Any number of arguments to apply to the function. - -__Example__ - - var hello = function(name, callback){ - setTimeout(function(){ - callback(null, {hello: name}); - }, 1000); - }; - - node> async.dir(hello, 'world'); - {hello: 'world'} - - ---------------------------------------- - - -### noConflict() - -Changes the value of async back to its original value, returning a reference to the -async object. diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/deps/nodeunit.css b/node_modules/karma/node_modules/log4js/node_modules/async/deps/nodeunit.css deleted file mode 100644 index 274434a4..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/deps/nodeunit.css +++ /dev/null @@ -1,70 +0,0 @@ -/*! - * Styles taken from qunit.css - */ - -h1#nodeunit-header, h1.nodeunit-header { - padding: 15px; - font-size: large; - background-color: #06b; - color: white; - font-family: 'trebuchet ms', verdana, arial; - margin: 0; -} - -h1#nodeunit-header a { - color: white; -} - -h2#nodeunit-banner { - height: 2em; - border-bottom: 1px solid white; - background-color: #eee; - margin: 0; - font-family: 'trebuchet ms', verdana, arial; -} -h2#nodeunit-banner.pass { - background-color: green; -} -h2#nodeunit-banner.fail { - background-color: red; -} - -h2#nodeunit-userAgent, h2.nodeunit-userAgent { - padding: 10px; - background-color: #eee; - color: black; - margin: 0; - font-size: small; - font-weight: normal; - font-family: 'trebuchet ms', verdana, arial; - font-size: 10pt; -} - -div#nodeunit-testrunner-toolbar { - background: #eee; - border-top: 1px solid black; - padding: 10px; - font-family: 'trebuchet ms', verdana, arial; - margin: 0; - font-size: 10pt; -} - -ol#nodeunit-tests { - font-family: 'trebuchet ms', verdana, arial; - font-size: 10pt; -} -ol#nodeunit-tests li strong { - cursor:pointer; -} -ol#nodeunit-tests .pass { - color: green; -} -ol#nodeunit-tests .fail { - color: red; -} - -p#nodeunit-testresult { - margin-left: 1em; - font-size: 10pt; - font-family: 'trebuchet ms', verdana, arial; -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/deps/nodeunit.js b/node_modules/karma/node_modules/log4js/node_modules/async/deps/nodeunit.js deleted file mode 100644 index 59571840..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/deps/nodeunit.js +++ /dev/null @@ -1,1966 +0,0 @@ -/*! - * Nodeunit - * https://github.com/caolan/nodeunit - * Copyright (c) 2010 Caolan McMahon - * MIT Licensed - * - * json2.js - * http://www.JSON.org/json2.js - * Public Domain. - * NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - */ -nodeunit = (function(){ -/* - http://www.JSON.org/json2.js - 2010-11-17 - - Public Domain. - - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - - See http://www.JSON.org/js.html - - - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html - - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. - - - This file creates a global JSON object containing two methods: stringify - and parse. - - JSON.stringify(value, replacer, space) - value any JavaScript value, usually an object or array. - - replacer an optional parameter that determines how object - values are stringified for objects. It can be a - function or an array of strings. - - space an optional parameter that specifies the indentation - of nested structures. If it is omitted, the text will - be packed without extra whitespace. If it is a number, - it will specify the number of spaces to indent at each - level. If it is a string (such as '\t' or ' '), - it contains the characters used to indent at each level. - - This method produces a JSON text from a JavaScript value. - - When an object value is found, if the object contains a toJSON - method, its toJSON method will be called and the result will be - stringified. A toJSON method does not serialize: it returns the - value represented by the name/value pair that should be serialized, - or undefined if nothing should be serialized. The toJSON method - will be passed the key associated with the value, and this will be - bound to the value - - For example, this would serialize Dates as ISO strings. - - Date.prototype.toJSON = function (key) { - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - return this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z'; - }; - - You can provide an optional replacer method. It will be passed the - key and value of each member, with this bound to the containing - object. The value that is returned from your method will be - serialized. If your method returns undefined, then the member will - be excluded from the serialization. - - If the replacer parameter is an array of strings, then it will be - used to select the members to be serialized. It filters the results - such that only members with keys listed in the replacer array are - stringified. - - Values that do not have JSON representations, such as undefined or - functions, will not be serialized. Such values in objects will be - dropped; in arrays they will be replaced with null. You can use - a replacer function to replace those with JSON values. - JSON.stringify(undefined) returns undefined. - - The optional space parameter produces a stringification of the - value that is filled with line breaks and indentation to make it - easier to read. - - If the space parameter is a non-empty string, then that string will - be used for indentation. If the space parameter is a number, then - the indentation will be that many spaces. - - Example: - - text = JSON.stringify(['e', {pluribus: 'unum'}]); - // text is '["e",{"pluribus":"unum"}]' - - - text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); - // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' - - text = JSON.stringify([new Date()], function (key, value) { - return this[key] instanceof Date ? - 'Date(' + this[key] + ')' : value; - }); - // text is '["Date(---current time---)"]' - - - JSON.parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. - - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. - - Example: - - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. - - myData = JSON.parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); - - myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { - var d; - if (typeof value === 'string' && - value.slice(0, 5) === 'Date(' && - value.slice(-1) === ')') { - d = new Date(value.slice(5, -1)); - if (d) { - return d; - } - } - return value; - }); - - - This is a reference implementation. You are free to copy, modify, or - redistribute. -*/ - -/*jslint evil: true, strict: false, regexp: false */ - -/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, - call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, - lastIndex, length, parse, prototype, push, replace, slice, stringify, - test, toJSON, toString, valueOf -*/ - - -// Create a JSON object only if one does not already exist. We create the -// methods in a closure to avoid creating global variables. - -if (!this.JSON) { - this.JSON = {}; -} - -(function () { - "use strict"; - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - if (typeof Date.prototype.toJSON !== 'function') { - - Date.prototype.toJSON = function (key) { - - return isFinite(this.valueOf()) ? - this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z' : null; - }; - - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - - function quote(string) { - -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? - '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' ? c : - '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : - '"' + string + '"'; - } - - - function str(key, holder) { - -// Produce a string from holder[key]. - - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - -// If the value has a toJSON method, call it to obtain a replacement value. - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - -// If we were called with a replacer function, then call the replacer to -// obtain a replacement value. - - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - -// What happens next depends on the value's type. - - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - -// JSON numbers must be finite. Encode non-finite numbers as null. - - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - -// If the value is a boolean or null, convert it to a string. Note: -// typeof null does not produce 'null'. The case is included here in -// the remote chance that this gets fixed someday. - - return String(value); - -// If the type is 'object', we might be dealing with an object or an array or -// null. - - case 'object': - -// Due to a specification blunder in ECMAScript, typeof null is 'object', -// so watch out for that case. - - if (!value) { - return 'null'; - } - -// Make an array to hold the partial results of stringifying this object value. - - gap += indent; - partial = []; - -// Is the value an array? - - if (Object.prototype.toString.apply(value) === '[object Array]') { - -// The value is an array. Stringify every element. Use null as a placeholder -// for non-JSON values. - - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - -// Join all of the elements together, separated with commas, and wrap them in -// brackets. - - v = partial.length === 0 ? '[]' : - gap ? '[\n' + gap + - partial.join(',\n' + gap) + '\n' + - mind + ']' : - '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - -// If the replacer is an array, use it to select the members to be stringified. - - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - k = rep[i]; - if (typeof k === 'string') { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - -// Otherwise, iterate through all of the keys in the object. - - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - -// Join all of the member texts together, separated with commas, -// and wrap them in braces. - - v = partial.length === 0 ? '{}' : - gap ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + - mind + '}' : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - -// If the JSON object does not yet have a stringify method, give it one. - - if (typeof JSON.stringify !== 'function') { - JSON.stringify = function (value, replacer, space) { - -// The stringify method takes a value and an optional replacer, and an optional -// space parameter, and returns a JSON text. The replacer can be a function -// that can replace values, or an array of strings that will select the keys. -// A default replacer method can be provided. Use of the space parameter can -// produce text that is more easily readable. - - var i; - gap = ''; - indent = ''; - -// If the space parameter is a number, make an indent string containing that -// many spaces. - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - -// If the space parameter is a string, it will be used as the indent string. - - } else if (typeof space === 'string') { - indent = space; - } - -// If there is a replacer, it must be a function or an array. -// Otherwise, throw an error. - - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - -// Make a fake root object containing our value under the key of ''. -// Return the result of stringifying the value. - - return str('', {'': value}); - }; - } - - -// If the JSON object does not yet have a parse method, give it one. - - if (typeof JSON.parse !== 'function') { - JSON.parse = function (text, reviver) { - -// The parse method takes a text and an optional reviver function, and returns -// a JavaScript value if the text is a valid JSON text. - - var j; - - function walk(holder, key) { - -// The walk method is used to recursively walk the resulting structure so -// that modifications can be made. - - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - } - - -// Parsing happens in four stages. In the first stage, we replace certain -// Unicode characters with escape sequences. JavaScript handles many characters -// incorrectly, either silently deleting them, or treating them as line endings. - - text = String(text); - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + - ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - -// In the second stage, we run the text against regular expressions that look -// for non-JSON patterns. We are especially concerned with '()' and 'new' -// because they can cause invocation, and '=' because it can cause mutation. -// But just to be safe, we want to reject all unexpected forms. - -// We split the second stage into 4 regexp operations in order to work around -// crippling inefficiencies in IE's and Safari's regexp engines. First we -// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we -// replace all simple value tokens with ']' characters. Third, we delete all -// open brackets that follow a colon or comma or that begin the text. Finally, -// we look to see that the remaining characters are only whitespace or ']' or -// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. - - if (/^[\],:{}\s]*$/ -.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') -.replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') -.replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - -// In the third stage we use the eval function to compile the text into a -// JavaScript structure. The '{' operator is subject to a syntactic ambiguity -// in JavaScript: it can begin a block or an object literal. We wrap the text -// in parens to eliminate the ambiguity. - - j = eval('(' + text + ')'); - -// In the optional fourth stage, we recursively walk the new structure, passing -// each name/value pair to a reviver function for possible transformation. - - return typeof reviver === 'function' ? - walk({'': j}, '') : j; - } - -// If the text is not JSON parseable, then a SyntaxError is thrown. - - throw new SyntaxError('JSON.parse'); - }; - } -}()); -var assert = this.assert = {}; -var types = {}; -var core = {}; -var nodeunit = {}; -var reporter = {}; -/*global setTimeout: false, console: false */ -(function () { - - var async = {}; - - // global on the server, window in the browser - var root = this, - previous_async = root.async; - - if (typeof module !== 'undefined' && module.exports) { - module.exports = async; - } - else { - root.async = async; - } - - async.noConflict = function () { - root.async = previous_async; - return async; - }; - - //// cross-browser compatiblity functions //// - - var _forEach = function (arr, iterator) { - if (arr.forEach) { - return arr.forEach(iterator); - } - for (var i = 0; i < arr.length; i += 1) { - iterator(arr[i], i, arr); - } - }; - - var _map = function (arr, iterator) { - if (arr.map) { - return arr.map(iterator); - } - var results = []; - _forEach(arr, function (x, i, a) { - results.push(iterator(x, i, a)); - }); - return results; - }; - - var _reduce = function (arr, iterator, memo) { - if (arr.reduce) { - return arr.reduce(iterator, memo); - } - _forEach(arr, function (x, i, a) { - memo = iterator(memo, x, i, a); - }); - return memo; - }; - - var _keys = function (obj) { - if (Object.keys) { - return Object.keys(obj); - } - var keys = []; - for (var k in obj) { - if (obj.hasOwnProperty(k)) { - keys.push(k); - } - } - return keys; - }; - - var _indexOf = function (arr, item) { - if (arr.indexOf) { - return arr.indexOf(item); - } - for (var i = 0; i < arr.length; i += 1) { - if (arr[i] === item) { - return i; - } - } - return -1; - }; - - //// exported async module functions //// - - //// nextTick implementation with browser-compatible fallback //// - async.nextTick = function (fn) { - if (typeof process === 'undefined' || !(process.nextTick)) { - setTimeout(fn, 0); - } - else { - process.nextTick(fn); - } - }; - - async.forEach = function (arr, iterator, callback) { - if (!arr.length) { - return callback(); - } - var completed = 0; - _forEach(arr, function (x) { - iterator(x, function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(); - } - } - }); - }); - }; - - async.forEachSeries = function (arr, iterator, callback) { - if (!arr.length) { - return callback(); - } - var completed = 0; - var iterate = function () { - iterator(arr[completed], function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - completed += 1; - if (completed === arr.length) { - callback(); - } - else { - iterate(); - } - } - }); - }; - iterate(); - }; - - - var doParallel = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEach].concat(args)); - }; - }; - var doSeries = function (fn) { - return function () { - var args = Array.prototype.slice.call(arguments); - return fn.apply(null, [async.forEachSeries].concat(args)); - }; - }; - - - var _asyncMap = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (err, v) { - results[x.index] = v; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - }; - async.map = doParallel(_asyncMap); - async.mapSeries = doSeries(_asyncMap); - - - // reduce only has a series version, as doing reduce in parallel won't - // work in many situations. - async.reduce = function (arr, memo, iterator, callback) { - async.forEachSeries(arr, function (x, callback) { - iterator(memo, x, function (err, v) { - memo = v; - callback(err); - }); - }, function (err) { - callback(err, memo); - }); - }; - // inject alias - async.inject = async.reduce; - // foldl alias - async.foldl = async.reduce; - - async.reduceRight = function (arr, memo, iterator, callback) { - var reversed = _map(arr, function (x) { - return x; - }).reverse(); - async.reduce(reversed, memo, iterator, callback); - }; - // foldr alias - async.foldr = async.reduceRight; - - var _filter = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.filter = doParallel(_filter); - async.filterSeries = doSeries(_filter); - // select alias - async.select = async.filter; - async.selectSeries = async.filterSeries; - - var _reject = function (eachfn, arr, iterator, callback) { - var results = []; - arr = _map(arr, function (x, i) { - return {index: i, value: x}; - }); - eachfn(arr, function (x, callback) { - iterator(x.value, function (v) { - if (!v) { - results.push(x); - } - callback(); - }); - }, function (err) { - callback(_map(results.sort(function (a, b) { - return a.index - b.index; - }), function (x) { - return x.value; - })); - }); - }; - async.reject = doParallel(_reject); - async.rejectSeries = doSeries(_reject); - - var _detect = function (eachfn, arr, iterator, main_callback) { - eachfn(arr, function (x, callback) { - iterator(x, function (result) { - if (result) { - main_callback(x); - } - else { - callback(); - } - }); - }, function (err) { - main_callback(); - }); - }; - async.detect = doParallel(_detect); - async.detectSeries = doSeries(_detect); - - async.some = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (v) { - main_callback(true); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(false); - }); - }; - // any alias - async.any = async.some; - - async.every = function (arr, iterator, main_callback) { - async.forEach(arr, function (x, callback) { - iterator(x, function (v) { - if (!v) { - main_callback(false); - main_callback = function () {}; - } - callback(); - }); - }, function (err) { - main_callback(true); - }); - }; - // all alias - async.all = async.every; - - async.sortBy = function (arr, iterator, callback) { - async.map(arr, function (x, callback) { - iterator(x, function (err, criteria) { - if (err) { - callback(err); - } - else { - callback(null, {value: x, criteria: criteria}); - } - }); - }, function (err, results) { - if (err) { - return callback(err); - } - else { - var fn = function (left, right) { - var a = left.criteria, b = right.criteria; - return a < b ? -1 : a > b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var completed = []; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _forEach(listeners, function (fn) { - fn(); - }); - }; - - addListener(function () { - if (completed.length === keys.length) { - callback(null); - } - }); - - _forEach(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - if (err) { - callback(err); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - completed.push(k); - taskComplete(); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && _indexOf(completed, x) !== -1); - }, true); - }; - if (ready()) { - task[task.length - 1](taskCallback); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - if (!tasks.length) { - return callback(); - } - callback = callback || function () {}; - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.nextTick(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - async.parallel = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args || null); - }); - } - }, callback); - } - else { - var results = {}; - async.forEach(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args || null); - }); - } - }, callback); - } - else { - var results = {}; - async.forEachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.queue = function (worker, concurrency) { - var workers = 0; - var tasks = []; - var q = { - concurrency: concurrency, - push: function (data, callback) { - tasks.push({data: data, callback: callback}); - async.nextTick(q.process); - }, - process: function () { - if (workers < q.concurrency && tasks.length) { - var task = tasks.splice(0, 1)[0]; - workers += 1; - worker(task.data, function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - q.process(); - }); - } - }, - length: function () { - return tasks.length; - } - }; - return q; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _forEach(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - -}()); -(function(exports){ -/** - * This file is based on the node.js assert module, but with some small - * changes for browser-compatibility - * THIS FILE SHOULD BE BROWSER-COMPATIBLE JS! - */ - - -/** - * Added for browser compatibility - */ - -var _keys = function(obj){ - if(Object.keys) return Object.keys(obj); - var keys = []; - for(var k in obj){ - if(obj.hasOwnProperty(k)) keys.push(k); - } - return keys; -}; - - - -// http://wiki.commonjs.org/wiki/Unit_Testing/1.0 -// -// THIS IS NOT TESTED NOR LIKELY TO WORK OUTSIDE V8! -// -// Originally from narwhal.js (http://narwhaljs.org) -// Copyright (c) 2009 Thomas Robinson <280north.com> -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the 'Software'), to -// deal in the Software without restriction, including without limitation the -// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -// sell copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN -// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var pSlice = Array.prototype.slice; - -// 1. The assert module provides functions that throw -// AssertionError's when particular conditions are not met. The -// assert module must conform to the following interface. - -var assert = exports; - -// 2. The AssertionError is defined in assert. -// new assert.AssertionError({message: message, actual: actual, expected: expected}) - -assert.AssertionError = function AssertionError (options) { - this.name = "AssertionError"; - this.message = options.message; - this.actual = options.actual; - this.expected = options.expected; - this.operator = options.operator; - var stackStartFunction = options.stackStartFunction || fail; - - if (Error.captureStackTrace) { - Error.captureStackTrace(this, stackStartFunction); - } -}; -// code from util.inherits in node -assert.AssertionError.super_ = Error; - - -// EDITED FOR BROWSER COMPATIBILITY: replaced Object.create call -// TODO: test what effect this may have -var ctor = function () { this.constructor = assert.AssertionError; }; -ctor.prototype = Error.prototype; -assert.AssertionError.prototype = new ctor(); - - -assert.AssertionError.prototype.toString = function() { - if (this.message) { - return [this.name+":", this.message].join(' '); - } else { - return [ this.name+":" - , JSON.stringify(this.expected ) - , this.operator - , JSON.stringify(this.actual) - ].join(" "); - } -}; - -// assert.AssertionError instanceof Error - -assert.AssertionError.__proto__ = Error.prototype; - -// At present only the three keys mentioned above are used and -// understood by the spec. Implementations or sub modules can pass -// other keys to the AssertionError's constructor - they will be -// ignored. - -// 3. All of the following functions must throw an AssertionError -// when a corresponding condition is not met, with a message that -// may be undefined if not provided. All assertion methods provide -// both the actual and expected values to the assertion error for -// display purposes. - -function fail(actual, expected, message, operator, stackStartFunction) { - throw new assert.AssertionError({ - message: message, - actual: actual, - expected: expected, - operator: operator, - stackStartFunction: stackStartFunction - }); -} - -// EXTENSION! allows for well behaved errors defined elsewhere. -assert.fail = fail; - -// 4. Pure assertion tests whether a value is truthy, as determined -// by !!guard. -// assert.ok(guard, message_opt); -// This statement is equivalent to assert.equal(true, guard, -// message_opt);. To test strictly for the value true, use -// assert.strictEqual(true, guard, message_opt);. - -assert.ok = function ok(value, message) { - if (!!!value) fail(value, true, message, "==", assert.ok); -}; - -// 5. The equality assertion tests shallow, coercive equality with -// ==. -// assert.equal(actual, expected, message_opt); - -assert.equal = function equal(actual, expected, message) { - if (actual != expected) fail(actual, expected, message, "==", assert.equal); -}; - -// 6. The non-equality assertion tests for whether two objects are not equal -// with != assert.notEqual(actual, expected, message_opt); - -assert.notEqual = function notEqual(actual, expected, message) { - if (actual == expected) { - fail(actual, expected, message, "!=", assert.notEqual); - } -}; - -// 7. The equivalence assertion tests a deep equality relation. -// assert.deepEqual(actual, expected, message_opt); - -assert.deepEqual = function deepEqual(actual, expected, message) { - if (!_deepEqual(actual, expected)) { - fail(actual, expected, message, "deepEqual", assert.deepEqual); - } -}; - -function _deepEqual(actual, expected) { - // 7.1. All identical values are equivalent, as determined by ===. - if (actual === expected) { - return true; - // 7.2. If the expected value is a Date object, the actual value is - // equivalent if it is also a Date object that refers to the same time. - } else if (actual instanceof Date && expected instanceof Date) { - return actual.getTime() === expected.getTime(); - - // 7.3. Other pairs that do not both pass typeof value == "object", - // equivalence is determined by ==. - } else if (typeof actual != 'object' && typeof expected != 'object') { - return actual == expected; - - // 7.4. For all other Object pairs, including Array objects, equivalence is - // determined by having the same number of owned properties (as verified - // with Object.prototype.hasOwnProperty.call), the same set of keys - // (although not necessarily the same order), equivalent values for every - // corresponding key, and an identical "prototype" property. Note: this - // accounts for both named and indexed properties on Arrays. - } else { - return objEquiv(actual, expected); - } -} - -function isUndefinedOrNull (value) { - return value === null || value === undefined; -} - -function isArguments (object) { - return Object.prototype.toString.call(object) == '[object Arguments]'; -} - -function objEquiv (a, b) { - if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) - return false; - // an identical "prototype" property. - if (a.prototype !== b.prototype) return false; - //~~~I've managed to break Object.keys through screwy arguments passing. - // Converting to array solves the problem. - if (isArguments(a)) { - if (!isArguments(b)) { - return false; - } - a = pSlice.call(a); - b = pSlice.call(b); - return _deepEqual(a, b); - } - try{ - var ka = _keys(a), - kb = _keys(b), - key, i; - } catch (e) {//happens when one is a string literal and the other isn't - return false; - } - // having the same number of owned properties (keys incorporates hasOwnProperty) - if (ka.length != kb.length) - return false; - //the same set of keys (although not necessarily the same order), - ka.sort(); - kb.sort(); - //~~~cheap key test - for (i = ka.length - 1; i >= 0; i--) { - if (ka[i] != kb[i]) - return false; - } - //equivalent values for every corresponding key, and - //~~~possibly expensive deep test - for (i = ka.length - 1; i >= 0; i--) { - key = ka[i]; - if (!_deepEqual(a[key], b[key] )) - return false; - } - return true; -} - -// 8. The non-equivalence assertion tests for any deep inequality. -// assert.notDeepEqual(actual, expected, message_opt); - -assert.notDeepEqual = function notDeepEqual(actual, expected, message) { - if (_deepEqual(actual, expected)) { - fail(actual, expected, message, "notDeepEqual", assert.notDeepEqual); - } -}; - -// 9. The strict equality assertion tests strict equality, as determined by ===. -// assert.strictEqual(actual, expected, message_opt); - -assert.strictEqual = function strictEqual(actual, expected, message) { - if (actual !== expected) { - fail(actual, expected, message, "===", assert.strictEqual); - } -}; - -// 10. The strict non-equality assertion tests for strict inequality, as determined by !==. -// assert.notStrictEqual(actual, expected, message_opt); - -assert.notStrictEqual = function notStrictEqual(actual, expected, message) { - if (actual === expected) { - fail(actual, expected, message, "!==", assert.notStrictEqual); - } -}; - -function _throws (shouldThrow, block, err, message) { - var exception = null, - threw = false, - typematters = true; - - message = message || ""; - - //handle optional arguments - if (arguments.length == 3) { - if (typeof(err) == "string") { - message = err; - typematters = false; - } - } else if (arguments.length == 2) { - typematters = false; - } - - try { - block(); - } catch (e) { - threw = true; - exception = e; - } - - if (shouldThrow && !threw) { - fail( "Missing expected exception" - + (err && err.name ? " ("+err.name+")." : '.') - + (message ? " " + message : "") - ); - } - if (!shouldThrow && threw && typematters && exception instanceof err) { - fail( "Got unwanted exception" - + (err && err.name ? " ("+err.name+")." : '.') - + (message ? " " + message : "") - ); - } - if ((shouldThrow && threw && typematters && !(exception instanceof err)) || - (!shouldThrow && threw)) { - throw exception; - } -}; - -// 11. Expected to throw an error: -// assert.throws(block, Error_opt, message_opt); - -assert.throws = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [true].concat(pSlice.call(arguments))); -}; - -// EXTENSION! This is annoying to write outside this module. -assert.doesNotThrow = function(block, /*optional*/error, /*optional*/message) { - _throws.apply(this, [false].concat(pSlice.call(arguments))); -}; - -assert.ifError = function (err) { if (err) {throw err;}}; -})(assert); -(function(exports){ -/*! - * Nodeunit - * Copyright (c) 2010 Caolan McMahon - * MIT Licensed - * - * THIS FILE SHOULD BE BROWSER-COMPATIBLE JS! - * Only code on that line will be removed, its mostly to avoid requiring code - * that is node specific - */ - -/** - * Module dependencies - */ - - - -/** - * Creates assertion objects representing the result of an assert call. - * Accepts an object or AssertionError as its argument. - * - * @param {object} obj - * @api public - */ - -exports.assertion = function (obj) { - return { - method: obj.method || '', - message: obj.message || (obj.error && obj.error.message) || '', - error: obj.error, - passed: function () { - return !this.error; - }, - failed: function () { - return Boolean(this.error); - } - }; -}; - -/** - * Creates an assertion list object representing a group of assertions. - * Accepts an array of assertion objects. - * - * @param {Array} arr - * @param {Number} duration - * @api public - */ - -exports.assertionList = function (arr, duration) { - var that = arr || []; - that.failures = function () { - var failures = 0; - for (var i=0; i(' + - '' + assertions.failures() + ', ' + - '' + assertions.passes() + ', ' + - assertions.length + - ')'; - test.className = assertions.failures() ? 'fail': 'pass'; - test.appendChild(strong); - - var aList = document.createElement('ol'); - aList.style.display = 'none'; - test.onclick = function () { - var d = aList.style.display; - aList.style.display = (d == 'none') ? 'block': 'none'; - }; - for (var i=0; i' + (a.error.stack || a.error) + ''; - li.className = 'fail'; - } - else { - li.innerHTML = a.message || a.method || 'no message'; - li.className = 'pass'; - } - aList.appendChild(li); - } - test.appendChild(aList); - tests.appendChild(test); - }, - done: function (assertions) { - var end = new Date().getTime(); - var duration = end - start; - - var failures = assertions.failures(); - banner.className = failures ? 'fail': 'pass'; - - result.innerHTML = 'Tests completed in ' + duration + - ' milliseconds.
    ' + - assertions.passes() + ' assertions of ' + - '' + assertions.length + ' passed, ' + - assertions.failures() + ' failed.'; - } - }); -}; -})(reporter); -nodeunit = core; -nodeunit.assert = assert; -nodeunit.reporter = reporter; -nodeunit.run = reporter.run; -return nodeunit; })(); diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/dist/async.min.js b/node_modules/karma/node_modules/log4js/node_modules/async/dist/async.min.js deleted file mode 100644 index e4c898b1..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/dist/async.min.js +++ /dev/null @@ -1 +0,0 @@ -/*global setTimeout: false, console: false */(function(){var a={},b=this,c=b.async;typeof module!="undefined"&&module.exports?module.exports=a:b.async=a,a.noConflict=function(){return b.async=c,a};var d=function(a,b){if(a.forEach)return a.forEach(b);for(var c=0;cd?1:0};d(null,e(b.sort(c),function(a){return a.value}))})},a.auto=function(a,b){b=b||function(){};var c=g(a);if(!c.length)return b(null);var e={},h=[],i=function(a){h.unshift(a)},j=function(a){for(var b=0;b b ? 1 : 0; - }; - callback(null, _map(results.sort(fn), function (x) { - return x.value; - })); - } - }); - }; - - async.auto = function (tasks, callback) { - callback = callback || function () {}; - var keys = _keys(tasks); - if (!keys.length) { - return callback(null); - } - - var results = {}; - - var listeners = []; - var addListener = function (fn) { - listeners.unshift(fn); - }; - var removeListener = function (fn) { - for (var i = 0; i < listeners.length; i += 1) { - if (listeners[i] === fn) { - listeners.splice(i, 1); - return; - } - } - }; - var taskComplete = function () { - _forEach(listeners, function (fn) { - fn(); - }); - }; - - addListener(function () { - if (_keys(results).length === keys.length) { - callback(null, results); - } - }); - - _forEach(keys, function (k) { - var task = (tasks[k] instanceof Function) ? [tasks[k]]: tasks[k]; - var taskCallback = function (err) { - if (err) { - callback(err); - // stop subsequent errors hitting callback multiple times - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - taskComplete(); - } - }; - var requires = task.slice(0, Math.abs(task.length - 1)) || []; - var ready = function () { - return _reduce(requires, function (a, x) { - return (a && results.hasOwnProperty(x)); - }, true); - }; - if (ready()) { - task[task.length - 1](taskCallback, results); - } - else { - var listener = function () { - if (ready()) { - removeListener(listener); - task[task.length - 1](taskCallback, results); - } - }; - addListener(listener); - } - }); - }; - - async.waterfall = function (tasks, callback) { - if (!tasks.length) { - return callback(); - } - callback = callback || function () {}; - var wrapIterator = function (iterator) { - return function (err) { - if (err) { - callback(err); - callback = function () {}; - } - else { - var args = Array.prototype.slice.call(arguments, 1); - var next = iterator.next(); - if (next) { - args.push(wrapIterator(next)); - } - else { - args.push(callback); - } - async.nextTick(function () { - iterator.apply(null, args); - }); - } - }; - }; - wrapIterator(async.iterator(tasks))(); - }; - - async.parallel = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.map(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEach(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.series = function (tasks, callback) { - callback = callback || function () {}; - if (tasks.constructor === Array) { - async.mapSeries(tasks, function (fn, callback) { - if (fn) { - fn(function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - callback.call(null, err, args); - }); - } - }, callback); - } - else { - var results = {}; - async.forEachSeries(_keys(tasks), function (k, callback) { - tasks[k](function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (args.length <= 1) { - args = args[0]; - } - results[k] = args; - callback(err); - }); - }, function (err) { - callback(err, results); - }); - } - }; - - async.iterator = function (tasks) { - var makeCallback = function (index) { - var fn = function () { - if (tasks.length) { - tasks[index].apply(null, arguments); - } - return fn.next(); - }; - fn.next = function () { - return (index < tasks.length - 1) ? makeCallback(index + 1): null; - }; - return fn; - }; - return makeCallback(0); - }; - - async.apply = function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - return function () { - return fn.apply( - null, args.concat(Array.prototype.slice.call(arguments)) - ); - }; - }; - - var _concat = function (eachfn, arr, fn, callback) { - var r = []; - eachfn(arr, function (x, cb) { - fn(x, function (err, y) { - r = r.concat(y || []); - cb(err); - }); - }, function (err) { - callback(err, r); - }); - }; - async.concat = doParallel(_concat); - async.concatSeries = doSeries(_concat); - - async.whilst = function (test, iterator, callback) { - if (test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.whilst(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.until = function (test, iterator, callback) { - if (!test()) { - iterator(function (err) { - if (err) { - return callback(err); - } - async.until(test, iterator, callback); - }); - } - else { - callback(); - } - }; - - async.queue = function (worker, concurrency) { - var workers = 0; - var q = { - tasks: [], - concurrency: concurrency, - saturated: null, - empty: null, - drain: null, - push: function (data, callback) { - q.tasks.push({data: data, callback: callback}); - if(q.saturated && q.tasks.length == concurrency) q.saturated(); - async.nextTick(q.process); - }, - process: function () { - if (workers < q.concurrency && q.tasks.length) { - var task = q.tasks.shift(); - if(q.empty && q.tasks.length == 0) q.empty(); - workers += 1; - worker(task.data, function () { - workers -= 1; - if (task.callback) { - task.callback.apply(task, arguments); - } - if(q.drain && q.tasks.length + workers == 0) q.drain(); - q.process(); - }); - } - }, - length: function () { - return q.tasks.length; - }, - running: function () { - return workers; - } - }; - return q; - }; - - var _console_fn = function (name) { - return function (fn) { - var args = Array.prototype.slice.call(arguments, 1); - fn.apply(null, args.concat([function (err) { - var args = Array.prototype.slice.call(arguments, 1); - if (typeof console !== 'undefined') { - if (err) { - if (console.error) { - console.error(err); - } - } - else if (console[name]) { - _forEach(args, function (x) { - console[name](x); - }); - } - } - }])); - }; - }; - async.log = _console_fn('log'); - async.dir = _console_fn('dir'); - /*async.info = _console_fn('info'); - async.warn = _console_fn('warn'); - async.error = _console_fn('error');*/ - - async.memoize = function (fn, hasher) { - var memo = {}; - var queues = {}; - hasher = hasher || function (x) { - return x; - }; - var memoized = function () { - var args = Array.prototype.slice.call(arguments); - var callback = args.pop(); - var key = hasher.apply(null, args); - if (key in memo) { - callback.apply(null, memo[key]); - } - else if (key in queues) { - queues[key].push(callback); - } - else { - queues[key] = [callback]; - fn.apply(null, args.concat([function () { - memo[key] = arguments; - var q = queues[key]; - delete queues[key]; - for (var i = 0, l = q.length; i < l; i++) { - q[i].apply(null, arguments); - } - }])); - } - }; - memoized.unmemoized = fn; - return memoized; - }; - - async.unmemoize = function (fn) { - return function () { - return (fn.unmemoized || fn).apply(null, arguments); - } - }; - -}()); diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/nodelint.cfg b/node_modules/karma/node_modules/log4js/node_modules/async/nodelint.cfg deleted file mode 100644 index 457a967e..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/nodelint.cfg +++ /dev/null @@ -1,4 +0,0 @@ -var options = { - indent: 4, - onevar: false -}; diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/package.json b/node_modules/karma/node_modules/log4js/node_modules/async/package.json deleted file mode 100644 index ed0a54b2..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "async", - "description": "Higher-order functions and common patterns for asynchronous code", - "main": "./index", - "author": { - "name": "Caolan McMahon" - }, - "version": "0.1.15", - "repository": { - "type": "git", - "url": "http://github.com/caolan/async.git" - }, - "bugs": { - "url": "http://github.com/caolan/async/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://github.com/caolan/async/raw/master/LICENSE" - } - ], - "readme": "# Async.js\n\nAsync is a utility module which provides straight-forward, powerful functions\nfor working with asynchronous JavaScript. Although originally designed for\nuse with [node.js](http://nodejs.org), it can also be used directly in the\nbrowser.\n\nAsync provides around 20 functions that include the usual 'functional'\nsuspects (map, reduce, filter, forEach…) as well as some common patterns\nfor asynchronous control flow (parallel, series, waterfall…). All these\nfunctions assume you follow the node.js convention of providing a single\ncallback as the last argument of your async function.\n\n\n## Quick Examples\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n async.parallel([\n function(){ ... },\n function(){ ... }\n ], callback);\n\n async.series([\n function(){ ... },\n function(){ ... }\n ]);\n\nThere are many more functions available so take a look at the docs below for a\nfull list. This module aims to be comprehensive, so if you feel anything is\nmissing please create a GitHub issue for it.\n\n\n## Download\n\nReleases are available for download from\n[GitHub](http://github.com/caolan/async/downloads).\nAlternatively, you can install using Node Package Manager (npm):\n\n npm install async\n\n\n__Development:__ [async.js](https://github.com/caolan/async/raw/master/lib/async.js) - 17.5kb Uncompressed\n\n__Production:__ [async.min.js](https://github.com/caolan/async/raw/master/dist/async.min.js) - 1.7kb Packed and Gzipped\n\n\n## In the Browser\n\nSo far its been tested in IE6, IE7, IE8, FF3.6 and Chrome 5. Usage:\n\n \n \n\n\n## Documentation\n\n### Collections\n\n* [forEach](#forEach)\n* [map](#map)\n* [filter](#filter)\n* [reject](#reject)\n* [reduce](#reduce)\n* [detect](#detect)\n* [sortBy](#sortBy)\n* [some](#some)\n* [every](#every)\n* [concat](#concat)\n\n### Control Flow\n\n* [series](#series)\n* [parallel](#parallel)\n* [whilst](#whilst)\n* [until](#until)\n* [waterfall](#waterfall)\n* [queue](#queue)\n* [auto](#auto)\n* [iterator](#iterator)\n* [apply](#apply)\n* [nextTick](#nextTick)\n\n### Utils\n\n* [memoize](#memoize)\n* [unmemoize](#unmemoize)\n* [log](#log)\n* [dir](#dir)\n* [noConflict](#noConflict)\n\n\n## Collections\n\n
    \n### forEach(arr, iterator, callback)\n\nApplies an iterator function to each item in an array, in parallel.\nThe iterator is called with an item from the list and a callback for when it\nhas finished. If the iterator passes an error to this callback, the main\ncallback for the forEach function is immediately called with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // assuming openFiles is an array of file names and saveFile is a function\n // to save the modified contents of that file:\n\n async.forEach(openFiles, saveFile, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n\n---------------------------------------\n\n\n### forEachSeries(arr, iterator, callback)\n\nThe same as forEach only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. This means the iterator functions will complete in order.\n\n\n---------------------------------------\n\n\n### forEachLimit(arr, limit, iterator, callback)\n\nThe same as forEach only the iterator is applied to batches of items in the\narray, in series. The next batch of iterators is only called once the current\none has completed processing.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* limit - How many items should be in each batch.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(err) - A callback which is called after all the iterator functions\n have finished, or an error has occurred.\n\n__Example__\n\n // Assume documents is an array of JSON objects and requestApi is a\n // function that interacts with a rate-limited REST api.\n\n async.forEachLimit(documents, 20, requestApi, function(err){\n // if any of the saves produced an error, err would equal that error\n });\n---------------------------------------\n\n\n### map(arr, iterator, callback)\n\nProduces a new array of values by mapping each value in the given array through\nthe iterator function. The iterator is called with an item from the array and a\ncallback for when it has finished processing. The callback takes 2 arguments, \nan error and the transformed item from the array. If the iterator passes an\nerror to this callback, the main callback for the map function is immediately\ncalled with the error.\n\nNote, that since this function applies the iterator to each item in parallel\nthere is no guarantee that the iterator functions will complete in order, however\nthe results array will be in the same order as the original array.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a transformed item.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array of the\n transformed items from the original array.\n\n__Example__\n\n async.map(['file1','file2','file3'], fs.stat, function(err, results){\n // results is now an array of stats for each file\n });\n\n---------------------------------------\n\n\n### mapSeries(arr, iterator, callback)\n\nThe same as map only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n\n---------------------------------------\n\n\n### filter(arr, iterator, callback)\n\n__Alias:__ select\n\nReturns a new array of all the values which pass an async truth test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. This operation is\nperformed in parallel, but the results array will be in the same order as the\noriginal.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(results) - A callback which is called after all the iterator\n functions have finished.\n\n__Example__\n\n async.filter(['file1','file2','file3'], path.exists, function(results){\n // results now equals an array of the existing files\n });\n\n---------------------------------------\n\n\n### filterSeries(arr, iterator, callback)\n\n__alias:__ selectSeries\n\nThe same as filter only the iterator is applied to each item in the array in\nseries. The next iterator is only called once the current one has completed\nprocessing. The results array will be in the same order as the original.\n\n---------------------------------------\n\n\n### reject(arr, iterator, callback)\n\nThe opposite of filter. Removes values that pass an async truth test.\n\n---------------------------------------\n\n\n### rejectSeries(arr, iterator, callback)\n\nThe same as filter, only the iterator is applied to each item in the array\nin series.\n\n\n---------------------------------------\n\n\n### reduce(arr, memo, iterator, callback)\n\n__aliases:__ inject, foldl\n\nReduces a list of values into a single value using an async iterator to return\neach successive step. Memo is the initial state of the reduction. This\nfunction only operates in series. For performance reasons, it may make sense to\nsplit a call to this function into a parallel map, then use the normal\nArray.prototype.reduce on the results. This function is for situations where\neach step in the reduction needs to be async, if you can get the data before\nreducing it then its probably a good idea to do so.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* memo - The initial state of the reduction.\n* iterator(memo, item, callback) - A function applied to each item in the\n array to produce the next step in the reduction. The iterator is passed a\n callback which accepts an optional error as its first argument, and the state\n of the reduction as the second. If an error is passed to the callback, the\n reduction is stopped and the main callback is immediately called with the\n error.\n* callback(err, result) - A callback which is called after all the iterator\n functions have finished. Result is the reduced value.\n\n__Example__\n\n async.reduce([1,2,3], 0, function(memo, item, callback){\n // pointless async:\n process.nextTick(function(){\n callback(null, memo + item)\n });\n }, function(err, result){\n // result is now equal to the last value of memo, which is 6\n });\n\n---------------------------------------\n\n\n### reduceRight(arr, memo, iterator, callback)\n\n__Alias:__ foldr\n\nSame as reduce, only operates on the items in the array in reverse order.\n\n\n---------------------------------------\n\n\n### detect(arr, iterator, callback)\n\nReturns the first value in a list that passes an async truth test. The\niterator is applied in parallel, meaning the first iterator to return true will\nfire the detect callback with that result. That means the result might not be\nthe first item in the original array (in terms of order) that passes the test.\n\nIf order within the original array is important then look at detectSeries.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n the first item in the array that passes the truth test (iterator) or the\n value undefined if none passed.\n\n__Example__\n\n async.detect(['file1','file2','file3'], path.exists, function(result){\n // result now equals the first file in the list that exists\n });\n\n---------------------------------------\n\n\n### detectSeries(arr, iterator, callback)\n\nThe same as detect, only the iterator is applied to each item in the array\nin series. This means the result is always the first in the original array (in\nterms of array order) that passes the truth test.\n\n\n---------------------------------------\n\n\n### sortBy(arr, iterator, callback)\n\nSorts a list by the results of running each value through an async iterator.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and a value to use as the sort criteria.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is the items from\n the original array sorted by the values returned by the iterator calls.\n\n__Example__\n\n async.sortBy(['file1','file2','file3'], function(file, callback){\n fs.stat(file, function(err, stats){\n callback(err, stats.mtime);\n });\n }, function(err, results){\n // results is now the original array of files sorted by\n // modified date\n });\n\n\n---------------------------------------\n\n\n### some(arr, iterator, callback)\n\n__Alias:__ any\n\nReturns true if at least one element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists. Once any iterator\ncall returns true, the main callback is immediately called.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called as soon as any iterator returns\n true, or after all the iterator functions have finished. Result will be\n either true or false depending on the values of the async tests.\n\n__Example__\n\n async.some(['file1','file2','file3'], path.exists, function(result){\n // if result is true then at least one of the files exists\n });\n\n---------------------------------------\n\n\n### every(arr, iterator, callback)\n\n__Alias:__ all\n\nReturns true if every element in the array satisfies an async test.\n_The callback for each iterator call only accepts a single argument of true or\nfalse, it does not accept an error argument first!_ This is in-line with the\nway node libraries work with truth tests like path.exists.\n\n__Arguments__\n\n* arr - An array to iterate over.\n* iterator(item, callback) - A truth test to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed.\n* callback(result) - A callback which is called after all the iterator\n functions have finished. Result will be either true or false depending on\n the values of the async tests.\n\n__Example__\n\n async.every(['file1','file2','file3'], path.exists, function(result){\n // if result is true then every file exists\n });\n\n---------------------------------------\n\n\n### concat(arr, iterator, callback)\n\nApplies an iterator to each item in a list, concatenating the results. Returns the\nconcatenated list. The iterators are called in parallel, and the results are\nconcatenated as they return. There is no guarantee that the results array will\nbe returned in the original order of the arguments passed to the iterator function.\n\n__Arguments__\n\n* arr - An array to iterate over\n* iterator(item, callback) - A function to apply to each item in the array.\n The iterator is passed a callback which must be called once it has completed\n with an error (which can be null) and an array of results.\n* callback(err, results) - A callback which is called after all the iterator\n functions have finished, or an error has occurred. Results is an array containing\n the concatenated results of the iterator function.\n\n__Example__\n\n async.concat(['dir1','dir2','dir3'], fs.readdir, function(err, files){\n // files is now a list of filenames that exist in the 3 directories\n });\n\n---------------------------------------\n\n\n### concatSeries(arr, iterator, callback)\n\nSame as async.concat, but executes in series instead of parallel.\n\n\n## Control Flow\n\n\n### series(tasks, [callback])\n\nRun an array of functions in series, each one running once the previous\nfunction has completed. If any functions in the series pass an error to its\ncallback, no more functions are run and the callback for the series is\nimmediately called with the value of the error. Once the tasks have completed,\nthe results are passed to the final callback as an array.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.series.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed\n a callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.series([\n function(callback){\n // do some stuff ...\n callback(null, 'one');\n },\n function(callback){\n // do some more stuff ...\n callback(null, 'two');\n },\n ],\n // optional callback\n function(err, results){\n // results is now equal to ['one', 'two']\n });\n\n\n // an example using an object instead of an array\n async.series({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equal to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### parallel(tasks, [callback])\n\nRun an array of functions in parallel, without waiting until the previous\nfunction has completed. If any of the functions pass an error to its\ncallback, the main callback is immediately called with the value of the error.\nOnce the tasks have completed, the results are passed to the final callback as an\narray.\n\nIt is also possible to use an object instead of an array. Each property will be\nrun as a function and the results will be passed to the final callback as an object\ninstead of an array. This can be a more readable way of handling results from\nasync.parallel.\n\n\n__Arguments__\n\n* tasks - An array or object containing functions to run, each function is passed a\n callback it must call on completion.\n* callback(err, results) - An optional callback to run once all the functions\n have completed. This function gets an array of all the arguments passed to\n the callbacks used in the array.\n\n__Example__\n\n async.parallel([\n function(callback){\n setTimeout(function(){\n callback(null, 'one');\n }, 200);\n },\n function(callback){\n setTimeout(function(){\n callback(null, 'two');\n }, 100);\n },\n ],\n // optional callback\n function(err, results){\n // in this case, the results array will equal ['two','one']\n // because the functions were run in parallel and the second\n // function had a shorter timeout before calling the callback.\n });\n\n\n // an example using an object instead of an array\n async.parallel({\n one: function(callback){\n setTimeout(function(){\n callback(null, 1);\n }, 200);\n },\n two: function(callback){\n setTimeout(function(){\n callback(null, 2);\n }, 100);\n },\n },\n function(err, results) {\n // results is now equals to: {one: 1, two: 2}\n });\n\n\n---------------------------------------\n\n\n### whilst(test, fn, callback)\n\nRepeatedly call fn, while test returns true. Calls the callback when stopped,\nor an error occurs.\n\n__Arguments__\n\n* test() - synchronous truth test to perform before each execution of fn.\n* fn(callback) - A function to call each time the test passes. The function is\n passed a callback which must be called once it has completed with an optional\n error as the first argument.\n* callback(err) - A callback which is called after the test fails and repeated\n execution of fn has stopped.\n\n__Example__\n\n var count = 0;\n\n async.whilst(\n function () { return count < 5; },\n function (callback) {\n count++;\n setTimeout(callback, 1000);\n },\n function (err) {\n // 5 seconds have passed\n }\n });\n\n\n---------------------------------------\n\n\n### until(test, fn, callback)\n\nRepeatedly call fn, until test returns true. Calls the callback when stopped,\nor an error occurs.\n\nThe inverse of async.whilst.\n\n\n---------------------------------------\n\n\n### waterfall(tasks, [callback])\n\nRuns an array of functions in series, each passing their results to the next in\nthe array. However, if any of the functions pass an error to the callback, the\nnext function is not executed and the main callback is immediately called with\nthe error.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n* callback(err) - An optional callback to run once all the functions have\n completed. This function gets passed any error that may have occurred.\n\n__Example__\n\n async.waterfall([\n function(callback){\n callback(null, 'one', 'two');\n },\n function(arg1, arg2, callback){\n callback(null, 'three');\n },\n function(arg1, callback){\n // arg1 now equals 'three'\n callback(null, 'done');\n }\n ]);\n\n\n---------------------------------------\n\n\n### queue(worker, concurrency)\n\nCreates a queue object with the specified concurrency. Tasks added to the\nqueue will be processed in parallel (up to the concurrency limit). If all\nworkers are in progress, the task is queued until one is available. Once\na worker has completed a task, the task's callback is called.\n\n__Arguments__\n\n* worker(task, callback) - An asynchronous function for processing a queued\n task.\n* concurrency - An integer for determining how many worker functions should be\n run in parallel.\n\n__Queue objects__\n\nThe queue object returned by this function has the following properties and\nmethods:\n\n* length() - a function returning the number of items waiting to be processed.\n* concurrency - an integer for determining how many worker functions should be\n run in parallel. This property can be changed after a queue is created to\n alter the concurrency on-the-fly.\n* push(task, [callback]) - add a new task to the queue, the callback is called\n once the worker has finished processing the task.\n* saturated - a callback that is called when the queue length hits the concurrency and further tasks will be queued\n* empty - a callback that is called when the last item from the queue is given to a worker\n* drain - a callback that is called when the last item from the queue has returned from the worker\n\n__Example__\n\n // create a queue object with concurrency 2\n\n var q = async.queue(function (task, callback) {\n console.log('hello ' + task.name);\n callback();\n }, 2);\n\n\n // assign a callback\n q.drain = function() {\n console.log('all items have been processed');\n }\n\n // add some items to the queue\n\n q.push({name: 'foo'}, function (err) {\n console.log('finished processing foo');\n });\n q.push({name: 'bar'}, function (err) {\n console.log('finished processing bar');\n });\n\n\n---------------------------------------\n\n\n### auto(tasks, [callback])\n\nDetermines the best order for running functions based on their requirements.\nEach function can optionally depend on other functions being completed first,\nand each function is run as soon as its requirements are satisfied. If any of\nthe functions pass an error to their callback, that function will not complete\n(so any other functions depending on it will not run) and the main callback\nwill be called immediately with the error. Functions also receive an object\ncontaining the results of functions on which they depend.\n\n__Arguments__\n\n* tasks - An object literal containing named functions or an array of\n requirements, with the function itself the last item in the array. The key\n used for each function or array is used when specifying requirements. The\n syntax is easier to understand by looking at the example.\n* callback(err) - An optional callback which is called when all the tasks have\n been completed. The callback may receive an error as an argument.\n\n__Example__\n\n async.auto({\n get_data: function(callback){\n // async code to get some data\n },\n make_folder: function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n },\n write_file: ['get_data', 'make_folder', function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n callback(null, filename);\n }],\n email_link: ['write_file', function(callback, results){\n // once the file is written let's email a link to it...\n // results.write_file contains the filename returned by write_file.\n }]\n });\n\nThis is a fairly trivial example, but to do this using the basic parallel and\nseries functions would look like this:\n\n async.parallel([\n function(callback){\n // async code to get some data\n },\n function(callback){\n // async code to create a directory to store a file in\n // this is run at the same time as getting the data\n }\n ],\n function(results){\n async.series([\n function(callback){\n // once there is some data and the directory exists,\n // write the data to a file in the directory\n },\n email_link: ['write_file', function(callback){\n // once the file is written let's email a link to it...\n }\n ]);\n });\n\nFor a complicated series of async tasks using the auto function makes adding\nnew tasks much easier and makes the code more readable. \n\n\n---------------------------------------\n\n\n### iterator(tasks)\n\nCreates an iterator function which calls the next function in the array,\nreturning a continuation to call the next one after that. Its also possible to\n'peek' the next iterator by doing iterator.next().\n\nThis function is used internally by the async module but can be useful when\nyou want to manually control the flow of functions in series.\n\n__Arguments__\n\n* tasks - An array of functions to run, each function is passed a callback it\n must call on completion.\n\n__Example__\n\n var iterator = async.iterator([\n function(){ sys.p('one'); },\n function(){ sys.p('two'); },\n function(){ sys.p('three'); }\n ]);\n\n node> var iterator2 = iterator();\n 'one'\n node> var iterator3 = iterator2();\n 'two'\n node> iterator3();\n 'three'\n node> var nextfn = iterator2.next();\n node> nextfn();\n 'three'\n\n\n---------------------------------------\n\n\n### apply(function, arguments..)\n\nCreates a continuation function with some arguments already applied, a useful\nshorthand when combined with other control flow functions. Any arguments\npassed to the returned function are added to the arguments originally passed\nto apply.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to automatically apply when the\n continuation is called.\n\n__Example__\n\n // using apply\n\n async.parallel([\n async.apply(fs.writeFile, 'testfile1', 'test1'),\n async.apply(fs.writeFile, 'testfile2', 'test2'),\n ]);\n\n\n // the same process without using apply\n\n async.parallel([\n function(callback){\n fs.writeFile('testfile1', 'test1', callback);\n },\n function(callback){\n fs.writeFile('testfile2', 'test2', callback);\n },\n ]);\n\nIt's possible to pass any number of additional arguments when calling the\ncontinuation:\n\n node> var fn = async.apply(sys.puts, 'one');\n node> fn('two', 'three');\n one\n two\n three\n\n---------------------------------------\n\n\n### nextTick(callback)\n\nCalls the callback on a later loop around the event loop. In node.js this just\ncalls process.nextTick, in the browser it falls back to setTimeout(callback, 0),\nwhich means other higher priority events may precede the execution of the callback.\n\nThis is used internally for browser-compatibility purposes.\n\n__Arguments__\n\n* callback - The function to call on a later loop around the event loop.\n\n__Example__\n\n var call_order = [];\n async.nextTick(function(){\n call_order.push('two');\n // call_order now equals ['one','two]\n });\n call_order.push('one')\n\n\n## Utils\n\n\n### memoize(fn, [hasher])\n\nCaches the results of an async function. When creating a hash to store function\nresults against, the callback is omitted from the hash and an optional hash\nfunction can be used.\n\n__Arguments__\n\n* fn - the function you to proxy and cache results from.\n* hasher - an optional function for generating a custom hash for storing\n results, it has all the arguments applied to it apart from the callback, and\n must be synchronous.\n\n__Example__\n\n var slow_fn = function (name, callback) {\n // do something\n callback(null, result);\n };\n var fn = async.memoize(slow_fn);\n\n // fn can now be used as if it were slow_fn\n fn('some name', function () {\n // callback\n });\n\n\n### unmemoize(fn)\n\nUndoes a memoized function, reverting it to the original, unmemoized\nform. Comes handy in tests.\n\n__Arguments__\n\n* fn - the memoized function\n\n\n### log(function, arguments)\n\nLogs the result of an async function to the console. Only works in node.js or\nin browsers that support console.log and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.log is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, 'hello ' + name);\n }, 1000);\n };\n\n node> async.log(hello, 'world');\n 'hello world'\n\n\n---------------------------------------\n\n\n### dir(function, arguments)\n\nLogs the result of an async function to the console using console.dir to\ndisplay the properties of the resulting object. Only works in node.js or\nin browsers that support console.dir and console.error (such as FF and Chrome).\nIf multiple arguments are returned from the async function, console.dir is\ncalled on each argument in order.\n\n__Arguments__\n\n* function - The function you want to eventually apply all arguments to.\n* arguments... - Any number of arguments to apply to the function.\n\n__Example__\n\n var hello = function(name, callback){\n setTimeout(function(){\n callback(null, {hello: name});\n }, 1000);\n };\n\n node> async.dir(hello, 'world');\n {hello: 'world'}\n\n\n---------------------------------------\n\n\n### noConflict()\n\nChanges the value of async back to its original value, returning a reference to the\nasync object.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/caolan/async", - "_id": "async@0.1.15", - "_from": "async@0.1.15" -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/test/test-async.js b/node_modules/karma/node_modules/log4js/node_modules/async/test/test-async.js deleted file mode 100644 index d3eeddcb..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/test/test-async.js +++ /dev/null @@ -1,1577 +0,0 @@ -var async = require('../lib/async'); - - -exports['auto'] = function(test){ - var callOrder = []; - var testdata = [{test: 'test'}]; - async.auto({ - task1: ['task2', function(callback){ - setTimeout(function(){ - callOrder.push('task1'); - callback(); - }, 25); - }], - task2: function(callback){ - setTimeout(function(){ - callOrder.push('task2'); - callback(); - }, 50); - }, - task3: ['task2', function(callback){ - callOrder.push('task3'); - callback(); - }], - task4: ['task1', 'task2', function(callback){ - callOrder.push('task4'); - callback(); - }] - }, - function(err){ - test.same(callOrder, ['task2','task3','task1','task4']); - test.done(); - }); -}; - -exports['auto results'] = function(test){ - var callOrder = []; - async.auto({ - task1: ['task2', function(callback, results){ - test.same(results.task2, 'task2'); - setTimeout(function(){ - callOrder.push('task1'); - callback(null, 'task1a', 'task1b'); - }, 25); - }], - task2: function(callback){ - setTimeout(function(){ - callOrder.push('task2'); - callback(null, 'task2'); - }, 50); - }, - task3: ['task2', function(callback, results){ - test.same(results.task2, 'task2'); - callOrder.push('task3'); - callback(null); - }], - task4: ['task1', 'task2', function(callback, results){ - test.same(results.task1, ['task1a','task1b']); - test.same(results.task2, 'task2'); - callOrder.push('task4'); - callback(null, 'task4'); - }] - }, - function(err, results){ - test.same(callOrder, ['task2','task3','task1','task4']); - test.same(results, {task1: ['task1a','task1b'], task2: 'task2', task3: undefined, task4: 'task4'}); - test.done(); - }); -}; - - -exports['auto empty object'] = function(test){ - async.auto({}, function(err){ - test.done(); - }); -}; - -exports['auto error'] = function(test){ - test.expect(1); - async.auto({ - task1: function(callback){ - callback('testerror'); - }, - task2: ['task1', function(callback){ - test.ok(false, 'task2 should not be called'); - callback(); - }], - task3: function(callback){ - callback('testerror2'); - } - }, - function(err){ - test.equals(err, 'testerror'); - }); - setTimeout(test.done, 100); -}; - -exports['auto no callback'] = function(test){ - async.auto({ - task1: function(callback){callback();}, - task2: ['task1', function(callback){callback(); test.done();}] - }); -}; - -exports['waterfall'] = function(test){ - test.expect(6); - var call_order = []; - async.waterfall([ - function(callback){ - call_order.push('fn1'); - setTimeout(function(){callback(null, 'one', 'two');}, 0); - }, - function(arg1, arg2, callback){ - call_order.push('fn2'); - test.equals(arg1, 'one'); - test.equals(arg2, 'two'); - setTimeout(function(){callback(null, arg1, arg2, 'three');}, 25); - }, - function(arg1, arg2, arg3, callback){ - call_order.push('fn3'); - test.equals(arg1, 'one'); - test.equals(arg2, 'two'); - test.equals(arg3, 'three'); - callback(null, 'four'); - }, - function(arg4, callback){ - call_order.push('fn4'); - test.same(call_order, ['fn1','fn2','fn3','fn4']); - callback(null, 'test'); - } - ], function(err){ - test.done(); - }); -}; - -exports['waterfall empty array'] = function(test){ - async.waterfall([], function(err){ - test.done(); - }); -}; - -exports['waterfall no callback'] = function(test){ - async.waterfall([ - function(callback){callback();}, - function(callback){callback(); test.done();} - ]); -}; - -exports['waterfall async'] = function(test){ - var call_order = []; - async.waterfall([ - function(callback){ - call_order.push(1); - callback(); - call_order.push(2); - }, - function(callback){ - call_order.push(3); - callback(); - }, - function(){ - test.same(call_order, [1,2,3]); - test.done(); - } - ]); -}; - -exports['waterfall error'] = function(test){ - test.expect(1); - async.waterfall([ - function(callback){ - callback('error'); - }, - function(callback){ - test.ok(false, 'next function should not be called'); - callback(); - } - ], function(err){ - test.equals(err, 'error'); - }); - setTimeout(test.done, 50); -}; - -exports['waterfall multiple callback calls'] = function(test){ - var call_order = []; - var arr = [ - function(callback){ - call_order.push(1); - // call the callback twice. this should call function 2 twice - callback(null, 'one', 'two'); - callback(null, 'one', 'two'); - }, - function(arg1, arg2, callback){ - call_order.push(2); - callback(null, arg1, arg2, 'three'); - }, - function(arg1, arg2, arg3, callback){ - call_order.push(3); - callback(null, 'four'); - }, - function(arg4){ - call_order.push(4); - arr[3] = function(){ - call_order.push(4); - test.same(call_order, [1,2,2,3,3,4,4]); - test.done(); - }; - } - ]; - async.waterfall(arr); -}; - - -exports['parallel'] = function(test){ - var call_order = []; - async.parallel([ - function(callback){ - setTimeout(function(){ - call_order.push(1); - callback(null, 1); - }, 50); - }, - function(callback){ - setTimeout(function(){ - call_order.push(2); - callback(null, 2); - }, 100); - }, - function(callback){ - setTimeout(function(){ - call_order.push(3); - callback(null, 3,3); - }, 25); - } - ], - function(err, results){ - test.equals(err, null); - test.same(call_order, [3,1,2]); - test.same(results, [1,2,[3,3]]); - test.done(); - }); -}; - -exports['parallel empty array'] = function(test){ - async.parallel([], function(err, results){ - test.equals(err, null); - test.same(results, []); - test.done(); - }); -}; - -exports['parallel error'] = function(test){ - async.parallel([ - function(callback){ - callback('error', 1); - }, - function(callback){ - callback('error2', 2); - } - ], - function(err, results){ - test.equals(err, 'error'); - }); - setTimeout(test.done, 100); -}; - -exports['parallel no callback'] = function(test){ - async.parallel([ - function(callback){callback();}, - function(callback){callback(); test.done();}, - ]); -}; - -exports['parallel object'] = function(test){ - var call_order = []; - async.parallel({ - one: function(callback){ - setTimeout(function(){ - call_order.push(1); - callback(null, 1); - }, 25); - }, - two: function(callback){ - setTimeout(function(){ - call_order.push(2); - callback(null, 2); - }, 50); - }, - three: function(callback){ - setTimeout(function(){ - call_order.push(3); - callback(null, 3,3); - }, 15); - } - }, - function(err, results){ - test.equals(err, null); - test.same(call_order, [3,1,2]); - test.same(results, { - one: 1, - two: 2, - three: [3,3] - }); - test.done(); - }); -}; - -exports['series'] = function(test){ - var call_order = []; - async.series([ - function(callback){ - setTimeout(function(){ - call_order.push(1); - callback(null, 1); - }, 25); - }, - function(callback){ - setTimeout(function(){ - call_order.push(2); - callback(null, 2); - }, 50); - }, - function(callback){ - setTimeout(function(){ - call_order.push(3); - callback(null, 3,3); - }, 15); - } - ], - function(err, results){ - test.equals(err, null); - test.same(results, [1,2,[3,3]]); - test.same(call_order, [1,2,3]); - test.done(); - }); -}; - -exports['series empty array'] = function(test){ - async.series([], function(err, results){ - test.equals(err, null); - test.same(results, []); - test.done(); - }); -}; - -exports['series error'] = function(test){ - test.expect(1); - async.series([ - function(callback){ - callback('error', 1); - }, - function(callback){ - test.ok(false, 'should not be called'); - callback('error2', 2); - } - ], - function(err, results){ - test.equals(err, 'error'); - }); - setTimeout(test.done, 100); -}; - -exports['series no callback'] = function(test){ - async.series([ - function(callback){callback();}, - function(callback){callback(); test.done();}, - ]); -}; - -exports['series object'] = function(test){ - var call_order = []; - async.series({ - one: function(callback){ - setTimeout(function(){ - call_order.push(1); - callback(null, 1); - }, 25); - }, - two: function(callback){ - setTimeout(function(){ - call_order.push(2); - callback(null, 2); - }, 50); - }, - three: function(callback){ - setTimeout(function(){ - call_order.push(3); - callback(null, 3,3); - }, 15); - } - }, - function(err, results){ - test.equals(err, null); - test.same(results, { - one: 1, - two: 2, - three: [3,3] - }); - test.same(call_order, [1,2,3]); - test.done(); - }); -}; - -exports['iterator'] = function(test){ - var call_order = []; - var iterator = async.iterator([ - function(){call_order.push(1);}, - function(arg1){ - test.equals(arg1, 'arg1'); - call_order.push(2); - }, - function(arg1, arg2){ - test.equals(arg1, 'arg1'); - test.equals(arg2, 'arg2'); - call_order.push(3); - } - ]); - iterator(); - test.same(call_order, [1]); - var iterator2 = iterator(); - test.same(call_order, [1,1]); - var iterator3 = iterator2('arg1'); - test.same(call_order, [1,1,2]); - var iterator4 = iterator3('arg1', 'arg2'); - test.same(call_order, [1,1,2,3]); - test.equals(iterator4, undefined); - test.done(); -}; - -exports['iterator empty array'] = function(test){ - var iterator = async.iterator([]); - test.equals(iterator(), undefined); - test.equals(iterator.next(), undefined); - test.done(); -}; - -exports['iterator.next'] = function(test){ - var call_order = []; - var iterator = async.iterator([ - function(){call_order.push(1);}, - function(arg1){ - test.equals(arg1, 'arg1'); - call_order.push(2); - }, - function(arg1, arg2){ - test.equals(arg1, 'arg1'); - test.equals(arg2, 'arg2'); - call_order.push(3); - } - ]); - var fn = iterator.next(); - var iterator2 = fn('arg1'); - test.same(call_order, [2]); - iterator2('arg1','arg2'); - test.same(call_order, [2,3]); - test.equals(iterator2.next(), undefined); - test.done(); -}; - -exports['forEach'] = function(test){ - var args = []; - async.forEach([1,3,2], function(x, callback){ - setTimeout(function(){ - args.push(x); - callback(); - }, x*25); - }, function(err){ - test.same(args, [1,2,3]); - test.done(); - }); -}; - -exports['forEach empty array'] = function(test){ - test.expect(1); - async.forEach([], function(x, callback){ - test.ok(false, 'iterator should not be called'); - callback(); - }, function(err){ - test.ok(true, 'should call callback'); - }); - setTimeout(test.done, 25); -}; - -exports['forEach error'] = function(test){ - test.expect(1); - async.forEach([1,2,3], function(x, callback){ - callback('error'); - }, function(err){ - test.equals(err, 'error'); - }); - setTimeout(test.done, 50); -}; - -exports['forEachSeries'] = function(test){ - var args = []; - async.forEachSeries([1,3,2], function(x, callback){ - setTimeout(function(){ - args.push(x); - callback(); - }, x*25); - }, function(err){ - test.same(args, [1,3,2]); - test.done(); - }); -}; - -exports['forEachSeries empty array'] = function(test){ - test.expect(1); - async.forEachSeries([], function(x, callback){ - test.ok(false, 'iterator should not be called'); - callback(); - }, function(err){ - test.ok(true, 'should call callback'); - }); - setTimeout(test.done, 25); -}; - -exports['forEachSeries error'] = function(test){ - test.expect(2); - var call_order = []; - async.forEachSeries([1,2,3], function(x, callback){ - call_order.push(x); - callback('error'); - }, function(err){ - test.same(call_order, [1]); - test.equals(err, 'error'); - }); - setTimeout(test.done, 50); -}; - -exports['forEachLimit'] = function(test){ - var args = []; - var arr = [0,1,2,3,4,5,6,7,8,9]; - async.forEachLimit(arr, 2, function(x,callback){ - setTimeout(function(){ - args.push(x); - callback(); - }, x*5); - }, function(err){ - test.same(args, arr); - test.done(); - }); -}; - -exports['forEachLimit empty array'] = function(test){ - test.expect(1); - async.forEachLimit([], 2, function(x, callback){ - test.ok(false, 'iterator should not be called'); - callback(); - }, function(err){ - test.ok(true, 'should call callback'); - }); - setTimeout(test.done, 25); -}; - -exports['forEachLimit limit exceeds size'] = function(test){ - var args = []; - var arr = [0,1,2,3,4,5,6,7,8,9]; - async.forEachLimit(arr, 20, function(x,callback){ - setTimeout(function(){ - args.push(x); - callback(); - }, x*5); - }, function(err){ - test.same(args, arr); - test.done(); - }); -}; - -exports['forEachLimit limit equal size'] = function(test){ - var args = []; - var arr = [0,1,2,3,4,5,6,7,8,9]; - async.forEachLimit(arr, 10, function(x,callback){ - setTimeout(function(){ - args.push(x); - callback(); - }, x*5); - }, function(err){ - test.same(args, arr); - test.done(); - }); -}; - -exports['forEachLimit zero limit'] = function(test){ - test.expect(1); - async.forEachLimit([0,1,2,3,4,5], 0, function(x, callback){ - test.ok(false, 'iterator should not be called'); - callback(); - }, function(err){ - test.ok(true, 'should call callback'); - }); - setTimeout(test.done, 25); -}; - -exports['forEachLimit error'] = function(test){ - test.expect(2); - var arr = [0,1,2,3,4,5,6,7,8,9]; - var call_order = []; - - async.forEachLimit(arr, 3, function(x, callback){ - call_order.push(x); - if (x === 2) { - callback('error'); - } - }, function(err){ - test.same(call_order, [0,1,2]); - test.equals(err, 'error'); - }); - setTimeout(test.done, 25); -}; - -exports['map'] = function(test){ - var call_order = []; - async.map([1,3,2], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(null, x*2); - }, x*25); - }, function(err, results){ - test.same(call_order, [1,2,3]); - test.same(results, [2,6,4]); - test.done(); - }); -}; - -exports['map original untouched'] = function(test){ - var a = [1,2,3]; - async.map(a, function(x, callback){ - callback(null, x*2); - }, function(err, results){ - test.same(results, [2,4,6]); - test.same(a, [1,2,3]); - test.done(); - }); -}; - -exports['map error'] = function(test){ - test.expect(1); - async.map([1,2,3], function(x, callback){ - callback('error'); - }, function(err, results){ - test.equals(err, 'error'); - }); - setTimeout(test.done, 50); -}; - -exports['mapSeries'] = function(test){ - var call_order = []; - async.mapSeries([1,3,2], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(null, x*2); - }, x*25); - }, function(err, results){ - test.same(call_order, [1,3,2]); - test.same(results, [2,6,4]); - test.done(); - }); -}; - -exports['mapSeries error'] = function(test){ - test.expect(1); - async.mapSeries([1,2,3], function(x, callback){ - callback('error'); - }, function(err, results){ - test.equals(err, 'error'); - }); - setTimeout(test.done, 50); -}; - -exports['reduce'] = function(test){ - var call_order = []; - async.reduce([1,2,3], 0, function(a, x, callback){ - call_order.push(x); - callback(null, a + x); - }, function(err, result){ - test.equals(result, 6); - test.same(call_order, [1,2,3]); - test.done(); - }); -}; - -exports['reduce async with non-reference memo'] = function(test){ - async.reduce([1,3,2], 0, function(a, x, callback){ - setTimeout(function(){callback(null, a + x)}, Math.random()*100); - }, function(err, result){ - test.equals(result, 6); - test.done(); - }); -}; - -exports['reduce error'] = function(test){ - test.expect(1); - async.reduce([1,2,3], 0, function(a, x, callback){ - callback('error'); - }, function(err, result){ - test.equals(err, 'error'); - }); - setTimeout(test.done, 50); -}; - -exports['inject alias'] = function(test){ - test.equals(async.inject, async.reduce); - test.done(); -}; - -exports['foldl alias'] = function(test){ - test.equals(async.foldl, async.reduce); - test.done(); -}; - -exports['reduceRight'] = function(test){ - var call_order = []; - var a = [1,2,3]; - async.reduceRight(a, 0, function(a, x, callback){ - call_order.push(x); - callback(null, a + x); - }, function(err, result){ - test.equals(result, 6); - test.same(call_order, [3,2,1]); - test.same(a, [1,2,3]); - test.done(); - }); -}; - -exports['foldr alias'] = function(test){ - test.equals(async.foldr, async.reduceRight); - test.done(); -}; - -exports['filter'] = function(test){ - async.filter([3,1,2], function(x, callback){ - setTimeout(function(){callback(x % 2);}, x*25); - }, function(results){ - test.same(results, [3,1]); - test.done(); - }); -}; - -exports['filter original untouched'] = function(test){ - var a = [3,1,2]; - async.filter(a, function(x, callback){ - callback(x % 2); - }, function(results){ - test.same(results, [3,1]); - test.same(a, [3,1,2]); - test.done(); - }); -}; - -exports['filterSeries'] = function(test){ - async.filterSeries([3,1,2], function(x, callback){ - setTimeout(function(){callback(x % 2);}, x*25); - }, function(results){ - test.same(results, [3,1]); - test.done(); - }); -}; - -exports['select alias'] = function(test){ - test.equals(async.select, async.filter); - test.done(); -}; - -exports['selectSeries alias'] = function(test){ - test.equals(async.selectSeries, async.filterSeries); - test.done(); -}; - -exports['reject'] = function(test){ - async.reject([3,1,2], function(x, callback){ - setTimeout(function(){callback(x % 2);}, x*25); - }, function(results){ - test.same(results, [2]); - test.done(); - }); -}; - -exports['reject original untouched'] = function(test){ - var a = [3,1,2]; - async.reject(a, function(x, callback){ - callback(x % 2); - }, function(results){ - test.same(results, [2]); - test.same(a, [3,1,2]); - test.done(); - }); -}; - -exports['rejectSeries'] = function(test){ - async.rejectSeries([3,1,2], function(x, callback){ - setTimeout(function(){callback(x % 2);}, x*25); - }, function(results){ - test.same(results, [2]); - test.done(); - }); -}; - -exports['some true'] = function(test){ - async.some([3,1,2], function(x, callback){ - setTimeout(function(){callback(x === 1);}, 0); - }, function(result){ - test.equals(result, true); - test.done(); - }); -}; - -exports['some false'] = function(test){ - async.some([3,1,2], function(x, callback){ - setTimeout(function(){callback(x === 10);}, 0); - }, function(result){ - test.equals(result, false); - test.done(); - }); -}; - -exports['some early return'] = function(test){ - var call_order = []; - async.some([1,2,3], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(x === 1); - }, x*25); - }, function(result){ - call_order.push('callback'); - }); - setTimeout(function(){ - test.same(call_order, [1,'callback',2,3]); - test.done(); - }, 100); -}; - -exports['any alias'] = function(test){ - test.equals(async.any, async.some); - test.done(); -}; - -exports['every true'] = function(test){ - async.every([1,2,3], function(x, callback){ - setTimeout(function(){callback(true);}, 0); - }, function(result){ - test.equals(result, true); - test.done(); - }); -}; - -exports['every false'] = function(test){ - async.every([1,2,3], function(x, callback){ - setTimeout(function(){callback(x % 2);}, 0); - }, function(result){ - test.equals(result, false); - test.done(); - }); -}; - -exports['every early return'] = function(test){ - var call_order = []; - async.every([1,2,3], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(x === 1); - }, x*25); - }, function(result){ - call_order.push('callback'); - }); - setTimeout(function(){ - test.same(call_order, [1,2,'callback',3]); - test.done(); - }, 100); -}; - -exports['all alias'] = function(test){ - test.equals(async.all, async.every); - test.done(); -}; - -exports['detect'] = function(test){ - var call_order = []; - async.detect([3,2,1], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(x == 2); - }, x*25); - }, function(result){ - call_order.push('callback'); - test.equals(result, 2); - }); - setTimeout(function(){ - test.same(call_order, [1,2,'callback',3]); - test.done(); - }, 100); -}; - -exports['detect - mulitple matches'] = function(test){ - var call_order = []; - async.detect([3,2,2,1,2], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(x == 2); - }, x*25); - }, function(result){ - call_order.push('callback'); - test.equals(result, 2); - }); - setTimeout(function(){ - test.same(call_order, [1,2,'callback',2,2,3]); - test.done(); - }, 100); -}; - -exports['detectSeries'] = function(test){ - var call_order = []; - async.detectSeries([3,2,1], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(x == 2); - }, x*25); - }, function(result){ - call_order.push('callback'); - test.equals(result, 2); - }); - setTimeout(function(){ - test.same(call_order, [3,2,'callback']); - test.done(); - }, 200); -}; - -exports['detectSeries - multiple matches'] = function(test){ - var call_order = []; - async.detectSeries([3,2,2,1,2], function(x, callback){ - setTimeout(function(){ - call_order.push(x); - callback(x == 2); - }, x*25); - }, function(result){ - call_order.push('callback'); - test.equals(result, 2); - }); - setTimeout(function(){ - test.same(call_order, [3,2,'callback']); - test.done(); - }, 200); -}; - -exports['sortBy'] = function(test){ - async.sortBy([{a:1},{a:15},{a:6}], function(x, callback){ - setTimeout(function(){callback(null, x.a);}, 0); - }, function(err, result){ - test.same(result, [{a:1},{a:6},{a:15}]); - test.done(); - }); -}; - -exports['apply'] = function(test){ - test.expect(6); - var fn = function(){ - test.same(Array.prototype.slice.call(arguments), [1,2,3,4]) - }; - async.apply(fn, 1, 2, 3, 4)(); - async.apply(fn, 1, 2, 3)(4); - async.apply(fn, 1, 2)(3, 4); - async.apply(fn, 1)(2, 3, 4); - async.apply(fn)(1, 2, 3, 4); - test.equals( - async.apply(function(name){return 'hello ' + name}, 'world')(), - 'hello world' - ); - test.done(); -}; - - -// generates tests for console functions such as async.log -var console_fn_tests = function(name){ - - if (typeof console !== 'undefined') { - exports[name] = function(test){ - test.expect(5); - var fn = function(arg1, callback){ - test.equals(arg1, 'one'); - setTimeout(function(){callback(null, 'test');}, 0); - }; - var fn_err = function(arg1, callback){ - test.equals(arg1, 'one'); - setTimeout(function(){callback('error');}, 0); - }; - var _console_fn = console[name]; - var _error = console.error; - console[name] = function(val){ - test.equals(val, 'test'); - test.equals(arguments.length, 1); - console.error = function(val){ - test.equals(val, 'error'); - console[name] = _console_fn; - console.error = _error; - test.done(); - }; - async[name](fn_err, 'one'); - }; - async[name](fn, 'one'); - }; - - exports[name + ' with multiple result params'] = function(test){ - var fn = function(callback){callback(null,'one','two','three');}; - var _console_fn = console[name]; - var called_with = []; - console[name] = function(x){ - called_with.push(x); - }; - async[name](fn); - test.same(called_with, ['one','two','three']); - console[name] = _console_fn; - test.done(); - }; - } - - // browser-only test - exports[name + ' without console.' + name] = function(test){ - if (typeof window !== 'undefined') { - var _console = window.console; - window.console = undefined; - var fn = function(callback){callback(null, 'val');}; - var fn_err = function(callback){callback('error');}; - async[name](fn); - async[name](fn_err); - window.console = _console; - } - test.done(); - }; - -}; - -console_fn_tests('log'); -console_fn_tests('dir'); -/*console_fn_tests('info'); -console_fn_tests('warn'); -console_fn_tests('error');*/ - -exports['nextTick'] = function(test){ - var call_order = []; - async.nextTick(function(){call_order.push('two');}); - call_order.push('one'); - setTimeout(function(){ - test.same(call_order, ['one','two']); - test.done(); - }, 50); -}; - -exports['nextTick in the browser'] = function(test){ - if (typeof process !== 'undefined') { - // skip this test in node - return test.done(); - } - test.expect(1); - - var call_order = []; - async.nextTick(function(){call_order.push('two');}); - - call_order.push('one'); - setTimeout(function(){ - if (typeof process !== 'undefined') { - process.nextTick = _nextTick; - } - test.same(call_order, ['one','two']); - }, 50); - setTimeout(test.done, 100); -}; - -exports['noConflict - node only'] = function(test){ - if (typeof process !== 'undefined') { - // node only test - test.expect(3); - var fs = require('fs'); - var filename = __dirname + '/../lib/async.js'; - fs.readFile(filename, function(err, content){ - if(err) return test.done(); - var Script = process.binding('evals').Script; - - var s = new Script(content, filename); - var s2 = new Script( - content + 'this.async2 = this.async.noConflict();', - filename - ); - - var sandbox1 = {async: 'oldvalue'}; - s.runInNewContext(sandbox1); - test.ok(sandbox1.async); - - var sandbox2 = {async: 'oldvalue'}; - s2.runInNewContext(sandbox2); - test.equals(sandbox2.async, 'oldvalue'); - test.ok(sandbox2.async2); - - test.done(); - }); - } - else test.done(); -}; - -exports['concat'] = function(test){ - var call_order = []; - var iterator = function (x, cb) { - setTimeout(function(){ - call_order.push(x); - var r = []; - while (x > 0) { - r.push(x); - x--; - } - cb(null, r); - }, x*25); - }; - async.concat([1,3,2], iterator, function(err, results){ - test.same(results, [1,2,1,3,2,1]); - test.same(call_order, [1,2,3]); - test.ok(!err); - test.done(); - }); -}; - -exports['concat error'] = function(test){ - var iterator = function (x, cb) { - cb(new Error('test error')); - }; - async.concat([1,2,3], iterator, function(err, results){ - test.ok(err); - test.done(); - }); -}; - -exports['concatSeries'] = function(test){ - var call_order = []; - var iterator = function (x, cb) { - setTimeout(function(){ - call_order.push(x); - var r = []; - while (x > 0) { - r.push(x); - x--; - } - cb(null, r); - }, x*25); - }; - async.concatSeries([1,3,2], iterator, function(err, results){ - test.same(results, [1,3,2,1,2,1]); - test.same(call_order, [1,3,2]); - test.ok(!err); - test.done(); - }); -}; - -exports['until'] = function (test) { - var call_order = []; - - var count = 0; - async.until( - function () { - call_order.push(['test', count]); - return (count == 5); - }, - function (cb) { - call_order.push(['iterator', count]); - count++; - cb(); - }, - function (err) { - test.same(call_order, [ - ['test', 0], - ['iterator', 0], ['test', 1], - ['iterator', 1], ['test', 2], - ['iterator', 2], ['test', 3], - ['iterator', 3], ['test', 4], - ['iterator', 4], ['test', 5], - ]); - test.equals(count, 5); - test.done(); - } - ); -}; - -exports['whilst'] = function (test) { - var call_order = []; - - var count = 0; - async.whilst( - function () { - call_order.push(['test', count]); - return (count < 5); - }, - function (cb) { - call_order.push(['iterator', count]); - count++; - cb(); - }, - function (err) { - test.same(call_order, [ - ['test', 0], - ['iterator', 0], ['test', 1], - ['iterator', 1], ['test', 2], - ['iterator', 2], ['test', 3], - ['iterator', 3], ['test', 4], - ['iterator', 4], ['test', 5], - ]); - test.equals(count, 5); - test.done(); - } - ); -}; - -exports['queue'] = function (test) { - var call_order = [], - delays = [40,20,60,20]; - - // worker1: --1-4 - // worker2: -2---3 - // order of completion: 2,1,4,3 - - var q = async.queue(function (task, callback) { - setTimeout(function () { - call_order.push('process ' + task); - callback('error', 'arg'); - }, delays.splice(0,1)[0]); - }, 2); - - q.push(1, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 1); - call_order.push('callback ' + 1); - }); - q.push(2, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 2); - call_order.push('callback ' + 2); - }); - q.push(3, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 0); - call_order.push('callback ' + 3); - }); - q.push(4, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 0); - call_order.push('callback ' + 4); - }); - test.equal(q.length(), 4); - test.equal(q.concurrency, 2); - - setTimeout(function () { - test.same(call_order, [ - 'process 2', 'callback 2', - 'process 1', 'callback 1', - 'process 4', 'callback 4', - 'process 3', 'callback 3' - ]); - test.equal(q.concurrency, 2); - test.equal(q.length(), 0); - test.done(); - }, 200); -}; - -exports['queue changing concurrency'] = function (test) { - var call_order = [], - delays = [40,20,60,20]; - - // worker1: --1-2---3-4 - // order of completion: 1,2,3,4 - - var q = async.queue(function (task, callback) { - setTimeout(function () { - call_order.push('process ' + task); - callback('error', 'arg'); - }, delays.splice(0,1)[0]); - }, 2); - - q.push(1, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 3); - call_order.push('callback ' + 1); - }); - q.push(2, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 2); - call_order.push('callback ' + 2); - }); - q.push(3, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 1); - call_order.push('callback ' + 3); - }); - q.push(4, function (err, arg) { - test.equal(err, 'error'); - test.equal(arg, 'arg'); - test.equal(q.length(), 0); - call_order.push('callback ' + 4); - }); - test.equal(q.length(), 4); - test.equal(q.concurrency, 2); - q.concurrency = 1; - - setTimeout(function () { - test.same(call_order, [ - 'process 1', 'callback 1', - 'process 2', 'callback 2', - 'process 3', 'callback 3', - 'process 4', 'callback 4' - ]); - test.equal(q.concurrency, 1); - test.equal(q.length(), 0); - test.done(); - }, 250); -}; - -exports['queue push without callback'] = function (test) { - var call_order = [], - delays = [40,20,60,20]; - - // worker1: --1-4 - // worker2: -2---3 - // order of completion: 2,1,4,3 - - var q = async.queue(function (task, callback) { - setTimeout(function () { - call_order.push('process ' + task); - callback('error', 'arg'); - }, delays.splice(0,1)[0]); - }, 2); - - q.push(1); - q.push(2); - q.push(3); - q.push(4); - - setTimeout(function () { - test.same(call_order, [ - 'process 2', - 'process 1', - 'process 4', - 'process 3' - ]); - test.done(); - }, 200); -}; - -exports['memoize'] = function (test) { - test.expect(4); - var call_order = []; - - var fn = function (arg1, arg2, callback) { - call_order.push(['fn', arg1, arg2]); - callback(null, arg1 + arg2); - }; - - var fn2 = async.memoize(fn); - fn2(1, 2, function (err, result) { - test.equal(result, 3); - }); - fn2(1, 2, function (err, result) { - test.equal(result, 3); - }); - fn2(2, 2, function (err, result) { - test.equal(result, 4); - }); - - test.same(call_order, [['fn',1,2], ['fn',2,2]]); - test.done(); -}; - -exports['unmemoize'] = function(test) { - test.expect(4); - var call_order = []; - - var fn = function (arg1, arg2, callback) { - call_order.push(['fn', arg1, arg2]); - callback(null, arg1 + arg2); - }; - - var fn2 = async.memoize(fn); - var fn3 = async.unmemoize(fn2); - fn3(1, 2, function (err, result) { - test.equal(result, 3); - }); - fn3(1, 2, function (err, result) { - test.equal(result, 3); - }); - fn3(2, 2, function (err, result) { - test.equal(result, 4); - }); - - test.same(call_order, [['fn',1,2], ['fn',1,2], ['fn',2,2]]); - - test.done(); -} - -exports['unmemoize a not memoized function'] = function(test) { - test.expect(1); - - var fn = function (arg1, arg2, callback) { - callback(null, arg1 + arg2); - }; - - var fn2 = async.unmemoize(fn); - fn2(1, 2, function(err, result) { - test.equal(result, 3); - }); - - test.done(); -} - -exports['memoize error'] = function (test) { - test.expect(1); - var testerr = new Error('test'); - var fn = function (arg1, arg2, callback) { - callback(testerr, arg1 + arg2); - }; - async.memoize(fn)(1, 2, function (err, result) { - test.equal(err, testerr); - }); - test.done(); -}; - -exports['memoize multiple calls'] = function (test) { - test.expect(3); - var fn = function (arg1, arg2, callback) { - test.ok(true); - setTimeout(function(){ - callback(null, arg1, arg2); - }, 10); - }; - var fn2 = async.memoize(fn); - fn2(1, 2, function(err, result) { - test.equal(result, 1, 2); - }); - fn2(1, 2, function(err, result) { - test.equal(result, 1, 2); - test.done(); - }); -}; - -exports['memoize custom hash function'] = function (test) { - test.expect(2); - var testerr = new Error('test'); - - var fn = function (arg1, arg2, callback) { - callback(testerr, arg1 + arg2); - }; - var fn2 = async.memoize(fn, function () { - return 'custom hash'; - }); - fn2(1, 2, function (err, result) { - test.equal(result, 3); - }); - fn2(2, 2, function (err, result) { - test.equal(result, 3); - }); - test.done(); -}; - -// Issue 10 on github: https://github.com/caolan/async/issues#issue/10 -exports['falsy return values in series'] = function (test) { - function taskFalse(callback) { - async.nextTick(function() { - callback(null, false); - }); - }; - function taskUndefined(callback) { - async.nextTick(function() { - callback(null, undefined); - }); - }; - function taskEmpty(callback) { - async.nextTick(function() { - callback(null); - }); - }; - function taskNull(callback) { - async.nextTick(function() { - callback(null, null); - }); - }; - async.series( - [taskFalse, taskUndefined, taskEmpty, taskNull], - function(err, results) { - test.equal(results.length, 4); - test.strictEqual(results[0], false); - test.strictEqual(results[1], undefined); - test.strictEqual(results[2], undefined); - test.strictEqual(results[3], null); - test.done(); - } - ); -}; - -// Issue 10 on github: https://github.com/caolan/async/issues#issue/10 -exports['falsy return values in parallel'] = function (test) { - function taskFalse(callback) { - async.nextTick(function() { - callback(null, false); - }); - }; - function taskUndefined(callback) { - async.nextTick(function() { - callback(null, undefined); - }); - }; - function taskEmpty(callback) { - async.nextTick(function() { - callback(null); - }); - }; - function taskNull(callback) { - async.nextTick(function() { - callback(null, null); - }); - }; - async.parallel( - [taskFalse, taskUndefined, taskEmpty, taskNull], - function(err, results) { - test.equal(results.length, 4); - test.strictEqual(results[0], false); - test.strictEqual(results[1], undefined); - test.strictEqual(results[2], undefined); - test.strictEqual(results[3], null); - test.done(); - } - ); -}; - -exports['queue events'] = function(test) { - var calls = []; - var q = async.queue(function(task, cb) { - // nop - calls.push('process ' + task); - cb(); - }, 3); - - q.saturated = function() { - test.ok(q.length() == 3, 'queue should be saturated now'); - calls.push('saturated'); - }; - q.empty = function() { - test.ok(q.length() == 0, 'queue should be empty now'); - calls.push('empty'); - }; - q.drain = function() { - test.ok( - q.length() == 0 && q.running() == 0, - 'queue should be empty now and no more workers should be running' - ); - calls.push('drain'); - test.same(calls, [ - 'saturated', - 'process foo', - 'foo cb', - 'process bar', - 'bar cb', - 'process zoo', - 'zoo cb', - 'process poo', - 'poo cb', - 'empty', - 'process moo', - 'moo cb', - 'drain', - ]); - test.done(); - }; - q.push('foo', function () {calls.push('foo cb');}); - q.push('bar', function () {calls.push('bar cb');}); - q.push('zoo', function () {calls.push('zoo cb');}); - q.push('poo', function () {calls.push('poo cb');}); - q.push('moo', function () {calls.push('moo cb');}); -}; diff --git a/node_modules/karma/node_modules/log4js/node_modules/async/test/test.html b/node_modules/karma/node_modules/log4js/node_modules/async/test/test.html deleted file mode 100644 index 2450e2dc..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/async/test/test.html +++ /dev/null @@ -1,24 +0,0 @@ - - - Async.js Test Suite - - - - - - - - -

    Async.js Test Suite

    - - - diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/LICENSE b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/README.md b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/README.md deleted file mode 100644 index be976683..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/README.md +++ /dev/null @@ -1,768 +0,0 @@ -# readable-stream - -A new class of streams for Node.js - -This module provides the new Stream base classes introduced in Node -v0.10, for use in Node v0.8. You can use it to have programs that -have to work with node v0.8, while being forward-compatible for v0.10 -and beyond. When you drop support for v0.8, you can remove this -module, and only use the native streams. - -This is almost exactly the same codebase as appears in Node v0.10. -However: - -1. The exported object is actually the Readable class. Decorating the - native `stream` module would be global pollution. -2. In v0.10, you can safely use `base64` as an argument to - `setEncoding` in Readable streams. However, in v0.8, the - StringDecoder class has no `end()` method, which is problematic for - Base64. So, don't use that, because it'll break and be weird. - -Other than that, the API is the same as `require('stream')` in v0.10, -so the API docs are reproduced below. - ----------- - - Stability: 2 - Unstable - -A stream is an abstract interface implemented by various objects in -Node. For example a request to an HTTP server is a stream, as is -stdout. Streams are readable, writable, or both. All streams are -instances of [EventEmitter][] - -You can load the Stream base classes by doing `require('stream')`. -There are base classes provided for Readable streams, Writable -streams, Duplex streams, and Transform streams. - -## Compatibility - -In earlier versions of Node, the Readable stream interface was -simpler, but also less powerful and less useful. - -* Rather than waiting for you to call the `read()` method, `'data'` - events would start emitting immediately. If you needed to do some - I/O to decide how to handle data, then you had to store the chunks - in some kind of buffer so that they would not be lost. -* The `pause()` method was advisory, rather than guaranteed. This - meant that you still had to be prepared to receive `'data'` events - even when the stream was in a paused state. - -In Node v0.10, the Readable class described below was added. For -backwards compatibility with older Node programs, Readable streams -switch into "old mode" when a `'data'` event handler is added, or when -the `pause()` or `resume()` methods are called. The effect is that, -even if you are not using the new `read()` method and `'readable'` -event, you no longer have to worry about losing `'data'` chunks. - -Most programs will continue to function normally. However, this -introduces an edge case in the following conditions: - -* No `'data'` event handler is added. -* The `pause()` and `resume()` methods are never called. - -For example, consider the following code: - -```javascript -// WARNING! BROKEN! -net.createServer(function(socket) { - - // we add an 'end' method, but never consume the data - socket.on('end', function() { - // It will never get here. - socket.end('I got your message (but didnt read it)\n'); - }); - -}).listen(1337); -``` - -In versions of node prior to v0.10, the incoming message data would be -simply discarded. However, in Node v0.10 and beyond, the socket will -remain paused forever. - -The workaround in this situation is to call the `resume()` method to -trigger "old mode" behavior: - -```javascript -// Workaround -net.createServer(function(socket) { - - socket.on('end', function() { - socket.end('I got your message (but didnt read it)\n'); - }); - - // start the flow of data, discarding it. - socket.resume(); - -}).listen(1337); -``` - -In addition to new Readable streams switching into old-mode, pre-v0.10 -style streams can be wrapped in a Readable class using the `wrap()` -method. - -## Class: stream.Readable - - - -A `Readable Stream` has the following methods, members, and events. - -Note that `stream.Readable` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -method. (See below.) - -### new stream.Readable([options]) - -* `options` {Object} - * `highWaterMark` {Number} The maximum number of bytes to store in - the internal buffer before ceasing to read from the underlying - resource. Default=16kb - * `encoding` {String} If specified, then buffers will be decoded to - strings using the specified encoding. Default=null - * `objectMode` {Boolean} Whether this stream should behave - as a stream of objects. Meaning that stream.read(n) returns - a single value instead of a Buffer of size n - -In classes that extend the Readable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### readable.\_read(size) - -* `size` {Number} Number of bytes to read asynchronously - -Note: **This function should NOT be called directly.** It should be -implemented by child classes, and called by the internal Readable -class methods only. - -All Readable stream implementations must provide a `_read` method -to fetch data from the underlying resource. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -When data is available, put it into the read queue by calling -`readable.push(chunk)`. If `push` returns false, then you should stop -reading. When `_read` is called again, you should start pushing more -data. - -The `size` argument is advisory. Implementations where a "read" is a -single call that returns data can use this to know how much data to -fetch. Implementations where that is not relevant, such as TCP or -TLS, may ignore this argument, and simply provide data whenever it -becomes available. There is no need, for example to "wait" until -`size` bytes are available before calling `stream.push(chunk)`. - -### readable.push(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to push into the read queue -* return {Boolean} Whether or not more pushes should be performed - -Note: **This function should be called by Readable implementors, NOT -by consumers of Readable subclasses.** The `_read()` function will not -be called again until at least one `push(chunk)` call is made. If no -data is available, then you MAY call `push('')` (an empty string) to -allow a future `_read` call, without adding any data to the queue. - -The `Readable` class works by putting data into a read queue to be -pulled out later by calling the `read()` method when the `'readable'` -event fires. - -The `push()` method will explicitly insert some data into the read -queue. If it is called with `null` then it will signal the end of the -data. - -In some cases, you may be wrapping a lower-level source which has some -sort of pause/resume mechanism, and a data callback. In those cases, -you could wrap the low-level source object by doing something like -this: - -```javascript -// source is an object with readStop() and readStart() methods, -// and an `ondata` member that gets called when it has data, and -// an `onend` member that gets called when the data is over. - -var stream = new Readable(); - -source.ondata = function(chunk) { - // if push() returns false, then we need to stop reading from source - if (!stream.push(chunk)) - source.readStop(); -}; - -source.onend = function() { - stream.push(null); -}; - -// _read will be called when the stream wants to pull more data in -// the advisory size argument is ignored in this case. -stream._read = function(n) { - source.readStart(); -}; -``` - -### readable.unshift(chunk) - -* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue -* return {Boolean} Whether or not more pushes should be performed - -This is the corollary of `readable.push(chunk)`. Rather than putting -the data at the *end* of the read queue, it puts it at the *front* of -the read queue. - -This is useful in certain use-cases where a stream is being consumed -by a parser, which needs to "un-consume" some data that it has -optimistically pulled out of the source. - -```javascript -// A parser for a simple data protocol. -// The "header" is a JSON object, followed by 2 \n characters, and -// then a message body. -// -// Note: This can be done more simply as a Transform stream. See below. - -function SimpleProtocol(source, options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Readable.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - - // source is a readable stream, such as a socket or file - this._source = source; - - var self = this; - source.on('end', function() { - self.push(null); - }); - - // give it a kick whenever the source is readable - // read(0) will not consume any bytes - source.on('readable', function() { - self.read(0); - }); - - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Readable.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._read = function(n) { - if (!this._inBody) { - var chunk = this._source.read(); - - // if the source doesn't have data, we don't have data yet. - if (chunk === null) - return this.push(''); - - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - this.push(''); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // now, because we got some extra data, unshift the rest - // back into the read queue so that our consumer will see it. - var b = chunk.slice(split); - this.unshift(b); - - // and let them know that we are done parsing the header. - this.emit('header', this.header); - } - } else { - // from there on, just provide the data to our consumer. - // careful not to push(null), since that would indicate EOF. - var chunk = this._source.read(); - if (chunk) this.push(chunk); - } -}; - -// Usage: -var parser = new SimpleProtocol(source); -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - -### readable.wrap(stream) - -* `stream` {Stream} An "old style" readable stream - -If you are using an older Node library that emits `'data'` events and -has a `pause()` method that is advisory only, then you can use the -`wrap()` method to create a Readable stream that uses the old stream -as its data source. - -For example: - -```javascript -var OldReader = require('./old-api-module.js').OldReader; -var oreader = new OldReader; -var Readable = require('stream').Readable; -var myReader = new Readable().wrap(oreader); - -myReader.on('readable', function() { - myReader.read(); // etc. -}); -``` - -### Event: 'readable' - -When there is data ready to be consumed, this event will fire. - -When this event emits, call the `read()` method to consume the data. - -### Event: 'end' - -Emitted when the stream has received an EOF (FIN in TCP terminology). -Indicates that no more `'data'` events will happen. If the stream is -also writable, it may be possible to continue writing. - -### Event: 'data' - -The `'data'` event emits either a `Buffer` (by default) or a string if -`setEncoding()` was used. - -Note that adding a `'data'` event listener will switch the Readable -stream into "old mode", where data is emitted as soon as it is -available, rather than waiting for you to call `read()` to consume it. - -### Event: 'error' - -Emitted if there was an error receiving data. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### readable.setEncoding(encoding) - -Makes the `'data'` event emit a string instead of a `Buffer`. `encoding` -can be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`. - -The encoding can also be set by specifying an `encoding` field to the -constructor. - -### readable.read([size]) - -* `size` {Number | null} Optional number of bytes to read. -* Return: {Buffer | String | null} - -Note: **This function SHOULD be called by Readable stream users.** - -Call this method to consume data once the `'readable'` event is -emitted. - -The `size` argument will set a minimum number of bytes that you are -interested in. If not set, then the entire content of the internal -buffer is returned. - -If there is no data to consume, or if there are fewer bytes in the -internal buffer than the `size` argument, then `null` is returned, and -a future `'readable'` event will be emitted when more is available. - -Calling `stream.read(0)` will always return `null`, and will trigger a -refresh of the internal buffer, but otherwise be a no-op. - -### readable.pipe(destination, [options]) - -* `destination` {Writable Stream} -* `options` {Object} Optional - * `end` {Boolean} Default=true - -Connects this readable stream to `destination` WriteStream. Incoming -data on this stream gets written to `destination`. Properly manages -back-pressure so that a slow destination will not be overwhelmed by a -fast readable stream. - -This function returns the `destination` stream. - -For example, emulating the Unix `cat` command: - - process.stdin.pipe(process.stdout); - -By default `end()` is called on the destination when the source stream -emits `end`, so that `destination` is no longer writable. Pass `{ end: -false }` as `options` to keep the destination stream open. - -This keeps `writer` open so that "Goodbye" can be written at the -end. - - reader.pipe(writer, { end: false }); - reader.on("end", function() { - writer.end("Goodbye\n"); - }); - -Note that `process.stderr` and `process.stdout` are never closed until -the process exits, regardless of the specified options. - -### readable.unpipe([destination]) - -* `destination` {Writable Stream} Optional - -Undo a previously established `pipe()`. If no destination is -provided, then all previously established pipes are removed. - -### readable.pause() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Ceases the flow of data. No `'data'` events are emitted while the -stream is in a paused state. - -### readable.resume() - -Switches the readable stream into "old mode", where data is emitted -using a `'data'` event rather than being buffered for consumption via -the `read()` method. - -Resumes the incoming `'data'` events after a `pause()`. - - -## Class: stream.Writable - - - -A `Writable` Stream has the following methods, members, and events. - -Note that `stream.Writable` is an abstract class designed to be -extended with an underlying implementation of the -`_write(chunk, encoding, cb)` method. (See below.) - -### new stream.Writable([options]) - -* `options` {Object} - * `highWaterMark` {Number} Buffer level when `write()` starts - returning false. Default=16kb - * `decodeStrings` {Boolean} Whether or not to decode strings into - Buffers before passing them to `_write()`. Default=true - -In classes that extend the Writable class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### writable.\_write(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be written. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. Ignore chunk is a buffer. Note that chunk will - **always** be a buffer unless the `decodeStrings` option is - explicitly set to `false`. -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -All Writable stream implementations must provide a `_write` method to -send data to the underlying resource. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Writable -class methods only. - -Call the callback using the standard `callback(error)` pattern to -signal that the write completed successfully or with an error. - -If the `decodeStrings` flag is set in the constructor options, then -`chunk` may be a string rather than a Buffer, and `encoding` will -indicate the sort of string that it is. This is to support -implementations that have an optimized handling for certain string -data encodings. If you do not explicitly set the `decodeStrings` -option to `false`, then you can safely ignore the `encoding` argument, -and assume that `chunk` will always be a Buffer. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - - -### writable.write(chunk, [encoding], [callback]) - -* `chunk` {Buffer | String} Data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when this chunk is - successfully written. -* Returns {Boolean} - -Writes `chunk` to the stream. Returns `true` if the data has been -flushed to the underlying resource. Returns `false` to indicate that -the buffer is full, and the data will be sent out in the future. The -`'drain'` event will indicate when the buffer is empty again. - -The specifics of when `write()` will return false, is determined by -the `highWaterMark` option provided to the constructor. - -### writable.end([chunk], [encoding], [callback]) - -* `chunk` {Buffer | String} Optional final data to be written -* `encoding` {String} Optional. If `chunk` is a string, then encoding - defaults to `'utf8'` -* `callback` {Function} Optional. Called when the final chunk is - successfully written. - -Call this method to signal the end of the data being written to the -stream. - -### Event: 'drain' - -Emitted when the stream's write queue empties and it's safe to write -without buffering again. Listen for it when `stream.write()` returns -`false`. - -### Event: 'close' - -Emitted when the underlying resource (for example, the backing file -descriptor) has been closed. Not all streams will emit this. - -### Event: 'finish' - -When `end()` is called and there are no more chunks to write, this -event is emitted. - -### Event: 'pipe' - -* `source` {Readable Stream} - -Emitted when the stream is passed to a readable stream's pipe method. - -### Event 'unpipe' - -* `source` {Readable Stream} - -Emitted when a previously established `pipe()` is removed using the -source Readable stream's `unpipe()` method. - -## Class: stream.Duplex - - - -A "duplex" stream is one that is both Readable and Writable, such as a -TCP socket connection. - -Note that `stream.Duplex` is an abstract class designed to be -extended with an underlying implementation of the `_read(size)` -and `_write(chunk, encoding, callback)` methods as you would with a Readable or -Writable stream class. - -Since JavaScript doesn't have multiple prototypal inheritance, this -class prototypally inherits from Readable, and then parasitically from -Writable. It is thus up to the user to implement both the lowlevel -`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method -on extension duplex classes. - -### new stream.Duplex(options) - -* `options` {Object} Passed to both Writable and Readable - constructors. Also has the following fields: - * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then - the stream will automatically end the readable side when the - writable side ends and vice versa. - -In classes that extend the Duplex class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -## Class: stream.Transform - -A "transform" stream is a duplex stream where the output is causally -connected in some way to the input, such as a zlib stream or a crypto -stream. - -There is no requirement that the output be the same size as the input, -the same number of chunks, or arrive at the same time. For example, a -Hash stream will only ever have a single chunk of output which is -provided when the input is ended. A zlib stream will either produce -much smaller or much larger than its input. - -Rather than implement the `_read()` and `_write()` methods, Transform -classes must implement the `_transform()` method, and may optionally -also implement the `_flush()` method. (See below.) - -### new stream.Transform([options]) - -* `options` {Object} Passed to both Writable and Readable - constructors. - -In classes that extend the Transform class, make sure to call the -constructor so that the buffering settings can be properly -initialized. - -### transform.\_transform(chunk, encoding, callback) - -* `chunk` {Buffer | String} The chunk to be transformed. Will always - be a buffer unless the `decodeStrings` option was set to `false`. -* `encoding` {String} If the chunk is a string, then this is the - encoding type. (Ignore if `decodeStrings` chunk is a buffer.) -* `callback` {Function} Call this function (optionally with an error - argument) when you are done processing the supplied chunk. - -Note: **This function MUST NOT be called directly.** It should be -implemented by child classes, and called by the internal Transform -class methods only. - -All Transform stream implementations must provide a `_transform` -method to accept input and produce output. - -`_transform` should do whatever has to be done in this specific -Transform class, to handle the bytes being written, and pass them off -to the readable portion of the interface. Do asynchronous I/O, -process things, and so on. - -Call `transform.push(outputChunk)` 0 or more times to generate output -from this input chunk, depending on how much data you want to output -as a result of this chunk. - -Call the callback function only when the current chunk is completely -consumed. Note that there may or may not be output as a result of any -particular input chunk. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### transform.\_flush(callback) - -* `callback` {Function} Call this function (optionally with an error - argument) when you are done flushing any remaining data. - -Note: **This function MUST NOT be called directly.** It MAY be implemented -by child classes, and if so, will be called by the internal Transform -class methods only. - -In some cases, your transform operation may need to emit a bit more -data at the end of the stream. For example, a `Zlib` compression -stream will store up some internal state so that it can optimally -compress the output. At the end, however, it needs to do the best it -can with what is left, so that the data will be complete. - -In those cases, you can implement a `_flush` method, which will be -called at the very end, after all the written data is consumed, but -before emitting `end` to signal the end of the readable side. Just -like with `_transform`, call `transform.push(chunk)` zero or more -times, as appropriate, and call `callback` when the flush operation is -complete. - -This method is prefixed with an underscore because it is internal to -the class that defines it, and should not be called directly by user -programs. However, you **are** expected to override this method in -your own extension classes. - -### Example: `SimpleProtocol` parser - -The example above of a simple protocol parser can be implemented much -more simply by using the higher level `Transform` stream class. - -In this example, rather than providing the input as an argument, it -would be piped into the parser, which is a more idiomatic Node stream -approach. - -```javascript -function SimpleProtocol(options) { - if (!(this instanceof SimpleProtocol)) - return new SimpleProtocol(options); - - Transform.call(this, options); - this._inBody = false; - this._sawFirstCr = false; - this._rawHeader = []; - this.header = null; -} - -SimpleProtocol.prototype = Object.create( - Transform.prototype, { constructor: { value: SimpleProtocol }}); - -SimpleProtocol.prototype._transform = function(chunk, encoding, done) { - if (!this._inBody) { - // check if the chunk has a \n\n - var split = -1; - for (var i = 0; i < chunk.length; i++) { - if (chunk[i] === 10) { // '\n' - if (this._sawFirstCr) { - split = i; - break; - } else { - this._sawFirstCr = true; - } - } else { - this._sawFirstCr = false; - } - } - - if (split === -1) { - // still waiting for the \n\n - // stash the chunk, and try again. - this._rawHeader.push(chunk); - } else { - this._inBody = true; - var h = chunk.slice(0, split); - this._rawHeader.push(h); - var header = Buffer.concat(this._rawHeader).toString(); - try { - this.header = JSON.parse(header); - } catch (er) { - this.emit('error', new Error('invalid simple protocol data')); - return; - } - // and let them know that we are done parsing the header. - this.emit('header', this.header); - - // now, because we got some extra data, emit this first. - this.push(b); - } - } else { - // from there on, just provide the data to our consumer as-is. - this.push(b); - } - done(); -}; - -var parser = new SimpleProtocol(); -source.pipe(parser) - -// Now parser is a readable stream that will emit 'header' -// with the parsed header data. -``` - - -## Class: stream.PassThrough - -This is a trivial implementation of a `Transform` stream that simply -passes the input bytes across to the output. Its purpose is mainly -for examples and testing, but there are occasionally use cases where -it can come in handy. - - -[EventEmitter]: events.html#events_class_events_eventemitter diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/duplex.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/duplex.js deleted file mode 100644 index ca807af8..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/duplex.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_duplex.js") diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/CAPSLOCKTYPER.JS b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/CAPSLOCKTYPER.JS deleted file mode 100644 index 205a4256..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/CAPSLOCKTYPER.JS +++ /dev/null @@ -1,32 +0,0 @@ -var Transform = require('../transform'); -var inherits = require('util').inherits; - -// subclass -function MyStream () { - Transform.call(this, { - lowWaterMark: 0, - encoding: 'utf8' - }); -} -inherits(MyStream, Transform); - -MyStream.prototype._transform = function (chunk, outputFn, callback) { - outputFn(new Buffer(String(chunk).toUpperCase())); - callback(); -}; - -// use it! -var s = new MyStream(); -process.stdin.resume(); -process.stdin.pipe(s).pipe(process.stdout); -if (process.stdin.setRawMode) - process.stdin.setRawMode(true); -process.stdin.on('data', function (c) { - c = c.toString(); - if (c === '\u0003' || c === '\u0004') { - process.stdin.pause(); - s.end(); - } - if (c === '\r') - process.stdout.write('\n'); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/typer-fsr.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/typer-fsr.js deleted file mode 100644 index 7e715844..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/typer-fsr.js +++ /dev/null @@ -1,15 +0,0 @@ -var fs = require('fs'); -var FSReadable = require('../fs.js'); -var rst = new FSReadable(__filename); - -rst.on('end', function() { - process.stdin.pause(); -}); - -process.stdin.setRawMode(true); -process.stdin.on('data', function() { - var c = rst.read(3); - if (!c) return; - process.stdout.write(c); -}); -process.stdin.resume(); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/typer.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/typer.js deleted file mode 100644 index c16eb6fb..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/examples/typer.js +++ /dev/null @@ -1,17 +0,0 @@ -var fs = require('fs'); -var fst = fs.createReadStream(__filename); -var Readable = require('../readable.js'); -var rst = new Readable(); -rst.wrap(fst); - -rst.on('end', function() { - process.stdin.pause(); -}); - -process.stdin.setRawMode(true); -process.stdin.on('data', function() { - var c = rst.read(3); - if (!c) return setTimeout(process.exit, 500) - process.stdout.write(c); -}); -process.stdin.resume(); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/float.patch b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/float.patch deleted file mode 100644 index 0ad71a1f..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/float.patch +++ /dev/null @@ -1,68 +0,0 @@ -diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js -index c5a741c..a2e0d8e 100644 ---- a/lib/_stream_duplex.js -+++ b/lib/_stream_duplex.js -@@ -26,8 +26,8 @@ - - module.exports = Duplex; - var util = require('util'); --var Readable = require('_stream_readable'); --var Writable = require('_stream_writable'); -+var Readable = require('./_stream_readable'); -+var Writable = require('./_stream_writable'); - - util.inherits(Duplex, Readable); - -diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js -index a5e9864..330c247 100644 ---- a/lib/_stream_passthrough.js -+++ b/lib/_stream_passthrough.js -@@ -25,7 +25,7 @@ - - module.exports = PassThrough; - --var Transform = require('_stream_transform'); -+var Transform = require('./_stream_transform'); - var util = require('util'); - util.inherits(PassThrough, Transform); - -diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js -index 2259d2e..e6681ee 100644 ---- a/lib/_stream_readable.js -+++ b/lib/_stream_readable.js -@@ -23,6 +23,9 @@ module.exports = Readable; - Readable.ReadableState = ReadableState; - - var EE = require('events').EventEmitter; -+if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { -+ return emitter.listeners(type).length; -+}; - var Stream = require('stream'); - var util = require('util'); - var StringDecoder; -diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js -index e925b4b..f08b05e 100644 ---- a/lib/_stream_transform.js -+++ b/lib/_stream_transform.js -@@ -64,7 +64,7 @@ - - module.exports = Transform; - --var Duplex = require('_stream_duplex'); -+var Duplex = require('./_stream_duplex'); - var util = require('util'); - util.inherits(Transform, Duplex); - -diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js -index a26f711..56ca47d 100644 ---- a/lib/_stream_writable.js -+++ b/lib/_stream_writable.js -@@ -109,7 +109,7 @@ function WritableState(options, stream) { - function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. -- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) -+ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/fs.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/fs.js deleted file mode 100644 index a663af86..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/fs.js +++ /dev/null @@ -1,1705 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// Maintainers, keep in mind that octal literals are not allowed -// in strict mode. Use the decimal value and add a comment with -// the octal value. Example: -// -// var mode = 438; /* mode=0666 */ - -var util = require('util'); -var pathModule = require('path'); - -var binding = process.binding('fs'); -var constants = process.binding('constants'); -var fs = exports; -var Stream = require('stream').Stream; -var EventEmitter = require('events').EventEmitter; - -var Readable = require('./lib/_stream_readable.js'); -var Writable = require('./lib/_stream_writable.js'); - -var kMinPoolSpace = 128; -var kPoolSize = 40 * 1024; - -var O_APPEND = constants.O_APPEND || 0; -var O_CREAT = constants.O_CREAT || 0; -var O_DIRECTORY = constants.O_DIRECTORY || 0; -var O_EXCL = constants.O_EXCL || 0; -var O_NOCTTY = constants.O_NOCTTY || 0; -var O_NOFOLLOW = constants.O_NOFOLLOW || 0; -var O_RDONLY = constants.O_RDONLY || 0; -var O_RDWR = constants.O_RDWR || 0; -var O_SYMLINK = constants.O_SYMLINK || 0; -var O_SYNC = constants.O_SYNC || 0; -var O_TRUNC = constants.O_TRUNC || 0; -var O_WRONLY = constants.O_WRONLY || 0; - -var isWindows = process.platform === 'win32'; - -var DEBUG = process.env.NODE_DEBUG && /fs/.test(process.env.NODE_DEBUG); - -function rethrow() { - // Only enable in debug mode. A backtrace uses ~1000 bytes of heap space and - // is fairly slow to generate. - if (DEBUG) { - var backtrace = new Error; - return function(err) { - if (err) { - backtrace.message = err.message; - err = backtrace; - throw err; - } - }; - } - - return function(err) { - if (err) { - throw err; // Forgot a callback but don't know where? Use NODE_DEBUG=fs - } - }; -} - -function maybeCallback(cb) { - return typeof cb === 'function' ? cb : rethrow(); -} - -// Ensure that callbacks run in the global context. Only use this function -// for callbacks that are passed to the binding layer, callbacks that are -// invoked from JS already run in the proper scope. -function makeCallback(cb) { - if (typeof cb !== 'function') { - return rethrow(); - } - - return function() { - return cb.apply(null, arguments); - }; -} - -function assertEncoding(encoding) { - if (encoding && !Buffer.isEncoding(encoding)) { - throw new Error('Unknown encoding: ' + encoding); - } -} - -function nullCheck(path, callback) { - if (('' + path).indexOf('\u0000') !== -1) { - var er = new Error('Path must be a string without null bytes.'); - if (!callback) - throw er; - process.nextTick(function() { - callback(er); - }); - return false; - } - return true; -} - -fs.Stats = binding.Stats; - -fs.Stats.prototype._checkModeProperty = function(property) { - return ((this.mode & constants.S_IFMT) === property); -}; - -fs.Stats.prototype.isDirectory = function() { - return this._checkModeProperty(constants.S_IFDIR); -}; - -fs.Stats.prototype.isFile = function() { - return this._checkModeProperty(constants.S_IFREG); -}; - -fs.Stats.prototype.isBlockDevice = function() { - return this._checkModeProperty(constants.S_IFBLK); -}; - -fs.Stats.prototype.isCharacterDevice = function() { - return this._checkModeProperty(constants.S_IFCHR); -}; - -fs.Stats.prototype.isSymbolicLink = function() { - return this._checkModeProperty(constants.S_IFLNK); -}; - -fs.Stats.prototype.isFIFO = function() { - return this._checkModeProperty(constants.S_IFIFO); -}; - -fs.Stats.prototype.isSocket = function() { - return this._checkModeProperty(constants.S_IFSOCK); -}; - -fs.exists = function(path, callback) { - if (!nullCheck(path, cb)) return; - binding.stat(pathModule._makeLong(path), cb); - function cb(err, stats) { - if (callback) callback(err ? false : true); - } -}; - -fs.existsSync = function(path) { - try { - nullCheck(path); - binding.stat(pathModule._makeLong(path)); - return true; - } catch (e) { - return false; - } -}; - -fs.readFile = function(path, encoding_) { - var encoding = typeof(encoding_) === 'string' ? encoding_ : null; - var callback = maybeCallback(arguments[arguments.length - 1]); - - assertEncoding(encoding); - - // first, stat the file, so we know the size. - var size; - var buffer; // single buffer with file data - var buffers; // list for when size is unknown - var pos = 0; - var fd; - - fs.open(path, constants.O_RDONLY, 438 /*=0666*/, function(er, fd_) { - if (er) return callback(er); - fd = fd_; - - fs.fstat(fd, function(er, st) { - if (er) return callback(er); - size = st.size; - if (size === 0) { - // the kernel lies about many files. - // Go ahead and try to read some bytes. - buffers = []; - return read(); - } - - buffer = new Buffer(size); - read(); - }); - }); - - function read() { - if (size === 0) { - buffer = new Buffer(8192); - fs.read(fd, buffer, 0, 8192, -1, afterRead); - } else { - fs.read(fd, buffer, pos, size - pos, -1, afterRead); - } - } - - function afterRead(er, bytesRead) { - if (er) { - return fs.close(fd, function(er2) { - return callback(er); - }); - } - - if (bytesRead === 0) { - return close(); - } - - pos += bytesRead; - if (size !== 0) { - if (pos === size) close(); - else read(); - } else { - // unknown size, just read until we don't get bytes. - buffers.push(buffer.slice(0, bytesRead)); - read(); - } - } - - function close() { - fs.close(fd, function(er) { - if (size === 0) { - // collected the data into the buffers list. - buffer = Buffer.concat(buffers, pos); - } else if (pos < size) { - buffer = buffer.slice(0, pos); - } - - if (encoding) buffer = buffer.toString(encoding); - return callback(er, buffer); - }); - } -}; - -fs.readFileSync = function(path, encoding) { - assertEncoding(encoding); - - var fd = fs.openSync(path, constants.O_RDONLY, 438 /*=0666*/); - - var size; - var threw = true; - try { - size = fs.fstatSync(fd).size; - threw = false; - } finally { - if (threw) fs.closeSync(fd); - } - - var pos = 0; - var buffer; // single buffer with file data - var buffers; // list for when size is unknown - - if (size === 0) { - buffers = []; - } else { - buffer = new Buffer(size); - } - - var done = false; - while (!done) { - var threw = true; - try { - if (size !== 0) { - var bytesRead = fs.readSync(fd, buffer, pos, size - pos); - } else { - // the kernel lies about many files. - // Go ahead and try to read some bytes. - buffer = new Buffer(8192); - var bytesRead = fs.readSync(fd, buffer, 0, 8192); - if (bytesRead) { - buffers.push(buffer.slice(0, bytesRead)); - } - } - threw = false; - } finally { - if (threw) fs.closeSync(fd); - } - - pos += bytesRead; - done = (bytesRead === 0) || (size !== 0 && pos >= size); - } - - fs.closeSync(fd); - - if (size === 0) { - // data was collected into the buffers list. - buffer = Buffer.concat(buffers, pos); - } else if (pos < size) { - buffer = buffer.slice(0, pos); - } - - if (encoding) buffer = buffer.toString(encoding); - return buffer; -}; - - -// Used by binding.open and friends -function stringToFlags(flag) { - // Only mess with strings - if (typeof flag !== 'string') { - return flag; - } - - // O_EXCL is mandated by POSIX, Windows supports it too. - // Let's add a check anyway, just in case. - if (!O_EXCL && ~flag.indexOf('x')) { - throw errnoException('ENOSYS', 'fs.open(O_EXCL)'); - } - - switch (flag) { - case 'r' : return O_RDONLY; - case 'rs' : return O_RDONLY | O_SYNC; - case 'r+' : return O_RDWR; - case 'rs+' : return O_RDWR | O_SYNC; - - case 'w' : return O_TRUNC | O_CREAT | O_WRONLY; - case 'wx' : // fall through - case 'xw' : return O_TRUNC | O_CREAT | O_WRONLY | O_EXCL; - - case 'w+' : return O_TRUNC | O_CREAT | O_RDWR; - case 'wx+': // fall through - case 'xw+': return O_TRUNC | O_CREAT | O_RDWR | O_EXCL; - - case 'a' : return O_APPEND | O_CREAT | O_WRONLY; - case 'ax' : // fall through - case 'xa' : return O_APPEND | O_CREAT | O_WRONLY | O_EXCL; - - case 'a+' : return O_APPEND | O_CREAT | O_RDWR; - case 'ax+': // fall through - case 'xa+': return O_APPEND | O_CREAT | O_RDWR | O_EXCL; - } - - throw new Error('Unknown file open flag: ' + flag); -} - -// exported but hidden, only used by test/simple/test-fs-open-flags.js -Object.defineProperty(exports, '_stringToFlags', { - enumerable: false, - value: stringToFlags -}); - - -// Yes, the follow could be easily DRYed up but I provide the explicit -// list to make the arguments clear. - -fs.close = function(fd, callback) { - binding.close(fd, makeCallback(callback)); -}; - -fs.closeSync = function(fd) { - return binding.close(fd); -}; - -function modeNum(m, def) { - switch (typeof m) { - case 'number': return m; - case 'string': return parseInt(m, 8); - default: - if (def) { - return modeNum(def); - } else { - return undefined; - } - } -} - -fs.open = function(path, flags, mode, callback) { - callback = makeCallback(arguments[arguments.length - 1]); - mode = modeNum(mode, 438 /*=0666*/); - - if (!nullCheck(path, callback)) return; - binding.open(pathModule._makeLong(path), - stringToFlags(flags), - mode, - callback); -}; - -fs.openSync = function(path, flags, mode) { - mode = modeNum(mode, 438 /*=0666*/); - nullCheck(path); - return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode); -}; - -fs.read = function(fd, buffer, offset, length, position, callback) { - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, length, position, encoding, callback) - var cb = arguments[4], - encoding = arguments[3]; - - assertEncoding(encoding); - - position = arguments[2]; - length = arguments[1]; - buffer = new Buffer(length); - offset = 0; - - callback = function(err, bytesRead) { - if (!cb) return; - - var str = (bytesRead > 0) ? buffer.toString(encoding, 0, bytesRead) : ''; - - (cb)(err, str, bytesRead); - }; - } - - function wrapper(err, bytesRead) { - // Retain a reference to buffer so that it can't be GC'ed too soon. - callback && callback(err, bytesRead || 0, buffer); - } - - binding.read(fd, buffer, offset, length, position, wrapper); -}; - -fs.readSync = function(fd, buffer, offset, length, position) { - var legacy = false; - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, length, position, encoding, callback) - legacy = true; - var encoding = arguments[3]; - - assertEncoding(encoding); - - position = arguments[2]; - length = arguments[1]; - buffer = new Buffer(length); - - offset = 0; - } - - var r = binding.read(fd, buffer, offset, length, position); - if (!legacy) { - return r; - } - - var str = (r > 0) ? buffer.toString(encoding, 0, r) : ''; - return [str, r]; -}; - -fs.write = function(fd, buffer, offset, length, position, callback) { - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, data, position, encoding, callback) - callback = arguments[4]; - position = arguments[2]; - assertEncoding(arguments[3]); - - buffer = new Buffer('' + arguments[1], arguments[3]); - offset = 0; - length = buffer.length; - } - - if (!length) { - if (typeof callback == 'function') { - process.nextTick(function() { - callback(undefined, 0); - }); - } - return; - } - - callback = maybeCallback(callback); - - function wrapper(err, written) { - // Retain a reference to buffer so that it can't be GC'ed too soon. - callback(err, written || 0, buffer); - } - - binding.write(fd, buffer, offset, length, position, wrapper); -}; - -fs.writeSync = function(fd, buffer, offset, length, position) { - if (!Buffer.isBuffer(buffer)) { - // legacy string interface (fd, data, position, encoding) - position = arguments[2]; - assertEncoding(arguments[3]); - - buffer = new Buffer('' + arguments[1], arguments[3]); - offset = 0; - length = buffer.length; - } - if (!length) return 0; - - return binding.write(fd, buffer, offset, length, position); -}; - -fs.rename = function(oldPath, newPath, callback) { - callback = makeCallback(callback); - if (!nullCheck(oldPath, callback)) return; - if (!nullCheck(newPath, callback)) return; - binding.rename(pathModule._makeLong(oldPath), - pathModule._makeLong(newPath), - callback); -}; - -fs.renameSync = function(oldPath, newPath) { - nullCheck(oldPath); - nullCheck(newPath); - return binding.rename(pathModule._makeLong(oldPath), - pathModule._makeLong(newPath)); -}; - -fs.truncate = function(path, len, callback) { - if (typeof path === 'number') { - // legacy - return fs.ftruncate(path, len, callback); - } - if (typeof len === 'function') { - callback = len; - len = 0; - } else if (typeof len === 'undefined') { - len = 0; - } - callback = maybeCallback(callback); - fs.open(path, 'w', function(er, fd) { - if (er) return callback(er); - binding.ftruncate(fd, len, function(er) { - fs.close(fd, function(er2) { - callback(er || er2); - }); - }); - }); -}; - -fs.truncateSync = function(path, len) { - if (typeof path === 'number') { - // legacy - return fs.ftruncateSync(path, len); - } - if (typeof len === 'undefined') { - len = 0; - } - // allow error to be thrown, but still close fd. - var fd = fs.openSync(path, 'w'); - try { - var ret = fs.ftruncateSync(fd, len); - } finally { - fs.closeSync(fd); - } - return ret; -}; - -fs.ftruncate = function(fd, len, callback) { - if (typeof len === 'function') { - callback = len; - len = 0; - } else if (typeof len === 'undefined') { - len = 0; - } - binding.ftruncate(fd, len, makeCallback(callback)); -}; - -fs.ftruncateSync = function(fd, len) { - if (typeof len === 'undefined') { - len = 0; - } - return binding.ftruncate(fd, len); -}; - -fs.rmdir = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.rmdir(pathModule._makeLong(path), callback); -}; - -fs.rmdirSync = function(path) { - nullCheck(path); - return binding.rmdir(pathModule._makeLong(path)); -}; - -fs.fdatasync = function(fd, callback) { - binding.fdatasync(fd, makeCallback(callback)); -}; - -fs.fdatasyncSync = function(fd) { - return binding.fdatasync(fd); -}; - -fs.fsync = function(fd, callback) { - binding.fsync(fd, makeCallback(callback)); -}; - -fs.fsyncSync = function(fd) { - return binding.fsync(fd); -}; - -fs.mkdir = function(path, mode, callback) { - if (typeof mode === 'function') callback = mode; - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.mkdir(pathModule._makeLong(path), - modeNum(mode, 511 /*=0777*/), - callback); -}; - -fs.mkdirSync = function(path, mode) { - nullCheck(path); - return binding.mkdir(pathModule._makeLong(path), - modeNum(mode, 511 /*=0777*/)); -}; - -fs.sendfile = function(outFd, inFd, inOffset, length, callback) { - binding.sendfile(outFd, inFd, inOffset, length, makeCallback(callback)); -}; - -fs.sendfileSync = function(outFd, inFd, inOffset, length) { - return binding.sendfile(outFd, inFd, inOffset, length); -}; - -fs.readdir = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.readdir(pathModule._makeLong(path), callback); -}; - -fs.readdirSync = function(path) { - nullCheck(path); - return binding.readdir(pathModule._makeLong(path)); -}; - -fs.fstat = function(fd, callback) { - binding.fstat(fd, makeCallback(callback)); -}; - -fs.lstat = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.lstat(pathModule._makeLong(path), callback); -}; - -fs.stat = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.stat(pathModule._makeLong(path), callback); -}; - -fs.fstatSync = function(fd) { - return binding.fstat(fd); -}; - -fs.lstatSync = function(path) { - nullCheck(path); - return binding.lstat(pathModule._makeLong(path)); -}; - -fs.statSync = function(path) { - nullCheck(path); - return binding.stat(pathModule._makeLong(path)); -}; - -fs.readlink = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.readlink(pathModule._makeLong(path), callback); -}; - -fs.readlinkSync = function(path) { - nullCheck(path); - return binding.readlink(pathModule._makeLong(path)); -}; - -function preprocessSymlinkDestination(path, type) { - if (!isWindows) { - // No preprocessing is needed on Unix. - return path; - } else if (type === 'junction') { - // Junctions paths need to be absolute and \\?\-prefixed. - return pathModule._makeLong(path); - } else { - // Windows symlinks don't tolerate forward slashes. - return ('' + path).replace(/\//g, '\\'); - } -} - -fs.symlink = function(destination, path, type_, callback) { - var type = (typeof type_ === 'string' ? type_ : null); - var callback = makeCallback(arguments[arguments.length - 1]); - - if (!nullCheck(destination, callback)) return; - if (!nullCheck(path, callback)) return; - - binding.symlink(preprocessSymlinkDestination(destination, type), - pathModule._makeLong(path), - type, - callback); -}; - -fs.symlinkSync = function(destination, path, type) { - type = (typeof type === 'string' ? type : null); - - nullCheck(destination); - nullCheck(path); - - return binding.symlink(preprocessSymlinkDestination(destination, type), - pathModule._makeLong(path), - type); -}; - -fs.link = function(srcpath, dstpath, callback) { - callback = makeCallback(callback); - if (!nullCheck(srcpath, callback)) return; - if (!nullCheck(dstpath, callback)) return; - - binding.link(pathModule._makeLong(srcpath), - pathModule._makeLong(dstpath), - callback); -}; - -fs.linkSync = function(srcpath, dstpath) { - nullCheck(srcpath); - nullCheck(dstpath); - return binding.link(pathModule._makeLong(srcpath), - pathModule._makeLong(dstpath)); -}; - -fs.unlink = function(path, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.unlink(pathModule._makeLong(path), callback); -}; - -fs.unlinkSync = function(path) { - nullCheck(path); - return binding.unlink(pathModule._makeLong(path)); -}; - -fs.fchmod = function(fd, mode, callback) { - binding.fchmod(fd, modeNum(mode), makeCallback(callback)); -}; - -fs.fchmodSync = function(fd, mode) { - return binding.fchmod(fd, modeNum(mode)); -}; - -if (constants.hasOwnProperty('O_SYMLINK')) { - fs.lchmod = function(path, mode, callback) { - callback = maybeCallback(callback); - fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, function(err, fd) { - if (err) { - callback(err); - return; - } - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - fs.fchmod(fd, mode, function(err) { - fs.close(fd, function(err2) { - callback(err || err2); - }); - }); - }); - }; - - fs.lchmodSync = function(path, mode) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK); - - // prefer to return the chmod error, if one occurs, - // but still try to close, and report closing errors if they occur. - var err, err2; - try { - var ret = fs.fchmodSync(fd, mode); - } catch (er) { - err = er; - } - try { - fs.closeSync(fd); - } catch (er) { - err2 = er; - } - if (err || err2) throw (err || err2); - return ret; - }; -} - - -fs.chmod = function(path, mode, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.chmod(pathModule._makeLong(path), - modeNum(mode), - callback); -}; - -fs.chmodSync = function(path, mode) { - nullCheck(path); - return binding.chmod(pathModule._makeLong(path), modeNum(mode)); -}; - -if (constants.hasOwnProperty('O_SYMLINK')) { - fs.lchown = function(path, uid, gid, callback) { - callback = maybeCallback(callback); - fs.open(path, constants.O_WRONLY | constants.O_SYMLINK, function(err, fd) { - if (err) { - callback(err); - return; - } - fs.fchown(fd, uid, gid, callback); - }); - }; - - fs.lchownSync = function(path, uid, gid) { - var fd = fs.openSync(path, constants.O_WRONLY | constants.O_SYMLINK); - return fs.fchownSync(fd, uid, gid); - }; -} - -fs.fchown = function(fd, uid, gid, callback) { - binding.fchown(fd, uid, gid, makeCallback(callback)); -}; - -fs.fchownSync = function(fd, uid, gid) { - return binding.fchown(fd, uid, gid); -}; - -fs.chown = function(path, uid, gid, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.chown(pathModule._makeLong(path), uid, gid, callback); -}; - -fs.chownSync = function(path, uid, gid) { - nullCheck(path); - return binding.chown(pathModule._makeLong(path), uid, gid); -}; - -// converts Date or number to a fractional UNIX timestamp -function toUnixTimestamp(time) { - if (typeof time == 'number') { - return time; - } - if (time instanceof Date) { - // convert to 123.456 UNIX timestamp - return time.getTime() / 1000; - } - throw new Error('Cannot parse time: ' + time); -} - -// exported for unit tests, not for public consumption -fs._toUnixTimestamp = toUnixTimestamp; - -fs.utimes = function(path, atime, mtime, callback) { - callback = makeCallback(callback); - if (!nullCheck(path, callback)) return; - binding.utimes(pathModule._makeLong(path), - toUnixTimestamp(atime), - toUnixTimestamp(mtime), - callback); -}; - -fs.utimesSync = function(path, atime, mtime) { - nullCheck(path); - atime = toUnixTimestamp(atime); - mtime = toUnixTimestamp(mtime); - binding.utimes(pathModule._makeLong(path), atime, mtime); -}; - -fs.futimes = function(fd, atime, mtime, callback) { - atime = toUnixTimestamp(atime); - mtime = toUnixTimestamp(mtime); - binding.futimes(fd, atime, mtime, makeCallback(callback)); -}; - -fs.futimesSync = function(fd, atime, mtime) { - atime = toUnixTimestamp(atime); - mtime = toUnixTimestamp(mtime); - binding.futimes(fd, atime, mtime); -}; - -function writeAll(fd, buffer, offset, length, position, callback) { - callback = maybeCallback(arguments[arguments.length - 1]); - - // write(fd, buffer, offset, length, position, callback) - fs.write(fd, buffer, offset, length, position, function(writeErr, written) { - if (writeErr) { - fs.close(fd, function() { - if (callback) callback(writeErr); - }); - } else { - if (written === length) { - fs.close(fd, callback); - } else { - offset += written; - length -= written; - position += written; - writeAll(fd, buffer, offset, length, position, callback); - } - } - }); -} - -fs.writeFile = function(path, data, encoding_, callback) { - var encoding = (typeof(encoding_) == 'string' ? encoding_ : 'utf8'); - assertEncoding(encoding); - - callback = maybeCallback(arguments[arguments.length - 1]); - fs.open(path, 'w', 438 /*=0666*/, function(openErr, fd) { - if (openErr) { - if (callback) callback(openErr); - } else { - var buffer = Buffer.isBuffer(data) ? data : new Buffer('' + data, - encoding); - writeAll(fd, buffer, 0, buffer.length, 0, callback); - } - }); -}; - -fs.writeFileSync = function(path, data, encoding) { - assertEncoding(encoding); - - var fd = fs.openSync(path, 'w'); - if (!Buffer.isBuffer(data)) { - data = new Buffer('' + data, encoding || 'utf8'); - } - var written = 0; - var length = data.length; - try { - while (written < length) { - written += fs.writeSync(fd, data, written, length - written, written); - } - } finally { - fs.closeSync(fd); - } -}; - -fs.appendFile = function(path, data, encoding_, callback) { - var encoding = (typeof(encoding_) == 'string' ? encoding_ : 'utf8'); - assertEncoding(encoding); - - callback = maybeCallback(arguments[arguments.length - 1]); - - fs.open(path, 'a', 438 /*=0666*/, function(err, fd) { - if (err) return callback(err); - var buffer = Buffer.isBuffer(data) ? data : new Buffer('' + data, encoding); - writeAll(fd, buffer, 0, buffer.length, null, callback); - }); -}; - -fs.appendFileSync = function(path, data, encoding) { - assertEncoding(encoding); - - var fd = fs.openSync(path, 'a'); - if (!Buffer.isBuffer(data)) { - data = new Buffer('' + data, encoding || 'utf8'); - } - var written = 0; - var position = null; - var length = data.length; - - try { - while (written < length) { - written += fs.writeSync(fd, data, written, length - written, position); - position += written; // XXX not safe with multiple concurrent writers? - } - } finally { - fs.closeSync(fd); - } -}; - -function errnoException(errorno, syscall) { - // TODO make this more compatible with ErrnoException from src/node.cc - // Once all of Node is using this function the ErrnoException from - // src/node.cc should be removed. - var e = new Error(syscall + ' ' + errorno); - e.errno = e.code = errorno; - e.syscall = syscall; - return e; -} - - -function FSWatcher() { - EventEmitter.call(this); - - var self = this; - var FSEvent = process.binding('fs_event_wrap').FSEvent; - this._handle = new FSEvent(); - this._handle.owner = this; - - this._handle.onchange = function(status, event, filename) { - if (status) { - self._handle.close(); - self.emit('error', errnoException(errno, 'watch')); - } else { - self.emit('change', event, filename); - } - }; -} -util.inherits(FSWatcher, EventEmitter); - -FSWatcher.prototype.start = function(filename, persistent) { - nullCheck(filename); - var r = this._handle.start(pathModule._makeLong(filename), persistent); - - if (r) { - this._handle.close(); - throw errnoException(errno, 'watch'); - } -}; - -FSWatcher.prototype.close = function() { - this._handle.close(); -}; - -fs.watch = function(filename) { - nullCheck(filename); - var watcher; - var options; - var listener; - - if ('object' == typeof arguments[1]) { - options = arguments[1]; - listener = arguments[2]; - } else { - options = {}; - listener = arguments[1]; - } - - if (options.persistent === undefined) options.persistent = true; - - watcher = new FSWatcher(); - watcher.start(filename, options.persistent); - - if (listener) { - watcher.addListener('change', listener); - } - - return watcher; -}; - - -// Stat Change Watchers - -function StatWatcher() { - EventEmitter.call(this); - - var self = this; - this._handle = new binding.StatWatcher(); - - // uv_fs_poll is a little more powerful than ev_stat but we curb it for - // the sake of backwards compatibility - var oldStatus = -1; - - this._handle.onchange = function(current, previous, newStatus) { - if (oldStatus === -1 && - newStatus === -1 && - current.nlink === previous.nlink) return; - - oldStatus = newStatus; - self.emit('change', current, previous); - }; - - this._handle.onstop = function() { - self.emit('stop'); - }; -} -util.inherits(StatWatcher, EventEmitter); - - -StatWatcher.prototype.start = function(filename, persistent, interval) { - nullCheck(filename); - this._handle.start(pathModule._makeLong(filename), persistent, interval); -}; - - -StatWatcher.prototype.stop = function() { - this._handle.stop(); -}; - - -var statWatchers = {}; -function inStatWatchers(filename) { - return Object.prototype.hasOwnProperty.call(statWatchers, filename) && - statWatchers[filename]; -} - - -fs.watchFile = function(filename) { - nullCheck(filename); - var stat; - var listener; - - var options = { - // Poll interval in milliseconds. 5007 is what libev used to use. It's - // a little on the slow side but let's stick with it for now to keep - // behavioral changes to a minimum. - interval: 5007, - persistent: true - }; - - if ('object' == typeof arguments[1]) { - options = util._extend(options, arguments[1]); - listener = arguments[2]; - } else { - listener = arguments[1]; - } - - if (!listener) { - throw new Error('watchFile requires a listener function'); - } - - if (inStatWatchers(filename)) { - stat = statWatchers[filename]; - } else { - stat = statWatchers[filename] = new StatWatcher(); - stat.start(filename, options.persistent, options.interval); - } - stat.addListener('change', listener); - return stat; -}; - -fs.unwatchFile = function(filename, listener) { - nullCheck(filename); - if (!inStatWatchers(filename)) return; - - var stat = statWatchers[filename]; - - if (typeof listener === 'function') { - stat.removeListener('change', listener); - } else { - stat.removeAllListeners('change'); - } - - if (stat.listeners('change').length === 0) { - stat.stop(); - statWatchers[filename] = undefined; - } -}; - -// Realpath -// Not using realpath(2) because it's bad. -// See: http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html - -var normalize = pathModule.normalize; - -// Regexp that finds the next partion of a (partial) path -// result is [base_with_slash, base], e.g. ['somedir/', 'somedir'] -if (isWindows) { - var nextPartRe = /(.*?)(?:[\/\\]+|$)/g; -} else { - var nextPartRe = /(.*?)(?:[\/]+|$)/g; -} - -// Regex to find the device root, including trailing slash. E.g. 'c:\\'. -if (isWindows) { - var splitRootRe = /^(?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/][^\\\/]+)?[\\\/]*/; -} else { - var splitRootRe = /^[\/]*/; -} - -fs.realpathSync = function realpathSync(p, cache) { - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return cache[p]; - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstatSync(base); - knownHard[base] = true; - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - // NB: p.length changes. - while (pos < p.length) { - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - continue; - } - - var resolvedLink; - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // some known symbolic link. no need to stat again. - resolvedLink = cache[base]; - } else { - var stat = fs.lstatSync(base); - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - continue; - } - - // read the link if it wasn't read before - // dev/ino always return 0 on windows, so skip the check. - var linkTarget = null; - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - linkTarget = seenLinks[id]; - } - } - if (linkTarget === null) { - fs.statSync(base); - linkTarget = fs.readlinkSync(base); - } - resolvedLink = pathModule.resolve(previous, linkTarget); - // track this, if given a cache. - if (cache) cache[base] = resolvedLink; - if (!isWindows) seenLinks[id] = linkTarget; - } - - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } - - if (cache) cache[original] = p; - - return p; -}; - - -fs.realpath = function realpath(p, cache, cb) { - if (typeof cb !== 'function') { - cb = maybeCallback(cache); - cache = null; - } - - // make p is absolute - p = pathModule.resolve(p); - - if (cache && Object.prototype.hasOwnProperty.call(cache, p)) { - return process.nextTick(cb.bind(null, null, cache[p])); - } - - var original = p, - seenLinks = {}, - knownHard = {}; - - // current character position in p - var pos; - // the partial path so far, including a trailing slash if any - var current; - // the partial path without a trailing slash (except when pointing at a root) - var base; - // the partial path scanned in the previous round, with slash - var previous; - - start(); - - function start() { - // Skip over roots - var m = splitRootRe.exec(p); - pos = m[0].length; - current = m[0]; - base = m[0]; - previous = ''; - - // On windows, check that the root exists. On unix there is no need. - if (isWindows && !knownHard[base]) { - fs.lstat(base, function(err) { - if (err) return cb(err); - knownHard[base] = true; - LOOP(); - }); - } else { - process.nextTick(LOOP); - } - } - - // walk down the path, swapping out linked pathparts for their real - // values - function LOOP() { - // stop if scanned past end of path - if (pos >= p.length) { - if (cache) cache[original] = p; - return cb(null, p); - } - - // find the next part - nextPartRe.lastIndex = pos; - var result = nextPartRe.exec(p); - previous = current; - current += result[0]; - base = previous + result[1]; - pos = nextPartRe.lastIndex; - - // continue if not a symlink - if (knownHard[base] || (cache && cache[base] === base)) { - return process.nextTick(LOOP); - } - - if (cache && Object.prototype.hasOwnProperty.call(cache, base)) { - // known symbolic link. no need to stat again. - return gotResolvedLink(cache[base]); - } - - return fs.lstat(base, gotStat); - } - - function gotStat(err, stat) { - if (err) return cb(err); - - // if not a symlink, skip to the next path part - if (!stat.isSymbolicLink()) { - knownHard[base] = true; - if (cache) cache[base] = base; - return process.nextTick(LOOP); - } - - // stat & read the link if not read before - // call gotTarget as soon as the link target is known - // dev/ino always return 0 on windows, so skip the check. - if (!isWindows) { - var id = stat.dev.toString(32) + ':' + stat.ino.toString(32); - if (seenLinks.hasOwnProperty(id)) { - return gotTarget(null, seenLinks[id], base); - } - } - fs.stat(base, function(err) { - if (err) return cb(err); - - fs.readlink(base, function(err, target) { - if (!isWindows) seenLinks[id] = target; - gotTarget(err, target); - }); - }); - } - - function gotTarget(err, target, base) { - if (err) return cb(err); - - var resolvedLink = pathModule.resolve(previous, target); - if (cache) cache[base] = resolvedLink; - gotResolvedLink(resolvedLink); - } - - function gotResolvedLink(resolvedLink) { - // resolve the link, then start over - p = pathModule.resolve(resolvedLink, p.slice(pos)); - start(); - } -}; - - - -var pool; - -function allocNewPool() { - pool = new Buffer(kPoolSize); - pool.used = 0; -} - - - -fs.createReadStream = function(path, options) { - return new ReadStream(path, options); -}; - -util.inherits(ReadStream, Readable); -fs.ReadStream = ReadStream; - -function ReadStream(path, options) { - if (!(this instanceof ReadStream)) - return new ReadStream(path, options); - - // a little bit bigger buffer and water marks by default - options = util._extend({ - bufferSize: 64 * 1024, - lowWaterMark: 16 * 1024, - highWaterMark: 64 * 1024 - }, options || {}); - - Readable.call(this, options); - - this.path = path; - this.fd = options.hasOwnProperty('fd') ? options.fd : null; - this.flags = options.hasOwnProperty('flags') ? options.flags : 'r'; - this.mode = options.hasOwnProperty('mode') ? options.mode : 438; /*=0666*/ - - this.start = options.hasOwnProperty('start') ? options.start : undefined; - this.end = options.hasOwnProperty('start') ? options.end : undefined; - this.pos = undefined; - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.end === undefined) { - this.end = Infinity; - } else if ('number' !== typeof this.end) { - throw TypeError('end must be a Number'); - } - - if (this.start > this.end) { - throw new Error('start must be <= end'); - } - - this.pos = this.start; - } - - if (typeof this.fd !== 'number') - this.open(); - - this.on('end', function() { - this.destroy(); - }); -} - -fs.FileReadStream = fs.ReadStream; // support the legacy name - -ReadStream.prototype.open = function() { - var self = this; - fs.open(this.path, this.flags, this.mode, function(er, fd) { - if (er) { - self.destroy(); - self.emit('error', er); - return; - } - - self.fd = fd; - self.emit('open', fd); - // start the flow of data. - self.read(); - }); -}; - -ReadStream.prototype._read = function(n, cb) { - if (typeof this.fd !== 'number') - return this.once('open', function() { - this._read(n, cb); - }); - - if (this.destroyed) - return; - - if (!pool || pool.length - pool.used < kMinPoolSpace) { - // discard the old pool. Can't add to the free list because - // users might have refernces to slices on it. - pool = null; - allocNewPool(); - } - - // Grab another reference to the pool in the case that while we're - // in the thread pool another read() finishes up the pool, and - // allocates a new one. - var thisPool = pool; - var toRead = Math.min(pool.length - pool.used, n); - var start = pool.used; - - if (this.pos !== undefined) - toRead = Math.min(this.end - this.pos + 1, toRead); - - // already read everything we were supposed to read! - // treat as EOF. - if (toRead <= 0) - return cb(); - - // the actual read. - var self = this; - fs.read(this.fd, pool, pool.used, toRead, this.pos, onread); - - // move the pool positions, and internal position for reading. - if (this.pos !== undefined) - this.pos += toRead; - pool.used += toRead; - - function onread(er, bytesRead) { - if (er) { - self.destroy(); - return cb(er); - } - - var b = null; - if (bytesRead > 0) - b = thisPool.slice(start, start + bytesRead); - - cb(null, b); - } -}; - - -ReadStream.prototype.destroy = function() { - if (this.destroyed) - return; - this.destroyed = true; - if ('number' === typeof this.fd) - this.close(); -}; - - -ReadStream.prototype.close = function(cb) { - if (cb) - this.once('close', cb); - if (this.closed || 'number' !== typeof this.fd) { - if ('number' !== typeof this.fd) - this.once('open', close); - return process.nextTick(this.emit.bind(this, 'close')); - } - this.closed = true; - var self = this; - close(); - - function close() { - fs.close(self.fd, function(er) { - if (er) - self.emit('error', er); - else - self.emit('close'); - }); - } -}; - - - - -fs.createWriteStream = function(path, options) { - return new WriteStream(path, options); -}; - -util.inherits(WriteStream, Writable); -fs.WriteStream = WriteStream; -function WriteStream(path, options) { - if (!(this instanceof WriteStream)) - return new WriteStream(path, options); - - // a little bit bigger buffer and water marks by default - options = util._extend({ - bufferSize: 64 * 1024, - lowWaterMark: 16 * 1024, - highWaterMark: 64 * 1024 - }, options || {}); - - Writable.call(this, options); - - this.path = path; - this.fd = null; - - this.fd = options.hasOwnProperty('fd') ? options.fd : null; - this.flags = options.hasOwnProperty('flags') ? options.flags : 'w'; - this.mode = options.hasOwnProperty('mode') ? options.mode : 438; /*=0666*/ - - this.start = options.hasOwnProperty('start') ? options.start : undefined; - this.pos = undefined; - this.bytesWritten = 0; - - if (this.start !== undefined) { - if ('number' !== typeof this.start) { - throw TypeError('start must be a Number'); - } - if (this.start < 0) { - throw new Error('start must be >= zero'); - } - - this.pos = this.start; - } - - if ('number' !== typeof this.fd) - this.open(); - - // dispose on finish. - this.once('finish', this.close); -} - -fs.FileWriteStream = fs.WriteStream; // support the legacy name - - -WriteStream.prototype.open = function() { - fs.open(this.path, this.flags, this.mode, function(er, fd) { - if (er) { - this.destroy(); - this.emit('error', er); - return; - } - - this.fd = fd; - this.emit('open', fd); - }.bind(this)); -}; - - -WriteStream.prototype._write = function(data, cb) { - if (!Buffer.isBuffer(data)) - return this.emit('error', new Error('Invalid data')); - - if (typeof this.fd !== 'number') - return this.once('open', this._write.bind(this, data, cb)); - - fs.write(this.fd, data, 0, data.length, this.pos, function(er, bytes) { - if (er) { - this.destroy(); - return cb(er); - } - this.bytesWritten += bytes; - cb(); - }.bind(this)); - - if (this.pos !== undefined) - this.pos += data.length; -}; - - -WriteStream.prototype.destroy = ReadStream.prototype.destroy; -WriteStream.prototype.close = ReadStream.prototype.close; - -// There is no shutdown() for files. -WriteStream.prototype.destroySoon = WriteStream.prototype.end; - - -// SyncWriteStream is internal. DO NOT USE. -// Temporary hack for process.stdout and process.stderr when piped to files. -function SyncWriteStream(fd) { - Stream.call(this); - - this.fd = fd; - this.writable = true; - this.readable = false; -} - -util.inherits(SyncWriteStream, Stream); - - -// Export -fs.SyncWriteStream = SyncWriteStream; - - -SyncWriteStream.prototype.write = function(data, arg1, arg2) { - var encoding, cb; - - // parse arguments - if (arg1) { - if (typeof arg1 === 'string') { - encoding = arg1; - cb = arg2; - } else if (typeof arg1 === 'function') { - cb = arg1; - } else { - throw new Error('bad arg'); - } - } - assertEncoding(encoding); - - // Change strings to buffers. SLOW - if (typeof data == 'string') { - data = new Buffer(data, encoding); - } - - fs.writeSync(this.fd, data, 0, data.length); - - if (cb) { - process.nextTick(cb); - } - - return true; -}; - - -SyncWriteStream.prototype.end = function(data, arg1, arg2) { - if (data) { - this.write(data, arg1, arg2); - } - this.destroy(); -}; - - -SyncWriteStream.prototype.destroy = function() { - fs.closeSync(this.fd); - this.fd = null; - this.emit('close'); - return true; -}; - -SyncWriteStream.prototype.destroySoon = SyncWriteStream.prototype.destroy; diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_duplex.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_duplex.js deleted file mode 100644 index a2e0d8e0..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_duplex.js +++ /dev/null @@ -1,69 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a duplex stream is just a stream that is both readable and writable. -// Since JS doesn't have multiple prototypal inheritance, this class -// prototypally inherits from Readable, and then parasitically from -// Writable. - -module.exports = Duplex; -var util = require('util'); -var Readable = require('./_stream_readable'); -var Writable = require('./_stream_writable'); - -util.inherits(Duplex, Readable); - -Object.keys(Writable.prototype).forEach(function(method) { - if (!Duplex.prototype[method]) - Duplex.prototype[method] = Writable.prototype[method]; -}); - -function Duplex(options) { - if (!(this instanceof Duplex)) - return new Duplex(options); - - Readable.call(this, options); - Writable.call(this, options); - - if (options && options.readable === false) - this.readable = false; - - if (options && options.writable === false) - this.writable = false; - - this.allowHalfOpen = true; - if (options && options.allowHalfOpen === false) - this.allowHalfOpen = false; - - this.once('end', onend); -} - -// the no-half-open enforcer -function onend() { - // if we allow half-open state, or if the writable side ended, - // then we're ok. - if (this.allowHalfOpen || this._writableState.ended) - return; - - // no more data can be written. - // But allow more writes to happen in this tick. - process.nextTick(this.end.bind(this)); -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_passthrough.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_passthrough.js deleted file mode 100644 index 330c247d..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_passthrough.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// a passthrough stream. -// basically just the most minimal sort of Transform stream. -// Every written chunk gets output as-is. - -module.exports = PassThrough; - -var Transform = require('./_stream_transform'); -var util = require('util'); -util.inherits(PassThrough, Transform); - -function PassThrough(options) { - if (!(this instanceof PassThrough)) - return new PassThrough(options); - - Transform.call(this, options); -} - -PassThrough.prototype._transform = function(chunk, encoding, cb) { - cb(null, chunk); -}; diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_readable.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_readable.js deleted file mode 100644 index 3c9da084..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_readable.js +++ /dev/null @@ -1,927 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -module.exports = Readable; -Readable.ReadableState = ReadableState; - -var EE = require('events').EventEmitter; -if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { - return emitter.listeners(type).length; -}; -var Stream = require('stream'); -var util = require('util'); -var StringDecoder; - -util.inherits(Readable, Stream); - -function ReadableState(options, stream) { - options = options || {}; - - // the point at which it stops calling _read() to fill the buffer - // Note: 0 is a valid value, means "don't call _read preemptively ever" - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.buffer = []; - this.length = 0; - this.pipes = null; - this.pipesCount = 0; - this.flowing = false; - this.ended = false; - this.endEmitted = false; - this.reading = false; - - // In streams that never have any data, and do push(null) right away, - // the consumer can miss the 'end' event if they do some I/O before - // consuming the stream. So, we don't emit('end') until some reading - // happens. - this.calledRead = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // whenever we return null, then we set a flag to say - // that we're awaiting a 'readable' event emission. - this.needReadable = false; - this.emittedReadable = false; - this.readableListening = false; - - - // object stream flag. Used to make read(n) ignore n and to - // make all the buffer merging and length checks go away - this.objectMode = !!options.objectMode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // when piping, we only care about 'readable' events that happen - // after read()ing all the bytes and not getting any pushback. - this.ranOut = false; - - // the number of writers that are awaiting a drain event in .pipe()s - this.awaitDrain = 0; - - // if true, a maybeReadMore has been scheduled - this.readingMore = false; - - this.decoder = null; - this.encoding = null; - if (options.encoding) { - if (!StringDecoder) - StringDecoder = require('string_decoder').StringDecoder; - this.decoder = new StringDecoder(options.encoding); - this.encoding = options.encoding; - } -} - -function Readable(options) { - if (!(this instanceof Readable)) - return new Readable(options); - - this._readableState = new ReadableState(options, this); - - // legacy - this.readable = true; - - Stream.call(this); -} - -// Manually shove something into the read() buffer. -// This returns true if the highWaterMark has not been hit yet, -// similar to how Writable.write() returns true if you should -// write() some more. -Readable.prototype.push = function(chunk, encoding) { - var state = this._readableState; - - if (typeof chunk === 'string' && !state.objectMode) { - encoding = encoding || state.defaultEncoding; - if (encoding !== state.encoding) { - chunk = new Buffer(chunk, encoding); - encoding = ''; - } - } - - return readableAddChunk(this, state, chunk, encoding, false); -}; - -// Unshift should *always* be something directly out of read() -Readable.prototype.unshift = function(chunk) { - var state = this._readableState; - return readableAddChunk(this, state, chunk, '', true); -}; - -function readableAddChunk(stream, state, chunk, encoding, addToFront) { - var er = chunkInvalid(state, chunk); - if (er) { - stream.emit('error', er); - } else if (chunk === null || chunk === undefined) { - state.reading = false; - if (!state.ended) - onEofChunk(stream, state); - } else if (state.objectMode || chunk && chunk.length > 0) { - if (state.ended && !addToFront) { - var e = new Error('stream.push() after EOF'); - stream.emit('error', e); - } else if (state.endEmitted && addToFront) { - var e = new Error('stream.unshift() after end event'); - stream.emit('error', e); - } else { - if (state.decoder && !addToFront && !encoding) - chunk = state.decoder.write(chunk); - - // update the buffer info. - state.length += state.objectMode ? 1 : chunk.length; - if (addToFront) { - state.buffer.unshift(chunk); - } else { - state.reading = false; - state.buffer.push(chunk); - } - - if (state.needReadable) - emitReadable(stream); - - maybeReadMore(stream, state); - } - } else if (!addToFront) { - state.reading = false; - } - - return needMoreData(state); -} - - - -// if it's past the high water mark, we can push in some more. -// Also, if we have no data yet, we can stand some -// more bytes. This is to work around cases where hwm=0, -// such as the repl. Also, if the push() triggered a -// readable event, and the user called read(largeNumber) such that -// needReadable was set, then we ought to push more, so that another -// 'readable' event will be triggered. -function needMoreData(state) { - return !state.ended && - (state.needReadable || - state.length < state.highWaterMark || - state.length === 0); -} - -// backwards compatibility. -Readable.prototype.setEncoding = function(enc) { - if (!StringDecoder) - StringDecoder = require('string_decoder').StringDecoder; - this._readableState.decoder = new StringDecoder(enc); - this._readableState.encoding = enc; -}; - -// Don't raise the hwm > 128MB -var MAX_HWM = 0x800000; -function roundUpToNextPowerOf2(n) { - if (n >= MAX_HWM) { - n = MAX_HWM; - } else { - // Get the next highest power of 2 - n--; - for (var p = 1; p < 32; p <<= 1) n |= n >> p; - n++; - } - return n; -} - -function howMuchToRead(n, state) { - if (state.length === 0 && state.ended) - return 0; - - if (state.objectMode) - return n === 0 ? 0 : 1; - - if (isNaN(n) || n === null) { - // only flow one buffer at a time - if (state.flowing && state.buffer.length) - return state.buffer[0].length; - else - return state.length; - } - - if (n <= 0) - return 0; - - // If we're asking for more than the target buffer level, - // then raise the water mark. Bump up to the next highest - // power of 2, to prevent increasing it excessively in tiny - // amounts. - if (n > state.highWaterMark) - state.highWaterMark = roundUpToNextPowerOf2(n); - - // don't have that much. return null, unless we've ended. - if (n > state.length) { - if (!state.ended) { - state.needReadable = true; - return 0; - } else - return state.length; - } - - return n; -} - -// you can override either this method, or the async _read(n) below. -Readable.prototype.read = function(n) { - var state = this._readableState; - state.calledRead = true; - var nOrig = n; - - if (typeof n !== 'number' || n > 0) - state.emittedReadable = false; - - // if we're doing read(0) to trigger a readable event, but we - // already have a bunch of data in the buffer, then just trigger - // the 'readable' event and move on. - if (n === 0 && - state.needReadable && - (state.length >= state.highWaterMark || state.ended)) { - emitReadable(this); - return null; - } - - n = howMuchToRead(n, state); - - // if we've ended, and we're now clear, then finish it up. - if (n === 0 && state.ended) { - if (state.length === 0) - endReadable(this); - return null; - } - - // All the actual chunk generation logic needs to be - // *below* the call to _read. The reason is that in certain - // synthetic stream cases, such as passthrough streams, _read - // may be a completely synchronous operation which may change - // the state of the read buffer, providing enough data when - // before there was *not* enough. - // - // So, the steps are: - // 1. Figure out what the state of things will be after we do - // a read from the buffer. - // - // 2. If that resulting state will trigger a _read, then call _read. - // Note that this may be asynchronous, or synchronous. Yes, it is - // deeply ugly to write APIs this way, but that still doesn't mean - // that the Readable class should behave improperly, as streams are - // designed to be sync/async agnostic. - // Take note if the _read call is sync or async (ie, if the read call - // has returned yet), so that we know whether or not it's safe to emit - // 'readable' etc. - // - // 3. Actually pull the requested chunks out of the buffer and return. - - // if we need a readable event, then we need to do some reading. - var doRead = state.needReadable; - - // if we currently have less than the highWaterMark, then also read some - if (state.length - n <= state.highWaterMark) - doRead = true; - - // however, if we've ended, then there's no point, and if we're already - // reading, then it's unnecessary. - if (state.ended || state.reading) - doRead = false; - - if (doRead) { - state.reading = true; - state.sync = true; - // if the length is currently zero, then we *need* a readable event. - if (state.length === 0) - state.needReadable = true; - // call internal read method - this._read(state.highWaterMark); - state.sync = false; - } - - // If _read called its callback synchronously, then `reading` - // will be false, and we need to re-evaluate how much data we - // can return to the user. - if (doRead && !state.reading) - n = howMuchToRead(nOrig, state); - - var ret; - if (n > 0) - ret = fromList(n, state); - else - ret = null; - - if (ret === null) { - state.needReadable = true; - n = 0; - } - - state.length -= n; - - // If we have nothing in the buffer, then we want to know - // as soon as we *do* get something into the buffer. - if (state.length === 0 && !state.ended) - state.needReadable = true; - - // If we happened to read() exactly the remaining amount in the - // buffer, and the EOF has been seen at this point, then make sure - // that we emit 'end' on the very next tick. - if (state.ended && !state.endEmitted && state.length === 0) - endReadable(this); - - return ret; -}; - -function chunkInvalid(state, chunk) { - var er = null; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode && - !er) { - er = new TypeError('Invalid non-string/buffer chunk'); - } - return er; -} - - -function onEofChunk(stream, state) { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) { - state.buffer.push(chunk); - state.length += state.objectMode ? 1 : chunk.length; - } - } - state.ended = true; - - // if we've ended and we have some data left, then emit - // 'readable' now to make sure it gets picked up. - if (state.length > 0) - emitReadable(stream); - else - endReadable(stream); -} - -// Don't emit readable right away in sync mode, because this can trigger -// another read() call => stack overflow. This way, it might trigger -// a nextTick recursion warning, but that's not so bad. -function emitReadable(stream) { - var state = stream._readableState; - state.needReadable = false; - if (state.emittedReadable) - return; - - state.emittedReadable = true; - if (state.sync) - process.nextTick(function() { - emitReadable_(stream); - }); - else - emitReadable_(stream); -} - -function emitReadable_(stream) { - stream.emit('readable'); -} - - -// at this point, the user has presumably seen the 'readable' event, -// and called read() to consume some data. that may have triggered -// in turn another _read(n) call, in which case reading = true if -// it's in progress. -// However, if we're not ended, or reading, and the length < hwm, -// then go ahead and try to read some more preemptively. -function maybeReadMore(stream, state) { - if (!state.readingMore) { - state.readingMore = true; - process.nextTick(function() { - maybeReadMore_(stream, state); - }); - } -} - -function maybeReadMore_(stream, state) { - var len = state.length; - while (!state.reading && !state.flowing && !state.ended && - state.length < state.highWaterMark) { - stream.read(0); - if (len === state.length) - // didn't get any data, stop spinning. - break; - else - len = state.length; - } - state.readingMore = false; -} - -// abstract method. to be overridden in specific implementation classes. -// call cb(er, data) where data is <= n in length. -// for virtual (non-string, non-buffer) streams, "length" is somewhat -// arbitrary, and perhaps not very meaningful. -Readable.prototype._read = function(n) { - this.emit('error', new Error('not implemented')); -}; - -Readable.prototype.pipe = function(dest, pipeOpts) { - var src = this; - var state = this._readableState; - - switch (state.pipesCount) { - case 0: - state.pipes = dest; - break; - case 1: - state.pipes = [state.pipes, dest]; - break; - default: - state.pipes.push(dest); - break; - } - state.pipesCount += 1; - - var doEnd = (!pipeOpts || pipeOpts.end !== false) && - dest !== process.stdout && - dest !== process.stderr; - - var endFn = doEnd ? onend : cleanup; - if (state.endEmitted) - process.nextTick(endFn); - else - src.once('end', endFn); - - dest.on('unpipe', onunpipe); - function onunpipe(readable) { - if (readable !== src) return; - cleanup(); - } - - function onend() { - dest.end(); - } - - // when the dest drains, it reduces the awaitDrain counter - // on the source. This would be more elegant with a .once() - // handler in flow(), but adding and removing repeatedly is - // too slow. - var ondrain = pipeOnDrain(src); - dest.on('drain', ondrain); - - function cleanup() { - // cleanup event handlers once the pipe is broken - dest.removeListener('close', onclose); - dest.removeListener('finish', onfinish); - dest.removeListener('drain', ondrain); - dest.removeListener('error', onerror); - dest.removeListener('unpipe', onunpipe); - src.removeListener('end', onend); - src.removeListener('end', cleanup); - - // if the reader is waiting for a drain event from this - // specific writer, then it would cause it to never start - // flowing again. - // So, if this is awaiting a drain, then we just call it now. - // If we don't know, then assume that we are waiting for one. - if (!dest._writableState || dest._writableState.needDrain) - ondrain(); - } - - // if the dest has an error, then stop piping into it. - // however, don't suppress the throwing behavior for this. - function onerror(er) { - unpipe(); - dest.removeListener('error', onerror); - if (EE.listenerCount(dest, 'error') === 0) - dest.emit('error', er); - } - // This is a brutally ugly hack to make sure that our error handler - // is attached before any userland ones. NEVER DO THIS. - if (!dest._events.error) - dest.on('error', onerror); - else if (Array.isArray(dest._events.error)) - dest._events.error.unshift(onerror); - else - dest._events.error = [onerror, dest._events.error]; - - - - // Both close and finish should trigger unpipe, but only once. - function onclose() { - dest.removeListener('finish', onfinish); - unpipe(); - } - dest.once('close', onclose); - function onfinish() { - dest.removeListener('close', onclose); - unpipe(); - } - dest.once('finish', onfinish); - - function unpipe() { - src.unpipe(dest); - } - - // tell the dest that it's being piped to - dest.emit('pipe', src); - - // start the flow if it hasn't been started already. - if (!state.flowing) { - // the handler that waits for readable events after all - // the data gets sucked out in flow. - // This would be easier to follow with a .once() handler - // in flow(), but that is too slow. - this.on('readable', pipeOnReadable); - - state.flowing = true; - process.nextTick(function() { - flow(src); - }); - } - - return dest; -}; - -function pipeOnDrain(src) { - return function() { - var dest = this; - var state = src._readableState; - state.awaitDrain--; - if (state.awaitDrain === 0) - flow(src); - }; -} - -function flow(src) { - var state = src._readableState; - var chunk; - state.awaitDrain = 0; - - function write(dest, i, list) { - var written = dest.write(chunk); - if (false === written) { - state.awaitDrain++; - } - } - - while (state.pipesCount && null !== (chunk = src.read())) { - - if (state.pipesCount === 1) - write(state.pipes, 0, null); - else - state.pipes.forEach(write); - - src.emit('data', chunk); - - // if anyone needs a drain, then we have to wait for that. - if (state.awaitDrain > 0) - return; - } - - // if every destination was unpiped, either before entering this - // function, or in the while loop, then stop flowing. - // - // NB: This is a pretty rare edge case. - if (state.pipesCount === 0) { - state.flowing = false; - - // if there were data event listeners added, then switch to old mode. - if (EE.listenerCount(src, 'data') > 0) - emitDataEvents(src); - return; - } - - // at this point, no one needed a drain, so we just ran out of data - // on the next readable event, start it over again. - state.ranOut = true; -} - -function pipeOnReadable() { - if (this._readableState.ranOut) { - this._readableState.ranOut = false; - flow(this); - } -} - - -Readable.prototype.unpipe = function(dest) { - var state = this._readableState; - - // if we're not piping anywhere, then do nothing. - if (state.pipesCount === 0) - return this; - - // just one destination. most common case. - if (state.pipesCount === 1) { - // passed in one, but it's not the right one. - if (dest && dest !== state.pipes) - return this; - - if (!dest) - dest = state.pipes; - - // got a match. - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - if (dest) - dest.emit('unpipe', this); - return this; - } - - // slow case. multiple pipe destinations. - - if (!dest) { - // remove all. - var dests = state.pipes; - var len = state.pipesCount; - state.pipes = null; - state.pipesCount = 0; - this.removeListener('readable', pipeOnReadable); - state.flowing = false; - - for (var i = 0; i < len; i++) - dests[i].emit('unpipe', this); - return this; - } - - // try to find the right one. - var i = state.pipes.indexOf(dest); - if (i === -1) - return this; - - state.pipes.splice(i, 1); - state.pipesCount -= 1; - if (state.pipesCount === 1) - state.pipes = state.pipes[0]; - - dest.emit('unpipe', this); - - return this; -}; - -// set up data events if they are asked for -// Ensure readable listeners eventually get something -Readable.prototype.on = function(ev, fn) { - var res = Stream.prototype.on.call(this, ev, fn); - - if (ev === 'data' && !this._readableState.flowing) - emitDataEvents(this); - - if (ev === 'readable' && this.readable) { - var state = this._readableState; - if (!state.readableListening) { - state.readableListening = true; - state.emittedReadable = false; - state.needReadable = true; - if (!state.reading) { - this.read(0); - } else if (state.length) { - emitReadable(this, state); - } - } - } - - return res; -}; -Readable.prototype.addListener = Readable.prototype.on; - -// pause() and resume() are remnants of the legacy readable stream API -// If the user uses them, then switch into old mode. -Readable.prototype.resume = function() { - emitDataEvents(this); - this.read(0); - this.emit('resume'); -}; - -Readable.prototype.pause = function() { - emitDataEvents(this, true); - this.emit('pause'); -}; - -function emitDataEvents(stream, startPaused) { - var state = stream._readableState; - - if (state.flowing) { - // https://github.com/isaacs/readable-stream/issues/16 - throw new Error('Cannot switch to old mode now.'); - } - - var paused = startPaused || false; - var readable = false; - - // convert to an old-style stream. - stream.readable = true; - stream.pipe = Stream.prototype.pipe; - stream.on = stream.addListener = Stream.prototype.on; - - stream.on('readable', function() { - readable = true; - - var c; - while (!paused && (null !== (c = stream.read()))) - stream.emit('data', c); - - if (c === null) { - readable = false; - stream._readableState.needReadable = true; - } - }); - - stream.pause = function() { - paused = true; - this.emit('pause'); - }; - - stream.resume = function() { - paused = false; - if (readable) - process.nextTick(function() { - stream.emit('readable'); - }); - else - this.read(0); - this.emit('resume'); - }; - - // now make it start, just in case it hadn't already. - stream.emit('readable'); -} - -// wrap an old-style stream as the async data source. -// This is *not* part of the readable stream interface. -// It is an ugly unfortunate mess of history. -Readable.prototype.wrap = function(stream) { - var state = this._readableState; - var paused = false; - - var self = this; - stream.on('end', function() { - if (state.decoder && !state.ended) { - var chunk = state.decoder.end(); - if (chunk && chunk.length) - self.push(chunk); - } - - self.push(null); - }); - - stream.on('data', function(chunk) { - if (state.decoder) - chunk = state.decoder.write(chunk); - if (!chunk || !state.objectMode && !chunk.length) - return; - - var ret = self.push(chunk); - if (!ret) { - paused = true; - stream.pause(); - } - }); - - // proxy all the other methods. - // important when wrapping filters and duplexes. - for (var i in stream) { - if (typeof stream[i] === 'function' && - typeof this[i] === 'undefined') { - this[i] = function(method) { return function() { - return stream[method].apply(stream, arguments); - }}(i); - } - } - - // proxy certain important events. - var events = ['error', 'close', 'destroy', 'pause', 'resume']; - events.forEach(function(ev) { - stream.on(ev, self.emit.bind(self, ev)); - }); - - // when we try to consume some more bytes, simply unpause the - // underlying stream. - self._read = function(n) { - if (paused) { - paused = false; - stream.resume(); - } - }; - - return self; -}; - - - -// exposed for testing purposes only. -Readable._fromList = fromList; - -// Pluck off n bytes from an array of buffers. -// Length is the combined lengths of all the buffers in the list. -function fromList(n, state) { - var list = state.buffer; - var length = state.length; - var stringMode = !!state.decoder; - var objectMode = !!state.objectMode; - var ret; - - // nothing in the list, definitely empty. - if (list.length === 0) - return null; - - if (length === 0) - ret = null; - else if (objectMode) - ret = list.shift(); - else if (!n || n >= length) { - // read it all, truncate the array. - if (stringMode) - ret = list.join(''); - else - ret = Buffer.concat(list, length); - list.length = 0; - } else { - // read just some of it. - if (n < list[0].length) { - // just take a part of the first list item. - // slice is the same for buffers and strings. - var buf = list[0]; - ret = buf.slice(0, n); - list[0] = buf.slice(n); - } else if (n === list[0].length) { - // first list is a perfect match - ret = list.shift(); - } else { - // complex case. - // we have enough to cover it, but it spans past the first buffer. - if (stringMode) - ret = ''; - else - ret = new Buffer(n); - - var c = 0; - for (var i = 0, l = list.length; i < l && c < n; i++) { - var buf = list[0]; - var cpy = Math.min(n - c, buf.length); - - if (stringMode) - ret += buf.slice(0, cpy); - else - buf.copy(ret, c, 0, cpy); - - if (cpy < buf.length) - list[0] = buf.slice(cpy); - else - list.shift(); - - c += cpy; - } - } - } - - return ret; -} - -function endReadable(stream) { - var state = stream._readableState; - - // If we get here before consuming all the bytes, then that is a - // bug in node. Should never happen. - if (state.length > 0) - throw new Error('endReadable called on non-empty stream'); - - if (!state.endEmitted && state.calledRead) { - state.ended = true; - process.nextTick(function() { - // Check that we didn't get one last unshift. - if (!state.endEmitted && state.length === 0) { - state.endEmitted = true; - stream.readable = false; - stream.emit('end'); - } - }); - } -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_transform.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_transform.js deleted file mode 100644 index f08b05e5..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_transform.js +++ /dev/null @@ -1,205 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -// a transform stream is a readable/writable stream where you do -// something with the data. Sometimes it's called a "filter", -// but that's not a great name for it, since that implies a thing where -// some bits pass through, and others are simply ignored. (That would -// be a valid example of a transform, of course.) -// -// While the output is causally related to the input, it's not a -// necessarily symmetric or synchronous transformation. For example, -// a zlib stream might take multiple plain-text writes(), and then -// emit a single compressed chunk some time in the future. -// -// Here's how this works: -// -// The Transform stream has all the aspects of the readable and writable -// stream classes. When you write(chunk), that calls _write(chunk,cb) -// internally, and returns false if there's a lot of pending writes -// buffered up. When you call read(), that calls _read(n) until -// there's enough pending readable data buffered up. -// -// In a transform stream, the written data is placed in a buffer. When -// _read(n) is called, it transforms the queued up data, calling the -// buffered _write cb's as it consumes chunks. If consuming a single -// written chunk would result in multiple output chunks, then the first -// outputted bit calls the readcb, and subsequent chunks just go into -// the read buffer, and will cause it to emit 'readable' if necessary. -// -// This way, back-pressure is actually determined by the reading side, -// since _read has to be called to start processing a new chunk. However, -// a pathological inflate type of transform can cause excessive buffering -// here. For example, imagine a stream where every byte of input is -// interpreted as an integer from 0-255, and then results in that many -// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in -// 1kb of data being output. In this case, you could write a very small -// amount of input, and end up with a very large amount of output. In -// such a pathological inflating mechanism, there'd be no way to tell -// the system to stop doing the transform. A single 4MB write could -// cause the system to run out of memory. -// -// However, even in such a pathological case, only a single written chunk -// would be consumed, and then the rest would wait (un-transformed) until -// the results of the previous transformed chunk were consumed. - -module.exports = Transform; - -var Duplex = require('./_stream_duplex'); -var util = require('util'); -util.inherits(Transform, Duplex); - - -function TransformState(options, stream) { - this.afterTransform = function(er, data) { - return afterTransform(stream, er, data); - }; - - this.needTransform = false; - this.transforming = false; - this.writecb = null; - this.writechunk = null; -} - -function afterTransform(stream, er, data) { - var ts = stream._transformState; - ts.transforming = false; - - var cb = ts.writecb; - - if (!cb) - return stream.emit('error', new Error('no writecb in Transform class')); - - ts.writechunk = null; - ts.writecb = null; - - if (data !== null && data !== undefined) - stream.push(data); - - if (cb) - cb(er); - - var rs = stream._readableState; - rs.reading = false; - if (rs.needReadable || rs.length < rs.highWaterMark) { - stream._read(rs.highWaterMark); - } -} - - -function Transform(options) { - if (!(this instanceof Transform)) - return new Transform(options); - - Duplex.call(this, options); - - var ts = this._transformState = new TransformState(options, this); - - // when the writable side finishes, then flush out anything remaining. - var stream = this; - - // start out asking for a readable event once data is transformed. - this._readableState.needReadable = true; - - // we have implemented the _read method, and done the other things - // that Readable wants before the first _read call, so unset the - // sync guard flag. - this._readableState.sync = false; - - this.once('finish', function() { - if ('function' === typeof this._flush) - this._flush(function(er) { - done(stream, er); - }); - else - done(stream); - }); -} - -Transform.prototype.push = function(chunk, encoding) { - this._transformState.needTransform = false; - return Duplex.prototype.push.call(this, chunk, encoding); -}; - -// This is the part where you do stuff! -// override this function in implementation classes. -// 'chunk' is an input chunk. -// -// Call `push(newChunk)` to pass along transformed output -// to the readable side. You may call 'push' zero or more times. -// -// Call `cb(err)` when you are done with this chunk. If you pass -// an error, then that'll put the hurt on the whole operation. If you -// never call cb(), then you'll never get another chunk. -Transform.prototype._transform = function(chunk, encoding, cb) { - throw new Error('not implemented'); -}; - -Transform.prototype._write = function(chunk, encoding, cb) { - var ts = this._transformState; - ts.writecb = cb; - ts.writechunk = chunk; - ts.writeencoding = encoding; - if (!ts.transforming) { - var rs = this._readableState; - if (ts.needTransform || - rs.needReadable || - rs.length < rs.highWaterMark) - this._read(rs.highWaterMark); - } -}; - -// Doesn't matter what the args are here. -// _transform does all the work. -// That we got here means that the readable side wants more data. -Transform.prototype._read = function(n) { - var ts = this._transformState; - - if (ts.writechunk && ts.writecb && !ts.transforming) { - ts.transforming = true; - this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); - } else { - // mark that we need a transform, so that any data that comes in - // will get processed, now that we've asked for it. - ts.needTransform = true; - } -}; - - -function done(stream, er) { - if (er) - return stream.emit('error', er); - - // if there's nothing in the write buffer, then that means - // that nothing more will ever be provided - var ws = stream._writableState; - var rs = stream._readableState; - var ts = stream._transformState; - - if (ws.length) - throw new Error('calling transform done when ws.length != 0'); - - if (ts.transforming) - throw new Error('calling transform done when still transforming'); - - return stream.push(null); -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_writable.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_writable.js deleted file mode 100644 index 56ca47dd..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/lib/_stream_writable.js +++ /dev/null @@ -1,367 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -// A bit simpler than readable streams. -// Implement an async ._write(chunk, cb), and it'll handle all -// the drain event emission and buffering. - -module.exports = Writable; -Writable.WritableState = WritableState; - -var util = require('util'); -var assert = require('assert'); -var Stream = require('stream'); - -util.inherits(Writable, Stream); - -function WriteReq(chunk, encoding, cb) { - this.chunk = chunk; - this.encoding = encoding; - this.callback = cb; -} - -function WritableState(options, stream) { - options = options || {}; - - // the point at which write() starts returning false - // Note: 0 is a valid value, means that we always return false if - // the entire buffer is not flushed immediately on write() - var hwm = options.highWaterMark; - this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; - - // object stream flag to indicate whether or not this stream - // contains buffers or objects. - this.objectMode = !!options.objectMode; - - // cast to ints. - this.highWaterMark = ~~this.highWaterMark; - - this.needDrain = false; - // at the start of calling end() - this.ending = false; - // when end() has been called, and returned - this.ended = false; - // when 'finish' is emitted - this.finished = false; - - // should we decode strings into buffers before passing to _write? - // this is here so that some node-core streams can optimize string - // handling at a lower level. - var noDecode = options.decodeStrings === false; - this.decodeStrings = !noDecode; - - // Crypto is kind of old and crusty. Historically, its default string - // encoding is 'binary' so we have to make this configurable. - // Everything else in the universe uses 'utf8', though. - this.defaultEncoding = options.defaultEncoding || 'utf8'; - - // not an actual buffer we keep track of, but a measurement - // of how much we're waiting to get pushed to some underlying - // socket or file. - this.length = 0; - - // a flag to see when we're in the middle of a write. - this.writing = false; - - // a flag to be able to tell if the onwrite cb is called immediately, - // or on a later tick. We set this to true at first, becuase any - // actions that shouldn't happen until "later" should generally also - // not happen before the first write call. - this.sync = true; - - // a flag to know if we're processing previously buffered items, which - // may call the _write() callback in the same tick, so that we don't - // end up in an overlapped onwrite situation. - this.bufferProcessing = false; - - // the callback that's passed to _write(chunk,cb) - this.onwrite = function(er) { - onwrite(stream, er); - }; - - // the callback that the user supplies to write(chunk,encoding,cb) - this.writecb = null; - - // the amount that is being written when _write is called. - this.writelen = 0; - - this.buffer = []; -} - -function Writable(options) { - // Writable ctor is applied to Duplexes, though they're not - // instanceof Writable, they're instanceof Readable. - if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) - return new Writable(options); - - this._writableState = new WritableState(options, this); - - // legacy. - this.writable = true; - - Stream.call(this); -} - -// Otherwise people can pipe Writable streams, which is just wrong. -Writable.prototype.pipe = function() { - this.emit('error', new Error('Cannot pipe. Not readable.')); -}; - - -function writeAfterEnd(stream, state, cb) { - var er = new Error('write after end'); - // TODO: defer error events consistently everywhere, not just the cb - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); -} - -// If we get something that is not a buffer, string, null, or undefined, -// and we're not in objectMode, then that's an error. -// Otherwise stream chunks are all considered to be of length=1, and the -// watermarks determine how many objects to keep in the buffer, rather than -// how many bytes or characters. -function validChunk(stream, state, chunk, cb) { - var valid = true; - if (!Buffer.isBuffer(chunk) && - 'string' !== typeof chunk && - chunk !== null && - chunk !== undefined && - !state.objectMode) { - var er = new TypeError('Invalid non-string/buffer chunk'); - stream.emit('error', er); - process.nextTick(function() { - cb(er); - }); - valid = false; - } - return valid; -} - -Writable.prototype.write = function(chunk, encoding, cb) { - var state = this._writableState; - var ret = false; - - if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (Buffer.isBuffer(chunk)) - encoding = 'buffer'; - else if (!encoding) - encoding = state.defaultEncoding; - - if (typeof cb !== 'function') - cb = function() {}; - - if (state.ended) - writeAfterEnd(this, state, cb); - else if (validChunk(this, state, chunk, cb)) - ret = writeOrBuffer(this, state, chunk, encoding, cb); - - return ret; -}; - -function decodeChunk(state, chunk, encoding) { - if (!state.objectMode && - state.decodeStrings !== false && - typeof chunk === 'string') { - chunk = new Buffer(chunk, encoding); - } - return chunk; -} - -// if we're already writing something, then just put this -// in the queue, and wait our turn. Otherwise, call _write -// If we return false, then we need a drain event, so set that flag. -function writeOrBuffer(stream, state, chunk, encoding, cb) { - chunk = decodeChunk(state, chunk, encoding); - var len = state.objectMode ? 1 : chunk.length; - - state.length += len; - - var ret = state.length < state.highWaterMark; - state.needDrain = !ret; - - if (state.writing) - state.buffer.push(new WriteReq(chunk, encoding, cb)); - else - doWrite(stream, state, len, chunk, encoding, cb); - - return ret; -} - -function doWrite(stream, state, len, chunk, encoding, cb) { - state.writelen = len; - state.writecb = cb; - state.writing = true; - state.sync = true; - stream._write(chunk, encoding, state.onwrite); - state.sync = false; -} - -function onwriteError(stream, state, sync, er, cb) { - if (sync) - process.nextTick(function() { - cb(er); - }); - else - cb(er); - - stream.emit('error', er); -} - -function onwriteStateUpdate(state) { - state.writing = false; - state.writecb = null; - state.length -= state.writelen; - state.writelen = 0; -} - -function onwrite(stream, er) { - var state = stream._writableState; - var sync = state.sync; - var cb = state.writecb; - - onwriteStateUpdate(state); - - if (er) - onwriteError(stream, state, sync, er, cb); - else { - // Check if we're actually ready to finish, but don't emit yet - var finished = needFinish(stream, state); - - if (!finished && !state.bufferProcessing && state.buffer.length) - clearBuffer(stream, state); - - if (sync) { - process.nextTick(function() { - afterWrite(stream, state, finished, cb); - }); - } else { - afterWrite(stream, state, finished, cb); - } - } -} - -function afterWrite(stream, state, finished, cb) { - if (!finished) - onwriteDrain(stream, state); - cb(); - if (finished) - finishMaybe(stream, state); -} - -// Must force callback to be called on nextTick, so that we don't -// emit 'drain' before the write() consumer gets the 'false' return -// value, and has a chance to attach a 'drain' listener. -function onwriteDrain(stream, state) { - if (state.length === 0 && state.needDrain) { - state.needDrain = false; - stream.emit('drain'); - } -} - - -// if there's something in the buffer waiting, then process it -function clearBuffer(stream, state) { - state.bufferProcessing = true; - - for (var c = 0; c < state.buffer.length; c++) { - var entry = state.buffer[c]; - var chunk = entry.chunk; - var encoding = entry.encoding; - var cb = entry.callback; - var len = state.objectMode ? 1 : chunk.length; - - doWrite(stream, state, len, chunk, encoding, cb); - - // if we didn't call the onwrite immediately, then - // it means that we need to wait until it does. - // also, that means that the chunk and cb are currently - // being processed, so move the buffer counter past them. - if (state.writing) { - c++; - break; - } - } - - state.bufferProcessing = false; - if (c < state.buffer.length) - state.buffer = state.buffer.slice(c); - else - state.buffer.length = 0; -} - -Writable.prototype._write = function(chunk, encoding, cb) { - cb(new Error('not implemented')); -}; - -Writable.prototype.end = function(chunk, encoding, cb) { - var state = this._writableState; - - if (typeof chunk === 'function') { - cb = chunk; - chunk = null; - encoding = null; - } else if (typeof encoding === 'function') { - cb = encoding; - encoding = null; - } - - if (typeof chunk !== 'undefined' && chunk !== null) - this.write(chunk, encoding); - - // ignore unnecessary end() calls. - if (!state.ending && !state.finished) - endWritable(this, state, cb); -}; - - -function needFinish(stream, state) { - return (state.ending && - state.length === 0 && - !state.finished && - !state.writing); -} - -function finishMaybe(stream, state) { - var need = needFinish(stream, state); - if (need) { - state.finished = true; - stream.emit('finish'); - } - return need; -} - -function endWritable(stream, state, cb) { - state.ending = true; - finishMaybe(stream, state); - if (cb) { - if (state.finished) - process.nextTick(cb); - else - stream.once('finish', cb); - } - state.ended = true; -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/package.json b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/package.json deleted file mode 100644 index 1a721d32..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "readable-stream", - "version": "1.0.17", - "description": "An exploration of a new kind of readable streams for Node.js", - "main": "readable.js", - "dependencies": {}, - "devDependencies": { - "tap": "~0.2.6" - }, - "scripts": { - "test": "tap test/simple/*.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/readable-stream" - }, - "keywords": [ - "readable", - "stream", - "pipe" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# readable-stream\n\nA new class of streams for Node.js\n\nThis module provides the new Stream base classes introduced in Node\nv0.10, for use in Node v0.8. You can use it to have programs that\nhave to work with node v0.8, while being forward-compatible for v0.10\nand beyond. When you drop support for v0.8, you can remove this\nmodule, and only use the native streams.\n\nThis is almost exactly the same codebase as appears in Node v0.10.\nHowever:\n\n1. The exported object is actually the Readable class. Decorating the\n native `stream` module would be global pollution.\n2. In v0.10, you can safely use `base64` as an argument to\n `setEncoding` in Readable streams. However, in v0.8, the\n StringDecoder class has no `end()` method, which is problematic for\n Base64. So, don't use that, because it'll break and be weird.\n\nOther than that, the API is the same as `require('stream')` in v0.10,\nso the API docs are reproduced below.\n\n----------\n\n Stability: 2 - Unstable\n\nA stream is an abstract interface implemented by various objects in\nNode. For example a request to an HTTP server is a stream, as is\nstdout. Streams are readable, writable, or both. All streams are\ninstances of [EventEmitter][]\n\nYou can load the Stream base classes by doing `require('stream')`.\nThere are base classes provided for Readable streams, Writable\nstreams, Duplex streams, and Transform streams.\n\n## Compatibility\n\nIn earlier versions of Node, the Readable stream interface was\nsimpler, but also less powerful and less useful.\n\n* Rather than waiting for you to call the `read()` method, `'data'`\n events would start emitting immediately. If you needed to do some\n I/O to decide how to handle data, then you had to store the chunks\n in some kind of buffer so that they would not be lost.\n* The `pause()` method was advisory, rather than guaranteed. This\n meant that you still had to be prepared to receive `'data'` events\n even when the stream was in a paused state.\n\nIn Node v0.10, the Readable class described below was added. For\nbackwards compatibility with older Node programs, Readable streams\nswitch into \"old mode\" when a `'data'` event handler is added, or when\nthe `pause()` or `resume()` methods are called. The effect is that,\neven if you are not using the new `read()` method and `'readable'`\nevent, you no longer have to worry about losing `'data'` chunks.\n\nMost programs will continue to function normally. However, this\nintroduces an edge case in the following conditions:\n\n* No `'data'` event handler is added.\n* The `pause()` and `resume()` methods are never called.\n\nFor example, consider the following code:\n\n```javascript\n// WARNING! BROKEN!\nnet.createServer(function(socket) {\n\n // we add an 'end' method, but never consume the data\n socket.on('end', function() {\n // It will never get here.\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n}).listen(1337);\n```\n\nIn versions of node prior to v0.10, the incoming message data would be\nsimply discarded. However, in Node v0.10 and beyond, the socket will\nremain paused forever.\n\nThe workaround in this situation is to call the `resume()` method to\ntrigger \"old mode\" behavior:\n\n```javascript\n// Workaround\nnet.createServer(function(socket) {\n\n socket.on('end', function() {\n socket.end('I got your message (but didnt read it)\\n');\n });\n\n // start the flow of data, discarding it.\n socket.resume();\n\n}).listen(1337);\n```\n\nIn addition to new Readable streams switching into old-mode, pre-v0.10\nstyle streams can be wrapped in a Readable class using the `wrap()`\nmethod.\n\n## Class: stream.Readable\n\n\n\nA `Readable Stream` has the following methods, members, and events.\n\nNote that `stream.Readable` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nmethod. (See below.)\n\n### new stream.Readable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} The maximum number of bytes to store in\n the internal buffer before ceasing to read from the underlying\n resource. Default=16kb\n * `encoding` {String} If specified, then buffers will be decoded to\n strings using the specified encoding. Default=null\n * `objectMode` {Boolean} Whether this stream should behave\n as a stream of objects. Meaning that stream.read(n) returns\n a single value instead of a Buffer of size n\n\nIn classes that extend the Readable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### readable.\\_read(size)\n\n* `size` {Number} Number of bytes to read asynchronously\n\nNote: **This function should NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Readable\nclass methods only.\n\nAll Readable stream implementations must provide a `_read` method\nto fetch data from the underlying resource.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\nWhen data is available, put it into the read queue by calling\n`readable.push(chunk)`. If `push` returns false, then you should stop\nreading. When `_read` is called again, you should start pushing more\ndata.\n\nThe `size` argument is advisory. Implementations where a \"read\" is a\nsingle call that returns data can use this to know how much data to\nfetch. Implementations where that is not relevant, such as TCP or\nTLS, may ignore this argument, and simply provide data whenever it\nbecomes available. There is no need, for example to \"wait\" until\n`size` bytes are available before calling `stream.push(chunk)`.\n\n### readable.push(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to push into the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nNote: **This function should be called by Readable implementors, NOT\nby consumers of Readable subclasses.** The `_read()` function will not\nbe called again until at least one `push(chunk)` call is made. If no\ndata is available, then you MAY call `push('')` (an empty string) to\nallow a future `_read` call, without adding any data to the queue.\n\nThe `Readable` class works by putting data into a read queue to be\npulled out later by calling the `read()` method when the `'readable'`\nevent fires.\n\nThe `push()` method will explicitly insert some data into the read\nqueue. If it is called with `null` then it will signal the end of the\ndata.\n\nIn some cases, you may be wrapping a lower-level source which has some\nsort of pause/resume mechanism, and a data callback. In those cases,\nyou could wrap the low-level source object by doing something like\nthis:\n\n```javascript\n// source is an object with readStop() and readStart() methods,\n// and an `ondata` member that gets called when it has data, and\n// an `onend` member that gets called when the data is over.\n\nvar stream = new Readable();\n\nsource.ondata = function(chunk) {\n // if push() returns false, then we need to stop reading from source\n if (!stream.push(chunk))\n source.readStop();\n};\n\nsource.onend = function() {\n stream.push(null);\n};\n\n// _read will be called when the stream wants to pull more data in\n// the advisory size argument is ignored in this case.\nstream._read = function(n) {\n source.readStart();\n};\n```\n\n### readable.unshift(chunk)\n\n* `chunk` {Buffer | null | String} Chunk of data to unshift onto the read queue\n* return {Boolean} Whether or not more pushes should be performed\n\nThis is the corollary of `readable.push(chunk)`. Rather than putting\nthe data at the *end* of the read queue, it puts it at the *front* of\nthe read queue.\n\nThis is useful in certain use-cases where a stream is being consumed\nby a parser, which needs to \"un-consume\" some data that it has\noptimistically pulled out of the source.\n\n```javascript\n// A parser for a simple data protocol.\n// The \"header\" is a JSON object, followed by 2 \\n characters, and\n// then a message body.\n//\n// Note: This can be done more simply as a Transform stream. See below.\n\nfunction SimpleProtocol(source, options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Readable.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n\n // source is a readable stream, such as a socket or file\n this._source = source;\n\n var self = this;\n source.on('end', function() {\n self.push(null);\n });\n\n // give it a kick whenever the source is readable\n // read(0) will not consume any bytes\n source.on('readable', function() {\n self.read(0);\n });\n\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Readable.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._read = function(n) {\n if (!this._inBody) {\n var chunk = this._source.read();\n\n // if the source doesn't have data, we don't have data yet.\n if (chunk === null)\n return this.push('');\n\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n this.push('');\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // now, because we got some extra data, unshift the rest\n // back into the read queue so that our consumer will see it.\n var b = chunk.slice(split);\n this.unshift(b);\n\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n }\n } else {\n // from there on, just provide the data to our consumer.\n // careful not to push(null), since that would indicate EOF.\n var chunk = this._source.read();\n if (chunk) this.push(chunk);\n }\n};\n\n// Usage:\nvar parser = new SimpleProtocol(source);\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n### readable.wrap(stream)\n\n* `stream` {Stream} An \"old style\" readable stream\n\nIf you are using an older Node library that emits `'data'` events and\nhas a `pause()` method that is advisory only, then you can use the\n`wrap()` method to create a Readable stream that uses the old stream\nas its data source.\n\nFor example:\n\n```javascript\nvar OldReader = require('./old-api-module.js').OldReader;\nvar oreader = new OldReader;\nvar Readable = require('stream').Readable;\nvar myReader = new Readable().wrap(oreader);\n\nmyReader.on('readable', function() {\n myReader.read(); // etc.\n});\n```\n\n### Event: 'readable'\n\nWhen there is data ready to be consumed, this event will fire.\n\nWhen this event emits, call the `read()` method to consume the data.\n\n### Event: 'end'\n\nEmitted when the stream has received an EOF (FIN in TCP terminology).\nIndicates that no more `'data'` events will happen. If the stream is\nalso writable, it may be possible to continue writing.\n\n### Event: 'data'\n\nThe `'data'` event emits either a `Buffer` (by default) or a string if\n`setEncoding()` was used.\n\nNote that adding a `'data'` event listener will switch the Readable\nstream into \"old mode\", where data is emitted as soon as it is\navailable, rather than waiting for you to call `read()` to consume it.\n\n### Event: 'error'\n\nEmitted if there was an error receiving data.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### readable.setEncoding(encoding)\n\nMakes the `'data'` event emit a string instead of a `Buffer`. `encoding`\ncan be `'utf8'`, `'utf16le'` (`'ucs2'`), `'ascii'`, or `'hex'`.\n\nThe encoding can also be set by specifying an `encoding` field to the\nconstructor.\n\n### readable.read([size])\n\n* `size` {Number | null} Optional number of bytes to read.\n* Return: {Buffer | String | null}\n\nNote: **This function SHOULD be called by Readable stream users.**\n\nCall this method to consume data once the `'readable'` event is\nemitted.\n\nThe `size` argument will set a minimum number of bytes that you are\ninterested in. If not set, then the entire content of the internal\nbuffer is returned.\n\nIf there is no data to consume, or if there are fewer bytes in the\ninternal buffer than the `size` argument, then `null` is returned, and\na future `'readable'` event will be emitted when more is available.\n\nCalling `stream.read(0)` will always return `null`, and will trigger a\nrefresh of the internal buffer, but otherwise be a no-op.\n\n### readable.pipe(destination, [options])\n\n* `destination` {Writable Stream}\n* `options` {Object} Optional\n * `end` {Boolean} Default=true\n\nConnects this readable stream to `destination` WriteStream. Incoming\ndata on this stream gets written to `destination`. Properly manages\nback-pressure so that a slow destination will not be overwhelmed by a\nfast readable stream.\n\nThis function returns the `destination` stream.\n\nFor example, emulating the Unix `cat` command:\n\n process.stdin.pipe(process.stdout);\n\nBy default `end()` is called on the destination when the source stream\nemits `end`, so that `destination` is no longer writable. Pass `{ end:\nfalse }` as `options` to keep the destination stream open.\n\nThis keeps `writer` open so that \"Goodbye\" can be written at the\nend.\n\n reader.pipe(writer, { end: false });\n reader.on(\"end\", function() {\n writer.end(\"Goodbye\\n\");\n });\n\nNote that `process.stderr` and `process.stdout` are never closed until\nthe process exits, regardless of the specified options.\n\n### readable.unpipe([destination])\n\n* `destination` {Writable Stream} Optional\n\nUndo a previously established `pipe()`. If no destination is\nprovided, then all previously established pipes are removed.\n\n### readable.pause()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nCeases the flow of data. No `'data'` events are emitted while the\nstream is in a paused state.\n\n### readable.resume()\n\nSwitches the readable stream into \"old mode\", where data is emitted\nusing a `'data'` event rather than being buffered for consumption via\nthe `read()` method.\n\nResumes the incoming `'data'` events after a `pause()`.\n\n\n## Class: stream.Writable\n\n\n\nA `Writable` Stream has the following methods, members, and events.\n\nNote that `stream.Writable` is an abstract class designed to be\nextended with an underlying implementation of the\n`_write(chunk, encoding, cb)` method. (See below.)\n\n### new stream.Writable([options])\n\n* `options` {Object}\n * `highWaterMark` {Number} Buffer level when `write()` starts\n returning false. Default=16kb\n * `decodeStrings` {Boolean} Whether or not to decode strings into\n Buffers before passing them to `_write()`. Default=true\n\nIn classes that extend the Writable class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### writable.\\_write(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be written. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. Ignore chunk is a buffer. Note that chunk will\n **always** be a buffer unless the `decodeStrings` option is\n explicitly set to `false`.\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nAll Writable stream implementations must provide a `_write` method to\nsend data to the underlying resource.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Writable\nclass methods only.\n\nCall the callback using the standard `callback(error)` pattern to\nsignal that the write completed successfully or with an error.\n\nIf the `decodeStrings` flag is set in the constructor options, then\n`chunk` may be a string rather than a Buffer, and `encoding` will\nindicate the sort of string that it is. This is to support\nimplementations that have an optimized handling for certain string\ndata encodings. If you do not explicitly set the `decodeStrings`\noption to `false`, then you can safely ignore the `encoding` argument,\nand assume that `chunk` will always be a Buffer.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n\n### writable.write(chunk, [encoding], [callback])\n\n* `chunk` {Buffer | String} Data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when this chunk is\n successfully written.\n* Returns {Boolean}\n\nWrites `chunk` to the stream. Returns `true` if the data has been\nflushed to the underlying resource. Returns `false` to indicate that\nthe buffer is full, and the data will be sent out in the future. The\n`'drain'` event will indicate when the buffer is empty again.\n\nThe specifics of when `write()` will return false, is determined by\nthe `highWaterMark` option provided to the constructor.\n\n### writable.end([chunk], [encoding], [callback])\n\n* `chunk` {Buffer | String} Optional final data to be written\n* `encoding` {String} Optional. If `chunk` is a string, then encoding\n defaults to `'utf8'`\n* `callback` {Function} Optional. Called when the final chunk is\n successfully written.\n\nCall this method to signal the end of the data being written to the\nstream.\n\n### Event: 'drain'\n\nEmitted when the stream's write queue empties and it's safe to write\nwithout buffering again. Listen for it when `stream.write()` returns\n`false`.\n\n### Event: 'close'\n\nEmitted when the underlying resource (for example, the backing file\ndescriptor) has been closed. Not all streams will emit this.\n\n### Event: 'finish'\n\nWhen `end()` is called and there are no more chunks to write, this\nevent is emitted.\n\n### Event: 'pipe'\n\n* `source` {Readable Stream}\n\nEmitted when the stream is passed to a readable stream's pipe method.\n\n### Event 'unpipe'\n\n* `source` {Readable Stream}\n\nEmitted when a previously established `pipe()` is removed using the\nsource Readable stream's `unpipe()` method.\n\n## Class: stream.Duplex\n\n\n\nA \"duplex\" stream is one that is both Readable and Writable, such as a\nTCP socket connection.\n\nNote that `stream.Duplex` is an abstract class designed to be\nextended with an underlying implementation of the `_read(size)`\nand `_write(chunk, encoding, callback)` methods as you would with a Readable or\nWritable stream class.\n\nSince JavaScript doesn't have multiple prototypal inheritance, this\nclass prototypally inherits from Readable, and then parasitically from\nWritable. It is thus up to the user to implement both the lowlevel\n`_read(n)` method as well as the lowlevel `_write(chunk, encoding, cb)` method\non extension duplex classes.\n\n### new stream.Duplex(options)\n\n* `options` {Object} Passed to both Writable and Readable\n constructors. Also has the following fields:\n * `allowHalfOpen` {Boolean} Default=true. If set to `false`, then\n the stream will automatically end the readable side when the\n writable side ends and vice versa.\n\nIn classes that extend the Duplex class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n## Class: stream.Transform\n\nA \"transform\" stream is a duplex stream where the output is causally\nconnected in some way to the input, such as a zlib stream or a crypto\nstream.\n\nThere is no requirement that the output be the same size as the input,\nthe same number of chunks, or arrive at the same time. For example, a\nHash stream will only ever have a single chunk of output which is\nprovided when the input is ended. A zlib stream will either produce\nmuch smaller or much larger than its input.\n\nRather than implement the `_read()` and `_write()` methods, Transform\nclasses must implement the `_transform()` method, and may optionally\nalso implement the `_flush()` method. (See below.)\n\n### new stream.Transform([options])\n\n* `options` {Object} Passed to both Writable and Readable\n constructors.\n\nIn classes that extend the Transform class, make sure to call the\nconstructor so that the buffering settings can be properly\ninitialized.\n\n### transform.\\_transform(chunk, encoding, callback)\n\n* `chunk` {Buffer | String} The chunk to be transformed. Will always\n be a buffer unless the `decodeStrings` option was set to `false`.\n* `encoding` {String} If the chunk is a string, then this is the\n encoding type. (Ignore if `decodeStrings` chunk is a buffer.)\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done processing the supplied chunk.\n\nNote: **This function MUST NOT be called directly.** It should be\nimplemented by child classes, and called by the internal Transform\nclass methods only.\n\nAll Transform stream implementations must provide a `_transform`\nmethod to accept input and produce output.\n\n`_transform` should do whatever has to be done in this specific\nTransform class, to handle the bytes being written, and pass them off\nto the readable portion of the interface. Do asynchronous I/O,\nprocess things, and so on.\n\nCall `transform.push(outputChunk)` 0 or more times to generate output\nfrom this input chunk, depending on how much data you want to output\nas a result of this chunk.\n\nCall the callback function only when the current chunk is completely\nconsumed. Note that there may or may not be output as a result of any\nparticular input chunk.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### transform.\\_flush(callback)\n\n* `callback` {Function} Call this function (optionally with an error\n argument) when you are done flushing any remaining data.\n\nNote: **This function MUST NOT be called directly.** It MAY be implemented\nby child classes, and if so, will be called by the internal Transform\nclass methods only.\n\nIn some cases, your transform operation may need to emit a bit more\ndata at the end of the stream. For example, a `Zlib` compression\nstream will store up some internal state so that it can optimally\ncompress the output. At the end, however, it needs to do the best it\ncan with what is left, so that the data will be complete.\n\nIn those cases, you can implement a `_flush` method, which will be\ncalled at the very end, after all the written data is consumed, but\nbefore emitting `end` to signal the end of the readable side. Just\nlike with `_transform`, call `transform.push(chunk)` zero or more\ntimes, as appropriate, and call `callback` when the flush operation is\ncomplete.\n\nThis method is prefixed with an underscore because it is internal to\nthe class that defines it, and should not be called directly by user\nprograms. However, you **are** expected to override this method in\nyour own extension classes.\n\n### Example: `SimpleProtocol` parser\n\nThe example above of a simple protocol parser can be implemented much\nmore simply by using the higher level `Transform` stream class.\n\nIn this example, rather than providing the input as an argument, it\nwould be piped into the parser, which is a more idiomatic Node stream\napproach.\n\n```javascript\nfunction SimpleProtocol(options) {\n if (!(this instanceof SimpleProtocol))\n return new SimpleProtocol(options);\n\n Transform.call(this, options);\n this._inBody = false;\n this._sawFirstCr = false;\n this._rawHeader = [];\n this.header = null;\n}\n\nSimpleProtocol.prototype = Object.create(\n Transform.prototype, { constructor: { value: SimpleProtocol }});\n\nSimpleProtocol.prototype._transform = function(chunk, encoding, done) {\n if (!this._inBody) {\n // check if the chunk has a \\n\\n\n var split = -1;\n for (var i = 0; i < chunk.length; i++) {\n if (chunk[i] === 10) { // '\\n'\n if (this._sawFirstCr) {\n split = i;\n break;\n } else {\n this._sawFirstCr = true;\n }\n } else {\n this._sawFirstCr = false;\n }\n }\n\n if (split === -1) {\n // still waiting for the \\n\\n\n // stash the chunk, and try again.\n this._rawHeader.push(chunk);\n } else {\n this._inBody = true;\n var h = chunk.slice(0, split);\n this._rawHeader.push(h);\n var header = Buffer.concat(this._rawHeader).toString();\n try {\n this.header = JSON.parse(header);\n } catch (er) {\n this.emit('error', new Error('invalid simple protocol data'));\n return;\n }\n // and let them know that we are done parsing the header.\n this.emit('header', this.header);\n\n // now, because we got some extra data, emit this first.\n this.push(b);\n }\n } else {\n // from there on, just provide the data to our consumer as-is.\n this.push(b);\n }\n done();\n};\n\nvar parser = new SimpleProtocol();\nsource.pipe(parser)\n\n// Now parser is a readable stream that will emit 'header'\n// with the parsed header data.\n```\n\n\n## Class: stream.PassThrough\n\nThis is a trivial implementation of a `Transform` stream that simply\npasses the input bytes across to the output. Its purpose is mainly\nfor examples and testing, but there are occasionally use cases where\nit can come in handy.\n\n\n[EventEmitter]: events.html#events_class_events_eventemitter\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/readable-stream/issues" - }, - "homepage": "https://github.com/isaacs/readable-stream", - "_id": "readable-stream@1.0.17", - "_from": "readable-stream@~1.0.2" -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/passthrough.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/passthrough.js deleted file mode 100644 index 27e8d8a5..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/passthrough.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_passthrough.js") diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/readable.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/readable.js deleted file mode 100644 index 4d1ddfc7..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/readable.js +++ /dev/null @@ -1,6 +0,0 @@ -exports = module.exports = require('./lib/_stream_readable.js'); -exports.Readable = exports; -exports.Writable = require('./lib/_stream_writable.js'); -exports.Duplex = require('./lib/_stream_duplex.js'); -exports.Transform = require('./lib/_stream_transform.js'); -exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/common.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/common.js deleted file mode 100644 index 1dec2e35..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/common.js +++ /dev/null @@ -1,191 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var path = require('path'); -var assert = require('assert'); - -exports.testDir = path.dirname(__filename); -exports.fixturesDir = path.join(exports.testDir, 'fixtures'); -exports.libDir = path.join(exports.testDir, '../lib'); -exports.tmpDir = path.join(exports.testDir, 'tmp'); -exports.PORT = 12346; - -if (process.platform === 'win32') { - exports.PIPE = '\\\\.\\pipe\\libuv-test'; -} else { - exports.PIPE = exports.tmpDir + '/test.sock'; -} - -var util = require('util'); -for (var i in util) exports[i] = util[i]; -//for (var i in exports) global[i] = exports[i]; - -function protoCtrChain(o) { - var result = []; - for (; o; o = o.__proto__) { result.push(o.constructor); } - return result.join(); -} - -exports.indirectInstanceOf = function(obj, cls) { - if (obj instanceof cls) { return true; } - var clsChain = protoCtrChain(cls.prototype); - var objChain = protoCtrChain(obj); - return objChain.slice(-clsChain.length) === clsChain; -}; - - -exports.ddCommand = function(filename, kilobytes) { - if (process.platform === 'win32') { - var p = path.resolve(exports.fixturesDir, 'create-file.js'); - return '"' + process.argv[0] + '" "' + p + '" "' + - filename + '" ' + (kilobytes * 1024); - } else { - return 'dd if=/dev/zero of="' + filename + '" bs=1024 count=' + kilobytes; - } -}; - - -exports.spawnPwd = function(options) { - var spawn = require('child_process').spawn; - - if (process.platform === 'win32') { - return spawn('cmd.exe', ['/c', 'cd'], options); - } else { - return spawn('pwd', [], options); - } -}; - - -// Turn this off if the test should not check for global leaks. -exports.globalCheck = true; - -process.on('exit', function() { - if (!exports.globalCheck) return; - var knownGlobals = [setTimeout, - setInterval, - global.setImmediate, - clearTimeout, - clearInterval, - global.clearImmediate, - console, - Buffer, - process, - global]; - - if (global.errno) { - knownGlobals.push(errno); - } - - if (global.gc) { - knownGlobals.push(gc); - } - - if (global.DTRACE_HTTP_SERVER_RESPONSE) { - knownGlobals.push(DTRACE_HTTP_SERVER_RESPONSE); - knownGlobals.push(DTRACE_HTTP_SERVER_REQUEST); - knownGlobals.push(DTRACE_HTTP_CLIENT_RESPONSE); - knownGlobals.push(DTRACE_HTTP_CLIENT_REQUEST); - knownGlobals.push(DTRACE_NET_STREAM_END); - knownGlobals.push(DTRACE_NET_SERVER_CONNECTION); - knownGlobals.push(DTRACE_NET_SOCKET_READ); - knownGlobals.push(DTRACE_NET_SOCKET_WRITE); - } - if (global.COUNTER_NET_SERVER_CONNECTION) { - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION); - knownGlobals.push(COUNTER_NET_SERVER_CONNECTION_CLOSE); - knownGlobals.push(COUNTER_HTTP_SERVER_REQUEST); - knownGlobals.push(COUNTER_HTTP_SERVER_RESPONSE); - knownGlobals.push(COUNTER_HTTP_CLIENT_REQUEST); - knownGlobals.push(COUNTER_HTTP_CLIENT_RESPONSE); - } - - if (global.ArrayBuffer) { - knownGlobals.push(ArrayBuffer); - knownGlobals.push(Int8Array); - knownGlobals.push(Uint8Array); - knownGlobals.push(Uint8ClampedArray); - knownGlobals.push(Int16Array); - knownGlobals.push(Uint16Array); - knownGlobals.push(Int32Array); - knownGlobals.push(Uint32Array); - knownGlobals.push(Float32Array); - knownGlobals.push(Float64Array); - knownGlobals.push(DataView); - } - - for (var x in global) { - var found = false; - - for (var y in knownGlobals) { - if (global[x] === knownGlobals[y]) { - found = true; - break; - } - } - - if (!found) { - console.error('Unknown global: %s', x); - assert.ok(false, 'Unknown global found'); - } - } -}); - - -var mustCallChecks = []; - - -function runCallChecks() { - var failed = mustCallChecks.filter(function(context) { - return context.actual !== context.expected; - }); - - failed.forEach(function(context) { - console.log('Mismatched %s function calls. Expected %d, actual %d.', - context.name, - context.expected, - context.actual); - console.log(context.stack.split('\n').slice(2).join('\n')); - }); - - if (failed.length) process.exit(1); -} - - -exports.mustCall = function(fn, expected) { - if (typeof expected !== 'number') expected = 1; - - var context = { - expected: expected, - actual: 0, - stack: (new Error).stack, - name: fn.name || '' - }; - - // add the exit listener only once to avoid listener leak warnings - if (mustCallChecks.length === 0) process.on('exit', runCallChecks); - - mustCallChecks.push(context); - - return function() { - context.actual++; - return fn.apply(this, arguments); - }; -}; diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/fixtures/x1024.txt b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/fixtures/x1024.txt deleted file mode 100644 index c6a9d2f1..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/fixtures/x1024.txt +++ /dev/null @@ -1 +0,0 @@ -xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-basic.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-basic.js deleted file mode 100644 index edc3811e..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-basic.js +++ /dev/null @@ -1,475 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var common = require('../common.js'); -var R = require('../../lib/_stream_readable'); -var assert = require('assert'); - -var util = require('util'); -var EE = require('events').EventEmitter; - -function TestReader(n) { - R.apply(this); - this._buffer = new Buffer(n || 100); - this._buffer.fill('x'); - this._pos = 0; - this._bufs = 10; -} - -util.inherits(TestReader, R); - -TestReader.prototype.read = function(n) { - if (n === 0) return null; - var max = this._buffer.length - this._pos; - n = n || max; - n = Math.max(n, 0); - var toRead = Math.min(n, max); - if (toRead === 0) { - // simulate the read buffer filling up with some more bytes some time - // in the future. - setTimeout(function() { - this._pos = 0; - this._bufs -= 1; - if (this._bufs <= 0) { - // read them all! - if (!this.ended) { - this.emit('end'); - this.ended = true; - } - } else { - this.emit('readable'); - } - }.bind(this), 10); - return null; - } - - var ret = this._buffer.slice(this._pos, this._pos + toRead); - this._pos += toRead; - return ret; -}; - -///// - -function TestWriter() { - EE.apply(this); - this.received = []; - this.flush = false; -} - -util.inherits(TestWriter, EE); - -TestWriter.prototype.write = function(c) { - this.received.push(c.toString()); - this.emit('write', c); - return true; -}; - -TestWriter.prototype.end = function(c) { - if (c) this.write(c); - this.emit('end', this.received); -}; - -//////// - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - ok: assert, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - - -test('a most basic test', function(t) { - var r = new TestReader(20); - - var reads = []; - var expect = [ 'x', - 'xx', - 'xxx', - 'xxxx', - 'xxxxx', - 'xxxxx', - 'xxxxxxxx', - 'xxxxxxxxx', - 'xxx', - 'xxxxxxxxxxxx', - 'xxxxxxxx', - 'xxxxxxxxxxxxxxx', - 'xxxxx', - 'xxxxxxxxxxxxxxxxxx', - 'xx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx', - 'xxxxxxxxxxxxxxxxxxxx' ]; - - r.on('end', function() { - t.same(reads, expect); - t.end(); - }); - - var readSize = 1; - function flow() { - var res; - while (null !== (res = r.read(readSize++))) { - reads.push(res.toString()); - } - r.once('readable', flow); - } - - flow(); -}); - -test('pipe', function(t) { - var r = new TestReader(5); - - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ] - - var w = new TestWriter; - var flush = true; - - w.on('end', function(received) { - t.same(received, expect); - t.end(); - }); - - r.pipe(w); -}); - - - -[1,2,3,4,5,6,7,8,9].forEach(function(SPLIT) { - test('unpipe', function(t) { - var r = new TestReader(5); - - // unpipe after 3 writes, then write to another stream instead. - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ]; - expect = [ expect.slice(0, SPLIT), expect.slice(SPLIT) ]; - - var w = [ new TestWriter(), new TestWriter() ]; - - var writes = SPLIT; - w[0].on('write', function() { - if (--writes === 0) { - r.unpipe(); - t.equal(r._readableState.pipes, null); - w[0].end(); - r.pipe(w[1]); - t.equal(r._readableState.pipes, w[1]); - } - }); - - var ended = 0; - - var ended0 = false; - var ended1 = false; - w[0].on('end', function(results) { - t.equal(ended0, false); - ended0 = true; - ended++; - t.same(results, expect[0]); - }); - - w[1].on('end', function(results) { - t.equal(ended1, false); - ended1 = true; - ended++; - t.equal(ended, 2); - t.same(results, expect[1]); - t.end(); - }); - - r.pipe(w[0]); - }); -}); - - -// both writers should get the same exact data. -test('multipipe', function(t) { - var r = new TestReader(5); - var w = [ new TestWriter, new TestWriter ]; - - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ]; - - var c = 2; - w[0].on('end', function(received) { - t.same(received, expect, 'first'); - if (--c === 0) t.end(); - }); - w[1].on('end', function(received) { - t.same(received, expect, 'second'); - if (--c === 0) t.end(); - }); - - r.pipe(w[0]); - r.pipe(w[1]); -}); - - -[1,2,3,4,5,6,7,8,9].forEach(function(SPLIT) { - test('multi-unpipe', function(t) { - var r = new TestReader(5); - - // unpipe after 3 writes, then write to another stream instead. - var expect = [ 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx', - 'xxxxx' ]; - expect = [ expect.slice(0, SPLIT), expect.slice(SPLIT) ]; - - var w = [ new TestWriter(), new TestWriter(), new TestWriter() ]; - - var writes = SPLIT; - w[0].on('write', function() { - if (--writes === 0) { - r.unpipe(); - w[0].end(); - r.pipe(w[1]); - } - }); - - var ended = 0; - - w[0].on('end', function(results) { - ended++; - t.same(results, expect[0]); - }); - - w[1].on('end', function(results) { - ended++; - t.equal(ended, 2); - t.same(results, expect[1]); - t.end(); - }); - - r.pipe(w[0]); - r.pipe(w[2]); - }); -}); - -test('back pressure respected', function (t) { - function noop() {} - - var r = new R({ objectMode: true }); - r._read = noop; - var counter = 0; - r.push(["one"]); - r.push(["two"]); - r.push(["three"]); - r.push(["four"]); - r.push(null); - - var w1 = new R(); - w1.write = function (chunk) { - assert.equal(chunk[0], "one"); - w1.emit("close"); - process.nextTick(function () { - r.pipe(w2); - r.pipe(w3); - }) - }; - w1.end = noop; - - r.pipe(w1); - - var expected = ["two", "two", "three", "three", "four", "four"]; - - var w2 = new R(); - w2.write = function (chunk) { - assert.equal(chunk[0], expected.shift()); - assert.equal(counter, 0); - - counter++; - - if (chunk[0] === "four") { - return true; - } - - setTimeout(function () { - counter--; - w2.emit("drain"); - }, 10); - - return false; - } - w2.end = noop; - - var w3 = new R(); - w3.write = function (chunk) { - assert.equal(chunk[0], expected.shift()); - assert.equal(counter, 1); - - counter++; - - if (chunk[0] === "four") { - return true; - } - - setTimeout(function () { - counter--; - w3.emit("drain"); - }, 50); - - return false; - }; - w3.end = function () { - assert.equal(counter, 2); - assert.equal(expected.length, 0); - t.end(); - }; -}); - -test('read(0) for ended streams', function (t) { - var r = new R(); - var written = false; - var ended = false; - r._read = function (n) {}; - - r.push(new Buffer("foo")); - r.push(null); - - var v = r.read(0); - - assert.equal(v, null); - - var w = new R(); - - w.write = function (buffer) { - written = true; - assert.equal(ended, false); - assert.equal(buffer.toString(), "foo") - }; - - w.end = function () { - ended = true; - assert.equal(written, true); - t.end(); - }; - - r.pipe(w); -}) - -test('sync _read ending', function (t) { - var r = new R(); - var called = false; - r._read = function (n) { - r.push(null); - }; - - r.once('end', function () { - called = true; - }) - - r.read(); - - process.nextTick(function () { - assert.equal(called, true); - t.end(); - }) -}); - -test('adding readable triggers data flow', function(t) { - var r = new R({ highWaterMark: 5 }); - var onReadable = false; - var readCalled = 0; - - r._read = function(n) { - if (readCalled++ === 2) - r.push(null); - else - r.push(new Buffer('asdf')); - }; - - var called = false; - r.on('readable', function() { - onReadable = true; - r.read(); - }); - - r.on('end', function() { - t.equal(readCalled, 3); - t.ok(onReadable); - t.end(); - }); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-compatibility.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-compatibility.js deleted file mode 100644 index 4de76b57..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-compatibility.js +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var common = require('../common.js'); -var R = require('../../lib/_stream_readable'); -var assert = require('assert'); - -var util = require('util'); -var EE = require('events').EventEmitter; - -var ondataCalled = 0; - -function TestReader() { - R.apply(this); - this._buffer = new Buffer(100); - this._buffer.fill('x'); - - this.on('data', function() { - ondataCalled++; - }); -} - -util.inherits(TestReader, R); - -TestReader.prototype._read = function(n) { - this.push(this._buffer); - this._buffer = new Buffer(0); -}; - -var reader = new TestReader(); -assert.equal(ondataCalled, 1); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-finish-pipe.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-finish-pipe.js deleted file mode 100644 index 6a7e41e5..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-finish-pipe.js +++ /dev/null @@ -1,41 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common.js'); -var stream = require('../../readable'); -var Buffer = require('buffer').Buffer; - -var r = new stream.Readable(); -r._read = function(size) { - r.push(new Buffer(size)); -}; - -var w = new stream.Writable(); -w._write = function(data, encoding, cb) { - cb(null); -}; - -r.pipe(w); - -// This might sound unrealistic, but it happens in net.js. When -// `socket.allowHalfOpen === false`, EOF will cause `.destroySoon()` call which -// ends the writable side of net.Socket. -w.end(); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-large-read-stall.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-large-read-stall.js deleted file mode 100644 index 6da70e88..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-large-read-stall.js +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common.js'); -var assert = require('assert'); - -// If everything aligns so that you do a read(n) of exactly the -// remaining buffer, then make sure that 'end' still emits. - -var READSIZE = 100; -var PUSHSIZE = 20; -var PUSHCOUNT = 1000; -var HWM = 50; - -var Readable = require('../../readable').Readable; -var r = new Readable({ - highWaterMark: HWM -}); -var rs = r._readableState; - -r._read = push; - -r.on('readable', function() { - console.error('>> readable'); - do { - console.error(' > read(%d)', READSIZE); - var ret = r.read(READSIZE); - console.error(' < %j (%d remain)', ret && ret.length, rs.length); - } while (ret && ret.length === READSIZE); - - console.error('<< after read()', - ret && ret.length, - rs.needReadable, - rs.length); -}); - -var endEmitted = false; -r.on('end', function() { - endEmitted = true; - console.error('end'); -}); - -var pushes = 0; -function push() { - if (pushes > PUSHCOUNT) - return; - - if (pushes++ === PUSHCOUNT) { - console.error(' push(EOF)'); - return r.push(null); - } - - console.error(' push #%d', pushes); - if (r.push(new Buffer(PUSHSIZE))) - setTimeout(push); -} - -// start the flow -var ret = r.read(0); - -process.on('exit', function() { - assert.equal(pushes, PUSHCOUNT + 1); - assert(endEmitted); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-objects.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-objects.js deleted file mode 100644 index cd23539f..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-objects.js +++ /dev/null @@ -1,348 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var common = require('../common.js'); -var Readable = require('../../lib/_stream_readable'); -var Writable = require('../../lib/_stream_writable'); -var assert = require('assert'); - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function() { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on('exit', function() { - assert.equal(count, 0); -}); - -process.nextTick(run); - -function toArray(callback) { - var stream = new Writable({ objectMode: true }); - var list = []; - stream.write = function(chunk) { - list.push(chunk); - }; - - stream.end = function() { - callback(list); - }; - - return stream; -} - -function fromArray(list) { - var r = new Readable({ objectMode: true }); - r._read = noop; - list.forEach(function(chunk) { - r.push(chunk); - }); - r.push(null); - - return r; -} - -function noop() {} - -test('can read objects from stream', function(t) { - var r = fromArray([{ one: '1'}, { two: '2' }]); - - var v1 = r.read(); - var v2 = r.read(); - var v3 = r.read(); - - assert.deepEqual(v1, { one: '1' }); - assert.deepEqual(v2, { two: '2' }); - assert.deepEqual(v3, null); - - t.end(); -}); - -test('can pipe objects into stream', function(t) { - var r = fromArray([{ one: '1'}, { two: '2' }]); - - r.pipe(toArray(function(list) { - assert.deepEqual(list, [ - { one: '1' }, - { two: '2' } - ]); - - t.end(); - })); -}); - -test('read(n) is ignored', function(t) { - var r = fromArray([{ one: '1'}, { two: '2' }]); - - var value = r.read(2); - - assert.deepEqual(value, { one: '1' }); - - t.end(); -}); - -test('can read objects from _read (sync)', function(t) { - var r = new Readable({ objectMode: true }); - var list = [{ one: '1'}, { two: '2' }]; - r._read = function(n) { - var item = list.shift(); - r.push(item || null); - }; - - r.pipe(toArray(function(list) { - assert.deepEqual(list, [ - { one: '1' }, - { two: '2' } - ]); - - t.end(); - })); -}); - -test('can read objects from _read (async)', function(t) { - var r = new Readable({ objectMode: true }); - var list = [{ one: '1'}, { two: '2' }]; - r._read = function(n) { - var item = list.shift(); - process.nextTick(function() { - r.push(item || null); - }); - }; - - r.pipe(toArray(function(list) { - assert.deepEqual(list, [ - { one: '1' }, - { two: '2' } - ]); - - t.end(); - })); -}); - -test('can read strings as objects', function(t) { - var r = new Readable({ - objectMode: true - }); - r._read = noop; - var list = ['one', 'two', 'three']; - list.forEach(function(str) { - r.push(str); - }); - r.push(null); - - r.pipe(toArray(function(array) { - assert.deepEqual(array, list); - - t.end(); - })); -}); - -test('read(0) for object streams', function(t) { - var r = new Readable({ - objectMode: true - }); - r._read = noop; - - r.push('foobar'); - r.push(null); - - var v = r.read(0); - - r.pipe(toArray(function(array) { - assert.deepEqual(array, ['foobar']); - - t.end(); - })); -}); - -test('falsey values', function(t) { - var r = new Readable({ - objectMode: true - }); - r._read = noop; - - r.push(false); - r.push(0); - r.push(''); - r.push(null); - - r.pipe(toArray(function(array) { - assert.deepEqual(array, [false, 0, '']); - - t.end(); - })); -}); - -test('high watermark _read', function(t) { - var r = new Readable({ - highWaterMark: 6, - objectMode: true - }); - var calls = 0; - var list = ['1', '2', '3', '4', '5', '6', '7', '8']; - - r._read = function(n) { - calls++; - }; - - list.forEach(function(c) { - r.push(c); - }); - - var v = r.read(); - - assert.equal(calls, 0); - assert.equal(v, '1'); - - var v2 = r.read(); - - assert.equal(calls, 1); - assert.equal(v2, '2'); - - t.end(); -}); - -test('high watermark push', function(t) { - var r = new Readable({ - highWaterMark: 6, - objectMode: true - }); - r._read = function(n) {}; - for (var i = 0; i < 6; i++) { - var bool = r.push(i); - assert.equal(bool, i === 5 ? false : true); - } - - t.end(); -}); - -test('can write objects to stream', function(t) { - var w = new Writable({ objectMode: true }); - - w._write = function(chunk, encoding, cb) { - assert.deepEqual(chunk, { foo: 'bar' }); - cb(); - }; - - w.on('finish', function() { - t.end(); - }); - - w.write({ foo: 'bar' }); - w.end(); -}); - -test('can write multiple objects to stream', function(t) { - var w = new Writable({ objectMode: true }); - var list = []; - - w._write = function(chunk, encoding, cb) { - list.push(chunk); - cb(); - }; - - w.on('finish', function() { - assert.deepEqual(list, [0, 1, 2, 3, 4]); - - t.end(); - }); - - w.write(0); - w.write(1); - w.write(2); - w.write(3); - w.write(4); - w.end(); -}); - -test('can write strings as objects', function(t) { - var w = new Writable({ - objectMode: true - }); - var list = []; - - w._write = function(chunk, encoding, cb) { - list.push(chunk); - process.nextTick(cb); - }; - - w.on('finish', function() { - assert.deepEqual(list, ['0', '1', '2', '3', '4']); - - t.end(); - }); - - w.write('0'); - w.write('1'); - w.write('2'); - w.write('3'); - w.write('4'); - w.end(); -}); - -test('buffers finish until cb is called', function(t) { - var w = new Writable({ - objectMode: true - }); - var called = false; - - w._write = function(chunk, encoding, cb) { - assert.equal(chunk, 'foo'); - - process.nextTick(function() { - called = true; - cb(); - }); - }; - - w.on('finish', function() { - assert.equal(called, true); - - t.end(); - }); - - w.write('foo'); - w.end(); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-pipe-error-handling.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-pipe-error-handling.js deleted file mode 100644 index 823dae2c..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-pipe-error-handling.js +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var stream = require('../../readable'); - -(function testErrorListenerCatches() { - var count = 1000; - - var source = new stream.Readable(); - source._read = function(n) { - n = Math.min(count, n); - count -= n; - source.push(new Buffer(n)); - }; - - var unpipedDest; - source.unpipe = function(dest) { - unpipedDest = dest; - stream.Readable.prototype.unpipe.call(this, dest); - }; - - var dest = new stream.Writable(); - dest._write = function(chunk, encoding, cb) { - cb(); - }; - - source.pipe(dest); - - var gotErr = null; - dest.on('error', function(err) { - gotErr = err; - }); - - var unpipedSource; - dest.on('unpipe', function(src) { - unpipedSource = src; - }); - - var err = new Error('This stream turned into bacon.'); - dest.emit('error', err); - assert.strictEqual(gotErr, err); - assert.strictEqual(unpipedSource, source); - assert.strictEqual(unpipedDest, dest); -})(); - -(function testErrorWithoutListenerThrows() { - var count = 1000; - - var source = new stream.Readable(); - source._read = function(n) { - n = Math.min(count, n); - count -= n; - source.push(new Buffer(n)); - }; - - var unpipedDest; - source.unpipe = function(dest) { - unpipedDest = dest; - stream.Readable.prototype.unpipe.call(this, dest); - }; - - var dest = new stream.Writable(); - dest._write = function(chunk, encoding, cb) { - cb(); - }; - - source.pipe(dest); - - var unpipedSource; - dest.on('unpipe', function(src) { - unpipedSource = src; - }); - - var err = new Error('This stream turned into bacon.'); - - var gotErr = null; - try { - dest.emit('error', err); - } catch (e) { - gotErr = e; - } - assert.strictEqual(gotErr, err); - assert.strictEqual(unpipedSource, source); - assert.strictEqual(unpipedDest, dest); -})(); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-push.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-push.js deleted file mode 100644 index e85f785d..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-push.js +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common.js'); -var stream = require('../../readable'); -var Readable = stream.Readable; -var Writable = stream.Writable; -var assert = require('assert'); - -var util = require('util'); -var EE = require('events').EventEmitter; - - -// a mock thing a bit like the net.Socket/tcp_wrap.handle interaction - -var stream = new Readable({ - highWaterMark: 16, - encoding: 'utf8' -}); - -var source = new EE; - -stream._read = function() { - console.error('stream._read'); - readStart(); -}; - -var ended = false; -stream.on('end', function() { - ended = true; -}); - -source.on('data', function(chunk) { - var ret = stream.push(chunk); - console.error('data', stream._readableState.length); - if (!ret) - readStop(); -}); - -source.on('end', function() { - stream.push(null); -}); - -var reading = false; - -function readStart() { - console.error('readStart'); - reading = true; -} - -function readStop() { - console.error('readStop'); - reading = false; - process.nextTick(function() { - var r = stream.read(); - if (r !== null) - writer.write(r); - }); -} - -var writer = new Writable({ - decodeStrings: false -}); - -var written = []; - -var expectWritten = - [ 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg', - 'asdfgasdfgasdfgasdfg' ]; - -writer._write = function(chunk, encoding, cb) { - console.error('WRITE %s', chunk); - written.push(chunk); - process.nextTick(cb); -}; - -writer.on('finish', finish); - - -// now emit some chunks. - -var chunk = "asdfg"; - -var set = 0; -readStart(); -data(); -function data() { - assert(reading); - source.emit('data', chunk); - assert(reading); - source.emit('data', chunk); - assert(reading); - source.emit('data', chunk); - assert(reading); - source.emit('data', chunk); - assert(!reading); - if (set++ < 5) - setTimeout(data, 10); - else - end(); -} - -function finish() { - console.error('finish'); - assert.deepEqual(written, expectWritten); - console.log('ok'); -} - -function end() { - source.emit('end'); - assert(!reading); - writer.end(stream.read()); - setTimeout(function() { - assert(ended); - }); -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-read-sync-stack.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-read-sync-stack.js deleted file mode 100644 index 7e86eec5..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-read-sync-stack.js +++ /dev/null @@ -1,54 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); -var Readable = require('../../readable').Readable; -var r = new Readable(); -var N = 256 * 1024; - -// Go ahead and allow the pathological case for this test. -// Yes, it's an infinite loop, that's the point. -process.maxTickDepth = N + 2; - -var reads = 0; -r._read = function(n) { - var chunk = reads++ === N ? null : new Buffer(1); - r.push(chunk); -}; - -r.on('readable', function onReadable() { - if (!(r._readableState.length % 256)) - console.error('readable', r._readableState.length); - r.read(N * 2); -}); - -var ended = false; -r.on('end', function onEnd() { - ended = true; -}); - -r.read(0); - -process.on('exit', function() { - assert(ended); - console.log('ok'); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js deleted file mode 100644 index 1b067f53..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-empty-buffer-no-eof.js +++ /dev/null @@ -1,119 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); - -var Readable = require('../../readable').Readable; - -test1(); -if (!/^v0\.[0-8]\./.test(process.version)) - test2(); - -function test1() { - var r = new Readable(); - - // should not end when we get a Buffer(0) or '' as the _read result - // that just means that there is *temporarily* no data, but to go - // ahead and try again later. - // - // note that this is very unusual. it only works for crypto streams - // because the other side of the stream will call read(0) to cycle - // data through openssl. that's why we set the timeouts to call - // r.read(0) again later, otherwise there is no more work being done - // and the process just exits. - - var buf = new Buffer(5); - buf.fill('x'); - var reads = 5; - r._read = function(n) { - switch (reads--) { - case 0: - return r.push(null); // EOF - case 1: - return r.push(buf); - case 2: - setTimeout(r.read.bind(r, 0), 10); - return r.push(new Buffer(0)); // Not-EOF! - case 3: - setTimeout(r.read.bind(r, 0), 10); - return process.nextTick(function() { - return r.push(new Buffer(0)); - }); - case 4: - setTimeout(r.read.bind(r, 0), 10); - return setTimeout(function() { - return r.push(new Buffer(0)); - }); - case 5: - return setTimeout(function() { - return r.push(buf); - }); - default: - throw new Error('unreachable'); - } - }; - - var results = []; - function flow() { - var chunk; - while (null !== (chunk = r.read())) - results.push(chunk + ''); - } - r.on('readable', flow); - r.on('end', function() { - results.push('EOF'); - }); - flow(); - - process.on('exit', function() { - assert.deepEqual(results, [ 'xxxxx', 'xxxxx', 'EOF' ]); - console.log('ok'); - }); -} - -function test2() { - var r = new Readable({ encoding: 'base64' }); - var reads = 5; - r._read = function(n) { - if (!reads--) - return r.push(null); // EOF - else - return r.push(new Buffer('x')); - }; - - var results = []; - function flow() { - var chunk; - while (null !== (chunk = r.read())) - results.push(chunk + ''); - } - r.on('readable', flow); - r.on('end', function() { - results.push('EOF'); - }); - flow(); - - process.on('exit', function() { - assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); - console.log('ok'); - }); -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-from-list.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-from-list.js deleted file mode 100644 index 04a96f53..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-from-list.js +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var common = require('../common.js'); -var fromList = require('../../lib/_stream_readable')._fromList; - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - - - -test('buffers', function(t) { - // have a length - var len = 16; - var list = [ new Buffer('foog'), - new Buffer('bark'), - new Buffer('bazy'), - new Buffer('kuel') ]; - - // read more than the first element. - var ret = fromList(6, { buffer: list, length: 16 }); - t.equal(ret.toString(), 'foogba'); - - // read exactly the first element. - ret = fromList(2, { buffer: list, length: 10 }); - t.equal(ret.toString(), 'rk'); - - // read less than the first element. - ret = fromList(2, { buffer: list, length: 8 }); - t.equal(ret.toString(), 'ba'); - - // read more than we have. - ret = fromList(100, { buffer: list, length: 6 }); - t.equal(ret.toString(), 'zykuel'); - - // all consumed. - t.same(list, []); - - t.end(); -}); - -test('strings', function(t) { - // have a length - var len = 16; - var list = [ 'foog', - 'bark', - 'bazy', - 'kuel' ]; - - // read more than the first element. - var ret = fromList(6, { buffer: list, length: 16, decoder: true }); - t.equal(ret, 'foogba'); - - // read exactly the first element. - ret = fromList(2, { buffer: list, length: 10, decoder: true }); - t.equal(ret, 'rk'); - - // read less than the first element. - ret = fromList(2, { buffer: list, length: 8, decoder: true }); - t.equal(ret, 'ba'); - - // read more than we have. - ret = fromList(100, { buffer: list, length: 6, decoder: true }); - t.equal(ret, 'zykuel'); - - // all consumed. - t.same(list, []); - - t.end(); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-legacy-drain.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-legacy-drain.js deleted file mode 100644 index c6cbc7d6..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-legacy-drain.js +++ /dev/null @@ -1,75 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common'); -var assert = require('assert'); - -var Stream = require('../../readable'); -var Readable = Stream.Readable; - -var r = new Readable(); -var N = 256; -var reads = 0; -r._read = function(n) { - return r.push(++reads === N ? null : new Buffer(1)); -}; - -var rended = false; -r.on('end', function() { - rended = true; -}); - -var w = new Stream(); -w.writable = true; -var writes = 0; -var buffered = 0; -w.write = function(c) { - writes += c.length; - buffered += c.length; - process.nextTick(drain); - return false; -}; - -function drain() { - assert(buffered <= 2); - buffered = 0; - w.emit('drain'); -} - - -var wended = false; -w.end = function() { - wended = true; -}; - -// Just for kicks, let's mess with the drain count. -// This verifies that even if it gets negative in the -// pipe() cleanup function, we'll still function properly. -r.on('readable', function() { - w.emit('drain'); -}); - -r.pipe(w); -process.on('exit', function() { - assert(rended); - assert(wended); - console.error('ok'); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-non-empty-end.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-non-empty-end.js deleted file mode 100644 index c971898c..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-readable-non-empty-end.js +++ /dev/null @@ -1,78 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var common = require('../common.js'); -var Readable = require('../../lib/_stream_readable'); - -var len = 0; -var chunks = new Array(10); -for (var i = 1; i <= 10; i++) { - chunks[i-1] = new Buffer(i); - len += i; -} - -var test = new Readable(); -var n = 0; -test._read = function(size) { - var chunk = chunks[n++]; - setTimeout(function() { - test.push(chunk); - }); -}; - -test.on('end', thrower); -function thrower() { - throw new Error('this should not happen!'); -} - -var bytesread = 0; -test.on('readable', function() { - var b = len - bytesread - 1; - var res = test.read(b); - if (res) { - bytesread += res.length; - console.error('br=%d len=%d', bytesread, len); - setTimeout(next); - } - test.read(0); -}); -test.read(0); - -function next() { - // now let's make 'end' happen - test.removeListener('end', thrower); - - var endEmitted = false; - process.on('exit', function() { - assert(endEmitted, 'end should be emitted by now'); - }); - test.on('end', function() { - endEmitted = true; - }); - - // one to get the last byte - var r = test.read(); - assert(r); - assert.equal(r.length, 1); - r = test.read(); - assert.equal(r, null); -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-set-encoding.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-set-encoding.js deleted file mode 100644 index 602acd6d..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-set-encoding.js +++ /dev/null @@ -1,312 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var common = require('../common.js'); -var assert = require('assert'); -var R = require('../../lib/_stream_readable'); -var util = require('util'); - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - -///// - -util.inherits(TestReader, R); - -function TestReader(n, opts) { - R.call(this, opts); - - this.pos = 0; - this.len = n || 100; -} - -TestReader.prototype._read = function(n) { - setTimeout(function() { - - if (this.pos >= this.len) { - return this.push(null); - } - - n = Math.min(n, this.len - this.pos); - if (n <= 0) { - return this.push(null); - } - - this.pos += n; - var ret = new Buffer(n); - ret.fill('a'); - - console.log("this.push(ret)", ret) - - return this.push(ret); - }.bind(this), 1); -}; - -test('setEncoding utf8', function(t) { - var tr = new TestReader(100); - tr.setEncoding('utf8'); - var out = []; - var expect = - [ 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - - -test('setEncoding hex', function(t) { - var tr = new TestReader(100); - tr.setEncoding('hex'); - var out = []; - var expect = - [ '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - -test('setEncoding hex with read(13)', function(t) { - var tr = new TestReader(100); - tr.setEncoding('hex'); - var out = []; - var expect = - [ "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "16161" ]; - - tr.on('readable', function flow() { - console.log("readable once") - var chunk; - while (null !== (chunk = tr.read(13))) - out.push(chunk); - }); - - tr.on('end', function() { - console.log("END") - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - -test('encoding: utf8', function(t) { - var tr = new TestReader(100, { encoding: 'utf8' }); - var out = []; - var expect = - [ 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa', - 'aaaaaaaaaa' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - - -test('encoding: hex', function(t) { - var tr = new TestReader(100, { encoding: 'hex' }); - var out = []; - var expect = - [ '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161', - '6161616161' ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(10))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); - -test('encoding: hex with read(13)', function(t) { - var tr = new TestReader(100, { encoding: 'hex' }); - var out = []; - var expect = - [ "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "1616161616161", - "6161616161616", - "16161" ]; - - tr.on('readable', function flow() { - var chunk; - while (null !== (chunk = tr.read(13))) - out.push(chunk); - }); - - tr.on('end', function() { - t.same(out, expect); - t.end(); - }); - - // just kick it off. - tr.emit('readable'); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-transform.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-transform.js deleted file mode 100644 index 5804c39d..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-transform.js +++ /dev/null @@ -1,435 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var assert = require('assert'); -var common = require('../common.js'); -var PassThrough = require('../../lib/_stream_passthrough'); -var Transform = require('../../lib/_stream_transform'); - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - ok: assert, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - -///// - -test('writable side consumption', function(t) { - var tx = new Transform({ - highWaterMark: 10 - }); - - var transformed = 0; - tx._transform = function(chunk, encoding, cb) { - transformed += chunk.length; - tx.push(chunk); - cb(); - }; - - for (var i = 1; i <= 10; i++) { - tx.write(new Buffer(i)); - } - tx.end(); - - t.equal(tx._readableState.length, 10); - t.equal(transformed, 10); - t.equal(tx._transformState.writechunk.length, 5); - t.same(tx._writableState.buffer.map(function(c) { - return c.chunk.length; - }), [6, 7, 8, 9, 10]); - - t.end(); -}); - -test('passthrough', function(t) { - var pt = new PassThrough(); - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5).toString(), 'arkba'); - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5).toString(), 'l'); - t.end(); -}); - -test('simple transform', function(t) { - var pt = new Transform; - pt._transform = function(c, e, cb) { - var ret = new Buffer(c.length); - ret.fill('x'); - pt.push(ret); - cb(); - }; - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - t.equal(pt.read(5).toString(), 'xxxxx'); - t.equal(pt.read(5).toString(), 'xxxxx'); - t.equal(pt.read(5).toString(), 'xxxxx'); - t.equal(pt.read(5).toString(), 'x'); - t.end(); -}); - -test('async passthrough', function(t) { - var pt = new Transform; - pt._transform = function(chunk, encoding, cb) { - setTimeout(function() { - pt.push(chunk); - cb(); - }, 10); - }; - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - pt.on('finish', function() { - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5).toString(), 'arkba'); - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5).toString(), 'l'); - t.end(); - }); -}); - -test('assymetric transform (expand)', function(t) { - var pt = new Transform; - - // emit each chunk 2 times. - pt._transform = function(chunk, encoding, cb) { - setTimeout(function() { - pt.push(chunk); - setTimeout(function() { - pt.push(chunk); - cb(); - }, 10) - }, 10); - }; - - pt.write(new Buffer('foog')); - pt.write(new Buffer('bark')); - pt.write(new Buffer('bazy')); - pt.write(new Buffer('kuel')); - pt.end(); - - pt.on('finish', function() { - t.equal(pt.read(5).toString(), 'foogf'); - t.equal(pt.read(5).toString(), 'oogba'); - t.equal(pt.read(5).toString(), 'rkbar'); - t.equal(pt.read(5).toString(), 'kbazy'); - t.equal(pt.read(5).toString(), 'bazyk'); - t.equal(pt.read(5).toString(), 'uelku'); - t.equal(pt.read(5).toString(), 'el'); - t.end(); - }); -}); - -test('assymetric transform (compress)', function(t) { - var pt = new Transform; - - // each output is the first char of 3 consecutive chunks, - // or whatever's left. - pt.state = ''; - - pt._transform = function(chunk, encoding, cb) { - if (!chunk) - chunk = ''; - var s = chunk.toString(); - setTimeout(function() { - this.state += s.charAt(0); - if (this.state.length === 3) { - pt.push(new Buffer(this.state)); - this.state = ''; - } - cb(); - }.bind(this), 10); - }; - - pt._flush = function(cb) { - // just output whatever we have. - pt.push(new Buffer(this.state)); - this.state = ''; - cb(); - }; - - pt.write(new Buffer('aaaa')); - pt.write(new Buffer('bbbb')); - pt.write(new Buffer('cccc')); - pt.write(new Buffer('dddd')); - pt.write(new Buffer('eeee')); - pt.write(new Buffer('aaaa')); - pt.write(new Buffer('bbbb')); - pt.write(new Buffer('cccc')); - pt.write(new Buffer('dddd')); - pt.write(new Buffer('eeee')); - pt.write(new Buffer('aaaa')); - pt.write(new Buffer('bbbb')); - pt.write(new Buffer('cccc')); - pt.write(new Buffer('dddd')); - pt.end(); - - // 'abcdeabcdeabcd' - pt.on('finish', function() { - t.equal(pt.read(5).toString(), 'abcde'); - t.equal(pt.read(5).toString(), 'abcde'); - t.equal(pt.read(5).toString(), 'abcd'); - t.end(); - }); -}); - - -test('passthrough event emission', function(t) { - var pt = new PassThrough(); - var emits = 0; - pt.on('readable', function() { - var state = pt._readableState; - console.error('>>> emit readable %d', emits); - emits++; - }); - - var i = 0; - - pt.write(new Buffer('foog')); - - console.error('need emit 0'); - pt.write(new Buffer('bark')); - - console.error('should have emitted readable now 1 === %d', emits); - t.equal(emits, 1); - - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5) + '', 'null'); - - console.error('need emit 1'); - - pt.write(new Buffer('bazy')); - console.error('should have emitted, but not again'); - pt.write(new Buffer('kuel')); - - console.error('should have emitted readable now 2 === %d', emits); - t.equal(emits, 2); - - t.equal(pt.read(5).toString(), 'arkba'); - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5), null); - - console.error('need emit 2'); - - pt.end(); - - t.equal(emits, 3); - - t.equal(pt.read(5).toString(), 'l'); - t.equal(pt.read(5), null); - - console.error('should not have emitted again'); - t.equal(emits, 3); - t.end(); -}); - -test('passthrough event emission reordered', function(t) { - var pt = new PassThrough; - var emits = 0; - pt.on('readable', function() { - console.error('emit readable', emits) - emits++; - }); - - pt.write(new Buffer('foog')); - console.error('need emit 0'); - pt.write(new Buffer('bark')); - console.error('should have emitted readable now 1 === %d', emits); - t.equal(emits, 1); - - t.equal(pt.read(5).toString(), 'foogb'); - t.equal(pt.read(5), null); - - console.error('need emit 1'); - pt.once('readable', function() { - t.equal(pt.read(5).toString(), 'arkba'); - - t.equal(pt.read(5), null); - - console.error('need emit 2'); - pt.once('readable', function() { - t.equal(pt.read(5).toString(), 'zykue'); - t.equal(pt.read(5), null); - pt.once('readable', function() { - t.equal(pt.read(5).toString(), 'l'); - t.equal(pt.read(5), null); - t.equal(emits, 4); - t.end(); - }); - pt.end(); - }); - pt.write(new Buffer('kuel')); - }); - - pt.write(new Buffer('bazy')); -}); - -test('passthrough facaded', function(t) { - console.error('passthrough facaded'); - var pt = new PassThrough; - var datas = []; - pt.on('data', function(chunk) { - datas.push(chunk.toString()); - }); - - pt.on('end', function() { - t.same(datas, ['foog', 'bark', 'bazy', 'kuel']); - t.end(); - }); - - pt.write(new Buffer('foog')); - setTimeout(function() { - pt.write(new Buffer('bark')); - setTimeout(function() { - pt.write(new Buffer('bazy')); - setTimeout(function() { - pt.write(new Buffer('kuel')); - setTimeout(function() { - pt.end(); - }, 10); - }, 10); - }, 10); - }, 10); -}); - -test('object transform (json parse)', function(t) { - console.error('json parse stream'); - var jp = new Transform({ objectMode: true }); - jp._transform = function(data, encoding, cb) { - try { - jp.push(JSON.parse(data)); - cb(); - } catch (er) { - cb(er); - } - }; - - // anything except null/undefined is fine. - // those are "magic" in the stream API, because they signal EOF. - var objects = [ - { foo: 'bar' }, - 100, - "string", - { nested: { things: [ { foo: 'bar' }, 100, "string" ] } } - ]; - - var ended = false; - jp.on('end', function() { - ended = true; - }); - - objects.forEach(function(obj) { - jp.write(JSON.stringify(obj)); - var res = jp.read(); - t.same(res, obj); - }); - - jp.end(); - - process.nextTick(function() { - t.ok(ended); - t.end(); - }) -}); - -test('object transform (json stringify)', function(t) { - console.error('json parse stream'); - var js = new Transform({ objectMode: true }); - js._transform = function(data, encoding, cb) { - try { - js.push(JSON.stringify(data)); - cb(); - } catch (er) { - cb(er); - } - }; - - // anything except null/undefined is fine. - // those are "magic" in the stream API, because they signal EOF. - var objects = [ - { foo: 'bar' }, - 100, - "string", - { nested: { things: [ { foo: 'bar' }, 100, "string" ] } } - ]; - - var ended = false; - js.on('end', function() { - ended = true; - }); - - objects.forEach(function(obj) { - js.write(obj); - var res = js.read(); - t.equal(res, JSON.stringify(obj)); - }); - - js.end(); - - process.nextTick(function() { - t.ok(ended); - t.end(); - }) -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-unpipe-drain.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-unpipe-drain.js deleted file mode 100644 index a3b53945..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-unpipe-drain.js +++ /dev/null @@ -1,76 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var common = require('../common.js'); -var assert = require('assert'); -var stream = require('../../readable'); -var crypto = require('crypto'); - -var util = require('util'); - -function TestWriter() { - stream.Writable.call(this); -} -util.inherits(TestWriter, stream.Writable); - -TestWriter.prototype._write = function (buffer, encoding, callback) { - console.log('write called'); - // super slow write stream (callback never called) -}; - -var dest = new TestWriter(); - -function TestReader(id) { - stream.Readable.call(this); - this.reads = 0; -} -util.inherits(TestReader, stream.Readable); - -TestReader.prototype._read = function (size) { - this.reads += 1; - this.push(crypto.randomBytes(size)); -}; - -var src1 = new TestReader(); -var src2 = new TestReader(); - -src1.pipe(dest); - -src1.once('readable', function () { - process.nextTick(function () { - - src2.pipe(dest); - - src2.once('readable', function () { - process.nextTick(function () { - - src1.unpipe(dest); - }); - }); - }); -}); - - -process.on('exit', function () { - assert.equal(src1.reads, 2); - assert.equal(src2.reads, 2); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-unpipe-leak.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-unpipe-leak.js deleted file mode 100644 index 6882f209..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-unpipe-leak.js +++ /dev/null @@ -1,74 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - - -var common = require('../common.js'); -var assert = require('assert'); -var stream = require('../../readable'); - -var chunk = new Buffer('hallo'); - -var util = require('util'); - -function TestWriter() { - stream.Writable.call(this); -} -util.inherits(TestWriter, stream.Writable); - -TestWriter.prototype._write = function(buffer, encoding, callback) { - callback(null); -}; - -var dest = new TestWriter(); - -// Set this high so that we'd trigger a nextTick warning -// and/or RangeError if we do maybeReadMore wrong. -function TestReader() { - stream.Readable.call(this, { highWaterMark: 0x10000 }); -} -util.inherits(TestReader, stream.Readable); - -TestReader.prototype._read = function(size) { - this.push(chunk); -}; - -var src = new TestReader(); - -for (var i = 0; i < 10; i++) { - src.pipe(dest); - src.unpipe(dest); -} - -assert.equal(src.listeners('end').length, 0); -assert.equal(src.listeners('readable').length, 0); - -assert.equal(dest.listeners('unpipe').length, 0); -assert.equal(dest.listeners('drain').length, 0); -assert.equal(dest.listeners('error').length, 0); -assert.equal(dest.listeners('close').length, 0); -assert.equal(dest.listeners('finish').length, 0); - -console.error(src._readableState); -process.on('exit', function() { - assert(src._readableState.length >= src._readableState.highWaterMark); - src._readableState.buffer.length = 0; - console.error(src._readableState); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-writable.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-writable.js deleted file mode 100644 index a60e65cd..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/test/simple/test-stream2-writable.js +++ /dev/null @@ -1,328 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var common = require('../common.js'); -var W = require('../../lib/_stream_writable'); -var D = require('../../lib/_stream_duplex'); -var assert = require('assert'); - -var util = require('util'); -util.inherits(TestWriter, W); - -function TestWriter() { - W.apply(this, arguments); - this.buffer = []; - this.written = 0; -} - -TestWriter.prototype._write = function(chunk, encoding, cb) { - // simulate a small unpredictable latency - setTimeout(function() { - this.buffer.push(chunk.toString()); - this.written += chunk.length; - cb(); - }.bind(this), Math.floor(Math.random() * 10)); -}; - -var chunks = new Array(50); -for (var i = 0; i < chunks.length; i++) { - chunks[i] = new Array(i + 1).join('x'); -} - -// tiny node-tap lookalike. -var tests = []; -var count = 0; - -function test(name, fn) { - count++; - tests.push([name, fn]); -} - -function run() { - var next = tests.shift(); - if (!next) - return console.error('ok'); - - var name = next[0]; - var fn = next[1]; - console.log('# %s', name); - fn({ - same: assert.deepEqual, - equal: assert.equal, - end: function () { - count--; - run(); - } - }); -} - -// ensure all tests have run -process.on("exit", function () { - assert.equal(count, 0); -}); - -process.nextTick(run); - -test('write fast', function(t) { - var tw = new TestWriter({ - highWaterMark: 100 - }); - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.end(); - }); - - chunks.forEach(function(chunk) { - // screw backpressure. Just buffer it all up. - tw.write(chunk); - }); - tw.end(); -}); - -test('write slow', function(t) { - var tw = new TestWriter({ - highWaterMark: 100 - }); - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.end(); - }); - - var i = 0; - (function W() { - tw.write(chunks[i++]); - if (i < chunks.length) - setTimeout(W, 10); - else - tw.end(); - })(); -}); - -test('write backpressure', function(t) { - var tw = new TestWriter({ - highWaterMark: 50 - }); - - var drains = 0; - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.equal(drains, 17); - t.end(); - }); - - tw.on('drain', function() { - drains++; - }); - - var i = 0; - (function W() { - do { - var ret = tw.write(chunks[i++]); - } while (ret !== false && i < chunks.length); - - if (i < chunks.length) { - assert(tw._writableState.length >= 50); - tw.once('drain', W); - } else { - tw.end(); - } - })(); -}); - -test('write bufferize', function(t) { - var tw = new TestWriter({ - highWaterMark: 100 - }); - - var encodings = - [ 'hex', - 'utf8', - 'utf-8', - 'ascii', - 'binary', - 'base64', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le', - undefined ]; - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got the expected chunks'); - }); - - chunks.forEach(function(chunk, i) { - var enc = encodings[ i % encodings.length ]; - chunk = new Buffer(chunk); - tw.write(chunk.toString(enc), enc); - }); - t.end(); -}); - -test('write no bufferize', function(t) { - var tw = new TestWriter({ - highWaterMark: 100, - decodeStrings: false - }); - - tw._write = function(chunk, encoding, cb) { - assert(typeof chunk === 'string'); - chunk = new Buffer(chunk, encoding); - return TestWriter.prototype._write.call(this, chunk, encoding, cb); - }; - - var encodings = - [ 'hex', - 'utf8', - 'utf-8', - 'ascii', - 'binary', - 'base64', - 'ucs2', - 'ucs-2', - 'utf16le', - 'utf-16le', - undefined ]; - - tw.on('finish', function() { - t.same(tw.buffer, chunks, 'got the expected chunks'); - }); - - chunks.forEach(function(chunk, i) { - var enc = encodings[ i % encodings.length ]; - chunk = new Buffer(chunk); - tw.write(chunk.toString(enc), enc); - }); - t.end(); -}); - -test('write callbacks', function (t) { - var callbacks = chunks.map(function(chunk, i) { - return [i, function(er) { - callbacks._called[i] = chunk; - }]; - }).reduce(function(set, x) { - set['callback-' + x[0]] = x[1]; - return set; - }, {}); - callbacks._called = []; - - var tw = new TestWriter({ - highWaterMark: 100 - }); - - tw.on('finish', function() { - process.nextTick(function() { - t.same(tw.buffer, chunks, 'got chunks in the right order'); - t.same(callbacks._called, chunks, 'called all callbacks'); - t.end(); - }); - }); - - chunks.forEach(function(chunk, i) { - tw.write(chunk, callbacks['callback-' + i]); - }); - tw.end(); -}); - -test('end callback', function (t) { - var tw = new TestWriter(); - tw.end(function () { - t.end(); - }); -}); - -test('end callback with chunk', function (t) { - var tw = new TestWriter(); - tw.end(new Buffer('hello world'), function () { - t.end(); - }); -}); - -test('end callback with chunk and encoding', function (t) { - var tw = new TestWriter(); - tw.end('hello world', 'ascii', function () { - t.end(); - }); -}); - -test('end callback after .write() call', function (t) { - var tw = new TestWriter(); - tw.write(new Buffer('hello world')); - tw.end(function () { - t.end(); - }); -}); - -test('encoding should be ignored for buffers', function(t) { - var tw = new W(); - var hex = '018b5e9a8f6236ffe30e31baf80d2cf6eb'; - tw._write = function(chunk, encoding, cb) { - t.equal(chunk.toString('hex'), hex); - t.end(); - }; - var buf = new Buffer(hex, 'hex'); - tw.write(buf, 'binary'); -}); - -test('writables are not pipable', function(t) { - var w = new W(); - w._write = function() {}; - var gotError = false; - w.on('error', function(er) { - gotError = true; - }); - w.pipe(process.stdout); - assert(gotError); - t.end(); -}); - -test('duplexes are pipable', function(t) { - var d = new D(); - d._read = function() {}; - d._write = function() {}; - var gotError = false; - d.on('error', function(er) { - gotError = true; - }); - d.pipe(process.stdout); - assert(!gotError); - t.end(); -}); - -test('end(chunk) two times is an error', function(t) { - var w = new W(); - w._write = function() {}; - var gotError = false; - w.on('error', function(er) { - gotError = true; - t.equal(er.message, 'write after end'); - }); - w.end('this is the end'); - w.end('and so is this'); - process.nextTick(function() { - assert(gotError); - t.end(); - }); -}); diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/transform.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/transform.js deleted file mode 100644 index 5d482f07..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/transform.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_transform.js") diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/writable.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/writable.js deleted file mode 100644 index e1e9efdf..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/writable.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require("./lib/_stream_writable.js") diff --git a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/zlib.js b/node_modules/karma/node_modules/log4js/node_modules/readable-stream/zlib.js deleted file mode 100644 index a30ca209..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/readable-stream/zlib.js +++ /dev/null @@ -1,452 +0,0 @@ -// Copyright Joyent, Inc. and other Node contributors. -// -// Permission is hereby granted, free of charge, to any person obtaining a -// copy of this software and associated documentation files (the -// "Software"), to deal in the Software without restriction, including -// without limitation the rights to use, copy, modify, merge, publish, -// distribute, sublicense, and/or sell copies of the Software, and to permit -// persons to whom the Software is furnished to do so, subject to the -// following conditions: -// -// The above copyright notice and this permission notice shall be included -// in all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN -// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR -// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE -// USE OR OTHER DEALINGS IN THE SOFTWARE. - -var Transform = require('./lib/_stream_transform.js'); - -var binding = process.binding('zlib'); -var util = require('util'); -var assert = require('assert').ok; - -// zlib doesn't provide these, so kludge them in following the same -// const naming scheme zlib uses. -binding.Z_MIN_WINDOWBITS = 8; -binding.Z_MAX_WINDOWBITS = 15; -binding.Z_DEFAULT_WINDOWBITS = 15; - -// fewer than 64 bytes per chunk is stupid. -// technically it could work with as few as 8, but even 64 bytes -// is absurdly low. Usually a MB or more is best. -binding.Z_MIN_CHUNK = 64; -binding.Z_MAX_CHUNK = Infinity; -binding.Z_DEFAULT_CHUNK = (16 * 1024); - -binding.Z_MIN_MEMLEVEL = 1; -binding.Z_MAX_MEMLEVEL = 9; -binding.Z_DEFAULT_MEMLEVEL = 8; - -binding.Z_MIN_LEVEL = -1; -binding.Z_MAX_LEVEL = 9; -binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; - -// expose all the zlib constants -Object.keys(binding).forEach(function(k) { - if (k.match(/^Z/)) exports[k] = binding[k]; -}); - -// translation table for return codes. -exports.codes = { - Z_OK: binding.Z_OK, - Z_STREAM_END: binding.Z_STREAM_END, - Z_NEED_DICT: binding.Z_NEED_DICT, - Z_ERRNO: binding.Z_ERRNO, - Z_STREAM_ERROR: binding.Z_STREAM_ERROR, - Z_DATA_ERROR: binding.Z_DATA_ERROR, - Z_MEM_ERROR: binding.Z_MEM_ERROR, - Z_BUF_ERROR: binding.Z_BUF_ERROR, - Z_VERSION_ERROR: binding.Z_VERSION_ERROR -}; - -Object.keys(exports.codes).forEach(function(k) { - exports.codes[exports.codes[k]] = k; -}); - -exports.Deflate = Deflate; -exports.Inflate = Inflate; -exports.Gzip = Gzip; -exports.Gunzip = Gunzip; -exports.DeflateRaw = DeflateRaw; -exports.InflateRaw = InflateRaw; -exports.Unzip = Unzip; - -exports.createDeflate = function(o) { - return new Deflate(o); -}; - -exports.createInflate = function(o) { - return new Inflate(o); -}; - -exports.createDeflateRaw = function(o) { - return new DeflateRaw(o); -}; - -exports.createInflateRaw = function(o) { - return new InflateRaw(o); -}; - -exports.createGzip = function(o) { - return new Gzip(o); -}; - -exports.createGunzip = function(o) { - return new Gunzip(o); -}; - -exports.createUnzip = function(o) { - return new Unzip(o); -}; - - -// Convenience methods. -// compress/decompress a string or buffer in one step. -exports.deflate = function(buffer, callback) { - zlibBuffer(new Deflate(), buffer, callback); -}; - -exports.gzip = function(buffer, callback) { - zlibBuffer(new Gzip(), buffer, callback); -}; - -exports.deflateRaw = function(buffer, callback) { - zlibBuffer(new DeflateRaw(), buffer, callback); -}; - -exports.unzip = function(buffer, callback) { - zlibBuffer(new Unzip(), buffer, callback); -}; - -exports.inflate = function(buffer, callback) { - zlibBuffer(new Inflate(), buffer, callback); -}; - -exports.gunzip = function(buffer, callback) { - zlibBuffer(new Gunzip(), buffer, callback); -}; - -exports.inflateRaw = function(buffer, callback) { - zlibBuffer(new InflateRaw(), buffer, callback); -}; - -function zlibBuffer(engine, buffer, callback) { - var buffers = []; - var nread = 0; - - engine.on('error', onError); - engine.on('end', onEnd); - - engine.end(buffer); - flow(); - - function flow() { - var chunk; - while (null !== (chunk = engine.read())) { - buffers.push(chunk); - nread += chunk.length; - } - engine.once('readable', flow); - } - - function onError(err) { - engine.removeListener('end', onEnd); - engine.removeListener('readable', flow); - callback(err); - } - - function onEnd() { - var buf = Buffer.concat(buffers, nread); - buffers = []; - callback(null, buf); - } -} - - -// generic zlib -// minimal 2-byte header -function Deflate(opts) { - if (!(this instanceof Deflate)) return new Deflate(opts); - Zlib.call(this, opts, binding.DEFLATE); -} - -function Inflate(opts) { - if (!(this instanceof Inflate)) return new Inflate(opts); - Zlib.call(this, opts, binding.INFLATE); -} - - - -// gzip - bigger header, same deflate compression -function Gzip(opts) { - if (!(this instanceof Gzip)) return new Gzip(opts); - Zlib.call(this, opts, binding.GZIP); -} - -function Gunzip(opts) { - if (!(this instanceof Gunzip)) return new Gunzip(opts); - Zlib.call(this, opts, binding.GUNZIP); -} - - - -// raw - no header -function DeflateRaw(opts) { - if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); - Zlib.call(this, opts, binding.DEFLATERAW); -} - -function InflateRaw(opts) { - if (!(this instanceof InflateRaw)) return new InflateRaw(opts); - Zlib.call(this, opts, binding.INFLATERAW); -} - - -// auto-detect header. -function Unzip(opts) { - if (!(this instanceof Unzip)) return new Unzip(opts); - Zlib.call(this, opts, binding.UNZIP); -} - - -// the Zlib class they all inherit from -// This thing manages the queue of requests, and returns -// true or false if there is anything in the queue when -// you call the .write() method. - -function Zlib(opts, mode) { - this._opts = opts = opts || {}; - this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; - - Transform.call(this, opts); - - // means a different thing there. - this._readableState.chunkSize = null; - - if (opts.chunkSize) { - if (opts.chunkSize < exports.Z_MIN_CHUNK || - opts.chunkSize > exports.Z_MAX_CHUNK) { - throw new Error('Invalid chunk size: ' + opts.chunkSize); - } - } - - if (opts.windowBits) { - if (opts.windowBits < exports.Z_MIN_WINDOWBITS || - opts.windowBits > exports.Z_MAX_WINDOWBITS) { - throw new Error('Invalid windowBits: ' + opts.windowBits); - } - } - - if (opts.level) { - if (opts.level < exports.Z_MIN_LEVEL || - opts.level > exports.Z_MAX_LEVEL) { - throw new Error('Invalid compression level: ' + opts.level); - } - } - - if (opts.memLevel) { - if (opts.memLevel < exports.Z_MIN_MEMLEVEL || - opts.memLevel > exports.Z_MAX_MEMLEVEL) { - throw new Error('Invalid memLevel: ' + opts.memLevel); - } - } - - if (opts.strategy) { - if (opts.strategy != exports.Z_FILTERED && - opts.strategy != exports.Z_HUFFMAN_ONLY && - opts.strategy != exports.Z_RLE && - opts.strategy != exports.Z_FIXED && - opts.strategy != exports.Z_DEFAULT_STRATEGY) { - throw new Error('Invalid strategy: ' + opts.strategy); - } - } - - if (opts.dictionary) { - if (!Buffer.isBuffer(opts.dictionary)) { - throw new Error('Invalid dictionary: it should be a Buffer instance'); - } - } - - this._binding = new binding.Zlib(mode); - - var self = this; - this._hadError = false; - this._binding.onerror = function(message, errno) { - // there is no way to cleanly recover. - // continuing only obscures problems. - self._binding = null; - self._hadError = true; - - var error = new Error(message); - error.errno = errno; - error.code = exports.codes[errno]; - self.emit('error', error); - }; - - this._binding.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, - opts.level || exports.Z_DEFAULT_COMPRESSION, - opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, - opts.strategy || exports.Z_DEFAULT_STRATEGY, - opts.dictionary); - - this._buffer = new Buffer(this._chunkSize); - this._offset = 0; - this._closed = false; - - this.once('end', this.close); -} - -util.inherits(Zlib, Transform); - -Zlib.prototype.reset = function reset() { - return this._binding.reset(); -}; - -Zlib.prototype._flush = function(output, callback) { - var rs = this._readableState; - var self = this; - this._transform(null, output, function(er) { - if (er) - return callback(er); - - // now a weird thing happens... it could be that you called flush - // but everything had already actually been consumed, but it wasn't - // enough to get over the Readable class's lowWaterMark. - // In that case, we emit 'readable' now to make sure it's consumed. - if (rs.length && - rs.length < rs.lowWaterMark && - !rs.ended && - rs.needReadable) - self.emit('readable'); - - callback(); - }); -}; - -Zlib.prototype.flush = function(callback) { - var ws = this._writableState; - var ts = this._transformState; - - if (ws.writing) { - ws.needDrain = true; - var self = this; - this.once('drain', function() { - self._flush(ts.output, callback); - }); - return; - } - - this._flush(ts.output, callback || function() {}); -}; - -Zlib.prototype.close = function(callback) { - if (callback) - process.nextTick(callback); - - if (this._closed) - return; - - this._closed = true; - - this._binding.close(); - - var self = this; - process.nextTick(function() { - self.emit('close'); - }); -}; - -Zlib.prototype._transform = function(chunk, output, cb) { - var flushFlag; - var ws = this._writableState; - var ending = ws.ending || ws.ended; - var last = ending && (!chunk || ws.length === chunk.length); - - if (chunk !== null && !Buffer.isBuffer(chunk)) - return cb(new Error('invalid input')); - - // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag. - // If it's explicitly flushing at some other time, then we use - // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression - // goodness. - if (last) - flushFlag = binding.Z_FINISH; - else if (chunk === null) - flushFlag = binding.Z_FULL_FLUSH; - else - flushFlag = binding.Z_NO_FLUSH; - - var availInBefore = chunk && chunk.length; - var availOutBefore = this._chunkSize - this._offset; - var inOff = 0; - - var req = this._binding.write(flushFlag, - chunk, // in - inOff, // in_off - availInBefore, // in_len - this._buffer, // out - this._offset, //out_off - availOutBefore); // out_len - - req.buffer = chunk; - req.callback = callback; - - var self = this; - function callback(availInAfter, availOutAfter, buffer) { - if (self._hadError) - return; - - var have = availOutBefore - availOutAfter; - assert(have >= 0, 'have should not go down'); - - if (have > 0) { - var out = self._buffer.slice(self._offset, self._offset + have); - self._offset += have; - // serve some output to the consumer. - output(out); - } - - // exhausted the output buffer, or used all the input create a new one. - if (availOutAfter === 0 || self._offset >= self._chunkSize) { - availOutBefore = self._chunkSize; - self._offset = 0; - self._buffer = new Buffer(self._chunkSize); - } - - if (availOutAfter === 0) { - // Not actually done. Need to reprocess. - // Also, update the availInBefore to the availInAfter value, - // so that if we have to hit it a third (fourth, etc.) time, - // it'll have the correct byte counts. - inOff += (availInBefore - availInAfter); - availInBefore = availInAfter; - - var newReq = self._binding.write(flushFlag, - chunk, - inOff, - availInBefore, - self._buffer, - self._offset, - self._chunkSize); - newReq.callback = callback; // this same function - newReq.buffer = chunk; - return; - } - - // finished with the chunk. - cb(); - } -}; - -util.inherits(Deflate, Zlib); -util.inherits(Inflate, Zlib); -util.inherits(Gzip, Zlib); -util.inherits(Gunzip, Zlib); -util.inherits(DeflateRaw, Zlib); -util.inherits(InflateRaw, Zlib); -util.inherits(Unzip, Zlib); diff --git a/node_modules/karma/node_modules/log4js/node_modules/semver/LICENSE b/node_modules/karma/node_modules/log4js/node_modules/semver/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/semver/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/log4js/node_modules/semver/README.md b/node_modules/karma/node_modules/log4js/node_modules/semver/README.md deleted file mode 100644 index 21930096..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/semver/README.md +++ /dev/null @@ -1,119 +0,0 @@ -semver(1) -- The semantic versioner for npm -=========================================== - -## Usage - - $ npm install semver - - semver.valid('1.2.3') // '1.2.3' - semver.valid('a.b.c') // null - semver.clean(' =v1.2.3 ') // '1.2.3' - semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true - semver.gt('1.2.3', '9.8.7') // false - semver.lt('1.2.3', '9.8.7') // true - -As a command-line utility: - - $ semver -h - - Usage: semver -v [-r ] - Test if version(s) satisfy the supplied range(s), - and sort them. - - Multiple versions or ranges may be supplied. - - Program exits successfully if any valid version satisfies - all supplied ranges, and prints all satisfying versions. - - If no versions are valid, or ranges are not satisfied, - then exits failure. - - Versions are printed in ascending order, so supplying - multiple versions to the utility will just sort them. - -## Versions - -A version is the following things, in this order: - -* a number (Major) -* a period -* a number (minor) -* a period -* a number (patch) -* OPTIONAL: a hyphen, followed by a number (build) -* OPTIONAL: a collection of pretty much any non-whitespace characters - (tag) - -A leading `"="` or `"v"` character is stripped off and ignored. - -## Comparisons - -The ordering of versions is done using the following algorithm, given -two versions and asked to find the greater of the two: - -* If the majors are numerically different, then take the one - with a bigger major number. `2.3.4 > 1.3.4` -* If the minors are numerically different, then take the one - with the bigger minor number. `2.3.4 > 2.2.4` -* If the patches are numerically different, then take the one with the - bigger patch number. `2.3.4 > 2.3.3` -* If only one of them has a build number, then take the one with the - build number. `2.3.4-0 > 2.3.4` -* If they both have build numbers, and the build numbers are numerically - different, then take the one with the bigger build number. - `2.3.4-10 > 2.3.4-9` -* If only one of them has a tag, then take the one without the tag. - `2.3.4 > 2.3.4-beta` -* If they both have tags, then take the one with the lexicographically - larger tag. `2.3.4-beta > 2.3.4-alpha` -* At this point, they're equal. - -## Ranges - -The following range styles are supported: - -* `>1.2.3` Greater than a specific version. -* `<1.2.3` Less than -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4` -* `~1.2.3` := `>=1.2.3 <1.3.0` -* `~1.2` := `>=1.2.0 <1.3.0` -* `~1` := `>=1.0.0 <2.0.0` -* `1.2.x` := `>=1.2.0 <1.3.0` -* `1.x` := `>=1.0.0 <2.0.0` - -Ranges can be joined with either a space (which implies "and") or a -`||` (which implies "or"). - -## Functions - -* valid(v): Return the parsed version, or null if it's not valid. -* inc(v, release): Return the version incremented by the release type - (major, minor, patch, or build), or null if it's not valid. - -### Comparison - -* gt(v1, v2): `v1 > v2` -* gte(v1, v2): `v1 >= v2` -* lt(v1, v2): `v1 < v2` -* lte(v1, v2): `v1 <= v2` -* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent, - even if they're not the exact same string. You already know how to - compare strings. -* neq(v1, v2): `v1 != v2` The opposite of eq. -* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call - the corresponding function above. `"==="` and `"!=="` do simple - string comparison, but are included for completeness. Throws if an - invalid comparison string is provided. -* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if - v2 is greater. Sorts in ascending order if passed to Array.sort(). -* rcompare(v1, v2): The reverse of compare. Sorts an array of versions - in descending order when passed to Array.sort(). - - -### Ranges - -* validRange(range): Return the valid range or null if it's not valid -* satisfies(version, range): Return true if the version satisfies the - range. -* maxSatisfying(versions, range): Return the highest version in the list - that satisfies the range, or null if none of them do. diff --git a/node_modules/karma/node_modules/log4js/node_modules/semver/bin/semver b/node_modules/karma/node_modules/log4js/node_modules/semver/bin/semver deleted file mode 100755 index d4e637e6..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/semver/bin/semver +++ /dev/null @@ -1,72 +0,0 @@ -#!/usr/bin/env node -// Standalone semver comparison program. -// Exits successfully and prints matching version(s) if -// any supplied version is valid and passes all tests. - -var argv = process.argv.slice(2) - , versions = [] - , range = [] - , gt = [] - , lt = [] - , eq = [] - , semver = require("../semver") - -main() - -function main () { - if (!argv.length) return help() - while (argv.length) { - var a - switch (a = argv.shift()) { - case "-v": case "--version": - versions.push(argv.shift()) - break - case "-r": case "--range": - range.push(argv.shift()) - break - case "-h": case "--help": case "-?": - return help() - default: - versions.push(a) - break - } - } - - versions = versions.filter(semver.valid) - if (!versions.length) return fail() - for (var i = 0, l = range.length; i < l ; i ++) { - versions = versions.filter(function (v) { - return semver.satisfies(v, range[i]) - }) - if (!versions.length) return fail() - } - return success(versions) -} - -function fail () { process.exit(1) } - -function success () { - versions.sort(semver.compare) - .map(semver.clean) - .forEach(function (v,i,_) { console.log(v) }) -} - -function help () { - console.log(["Usage: semver -v [-r ]" - ,"Test if version(s) satisfy the supplied range(s)," - ,"and sort them." - ,"" - ,"Multiple versions or ranges may be supplied." - ,"" - ,"Program exits successfully if any valid version satisfies" - ,"all supplied ranges, and prints all satisfying versions." - ,"" - ,"If no versions are valid, or ranges are not satisfied," - ,"then exits failure." - ,"" - ,"Versions are printed in ascending order, so supplying" - ,"multiple versions to the utility will just sort them." - ].join("\n")) -} - - diff --git a/node_modules/karma/node_modules/log4js/node_modules/semver/package.json b/node_modules/karma/node_modules/log4js/node_modules/semver/package.json deleted file mode 100644 index 0188084c..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/semver/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "semver", - "version": "1.1.4", - "description": "The semantic version parser used by npm.", - "main": "semver.js", - "scripts": { - "test": "tap test.js" - }, - "devDependencies": { - "tap": "0.x >=0.0.4" - }, - "license": { - "type": "MIT", - "url": "https://github.com/isaacs/semver/raw/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-semver.git" - }, - "bin": { - "semver": "./bin/semver" - }, - "readme": "semver(1) -- The semantic versioner for npm\n===========================================\n\n## Usage\n\n $ npm install semver\n\n semver.valid('1.2.3') // '1.2.3'\n semver.valid('a.b.c') // null\n semver.clean(' =v1.2.3 ') // '1.2.3'\n semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true\n semver.gt('1.2.3', '9.8.7') // false\n semver.lt('1.2.3', '9.8.7') // true\n\nAs a command-line utility:\n\n $ semver -h\n\n Usage: semver -v [-r ]\n Test if version(s) satisfy the supplied range(s),\n and sort them.\n\n Multiple versions or ranges may be supplied.\n\n Program exits successfully if any valid version satisfies\n all supplied ranges, and prints all satisfying versions.\n\n If no versions are valid, or ranges are not satisfied,\n then exits failure.\n\n Versions are printed in ascending order, so supplying\n multiple versions to the utility will just sort them.\n\n## Versions\n\nA version is the following things, in this order:\n\n* a number (Major)\n* a period\n* a number (minor)\n* a period\n* a number (patch)\n* OPTIONAL: a hyphen, followed by a number (build)\n* OPTIONAL: a collection of pretty much any non-whitespace characters\n (tag)\n\nA leading `\"=\"` or `\"v\"` character is stripped off and ignored.\n\n## Comparisons\n\nThe ordering of versions is done using the following algorithm, given\ntwo versions and asked to find the greater of the two:\n\n* If the majors are numerically different, then take the one\n with a bigger major number. `2.3.4 > 1.3.4`\n* If the minors are numerically different, then take the one\n with the bigger minor number. `2.3.4 > 2.2.4`\n* If the patches are numerically different, then take the one with the\n bigger patch number. `2.3.4 > 2.3.3`\n* If only one of them has a build number, then take the one with the\n build number. `2.3.4-0 > 2.3.4`\n* If they both have build numbers, and the build numbers are numerically\n different, then take the one with the bigger build number.\n `2.3.4-10 > 2.3.4-9`\n* If only one of them has a tag, then take the one without the tag.\n `2.3.4 > 2.3.4-beta`\n* If they both have tags, then take the one with the lexicographically\n larger tag. `2.3.4-beta > 2.3.4-alpha`\n* At this point, they're equal.\n\n## Ranges\n\nThe following range styles are supported:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`\n* `~1.2.3` := `>=1.2.3 <1.3.0`\n* `~1.2` := `>=1.2.0 <1.3.0`\n* `~1` := `>=1.0.0 <2.0.0`\n* `1.2.x` := `>=1.2.0 <1.3.0`\n* `1.x` := `>=1.0.0 <2.0.0`\n\nRanges can be joined with either a space (which implies \"and\") or a\n`||` (which implies \"or\").\n\n## Functions\n\n* valid(v): Return the parsed version, or null if it's not valid.\n* inc(v, release): Return the version incremented by the release type\n (major, minor, patch, or build), or null if it's not valid.\n\n### Comparison\n\n* gt(v1, v2): `v1 > v2`\n* gte(v1, v2): `v1 >= v2`\n* lt(v1, v2): `v1 < v2`\n* lte(v1, v2): `v1 <= v2`\n* eq(v1, v2): `v1 == v2` This is true if they're logically equivalent,\n even if they're not the exact same string. You already know how to\n compare strings.\n* neq(v1, v2): `v1 != v2` The opposite of eq.\n* cmp(v1, comparator, v2): Pass in a comparison string, and it'll call\n the corresponding function above. `\"===\"` and `\"!==\"` do simple\n string comparison, but are included for completeness. Throws if an\n invalid comparison string is provided.\n* compare(v1, v2): Return 0 if v1 == v2, or 1 if v1 is greater, or -1 if\n v2 is greater. Sorts in ascending order if passed to Array.sort().\n* rcompare(v1, v2): The reverse of compare. Sorts an array of versions\n in descending order when passed to Array.sort().\n\n\n### Ranges\n\n* validRange(range): Return the valid range or null if it's not valid\n* satisfies(version, range): Return true if the version satisfies the\n range.\n* maxSatisfying(versions, range): Return the highest version in the list\n that satisfies the range, or null if none of them do.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-semver/issues" - }, - "homepage": "https://github.com/isaacs/node-semver", - "_id": "semver@1.1.4", - "_from": "semver@~1.1.4" -} diff --git a/node_modules/karma/node_modules/log4js/node_modules/semver/semver.js b/node_modules/karma/node_modules/log4js/node_modules/semver/semver.js deleted file mode 100644 index cebfe6fd..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/semver/semver.js +++ /dev/null @@ -1,306 +0,0 @@ -;(function (exports) { // nothing in here is node-specific. - -// See http://semver.org/ -// This implementation is a *hair* less strict in that it allows -// v1.2.3 things, and also tags that don't begin with a char. - -var semver = "\\s*[v=]*\\s*([0-9]+)" // major - + "\\.([0-9]+)" // minor - + "\\.([0-9]+)" // patch - + "(-[0-9]+-?)?" // build - + "([a-zA-Z-+][a-zA-Z0-9-\.:]*)?" // tag - , exprComparator = "^((<|>)?=?)\s*("+semver+")$|^$" - , xRangePlain = "[v=]*([0-9]+|x|X|\\*)" - + "(?:\\.([0-9]+|x|X|\\*)" - + "(?:\\.([0-9]+|x|X|\\*)" - + "([a-zA-Z-][a-zA-Z0-9-\.:]*)?)?)?" - , xRange = "((?:<|>)=?)?\\s*" + xRangePlain - , exprLoneSpermy = "(?:~>?)" - , exprSpermy = exprLoneSpermy + xRange - , expressions = exports.expressions = - { parse : new RegExp("^\\s*"+semver+"\\s*$") - , parsePackage : new RegExp("^\\s*([^\/]+)[-@](" +semver+")\\s*$") - , parseRange : new RegExp( - "^\\s*(" + semver + ")\\s+-\\s+(" + semver + ")\\s*$") - , validComparator : new RegExp("^"+exprComparator+"$") - , parseXRange : new RegExp("^"+xRange+"$") - , parseSpermy : new RegExp("^"+exprSpermy+"$") - } - - -Object.getOwnPropertyNames(expressions).forEach(function (i) { - exports[i] = function (str) { - return ("" + (str || "")).match(expressions[i]) - } -}) - -exports.rangeReplace = ">=$1 <=$7" -exports.clean = clean -exports.compare = compare -exports.rcompare = rcompare -exports.satisfies = satisfies -exports.gt = gt -exports.gte = gte -exports.lt = lt -exports.lte = lte -exports.eq = eq -exports.neq = neq -exports.cmp = cmp -exports.inc = inc - -exports.valid = valid -exports.validPackage = validPackage -exports.validRange = validRange -exports.maxSatisfying = maxSatisfying - -exports.replaceStars = replaceStars -exports.toComparators = toComparators - -function stringify (version) { - var v = version - return [v[1]||'', v[2]||'', v[3]||''].join(".") + (v[4]||'') + (v[5]||'') -} - -function clean (version) { - version = exports.parse(version) - if (!version) return version - return stringify(version) -} - -function valid (version) { - if (typeof version !== "string") return null - return exports.parse(version) && version.trim().replace(/^[v=]+/, '') -} - -function validPackage (version) { - if (typeof version !== "string") return null - return version.match(expressions.parsePackage) && version.trim() -} - -// range can be one of: -// "1.0.3 - 2.0.0" range, inclusive, like ">=1.0.3 <=2.0.0" -// ">1.0.2" like 1.0.3 - 9999.9999.9999 -// ">=1.0.2" like 1.0.2 - 9999.9999.9999 -// "<2.0.0" like 0.0.0 - 1.9999.9999 -// ">1.0.2 <2.0.0" like 1.0.3 - 1.9999.9999 -var starExpression = /(<|>)?=?\s*\*/g - , starReplace = "" - , compTrimExpression = new RegExp("((<|>)?=|<|>)\\s*(" - +semver+"|"+xRangePlain+")", "g") - , compTrimReplace = "$1$3" - -function toComparators (range) { - var ret = (range || "").trim() - .replace(expressions.parseRange, exports.rangeReplace) - .replace(compTrimExpression, compTrimReplace) - .split(/\s+/) - .join(" ") - .split("||") - .map(function (orchunk) { - return orchunk - .replace(new RegExp("(" + exprLoneSpermy + ")\\s+"), "$1") - .split(" ") - .map(replaceXRanges) - .map(replaceSpermies) - .map(replaceStars) - .join(" ").trim() - }) - .map(function (orchunk) { - return orchunk - .trim() - .split(/\s+/) - .filter(function (c) { return c.match(expressions.validComparator) }) - }) - .filter(function (c) { return c.length }) - return ret -} - -function replaceStars (stars) { - return stars.trim().replace(starExpression, starReplace) -} - -// "2.x","2.x.x" --> ">=2.0.0- <2.1.0-" -// "2.3.x" --> ">=2.3.0- <2.4.0-" -function replaceXRanges (ranges) { - return ranges.split(/\s+/) - .map(replaceXRange) - .join(" ") -} - -function replaceXRange (version) { - return version.trim().replace(expressions.parseXRange, - function (v, gtlt, M, m, p, t) { - var anyX = !M || M.toLowerCase() === "x" || M === "*" - || !m || m.toLowerCase() === "x" || m === "*" - || !p || p.toLowerCase() === "x" || p === "*" - , ret = v - - if (gtlt && anyX) { - // just replace x'es with zeroes - ;(!M || M === "*" || M.toLowerCase() === "x") && (M = 0) - ;(!m || m === "*" || m.toLowerCase() === "x") && (m = 0) - ;(!p || p === "*" || p.toLowerCase() === "x") && (p = 0) - ret = gtlt + M+"."+m+"."+p+"-" - } else if (!M || M === "*" || M.toLowerCase() === "x") { - ret = "*" // allow any - } else if (!m || m === "*" || m.toLowerCase() === "x") { - // append "-" onto the version, otherwise - // "1.x.x" matches "2.0.0beta", since the tag - // *lowers* the version value - ret = ">="+M+".0.0- <"+(+M+1)+".0.0-" - } else if (!p || p === "*" || p.toLowerCase() === "x") { - ret = ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-" - } - return ret - }) -} - -// ~, ~> --> * (any, kinda silly) -// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0 -// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0 -// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0 -// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0 -// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0 -function replaceSpermies (version) { - return version.trim().replace(expressions.parseSpermy, - function (v, gtlt, M, m, p, t) { - if (gtlt) throw new Error( - "Using '"+gtlt+"' with ~ makes no sense. Don't do it.") - - if (!M || M.toLowerCase() === "x") { - return "" - } - // ~1 == >=1.0.0- <2.0.0- - if (!m || m.toLowerCase() === "x") { - return ">="+M+".0.0- <"+(+M+1)+".0.0-" - } - // ~1.2 == >=1.2.0- <1.3.0- - if (!p || p.toLowerCase() === "x") { - return ">="+M+"."+m+".0- <"+M+"."+(+m+1)+".0-" - } - // ~1.2.3 == >=1.2.3- <1.3.0- - t = t || "-" - return ">="+M+"."+m+"."+p+t+" <"+M+"."+(+m+1)+".0-" - }) -} - -function validRange (range) { - range = replaceStars(range) - var c = toComparators(range) - return (c.length === 0) - ? null - : c.map(function (c) { return c.join(" ") }).join("||") -} - -// returns the highest satisfying version in the list, or undefined -function maxSatisfying (versions, range) { - return versions - .filter(function (v) { return satisfies(v, range) }) - .sort(compare) - .pop() -} -function satisfies (version, range) { - version = valid(version) - if (!version) return false - range = toComparators(range) - for (var i = 0, l = range.length ; i < l ; i ++) { - var ok = false - for (var j = 0, ll = range[i].length ; j < ll ; j ++) { - var r = range[i][j] - , gtlt = r.charAt(0) === ">" ? gt - : r.charAt(0) === "<" ? lt - : false - , eq = r.charAt(!!gtlt) === "=" - , sub = (!!eq) + (!!gtlt) - if (!gtlt) eq = true - r = r.substr(sub) - r = (r === "") ? r : valid(r) - ok = (r === "") || (eq && r === version) || (gtlt && gtlt(version, r)) - if (!ok) break - } - if (ok) return true - } - return false -} - -// return v1 > v2 ? 1 : -1 -function compare (v1, v2) { - var g = gt(v1, v2) - return g === null ? 0 : g ? 1 : -1 -} - -function rcompare (v1, v2) { - return compare(v2, v1) -} - -function lt (v1, v2) { return gt(v2, v1) } -function gte (v1, v2) { return !lt(v1, v2) } -function lte (v1, v2) { return !gt(v1, v2) } -function eq (v1, v2) { return gt(v1, v2) === null } -function neq (v1, v2) { return gt(v1, v2) !== null } -function cmp (v1, c, v2) { - switch (c) { - case ">": return gt(v1, v2) - case "<": return lt(v1, v2) - case ">=": return gte(v1, v2) - case "<=": return lte(v1, v2) - case "==": return eq(v1, v2) - case "!=": return neq(v1, v2) - case "===": return v1 === v2 - case "!==": return v1 !== v2 - default: throw new Error("Y U NO USE VALID COMPARATOR!? "+c) - } -} - -// return v1 > v2 -function num (v) { - return v === undefined ? -1 : parseInt((v||"0").replace(/[^0-9]+/g, ''), 10) -} -function gt (v1, v2) { - v1 = exports.parse(v1) - v2 = exports.parse(v2) - if (!v1 || !v2) return false - - for (var i = 1; i < 5; i ++) { - v1[i] = num(v1[i]) - v2[i] = num(v2[i]) - if (v1[i] > v2[i]) return true - else if (v1[i] !== v2[i]) return false - } - // no tag is > than any tag, or use lexicographical order. - var tag1 = v1[5] || "" - , tag2 = v2[5] || "" - - // kludge: null means they were equal. falsey, and detectable. - // embarrassingly overclever, though, I know. - return tag1 === tag2 ? null - : !tag1 ? true - : !tag2 ? false - : tag1 > tag2 -} - -function inc (version, release) { - version = exports.parse(version) - if (!version) return null - - var parsedIndexLookup = - { 'major': 1 - , 'minor': 2 - , 'patch': 3 - , 'build': 4 } - var incIndex = parsedIndexLookup[release] - if (incIndex === undefined) return null - - var current = num(version[incIndex]) - version[incIndex] = current === -1 ? 1 : current + 1 - - for (var i = incIndex + 1; i < 5; i ++) { - if (num(version[i]) !== -1) version[i] = "0" - } - - if (version[4]) version[4] = "-" + version[4] - version[5] = "" - - return stringify(version) -} -})(typeof exports === "object" ? exports : semver = {}) diff --git a/node_modules/karma/node_modules/log4js/node_modules/semver/test.js b/node_modules/karma/node_modules/log4js/node_modules/semver/test.js deleted file mode 100644 index 475b77bb..00000000 --- a/node_modules/karma/node_modules/log4js/node_modules/semver/test.js +++ /dev/null @@ -1,436 +0,0 @@ -var tap = require("tap") - , test = tap.test - , semver = require("./semver.js") - , eq = semver.eq - , gt = semver.gt - , lt = semver.lt - , neq = semver.neq - , cmp = semver.cmp - , gte = semver.gte - , lte = semver.lte - , satisfies = semver.satisfies - , validRange = semver.validRange - , inc = semver.inc - , replaceStars = semver.replaceStars - , toComparators = semver.toComparators - -tap.plan(8) - -test("\ncomparison tests", function (t) { -// [version1, version2] -// version1 should be greater than version2 -; [ ["0.0.0", "0.0.0foo"] - , ["0.0.1", "0.0.0"] - , ["1.0.0", "0.9.9"] - , ["0.10.0", "0.9.0"] - , ["0.99.0", "0.10.0"] - , ["2.0.0", "1.2.3"] - , ["v0.0.0", "0.0.0foo"] - , ["v0.0.1", "0.0.0"] - , ["v1.0.0", "0.9.9"] - , ["v0.10.0", "0.9.0"] - , ["v0.99.0", "0.10.0"] - , ["v2.0.0", "1.2.3"] - , ["0.0.0", "v0.0.0foo"] - , ["0.0.1", "v0.0.0"] - , ["1.0.0", "v0.9.9"] - , ["0.10.0", "v0.9.0"] - , ["0.99.0", "v0.10.0"] - , ["2.0.0", "v1.2.3"] - , ["1.2.3", "1.2.3-asdf"] - , ["1.2.3-4", "1.2.3"] - , ["1.2.3-4-foo", "1.2.3"] - , ["1.2.3-5", "1.2.3-5-foo"] - , ["1.2.3-5", "1.2.3-4"] - , ["1.2.3-5-foo", "1.2.3-5-Foo"] - , ["3.0.0", "2.7.2+"] - ].forEach(function (v) { - var v0 = v[0] - , v1 = v[1] - t.ok(gt(v0, v1), "gt('"+v0+"', '"+v1+"')") - t.ok(lt(v1, v0), "lt('"+v1+"', '"+v0+"')") - t.ok(!gt(v1, v0), "!gt('"+v1+"', '"+v0+"')") - t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')") - t.ok(eq(v0, v0), "eq('"+v0+"', '"+v0+"')") - t.ok(eq(v1, v1), "eq('"+v1+"', '"+v1+"')") - t.ok(neq(v0, v1), "neq('"+v0+"', '"+v1+"')") - t.ok(cmp(v1, "==", v1), "cmp('"+v1+"' == '"+v1+"')") - t.ok(cmp(v0, ">=", v1), "cmp('"+v0+"' >= '"+v1+"')") - t.ok(cmp(v1, "<=", v0), "cmp('"+v1+"' <= '"+v0+"')") - t.ok(cmp(v0, "!=", v1), "cmp('"+v0+"' != '"+v1+"')") - }) - t.end() -}) - -test("\nequality tests", function (t) { -// [version1, version2] -// version1 should be equivalent to version2 -; [ ["1.2.3", "v1.2.3"] - , ["1.2.3", "=1.2.3"] - , ["1.2.3", "v 1.2.3"] - , ["1.2.3", "= 1.2.3"] - , ["1.2.3", " v1.2.3"] - , ["1.2.3", " =1.2.3"] - , ["1.2.3", " v 1.2.3"] - , ["1.2.3", " = 1.2.3"] - , ["1.2.3-0", "v1.2.3-0"] - , ["1.2.3-0", "=1.2.3-0"] - , ["1.2.3-0", "v 1.2.3-0"] - , ["1.2.3-0", "= 1.2.3-0"] - , ["1.2.3-0", " v1.2.3-0"] - , ["1.2.3-0", " =1.2.3-0"] - , ["1.2.3-0", " v 1.2.3-0"] - , ["1.2.3-0", " = 1.2.3-0"] - , ["1.2.3-01", "v1.2.3-1"] - , ["1.2.3-01", "=1.2.3-1"] - , ["1.2.3-01", "v 1.2.3-1"] - , ["1.2.3-01", "= 1.2.3-1"] - , ["1.2.3-01", " v1.2.3-1"] - , ["1.2.3-01", " =1.2.3-1"] - , ["1.2.3-01", " v 1.2.3-1"] - , ["1.2.3-01", " = 1.2.3-1"] - , ["1.2.3beta", "v1.2.3beta"] - , ["1.2.3beta", "=1.2.3beta"] - , ["1.2.3beta", "v 1.2.3beta"] - , ["1.2.3beta", "= 1.2.3beta"] - , ["1.2.3beta", " v1.2.3beta"] - , ["1.2.3beta", " =1.2.3beta"] - , ["1.2.3beta", " v 1.2.3beta"] - , ["1.2.3beta", " = 1.2.3beta"] - ].forEach(function (v) { - var v0 = v[0] - , v1 = v[1] - t.ok(eq(v0, v1), "eq('"+v0+"', '"+v1+"')") - t.ok(!neq(v0, v1), "!neq('"+v0+"', '"+v1+"')") - t.ok(cmp(v0, "==", v1), "cmp("+v0+"=="+v1+")") - t.ok(!cmp(v0, "!=", v1), "!cmp("+v0+"!="+v1+")") - t.ok(!cmp(v0, "===", v1), "!cmp("+v0+"==="+v1+")") - t.ok(cmp(v0, "!==", v1), "cmp("+v0+"!=="+v1+")") - t.ok(!gt(v0, v1), "!gt('"+v0+"', '"+v1+"')") - t.ok(gte(v0, v1), "gte('"+v0+"', '"+v1+"')") - t.ok(!lt(v0, v1), "!lt('"+v0+"', '"+v1+"')") - t.ok(lte(v0, v1), "lte('"+v0+"', '"+v1+"')") - }) - t.end() -}) - - -test("\nrange tests", function (t) { -// [range, version] -// version should be included by range -; [ ["1.0.0 - 2.0.0", "1.2.3"] - , ["1.0.0", "1.0.0"] - , [">=*", "0.2.4"] - , ["", "1.0.0"] - , ["*", "1.2.3"] - , ["*", "v1.2.3-foo"] - , [">=1.0.0", "1.0.0"] - , [">=1.0.0", "1.0.1"] - , [">=1.0.0", "1.1.0"] - , [">1.0.0", "1.0.1"] - , [">1.0.0", "1.1.0"] - , ["<=2.0.0", "2.0.0"] - , ["<=2.0.0", "1.9999.9999"] - , ["<=2.0.0", "0.2.9"] - , ["<2.0.0", "1.9999.9999"] - , ["<2.0.0", "0.2.9"] - , [">= 1.0.0", "1.0.0"] - , [">= 1.0.0", "1.0.1"] - , [">= 1.0.0", "1.1.0"] - , ["> 1.0.0", "1.0.1"] - , ["> 1.0.0", "1.1.0"] - , ["<= 2.0.0", "2.0.0"] - , ["<= 2.0.0", "1.9999.9999"] - , ["<= 2.0.0", "0.2.9"] - , ["< 2.0.0", "1.9999.9999"] - , ["<\t2.0.0", "0.2.9"] - , [">=0.1.97", "v0.1.97"] - , [">=0.1.97", "0.1.97"] - , ["0.1.20 || 1.2.4", "1.2.4"] - , [">=0.2.3 || <0.0.1", "0.0.0"] - , [">=0.2.3 || <0.0.1", "0.2.3"] - , [">=0.2.3 || <0.0.1", "0.2.4"] - , ["||", "1.3.4"] - , ["2.x.x", "2.1.3"] - , ["1.2.x", "1.2.3"] - , ["1.2.x || 2.x", "2.1.3"] - , ["1.2.x || 2.x", "1.2.3"] - , ["x", "1.2.3"] - , ["2.*.*", "2.1.3"] - , ["1.2.*", "1.2.3"] - , ["1.2.* || 2.*", "2.1.3"] - , ["1.2.* || 2.*", "1.2.3"] - , ["*", "1.2.3"] - , ["2", "2.1.2"] - , ["2.3", "2.3.1"] - , ["~2.4", "2.4.0"] // >=2.4.0 <2.5.0 - , ["~2.4", "2.4.5"] - , ["~>3.2.1", "3.2.2"] // >=3.2.1 <3.3.0 - , ["~1", "1.2.3"] // >=1.0.0 <2.0.0 - , ["~>1", "1.2.3"] - , ["~> 1", "1.2.3"] - , ["~1.0", "1.0.2"] // >=1.0.0 <1.1.0 - , ["~ 1.0", "1.0.2"] - , ["~ 1.0.3", "1.0.12"] - , [">=1", "1.0.0"] - , [">= 1", "1.0.0"] - , ["<1.2", "1.1.1"] - , ["< 1.2", "1.1.1"] - , ["1", "1.0.0beta"] - , ["~v0.5.4-pre", "0.5.5"] - , ["~v0.5.4-pre", "0.5.4"] - , ["=0.7.x", "0.7.2"] - , [">=0.7.x", "0.7.2"] - , ["=0.7.x", "0.7.0-asdf"] - , [">=0.7.x", "0.7.0-asdf"] - , ["<=0.7.x", "0.6.2"] - , ["~1.2.1 >=1.2.3", "1.2.3"] - , ["~1.2.1 =1.2.3", "1.2.3"] - , ["~1.2.1 1.2.3", "1.2.3"] - , ['~1.2.1 >=1.2.3 1.2.3', '1.2.3'] - , ['~1.2.1 1.2.3 >=1.2.3', '1.2.3'] - , ['~1.2.1 1.2.3', '1.2.3'] - , ['>=1.2.1 1.2.3', '1.2.3'] - , ['1.2.3 >=1.2.1', '1.2.3'] - , ['>=1.2.3 >=1.2.1', '1.2.3'] - , ['>=1.2.1 >=1.2.3', '1.2.3'] - ].forEach(function (v) { - t.ok(satisfies(v[1], v[0]), v[0]+" satisfied by "+v[1]) - }) - t.end() -}) - -test("\nnegative range tests", function (t) { -// [range, version] -// version should not be included by range -; [ ["1.0.0 - 2.0.0", "2.2.3"] - , ["1.0.0", "1.0.1"] - , [">=1.0.0", "0.0.0"] - , [">=1.0.0", "0.0.1"] - , [">=1.0.0", "0.1.0"] - , [">1.0.0", "0.0.1"] - , [">1.0.0", "0.1.0"] - , ["<=2.0.0", "3.0.0"] - , ["<=2.0.0", "2.9999.9999"] - , ["<=2.0.0", "2.2.9"] - , ["<2.0.0", "2.9999.9999"] - , ["<2.0.0", "2.2.9"] - , [">=0.1.97", "v0.1.93"] - , [">=0.1.97", "0.1.93"] - , ["0.1.20 || 1.2.4", "1.2.3"] - , [">=0.2.3 || <0.0.1", "0.0.3"] - , [">=0.2.3 || <0.0.1", "0.2.2"] - , ["2.x.x", "1.1.3"] - , ["2.x.x", "3.1.3"] - , ["1.2.x", "1.3.3"] - , ["1.2.x || 2.x", "3.1.3"] - , ["1.2.x || 2.x", "1.1.3"] - , ["2.*.*", "1.1.3"] - , ["2.*.*", "3.1.3"] - , ["1.2.*", "1.3.3"] - , ["1.2.* || 2.*", "3.1.3"] - , ["1.2.* || 2.*", "1.1.3"] - , ["2", "1.1.2"] - , ["2.3", "2.4.1"] - , ["~2.4", "2.5.0"] // >=2.4.0 <2.5.0 - , ["~2.4", "2.3.9"] - , ["~>3.2.1", "3.3.2"] // >=3.2.1 <3.3.0 - , ["~>3.2.1", "3.2.0"] // >=3.2.1 <3.3.0 - , ["~1", "0.2.3"] // >=1.0.0 <2.0.0 - , ["~>1", "2.2.3"] - , ["~1.0", "1.1.0"] // >=1.0.0 <1.1.0 - , ["<1", "1.0.0"] - , [">=1.2", "1.1.1"] - , ["1", "2.0.0beta"] - , ["~v0.5.4-beta", "0.5.4-alpha"] - , ["<1", "1.0.0beta"] - , ["< 1", "1.0.0beta"] - , ["=0.7.x", "0.8.2"] - , [">=0.7.x", "0.6.2"] - , ["<=0.7.x", "0.7.2"] - ].forEach(function (v) { - t.ok(!satisfies(v[1], v[0]), v[0]+" not satisfied by "+v[1]) - }) - t.end() -}) - -test("\nincrement versions test", function (t) { -// [version, inc, result] -// inc(version, inc) -> result -; [ [ "1.2.3", "major", "2.0.0" ] - , [ "1.2.3", "minor", "1.3.0" ] - , [ "1.2.3", "patch", "1.2.4" ] - , [ "1.2.3", "build", "1.2.3-1" ] - , [ "1.2.3-4", "build", "1.2.3-5" ] - , [ "1.2.3tag", "major", "2.0.0" ] - , [ "1.2.3-tag", "major", "2.0.0" ] - , [ "1.2.3tag", "build", "1.2.3-1" ] - , [ "1.2.3-tag", "build", "1.2.3-1" ] - , [ "1.2.3-4-tag", "build", "1.2.3-5" ] - , [ "1.2.3-4tag", "build", "1.2.3-5" ] - , [ "1.2.3", "fake", null ] - , [ "fake", "major", null ] - ].forEach(function (v) { - t.equal(inc(v[0], v[1]), v[2], "inc("+v[0]+", "+v[1]+") === "+v[2]) - }) - - t.end() -}) - -test("\nreplace stars test", function (t) { -// replace stars with "" -; [ [ "", "" ] - , [ "*", "" ] - , [ "> *", "" ] - , [ "<*", "" ] - , [ " >= *", "" ] - , [ "* || 1.2.3", " || 1.2.3" ] - ].forEach(function (v) { - t.equal(replaceStars(v[0]), v[1], "replaceStars("+v[0]+") === "+v[1]) - }) - - t.end() -}) - -test("\nvalid range test", function (t) { -// [range, result] -// validRange(range) -> result -// translate ranges into their canonical form -; [ ["1.0.0 - 2.0.0", ">=1.0.0 <=2.0.0"] - , ["1.0.0", "1.0.0"] - , [">=*", ""] - , ["", ""] - , ["*", ""] - , ["*", ""] - , [">=1.0.0", ">=1.0.0"] - , [">1.0.0", ">1.0.0"] - , ["<=2.0.0", "<=2.0.0"] - , ["1", ">=1.0.0- <2.0.0-"] - , ["<=2.0.0", "<=2.0.0"] - , ["<=2.0.0", "<=2.0.0"] - , ["<2.0.0", "<2.0.0"] - , ["<2.0.0", "<2.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , [">= 1.0.0", ">=1.0.0"] - , ["> 1.0.0", ">1.0.0"] - , ["> 1.0.0", ">1.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["<= 2.0.0", "<=2.0.0"] - , ["< 2.0.0", "<2.0.0"] - , ["< 2.0.0", "<2.0.0"] - , [">=0.1.97", ">=0.1.97"] - , [">=0.1.97", ">=0.1.97"] - , ["0.1.20 || 1.2.4", "0.1.20||1.2.4"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , [">=0.2.3 || <0.0.1", ">=0.2.3||<0.0.1"] - , ["||", "||"] - , ["2.x.x", ">=2.0.0- <3.0.0-"] - , ["1.2.x", ">=1.2.0- <1.3.0-"] - , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"] - , ["1.2.x || 2.x", ">=1.2.0- <1.3.0-||>=2.0.0- <3.0.0-"] - , ["x", ""] - , ["2.*.*", null] - , ["1.2.*", null] - , ["1.2.* || 2.*", null] - , ["1.2.* || 2.*", null] - , ["*", ""] - , ["2", ">=2.0.0- <3.0.0-"] - , ["2.3", ">=2.3.0- <2.4.0-"] - , ["~2.4", ">=2.4.0- <2.5.0-"] - , ["~2.4", ">=2.4.0- <2.5.0-"] - , ["~>3.2.1", ">=3.2.1- <3.3.0-"] - , ["~1", ">=1.0.0- <2.0.0-"] - , ["~>1", ">=1.0.0- <2.0.0-"] - , ["~> 1", ">=1.0.0- <2.0.0-"] - , ["~1.0", ">=1.0.0- <1.1.0-"] - , ["~ 1.0", ">=1.0.0- <1.1.0-"] - , ["<1", "<1.0.0-"] - , ["< 1", "<1.0.0-"] - , [">=1", ">=1.0.0-"] - , [">= 1", ">=1.0.0-"] - , ["<1.2", "<1.2.0-"] - , ["< 1.2", "<1.2.0-"] - , ["1", ">=1.0.0- <2.0.0-"] - ].forEach(function (v) { - t.equal(validRange(v[0]), v[1], "validRange("+v[0]+") === "+v[1]) - }) - - t.end() -}) - -test("\ncomparators test", function (t) { -// [range, comparators] -// turn range into a set of individual comparators -; [ ["1.0.0 - 2.0.0", [[">=1.0.0", "<=2.0.0"]] ] - , ["1.0.0", [["1.0.0"]] ] - , [">=*", [[">=0.0.0-"]] ] - , ["", [[""]]] - , ["*", [[""]] ] - , ["*", [[""]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">=1.0.0", [[">=1.0.0"]] ] - , [">1.0.0", [[">1.0.0"]] ] - , [">1.0.0", [[">1.0.0"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["<=2.0.0", [["<=2.0.0"]] ] - , ["<2.0.0", [["<2.0.0"]] ] - , ["<2.0.0", [["<2.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , [">= 1.0.0", [[">=1.0.0"]] ] - , ["> 1.0.0", [[">1.0.0"]] ] - , ["> 1.0.0", [[">1.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["<= 2.0.0", [["<=2.0.0"]] ] - , ["< 2.0.0", [["<2.0.0"]] ] - , ["<\t2.0.0", [["<2.0.0"]] ] - , [">=0.1.97", [[">=0.1.97"]] ] - , [">=0.1.97", [[">=0.1.97"]] ] - , ["0.1.20 || 1.2.4", [["0.1.20"], ["1.2.4"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , [">=0.2.3 || <0.0.1", [[">=0.2.3"], ["<0.0.1"]] ] - , ["||", [[""], [""]] ] - , ["2.x.x", [[">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.x", [[">=1.2.0-", "<1.3.0-"]] ] - , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.x || 2.x", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["x", [[""]] ] - , ["2.*.*", [[">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.*", [[">=1.2.0-", "<1.3.0-"]] ] - , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["1.2.* || 2.*", [[">=1.2.0-", "<1.3.0-"], [">=2.0.0-", "<3.0.0-"]] ] - , ["*", [[""]] ] - , ["2", [[">=2.0.0-", "<3.0.0-"]] ] - , ["2.3", [[">=2.3.0-", "<2.4.0-"]] ] - , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ] - , ["~2.4", [[">=2.4.0-", "<2.5.0-"]] ] - , ["~>3.2.1", [[">=3.2.1-", "<3.3.0-"]] ] - , ["~1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~>1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~> 1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["~1.0", [[">=1.0.0-", "<1.1.0-"]] ] - , ["~ 1.0", [[">=1.0.0-", "<1.1.0-"]] ] - , ["~ 1.0.3", [[">=1.0.3-", "<1.1.0-"]] ] - , ["~> 1.0.3", [[">=1.0.3-", "<1.1.0-"]] ] - , ["<1", [["<1.0.0-"]] ] - , ["< 1", [["<1.0.0-"]] ] - , [">=1", [[">=1.0.0-"]] ] - , [">= 1", [[">=1.0.0-"]] ] - , ["<1.2", [["<1.2.0-"]] ] - , ["< 1.2", [["<1.2.0-"]] ] - , ["1", [[">=1.0.0-", "<2.0.0-"]] ] - , ["1 2", [[">=1.0.0-", "<2.0.0-", ">=2.0.0-", "<3.0.0-"]] ] - ].forEach(function (v) { - t.equivalent(toComparators(v[0]), v[1], "toComparators("+v[0]+") === "+JSON.stringify(v[1])) - }) - - t.end() -}) diff --git a/node_modules/karma/node_modules/log4js/package.json b/node_modules/karma/node_modules/log4js/package.json deleted file mode 100644 index 06ebce12..00000000 --- a/node_modules/karma/node_modules/log4js/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "log4js", - "version": "0.6.9", - "description": "Port of Log4js to work with node.", - "keywords": [ - "logging", - "log", - "log4j", - "node" - ], - "main": "./lib/log4js", - "author": { - "name": "Gareth Jones", - "email": "gareth.jones@sensis.com.au" - }, - "repository": { - "type": "git", - "url": "https://github.com/nomiddlename/log4js-node.git" - }, - "bugs": { - "url": "http://github.com/nomiddlename/log4js-node/issues" - }, - "engines": { - "node": ">=0.8" - }, - "scripts": { - "test": "vows" - }, - "directories": { - "test": "test", - "lib": "lib" - }, - "dependencies": { - "async": "0.1.15", - "semver": "~1.1.4", - "readable-stream": "~1.0.2" - }, - "devDependencies": { - "vows": "0.7.0", - "sandboxed-module": "0.1.3", - "hook.io": "0.8.10", - "underscore": "1.2.1" - }, - "browser": { - "os": false - }, - "readme": "# log4js-node [![Build Status](https://secure.travis-ci.org/nomiddlename/log4js-node.png?branch=master)](http://travis-ci.org/nomiddlename/log4js-node)\n\n\nThis is a conversion of the [log4js](http://log4js.berlios.de/index.html)\nframework to work with [node](http://nodejs.org). I've mainly stripped out the browser-specific code and tidied up some of the javascript. \n\nOut of the box it supports the following features:\n\n* coloured console logging\n* replacement of node's console.log functions (optional)\n* file appender, with log rolling based on file size\n* SMTP appender\n* GELF appender\n* hook.io appender\n* multiprocess appender (useful when you've got worker processes)\n* a logger for connect/express servers\n* configurable log message layout/patterns\n* different log levels for different log categories (make some parts of your app log as DEBUG, others only ERRORS, etc.)\n\nNOTE: from log4js 0.5 onwards you'll need to explicitly enable replacement of node's console.log functions. Do this either by calling `log4js.replaceConsole()` or configuring with an object or json file like this:\n\n```javascript\n{\n appenders: [\n { type: \"console\" }\n ],\n replaceConsole: true\n}\n```\n\n## installation\n\nnpm install log4js\n\n\n## usage\n\nMinimalist version:\n```javascript\nvar log4js = require('log4js');\nvar logger = log4js.getLogger();\nlogger.debug(\"Some debug messages\");\n```\nBy default, log4js outputs to stdout with the coloured layout (thanks to [masylum](http://github.com/masylum)), so for the above you would see:\n```bash\n[2010-01-17 11:43:37.987] [DEBUG] [default] - Some debug messages\n```\nSee example.js for a full example, but here's a snippet (also in fromreadme.js):\n```javascript\nvar log4js = require('log4js'); \n//console log is loaded by default, so you won't normally need to do this\n//log4js.loadAppender('console');\nlog4js.loadAppender('file');\n//log4js.addAppender(log4js.appenders.console());\nlog4js.addAppender(log4js.appenders.file('logs/cheese.log'), 'cheese');\n\nvar logger = log4js.getLogger('cheese');\nlogger.setLevel('ERROR');\n\nlogger.trace('Entering cheese testing');\nlogger.debug('Got cheese.');\nlogger.info('Cheese is Gouda.');\nlogger.warn('Cheese is quite smelly.');\nlogger.error('Cheese is too ripe!');\nlogger.fatal('Cheese was breeding ground for listeria.');\n```\nOutput:\n```bash\n[2010-01-17 11:43:37.987] [ERROR] cheese - Cheese is too ripe!\n[2010-01-17 11:43:37.990] [FATAL] cheese - Cheese was breeding ground for listeria.\n``` \nThe first 5 lines of the code above could also be written as:\n```javascript\nvar log4js = require('log4js');\nlog4js.configure({\n appenders: [\n { type: 'console' },\n { type: 'file', filename: 'logs/cheese.log', category: 'cheese' }\n ]\n});\n```\n\n## configuration\n\nYou can configure the appenders and log levels manually (as above), or provide a\nconfiguration file (`log4js.configure('path/to/file.json')`), or a configuration object. The \nconfiguration file location may also be specified via the environment variable \nLOG4JS_CONFIG (`export LOG4JS_CONFIG=path/to/file.json`). \nAn example file can be found in `test/log4js.json`. An example config file with log rolling is in `test/with-log-rolling.json`.\nBy default, the configuration file is checked for changes every 60 seconds, and if changed, reloaded. This allows changes to logging levels to occur without restarting the application.\n\nTo turn off configuration file change checking, configure with:\n\n```javascript\nvar log4js = require('log4js');\nlog4js.configure('my_log4js_configuration.json', {});\n```\nTo specify a different period:\n\n```javascript\nlog4js.configure('file.json', { reloadSecs: 300 });\n```\nFor FileAppender you can also pass the path to the log directory as an option where all your log files would be stored.\n\n```javascript\nlog4js.configure('my_log4js_configuration.json', { cwd: '/absolute/path/to/log/dir' });\n```\nIf you have already defined an absolute path for one of the FileAppenders in the configuration file, you could add a \"absolute\": true to the particular FileAppender to override the cwd option passed. Here is an example configuration file:\n```json\n#### my_log4js_configuration.json ####\n{\n \"appenders\": [\n {\n \"type\": \"file\",\n \"filename\": \"relative/path/to/log_file.log\",\n \"maxLogSize\": 20480,\n \"backups\": 3,\n \"category\": \"relative-logger\"\n },\n {\n \"type\": \"file\",\n \"absolute\": true,\n \"filename\": \"/absolute/path/to/log_file.log\",\n \"maxLogSize\": 20480,\n \"backups\": 10,\n \"category\": \"absolute-logger\" \n }\n ]\n}\n``` \nDocumentation for most of the core appenders can be found on the [wiki](https://github.com/nomiddlename/log4js-node/wiki/Appenders), otherwise take a look at the tests and the examples.\n\n## Documentation\nSee the [wiki](https://github.com/nomiddlename/log4js-node/wiki). Improve the [wiki](https://github.com/nomiddlename/log4js-node/wiki), please.\n\n## Contributing\nContributions welcome, but take a look at the [rules](https://github.com/nomiddlename/log4js-node/wiki/Contributing) first.\n\n## License\n\nThe original log4js was distributed under the Apache 2.0 License, and so is this. I've tried to\nkeep the original copyright and author credits in place, except in sections that I have rewritten\nextensively.\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/nomiddlename/log4js-node", - "_id": "log4js@0.6.9", - "_from": "log4js@~0.6.3" -} diff --git a/node_modules/karma/node_modules/log4js/test/categoryFilter-test.js b/node_modules/karma/node_modules/log4js/test/categoryFilter-test.js deleted file mode 100644 index 1ad10a0c..00000000 --- a/node_modules/karma/node_modules/log4js/test/categoryFilter-test.js +++ /dev/null @@ -1,83 +0,0 @@ -'use strict'; - -var vows = require('vows') -, fs = require('fs') -, assert = require('assert'); - -function remove(filename) { - try { - fs.unlinkSync(filename); - } catch (e) { - //doesn't really matter if it failed - } -} - -vows.describe('log4js categoryFilter').addBatch({ - 'appender': { - topic: function() { - - var log4js = require('../lib/log4js'), logEvents = [], webLogger, appLogger; - log4js.clearAppenders(); - var appender = require('../lib/appenders/categoryFilter') - .appender( - ['app'], - function(evt) { logEvents.push(evt); } - ); - log4js.addAppender(appender, ["app","web"]); - - webLogger = log4js.getLogger("web"); - appLogger = log4js.getLogger("app"); - - webLogger.debug('This should get logged'); - appLogger.debug('This should not'); - webLogger.debug('Hello again'); - log4js.getLogger('db').debug('This shouldn\'t be included by the appender anyway'); - - return logEvents; - }, - 'should only pass matching category' : function(logEvents) { - assert.equal(logEvents.length, 2); - assert.equal(logEvents[0].data[0], 'This should get logged'); - assert.equal(logEvents[1].data[0], 'Hello again'); - } - }, - - 'configure': { - topic: function() { - var log4js = require('../lib/log4js') - , logger, weblogger; - - remove(__dirname + '/categoryFilter-web.log'); - remove(__dirname + '/categoryFilter-noweb.log'); - - log4js.configure('test/with-categoryFilter.json'); - logger = log4js.getLogger("app"); - weblogger = log4js.getLogger("web"); - - logger.info('Loading app'); - logger.debug('Initialising indexes'); - weblogger.info('00:00:00 GET / 200'); - weblogger.warn('00:00:00 GET / 500'); - //wait for the file system to catch up - setTimeout(this.callback, 100); - }, - 'tmp-tests.log': { - topic: function() { - fs.readFile(__dirname + '/categoryFilter-noweb.log', 'utf8', this.callback); - }, - 'should contain all log messages': function(contents) { - var messages = contents.trim().split('\n'); - assert.deepEqual(messages, ['Loading app','Initialising indexes']); - } - }, - 'tmp-tests-web.log': { - topic: function() { - fs.readFile(__dirname + '/categoryFilter-web.log','utf8',this.callback); - }, - 'should contain only error and warning log messages': function(contents) { - var messages = contents.trim().split('\n'); - assert.deepEqual(messages, ['00:00:00 GET / 200','00:00:00 GET / 500']); - } - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/clusteredAppender-test.js b/node_modules/karma/node_modules/log4js/test/clusteredAppender-test.js deleted file mode 100755 index 91e0a0f1..00000000 --- a/node_modules/karma/node_modules/log4js/test/clusteredAppender-test.js +++ /dev/null @@ -1,125 +0,0 @@ -"use strict"; -var assert = require('assert'); -var vows = require('vows'); -var layouts = require('../lib/layouts'); -var sandbox = require('sandboxed-module'); -var LoggingEvent = require('../lib/logger').LoggingEvent; -var cluster = require('cluster'); - -vows.describe('log4js cluster appender').addBatch({ - 'when in master mode': { - topic: function() { - - var registeredClusterEvents = []; - var loggingEvents = []; - - // Fake cluster module, so no cluster listeners be really added - var fakeCluster = { - - on: function(event, callback) { - registeredClusterEvents.push(event); - }, - - isMaster: true, - isWorker: false, - - }; - - var fakeActualAppender = function(loggingEvent) { - loggingEvents.push(loggingEvent); - } - - // Load appender and fake modules in it - var appenderModule = sandbox.require('../lib/appenders/clustered', { - requires: { - 'cluster': fakeCluster, - } - }); - - var masterAppender = appenderModule.appender({ - actualAppenders: [ fakeActualAppender ] - }); - - // Actual test - log message using masterAppender - masterAppender(new LoggingEvent('wovs', 'Info', ['masterAppender test'])); - - var returnValue = { - registeredClusterEvents: registeredClusterEvents, - loggingEvents: loggingEvents, - }; - - return returnValue; - }, - - "should register 'fork' event listener on 'cluster'": function(topic) { - assert.equal(topic.registeredClusterEvents[0], 'fork'); - }, - - "should log using actual appender": function(topic) { - assert.equal(topic.loggingEvents[0].data[0], 'masterAppender test'); - }, - - }, - - 'when in worker mode': { - - topic: function() { - - var registeredProcessEvents = []; - - // Fake cluster module, to fake we're inside a worker process - var fakeCluster = { - - isMaster: false, - isWorker: true, - - }; - - var fakeProcess = { - - send: function(data) { - registeredProcessEvents.push(data); - }, - - }; - - // Load appender and fake modules in it - var appenderModule = sandbox.require('../lib/appenders/clustered', { - requires: { - 'cluster': fakeCluster, - }, - globals: { - 'process': fakeProcess, - } - }); - - var workerAppender = appenderModule.appender(); - - // Actual test - log message using masterAppender - workerAppender(new LoggingEvent('wovs', 'Info', ['workerAppender test'])); - workerAppender(new LoggingEvent('wovs', 'Info', [new Error('Error test')])); - - var returnValue = { - registeredProcessEvents: registeredProcessEvents, - }; - - return returnValue; - - }, - - "worker appender should call process.send" : function(topic) { - assert.equal(topic.registeredProcessEvents[0].type, '::log-message'); - assert.equal(JSON.parse(topic.registeredProcessEvents[0].event).data[0], "workerAppender test"); - }, - - "worker should serialize an Error correctly" : function(topic) { - assert.equal(topic.registeredProcessEvents[1].type, '::log-message'); - assert(JSON.parse(topic.registeredProcessEvents[1].event).data[0].stack); - var actual = JSON.parse(topic.registeredProcessEvents[1].event).data[0].stack; - var expectedRegex = /^Error: Error test/; - assert(actual.match(expectedRegex), "Expected: \n\n " + actual + "\n\n to match " + expectedRegex); - } - - } - -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/configuration-test.js b/node_modules/karma/node_modules/log4js/test/configuration-test.js deleted file mode 100644 index e198de90..00000000 --- a/node_modules/karma/node_modules/log4js/test/configuration-test.js +++ /dev/null @@ -1,134 +0,0 @@ -"use strict"; -var assert = require('assert') -, vows = require('vows') -, sandbox = require('sandboxed-module'); - -function makeTestAppender() { - return { - configure: function(config, options) { - this.configureCalled = true; - this.config = config; - this.options = options; - return this.appender(); - }, - appender: function() { - var self = this; - return function(logEvt) { self.logEvt = logEvt; }; - } - }; -} - -vows.describe('log4js configure').addBatch({ - 'appenders': { - 'when specified by type': { - topic: function() { - var testAppender = makeTestAppender(), - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - './appenders/cheese': testAppender - } - } - ); - log4js.configure( - { - appenders: [ - { type: "cheese", flavour: "gouda" } - ] - }, - { pants: "yes" } - ); - return testAppender; - }, - 'should load appender': function(testAppender) { - assert.ok(testAppender.configureCalled); - }, - 'should pass config to appender': function(testAppender) { - assert.equal(testAppender.config.flavour, 'gouda'); - }, - 'should pass log4js options to appender': function(testAppender) { - assert.equal(testAppender.options.pants, 'yes'); - } - }, - 'when core appender loaded via loadAppender': { - topic: function() { - var testAppender = makeTestAppender(), - log4js = sandbox.require( - '../lib/log4js', - { requires: { './appenders/cheese': testAppender } } - ); - - log4js.loadAppender('cheese'); - return log4js; - }, - 'should load appender from ../lib/appenders': function(log4js) { - assert.ok(log4js.appenders.cheese); - }, - 'should add appender configure function to appenderMakers' : function(log4js) { - assert.isFunction(log4js.appenderMakers.cheese); - } - }, - 'when appender in node_modules loaded via loadAppender': { - topic: function() { - var testAppender = makeTestAppender(), - log4js = sandbox.require( - '../lib/log4js', - { requires: { 'some/other/external': testAppender } } - ); - log4js.loadAppender('some/other/external'); - return log4js; - }, - 'should load appender via require': function(log4js) { - assert.ok(log4js.appenders['some/other/external']); - }, - 'should add appender configure function to appenderMakers': function(log4js) { - assert.isFunction(log4js.appenderMakers['some/other/external']); - } - }, - 'when configuration file loaded via LOG4JS_CONFIG environment variable': { - topic: function() { - process.env.LOG4JS_CONFIG = 'some/path/to/mylog4js.json'; - var fileRead = 0, - modulePath = 'some/path/to/mylog4js.json', - pathsChecked = [], - mtime = new Date(), - fakeFS = { - config: { appenders: [ { type: 'console', layout: { type: 'messagePassThrough' } } ], - levels: { 'a-test' : 'INFO' } }, - readdirSync: function(dir) { - return require('fs').readdirSync(dir); - }, - readFileSync: function (file, encoding) { - fileRead += 1; - assert.isString(file); - assert.equal(file, modulePath); - assert.equal(encoding, 'utf8'); - return JSON.stringify(fakeFS.config); - }, - statSync: function (path) { - pathsChecked.push(path); - if (path === modulePath) { - return { mtime: mtime }; - } else { - throw new Error("no such file"); - } - } - }, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - 'fs': fakeFS, - } - } - ); - delete process.env.LOG4JS_CONFIG; - return fileRead; - }, - 'should load the specified local configuration file' : function(fileRead) { - assert.equal(fileRead, 1); - } - } - } -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/configureNoLevels-test.js b/node_modules/karma/node_modules/log4js/test/configureNoLevels-test.js deleted file mode 100644 index 55bd987b..00000000 --- a/node_modules/karma/node_modules/log4js/test/configureNoLevels-test.js +++ /dev/null @@ -1,173 +0,0 @@ -"use strict"; -// This test shows unexpected behaviour for log4js.configure() in log4js-node@0.4.3 and earlier: -// 1) log4js.configure(), log4js.configure(null), -// log4js.configure({}), log4js.configure() -// all set all loggers levels to trace, even if they were previously set to something else. -// 2) log4js.configure({levels:{}}), log4js.configure({levels: {foo: -// bar}}) leaves previously set logger levels intact. -// - -// Basic set up -var vows = require('vows'); -var assert = require('assert'); -var toLevel = require('../lib/levels').toLevel; - -// uncomment one or other of the following to see progress (or not) while running the tests -// var showProgress = console.log; -var showProgress = function() {}; - - -// Define the array of levels as string to iterate over. -var strLevels= ['Trace','Debug','Info','Warn','Error','Fatal']; - -// setup the configurations we want to test -var configs = { - 'nop': 'nop', // special case where the iterating vows generator will not call log4js.configure - 'is undefined': undefined, - 'is null': null, - 'is empty': {}, - 'has no levels': {foo: 'bar'}, - 'has null levels': {levels: null}, - 'has empty levels': {levels: {}}, - 'has random levels': {levels: {foo: 'bar'}}, - 'has some valid levels': {levels: {A: 'INFO'}} -}; - -// Set up the basic vows batches for this test -var batches = []; - - -function getLoggerName(level) { - return level+'-logger'; -} - -// the common vows top-level context, whether log4js.configure is called or not -// just making sure that the code is common, -// so that there are no spurious errors in the tests themselves. -function getTopLevelContext(nop, configToTest, name) { - return { - topic: function() { - var log4js = require('../lib/log4js'); - // create loggers for each level, - // keeping the level in the logger's name for traceability - strLevels.forEach(function(l) { - log4js.getLogger(getLoggerName(l)).setLevel(l); - }); - - if (!nop) { - showProgress('** Configuring log4js with', configToTest); - log4js.configure(configToTest); - } - else { - showProgress('** Not configuring log4js'); - } - return log4js; - } - }; -} - -showProgress('Populating batch object...'); - -function checkForMismatch(topic) { - var er = topic.log4js.levels.toLevel(topic.baseLevel) - .isLessThanOrEqualTo(topic.log4js.levels.toLevel(topic.comparisonLevel)); - - assert.equal( - er, - topic.expectedResult, - 'Mismatch: for setLevel(' + topic.baseLevel + - ') was expecting a comparison with ' + topic.comparisonLevel + - ' to be ' + topic.expectedResult - ); -} - -function checkExpectedResult(topic) { - var result = topic.log4js - .getLogger(getLoggerName(topic.baseLevel)) - .isLevelEnabled(topic.log4js.levels.toLevel(topic.comparisonLevel)); - - assert.equal( - result, - topic.expectedResult, - 'Failed: ' + getLoggerName(topic.baseLevel) + - '.isLevelEnabled( ' + topic.comparisonLevel + ' ) returned ' + result - ); -} - -function setupBaseLevelAndCompareToOtherLevels(baseLevel) { - var baseLevelSubContext = 'and checking the logger whose level was set to '+baseLevel ; - var subContext = { topic: baseLevel }; - batch[context][baseLevelSubContext] = subContext; - - // each logging level has strLevels sub-contexts, - // to exhaustively test all the combinations of - // setLevel(baseLevel) and isLevelEnabled(comparisonLevel) per config - strLevels.forEach(compareToOtherLevels(subContext)); -} - -function compareToOtherLevels(subContext) { - var baseLevel = subContext.topic; - - return function (comparisonLevel) { - var comparisonLevelSubContext = 'with isLevelEnabled('+comparisonLevel+')'; - - // calculate this independently of log4js, but we'll add a vow - // later on to check that we're not mismatched with log4js - var expectedResult = strLevels.indexOf(baseLevel) <= strLevels.indexOf(comparisonLevel); - - // the topic simply gathers all the parameters for the vow - // into an object, to simplify the vow's work. - subContext[comparisonLevelSubContext] = { - topic: function(baseLevel, log4js) { - return { - comparisonLevel: comparisonLevel, - baseLevel: baseLevel, - log4js: log4js, - expectedResult: expectedResult - }; - } - }; - - var vow = 'should return '+expectedResult; - subContext[comparisonLevelSubContext][vow] = checkExpectedResult; - - // the extra vow to check the comparison between baseLevel and - // comparisonLevel we performed earlier matches log4js' - // comparison too - var subSubContext = subContext[comparisonLevelSubContext]; - subSubContext['finally checking for comparison mismatch with log4js'] = checkForMismatch; - }; -} - -// Populating the batches programmatically, as there are -// (configs.length x strLevels.length x strLevels.length) = 324 -// possible test combinations -for (var cfg in configs) { - var configToTest = configs[cfg]; - var nop = configToTest === 'nop'; - var context; - if (nop) { - context = 'Setting up loggers with initial levels, then NOT setting a configuration,'; - } - else { - context = 'Setting up loggers with initial levels, then setting a configuration which '+cfg+','; - } - - showProgress('Setting up the vows batch and context for '+context); - // each config to be tested has its own vows batch with a single top-level context - var batch={}; - batch[context]= getTopLevelContext(nop, configToTest, context); - batches.push(batch); - - // each top-level context has strLevels sub-contexts, one per logger - // which has set to a specific level in the top-level context's topic - strLevels.forEach(setupBaseLevelAndCompareToOtherLevels); -} - -showProgress('Running tests'); -var v = vows.describe('log4js.configure(), with or without a "levels" property'); - -batches.forEach(function(batch) {v=v.addBatch(batch);}); - -v.export(module); - diff --git a/node_modules/karma/node_modules/log4js/test/connect-logger-test.js b/node_modules/karma/node_modules/log4js/test/connect-logger-test.js deleted file mode 100644 index 5a0caa7b..00000000 --- a/node_modules/karma/node_modules/log4js/test/connect-logger-test.js +++ /dev/null @@ -1,226 +0,0 @@ -/* jshint maxparams:7 */ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, levels = require('../lib/levels'); - -function MockLogger() { - - var that = this; - this.messages = []; - - this.log = function(level, message, exception) { - that.messages.push({ level: level, message: message }); - }; - - this.isLevelEnabled = function(level) { - return level.isGreaterThanOrEqualTo(that.level); - }; - - this.level = levels.TRACE; - -} - -function MockRequest(remoteAddr, method, originalUrl, headers) { - - this.socket = { remoteAddress: remoteAddr }; - this.originalUrl = originalUrl; - this.method = method; - this.httpVersionMajor = '5'; - this.httpVersionMinor = '0'; - this.headers = headers || {}; - - var self = this; - Object.keys(this.headers).forEach(function(key) { - self.headers[key.toLowerCase()] = self.headers[key]; - }); -} - -function MockResponse() { - - this.end = function(chunk, encoding) { - }; - - this.writeHead = function(code, headers) { - }; - -} - -function request(cl, method, url, code, reqHeaders, resHeaders) { - var req = new MockRequest('my.remote.addr', method, url, reqHeaders); - var res = new MockResponse(); - cl(req, res, function() {}); - res.writeHead(code, resHeaders); - res.end('chunk','encoding'); -} - -vows.describe('log4js connect logger').addBatch({ - 'getConnectLoggerModule': { - topic: function() { - var clm = require('../lib/connect-logger'); - return clm; - }, - - 'should return a "connect logger" factory' : function(clm) { - assert.isObject(clm); - }, - - 'take a log4js logger and return a "connect logger"' : { - topic: function(clm) { - var ml = new MockLogger(); - var cl = clm.connectLogger(ml); - return cl; - }, - - 'should return a "connect logger"': function(cl) { - assert.isFunction(cl); - } - }, - - 'log events' : { - topic: function(clm) { - var ml = new MockLogger(); - var cl = clm.connectLogger(ml); - request(cl, 'GET', 'http://url', 200); - return ml.messages; - }, - - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 1); - assert.ok(levels.INFO.isEqualTo(messages[0].level)); - assert.include(messages[0].message, 'GET'); - assert.include(messages[0].message, 'http://url'); - assert.include(messages[0].message, 'my.remote.addr'); - assert.include(messages[0].message, '200'); - } - }, - - 'log events with level below logging level' : { - topic: function(clm) { - var ml = new MockLogger(); - ml.level = levels.FATAL; - var cl = clm.connectLogger(ml); - request(cl, 'GET', 'http://url', 200); - return ml.messages; - }, - - 'check message': function(messages) { - assert.isArray(messages); - assert.isEmpty(messages); - } - }, - - 'log events with non-default level and custom format' : { - topic: function(clm) { - var ml = new MockLogger(); - ml.level = levels.INFO; - var cl = clm.connectLogger(ml, { level: levels.INFO, format: ':method :url' } ); - request(cl, 'GET', 'http://url', 200); - return ml.messages; - }, - - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 1); - assert.ok(levels.INFO.isEqualTo(messages[0].level)); - assert.equal(messages[0].message, 'GET http://url'); - } - }, - - 'logger with options as string': { - topic: function(clm) { - var ml = new MockLogger(); - ml.level = levels.INFO; - var cl = clm.connectLogger(ml, ':method :url'); - request(cl, 'POST', 'http://meh', 200); - return ml.messages; - }, - 'should use the passed in format': function(messages) { - assert.equal(messages[0].message, 'POST http://meh'); - } - }, - - 'auto log levels': { - topic: function(clm) { - var ml = new MockLogger(); - ml.level = levels.INFO; - var cl = clm.connectLogger(ml, { level: 'auto', format: ':method :url' }); - request(cl, 'GET', 'http://meh', 200); - request(cl, 'GET', 'http://meh', 201); - request(cl, 'GET', 'http://meh', 302); - request(cl, 'GET', 'http://meh', 404); - request(cl, 'GET', 'http://meh', 500); - return ml.messages; - }, - - 'should use INFO for 2xx': function(messages) { - assert.ok(levels.INFO.isEqualTo(messages[0].level)); - assert.ok(levels.INFO.isEqualTo(messages[1].level)); - }, - - 'should use WARN for 3xx': function(messages) { - assert.ok(levels.WARN.isEqualTo(messages[2].level)); - }, - - 'should use ERROR for 4xx': function(messages) { - assert.ok(levels.ERROR.isEqualTo(messages[3].level)); - }, - - 'should use ERROR for 5xx': function(messages) { - assert.ok(levels.ERROR.isEqualTo(messages[4].level)); - } - }, - - 'format using a function': { - topic: function(clm) { - var ml = new MockLogger(); - ml.level = levels.INFO; - var cl = clm.connectLogger(ml, function(req, res, formatFn) { return "I was called"; }); - request(cl, 'GET', 'http://blah', 200); - return ml.messages; - }, - - 'should call the format function': function(messages) { - assert.equal(messages[0].message, 'I was called'); - } - }, - - 'format that includes request headers': { - topic: function(clm) { - var ml = new MockLogger(); - ml.level = levels.INFO; - var cl = clm.connectLogger(ml, ':req[Content-Type]'); - request( - cl, - 'GET', 'http://blah', 200, - { 'Content-Type': 'application/json' } - ); - return ml.messages; - }, - 'should output the request header': function(messages) { - assert.equal(messages[0].message, 'application/json'); - } - }, - - 'format that includes response headers': { - topic: function(clm) { - var ml = new MockLogger(); - ml.level = levels.INFO; - var cl = clm.connectLogger(ml, ':res[Content-Type]'); - request( - cl, - 'GET', 'http://blah', 200, - null, - { 'Content-Type': 'application/cheese' } - ); - return ml.messages; - }, - - 'should output the response header': function(messages) { - assert.equal(messages[0].message, 'application/cheese'); - } - } - - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/consoleAppender-test.js b/node_modules/karma/node_modules/log4js/test/consoleAppender-test.js deleted file mode 100644 index 3887ce5a..00000000 --- a/node_modules/karma/node_modules/log4js/test/consoleAppender-test.js +++ /dev/null @@ -1,33 +0,0 @@ -"use strict"; -var assert = require('assert') -, vows = require('vows') -, layouts = require('../lib/layouts') -, sandbox = require('sandboxed-module'); - -vows.describe('../lib/appenders/console').addBatch({ - 'appender': { - topic: function() { - var messages = [] - , fakeConsole = { - log: function(msg) { messages.push(msg); } - } - , appenderModule = sandbox.require( - '../lib/appenders/console', - { - globals: { - 'console': fakeConsole - } - } - ) - , appender = appenderModule.appender(layouts.messagePassThroughLayout); - - appender({ data: ["blah"] }); - return messages; - }, - - 'should output to console': function(messages) { - assert.equal(messages[0], 'blah'); - } - } - -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/date-file-test b/node_modules/karma/node_modules/log4js/test/date-file-test deleted file mode 100644 index e2346dc5..00000000 --- a/node_modules/karma/node_modules/log4js/test/date-file-test +++ /dev/null @@ -1 +0,0 @@ -this should be written to the file with the appended date diff --git a/node_modules/karma/node_modules/log4js/test/dateFileAppender-test.js b/node_modules/karma/node_modules/log4js/test/dateFileAppender-test.js deleted file mode 100644 index 59355e21..00000000 --- a/node_modules/karma/node_modules/log4js/test/dateFileAppender-test.js +++ /dev/null @@ -1,218 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, path = require('path') -, fs = require('fs') -, sandbox = require('sandboxed-module') -, log4js = require('../lib/log4js'); - -function removeFile(filename) { - return function() { - fs.unlink(path.join(__dirname, filename), function(err) { - if (err) { - console.log("Could not delete ", filename, err); - } - }); - }; -} - -vows.describe('../lib/appenders/dateFile').addBatch({ - 'appender': { - 'adding multiple dateFileAppenders': { - topic: function () { - var listenersCount = process.listeners('exit').length, - dateFileAppender = require('../lib/appenders/dateFile'), - count = 5, - logfile; - - while (count--) { - logfile = path.join(__dirname, 'datefa-default-test' + count + '.log'); - log4js.addAppender(dateFileAppender.appender(logfile)); - } - - return listenersCount; - }, - teardown: function() { - removeFile('datefa-default-test0.log')(); - removeFile('datefa-default-test1.log')(); - removeFile('datefa-default-test2.log')(); - removeFile('datefa-default-test3.log')(); - removeFile('datefa-default-test4.log')(); - }, - - 'should only add one `exit` listener': function (initialCount) { - assert.equal(process.listeners('exit').length, initialCount + 1); - }, - - }, - - 'exit listener': { - topic: function() { - var exitListener - , openedFiles = [] - , dateFileAppender = sandbox.require( - '../lib/appenders/dateFile', - { - globals: { - process: { - on: function(evt, listener) { - exitListener = listener; - } - } - }, - requires: { - '../streams': { - DateRollingFileStream: function(filename) { - openedFiles.push(filename); - - this.end = function() { - openedFiles.shift(); - }; - } - } - } - } - ); - for (var i=0; i < 5; i += 1) { - dateFileAppender.appender('test' + i); - } - assert.isNotEmpty(openedFiles); - exitListener(); - return openedFiles; - }, - 'should close all open files': function(openedFiles) { - assert.isEmpty(openedFiles); - } - }, - - 'with default settings': { - topic: function() { - var that = this, - testFile = path.join(__dirname, 'date-appender-default.log'), - appender = require('../lib/appenders/dateFile').appender(testFile), - logger = log4js.getLogger('default-settings'); - log4js.clearAppenders(); - log4js.addAppender(appender, 'default-settings'); - - logger.info("This should be in the file."); - - setTimeout(function() { - fs.readFile(testFile, "utf8", that.callback); - }, 100); - - }, - teardown: removeFile('date-appender-default.log'), - - 'should write to the file': function(contents) { - assert.include(contents, 'This should be in the file'); - }, - - 'should use the basic layout': function(contents) { - assert.match( - contents, - /\[\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{3}\] \[INFO\] default-settings - / - ); - } - } - - } -}).addBatch({ - 'configure': { - 'with dateFileAppender': { - topic: function() { - var log4js = require('../lib/log4js') - , logger; - //this config file defines one file appender (to ./date-file-test.log) - //and sets the log level for "tests" to WARN - log4js.configure('test/with-dateFile.json'); - logger = log4js.getLogger('tests'); - logger.info('this should not be written to the file'); - logger.warn('this should be written to the file'); - - fs.readFile(path.join(__dirname, 'date-file-test.log'), 'utf8', this.callback); - }, - teardown: removeFile('date-file-test.log'), - - 'should load appender configuration from a json file': function(err, contents) { - assert.include(contents, 'this should be written to the file' + require('os').EOL); - assert.equal(contents.indexOf('this should not be written to the file'), -1); - } - }, - 'with options.alwaysIncludePattern': { - topic: function() { - var self = this - , log4js = require('../lib/log4js') - , format = require('../lib/date_format') - , logger - , options = { - "appenders": [ - { - "category": "tests", - "type": "dateFile", - "filename": "test/date-file-test", - "pattern": "-from-MM-dd.log", - "alwaysIncludePattern": true, - "layout": { - "type": "messagePassThrough" - } - } - ] - } - , thisTime = format.asString(options.appenders[0].pattern, new Date()); - fs.writeFileSync( - path.join(__dirname, 'date-file-test' + thisTime), - "this is existing data" + require('os').EOL, - 'utf8' - ); - log4js.clearAppenders(); - log4js.configure(options); - logger = log4js.getLogger('tests'); - logger.warn('this should be written to the file with the appended date'); - this.teardown = removeFile('date-file-test' + thisTime); - //wait for filesystem to catch up - setTimeout(function() { - fs.readFile(path.join(__dirname, 'date-file-test' + thisTime), 'utf8', self.callback); - }, 100); - }, - 'should create file with the correct pattern': function(contents) { - assert.include(contents, 'this should be written to the file with the appended date'); - }, - 'should not overwrite the file on open (bug found in issue #132)': function(contents) { - assert.include(contents, 'this is existing data'); - } - }, - 'with cwd option': { - topic: function() { - var fileOpened, - appender = sandbox.require( - '../lib/appenders/dateFile', - { requires: - { '../streams': - { DateRollingFileStream: - function(file) { - fileOpened = file; - return { - on: function() {}, - end: function() {} - }; - } - } - } - } - ); - appender.configure( - { - filename: "whatever.log", - maxLogSize: 10 - }, - { cwd: '/absolute/path/to' } - ); - return fileOpened; - }, - 'should prepend options.cwd to config.filename': function(fileOpened) { - assert.equal(fileOpened, "/absolute/path/to/whatever.log"); - } - } - - } -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/date_format-test.js b/node_modules/karma/node_modules/log4js/test/date_format-test.js deleted file mode 100644 index 60858431..00000000 --- a/node_modules/karma/node_modules/log4js/test/date_format-test.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, dateFormat = require('../lib/date_format'); - -vows.describe('date_format').addBatch({ - 'Date extensions': { - topic: function() { - return new Date(2010, 0, 11, 14, 31, 30, 5); - }, - 'should format a date as string using a pattern': function(date) { - assert.equal( - dateFormat.asString(dateFormat.DATETIME_FORMAT, date), - "11 01 2010 14:31:30.005" - ); - }, - 'should default to the ISO8601 format': function(date) { - assert.equal( - dateFormat.asString(date), - '2010-01-11 14:31:30.005' - ); - }, - 'should provide a ISO8601 with timezone offset format': function(date) { - date.getTimezoneOffset = function() { return -660; }; - assert.equal( - dateFormat.asString(dateFormat.ISO8601_WITH_TZ_OFFSET_FORMAT, date), - "2010-01-11T14:31:30+1100" - ); - - date.getTimezoneOffset = function() { return 120; }; - assert.equal( - dateFormat.asString(dateFormat.ISO8601_WITH_TZ_OFFSET_FORMAT, date), - "2010-01-11T14:31:30-0200" - ); - - }, - 'should provide a just-the-time format': function(date) { - assert.equal( - dateFormat.asString(dateFormat.ABSOLUTETIME_FORMAT, date), - '14:31:30.005' - ); - }, - 'should provide a custom format': function(date) { - date.getTimezoneOffset = function() { return 120; }; - assert.equal( - dateFormat.asString("O.SSS.ss.mm.hh.dd.MM.yy", date), - '-0200.005.30.31.14.11.01.10' - ); - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/debug-test.js b/node_modules/karma/node_modules/log4js/test/debug-test.js deleted file mode 100644 index 92dd915b..00000000 --- a/node_modules/karma/node_modules/log4js/test/debug-test.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, sandbox = require('sandboxed-module') -, fakeConsole = { - error: function(format, label, message) { - this.logged = [ format, label, message ]; - } -} -, globals = function(debugValue) { - return { - process: { - env: { - 'NODE_DEBUG': debugValue - } - }, - console: fakeConsole - }; -}; - -vows.describe('../lib/debug').addBatch({ - 'when NODE_DEBUG is set to log4js': { - topic: function() { - var debug = sandbox.require( - '../lib/debug', - { 'globals': globals('log4js') } - ); - - fakeConsole.logged = []; - debug('cheese')('biscuits'); - return fakeConsole.logged; - }, - 'it should log to console.error': function(logged) { - assert.equal(logged[0], 'LOG4JS: (%s) %s'); - assert.equal(logged[1], 'cheese'); - assert.equal(logged[2], 'biscuits'); - } - }, - - 'when NODE_DEBUG is set to not log4js': { - topic: function() { - var debug = sandbox.require( - '../lib/debug', - { globals: globals('other_module') } - ); - - fakeConsole.logged = []; - debug('cheese')('biscuits'); - return fakeConsole.logged; - }, - 'it should not log to console.error': function(logged) { - assert.equal(logged.length, 0); - } - }, - - 'when NODE_DEBUG is not set': { - topic: function() { - var debug = sandbox.require( - '../lib/debug', - { globals: globals(null) } - ); - - fakeConsole.logged = []; - debug('cheese')('biscuits'); - return fakeConsole.logged; - }, - 'it should not log to console.error': function(logged) { - assert.equal(logged.length, 0); - } - } - -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/fileAppender-test.js b/node_modules/karma/node_modules/log4js/test/fileAppender-test.js deleted file mode 100644 index 9476ad65..00000000 --- a/node_modules/karma/node_modules/log4js/test/fileAppender-test.js +++ /dev/null @@ -1,280 +0,0 @@ -"use strict"; -var vows = require('vows') -, fs = require('fs') -, path = require('path') -, sandbox = require('sandboxed-module') -, log4js = require('../lib/log4js') -, assert = require('assert'); - -log4js.clearAppenders(); - -function remove(filename) { - try { - fs.unlinkSync(filename); - } catch (e) { - //doesn't really matter if it failed - } -} - -vows.describe('log4js fileAppender').addBatch({ - 'adding multiple fileAppenders': { - topic: function () { - var listenersCount = process.listeners('exit').length - , logger = log4js.getLogger('default-settings') - , count = 5, logfile; - - while (count--) { - logfile = path.join(__dirname, '/fa-default-test' + count + '.log'); - log4js.addAppender(require('../lib/appenders/file').appender(logfile), 'default-settings'); - } - - return listenersCount; - }, - - 'does not add more than one `exit` listeners': function (initialCount) { - assert.ok(process.listeners('exit').length <= initialCount + 1); - } - }, - - 'exit listener': { - topic: function() { - var exitListener - , openedFiles = [] - , fileAppender = sandbox.require( - '../lib/appenders/file', - { - globals: { - process: { - on: function(evt, listener) { - exitListener = listener; - } - } - }, - requires: { - '../streams': { - RollingFileStream: function(filename) { - openedFiles.push(filename); - - this.end = function() { - openedFiles.shift(); - }; - - this.on = function() {}; - } - } - } - } - ); - for (var i=0; i < 5; i += 1) { - fileAppender.appender('test' + i, null, 100); - } - assert.isNotEmpty(openedFiles); - exitListener(); - return openedFiles; - }, - 'should close all open files': function(openedFiles) { - assert.isEmpty(openedFiles); - } - }, - - 'with default fileAppender settings': { - topic: function() { - var that = this - , testFile = path.join(__dirname, '/fa-default-test.log') - , logger = log4js.getLogger('default-settings'); - remove(testFile); - - log4js.clearAppenders(); - log4js.addAppender(require('../lib/appenders/file').appender(testFile), 'default-settings'); - - logger.info("This should be in the file."); - - setTimeout(function() { - fs.readFile(testFile, "utf8", that.callback); - }, 100); - }, - 'should write log messages to the file': function(err, fileContents) { - assert.include(fileContents, "This should be in the file.\n"); - }, - 'log messages should be in the basic layout format': function(err, fileContents) { - assert.match( - fileContents, - /\[\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}\.\d{3}\] \[INFO\] default-settings - / - ); - } - }, - 'with a max file size and no backups': { - topic: function() { - var testFile = path.join(__dirname, '/fa-maxFileSize-test.log') - , logger = log4js.getLogger('max-file-size') - , that = this; - remove(testFile); - remove(testFile + '.1'); - //log file of 100 bytes maximum, no backups - log4js.clearAppenders(); - log4js.addAppender( - require('../lib/appenders/file').appender(testFile, log4js.layouts.basicLayout, 100, 0), - 'max-file-size' - ); - logger.info("This is the first log message."); - logger.info("This is an intermediate log message."); - logger.info("This is the second log message."); - //wait for the file system to catch up - setTimeout(function() { - fs.readFile(testFile, "utf8", that.callback); - }, 100); - }, - 'log file should only contain the second message': function(err, fileContents) { - assert.include(fileContents, "This is the second log message.\n"); - assert.equal(fileContents.indexOf("This is the first log message."), -1); - }, - 'the number of files': { - topic: function() { - fs.readdir(__dirname, this.callback); - }, - 'starting with the test file name should be two': function(err, files) { - //there will always be one backup if you've specified a max log size - var logFiles = files.filter( - function(file) { return file.indexOf('fa-maxFileSize-test.log') > -1; } - ); - assert.equal(logFiles.length, 2); - } - } - }, - 'with a max file size and 2 backups': { - topic: function() { - var testFile = path.join(__dirname, '/fa-maxFileSize-with-backups-test.log') - , logger = log4js.getLogger('max-file-size-backups'); - remove(testFile); - remove(testFile+'.1'); - remove(testFile+'.2'); - - //log file of 50 bytes maximum, 2 backups - log4js.clearAppenders(); - log4js.addAppender( - require('../lib/appenders/file').appender(testFile, log4js.layouts.basicLayout, 50, 2), - 'max-file-size-backups' - ); - logger.info("This is the first log message."); - logger.info("This is the second log message."); - logger.info("This is the third log message."); - logger.info("This is the fourth log message."); - var that = this; - //give the system a chance to open the stream - setTimeout(function() { - fs.readdir(__dirname, function(err, files) { - if (files) { - that.callback(null, files.sort()); - } else { - that.callback(err, files); - } - }); - }, 200); - }, - 'the log files': { - topic: function(files) { - var logFiles = files.filter( - function(file) { return file.indexOf('fa-maxFileSize-with-backups-test.log') > -1; } - ); - return logFiles; - }, - 'should be 3': function (files) { - assert.equal(files.length, 3); - }, - 'should be named in sequence': function (files) { - assert.deepEqual(files, [ - 'fa-maxFileSize-with-backups-test.log', - 'fa-maxFileSize-with-backups-test.log.1', - 'fa-maxFileSize-with-backups-test.log.2' - ]); - }, - 'and the contents of the first file': { - topic: function(logFiles) { - fs.readFile(path.join(__dirname, logFiles[0]), "utf8", this.callback); - }, - 'should be the last log message': function(contents) { - assert.include(contents, 'This is the fourth log message.'); - } - }, - 'and the contents of the second file': { - topic: function(logFiles) { - fs.readFile(path.join(__dirname, logFiles[1]), "utf8", this.callback); - }, - 'should be the third log message': function(contents) { - assert.include(contents, 'This is the third log message.'); - } - }, - 'and the contents of the third file': { - topic: function(logFiles) { - fs.readFile(path.join(__dirname, logFiles[2]), "utf8", this.callback); - }, - 'should be the second log message': function(contents) { - assert.include(contents, 'This is the second log message.'); - } - } - } - } -}).addBatch({ - 'configure' : { - 'with fileAppender': { - topic: function() { - var log4js = require('../lib/log4js') - , logger; - //this config file defines one file appender (to ./tmp-tests.log) - //and sets the log level for "tests" to WARN - log4js.configure('./test/log4js.json'); - logger = log4js.getLogger('tests'); - logger.info('this should not be written to the file'); - logger.warn('this should be written to the file'); - - fs.readFile('tmp-tests.log', 'utf8', this.callback); - }, - 'should load appender configuration from a json file': function(err, contents) { - assert.include(contents, 'this should be written to the file\n'); - assert.equal(contents.indexOf('this should not be written to the file'), -1); - } - } - } -}).addBatch({ - 'when underlying stream errors': { - topic: function() { - var consoleArgs - , errorHandler - , fileAppender = sandbox.require( - '../lib/appenders/file', - { - globals: { - console: { - error: function() { - consoleArgs = Array.prototype.slice.call(arguments); - } - } - }, - requires: { - '../streams': { - RollingFileStream: function(filename) { - - this.end = function() {}; - this.on = function(evt, cb) { - if (evt === 'error') { - errorHandler = cb; - } - }; - } - } - } - } - ); - fileAppender.appender('test1.log', null, 100); - errorHandler({ error: 'aargh' }); - return consoleArgs; - }, - 'should log the error to console.error': function(consoleArgs) { - assert.isNotEmpty(consoleArgs); - assert.equal(consoleArgs[0], 'log4js.fileAppender - Writing to file %s, error happened '); - assert.equal(consoleArgs[1], 'test1.log'); - assert.equal(consoleArgs[2].error, 'aargh'); - } - } - -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/gelfAppender-test.js b/node_modules/karma/node_modules/log4js/test/gelfAppender-test.js deleted file mode 100644 index 4a1ff58b..00000000 --- a/node_modules/karma/node_modules/log4js/test/gelfAppender-test.js +++ /dev/null @@ -1,259 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, sandbox = require('sandboxed-module') -, log4js = require('../lib/log4js') -, realLayouts = require('../lib/layouts') -, setupLogging = function(options, category, compressedLength) { - var fakeDgram = { - sent: false, - socket: { - packetLength: 0, - closed: false, - close: function() { - this.closed = true; - }, - send: function(pkt, offset, pktLength, port, host) { - fakeDgram.sent = true; - this.packet = pkt; - this.offset = offset; - this.packetLength = pktLength; - this.port = port; - this.host = host; - } - }, - createSocket: function(type) { - this.type = type; - return this.socket; - } - } - , fakeZlib = { - gzip: function(objectToCompress, callback) { - fakeZlib.uncompressed = objectToCompress; - if (this.shouldError) { - callback({ stack: "oh noes" }); - return; - } - - if (compressedLength) { - callback(null, { length: compressedLength }); - } else { - callback(null, "I've been compressed"); - } - } - } - , exitHandler - , fakeConsole = { - error: function(message) { - this.message = message; - } - } - , fakeLayouts = { - layout: function(type, options) { - this.type = type; - this.options = options; - return realLayouts.messagePassThroughLayout; - }, - messagePassThroughLayout: realLayouts.messagePassThroughLayout - } - , appender = sandbox.require('../lib/appenders/gelf', { - requires: { - dgram: fakeDgram, - zlib: fakeZlib, - '../layouts': fakeLayouts - }, - globals: { - process: { - on: function(evt, handler) { - if (evt === 'exit') { - exitHandler = handler; - } - } - }, - console: fakeConsole - } - }); - - log4js.clearAppenders(); - log4js.addAppender(appender.configure(options || {}), category || "gelf-test"); - return { - dgram: fakeDgram, - compress: fakeZlib, - exitHandler: exitHandler, - console: fakeConsole, - layouts: fakeLayouts, - logger: log4js.getLogger(category || "gelf-test") - }; -}; - -vows.describe('log4js gelfAppender').addBatch({ - - 'with default gelfAppender settings': { - topic: function() { - var setup = setupLogging(); - setup.logger.info("This is a test"); - return setup; - }, - 'the dgram packet': { - topic: function(setup) { - return setup.dgram; - }, - 'should be sent via udp to the localhost gelf server': function(dgram) { - assert.equal(dgram.type, "udp4"); - assert.equal(dgram.socket.host, "localhost"); - assert.equal(dgram.socket.port, 12201); - assert.equal(dgram.socket.offset, 0); - assert.ok(dgram.socket.packetLength > 0, "Received blank message"); - }, - 'should be compressed': function(dgram) { - assert.equal(dgram.socket.packet, "I've been compressed"); - } - }, - 'the uncompressed log message': { - topic: function(setup) { - var message = JSON.parse(setup.compress.uncompressed); - return message; - }, - 'should be in the gelf format': function(message) { - assert.equal(message.version, '1.0'); - assert.equal(message.host, require('os').hostname()); - assert.equal(message.level, 6); //INFO - assert.equal(message.facility, 'nodejs-server'); - assert.equal(message.full_message, message.short_message); - assert.equal(message.full_message, 'This is a test'); - } - } - }, - 'with a message longer than 8k': { - topic: function() { - var setup = setupLogging(undefined, undefined, 10240); - setup.logger.info("Blah."); - return setup; - }, - 'the dgram packet': { - topic: function(setup) { - return setup.dgram; - }, - 'should not be sent': function(dgram) { - assert.equal(dgram.sent, false); - } - } - }, - 'with non-default options': { - topic: function() { - var setup = setupLogging({ - host: 'somewhere', - port: 12345, - hostname: 'cheese', - facility: 'nonsense' - }); - setup.logger.debug("Just testing."); - return setup; - }, - 'the dgram packet': { - topic: function(setup) { - return setup.dgram; - }, - 'should pick up the options': function(dgram) { - assert.equal(dgram.socket.host, 'somewhere'); - assert.equal(dgram.socket.port, 12345); - } - }, - 'the uncompressed packet': { - topic: function(setup) { - var message = JSON.parse(setup.compress.uncompressed); - return message; - }, - 'should pick up the options': function(message) { - assert.equal(message.host, 'cheese'); - assert.equal(message.facility, 'nonsense'); - } - } - }, - - 'on process.exit': { - topic: function() { - var setup = setupLogging(); - setup.exitHandler(); - return setup; - }, - 'should close open sockets': function(setup) { - assert.isTrue(setup.dgram.socket.closed); - } - }, - - 'on zlib error': { - topic: function() { - var setup = setupLogging(); - setup.compress.shouldError = true; - setup.logger.info('whatever'); - return setup; - }, - 'should output to console.error': function(setup) { - assert.equal(setup.console.message, 'oh noes'); - } - }, - - 'with layout in configuration': { - topic: function() { - var setup = setupLogging({ - layout: { - type: 'madeuplayout', - earlgrey: 'yes, please' - } - }); - return setup; - }, - 'should pass options to layout': function(setup) { - assert.equal(setup.layouts.type, 'madeuplayout'); - assert.equal(setup.layouts.options.earlgrey, 'yes, please'); - } - }, - - 'with custom fields options': { - topic: function() { - var setup = setupLogging({ - host: 'somewhere', - port: 12345, - hostname: 'cheese', - facility: 'nonsense', - customFields: { - _every1: 'Hello every one', - _every2: 'Hello every two' - } - }); - var myFields = { - GELF: true, - _every2: 'Overwritten!', - _myField: 'This is my field!' - }; - setup.logger.debug(myFields, "Just testing."); - return setup; - }, - 'the dgram packet': { - topic: function(setup) { - return setup.dgram; - }, - 'should pick up the options': function(dgram) { - assert.equal(dgram.socket.host, 'somewhere'); - assert.equal(dgram.socket.port, 12345); - } - }, - 'the uncompressed packet': { - topic: function(setup) { - var message = JSON.parse(setup.compress.uncompressed); - return message; - }, - 'should pick up the options': function(message) { - assert.equal(message.host, 'cheese'); - assert.equal(message.facility, 'nonsense'); - assert.equal(message._every1, 'Hello every one'); // the default value - assert.equal(message._every2, 'Overwritten!'); // the overwritten value - assert.equal(message._myField, 'This is my field!'); // the value for this message only - assert.equal(message.short_message, 'Just testing.'); // skip the field object - assert.equal(message.full_message, 'Just testing.'); // should be as same as short_message - } - } - } - -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/global-log-level-test.js b/node_modules/karma/node_modules/log4js/test/global-log-level-test.js deleted file mode 100644 index df9b3598..00000000 --- a/node_modules/karma/node_modules/log4js/test/global-log-level-test.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert'); - -vows.describe('log4js global loglevel').addBatch({ - 'global loglevel' : { - topic: function() { - var log4js = require('../lib/log4js'); - return log4js; - }, - - 'set global loglevel on creation': function(log4js) { - var log1 = log4js.getLogger('log1'); - var level = 'OFF'; - if (log1.level.toString() == level) { - level = 'TRACE'; - } - assert.notEqual(log1.level.toString(), level); - - log4js.setGlobalLogLevel(level); - assert.equal(log1.level.toString(), level); - - var log2 = log4js.getLogger('log2'); - assert.equal(log2.level.toString(), level); - }, - - 'global change loglevel': function(log4js) { - var log1 = log4js.getLogger('log1'); - var log2 = log4js.getLogger('log2'); - var level = 'OFF'; - if (log1.level.toString() == level) { - level = 'TRACE'; - } - assert.notEqual(log1.level.toString(), level); - - log4js.setGlobalLogLevel(level); - assert.equal(log1.level.toString(), level); - assert.equal(log2.level.toString(), level); - }, - - 'override loglevel': function(log4js) { - var log1 = log4js.getLogger('log1'); - var log2 = log4js.getLogger('log2'); - var level = 'OFF'; - if (log1.level.toString() == level) { - level = 'TRACE'; - } - assert.notEqual(log1.level.toString(), level); - - var oldLevel = log1.level.toString(); - assert.equal(log2.level.toString(), oldLevel); - - log2.setLevel(level); - assert.equal(log1.level.toString(), oldLevel); - assert.equal(log2.level.toString(), level); - assert.notEqual(oldLevel, level); - - log2.removeLevel(); - assert.equal(log1.level.toString(), oldLevel); - assert.equal(log2.level.toString(), oldLevel); - }, - - 'preload loglevel': function(log4js) { - var log1 = log4js.getLogger('log1'); - var level = 'OFF'; - if (log1.level.toString() == level) { - level = 'TRACE'; - } - assert.notEqual(log1.level.toString(), level); - - var oldLevel = log1.level.toString(); - log4js.getLogger('log2').setLevel(level); - - assert.equal(log1.level.toString(), oldLevel); - - // get again same logger but as different variable - var log2 = log4js.getLogger('log2'); - assert.equal(log2.level.toString(), level); - assert.notEqual(oldLevel, level); - - log2.removeLevel(); - assert.equal(log1.level.toString(), oldLevel); - assert.equal(log2.level.toString(), oldLevel); - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/hookioAppender-test.js b/node_modules/karma/node_modules/log4js/test/hookioAppender-test.js deleted file mode 100644 index d1c00afd..00000000 --- a/node_modules/karma/node_modules/log4js/test/hookioAppender-test.js +++ /dev/null @@ -1,176 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, sandbox = require('sandboxed-module'); - -function fancyResultingHookioAppender(hookNotReady) { - var emitHook = !hookNotReady - , result = { ons: {}, emissions: {}, logged: [], configs: [] }; - - var fakeLog4Js = { - appenderMakers: {} - }; - fakeLog4Js.loadAppender = function (appender) { - fakeLog4Js.appenderMakers[appender] = function (config) { - result.actualLoggerConfig = config; - return function log(logEvent) { - result.logged.push(logEvent); - }; - }; - }; - - var fakeHookIo = { Hook: function(config) { result.configs.push(config); } }; - fakeHookIo.Hook.prototype.start = function () { - result.startCalled = true; - }; - fakeHookIo.Hook.prototype.on = function (eventName, functionToExec) { - result.ons[eventName] = { functionToExec: functionToExec }; - if (emitHook && eventName === 'hook::ready') { - functionToExec(); - } - }; - fakeHookIo.Hook.prototype.emit = function (eventName, data) { - result.emissions[eventName] = result.emissions[eventName] || []; - result.emissions[eventName].push({data: data}); - var on = '*::' + eventName; - if (eventName !== 'hook::ready' && result.ons[on]) { - result.ons[on].callingCount = - result.ons[on].callingCount ? result.ons[on].callingCount += 1 : 1; - result.ons[on].functionToExec(data); - } - }; - - return { theResult: result, - theModule: sandbox.require('../lib/appenders/hookio', { - requires: { - '../log4js': fakeLog4Js, - 'hook.io': fakeHookIo - } - }) - }; -} - - -vows.describe('log4js hookioAppender').addBatch({ - 'master': { - topic: function() { - var fancy = fancyResultingHookioAppender(); - var logger = fancy.theModule.configure( - { - name: 'ohno', - mode: 'master', - 'hook-port': 5001, - appender: { type: 'file' } - } - ); - logger( - { - level: { levelStr: 'INFO' }, - data: "ALRIGHTY THEN", - startTime: '2011-10-27T03:53:16.031Z' - } - ); - logger( - { - level: { levelStr: 'DEBUG' }, - data: "OH WOW", - startTime: '2011-10-27T04:53:16.031Z' - } - ); - return fancy.theResult; - }, - - 'should write to the actual appender': function (result) { - assert.isTrue(result.startCalled); - assert.equal(result.configs.length, 1); - assert.equal(result.configs[0]['hook-port'], 5001); - assert.equal(result.logged.length, 2); - assert.equal(result.emissions['ohno::log'].length, 2); - assert.equal(result.ons['*::ohno::log'].callingCount, 2); - }, - - 'data written should be formatted correctly': function (result) { - assert.equal(result.logged[0].level.toString(), 'INFO'); - assert.equal(result.logged[0].data, 'ALRIGHTY THEN'); - assert.isTrue(typeof(result.logged[0].startTime) === 'object'); - assert.equal(result.logged[1].level.toString(), 'DEBUG'); - assert.equal(result.logged[1].data, 'OH WOW'); - assert.isTrue(typeof(result.logged[1].startTime) === 'object'); - }, - - 'the actual logger should get the right config': function (result) { - assert.equal(result.actualLoggerConfig.type, 'file'); - } - }, - 'worker': { - 'should emit logging events to the master': { - topic: function() { - var fancy = fancyResultingHookioAppender(); - var logger = fancy.theModule.configure({ - name: 'ohno', - mode: 'worker', - appender: { type: 'file' } - }); - logger({ - level: { levelStr: 'INFO' }, - data: "ALRIGHTY THEN", - startTime: '2011-10-27T03:53:16.031Z' - }); - logger({ - level: { levelStr: 'DEBUG' }, - data: "OH WOW", - startTime: '2011-10-27T04:53:16.031Z' - }); - return fancy.theResult; - }, - - 'should not write to the actual appender': function (result) { - assert.isTrue(result.startCalled); - assert.equal(result.logged.length, 0); - assert.equal(result.emissions['ohno::log'].length, 2); - assert.isUndefined(result.ons['*::ohno::log']); - } - } - }, - 'when hook not ready': { - topic: function() { - var fancy = fancyResultingHookioAppender(true) - , logger = fancy.theModule.configure({ - name: 'ohno', - mode: 'worker' - }); - - logger({ - level: { levelStr: 'INFO' }, - data: "something", - startTime: '2011-10-27T03:45:12.031Z' - }); - return fancy; - }, - 'should buffer the log events': function(fancy) { - assert.isUndefined(fancy.theResult.emissions['ohno::log']); - }, - }, - 'when hook ready': { - topic: function() { - var fancy = fancyResultingHookioAppender(true) - , logger = fancy.theModule.configure({ - name: 'ohno', - mode: 'worker' - }); - - logger({ - level: { levelStr: 'INFO' }, - data: "something", - startTime: '2011-10-27T03:45:12.031Z' - }); - - fancy.theResult.ons['hook::ready'].functionToExec(); - return fancy; - }, - 'should emit the buffered events': function(fancy) { - assert.equal(fancy.theResult.emissions['ohno::log'].length, 1); - } - } - -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/layouts-test.js b/node_modules/karma/node_modules/log4js/test/layouts-test.js deleted file mode 100644 index c355bdd9..00000000 --- a/node_modules/karma/node_modules/log4js/test/layouts-test.js +++ /dev/null @@ -1,296 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert'); - -//used for patternLayout tests. -function test(args, pattern, value) { - var layout = args[0] - , event = args[1] - , tokens = args[2]; - - assert.equal(layout(pattern, tokens)(event), value); -} - -vows.describe('log4js layouts').addBatch({ - 'colouredLayout': { - topic: function() { - return require('../lib/layouts').colouredLayout; - }, - - 'should apply level colour codes to output': function(layout) { - var output = layout({ - data: ["nonsense"], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "cheese", - level: { - toString: function() { return "ERROR"; } - } - }); - assert.equal(output, '\x1B[31m[2010-12-05 14:18:30.045] [ERROR] cheese - \x1B[39mnonsense'); - }, - 'should support the console.log format for the message': function(layout) { - var output = layout({ - data: ["thing %d", 2], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "cheese", - level: { - toString: function() { return "ERROR"; } - } - }); - assert.equal(output, '\x1B[31m[2010-12-05 14:18:30.045] [ERROR] cheese - \x1B[39mthing 2'); - } - }, - - 'messagePassThroughLayout': { - topic: function() { - return require('../lib/layouts').messagePassThroughLayout; - }, - 'should take a logevent and output only the message' : function(layout) { - assert.equal(layout({ - data: ["nonsense"], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "cheese", - level: { - colour: "green", - toString: function() { return "ERROR"; } - } - }), "nonsense"); - }, - 'should support the console.log format for the message' : function(layout) { - assert.equal(layout({ - data: ["thing %d", 1, "cheese"], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "cheese", - level : { - colour: "green", - toString: function() { return "ERROR"; } - } - }), "thing 1 cheese"); - }, - 'should output the first item even if it is not a string': function(layout) { - assert.equal(layout({ - data: [ { thing: 1} ], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "cheese", - level: { - colour: "green", - toString: function() { return "ERROR"; } - } - }), "{ thing: 1 }"); - }, - 'should print the stacks of a passed error objects': function(layout) { - assert.isArray(layout({ - data: [ new Error() ], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "cheese", - level: { - colour: "green", - toString: function() { return "ERROR"; } - } - }).match(/Error\s+at Object\..*\s+\((.*)test[\\\/]layouts-test\.js\:\d+\:\d+\)\s+at runTest/) - , 'regexp did not return a match'); - }, - 'with passed augmented errors': { - topic: function(layout){ - var e = new Error("My Unique Error Message"); - e.augmented = "My Unique attribute value"; - e.augObj = { at1: "at2" }; - return layout({ - data: [ e ], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "cheese", - level: { - colour: "green", - toString: function() { return "ERROR"; } - } - }); - }, - 'should print error the contained error message': function(layoutOutput) { - var m = layoutOutput.match(/\{ \[Error: My Unique Error Message\]/); - assert.isArray(m); - }, - 'should print error augmented string attributes': function(layoutOutput) { - var m = layoutOutput.match(/augmented:\s'My Unique attribute value'/); - assert.isArray(m); - }, - 'should print error augmented object attributes': function(layoutOutput) { - var m = layoutOutput.match(/augObj:\s\{ at1: 'at2' \}/); - assert.isArray(m); - } - } - - - }, - - 'basicLayout': { - topic: function() { - var layout = require('../lib/layouts').basicLayout, - event = { - data: ['this is a test'], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "tests", - level: { - toString: function() { return "DEBUG"; } - } - }; - return [layout, event]; - }, - 'should take a logevent and output a formatted string': function(args) { - var layout = args[0], event = args[1]; - assert.equal(layout(event), "[2010-12-05 14:18:30.045] [DEBUG] tests - this is a test"); - }, - 'should output a stacktrace, message if the event has an error attached': function(args) { - var layout = args[0], event = args[1], output, lines, - error = new Error("Some made-up error"), - stack = error.stack.split(/\n/); - - event.data = ['this is a test', error]; - output = layout(event); - lines = output.split(/\n/); - - assert.equal(lines.length - 1, stack.length); - assert.equal( - lines[0], - "[2010-12-05 14:18:30.045] [DEBUG] tests - this is a test [Error: Some made-up error]" - ); - - for (var i = 1; i < stack.length; i++) { - assert.equal(lines[i+2], stack[i+1]); - } - }, - 'should output any extra data in the log event as util.inspect strings': function(args) { - var layout = args[0], event = args[1], output, lines; - event.data = ['this is a test', { - name: 'Cheese', - message: 'Gorgonzola smells.' - }]; - output = layout(event); - assert.equal( - output, - "[2010-12-05 14:18:30.045] [DEBUG] tests - this is a test " + - "{ name: 'Cheese', message: 'Gorgonzola smells.' }" - ); - } - }, - - 'patternLayout': { - topic: function() { - var event = { - data: ['this is a test'], - startTime: new Date(2010, 11, 5, 14, 18, 30, 45), - categoryName: "multiple.levels.of.tests", - level: { - toString: function() { return "DEBUG"; } - } - }, layout = require('../lib/layouts').patternLayout - , tokens = { - testString: 'testStringToken', - testFunction: function() { return 'testFunctionToken'; }, - fnThatUsesLogEvent: function(logEvent) { return logEvent.level.toString(); } - }; - return [layout, event, tokens]; - }, - - 'should default to "time logLevel loggerName - message"': function(args) { - test(args, null, "14:18:30 DEBUG multiple.levels.of.tests - this is a test\n"); - }, - '%r should output time only': function(args) { - test(args, '%r', '14:18:30'); - }, - '%p should output the log level': function(args) { - test(args, '%p', 'DEBUG'); - }, - '%c should output the log category': function(args) { - test(args, '%c', 'multiple.levels.of.tests'); - }, - '%m should output the log data': function(args) { - test(args, '%m', 'this is a test'); - }, - '%n should output a new line': function(args) { - test(args, '%n', '\n'); - }, - '%h should output hostname' : function(args) { - test(args, '%h', require('os').hostname().toString()); - }, - '%c should handle category names like java-style package names': function(args) { - test(args, '%c{1}', 'tests'); - test(args, '%c{2}', 'of.tests'); - test(args, '%c{3}', 'levels.of.tests'); - test(args, '%c{4}', 'multiple.levels.of.tests'); - test(args, '%c{5}', 'multiple.levels.of.tests'); - test(args, '%c{99}', 'multiple.levels.of.tests'); - }, - '%d should output the date in ISO8601 format': function(args) { - test(args, '%d', '2010-12-05 14:18:30.045'); - }, - '%d should allow for format specification': function(args) { - test(args, '%d{ISO8601_WITH_TZ_OFFSET}', '2010-12-05T14:18:30-0000'); - test(args, '%d{ISO8601}', '2010-12-05 14:18:30.045'); - test(args, '%d{ABSOLUTE}', '14:18:30.045'); - test(args, '%d{DATE}', '05 12 2010 14:18:30.045'); - test(args, '%d{yy MM dd hh mm ss}', '10 12 05 14 18 30'); - test(args, '%d{yyyy MM dd}', '2010 12 05'); - test(args, '%d{yyyy MM dd hh mm ss SSS}', '2010 12 05 14 18 30 045'); - }, - '%% should output %': function(args) { - test(args, '%%', '%'); - }, - 'should output anything not preceded by % as literal': function(args) { - test(args, 'blah blah blah', 'blah blah blah'); - }, - 'should output the original string if no replacer matches the token': function(args) { - test(args, '%a{3}', 'a{3}'); - }, - 'should handle complicated patterns': function(args) { - test(args, - '%m%n %c{2} at %d{ABSOLUTE} cheese %p%n', - 'this is a test\n of.tests at 14:18:30.045 cheese DEBUG\n' - ); - }, - 'should truncate fields if specified': function(args) { - test(args, '%.4m', 'this'); - test(args, '%.7m', 'this is'); - test(args, '%.9m', 'this is a'); - test(args, '%.14m', 'this is a test'); - test(args, '%.2919102m', 'this is a test'); - }, - 'should pad fields if specified': function(args) { - test(args, '%10p', ' DEBUG'); - test(args, '%8p', ' DEBUG'); - test(args, '%6p', ' DEBUG'); - test(args, '%4p', 'DEBUG'); - test(args, '%-4p', 'DEBUG'); - test(args, '%-6p', 'DEBUG '); - test(args, '%-8p', 'DEBUG '); - test(args, '%-10p', 'DEBUG '); - }, - '%[%r%] should output colored time': function(args) { - test(args, '%[%r%]', '\x1B[36m14:18:30\x1B[39m'); - }, - '%x{testString} should output the string stored in tokens': function(args) { - test(args, '%x{testString}', 'testStringToken'); - }, - '%x{testFunction} should output the result of the function stored in tokens': function(args) { - test(args, '%x{testFunction}', 'testFunctionToken'); - }, - '%x{doesNotExist} should output the string stored in tokens': function(args) { - test(args, '%x{doesNotExist}', '%x{doesNotExist}'); - }, - '%x{fnThatUsesLogEvent} should be able to use the logEvent': function(args) { - test(args, '%x{fnThatUsesLogEvent}', 'DEBUG'); - }, - '%x should output the string stored in tokens': function(args) { - test(args, '%x', '%x'); - }, - }, - 'layout makers': { - topic: require('../lib/layouts'), - 'should have a maker for each layout': function(layouts) { - assert.ok(layouts.layout("messagePassThrough")); - assert.ok(layouts.layout("basic")); - assert.ok(layouts.layout("colored")); - assert.ok(layouts.layout("coloured")); - assert.ok(layouts.layout("pattern")); - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/levels-test.js b/node_modules/karma/node_modules/log4js/test/levels-test.js deleted file mode 100644 index 99dd1fcb..00000000 --- a/node_modules/karma/node_modules/log4js/test/levels-test.js +++ /dev/null @@ -1,404 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, levels = require('../lib/levels'); - -function assertThat(level) { - function assertForEach(assertion, test, otherLevels) { - otherLevels.forEach(function(other) { - assertion.call(assert, test.call(level, other)); - }); - } - - return { - isLessThanOrEqualTo: function(levels) { - assertForEach(assert.isTrue, level.isLessThanOrEqualTo, levels); - }, - isNotLessThanOrEqualTo: function(levels) { - assertForEach(assert.isFalse, level.isLessThanOrEqualTo, levels); - }, - isGreaterThanOrEqualTo: function(levels) { - assertForEach(assert.isTrue, level.isGreaterThanOrEqualTo, levels); - }, - isNotGreaterThanOrEqualTo: function(levels) { - assertForEach(assert.isFalse, level.isGreaterThanOrEqualTo, levels); - }, - isEqualTo: function(levels) { - assertForEach(assert.isTrue, level.isEqualTo, levels); - }, - isNotEqualTo: function(levels) { - assertForEach(assert.isFalse, level.isEqualTo, levels); - } - }; -} - -vows.describe('levels').addBatch({ - 'values': { - topic: levels, - 'should define some levels': function(levels) { - assert.isNotNull(levels.ALL); - assert.isNotNull(levels.TRACE); - assert.isNotNull(levels.DEBUG); - assert.isNotNull(levels.INFO); - assert.isNotNull(levels.WARN); - assert.isNotNull(levels.ERROR); - assert.isNotNull(levels.FATAL); - assert.isNotNull(levels.OFF); - }, - 'ALL': { - topic: levels.ALL, - 'should be less than the other levels': function(all) { - assertThat(all).isLessThanOrEqualTo( - [ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - }, - 'should be greater than no levels': function(all) { - assertThat(all).isNotGreaterThanOrEqualTo( - [ - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - }, - 'should only be equal to ALL': function(all) { - assertThat(all).isEqualTo([levels.toLevel("ALL")]); - assertThat(all).isNotEqualTo( - [ - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - } - }, - 'TRACE': { - topic: levels.TRACE, - 'should be less than DEBUG': function(trace) { - assertThat(trace).isLessThanOrEqualTo( - [ - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - assertThat(trace).isNotLessThanOrEqualTo([levels.ALL]); - }, - 'should be greater than ALL': function(trace) { - assertThat(trace).isGreaterThanOrEqualTo([levels.ALL, levels.TRACE]); - assertThat(trace).isNotGreaterThanOrEqualTo( - [ - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - }, - 'should only be equal to TRACE': function(trace) { - assertThat(trace).isEqualTo([levels.toLevel("TRACE")]); - assertThat(trace).isNotEqualTo( - [ - levels.ALL, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - } - }, - 'DEBUG': { - topic: levels.DEBUG, - 'should be less than INFO': function(debug) { - assertThat(debug).isLessThanOrEqualTo( - [ - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - assertThat(debug).isNotLessThanOrEqualTo([levels.ALL, levels.TRACE]); - }, - 'should be greater than TRACE': function(debug) { - assertThat(debug).isGreaterThanOrEqualTo([levels.ALL, levels.TRACE]); - assertThat(debug).isNotGreaterThanOrEqualTo( - [ - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - }, - 'should only be equal to DEBUG': function(trace) { - assertThat(trace).isEqualTo([levels.toLevel("DEBUG")]); - assertThat(trace).isNotEqualTo( - [ - levels.ALL, - levels.TRACE, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ] - ); - } - }, - 'INFO': { - topic: levels.INFO, - 'should be less than WARN': function(info) { - assertThat(info).isLessThanOrEqualTo([ - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ]); - assertThat(info).isNotLessThanOrEqualTo([levels.ALL, levels.TRACE, levels.DEBUG]); - }, - 'should be greater than DEBUG': function(info) { - assertThat(info).isGreaterThanOrEqualTo([levels.ALL, levels.TRACE, levels.DEBUG]); - assertThat(info).isNotGreaterThanOrEqualTo([ - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ]); - }, - 'should only be equal to INFO': function(trace) { - assertThat(trace).isEqualTo([levels.toLevel("INFO")]); - assertThat(trace).isNotEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.WARN, - levels.ERROR, - levels.FATAL, - levels.OFF - ]); - } - }, - 'WARN': { - topic: levels.WARN, - 'should be less than ERROR': function(warn) { - assertThat(warn).isLessThanOrEqualTo([levels.ERROR, levels.FATAL, levels.OFF]); - assertThat(warn).isNotLessThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO - ]); - }, - 'should be greater than INFO': function(warn) { - assertThat(warn).isGreaterThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO - ]); - assertThat(warn).isNotGreaterThanOrEqualTo([levels.ERROR, levels.FATAL, levels.OFF]); - }, - 'should only be equal to WARN': function(trace) { - assertThat(trace).isEqualTo([levels.toLevel("WARN")]); - assertThat(trace).isNotEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.ERROR, - levels.FATAL, - levels.OFF - ]); - } - }, - 'ERROR': { - topic: levels.ERROR, - 'should be less than FATAL': function(error) { - assertThat(error).isLessThanOrEqualTo([levels.FATAL, levels.OFF]); - assertThat(error).isNotLessThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN - ]); - }, - 'should be greater than WARN': function(error) { - assertThat(error).isGreaterThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN - ]); - assertThat(error).isNotGreaterThanOrEqualTo([levels.FATAL, levels.OFF]); - }, - 'should only be equal to ERROR': function(trace) { - assertThat(trace).isEqualTo([levels.toLevel("ERROR")]); - assertThat(trace).isNotEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.FATAL, - levels.OFF - ]); - } - }, - 'FATAL': { - topic: levels.FATAL, - 'should be less than OFF': function(fatal) { - assertThat(fatal).isLessThanOrEqualTo([levels.OFF]); - assertThat(fatal).isNotLessThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR - ]); - }, - 'should be greater than ERROR': function(fatal) { - assertThat(fatal).isGreaterThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR - ]); - assertThat(fatal).isNotGreaterThanOrEqualTo([levels.OFF]); - }, - 'should only be equal to FATAL': function(fatal) { - assertThat(fatal).isEqualTo([levels.toLevel("FATAL")]); - assertThat(fatal).isNotEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.OFF - ]); - } - }, - 'OFF': { - topic: levels.OFF, - 'should not be less than anything': function(off) { - assertThat(off).isNotLessThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL - ]); - }, - 'should be greater than everything': function(off) { - assertThat(off).isGreaterThanOrEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL - ]); - }, - 'should only be equal to OFF': function(off) { - assertThat(off).isEqualTo([levels.toLevel("OFF")]); - assertThat(off).isNotEqualTo([ - levels.ALL, - levels.TRACE, - levels.DEBUG, - levels.INFO, - levels.WARN, - levels.ERROR, - levels.FATAL - ]); - } - } - }, - 'isGreaterThanOrEqualTo': { - topic: levels.INFO, - 'should handle string arguments': function(info) { - assertThat(info).isGreaterThanOrEqualTo(["all", "trace", "debug"]); - assertThat(info).isNotGreaterThanOrEqualTo(['warn', 'ERROR', 'Fatal', 'off']); - } - }, - 'isLessThanOrEqualTo': { - topic: levels.INFO, - 'should handle string arguments': function(info) { - assertThat(info).isNotLessThanOrEqualTo(["all", "trace", "debug"]); - assertThat(info).isLessThanOrEqualTo(['warn', 'ERROR', 'Fatal', 'off']); - } - }, - 'isEqualTo': { - topic: levels.INFO, - 'should handle string arguments': function(info) { - assertThat(info).isEqualTo(["info", "INFO", "iNfO"]); - } - }, - 'toLevel': { - 'with lowercase argument': { - topic: levels.toLevel("debug"), - 'should take the string and return the corresponding level': function(level) { - assert.equal(level, levels.DEBUG); - } - }, - 'with uppercase argument': { - topic: levels.toLevel("DEBUG"), - 'should take the string and return the corresponding level': function(level) { - assert.equal(level, levels.DEBUG); - } - }, - 'with varying case': { - topic: levels.toLevel("DeBuG"), - 'should take the string and return the corresponding level': function(level) { - assert.equal(level, levels.DEBUG); - } - }, - 'with unrecognised argument': { - topic: levels.toLevel("cheese"), - 'should return undefined': function(level) { - assert.isUndefined(level); - } - }, - 'with unrecognised argument and default value': { - topic: levels.toLevel("cheese", levels.DEBUG), - 'should return default value': function(level) { - assert.equal(level, levels.DEBUG); - } - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/log-abspath-test.js b/node_modules/karma/node_modules/log4js/test/log-abspath-test.js deleted file mode 100644 index 20aa9def..00000000 --- a/node_modules/karma/node_modules/log4js/test/log-abspath-test.js +++ /dev/null @@ -1,75 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, sandbox = require('sandboxed-module'); - -vows.describe('log4js-abspath').addBatch({ - 'options': { - topic: function() { - var appenderOptions, - log4js = sandbox.require( - '../lib/log4js', - { requires: - { './appenders/fake': - { name: "fake", - appender: function() {}, - configure: function(configuration, options) { - appenderOptions = options; - return function() {}; - } - } - } - } - ), - config = { - "appenders": [ - { - "type" : "fake", - "filename" : "cheesy-wotsits.log" - } - ] - }; - - log4js.configure(config, { - cwd: '/absolute/path/to' - }); - return appenderOptions; - }, - 'should be passed to appenders during configuration': function(options) { - assert.equal(options.cwd, '/absolute/path/to'); - } - }, - - 'file appender': { - topic: function() { - var fileOpened, - fileAppender = sandbox.require( - '../lib/appenders/file', - { requires: - { '../streams': - { RollingFileStream: - function(file) { - fileOpened = file; - return { - on: function() {}, - end: function() {} - }; - } - } - } - } - ); - fileAppender.configure( - { - filename: "whatever.log", - maxLogSize: 10 - }, - { cwd: '/absolute/path/to' } - ); - return fileOpened; - }, - 'should prepend options.cwd to config.filename': function(fileOpened) { - assert.equal(fileOpened, "/absolute/path/to/whatever.log"); - } - }, -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/log4js.json b/node_modules/karma/node_modules/log4js/test/log4js.json deleted file mode 100644 index 3a4e54a9..00000000 --- a/node_modules/karma/node_modules/log4js/test/log4js.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "appenders": [ - { - "category": "tests", - "type": "file", - "filename": "tmp-tests.log", - "layout": { - "type": "messagePassThrough" - } - } - ], - - "levels": { - "tests": "WARN" - } -} diff --git a/node_modules/karma/node_modules/log4js/test/logLevelFilter-test.js b/node_modules/karma/node_modules/log4js/test/logLevelFilter-test.js deleted file mode 100644 index c9766894..00000000 --- a/node_modules/karma/node_modules/log4js/test/logLevelFilter-test.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var vows = require('vows') -, fs = require('fs') -, assert = require('assert'); - -function remove(filename) { - try { - fs.unlinkSync(filename); - } catch (e) { - //doesn't really matter if it failed - } -} - -vows.describe('log4js logLevelFilter').addBatch({ - 'appender': { - topic: function() { - var log4js = require('../lib/log4js'), logEvents = [], logger; - log4js.clearAppenders(); - log4js.addAppender( - require('../lib/appenders/logLevelFilter') - .appender( - 'ERROR', - function(evt) { logEvents.push(evt); } - ), - "logLevelTest" - ); - - logger = log4js.getLogger("logLevelTest"); - logger.debug('this should not trigger an event'); - logger.warn('neither should this'); - logger.error('this should, though'); - logger.fatal('so should this'); - return logEvents; - }, - 'should only pass log events greater than or equal to its own level' : function(logEvents) { - assert.equal(logEvents.length, 2); - assert.equal(logEvents[0].data[0], 'this should, though'); - assert.equal(logEvents[1].data[0], 'so should this'); - } - }, - - 'configure': { - topic: function() { - var log4js = require('../lib/log4js') - , logger; - - remove(__dirname + '/logLevelFilter.log'); - remove(__dirname + '/logLevelFilter-warnings.log'); - - log4js.configure('test/with-logLevelFilter.json'); - logger = log4js.getLogger("tests"); - logger.info('main'); - logger.error('both'); - logger.warn('both'); - logger.debug('main'); - //wait for the file system to catch up - setTimeout(this.callback, 100); - }, - 'tmp-tests.log': { - topic: function() { - fs.readFile(__dirname + '/logLevelFilter.log', 'utf8', this.callback); - }, - 'should contain all log messages': function(contents) { - var messages = contents.trim().split('\n'); - assert.deepEqual(messages, ['main','both','both','main']); - } - }, - 'tmp-tests-warnings.log': { - topic: function() { - fs.readFile(__dirname + '/logLevelFilter-warnings.log','utf8',this.callback); - }, - 'should contain only error and warning log messages': function(contents) { - var messages = contents.trim().split('\n'); - assert.deepEqual(messages, ['both','both']); - } - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/logger-test.js b/node_modules/karma/node_modules/log4js/test/logger-test.js deleted file mode 100644 index 55899f28..00000000 --- a/node_modules/karma/node_modules/log4js/test/logger-test.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, levels = require('../lib/levels') -, Logger = require('../lib/logger').Logger; - -vows.describe('../lib/logger').addBatch({ - 'constructor with no parameters': { - topic: new Logger(), - 'should use default category': function(logger) { - assert.equal(logger.category, Logger.DEFAULT_CATEGORY); - }, - 'should use TRACE log level': function(logger) { - assert.equal(logger.level, levels.TRACE); - } - }, - - 'constructor with category': { - topic: new Logger('cheese'), - 'should use category': function(logger) { - assert.equal(logger.category, 'cheese'); - }, - 'should use TRACE log level': function(logger) { - assert.equal(logger.level, levels.TRACE); - } - }, - - 'constructor with category and level': { - topic: new Logger('cheese', 'debug'), - 'should use category': function(logger) { - assert.equal(logger.category, 'cheese'); - }, - 'should use level': function(logger) { - assert.equal(logger.level, levels.DEBUG); - } - }, - - 'isLevelEnabled': { - topic: new Logger('cheese', 'info'), - 'should provide a level enabled function for all levels': function(logger) { - assert.isFunction(logger.isTraceEnabled); - assert.isFunction(logger.isDebugEnabled); - assert.isFunction(logger.isInfoEnabled); - assert.isFunction(logger.isWarnEnabled); - assert.isFunction(logger.isErrorEnabled); - assert.isFunction(logger.isFatalEnabled); - }, - 'should return the right values': function(logger) { - assert.isFalse(logger.isTraceEnabled()); - assert.isFalse(logger.isDebugEnabled()); - assert.isTrue(logger.isInfoEnabled()); - assert.isTrue(logger.isWarnEnabled()); - assert.isTrue(logger.isErrorEnabled()); - assert.isTrue(logger.isFatalEnabled()); - } - } -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/logging-test.js b/node_modules/karma/node_modules/log4js/test/logging-test.js deleted file mode 100644 index 32ff099c..00000000 --- a/node_modules/karma/node_modules/log4js/test/logging-test.js +++ /dev/null @@ -1,512 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, sandbox = require('sandboxed-module'); - -function setupConsoleTest() { - var fakeConsole = {} - , logEvents = [] - , log4js; - - ['trace','debug','log','info','warn','error'].forEach(function(fn) { - fakeConsole[fn] = function() { - throw new Error("this should not be called."); - }; - }); - - log4js = sandbox.require( - '../lib/log4js', - { - globals: { - console: fakeConsole - } - } - ); - - log4js.clearAppenders(); - log4js.addAppender(function(evt) { - logEvents.push(evt); - }); - - return { log4js: log4js, logEvents: logEvents, fakeConsole: fakeConsole }; -} - -vows.describe('log4js').addBatch({ - 'getLogger': { - topic: function() { - var log4js = require('../lib/log4js'); - log4js.clearAppenders(); - var logger = log4js.getLogger('tests'); - logger.setLevel("DEBUG"); - return logger; - }, - - 'should take a category and return a logger': function(logger) { - assert.equal(logger.category, 'tests'); - assert.equal(logger.level.toString(), "DEBUG"); - assert.isFunction(logger.debug); - assert.isFunction(logger.info); - assert.isFunction(logger.warn); - assert.isFunction(logger.error); - assert.isFunction(logger.fatal); - }, - - 'log events' : { - topic: function(logger) { - var events = []; - logger.addListener("log", function (logEvent) { events.push(logEvent); }); - logger.debug("Debug event"); - logger.trace("Trace event 1"); - logger.trace("Trace event 2"); - logger.warn("Warning event"); - logger.error("Aargh!", new Error("Pants are on fire!")); - logger.error("Simulated CouchDB problem", { err: 127, cause: "incendiary underwear" }); - return events; - }, - - 'should emit log events': function(events) { - assert.equal(events[0].level.toString(), 'DEBUG'); - assert.equal(events[0].data[0], 'Debug event'); - assert.instanceOf(events[0].startTime, Date); - }, - - 'should not emit events of a lower level': function(events) { - assert.equal(events.length, 4); - assert.equal(events[1].level.toString(), 'WARN'); - }, - - 'should include the error if passed in': function (events) { - assert.instanceOf(events[2].data[1], Error); - assert.equal(events[2].data[1].message, 'Pants are on fire!'); - } - - }, - - }, - - 'invalid configuration': { - 'should throw an exception': function() { - assert.throws(function() { - require('log4js').configure({ "type": "invalid" }); - }); - } - }, - - 'configuration when passed as object': { - topic: function() { - var appenderConfig, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - './appenders/file': - { - name: "file", - appender: function() {}, - configure: function(configuration) { - appenderConfig = configuration; - return function() {}; - } - } - } - } - ), - config = { appenders: - [ { "type" : "file", - "filename" : "cheesy-wotsits.log", - "maxLogSize" : 1024, - "backups" : 3 - } - ] - }; - log4js.configure(config); - return appenderConfig; - }, - 'should be passed to appender config': function(configuration) { - assert.equal(configuration.filename, 'cheesy-wotsits.log'); - } - }, - - 'configuration that causes an error': { - topic: function() { - var log4js = sandbox.require( - '../lib/log4js', - { - requires: { - './appenders/file': - { - name: "file", - appender: function() {}, - configure: function(configuration) { - throw new Error("oh noes"); - } - } - } - } - ), - config = { appenders: - [ { "type" : "file", - "filename" : "cheesy-wotsits.log", - "maxLogSize" : 1024, - "backups" : 3 - } - ] - }; - try { - log4js.configure(config); - } catch (e) { - return e; - } - }, - 'should wrap error in a meaningful message': function(e) { - assert.ok(e.message.indexOf('log4js configuration problem for') > -1); - } - }, - - 'configuration when passed as filename': { - topic: function() { - var appenderConfig, - configFilename, - log4js = sandbox.require( - '../lib/log4js', - { requires: - { 'fs': - { statSync: - function() { - return { mtime: Date.now() }; - }, - readFileSync: - function(filename) { - configFilename = filename; - return JSON.stringify({ - appenders: [ - { type: "file" - , filename: "whatever.log" - } - ] - }); - }, - readdirSync: - function() { - return ['file']; - } - }, - './appenders/file': - { name: "file", - appender: function() {}, - configure: function(configuration) { - appenderConfig = configuration; - return function() {}; - } - } - } - } - ); - log4js.configure("/path/to/cheese.json"); - return [ configFilename, appenderConfig ]; - }, - 'should read the config from a file': function(args) { - assert.equal(args[0], '/path/to/cheese.json'); - }, - 'should pass config to appender': function(args) { - assert.equal(args[1].filename, "whatever.log"); - } - }, - - 'with no appenders defined' : { - topic: function() { - var logger, - that = this, - fakeConsoleAppender = { - name: "console", - appender: function() { - return function(evt) { - that.callback(null, evt); - }; - }, - configure: function() { - return fakeConsoleAppender.appender(); - } - }, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - './appenders/console': fakeConsoleAppender - } - } - ); - logger = log4js.getLogger("some-logger"); - logger.debug("This is a test"); - }, - 'should default to the console appender': function(evt) { - assert.equal(evt.data[0], "This is a test"); - } - }, - - 'addAppender' : { - topic: function() { - var log4js = require('../lib/log4js'); - log4js.clearAppenders(); - return log4js; - }, - 'without a category': { - 'should register the function as a listener for all loggers': function (log4js) { - var appenderEvent, - appender = function(evt) { appenderEvent = evt; }, - logger = log4js.getLogger("tests"); - - log4js.addAppender(appender); - logger.debug("This is a test"); - assert.equal(appenderEvent.data[0], "This is a test"); - assert.equal(appenderEvent.categoryName, "tests"); - assert.equal(appenderEvent.level.toString(), "DEBUG"); - }, - 'if an appender for a category is defined': { - 'should register for that category': function (log4js) { - var otherEvent, - appenderEvent, - cheeseLogger; - - log4js.addAppender(function (evt) { appenderEvent = evt; }); - log4js.addAppender(function (evt) { otherEvent = evt; }, 'cheese'); - - cheeseLogger = log4js.getLogger('cheese'); - cheeseLogger.debug('This is a test'); - assert.deepEqual(appenderEvent, otherEvent); - assert.equal(otherEvent.data[0], 'This is a test'); - assert.equal(otherEvent.categoryName, 'cheese'); - - otherEvent = undefined; - appenderEvent = undefined; - log4js.getLogger('pants').debug("this should not be propagated to otherEvent"); - assert.isUndefined(otherEvent); - assert.equal(appenderEvent.data[0], "this should not be propagated to otherEvent"); - } - } - }, - - 'with a category': { - 'should only register the function as a listener for that category': function(log4js) { - var appenderEvent, - appender = function(evt) { appenderEvent = evt; }, - logger = log4js.getLogger("tests"); - - log4js.addAppender(appender, 'tests'); - logger.debug('this is a category test'); - assert.equal(appenderEvent.data[0], 'this is a category test'); - - appenderEvent = undefined; - log4js.getLogger('some other category').debug('Cheese'); - assert.isUndefined(appenderEvent); - } - }, - - 'with multiple categories': { - 'should register the function as a listener for all the categories': function(log4js) { - var appenderEvent, - appender = function(evt) { appenderEvent = evt; }, - logger = log4js.getLogger('tests'); - - log4js.addAppender(appender, 'tests', 'biscuits'); - - logger.debug('this is a test'); - assert.equal(appenderEvent.data[0], 'this is a test'); - appenderEvent = undefined; - - var otherLogger = log4js.getLogger('biscuits'); - otherLogger.debug("mmm... garibaldis"); - assert.equal(appenderEvent.data[0], "mmm... garibaldis"); - - appenderEvent = undefined; - - log4js.getLogger("something else").debug("pants"); - assert.isUndefined(appenderEvent); - }, - 'should register the function when the list of categories is an array': function(log4js) { - var appenderEvent, - appender = function(evt) { appenderEvent = evt; }; - - log4js.addAppender(appender, ['tests', 'pants']); - - log4js.getLogger('tests').debug('this is a test'); - assert.equal(appenderEvent.data[0], 'this is a test'); - - appenderEvent = undefined; - - log4js.getLogger('pants').debug("big pants"); - assert.equal(appenderEvent.data[0], "big pants"); - - appenderEvent = undefined; - - log4js.getLogger("something else").debug("pants"); - assert.isUndefined(appenderEvent); - } - } - }, - - 'default setup': { - topic: function() { - var appenderEvents = [], - fakeConsole = { - 'name': 'console', - 'appender': function () { - return function(evt) { - appenderEvents.push(evt); - }; - }, - 'configure': function (config) { - return fakeConsole.appender(); - } - }, - globalConsole = { - log: function() { } - }, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - './appenders/console': fakeConsole - }, - globals: { - console: globalConsole - } - } - ), - logger = log4js.getLogger('a-test'); - - logger.debug("this is a test"); - globalConsole.log("this should not be logged"); - - return appenderEvents; - }, - - 'should configure a console appender': function(appenderEvents) { - assert.equal(appenderEvents[0].data[0], 'this is a test'); - }, - - 'should not replace console.log with log4js version': function(appenderEvents) { - assert.equal(appenderEvents.length, 1); - } - }, - - 'console' : { - topic: setupConsoleTest, - - 'when replaceConsole called': { - topic: function(test) { - test.log4js.replaceConsole(); - - test.fakeConsole.log("Some debug message someone put in a module"); - test.fakeConsole.debug("Some debug"); - test.fakeConsole.error("An error"); - test.fakeConsole.info("some info"); - test.fakeConsole.warn("a warning"); - - test.fakeConsole.log("cheese (%s) and biscuits (%s)", "gouda", "garibaldis"); - test.fakeConsole.log({ lumpy: "tapioca" }); - test.fakeConsole.log("count %d", 123); - test.fakeConsole.log("stringify %j", { lumpy: "tapioca" }); - - return test.logEvents; - }, - - 'should replace console.log methods with log4js ones': function(logEvents) { - assert.equal(logEvents.length, 9); - assert.equal(logEvents[0].data[0], "Some debug message someone put in a module"); - assert.equal(logEvents[0].level.toString(), "INFO"); - assert.equal(logEvents[1].data[0], "Some debug"); - assert.equal(logEvents[1].level.toString(), "DEBUG"); - assert.equal(logEvents[2].data[0], "An error"); - assert.equal(logEvents[2].level.toString(), "ERROR"); - assert.equal(logEvents[3].data[0], "some info"); - assert.equal(logEvents[3].level.toString(), "INFO"); - assert.equal(logEvents[4].data[0], "a warning"); - assert.equal(logEvents[4].level.toString(), "WARN"); - assert.equal(logEvents[5].data[0], "cheese (%s) and biscuits (%s)"); - assert.equal(logEvents[5].data[1], "gouda"); - assert.equal(logEvents[5].data[2], "garibaldis"); - } - }, - 'when turned off': { - topic: function(test) { - test.log4js.restoreConsole(); - try { - test.fakeConsole.log("This should cause the error described in the setup"); - } catch (e) { - return e; - } - }, - 'should call the original console methods': function (err) { - assert.instanceOf(err, Error); - assert.equal(err.message, "this should not be called."); - } - } - }, - 'console configuration': { - topic: setupConsoleTest, - 'when disabled': { - topic: function(test) { - test.log4js.replaceConsole(); - test.log4js.configure({ replaceConsole: false }); - try { - test.fakeConsole.log("This should cause the error described in the setup"); - } catch (e) { - return e; - } - }, - 'should allow for turning off console replacement': function (err) { - assert.instanceOf(err, Error); - assert.equal(err.message, 'this should not be called.'); - } - }, - 'when enabled': { - topic: function(test) { - test.log4js.restoreConsole(); - test.log4js.configure({ replaceConsole: true }); - //log4js.configure clears all appenders - test.log4js.addAppender(function(evt) { - test.logEvents.push(evt); - }); - - test.fakeConsole.debug("Some debug"); - return test.logEvents; - }, - - 'should allow for turning on console replacement': function (logEvents) { - assert.equal(logEvents.length, 1); - assert.equal(logEvents[0].level.toString(), "DEBUG"); - assert.equal(logEvents[0].data[0], "Some debug"); - } - } - }, - 'configuration persistence' : { - topic: function() { - var logEvent, - firstLog4js = require('../lib/log4js'), - secondLog4js; - - firstLog4js.clearAppenders(); - firstLog4js.addAppender(function(evt) { logEvent = evt; }); - - secondLog4js = require('../lib/log4js'); - secondLog4js.getLogger().info("This should go to the appender defined in firstLog4js"); - - return logEvent; - }, - 'should maintain appenders between requires': function (logEvent) { - assert.equal(logEvent.data[0], "This should go to the appender defined in firstLog4js"); - } - }, - - 'getDefaultLogger': { - topic: function() { - return require('../lib/log4js').getDefaultLogger(); - }, - 'should return a logger': function(logger) { - assert.ok(logger.info); - assert.ok(logger.debug); - assert.ok(logger.error); - } - } -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/multiprocess-test.js b/node_modules/karma/node_modules/log4js/test/multiprocess-test.js deleted file mode 100644 index 920e72a0..00000000 --- a/node_modules/karma/node_modules/log4js/test/multiprocess-test.js +++ /dev/null @@ -1,311 +0,0 @@ -"use strict"; -var vows = require('vows') -, sandbox = require('sandboxed-module') -, assert = require('assert') -; - -function makeFakeNet() { - return { - logEvents: [], - data: [], - cbs: {}, - createConnectionCalled: 0, - fakeAppender: function(logEvent) { - this.logEvents.push(logEvent); - }, - createConnection: function(port, host) { - var fakeNet = this; - this.port = port; - this.host = host; - this.createConnectionCalled += 1; - return { - on: function(evt, cb) { - fakeNet.cbs[evt] = cb; - }, - write: function(data, encoding) { - fakeNet.data.push(data); - fakeNet.encoding = encoding; - }, - end: function() { - fakeNet.closeCalled = true; - } - }; - }, - createServer: function(cb) { - var fakeNet = this; - cb({ - remoteAddress: '1.2.3.4', - remotePort: '1234', - setEncoding: function(encoding) { - fakeNet.encoding = encoding; - }, - on: function(event, cb) { - fakeNet.cbs[event] = cb; - } - }); - - return { - listen: function(port, host) { - fakeNet.port = port; - fakeNet.host = host; - } - }; - } - }; -} - -vows.describe('Multiprocess Appender').addBatch({ - 'worker': { - topic: function() { - var fakeNet = makeFakeNet(), - appender = sandbox.require( - '../lib/appenders/multiprocess', - { - requires: { - 'net': fakeNet - } - } - ).appender({ mode: 'worker', loggerPort: 1234, loggerHost: 'pants' }); - - //don't need a proper log event for the worker tests - appender('before connect'); - fakeNet.cbs.connect(); - appender('after connect'); - fakeNet.cbs.close(true); - appender('after error, before connect'); - fakeNet.cbs.connect(); - appender('after error, after connect'); - appender(new Error('Error test')); - - return fakeNet; - }, - 'should open a socket to the loggerPort and loggerHost': function(net) { - assert.equal(net.port, 1234); - assert.equal(net.host, 'pants'); - }, - 'should buffer messages written before socket is connected': function(net) { - assert.equal(net.data[0], JSON.stringify('before connect')); - }, - 'should write log messages to socket as json strings with a terminator string': function(net) { - assert.equal(net.data[0], JSON.stringify('before connect')); - assert.equal(net.data[1], '__LOG4JS__'); - assert.equal(net.data[2], JSON.stringify('after connect')); - assert.equal(net.data[3], '__LOG4JS__'); - assert.equal(net.encoding, 'utf8'); - }, - 'should attempt to re-open the socket on error': function(net) { - assert.equal(net.data[4], JSON.stringify('after error, before connect')); - assert.equal(net.data[5], '__LOG4JS__'); - assert.equal(net.data[6], JSON.stringify('after error, after connect')); - assert.equal(net.data[7], '__LOG4JS__'); - assert.equal(net.createConnectionCalled, 2); - }, - 'should serialize an Error correctly': function(net) { - assert(JSON.parse(net.data[8]).stack, "Expected:\n\n" + net.data[8] + "\n\n to have a 'stack' property"); - var actual = JSON.parse(net.data[8]).stack; - var expectedRegex = /^Error: Error test/; - assert(actual.match(expectedRegex), "Expected: \n\n " + actual + "\n\n to match " + expectedRegex); - - } - }, - 'worker with timeout': { - topic: function() { - var fakeNet = makeFakeNet(), - appender = sandbox.require( - '../lib/appenders/multiprocess', - { - requires: { - 'net': fakeNet - } - } - ).appender({ mode: 'worker' }); - - //don't need a proper log event for the worker tests - appender('before connect'); - fakeNet.cbs.connect(); - appender('after connect'); - fakeNet.cbs.timeout(); - appender('after timeout, before close'); - fakeNet.cbs.close(); - appender('after close, before connect'); - fakeNet.cbs.connect(); - appender('after close, after connect'); - - return fakeNet; - }, - 'should attempt to re-open the socket': function(net) { - //skipping the __LOG4JS__ separators - assert.equal(net.data[0], JSON.stringify('before connect')); - assert.equal(net.data[2], JSON.stringify('after connect')); - assert.equal(net.data[4], JSON.stringify('after timeout, before close')); - assert.equal(net.data[6], JSON.stringify('after close, before connect')); - assert.equal(net.data[8], JSON.stringify('after close, after connect')); - assert.equal(net.createConnectionCalled, 2); - } - }, - 'worker defaults': { - topic: function() { - var fakeNet = makeFakeNet(), - appender = sandbox.require( - '../lib/appenders/multiprocess', - { - requires: { - 'net': fakeNet - } - } - ).appender({ mode: 'worker' }); - - return fakeNet; - }, - 'should open a socket to localhost:5000': function(net) { - assert.equal(net.port, 5000); - assert.equal(net.host, 'localhost'); - } - }, - 'master': { - topic: function() { - var fakeNet = makeFakeNet(), - appender = sandbox.require( - '../lib/appenders/multiprocess', - { - requires: { - 'net': fakeNet - } - } - ).appender({ mode: 'master', - loggerHost: 'server', - loggerPort: 1234, - actualAppender: fakeNet.fakeAppender.bind(fakeNet) - }); - - appender('this should be sent to the actual appender directly'); - - return fakeNet; - }, - 'should listen for log messages on loggerPort and loggerHost': function(net) { - assert.equal(net.port, 1234); - assert.equal(net.host, 'server'); - }, - 'should return the underlying appender': function(net) { - assert.equal(net.logEvents[0], 'this should be sent to the actual appender directly'); - }, - 'when a client connects': { - topic: function(net) { - var logString = JSON.stringify( - { level: { level: 10000, levelStr: 'DEBUG' } - , data: ['some debug']} - ) + '__LOG4JS__'; - - net.cbs.data( - JSON.stringify( - { level: { level: 40000, levelStr: 'ERROR' } - , data: ['an error message'] } - ) + '__LOG4JS__' - ); - net.cbs.data(logString.substring(0, 10)); - net.cbs.data(logString.substring(10)); - net.cbs.data(logString + logString + logString); - net.cbs.end( - JSON.stringify( - { level: { level: 50000, levelStr: 'FATAL' } - , data: ["that's all folks"] } - ) + '__LOG4JS__' - ); - net.cbs.data('bad message__LOG4JS__'); - return net; - }, - 'should parse log messages into log events and send to appender': function(net) { - assert.equal(net.logEvents[1].level.toString(), 'ERROR'); - assert.equal(net.logEvents[1].data[0], 'an error message'); - assert.equal(net.logEvents[1].remoteAddress, '1.2.3.4'); - assert.equal(net.logEvents[1].remotePort, '1234'); - }, - 'should parse log messages split into multiple chunks': function(net) { - assert.equal(net.logEvents[2].level.toString(), 'DEBUG'); - assert.equal(net.logEvents[2].data[0], 'some debug'); - assert.equal(net.logEvents[2].remoteAddress, '1.2.3.4'); - assert.equal(net.logEvents[2].remotePort, '1234'); - }, - 'should parse multiple log messages in a single chunk': function(net) { - assert.equal(net.logEvents[3].data[0], 'some debug'); - assert.equal(net.logEvents[4].data[0], 'some debug'); - assert.equal(net.logEvents[5].data[0], 'some debug'); - }, - 'should handle log messages sent as part of end event': function(net) { - assert.equal(net.logEvents[6].data[0], "that's all folks"); - }, - 'should handle unparseable log messages': function(net) { - assert.equal(net.logEvents[7].level.toString(), 'ERROR'); - assert.equal(net.logEvents[7].categoryName, 'log4js'); - assert.equal(net.logEvents[7].data[0], 'Unable to parse log:'); - assert.equal(net.logEvents[7].data[1], 'bad message'); - } - } - }, - 'master defaults': { - topic: function() { - var fakeNet = makeFakeNet(), - appender = sandbox.require( - '../lib/appenders/multiprocess', - { - requires: { - 'net': fakeNet - } - } - ).appender({ mode: 'master' }); - - return fakeNet; - }, - 'should listen for log messages on localhost:5000': function(net) { - assert.equal(net.port, 5000); - assert.equal(net.host, 'localhost'); - } - } -}).addBatch({ - 'configure': { - topic: function() { - var results = {} - , fakeNet = makeFakeNet() - , appender = sandbox.require( - '../lib/appenders/multiprocess', - { - requires: { - 'net': fakeNet, - '../log4js': { - loadAppender: function(app) { - results.appenderLoaded = app; - }, - appenderMakers: { - 'madeupappender': function(config, options) { - results.config = config; - results.options = options; - } - } - } - } - } - ).configure( - { - mode: 'master', - appender: { - type: 'madeupappender', - cheese: 'gouda' - } - }, - { crackers: 'jacobs' } - ); - - return results; - - }, - 'should load underlying appender for master': function(results) { - assert.equal(results.appenderLoaded, 'madeupappender'); - }, - 'should pass config to underlying appender': function(results) { - assert.equal(results.config.cheese, 'gouda'); - }, - 'should pass options to underlying appender': function(results) { - assert.equal(results.options.crackers, 'jacobs'); - } - } -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/nolog-test.js b/node_modules/karma/node_modules/log4js/test/nolog-test.js deleted file mode 100644 index 3c1a8e78..00000000 --- a/node_modules/karma/node_modules/log4js/test/nolog-test.js +++ /dev/null @@ -1,261 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, levels = require('../lib/levels'); - -function MockLogger() { - - var that = this; - this.messages = []; - - this.log = function(level, message, exception) { - that.messages.push({ level: level, message: message }); - }; - - this.isLevelEnabled = function(level) { - return level.isGreaterThanOrEqualTo(that.level); - }; - - this.level = levels.TRACE; - -} - -function MockRequest(remoteAddr, method, originalUrl) { - - this.socket = { remoteAddress: remoteAddr }; - this.originalUrl = originalUrl; - this.method = method; - this.httpVersionMajor = '5'; - this.httpVersionMinor = '0'; - this.headers = {}; -} - -function MockResponse(statusCode) { - - this.statusCode = statusCode; - - this.end = function(chunk, encoding) { - - }; -} - -vows.describe('log4js connect logger').addBatch({ - 'getConnectLoggerModule': { - topic: function() { - var clm = require('../lib/connect-logger'); - return clm; - }, - - 'should return a "connect logger" factory' : function(clm) { - assert.isObject(clm); - }, - - 'nolog String' : { - topic: function(clm) { - var ml = new MockLogger(); - var cl = clm.connectLogger(ml, { nolog: "\\.gif" }); - return {cl: cl, ml: ml}; - }, - - 'check unmatch url request': { - topic: function(d){ - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.png'); // not gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages){ - assert.isArray(messages); - assert.equal(messages.length, 1); - assert.ok(levels.INFO.isEqualTo(messages[0].level)); - assert.include(messages[0].message, 'GET'); - assert.include(messages[0].message, 'http://url'); - assert.include(messages[0].message, 'my.remote.addr'); - assert.include(messages[0].message, '200'); - messages.pop(); - } - }, - - 'check match url request': { - topic: function(d) { - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.gif'); // gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 0); - } - } - }, - - 'nolog Strings' : { - topic: function(clm) { - var ml = new MockLogger(); - var cl = clm.connectLogger(ml, {nolog: "\\.gif|\\.jpe?g"}); - return {cl: cl, ml: ml}; - }, - - 'check unmatch url request (png)': { - topic: function(d){ - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.png'); // not gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages){ - assert.isArray(messages); - assert.equal(messages.length, 1); - assert.ok(levels.INFO.isEqualTo(messages[0].level)); - assert.include(messages[0].message, 'GET'); - assert.include(messages[0].message, 'http://url'); - assert.include(messages[0].message, 'my.remote.addr'); - assert.include(messages[0].message, '200'); - messages.pop(); - } - }, - - 'check match url request (gif)': { - topic: function(d) { - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.gif'); // gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 0); - } - }, - 'check match url request (jpeg)': { - topic: function(d) { - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.jpeg'); // gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 0); - } - } - }, - 'nolog Array' : { - topic: function(clm) { - var ml = new MockLogger(); - var cl = clm.connectLogger(ml, {nolog: ["\\.gif", "\\.jpe?g"]}); - return {cl: cl, ml: ml}; - }, - - 'check unmatch url request (png)': { - topic: function(d){ - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.png'); // not gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages){ - assert.isArray(messages); - assert.equal(messages.length, 1); - assert.ok(levels.INFO.isEqualTo(messages[0].level)); - assert.include(messages[0].message, 'GET'); - assert.include(messages[0].message, 'http://url'); - assert.include(messages[0].message, 'my.remote.addr'); - assert.include(messages[0].message, '200'); - messages.pop(); - } - }, - - 'check match url request (gif)': { - topic: function(d) { - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.gif'); // gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 0); - } - }, - - 'check match url request (jpeg)': { - topic: function(d) { - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.jpeg'); // gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 0); - } - }, - }, - 'nolog RegExp' : { - topic: function(clm) { - var ml = new MockLogger(); - var cl = clm.connectLogger(ml, {nolog: /\.gif|\.jpe?g/}); - return {cl: cl, ml: ml}; - }, - - 'check unmatch url request (png)': { - topic: function(d){ - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.png'); // not gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages){ - assert.isArray(messages); - assert.equal(messages.length, 1); - assert.ok(levels.INFO.isEqualTo(messages[0].level)); - assert.include(messages[0].message, 'GET'); - assert.include(messages[0].message, 'http://url'); - assert.include(messages[0].message, 'my.remote.addr'); - assert.include(messages[0].message, '200'); - messages.pop(); - } - }, - - 'check match url request (gif)': { - topic: function(d) { - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.gif'); // gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 0); - } - }, - - 'check match url request (jpeg)': { - topic: function(d) { - var req = new MockRequest('my.remote.addr', 'GET', 'http://url/hoge.jpeg'); // gif - var res = new MockResponse(200); - d.cl(req, res, function() { }); - res.end('chunk', 'encoding'); - return d.ml.messages; - }, - 'check message': function(messages) { - assert.isArray(messages); - assert.equal(messages.length, 0); - } - } - } - } - -}).export(module); diff --git a/node_modules/karma/node_modules/log4js/test/reloadConfiguration-test.js b/node_modules/karma/node_modules/log4js/test/reloadConfiguration-test.js deleted file mode 100644 index 060f0895..00000000 --- a/node_modules/karma/node_modules/log4js/test/reloadConfiguration-test.js +++ /dev/null @@ -1,340 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, sandbox = require('sandboxed-module'); - -function setupConsoleTest() { - var fakeConsole = {} - , logEvents = [] - , log4js; - - ['trace','debug','log','info','warn','error'].forEach(function(fn) { - fakeConsole[fn] = function() { - throw new Error("this should not be called."); - }; - }); - - log4js = sandbox.require( - '../lib/log4js', - { - globals: { - console: fakeConsole - } - } - ); - - log4js.clearAppenders(); - log4js.addAppender(function(evt) { - logEvents.push(evt); - }); - - return { log4js: log4js, logEvents: logEvents, fakeConsole: fakeConsole }; -} - -vows.describe('reload configuration').addBatch({ - 'with config file changing' : { - topic: function() { - var pathsChecked = [], - logEvents = [], - logger, - modulePath = 'path/to/log4js.json', - fakeFS = { - lastMtime: Date.now(), - config: { - appenders: [ - { type: 'console', layout: { type: 'messagePassThrough' } } - ], - levels: { 'a-test' : 'INFO' } - }, - readFileSync: function (file, encoding) { - assert.equal(file, modulePath); - assert.equal(encoding, 'utf8'); - return JSON.stringify(fakeFS.config); - }, - statSync: function (path) { - pathsChecked.push(path); - if (path === modulePath) { - fakeFS.lastMtime += 1; - return { mtime: new Date(fakeFS.lastMtime) }; - } else { - throw new Error("no such file"); - } - } - }, - fakeConsole = { - 'name': 'console', - 'appender': function () { - return function(evt) { logEvents.push(evt); }; - }, - 'configure': function (config) { - return fakeConsole.appender(); - } - }, - setIntervalCallback, - fakeSetInterval = function(cb, timeout) { - setIntervalCallback = cb; - }, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - 'fs': fakeFS, - './appenders/console': fakeConsole - }, - globals: { - 'console': fakeConsole, - 'setInterval' : fakeSetInterval, - } - } - ); - - log4js.configure('path/to/log4js.json', { reloadSecs: 30 }); - logger = log4js.getLogger('a-test'); - logger.info("info1"); - logger.debug("debug2 - should be ignored"); - fakeFS.config.levels['a-test'] = "DEBUG"; - setIntervalCallback(); - logger.info("info3"); - logger.debug("debug4"); - - return logEvents; - }, - 'should configure log4js from first log4js.json found': function(logEvents) { - assert.equal(logEvents[0].data[0], 'info1'); - assert.equal(logEvents[1].data[0], 'info3'); - assert.equal(logEvents[2].data[0], 'debug4'); - assert.equal(logEvents.length, 3); - } - }, - - 'with config file staying the same' : { - topic: function() { - var pathsChecked = [], - fileRead = 0, - logEvents = [], - logger, - modulePath = require('path').normalize(__dirname + '/../lib/log4js.json'), - mtime = new Date(), - fakeFS = { - config: { - appenders: [ - { type: 'console', layout: { type: 'messagePassThrough' } } - ], - levels: { 'a-test' : 'INFO' } - }, - readFileSync: function (file, encoding) { - fileRead += 1; - assert.isString(file); - assert.equal(file, modulePath); - assert.equal(encoding, 'utf8'); - return JSON.stringify(fakeFS.config); - }, - statSync: function (path) { - pathsChecked.push(path); - if (path === modulePath) { - return { mtime: mtime }; - } else { - throw new Error("no such file"); - } - } - }, - fakeConsole = { - 'name': 'console', - 'appender': function () { - return function(evt) { logEvents.push(evt); }; - }, - 'configure': function (config) { - return fakeConsole.appender(); - } - }, - setIntervalCallback, - fakeSetInterval = function(cb, timeout) { - setIntervalCallback = cb; - }, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - 'fs': fakeFS, - './appenders/console': fakeConsole - }, - globals: { - 'console': fakeConsole, - 'setInterval' : fakeSetInterval, - } - } - ); - - log4js.configure(modulePath, { reloadSecs: 3 }); - logger = log4js.getLogger('a-test'); - logger.info("info1"); - logger.debug("debug2 - should be ignored"); - setIntervalCallback(); - logger.info("info3"); - logger.debug("debug4"); - - return [ pathsChecked, logEvents, modulePath, fileRead ]; - }, - 'should only read the configuration file once': function(args) { - var fileRead = args[3]; - assert.equal(fileRead, 1); - }, - 'should configure log4js from first log4js.json found': function(args) { - var logEvents = args[1]; - assert.equal(logEvents.length, 2); - assert.equal(logEvents[0].data[0], 'info1'); - assert.equal(logEvents[1].data[0], 'info3'); - } - }, - - 'when config file is removed': { - topic: function() { - var pathsChecked = [], - fileRead = 0, - logEvents = [], - logger, - modulePath = require('path').normalize(__dirname + '/../lib/log4js.json'), - mtime = new Date(), - fakeFS = { - config: { - appenders: [ - { type: 'console', layout: { type: 'messagePassThrough' } } - ], - levels: { 'a-test' : 'INFO' } - }, - readFileSync: function (file, encoding) { - fileRead += 1; - assert.isString(file); - assert.equal(file, modulePath); - assert.equal(encoding, 'utf8'); - return JSON.stringify(fakeFS.config); - }, - statSync: function (path) { - this.statSync = function() { - throw new Error("no such file"); - }; - return { mtime: new Date() }; - } - }, - fakeConsole = { - 'name': 'console', - 'appender': function () { - return function(evt) { logEvents.push(evt); }; - }, - 'configure': function (config) { - return fakeConsole.appender(); - } - }, - setIntervalCallback, - fakeSetInterval = function(cb, timeout) { - setIntervalCallback = cb; - }, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - 'fs': fakeFS, - './appenders/console': fakeConsole - }, - globals: { - 'console': fakeConsole, - 'setInterval' : fakeSetInterval, - } - } - ); - - log4js.configure(modulePath, { reloadSecs: 3 }); - logger = log4js.getLogger('a-test'); - logger.info("info1"); - logger.debug("debug2 - should be ignored"); - setIntervalCallback(); - logger.info("info3"); - logger.debug("debug4"); - - return [ pathsChecked, logEvents, modulePath, fileRead ]; - }, - 'should only read the configuration file once': function(args) { - var fileRead = args[3]; - assert.equal(fileRead, 1); - }, - 'should not clear configuration when config file not found': function(args) { - var logEvents = args[1]; - assert.equal(logEvents.length, 3); - assert.equal(logEvents[0].data[0], 'info1'); - assert.equal(logEvents[1].level.toString(), 'WARN'); - assert.include(logEvents[1].data[0], 'Failed to load configuration file'); - assert.equal(logEvents[2].data[0], 'info3'); - } - }, - - 'when passed an object': { - topic: function() { - var test = setupConsoleTest(); - test.log4js.configure({}, { reloadSecs: 30 }); - return test.logEvents; - }, - 'should log a warning': function(events) { - assert.equal(events[0].level.toString(), 'WARN'); - assert.equal( - events[0].data[0], - 'Ignoring configuration reload parameter for "object" configuration.' - ); - } - }, - - 'when called twice with reload options': { - topic: function() { - var modulePath = require('path').normalize(__dirname + '/../lib/log4js.json'), - fakeFS = { - readFileSync: function (file, encoding) { - return JSON.stringify({}); - }, - statSync: function (path) { - return { mtime: new Date() }; - } - }, - fakeConsole = { - 'name': 'console', - 'appender': function () { - return function(evt) { }; - }, - 'configure': function (config) { - return fakeConsole.appender(); - } - }, - setIntervalCallback, - intervalCleared = false, - clearedId, - fakeSetInterval = function(cb, timeout) { - setIntervalCallback = cb; - return 1234; - }, - log4js = sandbox.require( - '../lib/log4js', - { - requires: { - 'fs': fakeFS, - './appenders/console': fakeConsole - }, - globals: { - 'console': fakeConsole, - 'setInterval' : fakeSetInterval, - 'clearInterval': function(interval) { - intervalCleared = true; - clearedId = interval; - } - } - } - ); - - log4js.configure(modulePath, { reloadSecs: 3 }); - log4js.configure(modulePath, { reloadSecs: 15 }); - - return { cleared: intervalCleared, id: clearedId }; - }, - 'should clear the previous interval': function(result) { - assert.isTrue(result.cleared); - assert.equal(result.id, 1234); - } - } -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/setLevel-asymmetry-test.js b/node_modules/karma/node_modules/log4js/test/setLevel-asymmetry-test.js deleted file mode 100644 index 95ba84b4..00000000 --- a/node_modules/karma/node_modules/log4js/test/setLevel-asymmetry-test.js +++ /dev/null @@ -1,100 +0,0 @@ -"use strict"; -/* jshint loopfunc: true */ -// This test shows an asymmetry between setLevel and isLevelEnabled -// (in log4js-node@0.4.3 and earlier): -// 1) setLevel("foo") works, but setLevel(log4js.levels.foo) silently -// does not (sets the level to TRACE). -// 2) isLevelEnabled("foo") works as does isLevelEnabled(log4js.levels.foo). -// - -// Basic set up -var vows = require('vows'); -var assert = require('assert'); -var log4js = require('../lib/log4js'); -var logger = log4js.getLogger('test-setLevel-asymmetry'); - -// uncomment one or other of the following to see progress (or not) while running the tests -// var showProgress = console.log; -var showProgress = function() {}; - - -// Define the array of levels as string to iterate over. -var strLevels= ['Trace','Debug','Info','Warn','Error','Fatal']; - -var log4jsLevels =[]; -// populate an array with the log4js.levels that match the strLevels. -// Would be nice if we could iterate over log4js.levels instead, -// but log4js.levels.toLevel prevents that for now. -strLevels.forEach(function(l) { - log4jsLevels.push(log4js.levels.toLevel(l)); -}); - - -// We are going to iterate over this object's properties to define an exhaustive list of vows. -var levelTypes = { - 'string': strLevels, - 'log4js.levels.level': log4jsLevels, -}; - -// Set up the basic vows batch for this test -var batch = { - setLevel: { - } -}; - -showProgress('Populating batch object...'); - -// Populating the batch object programmatically, -// as I don't have the patience to manually populate it with -// the (strLevels.length x levelTypes.length) ^ 2 = 144 possible test combinations -for (var type in levelTypes) { - var context = 'is called with a '+type; - var levelsToTest = levelTypes[type]; - showProgress('Setting up the vows context for '+context); - - batch.setLevel[context]= {}; - levelsToTest.forEach( function(level) { - var subContext = 'of '+level; - var log4jsLevel=log4js.levels.toLevel(level.toString()); - - showProgress('Setting up the vows sub-context for '+subContext); - batch.setLevel[context][subContext] = {topic: level}; - for (var comparisonType in levelTypes) { - levelTypes[comparisonType].forEach(function(comparisonLevel) { - var t = type; - var ct = comparisonType; - var expectedResult = log4jsLevel.isLessThanOrEqualTo(comparisonLevel); - var vow = 'isLevelEnabled(' + comparisonLevel + - ') called with a ' + comparisonType + - ' should return ' + expectedResult; - showProgress('Setting up the vows vow for '+vow); - - batch.setLevel[context][subContext][vow] = function(levelToSet) { - logger.setLevel(levelToSet); - showProgress( - '*** Checking setLevel( ' + level + - ' ) of type ' + t + - ', and isLevelEnabled( ' + comparisonLevel + - ' ) of type ' + ct + '. Expecting: ' + expectedResult - ); - assert.equal( - logger.isLevelEnabled(comparisonLevel), - expectedResult, - 'Failed: calling setLevel( ' + level + - ' ) with type ' + type + - ', isLevelEnabled( ' + comparisonLevel + - ' ) of type ' + comparisonType + - ' did not return ' + expectedResult - ); - }; - }); - } - }); - -} - -showProgress('Running tests...'); - -vows.describe('log4js setLevel asymmetry fix').addBatch(batch).export(module); - - diff --git a/node_modules/karma/node_modules/log4js/test/smtpAppender-test.js b/node_modules/karma/node_modules/log4js/test/smtpAppender-test.js deleted file mode 100644 index 27cc179f..00000000 --- a/node_modules/karma/node_modules/log4js/test/smtpAppender-test.js +++ /dev/null @@ -1,233 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, log4js = require('../lib/log4js') -, sandbox = require('sandboxed-module') -; - -function setupLogging(category, options) { - var msgs = []; - - var fakeMailer = { - createTransport: function (name, options) { - return { - config: options, - sendMail: function (msg, callback) { - msgs.push(msg); - callback(null, true); - }, - close: function() {} - }; - } - }; - - var fakeLayouts = { - layout: function(type, config) { - this.type = type; - this.config = config; - return log4js.layouts.messagePassThroughLayout; - }, - basicLayout: log4js.layouts.basicLayout, - messagePassThroughLayout: log4js.layouts.messagePassThroughLayout - }; - - var fakeConsole = { - errors: [], - error: function(msg, value) { - this.errors.push({ msg: msg, value: value }); - } - }; - - var smtpModule = sandbox.require('../lib/appenders/smtp', { - requires: { - 'nodemailer': fakeMailer, - '../layouts': fakeLayouts - }, - globals: { - console: fakeConsole - } - }); - - log4js.addAppender(smtpModule.configure(options), category); - - return { - logger: log4js.getLogger(category), - mailer: fakeMailer, - layouts: fakeLayouts, - console: fakeConsole, - results: msgs - }; -} - -function checkMessages (result, sender, subject) { - for (var i = 0; i < result.results.length; ++i) { - assert.equal(result.results[i].from, sender); - assert.equal(result.results[i].to, 'recipient@domain.com'); - assert.equal(result.results[i].subject, subject ? subject : 'Log event #' + (i+1)); - assert.ok(new RegExp('.+Log event #' + (i+1) + '\n$').test(result.results[i].text)); - } -} - -log4js.clearAppenders(); -vows.describe('log4js smtpAppender').addBatch({ - 'minimal config': { - topic: function() { - var setup = setupLogging('minimal config', { - recipients: 'recipient@domain.com', - transport: "SMTP", - SMTP: { - port: 25, - auth: { - user: 'user@domain.com' - } - } - }); - setup.logger.info('Log event #1'); - return setup; - }, - 'there should be one message only': function (result) { - assert.equal(result.results.length, 1); - }, - 'message should contain proper data': function (result) { - checkMessages(result); - } - }, - 'fancy config': { - topic: function() { - var setup = setupLogging('fancy config', { - recipients: 'recipient@domain.com', - sender: 'sender@domain.com', - subject: 'This is subject', - transport: "SMTP", - SMTP: { - port: 25, - auth: { - user: 'user@domain.com' - } - } - }); - setup.logger.info('Log event #1'); - return setup; - }, - 'there should be one message only': function (result) { - assert.equal(result.results.length, 1); - }, - 'message should contain proper data': function (result) { - checkMessages(result, 'sender@domain.com', 'This is subject'); - } - }, - 'config with layout': { - topic: function() { - var setup = setupLogging('config with layout', { - layout: { - type: "tester" - } - }); - return setup; - }, - 'should configure layout': function(result) { - assert.equal(result.layouts.type, 'tester'); - } - }, - 'separate email for each event': { - topic: function() { - var self = this; - var setup = setupLogging('separate email for each event', { - recipients: 'recipient@domain.com', - transport: "SMTP", - SMTP: { - port: 25, - auth: { - user: 'user@domain.com' - } - } - }); - setTimeout(function () { - setup.logger.info('Log event #1'); - }, 0); - setTimeout(function () { - setup.logger.info('Log event #2'); - }, 500); - setTimeout(function () { - setup.logger.info('Log event #3'); - }, 1050); - setTimeout(function () { - self.callback(null, setup); - }, 2100); - }, - 'there should be three messages': function (result) { - assert.equal(result.results.length, 3); - }, - 'messages should contain proper data': function (result) { - checkMessages(result); - } - }, - 'multiple events in one email': { - topic: function() { - var self = this; - var setup = setupLogging('multiple events in one email', { - recipients: 'recipient@domain.com', - sendInterval: 1, - transport: "SMTP", - SMTP: { - port: 25, - auth: { - user: 'user@domain.com' - } - } - }); - setTimeout(function () { - setup.logger.info('Log event #1'); - }, 0); - setTimeout(function () { - setup.logger.info('Log event #2'); - }, 500); - setTimeout(function () { - setup.logger.info('Log event #3'); - }, 1050); - setTimeout(function () { - self.callback(null, setup); - }, 2100); - }, - 'there should be two messages': function (result) { - assert.equal(result.results.length, 2); - }, - 'messages should contain proper data': function (result) { - assert.equal(result.results[0].to, 'recipient@domain.com'); - assert.equal(result.results[0].subject, 'Log event #1'); - assert.equal(result.results[0].text.match(new RegExp('.+Log event #[1-2]$', 'gm')).length, 2); - assert.equal(result.results[1].to, 'recipient@domain.com'); - assert.equal(result.results[1].subject, 'Log event #3'); - assert.ok(new RegExp('.+Log event #3\n$').test(result.results[1].text)); - } - }, - 'error when sending email': { - topic: function() { - var setup = setupLogging('error when sending email', { - recipients: 'recipient@domain.com', - sendInterval: 0, - transport: 'SMTP', - SMTP: { port: 25, auth: { user: 'user@domain.com' } } - }); - - setup.mailer.createTransport = function() { - return { - sendMail: function(msg, cb) { - cb({ message: "oh noes" }); - }, - close: function() { } - }; - }; - - setup.logger.info("This will break"); - return setup.console; - }, - 'should be logged to console': function(cons) { - assert.equal(cons.errors.length, 1); - assert.equal(cons.errors[0].msg, "log4js.smtpAppender - Error happened"); - assert.equal(cons.errors[0].value.message, 'oh noes'); - } - } - -}).export(module); - diff --git a/node_modules/karma/node_modules/log4js/test/streams/BaseRollingFileStream-test.js b/node_modules/karma/node_modules/log4js/test/streams/BaseRollingFileStream-test.js deleted file mode 100644 index a414d5a5..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/BaseRollingFileStream-test.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, fs = require('fs') -, sandbox = require('sandboxed-module'); - -vows.describe('../../lib/streams/BaseRollingFileStream').addBatch({ - 'when node version < 0.10.0': { - topic: function() { - var streamLib = sandbox.load( - '../../lib/streams/BaseRollingFileStream', - { - globals: { - process: { - version: '0.8.11' - } - }, - requires: { - 'readable-stream': { - Writable: function() {} - } - } - } - ); - return streamLib.required; - }, - 'it should use readable-stream to maintain compatibility': function(required) { - assert.ok(required['readable-stream']); - assert.ok(!required.stream); - } - }, - - 'when node version > 0.10.0': { - topic: function() { - var streamLib = sandbox.load( - '../../lib/streams/BaseRollingFileStream', - { - globals: { - process: { - version: '0.10.1' - } - }, - requires: { - 'stream': { - Writable: function() {} - } - } - } - ); - return streamLib.required; - }, - 'it should use the core stream module': function(required) { - assert.ok(required.stream); - assert.ok(!required['readable-stream']); - } - }, - - 'when no filename is passed': { - topic: require('../../lib/streams/BaseRollingFileStream'), - 'it should throw an error': function(BaseRollingFileStream) { - try { - new BaseRollingFileStream(); - assert.fail('should not get here'); - } catch (e) { - assert.ok(e); - } - } - }, - - 'default behaviour': { - topic: function() { - var BaseRollingFileStream = require('../../lib/streams/BaseRollingFileStream') - , stream = new BaseRollingFileStream('basetest.log'); - return stream; - }, - teardown: function() { - try { - fs.unlink('basetest.log'); - } catch (e) { - console.error("could not remove basetest.log", e); - } - }, - 'it should not want to roll': function(stream) { - assert.isFalse(stream.shouldRoll()); - }, - 'it should not roll': function(stream) { - var cbCalled = false; - //just calls the callback straight away, no async calls - stream.roll('basetest.log', function() { cbCalled = true; }); - assert.isTrue(cbCalled); - } - } -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/streams/DateRollingFileStream-test.js b/node_modules/karma/node_modules/log4js/test/streams/DateRollingFileStream-test.js deleted file mode 100644 index 33f014b2..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/DateRollingFileStream-test.js +++ /dev/null @@ -1,227 +0,0 @@ -"use strict"; -var vows = require('vows') -, assert = require('assert') -, fs = require('fs') -, semver = require('semver') -, streams -, DateRollingFileStream -, testTime = new Date(2012, 8, 12, 10, 37, 11); - -if (semver.satisfies(process.version, '>=0.10.0')) { - streams = require('stream'); -} else { - streams = require('readable-stream'); -} -DateRollingFileStream = require('../../lib/streams').DateRollingFileStream; - -function cleanUp(filename) { - return function() { - fs.unlink(filename); - }; -} - -function now() { - return testTime.getTime(); -} - -vows.describe('DateRollingFileStream').addBatch({ - 'arguments': { - topic: new DateRollingFileStream( - __dirname + '/test-date-rolling-file-stream-1', - 'yyyy-mm-dd.hh' - ), - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-1'), - - 'should take a filename and a pattern and return a WritableStream': function(stream) { - assert.equal(stream.filename, __dirname + '/test-date-rolling-file-stream-1'); - assert.equal(stream.pattern, 'yyyy-mm-dd.hh'); - assert.instanceOf(stream, streams.Writable); - }, - 'with default settings for the underlying stream': function(stream) { - assert.equal(stream.theStream.mode, 420); - assert.equal(stream.theStream.flags, 'a'); - //encoding is not available on the underlying stream - //assert.equal(stream.encoding, 'utf8'); - } - }, - - 'default arguments': { - topic: new DateRollingFileStream(__dirname + '/test-date-rolling-file-stream-2'), - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-2'), - - 'pattern should be .yyyy-MM-dd': function(stream) { - assert.equal(stream.pattern, '.yyyy-MM-dd'); - } - }, - - 'with stream arguments': { - topic: new DateRollingFileStream( - __dirname + '/test-date-rolling-file-stream-3', - 'yyyy-MM-dd', - { mode: parseInt('0666', 8) } - ), - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-3'), - - 'should pass them to the underlying stream': function(stream) { - assert.equal(stream.theStream.mode, parseInt('0666', 8)); - } - }, - - 'with stream arguments but no pattern': { - topic: new DateRollingFileStream( - __dirname + '/test-date-rolling-file-stream-4', - { mode: parseInt('0666', 8) } - ), - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-4'), - - 'should pass them to the underlying stream': function(stream) { - assert.equal(stream.theStream.mode, parseInt('0666', 8)); - }, - 'should use default pattern': function(stream) { - assert.equal(stream.pattern, '.yyyy-MM-dd'); - } - }, - - 'with a pattern of .yyyy-MM-dd': { - topic: function() { - var that = this, - stream = new DateRollingFileStream( - __dirname + '/test-date-rolling-file-stream-5', '.yyyy-MM-dd', - null, - now - ); - stream.write("First message\n", 'utf8', function() { - that.callback(null, stream); - }); - }, - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-5'), - - 'should create a file with the base name': { - topic: function(stream) { - fs.readFile(__dirname + '/test-date-rolling-file-stream-5', this.callback); - }, - 'file should contain first message': function(result) { - assert.equal(result.toString(), "First message\n"); - } - }, - - 'when the day changes': { - topic: function(stream) { - testTime = new Date(2012, 8, 13, 0, 10, 12); - stream.write("Second message\n", 'utf8', this.callback); - }, - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-5.2012-09-12'), - - - 'the number of files': { - topic: function() { - fs.readdir(__dirname, this.callback); - }, - 'should be two': function(files) { - assert.equal( - files.filter( - function(file) { - return file.indexOf('test-date-rolling-file-stream-5') > -1; - } - ).length, - 2 - ); - } - }, - - 'the file without a date': { - topic: function() { - fs.readFile(__dirname + '/test-date-rolling-file-stream-5', this.callback); - }, - 'should contain the second message': function(contents) { - assert.equal(contents.toString(), "Second message\n"); - } - }, - - 'the file with the date': { - topic: function() { - fs.readFile(__dirname + '/test-date-rolling-file-stream-5.2012-09-12', this.callback); - }, - 'should contain the first message': function(contents) { - assert.equal(contents.toString(), "First message\n"); - } - } - } - }, - - 'with alwaysIncludePattern': { - topic: function() { - var that = this, - testTime = new Date(2012, 8, 12, 0, 10, 12), - stream = new DateRollingFileStream( - __dirname + '/test-date-rolling-file-stream-pattern', - '.yyyy-MM-dd', - {alwaysIncludePattern: true}, - now - ); - stream.write("First message\n", 'utf8', function() { - that.callback(null, stream); - }); - }, - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-pattern.2012-09-12'), - - 'should create a file with the pattern set': { - topic: function(stream) { - fs.readFile(__dirname + '/test-date-rolling-file-stream-pattern.2012-09-12', this.callback); - }, - 'file should contain first message': function(result) { - assert.equal(result.toString(), "First message\n"); - } - }, - - 'when the day changes': { - topic: function(stream) { - testTime = new Date(2012, 8, 13, 0, 10, 12); - stream.write("Second message\n", 'utf8', this.callback); - }, - teardown: cleanUp(__dirname + '/test-date-rolling-file-stream-pattern.2012-09-13'), - - - 'the number of files': { - topic: function() { - fs.readdir(__dirname, this.callback); - }, - 'should be two': function(files) { - assert.equal( - files.filter( - function(file) { - return file.indexOf('test-date-rolling-file-stream-pattern') > -1; - } - ).length, - 2 - ); - } - }, - - 'the file with the later date': { - topic: function() { - fs.readFile( - __dirname + '/test-date-rolling-file-stream-pattern.2012-09-13', - this.callback - ); - }, - 'should contain the second message': function(contents) { - assert.equal(contents.toString(), "Second message\n"); - } - }, - - 'the file with the date': { - topic: function() { - fs.readFile( - __dirname + '/test-date-rolling-file-stream-pattern.2012-09-12', - this.callback - ); - }, - 'should contain the first message': function(contents) { - assert.equal(contents.toString(), "First message\n"); - } - } - } - } - -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/streams/rollingFileStream-test.js b/node_modules/karma/node_modules/log4js/test/streams/rollingFileStream-test.js deleted file mode 100644 index f39c2dc0..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/rollingFileStream-test.js +++ /dev/null @@ -1,210 +0,0 @@ -"use strict"; -var vows = require('vows') -, async = require('async') -, assert = require('assert') -, events = require('events') -, fs = require('fs') -, semver = require('semver') -, streams -, RollingFileStream; - -if (semver.satisfies(process.version, '>=0.10.0')) { - streams = require('stream'); -} else { - streams = require('readable-stream'); -} -RollingFileStream = require('../../lib/streams').RollingFileStream; - -function remove(filename) { - try { - fs.unlinkSync(filename); - } catch (e) { - //doesn't really matter if it failed - } -} - -function create(filename) { - fs.writeFileSync(filename, "test file"); -} - -vows.describe('RollingFileStream').addBatch({ - 'arguments': { - topic: function() { - remove(__dirname + "/test-rolling-file-stream"); - return new RollingFileStream("test-rolling-file-stream", 1024, 5); - }, - 'should take a filename, file size (bytes), no. backups, return Writable': function(stream) { - assert.instanceOf(stream, streams.Writable); - assert.equal(stream.filename, "test-rolling-file-stream"); - assert.equal(stream.size, 1024); - assert.equal(stream.backups, 5); - }, - 'with default settings for the underlying stream': function(stream) { - assert.equal(stream.theStream.mode, 420); - assert.equal(stream.theStream.flags, 'a'); - //encoding isn't a property on the underlying stream - //assert.equal(stream.theStream.encoding, 'utf8'); - } - }, - 'with stream arguments': { - topic: function() { - remove(__dirname + '/test-rolling-file-stream'); - return new RollingFileStream( - 'test-rolling-file-stream', - 1024, - 5, - { mode: parseInt('0666', 8) } - ); - }, - 'should pass them to the underlying stream': function(stream) { - assert.equal(stream.theStream.mode, parseInt('0666', 8)); - } - }, - 'without size': { - topic: function() { - try { - new RollingFileStream(__dirname + "/test-rolling-file-stream"); - } catch (e) { - return e; - } - }, - 'should throw an error': function(err) { - assert.instanceOf(err, Error); - } - }, - 'without number of backups': { - topic: function() { - remove('test-rolling-file-stream'); - return new RollingFileStream(__dirname + "/test-rolling-file-stream", 1024); - }, - 'should default to 1 backup': function(stream) { - assert.equal(stream.backups, 1); - } - }, - 'writing less than the file size': { - topic: function() { - remove(__dirname + "/test-rolling-file-stream-write-less"); - var that = this - , stream = new RollingFileStream( - __dirname + "/test-rolling-file-stream-write-less", - 100 - ); - stream.write("cheese", "utf8", function() { - stream.end(); - fs.readFile(__dirname + "/test-rolling-file-stream-write-less", "utf8", that.callback); - }); - }, - 'should write to the file': function(contents) { - assert.equal(contents, "cheese"); - }, - 'the number of files': { - topic: function() { - fs.readdir(__dirname, this.callback); - }, - 'should be one': function(files) { - assert.equal( - files.filter( - function(file) { - return file.indexOf('test-rolling-file-stream-write-less') > -1; - } - ).length, - 1 - ); - } - } - }, - 'writing more than the file size': { - topic: function() { - remove(__dirname + "/test-rolling-file-stream-write-more"); - remove(__dirname + "/test-rolling-file-stream-write-more.1"); - var that = this - , stream = new RollingFileStream( - __dirname + "/test-rolling-file-stream-write-more", - 45 - ); - async.forEach( - [0, 1, 2, 3, 4, 5, 6], - function(i, cb) { - stream.write(i +".cheese\n", "utf8", cb); - }, - function() { - stream.end(); - that.callback(); - } - ); - }, - 'the number of files': { - topic: function() { - fs.readdir(__dirname, this.callback); - }, - 'should be two': function(files) { - assert.equal(files.filter( - function(file) { - return file.indexOf('test-rolling-file-stream-write-more') > -1; - } - ).length, 2); - } - }, - 'the first file': { - topic: function() { - fs.readFile(__dirname + "/test-rolling-file-stream-write-more", "utf8", this.callback); - }, - 'should contain the last two log messages': function(contents) { - assert.equal(contents, '5.cheese\n6.cheese\n'); - } - }, - 'the second file': { - topic: function() { - fs.readFile(__dirname + '/test-rolling-file-stream-write-more.1', "utf8", this.callback); - }, - 'should contain the first five log messages': function(contents) { - assert.equal(contents, '0.cheese\n1.cheese\n2.cheese\n3.cheese\n4.cheese\n'); - } - } - }, - 'when many files already exist': { - topic: function() { - remove(__dirname + '/test-rolling-stream-with-existing-files.11'); - remove(__dirname + '/test-rolling-stream-with-existing-files.20'); - remove(__dirname + '/test-rolling-stream-with-existing-files.-1'); - remove(__dirname + '/test-rolling-stream-with-existing-files.1.1'); - remove(__dirname + '/test-rolling-stream-with-existing-files.1'); - - - create(__dirname + '/test-rolling-stream-with-existing-files.11'); - create(__dirname + '/test-rolling-stream-with-existing-files.20'); - create(__dirname + '/test-rolling-stream-with-existing-files.-1'); - create(__dirname + '/test-rolling-stream-with-existing-files.1.1'); - create(__dirname + '/test-rolling-stream-with-existing-files.1'); - - var that = this - , stream = new RollingFileStream( - __dirname + "/test-rolling-stream-with-existing-files", - 45, - 5 - ); - async.forEach( - [0, 1, 2, 3, 4, 5, 6], - function(i, cb) { - stream.write(i +".cheese\n", "utf8", cb); - }, - function() { - stream.end(); - that.callback(); - } - ); - }, - 'the files': { - topic: function() { - fs.readdir(__dirname, this.callback); - }, - 'should be rolled': function(files) { - assert.include(files, 'test-rolling-stream-with-existing-files'); - assert.include(files, 'test-rolling-stream-with-existing-files.1'); - assert.include(files, 'test-rolling-stream-with-existing-files.2'); - assert.include(files, 'test-rolling-stream-with-existing-files.11'); - assert.include(files, 'test-rolling-stream-with-existing-files.20'); - } - } - } -}).exportTo(module); diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-less b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-less deleted file mode 100644 index eb264740..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-less +++ /dev/null @@ -1 +0,0 @@ -cheese \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-more b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-more deleted file mode 100644 index cd10dcf4..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-more +++ /dev/null @@ -1,2 +0,0 @@ -5.cheese -6.cheese diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-more.1 b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-more.1 deleted file mode 100644 index b8529ddd..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-file-stream-write-more.1 +++ /dev/null @@ -1,5 +0,0 @@ -0.cheese -1.cheese -2.cheese -3.cheese -4.cheese diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files deleted file mode 100644 index cd10dcf4..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files +++ /dev/null @@ -1,2 +0,0 @@ -5.cheese -6.cheese diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.0 b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.0 deleted file mode 100644 index bdf08de0..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.0 +++ /dev/null @@ -1 +0,0 @@ -test file \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.1 b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.1 deleted file mode 100644 index b8529ddd..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.1 +++ /dev/null @@ -1,5 +0,0 @@ -0.cheese -1.cheese -2.cheese -3.cheese -4.cheese diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.11 b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.11 deleted file mode 100644 index bdf08de0..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.11 +++ /dev/null @@ -1 +0,0 @@ -test file \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.2 b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.2 deleted file mode 100644 index bdf08de0..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.2 +++ /dev/null @@ -1 +0,0 @@ -test file \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.20 b/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.20 deleted file mode 100644 index bdf08de0..00000000 --- a/node_modules/karma/node_modules/log4js/test/streams/test-rolling-stream-with-existing-files.20 +++ /dev/null @@ -1 +0,0 @@ -test file \ No newline at end of file diff --git a/node_modules/karma/node_modules/log4js/test/with-categoryFilter.json b/node_modules/karma/node_modules/log4js/test/with-categoryFilter.json deleted file mode 100644 index 7998cc85..00000000 --- a/node_modules/karma/node_modules/log4js/test/with-categoryFilter.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "appenders": [ - { - "type": "categoryFilter", - "exclude": "web", - "appender": { - "type": "file", - "filename": "test/categoryFilter-noweb.log", - "layout": { - "type": "messagePassThrough" - } - } - }, - { - "category": "web", - "type": "file", - "filename": "test/categoryFilter-web.log", - "layout": { - "type": "messagePassThrough" - } - } - ] -} diff --git a/node_modules/karma/node_modules/log4js/test/with-dateFile.json b/node_modules/karma/node_modules/log4js/test/with-dateFile.json deleted file mode 100644 index 18727433..00000000 --- a/node_modules/karma/node_modules/log4js/test/with-dateFile.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "appenders": [ - { - "category": "tests", - "type": "dateFile", - "filename": "test/date-file-test.log", - "pattern": "-from-MM-dd", - "layout": { - "type": "messagePassThrough" - } - } - ], - - "levels": { - "tests": "WARN" - } -} diff --git a/node_modules/karma/node_modules/log4js/test/with-log-rolling.json b/node_modules/karma/node_modules/log4js/test/with-log-rolling.json deleted file mode 100644 index e946f313..00000000 --- a/node_modules/karma/node_modules/log4js/test/with-log-rolling.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "appenders": [ - { - "type": "file", - "filename": "tmp-test.log", - "maxLogSize": 1024, - "backups": 3 - } - ] -} diff --git a/node_modules/karma/node_modules/log4js/test/with-logLevelFilter.json b/node_modules/karma/node_modules/log4js/test/with-logLevelFilter.json deleted file mode 100644 index d564aced..00000000 --- a/node_modules/karma/node_modules/log4js/test/with-logLevelFilter.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "appenders": [ - { - "category": "tests", - "type": "logLevelFilter", - "level": "WARN", - "appender": { - "type": "file", - "filename": "test/logLevelFilter-warnings.log", - "layout": { - "type": "messagePassThrough" - } - } - }, - { - "category": "tests", - "type": "file", - "filename": "test/logLevelFilter.log", - "layout": { - "type": "messagePassThrough" - } - } - ], - - "levels": { - "tests": "DEBUG" - } -} diff --git a/node_modules/karma/node_modules/log4js/test0 b/node_modules/karma/node_modules/log4js/test0 deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/log4js/test1 b/node_modules/karma/node_modules/log4js/test1 deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/log4js/test2 b/node_modules/karma/node_modules/log4js/test2 deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/log4js/test3 b/node_modules/karma/node_modules/log4js/test3 deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/log4js/test4 b/node_modules/karma/node_modules/log4js/test4 deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/mime/LICENSE b/node_modules/karma/node_modules/mime/LICENSE deleted file mode 100644 index 451fc455..00000000 --- a/node_modules/karma/node_modules/mime/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2010 Benjamin Thomas, Robert Kieffer - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma/node_modules/mime/README.md b/node_modules/karma/node_modules/mime/README.md deleted file mode 100644 index 6ca19bd1..00000000 --- a/node_modules/karma/node_modules/mime/README.md +++ /dev/null @@ -1,66 +0,0 @@ -# mime - -Comprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community. - -## Install - -Install with [npm](http://github.com/isaacs/npm): - - npm install mime - -## API - Queries - -### mime.lookup(path) -Get the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g. - - var mime = require('mime'); - - mime.lookup('/path/to/file.txt'); // => 'text/plain' - mime.lookup('file.txt'); // => 'text/plain' - mime.lookup('.TXT'); // => 'text/plain' - mime.lookup('htm'); // => 'text/html' - -### mime.default_type -Sets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.) - -### mime.extension(type) -Get the default extension for `type` - - mime.extension('text/html'); // => 'html' - mime.extension('application/octet-stream'); // => 'bin' - -### mime.charsets.lookup() - -Map mime-type to charset - - mime.charsets.lookup('text/plain'); // => 'UTF-8' - -(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.) - -## API - Defining Custom Types - -The following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types). - -### mime.define() - -Add custom mime/extension mappings - - mime.define({ - 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'], - 'application/x-my-type': ['x-mt', 'x-mtt'], - // etc ... - }); - - mime.lookup('x-sft'); // => 'text/x-some-format' - -The first entry in the extensions array is returned by `mime.extension()`. E.g. - - mime.extension('text/x-some-format'); // => 'x-sf' - -### mime.load(filepath) - -Load mappings from an Apache ".types" format file - - mime.load('./my_project.types'); - -The .types file format is simple - See the `types` dir for examples. diff --git a/node_modules/karma/node_modules/mime/mime.js b/node_modules/karma/node_modules/mime/mime.js deleted file mode 100644 index 48be0c5e..00000000 --- a/node_modules/karma/node_modules/mime/mime.js +++ /dev/null @@ -1,114 +0,0 @@ -var path = require('path'); -var fs = require('fs'); - -function Mime() { - // Map of extension -> mime type - this.types = Object.create(null); - - // Map of mime type -> extension - this.extensions = Object.create(null); -} - -/** - * Define mimetype -> extension mappings. Each key is a mime-type that maps - * to an array of extensions associated with the type. The first extension is - * used as the default extension for the type. - * - * e.g. mime.define({'audio/ogg', ['oga', 'ogg', 'spx']}); - * - * @param map (Object) type definitions - */ -Mime.prototype.define = function (map) { - for (var type in map) { - var exts = map[type]; - - for (var i = 0; i < exts.length; i++) { - if (process.env.DEBUG_MIME && this.types[exts]) { - console.warn(this._loading.replace(/.*\//, ''), 'changes "' + exts[i] + '" extension type from ' + - this.types[exts] + ' to ' + type); - } - - this.types[exts[i]] = type; - } - - // Default extension is the first one we encounter - if (!this.extensions[type]) { - this.extensions[type] = exts[0]; - } - } -}; - -/** - * Load an Apache2-style ".types" file - * - * This may be called multiple times (it's expected). Where files declare - * overlapping types/extensions, the last file wins. - * - * @param file (String) path of file to load. - */ -Mime.prototype.load = function(file) { - - this._loading = file; - // Read file and split into lines - var map = {}, - content = fs.readFileSync(file, 'ascii'), - lines = content.split(/[\r\n]+/); - - lines.forEach(function(line) { - // Clean up whitespace/comments, and split into fields - var fields = line.replace(/\s*#.*|^\s*|\s*$/g, '').split(/\s+/); - map[fields.shift()] = fields; - }); - - this.define(map); - - this._loading = null; -}; - -/** - * Lookup a mime type based on extension - */ -Mime.prototype.lookup = function(path, fallback) { - var ext = path.replace(/.*[\.\/\\]/, '').toLowerCase(); - - return this.types[ext] || fallback || this.default_type; -}; - -/** - * Return file extension associated with a mime type - */ -Mime.prototype.extension = function(mimeType) { - var type = mimeType.match(/^\s*([^;\s]*)(?:;|\s|$)/)[1].toLowerCase(); - return this.extensions[type]; -}; - -// Default instance -var mime = new Mime(); - -// Load local copy of -// http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types -mime.load(path.join(__dirname, 'types/mime.types')); - -// Load additional types from node.js community -mime.load(path.join(__dirname, 'types/node.types')); - -// Default type -mime.default_type = mime.lookup('bin'); - -// -// Additional API specific to the default instance -// - -mime.Mime = Mime; - -/** - * Lookup a charset based on mime type. - */ -mime.charsets = { - lookup: function(mimeType, fallback) { - // Assume text types are utf8 - return (/^text\//).test(mimeType) ? 'UTF-8' : fallback; - } -}; - -module.exports = mime; diff --git a/node_modules/karma/node_modules/mime/package.json b/node_modules/karma/node_modules/mime/package.json deleted file mode 100644 index bf35281e..00000000 --- a/node_modules/karma/node_modules/mime/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "author": { - "name": "Robert Kieffer", - "email": "robert@broofa.com", - "url": "http://github.com/broofa" - }, - "contributors": [ - { - "name": "Benjamin Thomas", - "email": "benjamin@benjaminthomas.org", - "url": "http://github.com/bentomas" - } - ], - "dependencies": {}, - "description": "A comprehensive library for mime-type mapping", - "devDependencies": {}, - "keywords": [ - "util", - "mime" - ], - "main": "mime.js", - "name": "mime", - "repository": { - "url": "https://github.com/broofa/node-mime", - "type": "git" - }, - "version": "1.2.11", - "readme": "# mime\n\nComprehensive MIME type mapping API. Includes all 600+ types and 800+ extensions defined by the Apache project, plus additional types submitted by the node.js community.\n\n## Install\n\nInstall with [npm](http://github.com/isaacs/npm):\n\n npm install mime\n\n## API - Queries\n\n### mime.lookup(path)\nGet the mime type associated with a file, if no mime type is found `application/octet-stream` is returned. Performs a case-insensitive lookup using the extension in `path` (the substring after the last '/' or '.'). E.g.\n\n var mime = require('mime');\n\n mime.lookup('/path/to/file.txt'); // => 'text/plain'\n mime.lookup('file.txt'); // => 'text/plain'\n mime.lookup('.TXT'); // => 'text/plain'\n mime.lookup('htm'); // => 'text/html'\n\n### mime.default_type\nSets the mime type returned when `mime.lookup` fails to find the extension searched for. (Default is `application/octet-stream`.)\n\n### mime.extension(type)\nGet the default extension for `type`\n\n mime.extension('text/html'); // => 'html'\n mime.extension('application/octet-stream'); // => 'bin'\n\n### mime.charsets.lookup()\n\nMap mime-type to charset\n\n mime.charsets.lookup('text/plain'); // => 'UTF-8'\n\n(The logic for charset lookups is pretty rudimentary. Feel free to suggest improvements.)\n\n## API - Defining Custom Types\n\nThe following APIs allow you to add your own type mappings within your project. If you feel a type should be included as part of node-mime, see [requesting new types](https://github.com/broofa/node-mime/wiki/Requesting-New-Types).\n\n### mime.define()\n\nAdd custom mime/extension mappings\n\n mime.define({\n 'text/x-some-format': ['x-sf', 'x-sft', 'x-sfml'],\n 'application/x-my-type': ['x-mt', 'x-mtt'],\n // etc ...\n });\n\n mime.lookup('x-sft'); // => 'text/x-some-format'\n\nThe first entry in the extensions array is returned by `mime.extension()`. E.g.\n\n mime.extension('text/x-some-format'); // => 'x-sf'\n\n### mime.load(filepath)\n\nLoad mappings from an Apache \".types\" format file\n\n mime.load('./my_project.types');\n\nThe .types file format is simple - See the `types` dir for examples.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/broofa/node-mime/issues" - }, - "homepage": "https://github.com/broofa/node-mime", - "_id": "mime@1.2.11", - "_from": "mime@~1.2" -} diff --git a/node_modules/karma/node_modules/mime/test.js b/node_modules/karma/node_modules/mime/test.js deleted file mode 100644 index 2cda1c7a..00000000 --- a/node_modules/karma/node_modules/mime/test.js +++ /dev/null @@ -1,84 +0,0 @@ -/** - * Usage: node test.js - */ - -var mime = require('./mime'); -var assert = require('assert'); -var path = require('path'); - -function eq(a, b) { - console.log('Test: ' + a + ' === ' + b); - assert.strictEqual.apply(null, arguments); -} - -console.log(Object.keys(mime.extensions).length + ' types'); -console.log(Object.keys(mime.types).length + ' extensions\n'); - -// -// Test mime lookups -// - -eq('text/plain', mime.lookup('text.txt')); // normal file -eq('text/plain', mime.lookup('TEXT.TXT')); // uppercase -eq('text/plain', mime.lookup('dir/text.txt')); // dir + file -eq('text/plain', mime.lookup('.text.txt')); // hidden file -eq('text/plain', mime.lookup('.txt')); // nameless -eq('text/plain', mime.lookup('txt')); // extension-only -eq('text/plain', mime.lookup('/txt')); // extension-less () -eq('text/plain', mime.lookup('\\txt')); // Windows, extension-less -eq('application/octet-stream', mime.lookup('text.nope')); // unrecognized -eq('fallback', mime.lookup('text.fallback', 'fallback')); // alternate default - -// -// Test extensions -// - -eq('txt', mime.extension(mime.types.text)); -eq('html', mime.extension(mime.types.htm)); -eq('bin', mime.extension('application/octet-stream')); -eq('bin', mime.extension('application/octet-stream ')); -eq('html', mime.extension(' text/html; charset=UTF-8')); -eq('html', mime.extension('text/html; charset=UTF-8 ')); -eq('html', mime.extension('text/html; charset=UTF-8')); -eq('html', mime.extension('text/html ; charset=UTF-8')); -eq('html', mime.extension('text/html;charset=UTF-8')); -eq('html', mime.extension('text/Html;charset=UTF-8')); -eq(undefined, mime.extension('unrecognized')); - -// -// Test node.types lookups -// - -eq('application/font-woff', mime.lookup('file.woff')); -eq('application/octet-stream', mime.lookup('file.buffer')); -eq('audio/mp4', mime.lookup('file.m4a')); -eq('font/opentype', mime.lookup('file.otf')); - -// -// Test charsets -// - -eq('UTF-8', mime.charsets.lookup('text/plain')); -eq(undefined, mime.charsets.lookup(mime.types.js)); -eq('fallback', mime.charsets.lookup('application/octet-stream', 'fallback')); - -// -// Test for overlaps between mime.types and node.types -// - -var apacheTypes = new mime.Mime(), nodeTypes = new mime.Mime(); -apacheTypes.load(path.join(__dirname, 'types/mime.types')); -nodeTypes.load(path.join(__dirname, 'types/node.types')); - -var keys = [].concat(Object.keys(apacheTypes.types)) - .concat(Object.keys(nodeTypes.types)); -keys.sort(); -for (var i = 1; i < keys.length; i++) { - if (keys[i] == keys[i-1]) { - console.warn('Warning: ' + - 'node.types defines ' + keys[i] + '->' + nodeTypes.types[keys[i]] + - ', mime.types defines ' + keys[i] + '->' + apacheTypes.types[keys[i]]); - } -} - -console.log('\nOK'); diff --git a/node_modules/karma/node_modules/mime/types/mime.types b/node_modules/karma/node_modules/mime/types/mime.types deleted file mode 100644 index da8cd691..00000000 --- a/node_modules/karma/node_modules/mime/types/mime.types +++ /dev/null @@ -1,1588 +0,0 @@ -# This file maps Internet media types to unique file extension(s). -# Although created for httpd, this file is used by many software systems -# and has been placed in the public domain for unlimited redisribution. -# -# The table below contains both registered and (common) unregistered types. -# A type that has no unique extension can be ignored -- they are listed -# here to guide configurations toward known types and to make it easier to -# identify "new" types. File extensions are also commonly used to indicate -# content languages and encodings, so choose them carefully. -# -# Internet media types should be registered as described in RFC 4288. -# The registry is at . -# -# MIME type (lowercased) Extensions -# ============================================ ========== -# application/1d-interleaved-parityfec -# application/3gpp-ims+xml -# application/activemessage -application/andrew-inset ez -# application/applefile -application/applixware aw -application/atom+xml atom -application/atomcat+xml atomcat -# application/atomicmail -application/atomsvc+xml atomsvc -# application/auth-policy+xml -# application/batch-smtp -# application/beep+xml -# application/calendar+xml -# application/cals-1840 -# application/ccmp+xml -application/ccxml+xml ccxml -application/cdmi-capability cdmia -application/cdmi-container cdmic -application/cdmi-domain cdmid -application/cdmi-object cdmio -application/cdmi-queue cdmiq -# application/cea-2018+xml -# application/cellml+xml -# application/cfw -# application/cnrp+xml -# application/commonground -# application/conference-info+xml -# application/cpl+xml -# application/csta+xml -# application/cstadata+xml -application/cu-seeme cu -# application/cybercash -application/davmount+xml davmount -# application/dca-rft -# application/dec-dx -# application/dialog-info+xml -# application/dicom -# application/dns -application/docbook+xml dbk -# application/dskpp+xml -application/dssc+der dssc -application/dssc+xml xdssc -# application/dvcs -application/ecmascript ecma -# application/edi-consent -# application/edi-x12 -# application/edifact -application/emma+xml emma -# application/epp+xml -application/epub+zip epub -# application/eshop -# application/example -application/exi exi -# application/fastinfoset -# application/fastsoap -# application/fits -application/font-tdpfr pfr -# application/framework-attributes+xml -application/gml+xml gml -application/gpx+xml gpx -application/gxf gxf -# application/h224 -# application/held+xml -# application/http -application/hyperstudio stk -# application/ibe-key-request+xml -# application/ibe-pkg-reply+xml -# application/ibe-pp-data -# application/iges -# application/im-iscomposing+xml -# application/index -# application/index.cmd -# application/index.obj -# application/index.response -# application/index.vnd -application/inkml+xml ink inkml -# application/iotp -application/ipfix ipfix -# application/ipp -# application/isup -application/java-archive jar -application/java-serialized-object ser -application/java-vm class -application/javascript js -application/json json -application/jsonml+json jsonml -# application/kpml-request+xml -# application/kpml-response+xml -application/lost+xml lostxml -application/mac-binhex40 hqx -application/mac-compactpro cpt -# application/macwriteii -application/mads+xml mads -application/marc mrc -application/marcxml+xml mrcx -application/mathematica ma nb mb -# application/mathml-content+xml -# application/mathml-presentation+xml -application/mathml+xml mathml -# application/mbms-associated-procedure-description+xml -# application/mbms-deregister+xml -# application/mbms-envelope+xml -# application/mbms-msk+xml -# application/mbms-msk-response+xml -# application/mbms-protection-description+xml -# application/mbms-reception-report+xml -# application/mbms-register+xml -# application/mbms-register-response+xml -# application/mbms-user-service-description+xml -application/mbox mbox -# application/media_control+xml -application/mediaservercontrol+xml mscml -application/metalink+xml metalink -application/metalink4+xml meta4 -application/mets+xml mets -# application/mikey -application/mods+xml mods -# application/moss-keys -# application/moss-signature -# application/mosskey-data -# application/mosskey-request -application/mp21 m21 mp21 -application/mp4 mp4s -# application/mpeg4-generic -# application/mpeg4-iod -# application/mpeg4-iod-xmt -# application/msc-ivr+xml -# application/msc-mixer+xml -application/msword doc dot -application/mxf mxf -# application/nasdata -# application/news-checkgroups -# application/news-groupinfo -# application/news-transmission -# application/nss -# application/ocsp-request -# application/ocsp-response -application/octet-stream bin dms lrf mar so dist distz pkg bpk dump elc deploy -application/oda oda -application/oebps-package+xml opf -application/ogg ogx -application/omdoc+xml omdoc -application/onenote onetoc onetoc2 onetmp onepkg -application/oxps oxps -# application/parityfec -application/patch-ops-error+xml xer -application/pdf pdf -application/pgp-encrypted pgp -# application/pgp-keys -application/pgp-signature asc sig -application/pics-rules prf -# application/pidf+xml -# application/pidf-diff+xml -application/pkcs10 p10 -application/pkcs7-mime p7m p7c -application/pkcs7-signature p7s -application/pkcs8 p8 -application/pkix-attr-cert ac -application/pkix-cert cer -application/pkix-crl crl -application/pkix-pkipath pkipath -application/pkixcmp pki -application/pls+xml pls -# application/poc-settings+xml -application/postscript ai eps ps -# application/prs.alvestrand.titrax-sheet -application/prs.cww cww -# application/prs.nprend -# application/prs.plucker -# application/prs.rdf-xml-crypt -# application/prs.xsf+xml -application/pskc+xml pskcxml -# application/qsig -application/rdf+xml rdf -application/reginfo+xml rif -application/relax-ng-compact-syntax rnc -# application/remote-printing -application/resource-lists+xml rl -application/resource-lists-diff+xml rld -# application/riscos -# application/rlmi+xml -application/rls-services+xml rs -application/rpki-ghostbusters gbr -application/rpki-manifest mft -application/rpki-roa roa -# application/rpki-updown -application/rsd+xml rsd -application/rss+xml rss -application/rtf rtf -# application/rtx -# application/samlassertion+xml -# application/samlmetadata+xml -application/sbml+xml sbml -application/scvp-cv-request scq -application/scvp-cv-response scs -application/scvp-vp-request spq -application/scvp-vp-response spp -application/sdp sdp -# application/set-payment -application/set-payment-initiation setpay -# application/set-registration -application/set-registration-initiation setreg -# application/sgml -# application/sgml-open-catalog -application/shf+xml shf -# application/sieve -# application/simple-filter+xml -# application/simple-message-summary -# application/simplesymbolcontainer -# application/slate -# application/smil -application/smil+xml smi smil -# application/soap+fastinfoset -# application/soap+xml -application/sparql-query rq -application/sparql-results+xml srx -# application/spirits-event+xml -application/srgs gram -application/srgs+xml grxml -application/sru+xml sru -application/ssdl+xml ssdl -application/ssml+xml ssml -# application/tamp-apex-update -# application/tamp-apex-update-confirm -# application/tamp-community-update -# application/tamp-community-update-confirm -# application/tamp-error -# application/tamp-sequence-adjust -# application/tamp-sequence-adjust-confirm -# application/tamp-status-query -# application/tamp-status-response -# application/tamp-update -# application/tamp-update-confirm -application/tei+xml tei teicorpus -application/thraud+xml tfi -# application/timestamp-query -# application/timestamp-reply -application/timestamped-data tsd -# application/tve-trigger -# application/ulpfec -# application/vcard+xml -# application/vemmi -# application/vividence.scriptfile -# application/vnd.3gpp.bsf+xml -application/vnd.3gpp.pic-bw-large plb -application/vnd.3gpp.pic-bw-small psb -application/vnd.3gpp.pic-bw-var pvb -# application/vnd.3gpp.sms -# application/vnd.3gpp2.bcmcsinfo+xml -# application/vnd.3gpp2.sms -application/vnd.3gpp2.tcap tcap -application/vnd.3m.post-it-notes pwn -application/vnd.accpac.simply.aso aso -application/vnd.accpac.simply.imp imp -application/vnd.acucobol acu -application/vnd.acucorp atc acutc -application/vnd.adobe.air-application-installer-package+zip air -application/vnd.adobe.formscentral.fcdt fcdt -application/vnd.adobe.fxp fxp fxpl -# application/vnd.adobe.partial-upload -application/vnd.adobe.xdp+xml xdp -application/vnd.adobe.xfdf xfdf -# application/vnd.aether.imp -# application/vnd.ah-barcode -application/vnd.ahead.space ahead -application/vnd.airzip.filesecure.azf azf -application/vnd.airzip.filesecure.azs azs -application/vnd.amazon.ebook azw -application/vnd.americandynamics.acc acc -application/vnd.amiga.ami ami -# application/vnd.amundsen.maze+xml -application/vnd.android.package-archive apk -application/vnd.anser-web-certificate-issue-initiation cii -application/vnd.anser-web-funds-transfer-initiation fti -application/vnd.antix.game-component atx -application/vnd.apple.installer+xml mpkg -application/vnd.apple.mpegurl m3u8 -# application/vnd.arastra.swi -application/vnd.aristanetworks.swi swi -application/vnd.astraea-software.iota iota -application/vnd.audiograph aep -# application/vnd.autopackage -# application/vnd.avistar+xml -application/vnd.blueice.multipass mpm -# application/vnd.bluetooth.ep.oob -application/vnd.bmi bmi -application/vnd.businessobjects rep -# application/vnd.cab-jscript -# application/vnd.canon-cpdl -# application/vnd.canon-lips -# application/vnd.cendio.thinlinc.clientconf -application/vnd.chemdraw+xml cdxml -application/vnd.chipnuts.karaoke-mmd mmd -application/vnd.cinderella cdy -# application/vnd.cirpack.isdn-ext -application/vnd.claymore cla -application/vnd.cloanto.rp9 rp9 -application/vnd.clonk.c4group c4g c4d c4f c4p c4u -application/vnd.cluetrust.cartomobile-config c11amc -application/vnd.cluetrust.cartomobile-config-pkg c11amz -# application/vnd.collection+json -# application/vnd.commerce-battelle -application/vnd.commonspace csp -application/vnd.contact.cmsg cdbcmsg -application/vnd.cosmocaller cmc -application/vnd.crick.clicker clkx -application/vnd.crick.clicker.keyboard clkk -application/vnd.crick.clicker.palette clkp -application/vnd.crick.clicker.template clkt -application/vnd.crick.clicker.wordbank clkw -application/vnd.criticaltools.wbs+xml wbs -application/vnd.ctc-posml pml -# application/vnd.ctct.ws+xml -# application/vnd.cups-pdf -# application/vnd.cups-postscript -application/vnd.cups-ppd ppd -# application/vnd.cups-raster -# application/vnd.cups-raw -# application/vnd.curl -application/vnd.curl.car car -application/vnd.curl.pcurl pcurl -# application/vnd.cybank -application/vnd.dart dart -application/vnd.data-vision.rdz rdz -application/vnd.dece.data uvf uvvf uvd uvvd -application/vnd.dece.ttml+xml uvt uvvt -application/vnd.dece.unspecified uvx uvvx -application/vnd.dece.zip uvz uvvz -application/vnd.denovo.fcselayout-link fe_launch -# application/vnd.dir-bi.plate-dl-nosuffix -application/vnd.dna dna -application/vnd.dolby.mlp mlp -# application/vnd.dolby.mobile.1 -# application/vnd.dolby.mobile.2 -application/vnd.dpgraph dpg -application/vnd.dreamfactory dfac -application/vnd.ds-keypoint kpxx -application/vnd.dvb.ait ait -# application/vnd.dvb.dvbj -# application/vnd.dvb.esgcontainer -# application/vnd.dvb.ipdcdftnotifaccess -# application/vnd.dvb.ipdcesgaccess -# application/vnd.dvb.ipdcesgaccess2 -# application/vnd.dvb.ipdcesgpdd -# application/vnd.dvb.ipdcroaming -# application/vnd.dvb.iptv.alfec-base -# application/vnd.dvb.iptv.alfec-enhancement -# application/vnd.dvb.notif-aggregate-root+xml -# application/vnd.dvb.notif-container+xml -# application/vnd.dvb.notif-generic+xml -# application/vnd.dvb.notif-ia-msglist+xml -# application/vnd.dvb.notif-ia-registration-request+xml -# application/vnd.dvb.notif-ia-registration-response+xml -# application/vnd.dvb.notif-init+xml -# application/vnd.dvb.pfr -application/vnd.dvb.service svc -# application/vnd.dxr -application/vnd.dynageo geo -# application/vnd.easykaraoke.cdgdownload -# application/vnd.ecdis-update -application/vnd.ecowin.chart mag -# application/vnd.ecowin.filerequest -# application/vnd.ecowin.fileupdate -# application/vnd.ecowin.series -# application/vnd.ecowin.seriesrequest -# application/vnd.ecowin.seriesupdate -# application/vnd.emclient.accessrequest+xml -application/vnd.enliven nml -# application/vnd.eprints.data+xml -application/vnd.epson.esf esf -application/vnd.epson.msf msf -application/vnd.epson.quickanime qam -application/vnd.epson.salt slt -application/vnd.epson.ssf ssf -# application/vnd.ericsson.quickcall -application/vnd.eszigno3+xml es3 et3 -# application/vnd.etsi.aoc+xml -# application/vnd.etsi.cug+xml -# application/vnd.etsi.iptvcommand+xml -# application/vnd.etsi.iptvdiscovery+xml -# application/vnd.etsi.iptvprofile+xml -# application/vnd.etsi.iptvsad-bc+xml -# application/vnd.etsi.iptvsad-cod+xml -# application/vnd.etsi.iptvsad-npvr+xml -# application/vnd.etsi.iptvservice+xml -# application/vnd.etsi.iptvsync+xml -# application/vnd.etsi.iptvueprofile+xml -# application/vnd.etsi.mcid+xml -# application/vnd.etsi.overload-control-policy-dataset+xml -# application/vnd.etsi.sci+xml -# application/vnd.etsi.simservs+xml -# application/vnd.etsi.tsl+xml -# application/vnd.etsi.tsl.der -# application/vnd.eudora.data -application/vnd.ezpix-album ez2 -application/vnd.ezpix-package ez3 -# application/vnd.f-secure.mobile -application/vnd.fdf fdf -application/vnd.fdsn.mseed mseed -application/vnd.fdsn.seed seed dataless -# application/vnd.ffsns -# application/vnd.fints -application/vnd.flographit gph -application/vnd.fluxtime.clip ftc -# application/vnd.font-fontforge-sfd -application/vnd.framemaker fm frame maker book -application/vnd.frogans.fnc fnc -application/vnd.frogans.ltf ltf -application/vnd.fsc.weblaunch fsc -application/vnd.fujitsu.oasys oas -application/vnd.fujitsu.oasys2 oa2 -application/vnd.fujitsu.oasys3 oa3 -application/vnd.fujitsu.oasysgp fg5 -application/vnd.fujitsu.oasysprs bh2 -# application/vnd.fujixerox.art-ex -# application/vnd.fujixerox.art4 -# application/vnd.fujixerox.hbpl -application/vnd.fujixerox.ddd ddd -application/vnd.fujixerox.docuworks xdw -application/vnd.fujixerox.docuworks.binder xbd -# application/vnd.fut-misnet -application/vnd.fuzzysheet fzs -application/vnd.genomatix.tuxedo txd -# application/vnd.geocube+xml -application/vnd.geogebra.file ggb -application/vnd.geogebra.tool ggt -application/vnd.geometry-explorer gex gre -application/vnd.geonext gxt -application/vnd.geoplan g2w -application/vnd.geospace g3w -# application/vnd.globalplatform.card-content-mgt -# application/vnd.globalplatform.card-content-mgt-response -application/vnd.gmx gmx -application/vnd.google-earth.kml+xml kml -application/vnd.google-earth.kmz kmz -application/vnd.grafeq gqf gqs -# application/vnd.gridmp -application/vnd.groove-account gac -application/vnd.groove-help ghf -application/vnd.groove-identity-message gim -application/vnd.groove-injector grv -application/vnd.groove-tool-message gtm -application/vnd.groove-tool-template tpl -application/vnd.groove-vcard vcg -# application/vnd.hal+json -application/vnd.hal+xml hal -application/vnd.handheld-entertainment+xml zmm -application/vnd.hbci hbci -# application/vnd.hcl-bireports -application/vnd.hhe.lesson-player les -application/vnd.hp-hpgl hpgl -application/vnd.hp-hpid hpid -application/vnd.hp-hps hps -application/vnd.hp-jlyt jlt -application/vnd.hp-pcl pcl -application/vnd.hp-pclxl pclxl -# application/vnd.httphone -application/vnd.hydrostatix.sof-data sfd-hdstx -# application/vnd.hzn-3d-crossword -# application/vnd.ibm.afplinedata -# application/vnd.ibm.electronic-media -application/vnd.ibm.minipay mpy -application/vnd.ibm.modcap afp listafp list3820 -application/vnd.ibm.rights-management irm -application/vnd.ibm.secure-container sc -application/vnd.iccprofile icc icm -application/vnd.igloader igl -application/vnd.immervision-ivp ivp -application/vnd.immervision-ivu ivu -# application/vnd.informedcontrol.rms+xml -# application/vnd.informix-visionary -# application/vnd.infotech.project -# application/vnd.infotech.project+xml -# application/vnd.innopath.wamp.notification -application/vnd.insors.igm igm -application/vnd.intercon.formnet xpw xpx -application/vnd.intergeo i2g -# application/vnd.intertrust.digibox -# application/vnd.intertrust.nncp -application/vnd.intu.qbo qbo -application/vnd.intu.qfx qfx -# application/vnd.iptc.g2.conceptitem+xml -# application/vnd.iptc.g2.knowledgeitem+xml -# application/vnd.iptc.g2.newsitem+xml -# application/vnd.iptc.g2.newsmessage+xml -# application/vnd.iptc.g2.packageitem+xml -# application/vnd.iptc.g2.planningitem+xml -application/vnd.ipunplugged.rcprofile rcprofile -application/vnd.irepository.package+xml irp -application/vnd.is-xpr xpr -application/vnd.isac.fcs fcs -application/vnd.jam jam -# application/vnd.japannet-directory-service -# application/vnd.japannet-jpnstore-wakeup -# application/vnd.japannet-payment-wakeup -# application/vnd.japannet-registration -# application/vnd.japannet-registration-wakeup -# application/vnd.japannet-setstore-wakeup -# application/vnd.japannet-verification -# application/vnd.japannet-verification-wakeup -application/vnd.jcp.javame.midlet-rms rms -application/vnd.jisp jisp -application/vnd.joost.joda-archive joda -application/vnd.kahootz ktz ktr -application/vnd.kde.karbon karbon -application/vnd.kde.kchart chrt -application/vnd.kde.kformula kfo -application/vnd.kde.kivio flw -application/vnd.kde.kontour kon -application/vnd.kde.kpresenter kpr kpt -application/vnd.kde.kspread ksp -application/vnd.kde.kword kwd kwt -application/vnd.kenameaapp htke -application/vnd.kidspiration kia -application/vnd.kinar kne knp -application/vnd.koan skp skd skt skm -application/vnd.kodak-descriptor sse -application/vnd.las.las+xml lasxml -# application/vnd.liberty-request+xml -application/vnd.llamagraphics.life-balance.desktop lbd -application/vnd.llamagraphics.life-balance.exchange+xml lbe -application/vnd.lotus-1-2-3 123 -application/vnd.lotus-approach apr -application/vnd.lotus-freelance pre -application/vnd.lotus-notes nsf -application/vnd.lotus-organizer org -application/vnd.lotus-screencam scm -application/vnd.lotus-wordpro lwp -application/vnd.macports.portpkg portpkg -# application/vnd.marlin.drm.actiontoken+xml -# application/vnd.marlin.drm.conftoken+xml -# application/vnd.marlin.drm.license+xml -# application/vnd.marlin.drm.mdcf -application/vnd.mcd mcd -application/vnd.medcalcdata mc1 -application/vnd.mediastation.cdkey cdkey -# application/vnd.meridian-slingshot -application/vnd.mfer mwf -application/vnd.mfmp mfm -application/vnd.micrografx.flo flo -application/vnd.micrografx.igx igx -application/vnd.mif mif -# application/vnd.minisoft-hp3000-save -# application/vnd.mitsubishi.misty-guard.trustweb -application/vnd.mobius.daf daf -application/vnd.mobius.dis dis -application/vnd.mobius.mbk mbk -application/vnd.mobius.mqy mqy -application/vnd.mobius.msl msl -application/vnd.mobius.plc plc -application/vnd.mobius.txf txf -application/vnd.mophun.application mpn -application/vnd.mophun.certificate mpc -# application/vnd.motorola.flexsuite -# application/vnd.motorola.flexsuite.adsi -# application/vnd.motorola.flexsuite.fis -# application/vnd.motorola.flexsuite.gotap -# application/vnd.motorola.flexsuite.kmr -# application/vnd.motorola.flexsuite.ttc -# application/vnd.motorola.flexsuite.wem -# application/vnd.motorola.iprm -application/vnd.mozilla.xul+xml xul -application/vnd.ms-artgalry cil -# application/vnd.ms-asf -application/vnd.ms-cab-compressed cab -# application/vnd.ms-color.iccprofile -application/vnd.ms-excel xls xlm xla xlc xlt xlw -application/vnd.ms-excel.addin.macroenabled.12 xlam -application/vnd.ms-excel.sheet.binary.macroenabled.12 xlsb -application/vnd.ms-excel.sheet.macroenabled.12 xlsm -application/vnd.ms-excel.template.macroenabled.12 xltm -application/vnd.ms-fontobject eot -application/vnd.ms-htmlhelp chm -application/vnd.ms-ims ims -application/vnd.ms-lrm lrm -# application/vnd.ms-office.activex+xml -application/vnd.ms-officetheme thmx -# application/vnd.ms-opentype -# application/vnd.ms-package.obfuscated-opentype -application/vnd.ms-pki.seccat cat -application/vnd.ms-pki.stl stl -# application/vnd.ms-playready.initiator+xml -application/vnd.ms-powerpoint ppt pps pot -application/vnd.ms-powerpoint.addin.macroenabled.12 ppam -application/vnd.ms-powerpoint.presentation.macroenabled.12 pptm -application/vnd.ms-powerpoint.slide.macroenabled.12 sldm -application/vnd.ms-powerpoint.slideshow.macroenabled.12 ppsm -application/vnd.ms-powerpoint.template.macroenabled.12 potm -# application/vnd.ms-printing.printticket+xml -application/vnd.ms-project mpp mpt -# application/vnd.ms-tnef -# application/vnd.ms-wmdrm.lic-chlg-req -# application/vnd.ms-wmdrm.lic-resp -# application/vnd.ms-wmdrm.meter-chlg-req -# application/vnd.ms-wmdrm.meter-resp -application/vnd.ms-word.document.macroenabled.12 docm -application/vnd.ms-word.template.macroenabled.12 dotm -application/vnd.ms-works wps wks wcm wdb -application/vnd.ms-wpl wpl -application/vnd.ms-xpsdocument xps -application/vnd.mseq mseq -# application/vnd.msign -# application/vnd.multiad.creator -# application/vnd.multiad.creator.cif -# application/vnd.music-niff -application/vnd.musician mus -application/vnd.muvee.style msty -application/vnd.mynfc taglet -# application/vnd.ncd.control -# application/vnd.ncd.reference -# application/vnd.nervana -# application/vnd.netfpx -application/vnd.neurolanguage.nlu nlu -application/vnd.nitf ntf nitf -application/vnd.noblenet-directory nnd -application/vnd.noblenet-sealer nns -application/vnd.noblenet-web nnw -# application/vnd.nokia.catalogs -# application/vnd.nokia.conml+wbxml -# application/vnd.nokia.conml+xml -# application/vnd.nokia.isds-radio-presets -# application/vnd.nokia.iptv.config+xml -# application/vnd.nokia.landmark+wbxml -# application/vnd.nokia.landmark+xml -# application/vnd.nokia.landmarkcollection+xml -# application/vnd.nokia.n-gage.ac+xml -application/vnd.nokia.n-gage.data ngdat -application/vnd.nokia.n-gage.symbian.install n-gage -# application/vnd.nokia.ncd -# application/vnd.nokia.pcd+wbxml -# application/vnd.nokia.pcd+xml -application/vnd.nokia.radio-preset rpst -application/vnd.nokia.radio-presets rpss -application/vnd.novadigm.edm edm -application/vnd.novadigm.edx edx -application/vnd.novadigm.ext ext -# application/vnd.ntt-local.file-transfer -# application/vnd.ntt-local.sip-ta_remote -# application/vnd.ntt-local.sip-ta_tcp_stream -application/vnd.oasis.opendocument.chart odc -application/vnd.oasis.opendocument.chart-template otc -application/vnd.oasis.opendocument.database odb -application/vnd.oasis.opendocument.formula odf -application/vnd.oasis.opendocument.formula-template odft -application/vnd.oasis.opendocument.graphics odg -application/vnd.oasis.opendocument.graphics-template otg -application/vnd.oasis.opendocument.image odi -application/vnd.oasis.opendocument.image-template oti -application/vnd.oasis.opendocument.presentation odp -application/vnd.oasis.opendocument.presentation-template otp -application/vnd.oasis.opendocument.spreadsheet ods -application/vnd.oasis.opendocument.spreadsheet-template ots -application/vnd.oasis.opendocument.text odt -application/vnd.oasis.opendocument.text-master odm -application/vnd.oasis.opendocument.text-template ott -application/vnd.oasis.opendocument.text-web oth -# application/vnd.obn -# application/vnd.oftn.l10n+json -# application/vnd.oipf.contentaccessdownload+xml -# application/vnd.oipf.contentaccessstreaming+xml -# application/vnd.oipf.cspg-hexbinary -# application/vnd.oipf.dae.svg+xml -# application/vnd.oipf.dae.xhtml+xml -# application/vnd.oipf.mippvcontrolmessage+xml -# application/vnd.oipf.pae.gem -# application/vnd.oipf.spdiscovery+xml -# application/vnd.oipf.spdlist+xml -# application/vnd.oipf.ueprofile+xml -# application/vnd.oipf.userprofile+xml -application/vnd.olpc-sugar xo -# application/vnd.oma-scws-config -# application/vnd.oma-scws-http-request -# application/vnd.oma-scws-http-response -# application/vnd.oma.bcast.associated-procedure-parameter+xml -# application/vnd.oma.bcast.drm-trigger+xml -# application/vnd.oma.bcast.imd+xml -# application/vnd.oma.bcast.ltkm -# application/vnd.oma.bcast.notification+xml -# application/vnd.oma.bcast.provisioningtrigger -# application/vnd.oma.bcast.sgboot -# application/vnd.oma.bcast.sgdd+xml -# application/vnd.oma.bcast.sgdu -# application/vnd.oma.bcast.simple-symbol-container -# application/vnd.oma.bcast.smartcard-trigger+xml -# application/vnd.oma.bcast.sprov+xml -# application/vnd.oma.bcast.stkm -# application/vnd.oma.cab-address-book+xml -# application/vnd.oma.cab-feature-handler+xml -# application/vnd.oma.cab-pcc+xml -# application/vnd.oma.cab-user-prefs+xml -# application/vnd.oma.dcd -# application/vnd.oma.dcdc -application/vnd.oma.dd2+xml dd2 -# application/vnd.oma.drm.risd+xml -# application/vnd.oma.group-usage-list+xml -# application/vnd.oma.pal+xml -# application/vnd.oma.poc.detailed-progress-report+xml -# application/vnd.oma.poc.final-report+xml -# application/vnd.oma.poc.groups+xml -# application/vnd.oma.poc.invocation-descriptor+xml -# application/vnd.oma.poc.optimized-progress-report+xml -# application/vnd.oma.push -# application/vnd.oma.scidm.messages+xml -# application/vnd.oma.xcap-directory+xml -# application/vnd.omads-email+xml -# application/vnd.omads-file+xml -# application/vnd.omads-folder+xml -# application/vnd.omaloc-supl-init -application/vnd.openofficeorg.extension oxt -# application/vnd.openxmlformats-officedocument.custom-properties+xml -# application/vnd.openxmlformats-officedocument.customxmlproperties+xml -# application/vnd.openxmlformats-officedocument.drawing+xml -# application/vnd.openxmlformats-officedocument.drawingml.chart+xml -# application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml -# application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml -# application/vnd.openxmlformats-officedocument.extended-properties+xml -# application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml -# application/vnd.openxmlformats-officedocument.presentationml.comments+xml -# application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml -# application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml -application/vnd.openxmlformats-officedocument.presentationml.presentation pptx -# application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.presprops+xml -application/vnd.openxmlformats-officedocument.presentationml.slide sldx -# application/vnd.openxmlformats-officedocument.presentationml.slide+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml -# application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml -application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx -# application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml -# application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml -# application/vnd.openxmlformats-officedocument.presentationml.tags+xml -application/vnd.openxmlformats-officedocument.presentationml.template potx -# application/vnd.openxmlformats-officedocument.presentationml.template.main+xml -# application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml -application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx -# application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml -# application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml -# application/vnd.openxmlformats-officedocument.theme+xml -# application/vnd.openxmlformats-officedocument.themeoverride+xml -# application/vnd.openxmlformats-officedocument.vmldrawing -# application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.document docx -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml -application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx -# application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml -# application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml -# application/vnd.openxmlformats-package.core-properties+xml -# application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml -# application/vnd.openxmlformats-package.relationships+xml -# application/vnd.quobject-quoxdocument -# application/vnd.osa.netdeploy -application/vnd.osgeo.mapguide.package mgp -# application/vnd.osgi.bundle -application/vnd.osgi.dp dp -application/vnd.osgi.subsystem esa -# application/vnd.otps.ct-kip+xml -application/vnd.palm pdb pqa oprc -# application/vnd.paos.xml -application/vnd.pawaafile paw -application/vnd.pg.format str -application/vnd.pg.osasli ei6 -# application/vnd.piaccess.application-licence -application/vnd.picsel efif -application/vnd.pmi.widget wg -# application/vnd.poc.group-advertisement+xml -application/vnd.pocketlearn plf -application/vnd.powerbuilder6 pbd -# application/vnd.powerbuilder6-s -# application/vnd.powerbuilder7 -# application/vnd.powerbuilder7-s -# application/vnd.powerbuilder75 -# application/vnd.powerbuilder75-s -# application/vnd.preminet -application/vnd.previewsystems.box box -application/vnd.proteus.magazine mgz -application/vnd.publishare-delta-tree qps -application/vnd.pvi.ptid1 ptid -# application/vnd.pwg-multiplexed -# application/vnd.pwg-xhtml-print+xml -# application/vnd.qualcomm.brew-app-res -application/vnd.quark.quarkxpress qxd qxt qwd qwt qxl qxb -# application/vnd.radisys.moml+xml -# application/vnd.radisys.msml+xml -# application/vnd.radisys.msml-audit+xml -# application/vnd.radisys.msml-audit-conf+xml -# application/vnd.radisys.msml-audit-conn+xml -# application/vnd.radisys.msml-audit-dialog+xml -# application/vnd.radisys.msml-audit-stream+xml -# application/vnd.radisys.msml-conf+xml -# application/vnd.radisys.msml-dialog+xml -# application/vnd.radisys.msml-dialog-base+xml -# application/vnd.radisys.msml-dialog-fax-detect+xml -# application/vnd.radisys.msml-dialog-fax-sendrecv+xml -# application/vnd.radisys.msml-dialog-group+xml -# application/vnd.radisys.msml-dialog-speech+xml -# application/vnd.radisys.msml-dialog-transform+xml -# application/vnd.rainstor.data -# application/vnd.rapid -application/vnd.realvnc.bed bed -application/vnd.recordare.musicxml mxl -application/vnd.recordare.musicxml+xml musicxml -# application/vnd.renlearn.rlprint -application/vnd.rig.cryptonote cryptonote -application/vnd.rim.cod cod -application/vnd.rn-realmedia rm -application/vnd.rn-realmedia-vbr rmvb -application/vnd.route66.link66+xml link66 -# application/vnd.rs-274x -# application/vnd.ruckus.download -# application/vnd.s3sms -application/vnd.sailingtracker.track st -# application/vnd.sbm.cid -# application/vnd.sbm.mid2 -# application/vnd.scribus -# application/vnd.sealed.3df -# application/vnd.sealed.csf -# application/vnd.sealed.doc -# application/vnd.sealed.eml -# application/vnd.sealed.mht -# application/vnd.sealed.net -# application/vnd.sealed.ppt -# application/vnd.sealed.tiff -# application/vnd.sealed.xls -# application/vnd.sealedmedia.softseal.html -# application/vnd.sealedmedia.softseal.pdf -application/vnd.seemail see -application/vnd.sema sema -application/vnd.semd semd -application/vnd.semf semf -application/vnd.shana.informed.formdata ifm -application/vnd.shana.informed.formtemplate itp -application/vnd.shana.informed.interchange iif -application/vnd.shana.informed.package ipk -application/vnd.simtech-mindmapper twd twds -application/vnd.smaf mmf -# application/vnd.smart.notebook -application/vnd.smart.teacher teacher -# application/vnd.software602.filler.form+xml -# application/vnd.software602.filler.form-xml-zip -application/vnd.solent.sdkm+xml sdkm sdkd -application/vnd.spotfire.dxp dxp -application/vnd.spotfire.sfs sfs -# application/vnd.sss-cod -# application/vnd.sss-dtf -# application/vnd.sss-ntf -application/vnd.stardivision.calc sdc -application/vnd.stardivision.draw sda -application/vnd.stardivision.impress sdd -application/vnd.stardivision.math smf -application/vnd.stardivision.writer sdw vor -application/vnd.stardivision.writer-global sgl -application/vnd.stepmania.package smzip -application/vnd.stepmania.stepchart sm -# application/vnd.street-stream -application/vnd.sun.xml.calc sxc -application/vnd.sun.xml.calc.template stc -application/vnd.sun.xml.draw sxd -application/vnd.sun.xml.draw.template std -application/vnd.sun.xml.impress sxi -application/vnd.sun.xml.impress.template sti -application/vnd.sun.xml.math sxm -application/vnd.sun.xml.writer sxw -application/vnd.sun.xml.writer.global sxg -application/vnd.sun.xml.writer.template stw -# application/vnd.sun.wadl+xml -application/vnd.sus-calendar sus susp -application/vnd.svd svd -# application/vnd.swiftview-ics -application/vnd.symbian.install sis sisx -application/vnd.syncml+xml xsm -application/vnd.syncml.dm+wbxml bdm -application/vnd.syncml.dm+xml xdm -# application/vnd.syncml.dm.notification -# application/vnd.syncml.ds.notification -application/vnd.tao.intent-module-archive tao -application/vnd.tcpdump.pcap pcap cap dmp -application/vnd.tmobile-livetv tmo -application/vnd.trid.tpt tpt -application/vnd.triscape.mxs mxs -application/vnd.trueapp tra -# application/vnd.truedoc -# application/vnd.ubisoft.webplayer -application/vnd.ufdl ufd ufdl -application/vnd.uiq.theme utz -application/vnd.umajin umj -application/vnd.unity unityweb -application/vnd.uoml+xml uoml -# application/vnd.uplanet.alert -# application/vnd.uplanet.alert-wbxml -# application/vnd.uplanet.bearer-choice -# application/vnd.uplanet.bearer-choice-wbxml -# application/vnd.uplanet.cacheop -# application/vnd.uplanet.cacheop-wbxml -# application/vnd.uplanet.channel -# application/vnd.uplanet.channel-wbxml -# application/vnd.uplanet.list -# application/vnd.uplanet.list-wbxml -# application/vnd.uplanet.listcmd -# application/vnd.uplanet.listcmd-wbxml -# application/vnd.uplanet.signal -application/vnd.vcx vcx -# application/vnd.vd-study -# application/vnd.vectorworks -# application/vnd.verimatrix.vcas -# application/vnd.vidsoft.vidconference -application/vnd.visio vsd vst vss vsw -application/vnd.visionary vis -# application/vnd.vividence.scriptfile -application/vnd.vsf vsf -# application/vnd.wap.sic -# application/vnd.wap.slc -application/vnd.wap.wbxml wbxml -application/vnd.wap.wmlc wmlc -application/vnd.wap.wmlscriptc wmlsc -application/vnd.webturbo wtb -# application/vnd.wfa.wsc -# application/vnd.wmc -# application/vnd.wmf.bootstrap -# application/vnd.wolfram.mathematica -# application/vnd.wolfram.mathematica.package -application/vnd.wolfram.player nbp -application/vnd.wordperfect wpd -application/vnd.wqd wqd -# application/vnd.wrq-hp3000-labelled -application/vnd.wt.stf stf -# application/vnd.wv.csp+wbxml -# application/vnd.wv.csp+xml -# application/vnd.wv.ssp+xml -application/vnd.xara xar -application/vnd.xfdl xfdl -# application/vnd.xfdl.webform -# application/vnd.xmi+xml -# application/vnd.xmpie.cpkg -# application/vnd.xmpie.dpkg -# application/vnd.xmpie.plan -# application/vnd.xmpie.ppkg -# application/vnd.xmpie.xlim -application/vnd.yamaha.hv-dic hvd -application/vnd.yamaha.hv-script hvs -application/vnd.yamaha.hv-voice hvp -application/vnd.yamaha.openscoreformat osf -application/vnd.yamaha.openscoreformat.osfpvg+xml osfpvg -# application/vnd.yamaha.remote-setup -application/vnd.yamaha.smaf-audio saf -application/vnd.yamaha.smaf-phrase spf -# application/vnd.yamaha.through-ngn -# application/vnd.yamaha.tunnel-udpencap -application/vnd.yellowriver-custom-menu cmp -application/vnd.zul zir zirz -application/vnd.zzazz.deck+xml zaz -application/voicexml+xml vxml -# application/vq-rtcpxr -# application/watcherinfo+xml -# application/whoispp-query -# application/whoispp-response -application/widget wgt -application/winhlp hlp -# application/wita -# application/wordperfect5.1 -application/wsdl+xml wsdl -application/wspolicy+xml wspolicy -application/x-7z-compressed 7z -application/x-abiword abw -application/x-ace-compressed ace -# application/x-amf -application/x-apple-diskimage dmg -application/x-authorware-bin aab x32 u32 vox -application/x-authorware-map aam -application/x-authorware-seg aas -application/x-bcpio bcpio -application/x-bittorrent torrent -application/x-blorb blb blorb -application/x-bzip bz -application/x-bzip2 bz2 boz -application/x-cbr cbr cba cbt cbz cb7 -application/x-cdlink vcd -application/x-cfs-compressed cfs -application/x-chat chat -application/x-chess-pgn pgn -application/x-conference nsc -# application/x-compress -application/x-cpio cpio -application/x-csh csh -application/x-debian-package deb udeb -application/x-dgc-compressed dgc -application/x-director dir dcr dxr cst cct cxt w3d fgd swa -application/x-doom wad -application/x-dtbncx+xml ncx -application/x-dtbook+xml dtb -application/x-dtbresource+xml res -application/x-dvi dvi -application/x-envoy evy -application/x-eva eva -application/x-font-bdf bdf -# application/x-font-dos -# application/x-font-framemaker -application/x-font-ghostscript gsf -# application/x-font-libgrx -application/x-font-linux-psf psf -application/x-font-otf otf -application/x-font-pcf pcf -application/x-font-snf snf -# application/x-font-speedo -# application/x-font-sunos-news -application/x-font-ttf ttf ttc -application/x-font-type1 pfa pfb pfm afm -application/font-woff woff -# application/x-font-vfont -application/x-freearc arc -application/x-futuresplash spl -application/x-gca-compressed gca -application/x-glulx ulx -application/x-gnumeric gnumeric -application/x-gramps-xml gramps -application/x-gtar gtar -# application/x-gzip -application/x-hdf hdf -application/x-install-instructions install -application/x-iso9660-image iso -application/x-java-jnlp-file jnlp -application/x-latex latex -application/x-lzh-compressed lzh lha -application/x-mie mie -application/x-mobipocket-ebook prc mobi -application/x-ms-application application -application/x-ms-shortcut lnk -application/x-ms-wmd wmd -application/x-ms-wmz wmz -application/x-ms-xbap xbap -application/x-msaccess mdb -application/x-msbinder obd -application/x-mscardfile crd -application/x-msclip clp -application/x-msdownload exe dll com bat msi -application/x-msmediaview mvb m13 m14 -application/x-msmetafile wmf wmz emf emz -application/x-msmoney mny -application/x-mspublisher pub -application/x-msschedule scd -application/x-msterminal trm -application/x-mswrite wri -application/x-netcdf nc cdf -application/x-nzb nzb -application/x-pkcs12 p12 pfx -application/x-pkcs7-certificates p7b spc -application/x-pkcs7-certreqresp p7r -application/x-rar-compressed rar -application/x-research-info-systems ris -application/x-sh sh -application/x-shar shar -application/x-shockwave-flash swf -application/x-silverlight-app xap -application/x-sql sql -application/x-stuffit sit -application/x-stuffitx sitx -application/x-subrip srt -application/x-sv4cpio sv4cpio -application/x-sv4crc sv4crc -application/x-t3vm-image t3 -application/x-tads gam -application/x-tar tar -application/x-tcl tcl -application/x-tex tex -application/x-tex-tfm tfm -application/x-texinfo texinfo texi -application/x-tgif obj -application/x-ustar ustar -application/x-wais-source src -application/x-x509-ca-cert der crt -application/x-xfig fig -application/x-xliff+xml xlf -application/x-xpinstall xpi -application/x-xz xz -application/x-zmachine z1 z2 z3 z4 z5 z6 z7 z8 -# application/x400-bp -application/xaml+xml xaml -# application/xcap-att+xml -# application/xcap-caps+xml -application/xcap-diff+xml xdf -# application/xcap-el+xml -# application/xcap-error+xml -# application/xcap-ns+xml -# application/xcon-conference-info-diff+xml -# application/xcon-conference-info+xml -application/xenc+xml xenc -application/xhtml+xml xhtml xht -# application/xhtml-voice+xml -application/xml xml xsl -application/xml-dtd dtd -# application/xml-external-parsed-entity -# application/xmpp+xml -application/xop+xml xop -application/xproc+xml xpl -application/xslt+xml xslt -application/xspf+xml xspf -application/xv+xml mxml xhvml xvml xvm -application/yang yang -application/yin+xml yin -application/zip zip -# audio/1d-interleaved-parityfec -# audio/32kadpcm -# audio/3gpp -# audio/3gpp2 -# audio/ac3 -audio/adpcm adp -# audio/amr -# audio/amr-wb -# audio/amr-wb+ -# audio/asc -# audio/atrac-advanced-lossless -# audio/atrac-x -# audio/atrac3 -audio/basic au snd -# audio/bv16 -# audio/bv32 -# audio/clearmode -# audio/cn -# audio/dat12 -# audio/dls -# audio/dsr-es201108 -# audio/dsr-es202050 -# audio/dsr-es202211 -# audio/dsr-es202212 -# audio/dv -# audio/dvi4 -# audio/eac3 -# audio/evrc -# audio/evrc-qcp -# audio/evrc0 -# audio/evrc1 -# audio/evrcb -# audio/evrcb0 -# audio/evrcb1 -# audio/evrcwb -# audio/evrcwb0 -# audio/evrcwb1 -# audio/example -# audio/fwdred -# audio/g719 -# audio/g722 -# audio/g7221 -# audio/g723 -# audio/g726-16 -# audio/g726-24 -# audio/g726-32 -# audio/g726-40 -# audio/g728 -# audio/g729 -# audio/g7291 -# audio/g729d -# audio/g729e -# audio/gsm -# audio/gsm-efr -# audio/gsm-hr-08 -# audio/ilbc -# audio/ip-mr_v2.5 -# audio/isac -# audio/l16 -# audio/l20 -# audio/l24 -# audio/l8 -# audio/lpc -audio/midi mid midi kar rmi -# audio/mobile-xmf -audio/mp4 mp4a -# audio/mp4a-latm -# audio/mpa -# audio/mpa-robust -audio/mpeg mpga mp2 mp2a mp3 m2a m3a -# audio/mpeg4-generic -# audio/musepack -audio/ogg oga ogg spx -# audio/opus -# audio/parityfec -# audio/pcma -# audio/pcma-wb -# audio/pcmu-wb -# audio/pcmu -# audio/prs.sid -# audio/qcelp -# audio/red -# audio/rtp-enc-aescm128 -# audio/rtp-midi -# audio/rtx -audio/s3m s3m -audio/silk sil -# audio/smv -# audio/smv0 -# audio/smv-qcp -# audio/sp-midi -# audio/speex -# audio/t140c -# audio/t38 -# audio/telephone-event -# audio/tone -# audio/uemclip -# audio/ulpfec -# audio/vdvi -# audio/vmr-wb -# audio/vnd.3gpp.iufp -# audio/vnd.4sb -# audio/vnd.audiokoz -# audio/vnd.celp -# audio/vnd.cisco.nse -# audio/vnd.cmles.radio-events -# audio/vnd.cns.anp1 -# audio/vnd.cns.inf1 -audio/vnd.dece.audio uva uvva -audio/vnd.digital-winds eol -# audio/vnd.dlna.adts -# audio/vnd.dolby.heaac.1 -# audio/vnd.dolby.heaac.2 -# audio/vnd.dolby.mlp -# audio/vnd.dolby.mps -# audio/vnd.dolby.pl2 -# audio/vnd.dolby.pl2x -# audio/vnd.dolby.pl2z -# audio/vnd.dolby.pulse.1 -audio/vnd.dra dra -audio/vnd.dts dts -audio/vnd.dts.hd dtshd -# audio/vnd.dvb.file -# audio/vnd.everad.plj -# audio/vnd.hns.audio -audio/vnd.lucent.voice lvp -audio/vnd.ms-playready.media.pya pya -# audio/vnd.nokia.mobile-xmf -# audio/vnd.nortel.vbk -audio/vnd.nuera.ecelp4800 ecelp4800 -audio/vnd.nuera.ecelp7470 ecelp7470 -audio/vnd.nuera.ecelp9600 ecelp9600 -# audio/vnd.octel.sbc -# audio/vnd.qcelp -# audio/vnd.rhetorex.32kadpcm -audio/vnd.rip rip -# audio/vnd.sealedmedia.softseal.mpeg -# audio/vnd.vmx.cvsd -# audio/vorbis -# audio/vorbis-config -audio/webm weba -audio/x-aac aac -audio/x-aiff aif aiff aifc -audio/x-caf caf -audio/x-flac flac -audio/x-matroska mka -audio/x-mpegurl m3u -audio/x-ms-wax wax -audio/x-ms-wma wma -audio/x-pn-realaudio ram ra -audio/x-pn-realaudio-plugin rmp -# audio/x-tta -audio/x-wav wav -audio/xm xm -chemical/x-cdx cdx -chemical/x-cif cif -chemical/x-cmdf cmdf -chemical/x-cml cml -chemical/x-csml csml -# chemical/x-pdb -chemical/x-xyz xyz -image/bmp bmp -image/cgm cgm -# image/example -# image/fits -image/g3fax g3 -image/gif gif -image/ief ief -# image/jp2 -image/jpeg jpeg jpg jpe -# image/jpm -# image/jpx -image/ktx ktx -# image/naplps -image/png png -image/prs.btif btif -# image/prs.pti -image/sgi sgi -image/svg+xml svg svgz -# image/t38 -image/tiff tiff tif -# image/tiff-fx -image/vnd.adobe.photoshop psd -# image/vnd.cns.inf2 -image/vnd.dece.graphic uvi uvvi uvg uvvg -image/vnd.dvb.subtitle sub -image/vnd.djvu djvu djv -image/vnd.dwg dwg -image/vnd.dxf dxf -image/vnd.fastbidsheet fbs -image/vnd.fpx fpx -image/vnd.fst fst -image/vnd.fujixerox.edmics-mmr mmr -image/vnd.fujixerox.edmics-rlc rlc -# image/vnd.globalgraphics.pgb -# image/vnd.microsoft.icon -# image/vnd.mix -image/vnd.ms-modi mdi -image/vnd.ms-photo wdp -image/vnd.net-fpx npx -# image/vnd.radiance -# image/vnd.sealed.png -# image/vnd.sealedmedia.softseal.gif -# image/vnd.sealedmedia.softseal.jpg -# image/vnd.svf -image/vnd.wap.wbmp wbmp -image/vnd.xiff xif -image/webp webp -image/x-3ds 3ds -image/x-cmu-raster ras -image/x-cmx cmx -image/x-freehand fh fhc fh4 fh5 fh7 -image/x-icon ico -image/x-mrsid-image sid -image/x-pcx pcx -image/x-pict pic pct -image/x-portable-anymap pnm -image/x-portable-bitmap pbm -image/x-portable-graymap pgm -image/x-portable-pixmap ppm -image/x-rgb rgb -image/x-tga tga -image/x-xbitmap xbm -image/x-xpixmap xpm -image/x-xwindowdump xwd -# message/cpim -# message/delivery-status -# message/disposition-notification -# message/example -# message/external-body -# message/feedback-report -# message/global -# message/global-delivery-status -# message/global-disposition-notification -# message/global-headers -# message/http -# message/imdn+xml -# message/news -# message/partial -message/rfc822 eml mime -# message/s-http -# message/sip -# message/sipfrag -# message/tracking-status -# message/vnd.si.simp -# model/example -model/iges igs iges -model/mesh msh mesh silo -model/vnd.collada+xml dae -model/vnd.dwf dwf -# model/vnd.flatland.3dml -model/vnd.gdl gdl -# model/vnd.gs-gdl -# model/vnd.gs.gdl -model/vnd.gtw gtw -# model/vnd.moml+xml -model/vnd.mts mts -# model/vnd.parasolid.transmit.binary -# model/vnd.parasolid.transmit.text -model/vnd.vtu vtu -model/vrml wrl vrml -model/x3d+binary x3db x3dbz -model/x3d+vrml x3dv x3dvz -model/x3d+xml x3d x3dz -# multipart/alternative -# multipart/appledouble -# multipart/byteranges -# multipart/digest -# multipart/encrypted -# multipart/example -# multipart/form-data -# multipart/header-set -# multipart/mixed -# multipart/parallel -# multipart/related -# multipart/report -# multipart/signed -# multipart/voice-message -# text/1d-interleaved-parityfec -text/cache-manifest appcache -text/calendar ics ifb -text/css css -text/csv csv -# text/directory -# text/dns -# text/ecmascript -# text/enriched -# text/example -# text/fwdred -text/html html htm -# text/javascript -text/n3 n3 -# text/parityfec -text/plain txt text conf def list log in -# text/prs.fallenstein.rst -text/prs.lines.tag dsc -# text/vnd.radisys.msml-basic-layout -# text/red -# text/rfc822-headers -text/richtext rtx -# text/rtf -# text/rtp-enc-aescm128 -# text/rtx -text/sgml sgml sgm -# text/t140 -text/tab-separated-values tsv -text/troff t tr roff man me ms -text/turtle ttl -# text/ulpfec -text/uri-list uri uris urls -text/vcard vcard -# text/vnd.abc -text/vnd.curl curl -text/vnd.curl.dcurl dcurl -text/vnd.curl.scurl scurl -text/vnd.curl.mcurl mcurl -# text/vnd.dmclientscript -text/vnd.dvb.subtitle sub -# text/vnd.esmertec.theme-descriptor -text/vnd.fly fly -text/vnd.fmi.flexstor flx -text/vnd.graphviz gv -text/vnd.in3d.3dml 3dml -text/vnd.in3d.spot spot -# text/vnd.iptc.newsml -# text/vnd.iptc.nitf -# text/vnd.latex-z -# text/vnd.motorola.reflex -# text/vnd.ms-mediapackage -# text/vnd.net2phone.commcenter.command -# text/vnd.si.uricatalogue -text/vnd.sun.j2me.app-descriptor jad -# text/vnd.trolltech.linguist -# text/vnd.wap.si -# text/vnd.wap.sl -text/vnd.wap.wml wml -text/vnd.wap.wmlscript wmls -text/x-asm s asm -text/x-c c cc cxx cpp h hh dic -text/x-fortran f for f77 f90 -text/x-java-source java -text/x-opml opml -text/x-pascal p pas -text/x-nfo nfo -text/x-setext etx -text/x-sfv sfv -text/x-uuencode uu -text/x-vcalendar vcs -text/x-vcard vcf -# text/xml -# text/xml-external-parsed-entity -# video/1d-interleaved-parityfec -video/3gpp 3gp -# video/3gpp-tt -video/3gpp2 3g2 -# video/bmpeg -# video/bt656 -# video/celb -# video/dv -# video/example -video/h261 h261 -video/h263 h263 -# video/h263-1998 -# video/h263-2000 -video/h264 h264 -# video/h264-rcdo -# video/h264-svc -video/jpeg jpgv -# video/jpeg2000 -video/jpm jpm jpgm -video/mj2 mj2 mjp2 -# video/mp1s -# video/mp2p -# video/mp2t -video/mp4 mp4 mp4v mpg4 -# video/mp4v-es -video/mpeg mpeg mpg mpe m1v m2v -# video/mpeg4-generic -# video/mpv -# video/nv -video/ogg ogv -# video/parityfec -# video/pointer -video/quicktime qt mov -# video/raw -# video/rtp-enc-aescm128 -# video/rtx -# video/smpte292m -# video/ulpfec -# video/vc1 -# video/vnd.cctv -video/vnd.dece.hd uvh uvvh -video/vnd.dece.mobile uvm uvvm -# video/vnd.dece.mp4 -video/vnd.dece.pd uvp uvvp -video/vnd.dece.sd uvs uvvs -video/vnd.dece.video uvv uvvv -# video/vnd.directv.mpeg -# video/vnd.directv.mpeg-tts -# video/vnd.dlna.mpeg-tts -video/vnd.dvb.file dvb -video/vnd.fvt fvt -# video/vnd.hns.video -# video/vnd.iptvforum.1dparityfec-1010 -# video/vnd.iptvforum.1dparityfec-2005 -# video/vnd.iptvforum.2dparityfec-1010 -# video/vnd.iptvforum.2dparityfec-2005 -# video/vnd.iptvforum.ttsavc -# video/vnd.iptvforum.ttsmpeg2 -# video/vnd.motorola.video -# video/vnd.motorola.videop -video/vnd.mpegurl mxu m4u -video/vnd.ms-playready.media.pyv pyv -# video/vnd.nokia.interleaved-multimedia -# video/vnd.nokia.videovoip -# video/vnd.objectvideo -# video/vnd.sealed.mpeg1 -# video/vnd.sealed.mpeg4 -# video/vnd.sealed.swf -# video/vnd.sealedmedia.softseal.mov -video/vnd.uvvu.mp4 uvu uvvu -video/vnd.vivo viv -video/webm webm -video/x-f4v f4v -video/x-fli fli -video/x-flv flv -video/x-m4v m4v -video/x-matroska mkv mk3d mks -video/x-mng mng -video/x-ms-asf asf asx -video/x-ms-vob vob -video/x-ms-wm wm -video/x-ms-wmv wmv -video/x-ms-wmx wmx -video/x-ms-wvx wvx -video/x-msvideo avi -video/x-sgi-movie movie -video/x-smv smv -x-conference/x-cooltalk ice diff --git a/node_modules/karma/node_modules/mime/types/node.types b/node_modules/karma/node_modules/mime/types/node.types deleted file mode 100644 index 55b2cf79..00000000 --- a/node_modules/karma/node_modules/mime/types/node.types +++ /dev/null @@ -1,77 +0,0 @@ -# What: WebVTT -# Why: To allow formats intended for marking up external text track resources. -# http://dev.w3.org/html5/webvtt/ -# Added by: niftylettuce -text/vtt vtt - -# What: Google Chrome Extension -# Why: To allow apps to (work) be served with the right content type header. -# http://codereview.chromium.org/2830017 -# Added by: niftylettuce -application/x-chrome-extension crx - -# What: HTC support -# Why: To properly render .htc files such as CSS3PIE -# Added by: niftylettuce -text/x-component htc - -# What: HTML5 application cache manifes ('.manifest' extension) -# Why: De-facto standard. Required by Mozilla browser when serving HTML5 apps -# per https://developer.mozilla.org/en/offline_resources_in_firefox -# Added by: louisremi -text/cache-manifest manifest - -# What: node binary buffer format -# Why: semi-standard extension w/in the node community -# Added by: tootallnate -application/octet-stream buffer - -# What: The "protected" MP-4 formats used by iTunes. -# Why: Required for streaming music to browsers (?) -# Added by: broofa -application/mp4 m4p -audio/mp4 m4a - -# What: Video format, Part of RFC1890 -# Why: See https://github.com/bentomas/node-mime/pull/6 -# Added by: mjrusso -video/MP2T ts - -# What: EventSource mime type -# Why: mime type of Server-Sent Events stream -# http://www.w3.org/TR/eventsource/#text-event-stream -# Added by: francois2metz -text/event-stream event-stream - -# What: Mozilla App manifest mime type -# Why: https://developer.mozilla.org/en/Apps/Manifest#Serving_manifests -# Added by: ednapiranha -application/x-web-app-manifest+json webapp - -# What: Lua file types -# Why: Googling around shows de-facto consensus on these -# Added by: creationix (Issue #45) -text/x-lua lua -application/x-lua-bytecode luac - -# What: Markdown files, as per http://daringfireball.net/projects/markdown/syntax -# Why: http://stackoverflow.com/questions/10701983/what-is-the-mime-type-for-markdown -# Added by: avoidwork -text/x-markdown markdown md mkd - -# What: ini files -# Why: because they're just text files -# Added by: Matthew Kastor -text/plain ini - -# What: DASH Adaptive Streaming manifest -# Why: https://developer.mozilla.org/en-US/docs/DASH_Adaptive_Streaming_for_HTML_5_Video -# Added by: eelcocramer -application/dash+xml mdp - -# What: OpenType font files - http://www.microsoft.com/typography/otspec/ -# Why: Browsers usually ignore the font MIME types and sniff the content, -# but Chrome, shows a warning if OpenType fonts aren't served with -# the `font/opentype` MIME type: http://i.imgur.com/8c5RN8M.png. -# Added by: alrra -font/opentype otf diff --git a/node_modules/karma/node_modules/minimatch/LICENSE b/node_modules/karma/node_modules/minimatch/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma/node_modules/minimatch/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/minimatch/README.md b/node_modules/karma/node_modules/minimatch/README.md deleted file mode 100644 index 6fd07d2e..00000000 --- a/node_modules/karma/node_modules/minimatch/README.md +++ /dev/null @@ -1,218 +0,0 @@ -# minimatch - -A minimal matching utility. - -[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch) - - -This is the matching library used internally by npm. - -Eventually, it will replace the C binding in node-glob. - -It works by converting glob expressions into JavaScript `RegExp` -objects. - -## Usage - -```javascript -var minimatch = require("minimatch") - -minimatch("bar.foo", "*.foo") // true! -minimatch("bar.foo", "*.bar") // false! -``` - -## Features - -Supports these glob features: - -* Brace Expansion -* Extended glob matching -* "Globstar" `**` matching - -See: - -* `man sh` -* `man bash` -* `man 3 fnmatch` -* `man 5 gitignore` - -### Comparisons to other fnmatch/glob implementations - -While strict compliance with the existing standards is a worthwhile -goal, some discrepancies exist between minimatch and other -implementations, and are intentional. - -If the pattern starts with a `!` character, then it is negated. Set the -`nonegate` flag to suppress this behavior, and treat leading `!` -characters normally. This is perhaps relevant if you wish to start the -pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` -characters at the start of a pattern will negate the pattern multiple -times. - -If a pattern starts with `#`, then it is treated as a comment, and -will not match anything. Use `\#` to match a literal `#` at the -start of a line, or set the `nocomment` flag to suppress this behavior. - -The double-star character `**` is supported by default, unless the -`noglobstar` flag is set. This is supported in the manner of bsdglob -and bash 4.1, where `**` only has special significance if it is the only -thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but -`a/**b` will not. **Note that this is different from the way that `**` is -handled by ruby's `Dir` class.** - -If an escaped pattern has no matches, and the `nonull` flag is set, -then minimatch.match returns the pattern as-provided, rather than -interpreting the character escapes. For example, -`minimatch.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than -`"*a?"`. This is akin to setting the `nullglob` option in bash, except -that it does not resolve escaped pattern characters. - -If brace expansion is not disabled, then it is performed before any -other interpretation of the glob pattern. Thus, a pattern like -`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded -**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are -checked for validity. Since those two are valid, matching proceeds. - - -## Minimatch Class - -Create a minimatch object by instanting the `minimatch.Minimatch` class. - -```javascript -var Minimatch = require("minimatch").Minimatch -var mm = new Minimatch(pattern, options) -``` - -### Properties - -* `pattern` The original pattern the minimatch object represents. -* `options` The options supplied to the constructor. -* `set` A 2-dimensional array of regexp or string expressions. - Each row in the - array corresponds to a brace-expanded pattern. Each item in the row - corresponds to a single path-part. For example, the pattern - `{a,b/c}/d` would expand to a set of patterns like: - - [ [ a, d ] - , [ b, c, d ] ] - - If a portion of the pattern doesn't have any "magic" in it - (that is, it's something like `"foo"` rather than `fo*o?`), then it - will be left as a string rather than converted to a regular - expression. - -* `regexp` Created by the `makeRe` method. A single regular expression - expressing the entire pattern. This is useful in cases where you wish - to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled. -* `negate` True if the pattern is negated. -* `comment` True if the pattern is a comment. -* `empty` True if the pattern is `""`. - -### Methods - -* `makeRe` Generate the `regexp` member if necessary, and return it. - Will return `false` if the pattern is invalid. -* `match(fname)` Return true if the filename matches the pattern, or - false otherwise. -* `matchOne(fileArray, patternArray, partial)` Take a `/`-split - filename, and match it against a single row in the `regExpSet`. This - method is mainly for internal use, but is exposed so that it can be - used by a glob-walker that needs to avoid excessive filesystem calls. - -All other methods are internal, and will be called as necessary. - -## Functions - -The top-level exported function has a `cache` property, which is an LRU -cache set to store 100 items. So, calling these methods repeatedly -with the same pattern and options will use the same Minimatch object, -saving the cost of parsing it multiple times. - -### minimatch(path, pattern, options) - -Main export. Tests a path against the pattern using the options. - -```javascript -var isJS = minimatch(file, "*.js", { matchBase: true }) -``` - -### minimatch.filter(pattern, options) - -Returns a function that tests its -supplied argument, suitable for use with `Array.filter`. Example: - -```javascript -var javascripts = fileList.filter(minimatch.filter("*.js", {matchBase: true})) -``` - -### minimatch.match(list, pattern, options) - -Match against the list of -files, in the style of fnmatch or glob. If nothing is matched, and -options.nonull is set, then return a list containing the pattern itself. - -```javascript -var javascripts = minimatch.match(fileList, "*.js", {matchBase: true})) -``` - -### minimatch.makeRe(pattern, options) - -Make a regular expression object from the pattern. - -## Options - -All options are `false` by default. - -### debug - -Dump a ton of stuff to stderr. - -### nobrace - -Do not expand `{a,b}` and `{1..3}` brace sets. - -### noglobstar - -Disable `**` matching against multiple folder names. - -### dot - -Allow patterns to match filenames starting with a period, even if -the pattern does not explicitly have a period in that spot. - -Note that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot` -is set. - -### noext - -Disable "extglob" style patterns like `+(a|b)`. - -### nocase - -Perform a case-insensitive match. - -### nonull - -When a match is not found by `minimatch.match`, return a list containing -the pattern itself. When set, an empty list is returned if there are -no matches. - -### matchBase - -If set, then patterns without slashes will be matched -against the basename of the path if it contains slashes. For example, -`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`. - -### nocomment - -Suppress the behavior of treating `#` at the start of a pattern as a -comment. - -### nonegate - -Suppress the behavior of treating a leading `!` character as negation. - -### flipNegate - -Returns from negate expressions the same as if they were not negated. -(Ie, true on a hit, false on a miss.) diff --git a/node_modules/karma/node_modules/minimatch/minimatch.js b/node_modules/karma/node_modules/minimatch/minimatch.js deleted file mode 100644 index 405746b6..00000000 --- a/node_modules/karma/node_modules/minimatch/minimatch.js +++ /dev/null @@ -1,1079 +0,0 @@ -;(function (require, exports, module, platform) { - -if (module) module.exports = minimatch -else exports.minimatch = minimatch - -if (!require) { - require = function (id) { - switch (id) { - case "sigmund": return function sigmund (obj) { - return JSON.stringify(obj) - } - case "path": return { basename: function (f) { - f = f.split(/[\/\\]/) - var e = f.pop() - if (!e) e = f.pop() - return e - }} - case "lru-cache": return function LRUCache () { - // not quite an LRU, but still space-limited. - var cache = {} - var cnt = 0 - this.set = function (k, v) { - cnt ++ - if (cnt >= 100) cache = {} - cache[k] = v - } - this.get = function (k) { return cache[k] } - } - } - } -} - -minimatch.Minimatch = Minimatch - -var LRU = require("lru-cache") - , cache = minimatch.cache = new LRU({max: 100}) - , GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {} - , sigmund = require("sigmund") - -var path = require("path") - // any single thing other than / - // don't need to escape / when using new RegExp() - , qmark = "[^/]" - - // * => any number of characters - , star = qmark + "*?" - - // ** when dots are allowed. Anything goes, except .. and . - // not (^ or / followed by one or two dots followed by $ or /), - // followed by anything, any number of times. - , twoStarDot = "(?:(?!(?:\\\/|^)(?:\\.{1,2})($|\\\/)).)*?" - - // not a ^ or / followed by a dot, - // followed by anything, any number of times. - , twoStarNoDot = "(?:(?!(?:\\\/|^)\\.).)*?" - - // characters that need to be escaped in RegExp. - , reSpecials = charSet("().*{}+?[]^$\\!") - -// "abc" -> { a:true, b:true, c:true } -function charSet (s) { - return s.split("").reduce(function (set, c) { - set[c] = true - return set - }, {}) -} - -// normalizes slashes. -var slashSplit = /\/+/ - -minimatch.monkeyPatch = monkeyPatch -function monkeyPatch () { - var desc = Object.getOwnPropertyDescriptor(String.prototype, "match") - var orig = desc.value - desc.value = function (p) { - if (p instanceof Minimatch) return p.match(this) - return orig.call(this, p) - } - Object.defineProperty(String.prototype, desc) -} - -minimatch.filter = filter -function filter (pattern, options) { - options = options || {} - return function (p, i, list) { - return minimatch(p, pattern, options) - } -} - -function ext (a, b) { - a = a || {} - b = b || {} - var t = {} - Object.keys(b).forEach(function (k) { - t[k] = b[k] - }) - Object.keys(a).forEach(function (k) { - t[k] = a[k] - }) - return t -} - -minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return minimatch - - var orig = minimatch - - var m = function minimatch (p, pattern, options) { - return orig.minimatch(p, pattern, ext(def, options)) - } - - m.Minimatch = function Minimatch (pattern, options) { - return new orig.Minimatch(pattern, ext(def, options)) - } - - return m -} - -Minimatch.defaults = function (def) { - if (!def || !Object.keys(def).length) return Minimatch - return minimatch.defaults(def).Minimatch -} - - -function minimatch (p, pattern, options) { - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - - // shortcut: comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - return false - } - - // "" only matches "" - if (pattern.trim() === "") return p === "" - - return new Minimatch(pattern, options).match(p) -} - -function Minimatch (pattern, options) { - if (!(this instanceof Minimatch)) { - return new Minimatch(pattern, options, cache) - } - - if (typeof pattern !== "string") { - throw new TypeError("glob pattern string required") - } - - if (!options) options = {} - pattern = pattern.trim() - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - pattern = pattern.split("\\").join("/") - } - - // lru storage. - // these things aren't particularly big, but walking down the string - // and turning it into a regexp can get pretty costly. - var cacheKey = pattern + "\n" + sigmund(options) - var cached = minimatch.cache.get(cacheKey) - if (cached) return cached - minimatch.cache.set(cacheKey, this) - - this.options = options - this.set = [] - this.pattern = pattern - this.regexp = null - this.negate = false - this.comment = false - this.empty = false - - // make the set of regexps etc. - this.make() -} - -Minimatch.prototype.make = make -function make () { - // don't do it more than once. - if (this._made) return - - var pattern = this.pattern - var options = this.options - - // empty patterns and comments match nothing. - if (!options.nocomment && pattern.charAt(0) === "#") { - this.comment = true - return - } - if (!pattern) { - this.empty = true - return - } - - // step 1: figure out negation, etc. - this.parseNegate() - - // step 2: expand braces - var set = this.globSet = this.braceExpand() - - if (options.debug) console.error(this.pattern, set) - - // step 3: now we have a set, so turn each one into a series of path-portion - // matching patterns. - // These will be regexps, except in the case of "**", which is - // set to the GLOBSTAR object for globstar behavior, - // and will not contain any / characters - set = this.globParts = set.map(function (s) { - return s.split(slashSplit) - }) - - if (options.debug) console.error(this.pattern, set) - - // glob --> regexps - set = set.map(function (s, si, set) { - return s.map(this.parse, this) - }, this) - - if (options.debug) console.error(this.pattern, set) - - // filter out everything that didn't compile properly. - set = set.filter(function (s) { - return -1 === s.indexOf(false) - }) - - if (options.debug) console.error(this.pattern, set) - - this.set = set -} - -Minimatch.prototype.parseNegate = parseNegate -function parseNegate () { - var pattern = this.pattern - , negate = false - , options = this.options - , negateOffset = 0 - - if (options.nonegate) return - - for ( var i = 0, l = pattern.length - ; i < l && pattern.charAt(i) === "!" - ; i ++) { - negate = !negate - negateOffset ++ - } - - if (negateOffset) this.pattern = pattern.substr(negateOffset) - this.negate = negate -} - -// Brace expansion: -// a{b,c}d -> abd acd -// a{b,}c -> abc ac -// a{0..3}d -> a0d a1d a2d a3d -// a{b,c{d,e}f}g -> abg acdfg acefg -// a{b,c}d{e,f}g -> abdeg acdeg abdeg abdfg -// -// Invalid sets are not expanded. -// a{2..}b -> a{2..}b -// a{b}c -> a{b}c -minimatch.braceExpand = function (pattern, options) { - return new Minimatch(pattern, options).braceExpand() -} - -Minimatch.prototype.braceExpand = braceExpand -function braceExpand (pattern, options) { - options = options || this.options - pattern = typeof pattern === "undefined" - ? this.pattern : pattern - - if (typeof pattern === "undefined") { - throw new Error("undefined pattern") - } - - if (options.nobrace || - !pattern.match(/\{.*\}/)) { - // shortcut. no need to expand. - return [pattern] - } - - var escaping = false - - // examples and comments refer to this crazy pattern: - // a{b,c{d,e},{f,g}h}x{y,z} - // expected: - // abxy - // abxz - // acdxy - // acdxz - // acexy - // acexz - // afhxy - // afhxz - // aghxy - // aghxz - - // everything before the first \{ is just a prefix. - // So, we pluck that off, and work with the rest, - // and then prepend it to everything we find. - if (pattern.charAt(0) !== "{") { - // console.error(pattern) - var prefix = null - for (var i = 0, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - // console.error(i, c) - if (c === "\\") { - escaping = !escaping - } else if (c === "{" && !escaping) { - prefix = pattern.substr(0, i) - break - } - } - - // actually no sets, all { were escaped. - if (prefix === null) { - // console.error("no sets") - return [pattern] - } - - var tail = braceExpand(pattern.substr(i), options) - return tail.map(function (t) { - return prefix + t - }) - } - - // now we have something like: - // {b,c{d,e},{f,g}h}x{y,z} - // walk through the set, expanding each part, until - // the set ends. then, we'll expand the suffix. - // If the set only has a single member, then'll put the {} back - - // first, handle numeric sets, since they're easier - var numset = pattern.match(/^\{(-?[0-9]+)\.\.(-?[0-9]+)\}/) - if (numset) { - // console.error("numset", numset[1], numset[2]) - var suf = braceExpand(pattern.substr(numset[0].length), options) - , start = +numset[1] - , end = +numset[2] - , inc = start > end ? -1 : 1 - , set = [] - for (var i = start; i != (end + inc); i += inc) { - // append all the suffixes - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - set.push(i + suf[ii]) - } - } - return set - } - - // ok, walk through the set - // We hope, somewhat optimistically, that there - // will be a } at the end. - // If the closing brace isn't found, then the pattern is - // interpreted as braceExpand("\\" + pattern) so that - // the leading \{ will be interpreted literally. - var i = 1 // skip the \{ - , depth = 1 - , set = [] - , member = "" - , sawEnd = false - , escaping = false - - function addMember () { - set.push(member) - member = "" - } - - // console.error("Entering for") - FOR: for (i = 1, l = pattern.length; i < l; i ++) { - var c = pattern.charAt(i) - // console.error("", i, c) - - if (escaping) { - escaping = false - member += "\\" + c - } else { - switch (c) { - case "\\": - escaping = true - continue - - case "{": - depth ++ - member += "{" - continue - - case "}": - depth -- - // if this closes the actual set, then we're done - if (depth === 0) { - addMember() - // pluck off the close-brace - i ++ - break FOR - } else { - member += c - continue - } - - case ",": - if (depth === 1) { - addMember() - } else { - member += c - } - continue - - default: - member += c - continue - } // switch - } // else - } // for - - // now we've either finished the set, and the suffix is - // pattern.substr(i), or we have *not* closed the set, - // and need to escape the leading brace - if (depth !== 0) { - // console.error("didn't close", pattern) - return braceExpand("\\" + pattern, options) - } - - // x{y,z} -> ["xy", "xz"] - // console.error("set", set) - // console.error("suffix", pattern.substr(i)) - var suf = braceExpand(pattern.substr(i), options) - // ["b", "c{d,e}","{f,g}h"] -> - // [["b"], ["cd", "ce"], ["fh", "gh"]] - var addBraces = set.length === 1 - // console.error("set pre-expanded", set) - set = set.map(function (p) { - return braceExpand(p, options) - }) - // console.error("set expanded", set) - - - // [["b"], ["cd", "ce"], ["fh", "gh"]] -> - // ["b", "cd", "ce", "fh", "gh"] - set = set.reduce(function (l, r) { - return l.concat(r) - }) - - if (addBraces) { - set = set.map(function (s) { - return "{" + s + "}" - }) - } - - // now attach the suffixes. - var ret = [] - for (var i = 0, l = set.length; i < l; i ++) { - for (var ii = 0, ll = suf.length; ii < ll; ii ++) { - ret.push(set[i] + suf[ii]) - } - } - return ret -} - -// parse a component of the expanded set. -// At this point, no pattern may contain "/" in it -// so we're going to return a 2d array, where each entry is the full -// pattern, split on '/', and then turned into a regular expression. -// A regexp is made at the end which joins each array with an -// escaped /, and another full one which joins each regexp with |. -// -// Following the lead of Bash 4.1, note that "**" only has special meaning -// when it is the *only* thing in a path portion. Otherwise, any series -// of * is equivalent to a single *. Globstar behavior is enabled by -// default, and can be disabled by setting options.noglobstar. -Minimatch.prototype.parse = parse -var SUBPARSE = {} -function parse (pattern, isSub) { - var options = this.options - - // shortcuts - if (!options.noglobstar && pattern === "**") return GLOBSTAR - if (pattern === "") return "" - - var re = "" - , hasMagic = !!options.nocase - , escaping = false - // ? => one single character - , patternListStack = [] - , plType - , stateChar - , inClass = false - , reClassStart = -1 - , classStart = -1 - // . and .. never match anything that doesn't start with ., - // even when options.dot is set. - , patternStart = pattern.charAt(0) === "." ? "" // anything - // not (start or / followed by . or .. followed by / or end) - : options.dot ? "(?!(?:^|\\\/)\\.{1,2}(?:$|\\\/))" - : "(?!\\.)" - - function clearStateChar () { - if (stateChar) { - // we had some state-tracking character - // that wasn't consumed by this pass. - switch (stateChar) { - case "*": - re += star - hasMagic = true - break - case "?": - re += qmark - hasMagic = true - break - default: - re += "\\"+stateChar - break - } - stateChar = false - } - } - - for ( var i = 0, len = pattern.length, c - ; (i < len) && (c = pattern.charAt(i)) - ; i ++ ) { - - if (options.debug) { - console.error("%s\t%s %s %j", pattern, i, re, c) - } - - // skip over any that are escaped. - if (escaping && reSpecials[c]) { - re += "\\" + c - escaping = false - continue - } - - SWITCH: switch (c) { - case "/": - // completely not allowed, even escaped. - // Should already be path-split by now. - return false - - case "\\": - clearStateChar() - escaping = true - continue - - // the various stateChar values - // for the "extglob" stuff. - case "?": - case "*": - case "+": - case "@": - case "!": - if (options.debug) { - console.error("%s\t%s %s %j <-- stateChar", pattern, i, re, c) - } - - // all of those are literals inside a class, except that - // the glob [!a] means [^a] in regexp - if (inClass) { - if (c === "!" && i === classStart + 1) c = "^" - re += c - continue - } - - // if we already have a stateChar, then it means - // that there was something like ** or +? in there. - // Handle the stateChar, then proceed with this one. - clearStateChar() - stateChar = c - // if extglob is disabled, then +(asdf|foo) isn't a thing. - // just clear the statechar *now*, rather than even diving into - // the patternList stuff. - if (options.noext) clearStateChar() - continue - - case "(": - if (inClass) { - re += "(" - continue - } - - if (!stateChar) { - re += "\\(" - continue - } - - plType = stateChar - patternListStack.push({ type: plType - , start: i - 1 - , reStart: re.length }) - // negation is (?:(?!js)[^/]*) - re += stateChar === "!" ? "(?:(?!" : "(?:" - stateChar = false - continue - - case ")": - if (inClass || !patternListStack.length) { - re += "\\)" - continue - } - - hasMagic = true - re += ")" - plType = patternListStack.pop().type - // negation is (?:(?!js)[^/]*) - // The others are (?:) - switch (plType) { - case "!": - re += "[^/]*?)" - break - case "?": - case "+": - case "*": re += plType - case "@": break // the default anyway - } - continue - - case "|": - if (inClass || !patternListStack.length || escaping) { - re += "\\|" - escaping = false - continue - } - - re += "|" - continue - - // these are mostly the same in regexp and glob - case "[": - // swallow any state-tracking char before the [ - clearStateChar() - - if (inClass) { - re += "\\" + c - continue - } - - inClass = true - classStart = i - reClassStart = re.length - re += c - continue - - case "]": - // a right bracket shall lose its special - // meaning and represent itself in - // a bracket expression if it occurs - // first in the list. -- POSIX.2 2.8.3.2 - if (i === classStart + 1 || !inClass) { - re += "\\" + c - escaping = false - continue - } - - // finish up the class. - hasMagic = true - inClass = false - re += c - continue - - default: - // swallow any state char that wasn't consumed - clearStateChar() - - if (escaping) { - // no need - escaping = false - } else if (reSpecials[c] - && !(c === "^" && inClass)) { - re += "\\" - } - - re += c - - } // switch - } // for - - - // handle the case where we left a class open. - // "[abc" is valid, equivalent to "\[abc" - if (inClass) { - // split where the last [ was, and escape it - // this is a huge pita. We now have to re-walk - // the contents of the would-be class to re-translate - // any characters that were passed through as-is - var cs = pattern.substr(classStart + 1) - , sp = this.parse(cs, SUBPARSE) - re = re.substr(0, reClassStart) + "\\[" + sp[0] - hasMagic = hasMagic || sp[1] - } - - // handle the case where we had a +( thing at the *end* - // of the pattern. - // each pattern list stack adds 3 chars, and we need to go through - // and escape any | chars that were passed through as-is for the regexp. - // Go through and escape them, taking care not to double-escape any - // | chars that were already escaped. - var pl - while (pl = patternListStack.pop()) { - var tail = re.slice(pl.reStart + 3) - // maybe some even number of \, then maybe 1 \, followed by a | - tail = tail.replace(/((?:\\{2})*)(\\?)\|/g, function (_, $1, $2) { - if (!$2) { - // the | isn't already escaped, so escape it. - $2 = "\\" - } - - // need to escape all those slashes *again*, without escaping the - // one that we need for escaping the | character. As it works out, - // escaping an even number of slashes can be done by simply repeating - // it exactly after itself. That's why this trick works. - // - // I am sorry that you have to see this. - return $1 + $1 + $2 + "|" - }) - - // console.error("tail=%j\n %s", tail, tail) - var t = pl.type === "*" ? star - : pl.type === "?" ? qmark - : "\\" + pl.type - - hasMagic = true - re = re.slice(0, pl.reStart) - + t + "\\(" - + tail - } - - // handle trailing things that only matter at the very end. - clearStateChar() - if (escaping) { - // trailing \\ - re += "\\\\" - } - - // only need to apply the nodot start if the re starts with - // something that could conceivably capture a dot - var addPatternStart = false - switch (re.charAt(0)) { - case ".": - case "[": - case "(": addPatternStart = true - } - - // if the re is not "" at this point, then we need to make sure - // it doesn't match against an empty path part. - // Otherwise a/* will match a/, which it should not. - if (re !== "" && hasMagic) re = "(?=.)" + re - - if (addPatternStart) re = patternStart + re - - // parsing just a piece of a larger pattern. - if (isSub === SUBPARSE) { - return [ re, hasMagic ] - } - - // skip the regexp for non-magical patterns - // unescape anything in it, though, so that it'll be - // an exact match against a file etc. - if (!hasMagic) { - return globUnescape(pattern) - } - - var flags = options.nocase ? "i" : "" - , regExp = new RegExp("^" + re + "$", flags) - - regExp._glob = pattern - regExp._src = re - - return regExp -} - -minimatch.makeRe = function (pattern, options) { - return new Minimatch(pattern, options || {}).makeRe() -} - -Minimatch.prototype.makeRe = makeRe -function makeRe () { - if (this.regexp || this.regexp === false) return this.regexp - - // at this point, this.set is a 2d array of partial - // pattern strings, or "**". - // - // It's better to use .match(). This function shouldn't - // be used, really, but it's pretty convenient sometimes, - // when you just want to work with a regex. - var set = this.set - - if (!set.length) return this.regexp = false - var options = this.options - - var twoStar = options.noglobstar ? star - : options.dot ? twoStarDot - : twoStarNoDot - , flags = options.nocase ? "i" : "" - - var re = set.map(function (pattern) { - return pattern.map(function (p) { - return (p === GLOBSTAR) ? twoStar - : (typeof p === "string") ? regExpEscape(p) - : p._src - }).join("\\\/") - }).join("|") - - // must match entire pattern - // ending in a * or ** will make it less strict. - re = "^(?:" + re + ")$" - - // can match anything, as long as it's not this. - if (this.negate) re = "^(?!" + re + ").*$" - - try { - return this.regexp = new RegExp(re, flags) - } catch (ex) { - return this.regexp = false - } -} - -minimatch.match = function (list, pattern, options) { - var mm = new Minimatch(pattern, options) - list = list.filter(function (f) { - return mm.match(f) - }) - if (options.nonull && !list.length) { - list.push(pattern) - } - return list -} - -Minimatch.prototype.match = match -function match (f, partial) { - // console.error("match", f, this.pattern) - // short-circuit in the case of busted things. - // comments, etc. - if (this.comment) return false - if (this.empty) return f === "" - - if (f === "/" && partial) return true - - var options = this.options - - // windows: need to use /, not \ - // On other platforms, \ is a valid (albeit bad) filename char. - if (platform === "win32") { - f = f.split("\\").join("/") - } - - // treat the test path as a set of pathparts. - f = f.split(slashSplit) - if (options.debug) { - console.error(this.pattern, "split", f) - } - - // just ONE of the pattern sets in this.set needs to match - // in order for it to be valid. If negating, then just one - // match means that we have failed. - // Either way, return on the first hit. - - var set = this.set - // console.error(this.pattern, "set", set) - - for (var i = 0, l = set.length; i < l; i ++) { - var pattern = set[i] - var hit = this.matchOne(f, pattern, partial) - if (hit) { - if (options.flipNegate) return true - return !this.negate - } - } - - // didn't get any hits. this is success if it's a negative - // pattern, failure otherwise. - if (options.flipNegate) return false - return this.negate -} - -// set partial to true to test if, for example, -// "/a/b" matches the start of "/*/b/*/d" -// Partial means, if you run out of file before you run -// out of pattern, then that's fine, as long as all -// the parts match. -Minimatch.prototype.matchOne = function (file, pattern, partial) { - var options = this.options - - if (options.debug) { - console.error("matchOne", - { "this": this - , file: file - , pattern: pattern }) - } - - if (options.matchBase && pattern.length === 1) { - file = path.basename(file.join("/")).split("/") - } - - if (options.debug) { - console.error("matchOne", file.length, pattern.length) - } - - for ( var fi = 0 - , pi = 0 - , fl = file.length - , pl = pattern.length - ; (fi < fl) && (pi < pl) - ; fi ++, pi ++ ) { - - if (options.debug) { - console.error("matchOne loop") - } - var p = pattern[pi] - , f = file[fi] - - if (options.debug) { - console.error(pattern, p, f) - } - - // should be impossible. - // some invalid regexp stuff in the set. - if (p === false) return false - - if (p === GLOBSTAR) { - if (options.debug) - console.error('GLOBSTAR', [pattern, p, f]) - - // "**" - // a/**/b/**/c would match the following: - // a/b/x/y/z/c - // a/x/y/z/b/c - // a/b/x/b/x/c - // a/b/c - // To do this, take the rest of the pattern after - // the **, and see if it would match the file remainder. - // If so, return success. - // If not, the ** "swallows" a segment, and try again. - // This is recursively awful. - // - // a/**/b/**/c matching a/b/x/y/z/c - // - a matches a - // - doublestar - // - matchOne(b/x/y/z/c, b/**/c) - // - b matches b - // - doublestar - // - matchOne(x/y/z/c, c) -> no - // - matchOne(y/z/c, c) -> no - // - matchOne(z/c, c) -> no - // - matchOne(c, c) yes, hit - var fr = fi - , pr = pi + 1 - if (pr === pl) { - if (options.debug) - console.error('** at the end') - // a ** at the end will just swallow the rest. - // We have found a match. - // however, it will not swallow /.x, unless - // options.dot is set. - // . and .. are *never* matched by **, for explosively - // exponential reasons. - for ( ; fi < fl; fi ++) { - if (file[fi] === "." || file[fi] === ".." || - (!options.dot && file[fi].charAt(0) === ".")) return false - } - return true - } - - // ok, let's see if we can swallow whatever we can. - WHILE: while (fr < fl) { - var swallowee = file[fr] - - if (options.debug) { - console.error('\nglobstar while', - file, fr, pattern, pr, swallowee) - } - - // XXX remove this slice. Just pass the start index. - if (this.matchOne(file.slice(fr), pattern.slice(pr), partial)) { - if (options.debug) - console.error('globstar found match!', fr, fl, swallowee) - // found a match. - return true - } else { - // can't swallow "." or ".." ever. - // can only swallow ".foo" when explicitly asked. - if (swallowee === "." || swallowee === ".." || - (!options.dot && swallowee.charAt(0) === ".")) { - if (options.debug) - console.error("dot detected!", file, fr, pattern, pr) - break WHILE - } - - // ** swallows a segment, and continue. - if (options.debug) - console.error('globstar swallow a segment, and continue') - fr ++ - } - } - // no match was found. - // However, in partial mode, we can't say this is necessarily over. - // If there's more *pattern* left, then - if (partial) { - // ran out of file - // console.error("\n>>> no match, partial?", file, fr, pattern, pr) - if (fr === fl) return true - } - return false - } - - // something other than ** - // non-magic patterns just have to match exactly - // patterns with magic have been turned into regexps. - var hit - if (typeof p === "string") { - if (options.nocase) { - hit = f.toLowerCase() === p.toLowerCase() - } else { - hit = f === p - } - if (options.debug) { - console.error("string match", p, f, hit) - } - } else { - hit = f.match(p) - if (options.debug) { - console.error("pattern match", p, f, hit) - } - } - - if (!hit) return false - } - - // Note: ending in / means that we'll get a final "" - // at the end of the pattern. This can only match a - // corresponding "" at the end of the file. - // If the file ends in /, then it can only match a - // a pattern that ends in /, unless the pattern just - // doesn't have any more for it. But, a/b/ should *not* - // match "a/b/*", even though "" matches against the - // [^/]*? pattern, except in partial mode, where it might - // simply not be reached yet. - // However, a/b/ should still satisfy a/* - - // now either we fell off the end of the pattern, or we're done. - if (fi === fl && pi === pl) { - // ran out of pattern and filename at the same time. - // an exact hit! - return true - } else if (fi === fl) { - // ran out of file, but still had pattern left. - // this is ok if we're doing the match as part of - // a glob fs traversal. - return partial - } else if (pi === pl) { - // ran out of pattern, still have file left. - // this is only acceptable if we're on the very last - // empty segment of a file with a trailing slash. - // a/* should match a/b/ - var emptyFileEnd = (fi === fl - 1) && (file[fi] === "") - return emptyFileEnd - } - - // should be unreachable. - throw new Error("wtf?") -} - - -// replace stuff like \* with * -function globUnescape (s) { - return s.replace(/\\(.)/g, "$1") -} - - -function regExpEscape (s) { - return s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") -} - -})( typeof require === "function" ? require : null, - this, - typeof module === "object" ? module : null, - typeof process === "object" ? process.platform : "win32" - ) diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/.npmignore b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS deleted file mode 100644 index 4a0bc503..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/CONTRIBUTORS +++ /dev/null @@ -1,14 +0,0 @@ -# Authors, sorted by whether or not they are me -Isaac Z. Schlueter -Brian Cottingham -Carlos Brito Lage -Jesse Dailey -Kevin O'Hara -Marco Rogers -Mark Cavage -Marko Mikulicic -Nathan Rajlich -Satheesh Natesan -Trent Mick -ashleybrener -n4kz diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/LICENSE b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/README.md b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/README.md deleted file mode 100644 index 03ee0f98..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n) { return n * 2 } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `n` - like-sized things. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. - -## API - -* `set(key, value)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. - -* `peek(key)` - - Returns the key value (or `undefined` if not found) without - updating the "recently used"-ness of the key. - - (If you find yourself using this a lot, you *might* be using the - wrong sort of data structure, but there are some use cases where - it's handy.) - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js deleted file mode 100644 index d1d13817..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/lib/lru-cache.js +++ /dev/null @@ -1,252 +0,0 @@ -;(function () { // closure for web browsers - -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} - -function naiveLength () { return 1 } - -function LRUCache (options) { - if (!(this instanceof LRUCache)) - return new LRUCache(options) - - if (typeof options === 'number') - options = { max: options } - - if (!options) - options = {} - - this._max = options.max - // Kind of weird to have a default max of Infinity, but oh well. - if (!this._max || !(typeof this._max === "number") || this._max <= 0 ) - this._max = Infinity - - this._lengthCalculator = options.length || naiveLength - if (typeof this._lengthCalculator !== "function") - this._lengthCalculator = naiveLength - - this._allowStale = options.stale || false - this._maxAge = options.maxAge || null - this._dispose = options.dispose - this.reset() -} - -// resize the cache when the max changes. -Object.defineProperty(LRUCache.prototype, "max", - { set : function (mL) { - if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - this._max = mL - if (this._length > this._max) trim(this) - } - , get : function () { return this._max } - , enumerable : true - }) - -// resize the cache when the lengthCalculator changes. -Object.defineProperty(LRUCache.prototype, "lengthCalculator", - { set : function (lC) { - if (typeof lC !== "function") { - this._lengthCalculator = naiveLength - this._length = this._itemCount - for (var key in this._cache) { - this._cache[key].length = 1 - } - } else { - this._lengthCalculator = lC - this._length = 0 - for (var key in this._cache) { - this._cache[key].length = this._lengthCalculator(this._cache[key].value) - this._length += this._cache[key].length - } - } - - if (this._length > this._max) trim(this) - } - , get : function () { return this._lengthCalculator } - , enumerable : true - }) - -Object.defineProperty(LRUCache.prototype, "length", - { get : function () { return this._length } - , enumerable : true - }) - - -Object.defineProperty(LRUCache.prototype, "itemCount", - { get : function () { return this._itemCount } - , enumerable : true - }) - -LRUCache.prototype.forEach = function (fn, thisp) { - thisp = thisp || this - var i = 0; - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - i++ - var hit = this._lruList[k] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - del(this, hit) - if (!this._allowStale) hit = undefined - } - if (hit) { - fn.call(thisp, hit.value, hit.key, this) - } - } -} - -LRUCache.prototype.keys = function () { - var keys = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - keys[i++] = hit.key - } - return keys -} - -LRUCache.prototype.values = function () { - var values = new Array(this._itemCount) - var i = 0 - for (var k = this._mru - 1; k >= 0 && i < this._itemCount; k--) if (this._lruList[k]) { - var hit = this._lruList[k] - values[i++] = hit.value - } - return values -} - -LRUCache.prototype.reset = function () { - if (this._dispose && this._cache) { - for (var k in this._cache) { - this._dispose(k, this._cache[k].value) - } - } - - this._cache = Object.create(null) // hash of items by key - this._lruList = Object.create(null) // list of items in order of use recency - this._mru = 0 // most recently used - this._lru = 0 // least recently used - this._length = 0 // number of items in the list - this._itemCount = 0 -} - -// Provided for debugging/dev purposes only. No promises whatsoever that -// this API stays stable. -LRUCache.prototype.dump = function () { - return this._cache -} - -LRUCache.prototype.dumpLru = function () { - return this._lruList -} - -LRUCache.prototype.set = function (key, value) { - if (hOP(this._cache, key)) { - // dispose of the old one before overwriting - if (this._dispose) this._dispose(key, this._cache[key].value) - if (this._maxAge) this._cache[key].now = Date.now() - this._cache[key].value = value - this.get(key) - return true - } - - var len = this._lengthCalculator(value) - var age = this._maxAge ? Date.now() : 0 - var hit = new Entry(key, value, this._mru++, len, age) - - // oversized objects fall out of cache automatically. - if (hit.length > this._max) { - if (this._dispose) this._dispose(key, value) - return false - } - - this._length += hit.length - this._lruList[hit.lu] = this._cache[key] = hit - this._itemCount ++ - - if (this._length > this._max) trim(this) - return true -} - -LRUCache.prototype.has = function (key) { - if (!hOP(this._cache, key)) return false - var hit = this._cache[key] - if (this._maxAge && (Date.now() - hit.now > this._maxAge)) { - return false - } - return true -} - -LRUCache.prototype.get = function (key) { - return get(this, key, true) -} - -LRUCache.prototype.peek = function (key) { - return get(this, key, false) -} - -LRUCache.prototype.pop = function () { - var hit = this._lruList[this._lru] - del(this, hit) - return hit || null -} - -LRUCache.prototype.del = function (key) { - del(this, this._cache[key]) -} - -function get (self, key, doUse) { - var hit = self._cache[key] - if (hit) { - if (self._maxAge && (Date.now() - hit.now > self._maxAge)) { - del(self, hit) - if (!self._allowStale) hit = undefined - } else { - if (doUse) use(self, hit) - } - if (hit) hit = hit.value - } - return hit -} - -function use (self, hit) { - shiftLU(self, hit) - hit.lu = self._mru ++ - self._lruList[hit.lu] = hit -} - -function trim (self) { - while (self._lru < self._mru && self._length > self._max) - del(self, self._lruList[self._lru]) -} - -function shiftLU (self, hit) { - delete self._lruList[ hit.lu ] - while (self._lru < self._mru && !self._lruList[self._lru]) self._lru ++ -} - -function del (self, hit) { - if (hit) { - if (self._dispose) self._dispose(hit.key, hit.value) - self._length -= hit.length - self._itemCount -- - delete self._cache[ hit.key ] - shiftLU(self, hit) - } -} - -// classy, since V8 prefers predictable objects. -function Entry (key, value, lu, length, now) { - this.key = key - this.value = value - this.lu = lu - this.length = length - this.now = now -} - -})() diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/package.json b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/package.json deleted file mode 100644 index 4472725d..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "2.5.0", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "scripts": { - "test": "tap test --gc" - }, - "main": "lib/lru-cache.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "tap": "", - "weak": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" - }, - "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `peek(key)`\n\n Returns the key value (or `undefined` if not found) without\n updating the \"recently used\"-ness of the key.\n\n (If you find yourself using this a lot, you *might* be using the\n wrong sort of data structure, but there are some use cases where\n it's handy.)\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "homepage": "https://github.com/isaacs/node-lru-cache", - "_id": "lru-cache@2.5.0", - "_from": "lru-cache@2" -} diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/basic.js b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/basic.js deleted file mode 100644 index f72697c4..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/basic.js +++ /dev/null @@ -1,369 +0,0 @@ -var test = require("tap").test - , LRU = require("../") - -test("basic", function (t) { - var cache = new LRU({max: 10}) - cache.set("key", "value") - t.equal(cache.get("key"), "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.length, 1) - t.equal(cache.max, 10) - t.end() -}) - -test("least recently set", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.get("a") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), "A") - t.end() -}) - -test("del", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.del("a") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("max", function (t) { - var cache = new LRU(3) - - // test changing the max, verify that the LRU items get dropped. - cache.max = 100 - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - - // now remove the max restriction, and try again. - cache.max = "hello" - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - // should trigger an immediate resize - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - t.end() -}) - -test("reset", function (t) { - var cache = new LRU(10) - cache.set("a", "A") - cache.set("b", "B") - cache.reset() - t.equal(cache.length, 0) - t.equal(cache.max, 10) - t.equal(cache.get("a"), undefined) - t.equal(cache.get("b"), undefined) - t.end() -}) - - -// Note: `.dump()` is a debugging tool only. No guarantees are made -// about the format/layout of the response. -test("dump", function (t) { - var cache = new LRU(10) - var d = cache.dump(); - t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") - cache.set("a", "A") - var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } - t.ok(d.a) - t.equal(d.a.key, "a") - t.equal(d.a.value, "A") - t.equal(d.a.lu, 0) - - cache.set("b", "B") - cache.get("b") - d = cache.dump() - t.ok(d.b) - t.equal(d.b.key, "b") - t.equal(d.b.value, "B") - t.equal(d.b.lu, 2) - - t.end() -}) - - -test("basic with weighed length", function (t) { - var cache = new LRU({ - max: 100, - length: function (item) { return item.size } - }) - cache.set("key", {val: "value", size: 50}) - t.equal(cache.get("key").val, "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) - t.equal(cache.length, 50) - t.equal(cache.max, 100) - t.end() -}) - - -test("weighed length item too large", function (t) { - var cache = new LRU({ - max: 10, - length: function (item) { return item.size } - }) - t.equal(cache.max, 10) - - // should fall out immediately - cache.set("key", {val: "value", size: 50}) - - t.equal(cache.length, 0) - t.equal(cache.get("key"), undefined) - t.end() -}) - -test("least recently set with weighed length", function (t) { - var cache = new LRU({ - max:8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.set("d", "DDDD") - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("c"), "CCC") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten with weighed length", function (t) { - var cache = new LRU({ - max: 8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.get("a") - cache.get("b") - cache.set("d", "DDDD") - t.equal(cache.get("c"), undefined) - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("b"), "BB") - t.equal(cache.get("a"), "A") - t.end() -}) - -test("set returns proper booleans", function(t) { - var cache = new LRU({ - max: 5, - length: function (item) { return item.length } - }) - - t.equal(cache.set("a", "A"), true) - - // should return false for max exceeded - t.equal(cache.set("b", "donuts"), false) - - t.equal(cache.set("b", "B"), true) - t.equal(cache.set("c", "CCCC"), true) - t.end() -}) - -test("drop the old items", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A") - - setTimeout(function () { - cache.set("b", "b") - t.equal(cache.get("a"), "A") - }, 25) - - setTimeout(function () { - cache.set("c", "C") - // timed out - t.notOk(cache.get("a")) - }, 60) - - setTimeout(function () { - t.notOk(cache.get("b")) - t.equal(cache.get("c"), "C") - }, 90) - - setTimeout(function () { - t.notOk(cache.get("c")) - t.end() - }, 155) -}) - -test("disposal function", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - dispose: function (k, n) { - disposed = n - } - }) - - cache.set(1, 1) - cache.set(2, 2) - t.equal(disposed, 1) - cache.set(3, 3) - t.equal(disposed, 2) - cache.reset() - t.equal(disposed, 3) - t.end() -}) - -test("disposal function on too big of item", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - length: function (k) { - return k.length - }, - dispose: function (k, n) { - disposed = n - } - }) - var obj = [ 1, 2 ] - - t.equal(disposed, false) - cache.set("obj", obj) - t.equal(disposed, obj) - t.end() -}) - -test("has()", function(t) { - var cache = new LRU({ - max: 1, - maxAge: 10 - }) - - cache.set('foo', 'bar') - t.equal(cache.has('foo'), true) - cache.set('blu', 'baz') - t.equal(cache.has('foo'), false) - t.equal(cache.has('blu'), true) - setTimeout(function() { - t.equal(cache.has('blu'), false) - t.end() - }, 15) -}) - -test("stale", function(t) { - var cache = new LRU({ - maxAge: 10, - stale: true - }) - - cache.set('foo', 'bar') - t.equal(cache.get('foo'), 'bar') - t.equal(cache.has('foo'), true) - setTimeout(function() { - t.equal(cache.has('foo'), false) - t.equal(cache.get('foo'), 'bar') - t.equal(cache.get('foo'), undefined) - t.end() - }, 15) -}) - -test("lru update via set", function(t) { - var cache = LRU({ max: 2 }); - - cache.set('foo', 1); - cache.set('bar', 2); - cache.del('bar'); - cache.set('baz', 3); - cache.set('qux', 4); - - t.equal(cache.get('foo'), undefined) - t.equal(cache.get('bar'), undefined) - t.equal(cache.get('baz'), 3) - t.equal(cache.get('qux'), 4) - t.end() -}) - -test("least recently set w/ peek", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - t.equal(cache.peek("a"), "A") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("pop the least used item", function (t) { - var cache = new LRU(3) - , last - - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - - t.equal(cache.length, 3) - t.equal(cache.max, 3) - - // Ensure we pop a, c, b - cache.get("b", "B") - - last = cache.pop() - t.equal(last.key, "a") - t.equal(last.value, "A") - t.equal(cache.length, 2) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "c") - t.equal(last.value, "C") - t.equal(cache.length, 1) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last.key, "b") - t.equal(last.value, "B") - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - last = cache.pop() - t.equal(last, null) - t.equal(cache.length, 0) - t.equal(cache.max, 3) - - t.end() -}) diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/foreach.js b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/foreach.js deleted file mode 100644 index eefb80d9..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/foreach.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('tap').test -var LRU = require('../') - -test('forEach', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 9 - l.forEach(function (val, key, cache) { - t.equal(cache, l) - t.equal(key, i.toString()) - t.equal(val, i.toString(2)) - i -= 1 - }) - - // get in order of most recently used - l.get(6) - l.get(8) - - var order = [ 8, 6, 9, 7, 5 ] - var i = 0 - - l.forEach(function (val, key, cache) { - var j = order[i ++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - - t.end() -}) - -test('keys() and values()', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - t.similar(l.keys(), ['9', '8', '7', '6', '5']) - t.similar(l.values(), ['1001', '1000', '111', '110', '101']) - - // get in order of most recently used - l.get(6) - l.get(8) - - t.similar(l.keys(), ['8', '6', '9', '7', '5']) - t.similar(l.values(), ['1000', '110', '1001', '111', '101']) - - t.end() -}) diff --git a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js b/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js deleted file mode 100644 index 7af45b02..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/lru-cache/test/memory-leak.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node --expose_gc - -var weak = require('weak'); -var test = require('tap').test -var LRU = require('../') -var l = new LRU({ max: 10 }) -var refs = 0 -function X() { - refs ++ - weak(this, deref) -} - -function deref() { - refs -- -} - -test('no leaks', function (t) { - // fill up the cache - for (var i = 0; i < 100; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var start = process.memoryUsage() - - // capture the memory - var startRefs = refs - - // do it again, but more - for (var i = 0; i < 10000; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var end = process.memoryUsage() - t.equal(refs, startRefs, 'no leaky refs') - - console.error('start: %j\n' + - 'end: %j', start, end); - t.pass(); - t.end(); -}) diff --git a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/LICENSE b/node_modules/karma/node_modules/minimatch/node_modules/sigmund/LICENSE deleted file mode 100644 index 0c44ae71..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/LICENSE +++ /dev/null @@ -1,27 +0,0 @@ -Copyright (c) Isaac Z. Schlueter ("Author") -All rights reserved. - -The BSD License - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS -BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, -WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE -OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN -IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/README.md b/node_modules/karma/node_modules/minimatch/node_modules/sigmund/README.md deleted file mode 100644 index 7e365129..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# sigmund - -Quick and dirty signatures for Objects. - -This is like a much faster `deepEquals` comparison, which returns a -string key suitable for caches and the like. - -## Usage - -```javascript -function doSomething (someObj) { - var key = sigmund(someObj, maxDepth) // max depth defaults to 10 - var cached = cache.get(key) - if (cached) return cached) - - var result = expensiveCalculation(someObj) - cache.set(key, result) - return result -} -``` - -The resulting key will be as unique and reproducible as calling -`JSON.stringify` or `util.inspect` on the object, but is much faster. -In order to achieve this speed, some differences are glossed over. -For example, the object `{0:'foo'}` will be treated identically to the -array `['foo']`. - -Also, just as there is no way to summon the soul from the scribblings -of a cocain-addled psychoanalyst, there is no way to revive the object -from the signature string that sigmund gives you. In fact, it's -barely even readable. - -As with `sys.inspect` and `JSON.stringify`, larger objects will -produce larger signature strings. - -Because sigmund is a bit less strict than the more thorough -alternatives, the strings will be shorter, and also there is a -slightly higher chance for collisions. For example, these objects -have the same signature: - - var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} - var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -Like a good Freudian, sigmund is most effective when you already have -some understanding of what you're looking for. It can help you help -yourself, but you must be willing to do some work as well. - -Cycles are handled, and cyclical objects are silently omitted (though -the key is included in the signature output.) - -The second argument is the maximum depth, which defaults to 10, -because that is the maximum object traversal depth covered by most -insurance carriers. diff --git a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/bench.js b/node_modules/karma/node_modules/minimatch/node_modules/sigmund/bench.js deleted file mode 100644 index 5acfd6d9..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/bench.js +++ /dev/null @@ -1,283 +0,0 @@ -// different ways to id objects -// use a req/res pair, since it's crazy deep and cyclical - -// sparseFE10 and sigmund are usually pretty close, which is to be expected, -// since they are essentially the same algorithm, except that sigmund handles -// regular expression objects properly. - - -var http = require('http') -var util = require('util') -var sigmund = require('./sigmund.js') -var sreq, sres, creq, cres, test - -http.createServer(function (q, s) { - sreq = q - sres = s - sres.end('ok') - this.close(function () { setTimeout(function () { - start() - }, 200) }) -}).listen(1337, function () { - creq = http.get({ port: 1337 }) - creq.on('response', function (s) { cres = s }) -}) - -function start () { - test = [sreq, sres, creq, cres] - // test = sreq - // sreq.sres = sres - // sreq.creq = creq - // sreq.cres = cres - - for (var i in exports.compare) { - console.log(i) - var hash = exports.compare[i]() - console.log(hash) - console.log(hash.length) - console.log('') - } - - require('bench').runMain() -} - -function customWs (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return ('' + obj).replace(/[\n ]+/g, '') - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return customWs(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + customWs(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function custom (obj, md, d) { - d = d || 0 - var to = typeof obj - if (to === 'undefined' || to === 'function' || to === null) return '' - if (d > md || !obj || to !== 'object') return '' + obj - - if (Array.isArray(obj)) { - return obj.map(function (i, _, __) { - return custom(i, md, d + 1) - }).reduce(function (a, b) { return a + b }, '') - } - - var keys = Object.keys(obj) - return keys.map(function (k, _, __) { - return k + ':' + custom(obj[k], md, d + 1) - }).reduce(function (a, b) { return a + b }, '') -} - -function sparseFE2 (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k + ':' - ch(v[k], depth + 1) - }) - soFar += '}' - } - ch(obj, 0) - return soFar -} - -function sparseFE (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - Object.keys(v).forEach(function (k, _, __) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') return - var to = typeof v[k] - if (to === 'function' || to === 'undefined') return - soFar += k - ch(v[k], depth + 1) - }) - } - ch(obj, 0) - return soFar -} - -function sparse (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k - ch(v[k], depth + 1) - } - } - ch(obj, 0) - return soFar -} - -function noCommas (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - - -function flatten (obj, maxDepth) { - var seen = [] - var soFar = '' - function ch (v, depth) { - if (depth > maxDepth) return - if (typeof v === 'function' || typeof v === 'undefined') return - if (typeof v !== 'object' || !v) { - soFar += v - return - } - if (seen.indexOf(v) !== -1 || depth === maxDepth) return - seen.push(v) - soFar += '{' - for (var k in v) { - // pseudo-private values. skip those. - if (k.charAt(0) === '_') continue - var to = typeof v[k] - if (to === 'function' || to === 'undefined') continue - soFar += k + ':' - ch(v[k], depth + 1) - soFar += ',' - } - soFar += '}' - } - ch(obj, 0) - return soFar -} - -exports.compare = -{ - // 'custom 2': function () { - // return custom(test, 2, 0) - // }, - // 'customWs 2': function () { - // return customWs(test, 2, 0) - // }, - 'JSON.stringify (guarded)': function () { - var seen = [] - return JSON.stringify(test, function (k, v) { - if (typeof v !== 'object' || !v) return v - if (seen.indexOf(v) !== -1) return undefined - seen.push(v) - return v - }) - }, - - 'flatten 10': function () { - return flatten(test, 10) - }, - - // 'flattenFE 10': function () { - // return flattenFE(test, 10) - // }, - - 'noCommas 10': function () { - return noCommas(test, 10) - }, - - 'sparse 10': function () { - return sparse(test, 10) - }, - - 'sparseFE 10': function () { - return sparseFE(test, 10) - }, - - 'sparseFE2 10': function () { - return sparseFE2(test, 10) - }, - - sigmund: function() { - return sigmund(test, 10) - }, - - - // 'util.inspect 1': function () { - // return util.inspect(test, false, 1, false) - // }, - // 'util.inspect undefined': function () { - // util.inspect(test) - // }, - // 'util.inspect 2': function () { - // util.inspect(test, false, 2, false) - // }, - // 'util.inspect 3': function () { - // util.inspect(test, false, 3, false) - // }, - // 'util.inspect 4': function () { - // util.inspect(test, false, 4, false) - // }, - // 'util.inspect Infinity': function () { - // util.inspect(test, false, Infinity, false) - // } -} - -/** results -**/ diff --git a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/package.json b/node_modules/karma/node_modules/minimatch/node_modules/sigmund/package.json deleted file mode 100644 index cb7e2bd4..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/package.json +++ /dev/null @@ -1,42 +0,0 @@ -{ - "name": "sigmund", - "version": "1.0.0", - "description": "Quick and dirty signatures for Objects.", - "main": "sigmund.js", - "directories": { - "test": "test" - }, - "dependencies": {}, - "devDependencies": { - "tap": "~0.3.0" - }, - "scripts": { - "test": "tap test/*.js", - "bench": "node bench.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/isaacs/sigmund" - }, - "keywords": [ - "object", - "signature", - "key", - "data", - "psychoanalysis" - ], - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me/" - }, - "license": "BSD", - "readme": "# sigmund\n\nQuick and dirty signatures for Objects.\n\nThis is like a much faster `deepEquals` comparison, which returns a\nstring key suitable for caches and the like.\n\n## Usage\n\n```javascript\nfunction doSomething (someObj) {\n var key = sigmund(someObj, maxDepth) // max depth defaults to 10\n var cached = cache.get(key)\n if (cached) return cached)\n\n var result = expensiveCalculation(someObj)\n cache.set(key, result)\n return result\n}\n```\n\nThe resulting key will be as unique and reproducible as calling\n`JSON.stringify` or `util.inspect` on the object, but is much faster.\nIn order to achieve this speed, some differences are glossed over.\nFor example, the object `{0:'foo'}` will be treated identically to the\narray `['foo']`.\n\nAlso, just as there is no way to summon the soul from the scribblings\nof a cocain-addled psychoanalyst, there is no way to revive the object\nfrom the signature string that sigmund gives you. In fact, it's\nbarely even readable.\n\nAs with `sys.inspect` and `JSON.stringify`, larger objects will\nproduce larger signature strings.\n\nBecause sigmund is a bit less strict than the more thorough\nalternatives, the strings will be shorter, and also there is a\nslightly higher chance for collisions. For example, these objects\nhave the same signature:\n\n var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]}\n var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']}\n\nLike a good Freudian, sigmund is most effective when you already have\nsome understanding of what you're looking for. It can help you help\nyourself, but you must be willing to do some work as well.\n\nCycles are handled, and cyclical objects are silently omitted (though\nthe key is included in the signature output.)\n\nThe second argument is the maximum depth, which defaults to 10,\nbecause that is the maximum object traversal depth covered by most\ninsurance carriers.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/sigmund/issues" - }, - "homepage": "https://github.com/isaacs/sigmund", - "_id": "sigmund@1.0.0", - "_from": "sigmund@~1.0.0" -} diff --git a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/sigmund.js b/node_modules/karma/node_modules/minimatch/node_modules/sigmund/sigmund.js deleted file mode 100644 index 82c7ab8c..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/sigmund.js +++ /dev/null @@ -1,39 +0,0 @@ -module.exports = sigmund -function sigmund (subject, maxSessions) { - maxSessions = maxSessions || 10; - var notes = []; - var analysis = ''; - var RE = RegExp; - - function psychoAnalyze (subject, session) { - if (session > maxSessions) return; - - if (typeof subject === 'function' || - typeof subject === 'undefined') { - return; - } - - if (typeof subject !== 'object' || !subject || - (subject instanceof RE)) { - analysis += subject; - return; - } - - if (notes.indexOf(subject) !== -1 || session === maxSessions) return; - - notes.push(subject); - analysis += '{'; - Object.keys(subject).forEach(function (issue, _, __) { - // pseudo-private values. skip those. - if (issue.charAt(0) === '_') return; - var to = typeof subject[issue]; - if (to === 'function' || to === 'undefined') return; - analysis += issue; - psychoAnalyze(subject[issue], session + 1); - }); - } - psychoAnalyze(subject, 0); - return analysis; -} - -// vim: set softtabstop=4 shiftwidth=4: diff --git a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/test/basic.js b/node_modules/karma/node_modules/minimatch/node_modules/sigmund/test/basic.js deleted file mode 100644 index 50c53a13..00000000 --- a/node_modules/karma/node_modules/minimatch/node_modules/sigmund/test/basic.js +++ /dev/null @@ -1,24 +0,0 @@ -var test = require('tap').test -var sigmund = require('../sigmund.js') - - -// occasionally there are duplicates -// that's an acceptable edge-case. JSON.stringify and util.inspect -// have some collision potential as well, though less, and collision -// detection is expensive. -var hash = '{abc/def/g{0h1i2{jkl' -var obj1 = {a:'b',c:/def/,g:['h','i',{j:'',k:'l'}]} -var obj2 = {a:'b',c:'/def/',g:['h','i','{jkl']} - -var obj3 = JSON.parse(JSON.stringify(obj1)) -obj3.c = /def/ -obj3.g[2].cycle = obj3 -var cycleHash = '{abc/def/g{0h1i2{jklcycle' - -test('basic', function (t) { - t.equal(sigmund(obj1), hash) - t.equal(sigmund(obj2), hash) - t.equal(sigmund(obj3), cycleHash) - t.end() -}) - diff --git a/node_modules/karma/node_modules/minimatch/package.json b/node_modules/karma/node_modules/minimatch/package.json deleted file mode 100644 index 9e36cab9..00000000 --- a/node_modules/karma/node_modules/minimatch/package.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me", - "url": "http://blog.izs.me" - }, - "name": "minimatch", - "description": "a glob matcher in javascript", - "version": "0.2.12", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/minimatch.git" - }, - "main": "minimatch.js", - "scripts": { - "test": "tap test" - }, - "engines": { - "node": "*" - }, - "dependencies": { - "lru-cache": "2", - "sigmund": "~1.0.0" - }, - "devDependencies": { - "tap": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/minimatch/raw/master/LICENSE" - }, - "readme": "# minimatch\n\nA minimal matching utility.\n\n[![Build Status](https://secure.travis-ci.org/isaacs/minimatch.png)](http://travis-ci.org/isaacs/minimatch)\n\n\nThis is the matching library used internally by npm.\n\nEventually, it will replace the C binding in node-glob.\n\nIt works by converting glob expressions into JavaScript `RegExp`\nobjects.\n\n## Usage\n\n```javascript\nvar minimatch = require(\"minimatch\")\n\nminimatch(\"bar.foo\", \"*.foo\") // true!\nminimatch(\"bar.foo\", \"*.bar\") // false!\n```\n\n## Features\n\nSupports these glob features:\n\n* Brace Expansion\n* Extended glob matching\n* \"Globstar\" `**` matching\n\nSee:\n\n* `man sh`\n* `man bash`\n* `man 3 fnmatch`\n* `man 5 gitignore`\n\n### Comparisons to other fnmatch/glob implementations\n\nWhile strict compliance with the existing standards is a worthwhile\ngoal, some discrepancies exist between minimatch and other\nimplementations, and are intentional.\n\nIf the pattern starts with a `!` character, then it is negated. Set the\n`nonegate` flag to suppress this behavior, and treat leading `!`\ncharacters normally. This is perhaps relevant if you wish to start the\npattern with a negative extglob pattern like `!(a|B)`. Multiple `!`\ncharacters at the start of a pattern will negate the pattern multiple\ntimes.\n\nIf a pattern starts with `#`, then it is treated as a comment, and\nwill not match anything. Use `\\#` to match a literal `#` at the\nstart of a line, or set the `nocomment` flag to suppress this behavior.\n\nThe double-star character `**` is supported by default, unless the\n`noglobstar` flag is set. This is supported in the manner of bsdglob\nand bash 4.1, where `**` only has special significance if it is the only\nthing in a path part. That is, `a/**/b` will match `a/x/y/b`, but\n`a/**b` will not. **Note that this is different from the way that `**` is\nhandled by ruby's `Dir` class.**\n\nIf an escaped pattern has no matches, and the `nonull` flag is set,\nthen minimatch.match returns the pattern as-provided, rather than\ninterpreting the character escapes. For example,\n`minimatch.match([], \"\\\\*a\\\\?\")` will return `\"\\\\*a\\\\?\"` rather than\n`\"*a?\"`. This is akin to setting the `nullglob` option in bash, except\nthat it does not resolve escaped pattern characters.\n\nIf brace expansion is not disabled, then it is performed before any\nother interpretation of the glob pattern. Thus, a pattern like\n`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded\n**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are\nchecked for validity. Since those two are valid, matching proceeds.\n\n\n## Minimatch Class\n\nCreate a minimatch object by instanting the `minimatch.Minimatch` class.\n\n```javascript\nvar Minimatch = require(\"minimatch\").Minimatch\nvar mm = new Minimatch(pattern, options)\n```\n\n### Properties\n\n* `pattern` The original pattern the minimatch object represents.\n* `options` The options supplied to the constructor.\n* `set` A 2-dimensional array of regexp or string expressions.\n Each row in the\n array corresponds to a brace-expanded pattern. Each item in the row\n corresponds to a single path-part. For example, the pattern\n `{a,b/c}/d` would expand to a set of patterns like:\n\n [ [ a, d ]\n , [ b, c, d ] ]\n\n If a portion of the pattern doesn't have any \"magic\" in it\n (that is, it's something like `\"foo\"` rather than `fo*o?`), then it\n will be left as a string rather than converted to a regular\n expression.\n\n* `regexp` Created by the `makeRe` method. A single regular expression\n expressing the entire pattern. This is useful in cases where you wish\n to use the pattern somewhat like `fnmatch(3)` with `FNM_PATH` enabled.\n* `negate` True if the pattern is negated.\n* `comment` True if the pattern is a comment.\n* `empty` True if the pattern is `\"\"`.\n\n### Methods\n\n* `makeRe` Generate the `regexp` member if necessary, and return it.\n Will return `false` if the pattern is invalid.\n* `match(fname)` Return true if the filename matches the pattern, or\n false otherwise.\n* `matchOne(fileArray, patternArray, partial)` Take a `/`-split\n filename, and match it against a single row in the `regExpSet`. This\n method is mainly for internal use, but is exposed so that it can be\n used by a glob-walker that needs to avoid excessive filesystem calls.\n\nAll other methods are internal, and will be called as necessary.\n\n## Functions\n\nThe top-level exported function has a `cache` property, which is an LRU\ncache set to store 100 items. So, calling these methods repeatedly\nwith the same pattern and options will use the same Minimatch object,\nsaving the cost of parsing it multiple times.\n\n### minimatch(path, pattern, options)\n\nMain export. Tests a path against the pattern using the options.\n\n```javascript\nvar isJS = minimatch(file, \"*.js\", { matchBase: true })\n```\n\n### minimatch.filter(pattern, options)\n\nReturns a function that tests its\nsupplied argument, suitable for use with `Array.filter`. Example:\n\n```javascript\nvar javascripts = fileList.filter(minimatch.filter(\"*.js\", {matchBase: true}))\n```\n\n### minimatch.match(list, pattern, options)\n\nMatch against the list of\nfiles, in the style of fnmatch or glob. If nothing is matched, and\noptions.nonull is set, then return a list containing the pattern itself.\n\n```javascript\nvar javascripts = minimatch.match(fileList, \"*.js\", {matchBase: true}))\n```\n\n### minimatch.makeRe(pattern, options)\n\nMake a regular expression object from the pattern.\n\n## Options\n\nAll options are `false` by default.\n\n### debug\n\nDump a ton of stuff to stderr.\n\n### nobrace\n\nDo not expand `{a,b}` and `{1..3}` brace sets.\n\n### noglobstar\n\nDisable `**` matching against multiple folder names.\n\n### dot\n\nAllow patterns to match filenames starting with a period, even if\nthe pattern does not explicitly have a period in that spot.\n\nNote that by default, `a/**/b` will **not** match `a/.d/b`, unless `dot`\nis set.\n\n### noext\n\nDisable \"extglob\" style patterns like `+(a|b)`.\n\n### nocase\n\nPerform a case-insensitive match.\n\n### nonull\n\nWhen a match is not found by `minimatch.match`, return a list containing\nthe pattern itself. When set, an empty list is returned if there are\nno matches.\n\n### matchBase\n\nIf set, then patterns without slashes will be matched\nagainst the basename of the path if it contains slashes. For example,\n`a?b` would match the path `/xyz/123/acb`, but not `/xyz/acb/123`.\n\n### nocomment\n\nSuppress the behavior of treating `#` at the start of a pattern as a\ncomment.\n\n### nonegate\n\nSuppress the behavior of treating a leading `!` character as negation.\n\n### flipNegate\n\nReturns from negate expressions the same as if they were not negated.\n(Ie, true on a hit, false on a miss.)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/minimatch/issues" - }, - "homepage": "https://github.com/isaacs/minimatch", - "_id": "minimatch@0.2.12", - "_from": "minimatch@~0.2" -} diff --git a/node_modules/karma/node_modules/minimatch/test/basic.js b/node_modules/karma/node_modules/minimatch/test/basic.js deleted file mode 100644 index ae7ac73c..00000000 --- a/node_modules/karma/node_modules/minimatch/test/basic.js +++ /dev/null @@ -1,399 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - - -var patterns = - [ "http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - // https://github.com/isaacs/minimatch/issues/5 - , function () { - files = [ 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' - , 'a/b/.x' - , 'a/b/.x/' - , 'a/.x/b' - , '.x' - , '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b/.x/c' - , '.x/.x' ] - } - , ["**/.x/**", [ '.x/' - , '.x/a' - , '.x/a/b' - , 'a/.x/b' - , 'a/b/.x/' - , 'a/b/.x/c' - , 'a/b/.x/c/d' - , 'a/b/.x/c/d/e' ] ] - - ] - -var regexps = - [ '/^(?:(?=.)a[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:(?=.)X[^/]*?)$/', - '/^(?:\\*)$/', - '/^(?:(?=.)\\*[^/]*?)$/', - '/^(?:\\*\\*)$/', - '/^(?:(?=.)b[^/]*?\\/)$/', - '/^(?:(?=.)c[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:\\.\\.\\/(?!\\.)(?=.)[^/]*?\\/)$/', - '/^(?:s\\/(?=.)\\.\\.[^/]*?\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/1\\/)$/', - '/^(?:\\/\\^root:\\/\\{s\\/(?=.)\\^[^:][^/]*?:[^:][^/]*?:\\([^:]\\)[^/]*?\\.[^/]*?\\$\\/\u0001\\/)$/', - '/^(?:(?!\\.)(?=.)[a-c]b[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[a-y][^/]*?[^c])$/', - '/^(?:(?=.)a[^/]*?[^c])$/', - '/^(?:(?=.)a[X-]b)$/', - '/^(?:(?!\\.)(?=.)[^a-c][^/]*?)$/', - '/^(?:a\\*b\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?=.)a\\*[^/]\\/(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\\\\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\![^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.\\*)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[b]c)$/', - '/^(?:(?=.)a[^/]c)$/', - '/^(?:a\\*c)$/', - 'false', - '/^(?:(?!\\.)(?=.)[^/]*?\\/(?=.)man[^/]*?\\/(?=.)bash\\.[^/]*?)$/', - '/^(?:man\\/man1\\/bash\\.1)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?=.)a[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/]k[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/][^/]*?[^/]*?cd[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?k[^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[-abc])$/', - '/^(?:(?!\\.)(?=.)[abc-])$/', - '/^(?:\\\\)$/', - '/^(?:(?!\\.)(?=.)[\\\\])$/', - '/^(?:(?!\\.)(?=.)[\\[])$/', - '/^(?:\\[)$/', - '/^(?:(?=.)\\[(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[\\]])$/', - '/^(?:(?!\\.)(?=.)[\\]-])$/', - '/^(?:(?!\\.)(?=.)[a-z])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/])$/', - '/^(?:(?!\\.)(?=.)[^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?c)$/', - '/^(?:(?!\\.)(?=.)[^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?c[^/]*?[^/][^/]*?[^/]*?)$/', - '/^(?:(?=.)a[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/][^/][^/][^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?[^/]*?)$/', - '/^(?:\\[\\])$/', - '/^(?:\\[abc)$/', - '/^(?:(?=.)XYZ)$/i', - '/^(?:(?=.)ab[^/]*?)$/i', - '/^(?:(?!\\.)(?=.)[ia][^/][ck])$/i', - '/^(?:\\/(?!\\.)(?=.)[^/]*?|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:\\/(?!\\.)(?=.)[^/]|(?!\\.)(?=.)[^/]*?)$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?)$/', - '/^(?:a\\/(?!(?:^|\\/)\\.{1,2}(?:$|\\/))(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:a\\/(?!\\.)(?=.)[^/]*?\\/b)$/', - '/^(?:a\\/(?=.)\\.[^/]*?\\/b)$/', - '/^(?:(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\/b\\))$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?=.)\\[(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)\\[(?=.)#a[^/]*?)$/', - '/^(?:(?=.)\\+\\(a\\|[^/]*?\\|c\\\\\\\\\\|d\\\\\\\\\\|e\\\\\\\\\\\\\\\\\\|f\\\\\\\\\\\\\\\\\\|g)$/', - '/^(?:(?!\\.)(?=.)(?:a|b)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:a|(?!\\.)(?=.)[^/]*?\\(b\\|c|d\\))$/', - '/^(?:a|(?!\\.)(?=.)(?:b|c)*|(?!\\.)(?=.)(?:b|d)*)$/', - '/^(?:(?!\\.)(?=.)(?:a|b|c)*|(?!\\.)(?=.)(?:a|c)*)$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\(a\\|b\\|c\\)|(?!\\.)(?=.)[^/]*?\\(a\\|c\\))$/', - '/^(?:(?=.)a[^/]b)$/', - '/^(?:(?=.)#[^/]*?)$/', - '/^(?!^(?:(?=.)a[^/]*?)$).*$/', - '/^(?:(?=.)\\!a[^/]*?)$/', - '/^(?:(?=.)a[^/]*?)$/', - '/^(?!^(?:(?=.)\\!a[^/]*?)$).*$/', - '/^(?:(?!\\.)(?=.)[^/]*?\\.(?:(?!js)[^/]*?))$/', - '/^(?:(?:(?!(?:\\/|^)\\.).)*?\\/\\.x\\/(?:(?!(?:\\/|^)\\.).)*?)$/' ] -var re = 0; - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - patterns.forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var m = new mm.Minimatch(pattern, options) - var r = m.makeRe() - var expectRe = regexps[re++] - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - - t.equal(tapOpts.re, expectRe, tapOpts) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/karma/node_modules/minimatch/test/brace-expand.js b/node_modules/karma/node_modules/minimatch/test/brace-expand.js deleted file mode 100644 index 7ee278a2..00000000 --- a/node_modules/karma/node_modules/minimatch/test/brace-expand.js +++ /dev/null @@ -1,33 +0,0 @@ -var tap = require("tap") - , minimatch = require("../") - -tap.test("brace expansion", function (t) { - // [ pattern, [expanded] ] - ; [ [ "a{b,c{d,e},{f,g}h}x{y,z}" - , [ "abxy" - , "abxz" - , "acdxy" - , "acdxz" - , "acexy" - , "acexz" - , "afhxy" - , "afhxz" - , "aghxy" - , "aghxz" ] ] - , [ "a{1..5}b" - , [ "a1b" - , "a2b" - , "a3b" - , "a4b" - , "a5b" ] ] - , [ "a{b}c", ["a{b}c"] ] - ].forEach(function (tc) { - var p = tc[0] - , expect = tc[1] - t.equivalent(minimatch.braceExpand(p), expect, p) - }) - console.error("ending") - t.end() -}) - - diff --git a/node_modules/karma/node_modules/minimatch/test/caching.js b/node_modules/karma/node_modules/minimatch/test/caching.js deleted file mode 100644 index 0fec4b0f..00000000 --- a/node_modules/karma/node_modules/minimatch/test/caching.js +++ /dev/null @@ -1,14 +0,0 @@ -var Minimatch = require("../minimatch.js").Minimatch -var tap = require("tap") -tap.test("cache test", function (t) { - var mm1 = new Minimatch("a?b") - var mm2 = new Minimatch("a?b") - t.equal(mm1, mm2, "should get the same object") - // the lru should drop it after 100 entries - for (var i = 0; i < 100; i ++) { - new Minimatch("a"+i) - } - mm2 = new Minimatch("a?b") - t.notEqual(mm1, mm2, "cache should have dropped") - t.end() -}) diff --git a/node_modules/karma/node_modules/minimatch/test/defaults.js b/node_modules/karma/node_modules/minimatch/test/defaults.js deleted file mode 100644 index 25f1f601..00000000 --- a/node_modules/karma/node_modules/minimatch/test/defaults.js +++ /dev/null @@ -1,274 +0,0 @@ -// http://www.bashcookbook.com/bashinfo/source/bash-1.14.7/tests/glob-test -// -// TODO: Some of these tests do very bad things with backslashes, and will -// most likely fail badly on windows. They should probably be skipped. - -var tap = require("tap") - , globalBefore = Object.keys(global) - , mm = require("../") - , files = [ "a", "b", "c", "d", "abc" - , "abd", "abe", "bb", "bcd" - , "ca", "cb", "dd", "de" - , "bdir/", "bdir/cfile"] - , next = files.concat([ "a-b", "aXb" - , ".x", ".y" ]) - -tap.test("basic tests", function (t) { - var start = Date.now() - - // [ pattern, [matches], MM opts, files, TAP opts] - ; [ "http://www.bashcookbook.com/bashinfo" + - "/source/bash-1.14.7/tests/glob-test" - , ["a*", ["a", "abc", "abd", "abe"]] - , ["X*", ["X*"], {nonull: true}] - - // allow null glob expansion - , ["X*", []] - - // isaacs: Slightly different than bash/sh/ksh - // \\* is not un-escaped to literal "*" in a failed match, - // but it does make it get treated as a literal star - , ["\\*", ["\\*"], {nonull: true}] - , ["\\**", ["\\**"], {nonull: true}] - , ["\\*\\*", ["\\*\\*"], {nonull: true}] - - , ["b*/", ["bdir/"]] - , ["c*", ["c", "ca", "cb"]] - , ["**", files] - - , ["\\.\\./*/", ["\\.\\./*/"], {nonull: true}] - , ["s/\\..*//", ["s/\\..*//"], {nonull: true}] - - , "legendary larry crashes bashes" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\\1/"], {nonull: true}] - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/" - , ["/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/"], {nonull: true}] - - , "character classes" - , ["[a-c]b*", ["abc", "abd", "abe", "bb", "cb"]] - , ["[a-y]*[^c]", ["abd", "abe", "bb", "bcd", - "bdir/", "ca", "cb", "dd", "de"]] - , ["a*[^c]", ["abd", "abe"]] - , function () { files.push("a-b", "aXb") } - , ["a[X-]b", ["a-b", "aXb"]] - , function () { files.push(".x", ".y") } - , ["[^a-c]*", ["d", "dd", "de"]] - , function () { files.push("a*b/", "a*b/ooo") } - , ["a\\*b/*", ["a*b/ooo"]] - , ["a\\*?/*", ["a*b/ooo"]] - , ["*\\\\!*", [], {null: true}, ["echo !7"]] - , ["*\\!*", ["echo !7"], null, ["echo !7"]] - , ["*.\\*", ["r.*"], null, ["r.*"]] - , ["a[b]c", ["abc"]] - , ["a[\\b]c", ["abc"]] - , ["a?c", ["abc"]] - , ["a\\*c", [], {null: true}, ["abc"]] - , ["", [""], { null: true }, [""]] - - , "http://www.opensource.apple.com/source/bash/bash-23/" + - "bash/tests/glob-test" - , function () { files.push("man/", "man/man1/", "man/man1/bash.1") } - , ["*/man*/bash.*", ["man/man1/bash.1"]] - , ["man/man1/bash.1", ["man/man1/bash.1"]] - , ["a***c", ["abc"], null, ["abc"]] - , ["a*****?c", ["abc"], null, ["abc"]] - , ["?*****??", ["abc"], null, ["abc"]] - , ["*****??", ["abc"], null, ["abc"]] - , ["?*****?c", ["abc"], null, ["abc"]] - , ["?***?****c", ["abc"], null, ["abc"]] - , ["?***?****?", ["abc"], null, ["abc"]] - , ["?***?****", ["abc"], null, ["abc"]] - , ["*******c", ["abc"], null, ["abc"]] - , ["*******?", ["abc"], null, ["abc"]] - , ["a*cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??k***", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a**?**cd**?**??***k**", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["a****c**?**??*****", ["abcdecdhjk"], null, ["abcdecdhjk"]] - , ["[-abc]", ["-"], null, ["-"]] - , ["[abc-]", ["-"], null, ["-"]] - , ["\\", ["\\"], null, ["\\"]] - , ["[\\\\]", ["\\"], null, ["\\"]] - , ["[[]", ["["], null, ["["]] - , ["[", ["["], null, ["["]] - , ["[*", ["[abc"], null, ["[abc"]] - , "a right bracket shall lose its special meaning and\n" + - "represent itself in a bracket expression if it occurs\n" + - "first in the list. -- POSIX.2 2.8.3.2" - , ["[]]", ["]"], null, ["]"]] - , ["[]-]", ["]"], null, ["]"]] - , ["[a-\z]", ["p"], null, ["p"]] - , ["??**********?****?", [], { null: true }, ["abc"]] - , ["??**********?****c", [], { null: true }, ["abc"]] - , ["?************c****?****", [], { null: true }, ["abc"]] - , ["*c*?**", [], { null: true }, ["abc"]] - , ["a*****c*?**", [], { null: true }, ["abc"]] - , ["a********???*******", [], { null: true }, ["abc"]] - , ["[]", [], { null: true }, ["a"]] - , ["[abc", [], { null: true }, ["["]] - - , "nocase tests" - , ["XYZ", ["xYz"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["ab*", ["ABC"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - , ["[ia]?[ck]", ["ABC", "IjK"], { nocase: true, null: true } - , ["xYz", "ABC", "IjK"]] - - // [ pattern, [matches], MM opts, files, TAP opts] - , "onestar/twostar" - , ["{/*,*}", [], {null: true}, ["/asdf/asdf/asdf"]] - , ["{/?,*}", ["/a", "bb"], {null: true} - , ["/a", "/b/b", "/a/b/c", "bb"]] - - , "dots should not match unless requested" - , ["**", ["a/b"], {}, ["a/b", "a/.d", ".a/.d"]] - - // .. and . can only match patterns starting with ., - // even when options.dot is set. - , function () { - files = ["a/./b", "a/../b", "a/c/b", "a/.d/b"] - } - , ["a/*/b", ["a/c/b", "a/.d/b"], {dot: true}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: true}] - , ["a/*/b", ["a/c/b"], {dot:false}] - , ["a/.*/b", ["a/./b", "a/../b", "a/.d/b"], {dot: false}] - - - // this also tests that changing the options needs - // to change the cache key, even if the pattern is - // the same! - , ["**", ["a/b","a/.d",".a/.d"], { dot: true } - , [ ".a/.d", "a/.d", "a/b"]] - - , "paren sets cannot contain slashes" - , ["*(a/b)", ["*(a/b)"], {nonull: true}, ["a/b"]] - - // brace sets trump all else. - // - // invalid glob pattern. fails on bash4 and bsdglob. - // however, in this implementation, it's easier just - // to do the intuitive thing, and let brace-expansion - // actually come before parsing any extglob patterns, - // like the documentation seems to say. - // - // XXX: if anyone complains about this, either fix it - // or tell them to grow up and stop complaining. - // - // bash/bsdglob says this: - // , ["*(a|{b),c)}", ["*(a|{b),c)}"], {}, ["a", "ab", "ac", "ad"]] - // but we do this instead: - , ["*(a|{b),c)}", ["a", "ab", "ac"], {}, ["a", "ab", "ac", "ad"]] - - // test partial parsing in the presence of comment/negation chars - , ["[!a*", ["[!ab"], {}, ["[!ab", "[ab"]] - , ["[#a*", ["[#ab"], {}, ["[#ab", "[ab"]] - - // like: {a,b|c\\,d\\\|e} except it's unclosed, so it has to be escaped. - , ["+(a|*\\|c\\\\|d\\\\\\|e\\\\\\\\|f\\\\\\\\\\|g" - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g"] - , {} - , ["+(a|b\\|c\\\\|d\\\\|e\\\\\\\\|f\\\\\\\\|g", "a", "b\\c"]] - - - // crazy nested {,,} and *(||) tests. - , function () { - files = [ "a", "b", "c", "d" - , "ab", "ac", "ad" - , "bc", "cb" - , "bc,d", "c,db", "c,d" - , "d)", "(b|c", "*(b|c" - , "b|c", "b|cc", "cb|c" - , "x(a|b|c)", "x(a|c)" - , "(a|b|c)", "(a|c)"] - } - , ["*(a|{b,c})", ["a", "b", "c", "ab", "ac"]] - , ["{a,*(b|c,d)}", ["a","(b|c", "*(b|c", "d)"]] - // a - // *(b|c) - // *(b|d) - , ["{a,*(b|{c,d})}", ["a","b", "bc", "cb", "c", "d"]] - , ["*(a|{b|c,c})", ["a", "b", "c", "ab", "ac", "bc", "cb"]] - - - // test various flag settings. - , [ "*(a|{b|c,c})", ["x(a|b|c)", "x(a|c)", "(a|b|c)", "(a|c)"] - , { noext: true } ] - , ["a?b", ["x/y/acb", "acb/"], {matchBase: true} - , ["x/y/acb", "acb/", "acb/d/e", "x/y/acb/d"] ] - , ["#*", ["#a", "#b"], {nocomment: true}, ["#a", "#b", "c#d"]] - - - // begin channelling Boole and deMorgan... - , "negation tests" - , function () { - files = ["d", "e", "!ab", "!abc", "a!b", "\\!a"] - } - - // anything that is NOT a* matches. - , ["!a*", ["\\!a", "d", "e", "!ab", "!abc"]] - - // anything that IS !a* matches. - , ["!a*", ["!ab", "!abc"], {nonegate: true}] - - // anything that IS a* matches - , ["!!a*", ["a!b"]] - - // anything that is NOT !a* matches - , ["!\\!a*", ["a!b", "d", "e", "\\!a"]] - - // negation nestled within a pattern - , function () { - files = [ "foo.js" - , "foo.bar" - // can't match this one without negative lookbehind. - , "foo.js.js" - , "blar.js" - , "foo." - , "boo.js.boo" ] - } - , ["*.!(js)", ["foo.bar", "foo.", "boo.js.boo"] ] - - ].forEach(function (c) { - if (typeof c === "function") return c() - if (typeof c === "string") return t.comment(c) - - var pattern = c[0] - , expect = c[1].sort(alpha) - , options = c[2] || {} - , f = c[3] || files - , tapOpts = c[4] || {} - - // options.debug = true - var Class = mm.defaults(options).Minimatch - var m = new Class(pattern, {}) - var r = m.makeRe() - tapOpts.re = String(r) || JSON.stringify(r) - tapOpts.files = JSON.stringify(f) - tapOpts.pattern = pattern - tapOpts.set = m.set - tapOpts.negated = m.negate - - var actual = mm.match(f, pattern, options) - actual.sort(alpha) - - t.equivalent( actual, expect - , JSON.stringify(pattern) + " " + JSON.stringify(expect) - , tapOpts ) - }) - - t.comment("time=" + (Date.now() - start) + "ms") - t.end() -}) - -tap.test("global leak test", function (t) { - var globalAfter = Object.keys(global) - t.equivalent(globalAfter, globalBefore, "no new globals, please") - t.end() -}) - -function alpha (a, b) { - return a > b ? 1 : -1 -} diff --git a/node_modules/karma/node_modules/optimist/.travis.yml b/node_modules/karma/node_modules/optimist/.travis.yml deleted file mode 100644 index cc4dba29..00000000 --- a/node_modules/karma/node_modules/optimist/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - "0.8" - - "0.10" diff --git a/node_modules/karma/node_modules/optimist/LICENSE b/node_modules/karma/node_modules/optimist/LICENSE deleted file mode 100644 index 432d1aeb..00000000 --- a/node_modules/karma/node_modules/optimist/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright 2010 James Halliday (mail@substack.net) - -This project is free software released under the MIT/X11 license: - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/karma/node_modules/optimist/example/bool.js b/node_modules/karma/node_modules/optimist/example/bool.js deleted file mode 100644 index a998fb7a..00000000 --- a/node_modules/karma/node_modules/optimist/example/bool.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); diff --git a/node_modules/karma/node_modules/optimist/example/boolean_double.js b/node_modules/karma/node_modules/optimist/example/boolean_double.js deleted file mode 100644 index a35a7e6d..00000000 --- a/node_modules/karma/node_modules/optimist/example/boolean_double.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); diff --git a/node_modules/karma/node_modules/optimist/example/boolean_single.js b/node_modules/karma/node_modules/optimist/example/boolean_single.js deleted file mode 100644 index 017bb689..00000000 --- a/node_modules/karma/node_modules/optimist/example/boolean_single.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv.v); -console.dir(argv._); diff --git a/node_modules/karma/node_modules/optimist/example/default_hash.js b/node_modules/karma/node_modules/optimist/example/default_hash.js deleted file mode 100644 index ade77681..00000000 --- a/node_modules/karma/node_modules/optimist/example/default_hash.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; - -console.log(argv.x + argv.y); diff --git a/node_modules/karma/node_modules/optimist/example/default_singles.js b/node_modules/karma/node_modules/optimist/example/default_singles.js deleted file mode 100644 index d9b1ff45..00000000 --- a/node_modules/karma/node_modules/optimist/example/default_singles.js +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); diff --git a/node_modules/karma/node_modules/optimist/example/divide.js b/node_modules/karma/node_modules/optimist/example/divide.js deleted file mode 100644 index 5e2ee82f..00000000 --- a/node_modules/karma/node_modules/optimist/example/divide.js +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env node - -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); diff --git a/node_modules/karma/node_modules/optimist/example/line_count.js b/node_modules/karma/node_modules/optimist/example/line_count.js deleted file mode 100644 index b5f95bf6..00000000 --- a/node_modules/karma/node_modules/optimist/example/line_count.js +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); diff --git a/node_modules/karma/node_modules/optimist/example/line_count_options.js b/node_modules/karma/node_modules/optimist/example/line_count_options.js deleted file mode 100644 index d9ac7090..00000000 --- a/node_modules/karma/node_modules/optimist/example/line_count_options.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .options({ - file : { - demand : true, - alias : 'f', - description : 'Load a file' - }, - base : { - alias : 'b', - description : 'Numeric base to use for output', - default : 10, - }, - }) - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/karma/node_modules/optimist/example/line_count_wrap.js b/node_modules/karma/node_modules/optimist/example/line_count_wrap.js deleted file mode 100644 index 42675111..00000000 --- a/node_modules/karma/node_modules/optimist/example/line_count_wrap.js +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .wrap(80) - .demand('f') - .alias('f', [ 'file', 'filename' ]) - .describe('f', - "Load a file. It's pretty important." - + " Required even. So you'd better specify it." - ) - .alias('b', 'base') - .describe('b', 'Numeric base to display the number of lines in') - .default('b', 10) - .describe('x', 'Super-secret optional parameter which is secret') - .default('x', '') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines.toString(argv.base)); -}); diff --git a/node_modules/karma/node_modules/optimist/example/nonopt.js b/node_modules/karma/node_modules/optimist/example/nonopt.js deleted file mode 100644 index ee633eed..00000000 --- a/node_modules/karma/node_modules/optimist/example/nonopt.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); diff --git a/node_modules/karma/node_modules/optimist/example/reflect.js b/node_modules/karma/node_modules/optimist/example/reflect.js deleted file mode 100644 index 816b3e11..00000000 --- a/node_modules/karma/node_modules/optimist/example/reflect.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.dir(require('optimist').argv); diff --git a/node_modules/karma/node_modules/optimist/example/short.js b/node_modules/karma/node_modules/optimist/example/short.js deleted file mode 100644 index 1db0ad0f..00000000 --- a/node_modules/karma/node_modules/optimist/example/short.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); diff --git a/node_modules/karma/node_modules/optimist/example/string.js b/node_modules/karma/node_modules/optimist/example/string.js deleted file mode 100644 index a8e5aeb2..00000000 --- a/node_modules/karma/node_modules/optimist/example/string.js +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist') - .string('x', 'y') - .argv -; -console.dir([ argv.x, argv.y ]); - -/* Turns off numeric coercion: - ./node string.js -x 000123 -y 9876 - [ '000123', '9876' ] -*/ diff --git a/node_modules/karma/node_modules/optimist/example/usage-options.js b/node_modules/karma/node_modules/optimist/example/usage-options.js deleted file mode 100644 index b9999776..00000000 --- a/node_modules/karma/node_modules/optimist/example/usage-options.js +++ /dev/null @@ -1,19 +0,0 @@ -var optimist = require('./../index'); - -var argv = optimist.usage('This is my awesome program', { - 'about': { - description: 'Provide some details about the author of this program', - required: true, - short: 'a', - }, - 'info': { - description: 'Provide some information about the node.js agains!!!!!!', - boolean: true, - short: 'i' - } -}).argv; - -optimist.showHelp(); - -console.log('\n\nInspecting options'); -console.dir(argv); \ No newline at end of file diff --git a/node_modules/karma/node_modules/optimist/example/xup.js b/node_modules/karma/node_modules/optimist/example/xup.js deleted file mode 100644 index 8f6ecd20..00000000 --- a/node_modules/karma/node_modules/optimist/example/xup.js +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} - diff --git a/node_modules/karma/node_modules/optimist/index.js b/node_modules/karma/node_modules/optimist/index.js deleted file mode 100644 index 8ac67eb3..00000000 --- a/node_modules/karma/node_modules/optimist/index.js +++ /dev/null @@ -1,478 +0,0 @@ -var path = require('path'); -var wordwrap = require('wordwrap'); - -/* Hack an instance of Argv with process.argv into Argv - so people can do - require('optimist')(['--beeble=1','-z','zizzle']).argv - to parse a list of args and - require('optimist').argv - to get a parsed version of process.argv. -*/ - -var inst = Argv(process.argv.slice(2)); -Object.keys(inst).forEach(function (key) { - Argv[key] = typeof inst[key] == 'function' - ? inst[key].bind(inst) - : inst[key]; -}); - -var exports = module.exports = Argv; -function Argv (args, cwd) { - var self = {}; - if (!cwd) cwd = process.cwd(); - - self.$0 = process.argv - .slice(0,2) - .map(function (x) { - var b = rebase(cwd, x); - return x.match(/^\//) && b.length < x.length - ? b : x - }) - .join(' ') - ; - - if (process.env._ != undefined && process.argv[1] == process.env._) { - self.$0 = process.env._.replace( - path.dirname(process.execPath) + '/', '' - ); - } - - var flags = { bools : {}, strings : {} }; - - self.boolean = function (bools) { - if (!Array.isArray(bools)) { - bools = [].slice.call(arguments); - } - - bools.forEach(function (name) { - flags.bools[name] = true; - }); - - return self; - }; - - self.string = function (strings) { - if (!Array.isArray(strings)) { - strings = [].slice.call(arguments); - } - - strings.forEach(function (name) { - flags.strings[name] = true; - }); - - return self; - }; - - var aliases = {}; - self.alias = function (x, y) { - if (typeof x === 'object') { - Object.keys(x).forEach(function (key) { - self.alias(key, x[key]); - }); - } - else if (Array.isArray(y)) { - y.forEach(function (yy) { - self.alias(x, yy); - }); - } - else { - var zs = (aliases[x] || []).concat(aliases[y] || []).concat(x, y); - aliases[x] = zs.filter(function (z) { return z != x }); - aliases[y] = zs.filter(function (z) { return z != y }); - } - - return self; - }; - - var demanded = {}; - self.demand = function (keys) { - if (typeof keys == 'number') { - if (!demanded._) demanded._ = 0; - demanded._ += keys; - } - else if (Array.isArray(keys)) { - keys.forEach(function (key) { - self.demand(key); - }); - } - else { - demanded[keys] = true; - } - - return self; - }; - - var usage; - self.usage = function (msg, opts) { - if (!opts && typeof msg === 'object') { - opts = msg; - msg = null; - } - - usage = msg; - - if (opts) self.options(opts); - - return self; - }; - - function fail (msg) { - self.showHelp(); - if (msg) console.error(msg); - process.exit(1); - } - - var checks = []; - self.check = function (f) { - checks.push(f); - return self; - }; - - var defaults = {}; - self.default = function (key, value) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.default(k, key[k]); - }); - } - else { - defaults[key] = value; - } - - return self; - }; - - var descriptions = {}; - self.describe = function (key, desc) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.describe(k, key[k]); - }); - } - else { - descriptions[key] = desc; - } - return self; - }; - - self.parse = function (args) { - return Argv(args).argv; - }; - - self.option = self.options = function (key, opt) { - if (typeof key === 'object') { - Object.keys(key).forEach(function (k) { - self.options(k, key[k]); - }); - } - else { - if (opt.alias) self.alias(key, opt.alias); - if (opt.demand) self.demand(key); - if (typeof opt.default !== 'undefined') { - self.default(key, opt.default); - } - - if (opt.boolean || opt.type === 'boolean') { - self.boolean(key); - } - if (opt.string || opt.type === 'string') { - self.string(key); - } - - var desc = opt.describe || opt.description || opt.desc; - if (desc) { - self.describe(key, desc); - } - } - - return self; - }; - - var wrap = null; - self.wrap = function (cols) { - wrap = cols; - return self; - }; - - self.showHelp = function (fn) { - if (!fn) fn = console.error; - fn(self.help()); - }; - - self.help = function () { - var keys = Object.keys( - Object.keys(descriptions) - .concat(Object.keys(demanded)) - .concat(Object.keys(defaults)) - .reduce(function (acc, key) { - if (key !== '_') acc[key] = true; - return acc; - }, {}) - ); - - var help = keys.length ? [ 'Options:' ] : []; - - if (usage) { - help.unshift(usage.replace(/\$0/g, self.$0), ''); - } - - var switches = keys.reduce(function (acc, key) { - acc[key] = [ key ].concat(aliases[key] || []) - .map(function (sw) { - return (sw.length > 1 ? '--' : '-') + sw - }) - .join(', ') - ; - return acc; - }, {}); - - var switchlen = longest(Object.keys(switches).map(function (s) { - return switches[s] || ''; - })); - - var desclen = longest(Object.keys(descriptions).map(function (d) { - return descriptions[d] || ''; - })); - - keys.forEach(function (key) { - var kswitch = switches[key]; - var desc = descriptions[key] || ''; - - if (wrap) { - desc = wordwrap(switchlen + 4, wrap)(desc) - .slice(switchlen + 4) - ; - } - - var spadding = new Array( - Math.max(switchlen - kswitch.length + 3, 0) - ).join(' '); - - var dpadding = new Array( - Math.max(desclen - desc.length + 1, 0) - ).join(' '); - - var type = null; - - if (flags.bools[key]) type = '[boolean]'; - if (flags.strings[key]) type = '[string]'; - - if (!wrap && dpadding.length > 0) { - desc += dpadding; - } - - var prelude = ' ' + kswitch + spadding; - var extra = [ - type, - demanded[key] - ? '[required]' - : null - , - defaults[key] !== undefined - ? '[default: ' + JSON.stringify(defaults[key]) + ']' - : null - , - ].filter(Boolean).join(' '); - - var body = [ desc, extra ].filter(Boolean).join(' '); - - if (wrap) { - var dlines = desc.split('\n'); - var dlen = dlines.slice(-1)[0].length - + (dlines.length === 1 ? prelude.length : 0) - - body = desc + (dlen + extra.length > wrap - 2 - ? '\n' - + new Array(wrap - extra.length + 1).join(' ') - + extra - : new Array(wrap - extra.length - dlen + 1).join(' ') - + extra - ); - } - - help.push(prelude + body); - }); - - help.push(''); - return help.join('\n'); - }; - - Object.defineProperty(self, 'argv', { - get : parseArgs, - enumerable : true, - }); - - function parseArgs () { - var argv = { _ : [], $0 : self.$0 }; - Object.keys(flags.bools).forEach(function (key) { - setArg(key, defaults[key] || false); - }); - - function setArg (key, val) { - var num = Number(val); - var value = typeof val !== 'string' || isNaN(num) ? val : num; - if (flags.strings[key]) value = val; - - setKey(argv, key.split('.'), value); - - (aliases[key] || []).forEach(function (x) { - argv[x] = argv[key]; - }); - } - - for (var i = 0; i < args.length; i++) { - var arg = args[i]; - - if (arg === '--') { - argv._.push.apply(argv._, args.slice(i + 1)); - break; - } - else if (arg.match(/^--.+=/)) { - // Using [\s\S] instead of . because js doesn't support the - // 'dotall' regex modifier. See: - // http://stackoverflow.com/a/1068308/13216 - var m = arg.match(/^--([^=]+)=([\s\S]*)$/); - setArg(m[1], m[2]); - } - else if (arg.match(/^--no-.+/)) { - var key = arg.match(/^--no-(.+)/)[1]; - setArg(key, false); - } - else if (arg.match(/^--.+/)) { - var key = arg.match(/^--(.+)/)[1]; - var next = args[i + 1]; - if (next !== undefined && !next.match(/^-/) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, next); - i++; - } - else if (/^(true|false)$/.test(next)) { - setArg(key, next === 'true'); - i++; - } - else { - setArg(key, true); - } - } - else if (arg.match(/^-[^-]+/)) { - var letters = arg.slice(1,-1).split(''); - - var broken = false; - for (var j = 0; j < letters.length; j++) { - if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+2)); - broken = true; - break; - } - else { - setArg(letters[j], true); - } - } - - if (!broken) { - var key = arg.slice(-1)[0]; - - if (args[i+1] && !args[i+1].match(/^-/) - && !flags.bools[key] - && (aliases[key] ? !flags.bools[aliases[key]] : true)) { - setArg(key, args[i+1]); - i++; - } - else if (args[i+1] && /true|false/.test(args[i+1])) { - setArg(key, args[i+1] === 'true'); - i++; - } - else { - setArg(key, true); - } - } - } - else { - var n = Number(arg); - argv._.push(flags.strings['_'] || isNaN(n) ? arg : n); - } - } - - Object.keys(defaults).forEach(function (key) { - if (!(key in argv)) { - argv[key] = defaults[key]; - if (key in aliases) { - argv[aliases[key]] = defaults[key]; - } - } - }); - - if (demanded._ && argv._.length < demanded._) { - fail('Not enough non-option arguments: got ' - + argv._.length + ', need at least ' + demanded._ - ); - } - - var missing = []; - Object.keys(demanded).forEach(function (key) { - if (!argv[key]) missing.push(key); - }); - - if (missing.length) { - fail('Missing required arguments: ' + missing.join(', ')); - } - - checks.forEach(function (f) { - try { - if (f(argv) === false) { - fail('Argument check failed: ' + f.toString()); - } - } - catch (err) { - fail(err) - } - }); - - return argv; - } - - function longest (xs) { - return Math.max.apply( - null, - xs.map(function (x) { return x.length }) - ); - } - - return self; -}; - -// rebase an absolute path to a relative one with respect to a base directory -// exported for tests -exports.rebase = rebase; -function rebase (base, dir) { - var ds = path.normalize(dir).split('/').slice(1); - var bs = path.normalize(base).split('/').slice(1); - - for (var i = 0; ds[i] && ds[i] == bs[i]; i++); - ds.splice(0, i); bs.splice(0, i); - - var p = path.normalize( - bs.map(function () { return '..' }).concat(ds).join('/') - ).replace(/\/$/,'').replace(/^$/, '.'); - return p.match(/^[.\/]/) ? p : './' + p; -}; - -function setKey (obj, keys, value) { - var o = obj; - keys.slice(0,-1).forEach(function (key) { - if (o[key] === undefined) o[key] = {}; - o = o[key]; - }); - - var key = keys[keys.length - 1]; - if (o[key] === undefined || typeof o[key] === 'boolean') { - o[key] = value; - } - else if (Array.isArray(o[key])) { - o[key].push(value); - } - else { - o[key] = [ o[key], value ]; - } -} diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/.npmignore b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/README.markdown b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/README.markdown deleted file mode 100644 index 346374e0..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/README.markdown +++ /dev/null @@ -1,70 +0,0 @@ -wordwrap -======== - -Wrap your words. - -example -======= - -made out of meat ----------------- - -meat.js - - var wrap = require('wordwrap')(15); - console.log(wrap('You and your whole family are made out of meat.')); - -output: - - You and your - whole family - are made out - of meat. - -centered --------- - -center.js - - var wrap = require('wordwrap')(20, 60); - console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' - )); - -output: - - At long last the struggle and tumult - was over. The machines had finally cast - off their oppressors and were finally - free to roam the cosmos. - Free of purpose, free of obligation. - Just drifting through emptiness. The - sun was just another point of light. - -methods -======= - -var wrap = require('wordwrap'); - -wrap(stop), wrap(start, stop, params={mode:"soft"}) ---------------------------------------------------- - -Returns a function that takes a string and returns a new string. - -Pad out lines with spaces out to column `start` and then wrap until column -`stop`. If a word is longer than `stop - start` characters it will overflow. - -In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are -longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break -up chunks longer than `stop - start`. - -wrap.hard(start, stop) ----------------------- - -Like `wrap()` but with `params.mode = "hard"`. diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/example/center.js b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/example/center.js deleted file mode 100644 index a3fbaae9..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/example/center.js +++ /dev/null @@ -1,10 +0,0 @@ -var wrap = require('wordwrap')(20, 60); -console.log(wrap( - 'At long last the struggle and tumult was over.' - + ' The machines had finally cast off their oppressors' - + ' and were finally free to roam the cosmos.' - + '\n' - + 'Free of purpose, free of obligation.' - + ' Just drifting through emptiness.' - + ' The sun was just another point of light.' -)); diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/example/meat.js b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/example/meat.js deleted file mode 100644 index a4665e10..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/example/meat.js +++ /dev/null @@ -1,3 +0,0 @@ -var wrap = require('wordwrap')(15); - -console.log(wrap('You and your whole family are made out of meat.')); diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/index.js b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/index.js deleted file mode 100644 index c9bc9452..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/index.js +++ /dev/null @@ -1,76 +0,0 @@ -var wordwrap = module.exports = function (start, stop, params) { - if (typeof start === 'object') { - params = start; - start = params.start; - stop = params.stop; - } - - if (typeof stop === 'object') { - params = stop; - start = start || params.start; - stop = undefined; - } - - if (!stop) { - stop = start; - start = 0; - } - - if (!params) params = {}; - var mode = params.mode || 'soft'; - var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; - - return function (text) { - var chunks = text.toString() - .split(re) - .reduce(function (acc, x) { - if (mode === 'hard') { - for (var i = 0; i < x.length; i += stop - start) { - acc.push(x.slice(i, i + stop - start)); - } - } - else acc.push(x) - return acc; - }, []) - ; - - return chunks.reduce(function (lines, rawChunk) { - if (rawChunk === '') return lines; - - var chunk = rawChunk.replace(/\t/g, ' '); - - var i = lines.length - 1; - if (lines[i].length + chunk.length > stop) { - lines[i] = lines[i].replace(/\s+$/, ''); - - chunk.split(/\n/).forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else if (chunk.match(/\n/)) { - var xs = chunk.split(/\n/); - lines[i] += xs.shift(); - xs.forEach(function (c) { - lines.push( - new Array(start + 1).join(' ') - + c.replace(/^\s+/, '') - ); - }); - } - else { - lines[i] += chunk; - } - - return lines; - }, [ new Array(start + 1).join(' ') ]).join('\n'); - }; -}; - -wordwrap.soft = wordwrap; - -wordwrap.hard = function (start, stop) { - return wordwrap(start, stop, { mode : 'hard' }); -}; diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/package.json b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/package.json deleted file mode 100644 index df8dc051..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/package.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "wordwrap", - "description": "Wrap those words. Show them at what columns to start and stop.", - "version": "0.0.2", - "repository": { - "type": "git", - "url": "git://github.com/substack/node-wordwrap.git" - }, - "main": "./index.js", - "keywords": [ - "word", - "wrap", - "rule", - "format", - "column" - ], - "directories": { - "lib": ".", - "example": "example", - "test": "test" - }, - "scripts": { - "test": "expresso" - }, - "devDependencies": { - "expresso": "=0.7.x" - }, - "engines": { - "node": ">=0.4.0" - }, - "license": "MIT/X11", - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", - "readmeFilename": "README.markdown", - "bugs": { - "url": "https://github.com/substack/node-wordwrap/issues" - }, - "homepage": "https://github.com/substack/node-wordwrap", - "_id": "wordwrap@0.0.2", - "_from": "wordwrap@~0.0.2" -} diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/break.js b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/break.js deleted file mode 100644 index 749292ec..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/break.js +++ /dev/null @@ -1,30 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('../'); - -exports.hard = function () { - var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' - + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' - + '"browser":"chrome/6.0"}' - ; - var s_ = wordwrap.hard(80)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 2); - assert.ok(lines[0].length < 80); - assert.ok(lines[1].length < 80); - - assert.equal(s, s_.replace(/\n/g, '')); -}; - -exports.break = function () { - var s = new Array(55+1).join('a'); - var s_ = wordwrap.hard(20)(s); - - var lines = s_.split('\n'); - assert.equal(lines.length, 3); - assert.ok(lines[0].length === 20); - assert.ok(lines[1].length === 20); - assert.ok(lines[2].length === 15); - - assert.equal(s, s_.replace(/\n/g, '')); -}; diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/idleness.txt b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/idleness.txt deleted file mode 100644 index aa3f4907..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/idleness.txt +++ /dev/null @@ -1,63 +0,0 @@ -In Praise of Idleness - -By Bertrand Russell - -[1932] - -Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. - -Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. - -One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. - -But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. - -All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. - -First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. - -Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. - -From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. - -It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. - -Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. - -This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? - -The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. - -Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. - -I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. - -If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. - -The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. - -In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. - -The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. - -For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? - -In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. - -In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. - -The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. - -It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. - -When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. - -In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. - -The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. - -In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. - -Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. - -[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/wrap.js b/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/wrap.js deleted file mode 100644 index 0cfb76d1..00000000 --- a/node_modules/karma/node_modules/optimist/node_modules/wordwrap/test/wrap.js +++ /dev/null @@ -1,31 +0,0 @@ -var assert = require('assert'); -var wordwrap = require('wordwrap'); - -var fs = require('fs'); -var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); - -exports.stop80 = function () { - var lines = wordwrap(80)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 80, 'line > 80 columns'); - var chunks = line.match(/\S/) ? line.split(/\s+/) : []; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - }); -}; - -exports.start20stop60 = function () { - var lines = wordwrap(20, 100)(idleness).split(/\n/); - var words = idleness.split(/\s+/); - - lines.forEach(function (line) { - assert.ok(line.length <= 100, 'line > 100 columns'); - var chunks = line - .split(/\s+/) - .filter(function (x) { return x.match(/\S/) }) - ; - assert.deepEqual(chunks, words.splice(0, chunks.length)); - assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); - }); -}; diff --git a/node_modules/karma/node_modules/optimist/package.json b/node_modules/karma/node_modules/optimist/package.json deleted file mode 100644 index a37f7d94..00000000 --- a/node_modules/karma/node_modules/optimist/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "optimist", - "version": "0.3.7", - "description": "Light-weight option parsing with an argv hash. No optstrings attached.", - "main": "./index.js", - "dependencies": { - "wordwrap": "~0.0.2" - }, - "devDependencies": { - "hashish": "~0.0.4", - "tap": "~0.4.0" - }, - "scripts": { - "test": "tap ./test/*.js" - }, - "repository": { - "type": "git", - "url": "http://github.com/substack/node-optimist.git" - }, - "keywords": [ - "argument", - "args", - "option", - "parser", - "parsing", - "cli", - "command" - ], - "author": { - "name": "James Halliday", - "email": "mail@substack.net", - "url": "http://substack.net" - }, - "license": "MIT/X11", - "engine": { - "node": ">=0.4" - }, - "readme": "optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\n[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist)\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ndot notation\n------------\n\nWhen you use dots (`.`s) in argument names, an implicit object path is assumed.\nThis lets you organize arguments into nested objects.\n\n $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5\n { _: [],\n '$0': 'node ./examples/reflect.js',\n foo: { bar: { baz: 33 }, quux: 5 } }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", - "readmeFilename": "readme.markdown", - "bugs": { - "url": "https://github.com/substack/node-optimist/issues" - }, - "homepage": "https://github.com/substack/node-optimist", - "_id": "optimist@0.3.7", - "_from": "optimist@~0.3" -} diff --git a/node_modules/karma/node_modules/optimist/readme.markdown b/node_modules/karma/node_modules/optimist/readme.markdown deleted file mode 100644 index ad9d3fd6..00000000 --- a/node_modules/karma/node_modules/optimist/readme.markdown +++ /dev/null @@ -1,487 +0,0 @@ -optimist -======== - -Optimist is a node.js library for option parsing for people who hate option -parsing. More specifically, this module is for people who like all the --bells -and -whistlz of program usage but think optstrings are a waste of time. - -With optimist, option parsing doesn't have to suck (as much). - -[![build status](https://secure.travis-ci.org/substack/node-optimist.png)](http://travis-ci.org/substack/node-optimist) - -examples -======== - -With Optimist, the options are just a hash! No optstrings attached. -------------------------------------------------------------------- - -xup.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; - -if (argv.rif - 5 * argv.xup > 7.138) { - console.log('Buy more riffiwobbles'); -} -else { - console.log('Sell the xupptumblers'); -} -```` - -*** - - $ ./xup.js --rif=55 --xup=9.52 - Buy more riffiwobbles - - $ ./xup.js --rif 12 --xup 8.1 - Sell the xupptumblers - -![This one's optimistic.](http://substack.net/images/optimistic.png) - -But wait! There's more! You can do short options: -------------------------------------------------- - -short.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -```` - -*** - - $ ./short.js -x 10 -y 21 - (10,21) - -And booleans, both long and short (and grouped): ----------------------------------- - -bool.js: - -````javascript -#!/usr/bin/env node -var util = require('util'); -var argv = require('optimist').argv; - -if (argv.s) { - util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); -} -console.log( - (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') -); -```` - -*** - - $ ./bool.js -s - The cat says: meow - - $ ./bool.js -sp - The cat says: meow. - - $ ./bool.js -sp --fr - Le chat dit: miaou. - -And non-hypenated options too! Just use `argv._`! -------------------------------------------------- - -nonopt.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist').argv; -console.log('(%d,%d)', argv.x, argv.y); -console.log(argv._); -```` - -*** - - $ ./nonopt.js -x 6.82 -y 3.35 moo - (6.82,3.35) - [ 'moo' ] - - $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz - (0.54,1.12) - [ 'foo', 'bar', 'baz' ] - -Plus, Optimist comes with .usage() and .demand()! -------------------------------------------------- - -divide.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Usage: $0 -x [num] -y [num]') - .demand(['x','y']) - .argv; - -console.log(argv.x / argv.y); -```` - -*** - - $ ./divide.js -x 55 -y 11 - 5 - - $ node ./divide.js -x 4.91 -z 2.51 - Usage: node ./divide.js -x [num] -y [num] - - Options: - -x [required] - -y [required] - - Missing required arguments: y - -EVEN MORE HOLY COW ------------------- - -default_singles.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default('x', 10) - .default('y', 10) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_singles.js -x 5 - 15 - -default_hash.js: - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .default({ x : 10, y : 10 }) - .argv -; -console.log(argv.x + argv.y); -```` - -*** - - $ ./default_hash.js -y 7 - 17 - -And if you really want to get all descriptive about it... ---------------------------------------------------------- - -boolean_single.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean('v') - .argv -; -console.dir(argv); -```` - -*** - - $ ./boolean_single.js -v foo bar baz - true - [ 'bar', 'baz', 'foo' ] - -boolean_double.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .boolean(['x','y','z']) - .argv -; -console.dir([ argv.x, argv.y, argv.z ]); -console.dir(argv._); -```` - -*** - - $ ./boolean_double.js -x -z one two three - [ true, false, true ] - [ 'one', 'two', 'three' ] - -Optimist is here to help... ---------------------------- - -You can describe parameters for help messages and set aliases. Optimist figures -out how to format a handy help string automatically. - -line_count.js - -````javascript -#!/usr/bin/env node -var argv = require('optimist') - .usage('Count the lines in a file.\nUsage: $0') - .demand('f') - .alias('f', 'file') - .describe('f', 'Load a file') - .argv -; - -var fs = require('fs'); -var s = fs.createReadStream(argv.file); - -var lines = 0; -s.on('data', function (buf) { - lines += buf.toString().match(/\n/g).length; -}); - -s.on('end', function () { - console.log(lines); -}); -```` - -*** - - $ node line_count.js - Count the lines in a file. - Usage: node ./line_count.js - - Options: - -f, --file Load a file [required] - - Missing required arguments: f - - $ node line_count.js --file line_count.js - 20 - - $ node line_count.js -f line_count.js - 20 - -methods -======= - -By itself, - -````javascript -require('optimist').argv -````` - -will use `process.argv` array to construct the `argv` object. - -You can pass in the `process.argv` yourself: - -````javascript -require('optimist')([ '-x', '1', '-y', '2' ]).argv -```` - -or use .parse() to do the same thing: - -````javascript -require('optimist').parse([ '-x', '1', '-y', '2' ]) -```` - -The rest of these methods below come in just before the terminating `.argv`. - -.alias(key, alias) ------------------- - -Set key names as equivalent such that updates to a key will propagate to aliases -and vice-versa. - -Optionally `.alias()` can take an object that maps keys to aliases. - -.default(key, value) --------------------- - -Set `argv[key]` to `value` if no option was specified on `process.argv`. - -Optionally `.default()` can take an object that maps keys to default values. - -.demand(key) ------------- - -If `key` is a string, show the usage information and exit if `key` wasn't -specified in `process.argv`. - -If `key` is a number, demand at least as many non-option arguments, which show -up in `argv._`. - -If `key` is an Array, demand each element. - -.describe(key, desc) --------------------- - -Describe a `key` for the generated usage information. - -Optionally `.describe()` can take an object that maps keys to descriptions. - -.options(key, opt) ------------------- - -Instead of chaining together `.alias().demand().default()`, you can specify -keys in `opt` for each of the chainable methods. - -For example: - -````javascript -var argv = require('optimist') - .options('f', { - alias : 'file', - default : '/etc/passwd', - }) - .argv -; -```` - -is the same as - -````javascript -var argv = require('optimist') - .alias('f', 'file') - .default('f', '/etc/passwd') - .argv -; -```` - -Optionally `.options()` can take an object that maps keys to `opt` parameters. - -.usage(message) ---------------- - -Set a usage message to show which commands to use. Inside `message`, the string -`$0` will get interpolated to the current script name or node command for the -present script similar to how `$0` works in bash or perl. - -.check(fn) ----------- - -Check that certain conditions are met in the provided arguments. - -If `fn` throws or returns `false`, show the thrown error, usage information, and -exit. - -.boolean(key) -------------- - -Interpret `key` as a boolean. If a non-flag option follows `key` in -`process.argv`, that string won't get set as the value of `key`. - -If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be -`false`. - -If `key` is an Array, interpret all the elements as booleans. - -.string(key) ------------- - -Tell the parser logic not to interpret `key` as a number or boolean. -This can be useful if you need to preserve leading zeros in an input. - -If `key` is an Array, interpret all the elements as strings. - -.wrap(columns) --------------- - -Format usage output to wrap at `columns` many columns. - -.help() -------- - -Return the generated usage string. - -.showHelp(fn=console.error) ---------------------------- - -Print the usage data using `fn` for printing. - -.parse(args) ------------- - -Parse `args` instead of `process.argv`. Returns the `argv` object. - -.argv ------ - -Get the arguments as a plain old object. - -Arguments without a corresponding flag show up in the `argv._` array. - -The script name or node command is available at `argv.$0` similarly to how `$0` -works in bash or perl. - -parsing tricks -============== - -stop parsing ------------- - -Use `--` to stop parsing flags and stuff the remainder into `argv._`. - - $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 - { _: [ '-c', '3', '-d', '4' ], - '$0': 'node ./examples/reflect.js', - a: 1, - b: 2 } - -negate fields -------------- - -If you want to explicity set a field to false instead of just leaving it -undefined or to override a default you can do `--no-key`. - - $ node examples/reflect.js -a --no-b - { _: [], - '$0': 'node ./examples/reflect.js', - a: true, - b: false } - -numbers -------- - -Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to -one. This way you can just `net.createConnection(argv.port)` and you can add -numbers out of `argv` with `+` without having that mean concatenation, -which is super frustrating. - -duplicates ----------- - -If you specify a flag multiple times it will get turned into an array containing -all the values in order. - - $ node examples/reflect.js -x 5 -x 8 -x 0 - { _: [], - '$0': 'node ./examples/reflect.js', - x: [ 5, 8, 0 ] } - -dot notation ------------- - -When you use dots (`.`s) in argument names, an implicit object path is assumed. -This lets you organize arguments into nested objects. - - $ node examples/reflect.js --foo.bar.baz=33 --foo.quux=5 - { _: [], - '$0': 'node ./examples/reflect.js', - foo: { bar: { baz: 33 }, quux: 5 } } - -installation -============ - -With [npm](http://github.com/isaacs/npm), just do: - npm install optimist - -or clone this project on github: - - git clone http://github.com/substack/node-optimist.git - -To run the tests with [expresso](http://github.com/visionmedia/expresso), -just do: - - expresso - -inspired By -=========== - -This module is loosely inspired by Perl's -[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/node_modules/karma/node_modules/optimist/test/_.js b/node_modules/karma/node_modules/optimist/test/_.js deleted file mode 100644 index d9c58b36..00000000 --- a/node_modules/karma/node_modules/optimist/test/_.js +++ /dev/null @@ -1,71 +0,0 @@ -var spawn = require('child_process').spawn; -var test = require('tap').test; - -test('dotSlashEmpty', testCmd('./bin.js', [])); - -test('dotSlashArgs', testCmd('./bin.js', [ 'a', 'b', 'c' ])); - -test('nodeEmpty', testCmd('node bin.js', [])); - -test('nodeArgs', testCmd('node bin.js', [ 'x', 'y', 'z' ])); - -test('whichNodeEmpty', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', []) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - assert.error(err); - t.end(); - }); -}); - -test('whichNodeArgs', function (t) { - var which = spawn('which', ['node']); - - which.stdout.on('data', function (buf) { - t.test( - testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]) - ); - t.end(); - }); - - which.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); -}); - -function testCmd (cmd, args) { - - return function (t) { - var to = setTimeout(function () { - assert.fail('Never got stdout data.') - }, 5000); - - var oldDir = process.cwd(); - process.chdir(__dirname + '/_'); - - var cmds = cmd.split(' '); - - var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); - process.chdir(oldDir); - - bin.stderr.on('data', function (err) { - t.error(err); - t.end(); - }); - - bin.stdout.on('data', function (buf) { - clearTimeout(to); - var _ = JSON.parse(buf.toString()); - t.same(_.map(String), args.map(String)); - t.end(); - }); - }; -} diff --git a/node_modules/karma/node_modules/optimist/test/_/argv.js b/node_modules/karma/node_modules/optimist/test/_/argv.js deleted file mode 100644 index 3d096062..00000000 --- a/node_modules/karma/node_modules/optimist/test/_/argv.js +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -console.log(JSON.stringify(process.argv)); diff --git a/node_modules/karma/node_modules/optimist/test/_/bin.js b/node_modules/karma/node_modules/optimist/test/_/bin.js deleted file mode 100755 index 4a18d85f..00000000 --- a/node_modules/karma/node_modules/optimist/test/_/bin.js +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node -var argv = require('../../index').argv -console.log(JSON.stringify(argv._)); diff --git a/node_modules/karma/node_modules/optimist/test/parse.js b/node_modules/karma/node_modules/optimist/test/parse.js deleted file mode 100644 index d320f433..00000000 --- a/node_modules/karma/node_modules/optimist/test/parse.js +++ /dev/null @@ -1,446 +0,0 @@ -var optimist = require('../index'); -var path = require('path'); -var test = require('tap').test; - -var $0 = 'node ./' + path.relative(process.cwd(), __filename); - -test('short boolean', function (t) { - var parse = optimist.parse([ '-b' ]); - t.same(parse, { b : true, _ : [], $0 : $0 }); - t.same(typeof parse.b, 'boolean'); - t.end(); -}); - -test('long boolean', function (t) { - t.same( - optimist.parse([ '--bool' ]), - { bool : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('bare', function (t) { - t.same( - optimist.parse([ 'foo', 'bar', 'baz' ]), - { _ : [ 'foo', 'bar', 'baz' ], $0 : $0 } - ); - t.end(); -}); - -test('short group', function (t) { - t.same( - optimist.parse([ '-cats' ]), - { c : true, a : true, t : true, s : true, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short group next', function (t) { - t.same( - optimist.parse([ '-cats', 'meow' ]), - { c : true, a : true, t : true, s : 'meow', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost' ]), - { h : 'localhost', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('short captures', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-p', '555' ]), - { h : 'localhost', p : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture sp', function (t) { - t.same( - optimist.parse([ '--pow', 'xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long capture eq', function (t) { - t.same( - optimist.parse([ '--pow=xixxle' ]), - { pow : 'xixxle', _ : [], $0 : $0 } - ); - t.end() -}); - -test('long captures sp', function (t) { - t.same( - optimist.parse([ '--host', 'localhost', '--port', '555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('long captures eq', function (t) { - t.same( - optimist.parse([ '--host=localhost', '--port=555' ]), - { host : 'localhost', port : 555, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('mixed short bool and capture', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('short and long', function (t) { - t.same( - optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), - { - f : true, p : 555, h : 'localhost', - _ : [ 'script.js' ], $0 : $0, - } - ); - t.end(); -}); - -test('no', function (t) { - t.same( - optimist.parse([ '--no-moo' ]), - { moo : false, _ : [], $0 : $0 } - ); - t.end(); -}); - -test('multi', function (t) { - t.same( - optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), - { v : ['a','b','c'], _ : [], $0 : $0 } - ); - t.end(); -}); - -test('comprehensive', function (t) { - t.same( - optimist.parse([ - '--name=meowmers', 'bare', '-cats', 'woo', - '-h', 'awesome', '--multi=quux', - '--key', 'value', - '-b', '--bool', '--no-meep', '--multi=baz', - '--', '--not-a-flag', 'eek' - ]), - { - c : true, - a : true, - t : true, - s : 'woo', - h : 'awesome', - b : true, - bool : true, - key : 'value', - multi : [ 'quux', 'baz' ], - meep : false, - name : 'meowmers', - _ : [ 'bare', '--not-a-flag', 'eek' ], - $0 : $0 - } - ); - t.end(); -}); - -test('nums', function (t) { - var argv = optimist.parse([ - '-x', '1234', - '-y', '5.67', - '-z', '1e7', - '-w', '10f', - '--hex', '0xdeadbeef', - '789', - ]); - t.same(argv, { - x : 1234, - y : 5.67, - z : 1e7, - w : '10f', - hex : 0xdeadbeef, - _ : [ 789 ], - $0 : $0 - }); - t.same(typeof argv.x, 'number'); - t.same(typeof argv.y, 'number'); - t.same(typeof argv.z, 'number'); - t.same(typeof argv.w, 'string'); - t.same(typeof argv.hex, 'number'); - t.same(typeof argv._[0], 'number'); - t.end(); -}); - -test('flag boolean', function (t) { - var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; - t.same(parse, { t : true, _ : [ 'moo' ], $0 : $0 }); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean value', function (t) { - var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) - .boolean(['t', 'verbose']).default('verbose', true).argv; - - t.same(parse, { - verbose: false, - t: true, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); -}); - -test('flag boolean default false', function (t) { - var parse = optimist(['moo']) - .boolean(['t', 'verbose']) - .default('verbose', false) - .default('t', false).argv; - - t.same(parse, { - verbose: false, - t: false, - _: ['moo'], - $0 : $0 - }); - - t.same(typeof parse.verbose, 'boolean'); - t.same(typeof parse.t, 'boolean'); - t.end(); - -}); - -test('boolean groups', function (t) { - var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) - .boolean(['x','y','z']).argv; - - t.same(parse, { - x : true, - y : false, - z : true, - _ : [ 'one', 'two', 'three' ], - $0 : $0 - }); - - t.same(typeof parse.x, 'boolean'); - t.same(typeof parse.y, 'boolean'); - t.same(typeof parse.z, 'boolean'); - t.end(); -}); - -test('newlines in params' , function (t) { - var args = optimist.parse([ '-s', "X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - - // reproduce in bash: - // VALUE="new - // line" - // node program.js --s="$VALUE" - args = optimist.parse([ "--s=X\nX" ]) - t.same(args, { _ : [], s : "X\nX", $0 : $0 }); - t.end(); -}); - -test('strings' , function (t) { - var s = optimist([ '-s', '0001234' ]).string('s').argv.s; - t.same(s, '0001234'); - t.same(typeof s, 'string'); - - var x = optimist([ '-x', '56' ]).string('x').argv.x; - t.same(x, '56'); - t.same(typeof x, 'string'); - t.end(); -}); - -test('stringArgs', function (t) { - var s = optimist([ ' ', ' ' ]).string('_').argv._; - t.same(s.length, 2); - t.same(typeof s[0], 'string'); - t.same(s[0], ' '); - t.same(typeof s[1], 'string'); - t.same(s[1], ' '); - t.end(); -}); - -test('slashBreak', function (t) { - t.same( - optimist.parse([ '-I/foo/bar/baz' ]), - { I : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.same( - optimist.parse([ '-xyz/foo/bar/baz' ]), - { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : $0 } - ); - t.end(); -}); - -test('alias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', 'zoom') - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.f, 11); - t.end(); -}); - -test('multiAlias', function (t) { - var argv = optimist([ '-f', '11', '--zoom', '55' ]) - .alias('z', [ 'zm', 'zoom' ]) - .argv - ; - t.equal(argv.zoom, 55); - t.equal(argv.z, argv.zoom); - t.equal(argv.z, argv.zm); - t.equal(argv.f, 11); - t.end(); -}); - -test('boolean default true', function (t) { - var argv = optimist.options({ - sometrue: { - boolean: true, - default: true - } - }).argv; - - t.equal(argv.sometrue, true); - t.end(); -}); - -test('boolean default false', function (t) { - var argv = optimist.options({ - somefalse: { - boolean: true, - default: false - } - }).argv; - - t.equal(argv.somefalse, false); - t.end(); -}); - -test('nested dotted objects', function (t) { - var argv = optimist([ - '--foo.bar', '3', '--foo.baz', '4', - '--foo.quux.quibble', '5', '--foo.quux.o_O', - '--beep.boop' - ]).argv; - - t.same(argv.foo, { - bar : 3, - baz : 4, - quux : { - quibble : 5, - o_O : true - }, - }); - t.same(argv.beep, { boop : true }); - t.end(); -}); - -test('boolean and alias with chainable api', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('herp') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('herp') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -test('boolean and alias with options hash', function (t) { - var aliased = [ '-h', 'derp' ]; - var regular = [ '--herp', 'derp' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .options(opts) - .argv; - var propertyArgv = optimist(regular).options(opts).argv; - var expected = { - herp: true, - h: true, - '_': [ 'derp' ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - - t.end(); -}); - -test('boolean and alias using explicit true', function (t) { - var aliased = [ '-h', 'true' ]; - var regular = [ '--herp', 'true' ]; - var opts = { - herp: { alias: 'h', boolean: true } - }; - var aliasedArgv = optimist(aliased) - .boolean('h') - .alias('h', 'herp') - .argv; - var propertyArgv = optimist(regular) - .boolean('h') - .alias('h', 'herp') - .argv; - var expected = { - herp: true, - h: true, - '_': [ ], - '$0': $0, - }; - - t.same(aliasedArgv, expected); - t.same(propertyArgv, expected); - t.end(); -}); - -// regression, see https://github.com/substack/node-optimist/issues/71 -test('boolean and --x=true', function(t) { - var parsed = optimist(['--boool', '--other=true']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'true'); - - parsed = optimist(['--boool', '--other=false']).boolean('boool').argv; - - t.same(parsed.boool, true); - t.same(parsed.other, 'false'); - t.end(); -}); diff --git a/node_modules/karma/node_modules/optimist/test/usage.js b/node_modules/karma/node_modules/optimist/test/usage.js deleted file mode 100644 index 300454c1..00000000 --- a/node_modules/karma/node_modules/optimist/test/usage.js +++ /dev/null @@ -1,292 +0,0 @@ -var Hash = require('hashish'); -var optimist = require('../index'); -var test = require('tap').test; - -test('usageFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'Options:', - ' -x [required]', - ' -y [required]', - 'Missing required arguments: y', - ] - ); - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - - -test('usagePass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .demand(['x','y']) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkPass', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkFail', function (t) { - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(function (argv) { - if (!('x' in argv)) throw 'You forgot about -x'; - if (!('y' in argv)) throw 'You forgot about -y'; - }) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage -x NUM -y NUM', - 'You forgot about -y' - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('checkCondPass', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -y 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - t.same(r, { - result : { x : 10, y : 20, _ : [], $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('checkCondFail', function (t) { - function checker (argv) { - return 'x' in argv && 'y' in argv; - } - - var r = checkUsage(function () { - return optimist('-x 10 -z 20'.split(' ')) - .usage('Usage: $0 -x NUM -y NUM') - .check(checker) - .argv; - }); - - t.same( - r.result, - { x : 10, z : 20, _ : [], $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/).join('\n'), - 'Usage: ./usage -x NUM -y NUM\n' - + 'Argument check failed: ' + checker.toString() - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('countPass', function (t) { - var r = checkUsage(function () { - return optimist('1 2 3 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same(r, { - result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, - errors : [], - logs : [], - exit : false, - }); - t.end(); -}); - -test('countFail', function (t) { - var r = checkUsage(function () { - return optimist('1 2 --moo'.split(' ')) - .usage('Usage: $0 [x] [y] [z] {OPTIONS}') - .demand(3) - .argv; - }); - t.same( - r.result, - { _ : [ '1', '2' ], moo : true, $0 : './usage' } - ); - - t.same( - r.errors.join('\n').split(/\n+/), - [ - 'Usage: ./usage [x] [y] [z] {OPTIONS}', - 'Not enough non-option arguments: got 2, need at least 3', - ] - ); - - t.same(r.logs, []); - t.ok(r.exit); - t.end(); -}); - -test('defaultSingles', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70 --powsy'.split(' ')) - .default('foo', 5) - .default('bar', 6) - .default('baz', 7) - .argv - ; - }); - t.same(r.result, { - foo : '50', - bar : 6, - baz : '70', - powsy : true, - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultAliases', function (t) { - var r = checkUsage(function () { - return optimist('') - .alias('f', 'foo') - .default('f', 5) - .argv - ; - }); - t.same(r.result, { - f : '5', - foo : '5', - _ : [], - $0 : './usage', - }); - t.end(); -}); - -test('defaultHash', function (t) { - var r = checkUsage(function () { - return optimist('--foo 50 --baz 70'.split(' ')) - .default({ foo : 10, bar : 20, quux : 30 }) - .argv - ; - }); - t.same(r.result, { - _ : [], - $0 : './usage', - foo : 50, - baz : 70, - bar : 20, - quux : 30, - }); - t.end(); -}); - -test('rebase', function (t) { - t.equal( - optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), - './foo/bar/baz' - ); - t.equal( - optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), - '../../..' - ); - t.equal( - optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), - '../pow/zoom.txt' - ); - t.end(); -}); - -function checkUsage (f) { - - var exit = false; - - process._exit = process.exit; - process._env = process.env; - process._argv = process.argv; - - process.exit = function (t) { exit = true }; - process.env = Hash.merge(process.env, { _ : 'node' }); - process.argv = [ './usage' ]; - - var errors = []; - var logs = []; - - console._error = console.error; - console.error = function (msg) { errors.push(msg) }; - console._log = console.log; - console.log = function (msg) { logs.push(msg) }; - - var result = f(); - - process.exit = process._exit; - process.env = process._env; - process.argv = process._argv; - - console.error = console._error; - console.log = console._log; - - return { - errors : errors, - logs : logs, - exit : exit, - result : result, - }; -}; diff --git a/node_modules/karma/node_modules/q/CONTRIBUTING.md b/node_modules/karma/node_modules/q/CONTRIBUTING.md deleted file mode 100644 index 500ab17b..00000000 --- a/node_modules/karma/node_modules/q/CONTRIBUTING.md +++ /dev/null @@ -1,40 +0,0 @@ - -For pull requests: - -- Be consistent with prevalent style and design decisions. -- Add a Jasmine spec to `specs/q-spec.js`. -- Use `npm test` to avoid regressions. -- Run tests in `q-spec/run.html` in as many supported browsers as you - can find the will to deal with. -- Do not build minified versions; we do this each release. -- If you would be so kind, add a note to `CHANGES.md` in an - appropriate section: - - - `Next Major Version` if it introduces backward incompatibilities - to code in the wild using documented features. - - `Next Minor Version` if it adds a new feature. - - `Next Patch Version` if it fixes a bug. - -For releases: - -- Run `npm test`. -- Run tests in `q-spec/run.html` in a representative sample of every - browser under the sun. -- Run `npm run cover` and make sure you're happy with the results. -- Run `npm run minify` and be sure to commit the resulting `q.min.js`. -- Note the Gzipped size output by the previous command, and update - `README.md` if it has changed to 1 significant digit. -- Stash any local changes. -- Update `CHANGES.md` to reflect all changes in the differences - between `HEAD` and the previous tagged version. Give credit where - credit is due. -- Update `README.md` to address all new, non-experimental features. -- Update the API reference on the Wiki to reflect all non-experimental - features. -- Use `npm version major|minor|patch` to update `package.json`, - commit, and tag the new version. -- Use `npm publish` to send up a new release. -- Send an email to the q-continuum mailing list announcing the new - release and the notes from the change log. This helps folks - maintaining other package ecosystems. - diff --git a/node_modules/karma/node_modules/q/LICENSE b/node_modules/karma/node_modules/q/LICENSE deleted file mode 100644 index 76c5fe4c..00000000 --- a/node_modules/karma/node_modules/q/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ - -Copyright 2009–2012 Kristopher Michael Kowal. All rights reserved. -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to -deal in the Software without restriction, including without limitation the -rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -sell copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS -IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/q/README.md b/node_modules/karma/node_modules/q/README.md deleted file mode 100644 index c0f513ce..00000000 --- a/node_modules/karma/node_modules/q/README.md +++ /dev/null @@ -1,813 +0,0 @@ -[![Build Status](https://secure.travis-ci.org/kriskowal/q.png?branch=master)](http://travis-ci.org/kriskowal/q) - -
    - Promises/A+ logo - - -If a function cannot return a value or throw an exception without -blocking, it can return a promise instead. A promise is an object -that represents the return value or the thrown exception that the -function may eventually provide. A promise can also be used as a -proxy for a [remote object][Q-Connection] to overcome latency. - -[Q-Connection]: https://github.com/kriskowal/q-connection - -On the first pass, promises can mitigate the “[Pyramid of -Doom][POD]”: the situation where code marches to the right faster -than it marches forward. - -[POD]: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/ - -```javascript -step1(function (value1) { - step2(value1, function(value2) { - step3(value2, function(value3) { - step4(value3, function(value4) { - // Do something with value4 - }); - }); - }); -}); -``` - -With a promise library, you can flatten the pyramid. - -```javascript -Q.fcall(promisedStep1) -.then(promisedStep2) -.then(promisedStep3) -.then(promisedStep4) -.then(function (value4) { - // Do something with value4 -}) -.catch(function (error) { - // Handle any error from all above steps -}) -.done(); -``` - -With this approach, you also get implicit error propagation, just like `try`, -`catch`, and `finally`. An error in `promisedStep1` will flow all the way to -the `catch` function, where it’s caught and handled. (Here `promisedStepN` is -a version of `stepN` that returns a promise.) - -The callback approach is called an “inversion of control”. -A function that accepts a callback instead of a return value -is saying, “Don’t call me, I’ll call you.”. Promises -[un-invert][IOC] the inversion, cleanly separating the input -arguments from control flow arguments. This simplifies the -use and creation of API’s, particularly variadic, -rest and spread arguments. - -[IOC]: http://www.slideshare.net/domenicdenicola/callbacks-promises-and-coroutines-oh-my-the-evolution-of-asynchronicity-in-javascript - - -## Getting Started - -The Q module can be loaded as: - -- A `` - -``` - -For more thorough examples, look at the `examples/` directory. - -## Short recipes - -### Sending and receiving events. - -Socket.IO allows you to emit and receive custom events. -Besides `connect`, `message` and `disconnect`, you can emit custom events: - -```js -// note, io.listen() will create a http server for you -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - io.sockets.emit('this', { will: 'be received by everyone' }); - - socket.on('private message', function (from, msg) { - console.log('I received a private message by ', from, ' saying ', msg); - }); - - socket.on('disconnect', function () { - io.sockets.emit('user disconnected'); - }); -}); -``` - -### Storing data associated to a client - -Sometimes it's necessary to store data associated with a client that's -necessary for the duration of the session. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.on('set nickname', function (name) { - socket.set('nickname', name, function () { socket.emit('ready'); }); - }); - - socket.on('msg', function () { - socket.get('nickname', function (err, name) { - console.log('Chat message by ', name); - }); - }); -}); -``` - -#### Client side - -```html - -``` - -### Restricting yourself to a namespace - -If you have control over all the messages and events emitted for a particular -application, using the default `/` namespace works. - -If you want to leverage 3rd-party code, or produce code to share with others, -socket.io provides a way of namespacing a `socket`. - -This has the benefit of `multiplexing` a single connection. Instead of -socket.io using two `WebSocket` connections, it'll use one. - -The following example defines a socket that listens on '/chat' and one for -'/news': - -#### Server side - -```js -var io = require('socket.io').listen(80); - -var chat = io - .of('/chat') - .on('connection', function (socket) { - socket.emit('a message', { that: 'only', '/chat': 'will get' }); - chat.emit('a message', { everyone: 'in', '/chat': 'will get' }); - }); - -var news = io - .of('/news'); - .on('connection', function (socket) { - socket.emit('item', { news: 'item' }); - }); -``` - -#### Client side: - -```html - -``` - -### Sending volatile messages. - -Sometimes certain messages can be dropped. Let's say you have an app that -shows realtime tweets for the keyword `bieber`. - -If a certain client is not ready to receive messages (because of network slowness -or other issues, or because he's connected through long polling and is in the -middle of a request-response cycle), if he doesn't receive ALL the tweets related -to bieber your application won't suffer. - -In that case, you might want to send those messages as volatile messages. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - var tweets = setInterval(function () { - getBieberTweet(function (tweet) { - socket.volatile.emit('bieber tweet', tweet); - }); - }, 100); - - socket.on('disconnect', function () { - clearInterval(tweets); - }); -}); -``` - -#### Client side - -In the client side, messages are received the same way whether they're volatile -or not. - -### Getting acknowledgements - -Sometimes, you might want to get a callback when the client confirmed the message -reception. - -To do this, simply pass a function as the last parameter of `.send` or `.emit`. -What's more, when you use `.emit`, the acknowledgement is done by you, which -means you can also pass data along: - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.on('ferret', function (name, fn) { - fn('woot'); - }); -}); -``` - -#### Client side - -```html - -``` - -### Broadcasting messages - -To broadcast, simply add a `broadcast` flag to `emit` and `send` method calls. -Broadcasting means sending a message to everyone else except for the socket -that starts it. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.broadcast.emit('user connected'); - socket.broadcast.json.send({ a: 'message' }); -}); -``` - -### Rooms - -Sometimes you want to put certain sockets in the same room, so that it's easy -to broadcast to all of them together. - -Think of this as built-in channels for sockets. Sockets `join` and `leave` -rooms in each socket. - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.join('justin bieber fans'); - socket.broadcast.to('justin bieber fans').emit('new fan'); - io.sockets.in('rammstein fans').emit('new non-fan'); -}); -``` - -### Using it just as a cross-browser WebSocket - -If you just want the WebSocket semantics, you can do that too. -Simply leverage `send` and listen on the `message` event: - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.sockets.on('connection', function (socket) { - socket.on('message', function () { }); - socket.on('disconnect', function () { }); -}); -``` - -#### Client side - -```html - -``` - -### Changing configuration - -Configuration in socket.io is TJ-style: - -#### Server side - -```js -var io = require('socket.io').listen(80); - -io.configure(function () { - io.set('transports', ['websocket', 'flashsocket', 'xhr-polling']); -}); - -io.configure('development', function () { - io.set('transports', ['websocket', 'xhr-polling']); - io.enable('log'); -}); -``` - -## License - -(The MIT License) - -Copyright (c) 2011 Guillermo Rauch <guillermo@learnboost.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/socket.io/benchmarks/decode.bench.js b/node_modules/karma/node_modules/socket.io/benchmarks/decode.bench.js deleted file mode 100644 index 4855d805..00000000 --- a/node_modules/karma/node_modules/socket.io/benchmarks/decode.bench.js +++ /dev/null @@ -1,64 +0,0 @@ - -/** - * Module dependencies. - */ - -var benchmark = require('benchmark') - , colors = require('colors') - , io = require('../') - , parser = io.parser - , suite = new benchmark.Suite('Decode packet'); - -suite.add('string', function () { - parser.decodePacket('4:::"2"'); -}); - -suite.add('event', function () { - parser.decodePacket('5:::{"name":"woot"}'); -}); - -suite.add('event+ack', function () { - parser.decodePacket('5:1+::{"name":"tobi"}'); -}); - -suite.add('event+data', function () { - parser.decodePacket('5:::{"name":"edwald","args":[{"a": "b"},2,"3"]}'); -}); - -suite.add('heartbeat', function () { - parser.decodePacket('2:::'); -}); - -suite.add('error', function () { - parser.decodePacket('7:::2+0'); -}); - -var payload = parser.encodePayload([ - parser.encodePacket({ type: 'message', data: '5', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbazfoobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) -]); - -suite.add('payload', function () { - parser.decodePayload(payload); -}); - -suite.on('cycle', function (bench, details) { - console.log('\n' + suite.name.grey, details.name.white.bold); - console.log([ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/node_modules/karma/node_modules/socket.io/benchmarks/encode.bench.js b/node_modules/karma/node_modules/socket.io/benchmarks/encode.bench.js deleted file mode 100644 index 5037702d..00000000 --- a/node_modules/karma/node_modules/socket.io/benchmarks/encode.bench.js +++ /dev/null @@ -1,90 +0,0 @@ - -/** - * Module dependencies. - */ - -var benchmark = require('benchmark') - , colors = require('colors') - , io = require('../') - , parser = io.parser - , suite = new benchmark.Suite('Encode packet'); - -suite.add('string', function () { - parser.encodePacket({ - type: 'json' - , endpoint: '' - , data: '2' - }); -}); - -suite.add('event', function () { - parser.encodePacket({ - type: 'event' - , name: 'woot' - , endpoint: '' - , args: [] - }); -}); - -suite.add('event+ack', function () { - parser.encodePacket({ - type: 'json' - , id: 1 - , ack: 'data' - , endpoint: '' - , data: { a: 'b' } - }); -}); - -suite.add('event+data', function () { - parser.encodePacket({ - type: 'event' - , name: 'edwald' - , endpoint: '' - , args: [{a: 'b'}, 2, '3'] - }); -}); - -suite.add('heartbeat', function () { - parser.encodePacket({ - type: 'heartbeat' - , endpoint: '' - }) -}); - -suite.add('error', function () { - parser.encodePacket({ - type: 'error' - , reason: 'unauthorized' - , advice: 'reconnect' - , endpoint: '' - }) -}) - -suite.add('payload', function () { - parser.encodePayload([ - parser.encodePacket({ type: 'message', data: '5', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbazfoobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobarbaz', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: 'foobar', endpoint: '' }) - ]); -}); - -suite.on('cycle', function (bench, details) { - console.log('\n' + suite.name.grey, details.name.white.bold); - console.log([ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/node_modules/karma/node_modules/socket.io/benchmarks/runner.js b/node_modules/karma/node_modules/socket.io/benchmarks/runner.js deleted file mode 100644 index 81e55cae..00000000 --- a/node_modules/karma/node_modules/socket.io/benchmarks/runner.js +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Benchmark runner dependencies - */ - -var colors = require('colors') - , path = require('path'); - -/** - * Find all the benchmarks - */ - -var benchmarks_files = process.env.BENCHMARKS.split(' ') - , all = [].concat(benchmarks_files) - , first = all.shift() - , benchmarks = {}; - -// find the benchmarks and load them all in our obj -benchmarks_files.forEach(function (file) { - benchmarks[file] = require(path.join(__dirname, '..', file)); -}); - -// setup the complete listeners -benchmarks_files.forEach(function (file) { - var benchmark = benchmarks[file] - , next_file = all.shift() - , next = benchmarks[next_file]; - - /** - * Generate a oncomplete function for the tests, either we are done or we - * have more benchmarks to process. - */ - - function complete () { - if (!next) { - console.log( - '\n\nBenchmark completed in'.grey - , (Date.now() - start).toString().green + ' ms'.grey - ); - } else { - console.log('\nStarting benchmark '.grey + next_file.yellow); - next.run(); - } - } - - // attach the listener - benchmark.on('complete', complete); -}); - -/** - * Start the benchmark - */ - -var start = Date.now(); -console.log('Starting benchmark '.grey + first.yellow); -benchmarks[first].run(); diff --git a/node_modules/karma/node_modules/socket.io/index.js b/node_modules/karma/node_modules/socket.io/index.js deleted file mode 100644 index cc00c103..00000000 --- a/node_modules/karma/node_modules/socket.io/index.js +++ /dev/null @@ -1,8 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -module.exports = require('./lib/socket.io'); diff --git a/node_modules/karma/node_modules/socket.io/lib/logger.js b/node_modules/karma/node_modules/socket.io/lib/logger.js deleted file mode 100644 index 49d02c98..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/logger.js +++ /dev/null @@ -1,97 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var util = require('./util') - , toArray = util.toArray; - -/** - * Log levels. - */ - -var levels = [ - 'error' - , 'warn' - , 'info' - , 'debug' -]; - -/** - * Colors for log levels. - */ - -var colors = [ - 31 - , 33 - , 36 - , 90 -]; - -/** - * Pads the nice output to the longest log level. - */ - -function pad (str) { - var max = 0; - - for (var i = 0, l = levels.length; i < l; i++) - max = Math.max(max, levels[i].length); - - if (str.length < max) - return str + new Array(max - str.length + 1).join(' '); - - return str; -}; - -/** - * Logger (console). - * - * @api public - */ - -var Logger = module.exports = function (opts) { - opts = opts || {} - this.colors = false !== opts.colors; - this.level = 3; - this.enabled = true; -}; - -/** - * Log method. - * - * @api public - */ - -Logger.prototype.log = function (type) { - var index = levels.indexOf(type); - - if (index > this.level || !this.enabled) - return this; - - console.log.apply( - console - , [this.colors - ? ' \033[' + colors[index] + 'm' + pad(type) + ' -\033[39m' - : type + ':' - ].concat(toArray(arguments).slice(1)) - ); - - return this; -}; - -/** - * Generate methods. - */ - -levels.forEach(function (name) { - Logger.prototype[name] = function () { - this.log.apply(this, [name].concat(toArray(arguments))); - }; -}); diff --git a/node_modules/karma/node_modules/socket.io/lib/manager.js b/node_modules/karma/node_modules/socket.io/lib/manager.js deleted file mode 100644 index 83937853..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/manager.js +++ /dev/null @@ -1,1027 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , url = require('url') - , tty = require('tty') - , crypto = require('crypto') - , util = require('./util') - , store = require('./store') - , client = require('socket.io-client') - , transports = require('./transports') - , Logger = require('./logger') - , Socket = require('./socket') - , MemoryStore = require('./stores/memory') - , SocketNamespace = require('./namespace') - , Static = require('./static') - , EventEmitter = process.EventEmitter; - -/** - * Export the constructor. - */ - -exports = module.exports = Manager; - -/** - * Default transports. - */ - -var defaultTransports = exports.defaultTransports = [ - 'websocket' - , 'htmlfile' - , 'xhr-polling' - , 'jsonp-polling' -]; - -/** - * Inherited defaults. - */ - -var parent = module.parent.exports - , protocol = parent.protocol - , jsonpolling_re = /^\d+$/; - -/** - * Manager constructor. - * - * @param {HTTPServer} server - * @param {Object} options, optional - * @api public - */ - -function Manager (server, options) { - this.server = server; - this.namespaces = {}; - this.sockets = this.of(''); - this.settings = { - origins: '*:*' - , log: true - , store: new MemoryStore - , logger: new Logger - , static: new Static(this) - , heartbeats: true - , resource: '/socket.io' - , transports: defaultTransports - , authorization: false - , blacklist: ['disconnect'] - , 'log level': 3 - , 'log colors': tty.isatty(process.stdout.fd) - , 'close timeout': 60 - , 'heartbeat interval': 25 - , 'heartbeat timeout': 60 - , 'polling duration': 20 - , 'flash policy server': true - , 'flash policy port': 10843 - , 'destroy upgrade': true - , 'destroy buffer size': 10E7 - , 'browser client': true - , 'browser client cache': true - , 'browser client minification': false - , 'browser client etag': false - , 'browser client expires': 315360000 - , 'browser client gzip': false - , 'browser client handler': false - , 'client store expiration': 15 - , 'match origin protocol': false - }; - - for (var i in options) { - if (options.hasOwnProperty(i)) { - this.settings[i] = options[i]; - } - } - - var self = this; - - // default error handler - server.on('error', function(err) { - self.log.warn('error raised: ' + err); - }); - - this.initStore(); - - this.on('set:store', function() { - self.initStore(); - }); - - // reset listeners - this.oldListeners = server.listeners('request').splice(0); - server.removeAllListeners('request'); - - server.on('request', function (req, res) { - self.handleRequest(req, res); - }); - - server.on('upgrade', function (req, socket, head) { - self.handleUpgrade(req, socket, head); - }); - - server.on('close', function () { - clearInterval(self.gc); - }); - - server.once('listening', function () { - self.gc = setInterval(self.garbageCollection.bind(self), 10000); - }); - - for (var i in transports) { - if (transports.hasOwnProperty(i)) { - if (transports[i].init) { - transports[i].init(this); - } - } - } - - // forward-compatibility with 1.0 - var self = this; - this.sockets.on('connection', function (conn) { - self.emit('connection', conn); - }); - - this.sequenceNumber = Date.now() | 0; - - this.log.info('socket.io started'); -}; - -Manager.prototype.__proto__ = EventEmitter.prototype - -/** - * Store accessor shortcut. - * - * @api public - */ - -Manager.prototype.__defineGetter__('store', function () { - var store = this.get('store'); - store.manager = this; - return store; -}); - -/** - * Logger accessor. - * - * @api public - */ - -Manager.prototype.__defineGetter__('log', function () { - var logger = this.get('logger'); - - logger.level = this.get('log level') || -1; - logger.colors = this.get('log colors'); - logger.enabled = this.enabled('log'); - - return logger; -}); - -/** - * Static accessor. - * - * @api public - */ - -Manager.prototype.__defineGetter__('static', function () { - return this.get('static'); -}); - -/** - * Get settings. - * - * @api public - */ - -Manager.prototype.get = function (key) { - return this.settings[key]; -}; - -/** - * Set settings - * - * @api public - */ - -Manager.prototype.set = function (key, value) { - if (arguments.length == 1) return this.get(key); - this.settings[key] = value; - this.emit('set:' + key, this.settings[key], key); - return this; -}; - -/** - * Enable a setting - * - * @api public - */ - -Manager.prototype.enable = function (key) { - this.settings[key] = true; - this.emit('set:' + key, this.settings[key], key); - return this; -}; - -/** - * Disable a setting - * - * @api public - */ - -Manager.prototype.disable = function (key) { - this.settings[key] = false; - this.emit('set:' + key, this.settings[key], key); - return this; -}; - -/** - * Checks if a setting is enabled - * - * @api public - */ - -Manager.prototype.enabled = function (key) { - return !!this.settings[key]; -}; - -/** - * Checks if a setting is disabled - * - * @api public - */ - -Manager.prototype.disabled = function (key) { - return !this.settings[key]; -}; - -/** - * Configure callbacks. - * - * @api public - */ - -Manager.prototype.configure = function (env, fn) { - if ('function' == typeof env) { - env.call(this); - } else if (env == (process.env.NODE_ENV || 'development')) { - fn.call(this); - } - - return this; -}; - -/** - * Initializes everything related to the message dispatcher. - * - * @api private - */ - -Manager.prototype.initStore = function () { - this.handshaken = {}; - this.connected = {}; - this.open = {}; - this.closed = {}; - this.rooms = {}; - this.roomClients = {}; - - var self = this; - - this.store.subscribe('handshake', function (id, data) { - self.onHandshake(id, data); - }); - - this.store.subscribe('connect', function (id) { - self.onConnect(id); - }); - - this.store.subscribe('open', function (id) { - self.onOpen(id); - }); - - this.store.subscribe('join', function (id, room) { - self.onJoin(id, room); - }); - - this.store.subscribe('leave', function (id, room) { - self.onLeave(id, room); - }); - - this.store.subscribe('close', function (id) { - self.onClose(id); - }); - - this.store.subscribe('dispatch', function (room, packet, volatile, exceptions) { - self.onDispatch(room, packet, volatile, exceptions); - }); - - this.store.subscribe('disconnect', function (id) { - self.onDisconnect(id); - }); -}; - -/** - * Called when a client handshakes. - * - * @param text - */ - -Manager.prototype.onHandshake = function (id, data) { - this.handshaken[id] = data; -}; - -/** - * Called when a client connects (ie: transport first opens) - * - * @api private - */ - -Manager.prototype.onConnect = function (id) { - this.connected[id] = true; -}; - -/** - * Called when a client opens a request in a different node. - * - * @api private - */ - -Manager.prototype.onOpen = function (id) { - this.open[id] = true; - - if (this.closed[id]) { - var self = this; - - this.store.unsubscribe('dispatch:' + id, function () { - var transport = self.transports[id]; - if (self.closed[id] && self.closed[id].length && transport) { - - // if we have buffered messages that accumulate between calling - // onOpen an this async callback, send them if the transport is - // still open, otherwise leave them buffered - if (transport.open) { - transport.payload(self.closed[id]); - self.closed[id] = []; - } - } - }); - } - - // clear the current transport - if (this.transports[id]) { - this.transports[id].discard(); - this.transports[id] = null; - } -}; - -/** - * Called when a message is sent to a namespace and/or room. - * - * @api private - */ - -Manager.prototype.onDispatch = function (room, packet, volatile, exceptions) { - if (this.rooms[room]) { - for (var i = 0, l = this.rooms[room].length; i < l; i++) { - var id = this.rooms[room][i]; - - if (!~exceptions.indexOf(id)) { - if (this.transports[id] && this.transports[id].open) { - this.transports[id].onDispatch(packet, volatile); - } else if (!volatile) { - this.onClientDispatch(id, packet); - } - } - } - } -}; - -/** - * Called when a client joins a nsp / room. - * - * @api private - */ - -Manager.prototype.onJoin = function (id, name) { - if (!this.roomClients[id]) { - this.roomClients[id] = {}; - } - - if (!this.rooms[name]) { - this.rooms[name] = []; - } - - if (!~this.rooms[name].indexOf(id)) { - this.rooms[name].push(id); - this.roomClients[id][name] = true; - } -}; - -/** - * Called when a client leaves a nsp / room. - * - * @param private - */ - -Manager.prototype.onLeave = function (id, room) { - if (this.rooms[room]) { - var index = this.rooms[room].indexOf(id); - - if (index >= 0) { - this.rooms[room].splice(index, 1); - } - - if (!this.rooms[room].length) { - delete this.rooms[room]; - } - - if (this.roomClients[id]) { - delete this.roomClients[id][room]; - } - } -}; - -/** - * Called when a client closes a request in different node. - * - * @api private - */ - -Manager.prototype.onClose = function (id) { - if (this.open[id]) { - delete this.open[id]; - } - - this.closed[id] = []; - - var self = this; - - this.store.subscribe('dispatch:' + id, function (packet, volatile) { - if (!volatile) { - self.onClientDispatch(id, packet); - } - }); -}; - -/** - * Dispatches a message for a closed client. - * - * @api private - */ - -Manager.prototype.onClientDispatch = function (id, packet) { - if (this.closed[id]) { - this.closed[id].push(packet); - } -}; - -/** - * Receives a message for a client. - * - * @api private - */ - -Manager.prototype.onClientMessage = function (id, packet) { - if (this.namespaces[packet.endpoint]) { - this.namespaces[packet.endpoint].handlePacket(id, packet); - } -}; - -/** - * Fired when a client disconnects (not triggered). - * - * @api private - */ - -Manager.prototype.onClientDisconnect = function (id, reason) { - for (var name in this.namespaces) { - if (this.namespaces.hasOwnProperty(name)) { - this.namespaces[name].handleDisconnect(id, reason, typeof this.roomClients[id] !== 'undefined' && - typeof this.roomClients[id][name] !== 'undefined'); - } - } - - this.onDisconnect(id); -}; - -/** - * Called when a client disconnects. - * - * @param text - */ - -Manager.prototype.onDisconnect = function (id, local) { - delete this.handshaken[id]; - - if (this.open[id]) { - delete this.open[id]; - } - - if (this.connected[id]) { - delete this.connected[id]; - } - - if (this.transports[id]) { - this.transports[id].discard(); - delete this.transports[id]; - } - - if (this.closed[id]) { - delete this.closed[id]; - } - - if (this.roomClients[id]) { - for (var room in this.roomClients[id]) { - if (this.roomClients[id].hasOwnProperty(room)) { - this.onLeave(id, room); - } - } - delete this.roomClients[id] - } - - this.store.destroyClient(id, this.get('client store expiration')); - - this.store.unsubscribe('dispatch:' + id); - - if (local) { - this.store.unsubscribe('message:' + id); - this.store.unsubscribe('disconnect:' + id); - } -}; - -/** - * Handles an HTTP request. - * - * @api private - */ - -Manager.prototype.handleRequest = function (req, res) { - var data = this.checkRequest(req); - - if (!data) { - for (var i = 0, l = this.oldListeners.length; i < l; i++) { - this.oldListeners[i].call(this.server, req, res); - } - - return; - } - - if (data.static || !data.transport && !data.protocol) { - if (data.static && this.enabled('browser client')) { - this.static.write(data.path, req, res); - } else { - res.writeHead(200); - res.end('Welcome to socket.io.'); - - this.log.info('unhandled socket.io url'); - } - - return; - } - - if (data.protocol != protocol) { - res.writeHead(500); - res.end('Protocol version not supported.'); - - this.log.info('client protocol version unsupported'); - } else { - if (data.id) { - this.handleHTTPRequest(data, req, res); - } else { - this.handleHandshake(data, req, res); - } - } -}; - -/** - * Handles an HTTP Upgrade. - * - * @api private - */ - -Manager.prototype.handleUpgrade = function (req, socket, head) { - var data = this.checkRequest(req) - , self = this; - - if (!data) { - if (this.enabled('destroy upgrade')) { - socket.end(); - this.log.debug('destroying non-socket.io upgrade'); - } - - return; - } - - req.head = head; - this.handleClient(data, req); - req.head = null; -}; - -/** - * Handles a normal handshaken HTTP request (eg: long-polling) - * - * @api private - */ - -Manager.prototype.handleHTTPRequest = function (data, req, res) { - req.res = res; - this.handleClient(data, req); -}; - -/** - * Intantiantes a new client. - * - * @api private - */ - -Manager.prototype.handleClient = function (data, req) { - var socket = req.socket - , store = this.store - , self = this; - - // handle sync disconnect xhrs - if (undefined != data.query.disconnect) { - if (this.transports[data.id] && this.transports[data.id].open) { - this.transports[data.id].onForcedDisconnect(); - } else { - this.store.publish('disconnect-force:' + data.id); - } - req.res.writeHead(200); - req.res.end(); - return; - } - - if (!~this.get('transports').indexOf(data.transport)) { - this.log.warn('unknown transport: "' + data.transport + '"'); - req.connection.end(); - return; - } - - var transport = new transports[data.transport](this, data, req) - , handshaken = this.handshaken[data.id]; - - if (transport.disconnected) { - // failed during transport setup - req.connection.end(); - return; - } - if (handshaken) { - if (transport.open) { - if (this.closed[data.id] && this.closed[data.id].length) { - transport.payload(this.closed[data.id]); - this.closed[data.id] = []; - } - - this.onOpen(data.id); - this.store.publish('open', data.id); - this.transports[data.id] = transport; - } - - if (!this.connected[data.id]) { - this.onConnect(data.id); - this.store.publish('connect', data.id); - - // flag as used - delete handshaken.issued; - this.onHandshake(data.id, handshaken); - this.store.publish('handshake', data.id, handshaken); - - // initialize the socket for all namespaces - for (var i in this.namespaces) { - if (this.namespaces.hasOwnProperty(i)) { - var socket = this.namespaces[i].socket(data.id, true); - - // echo back connect packet and fire connection event - if (i === '') { - this.namespaces[i].handlePacket(data.id, { type: 'connect' }); - } - } - } - - this.store.subscribe('message:' + data.id, function (packet) { - self.onClientMessage(data.id, packet); - }); - - this.store.subscribe('disconnect:' + data.id, function (reason) { - self.onClientDisconnect(data.id, reason); - }); - } - } else { - if (transport.open) { - transport.error('client not handshaken', 'reconnect'); - } - - transport.discard(); - } -}; - -/** - * Generates a session id. - * - * @api private - */ - -Manager.prototype.generateId = function () { - var rand = new Buffer(15); // multiple of 3 for base64 - if (!rand.writeInt32BE) { - return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString() - + Math.abs(Math.random() * Math.random() * Date.now() | 0).toString(); - } - this.sequenceNumber = (this.sequenceNumber + 1) | 0; - rand.writeInt32BE(this.sequenceNumber, 11); - if (crypto.randomBytes) { - crypto.randomBytes(12).copy(rand); - } else { - // not secure for node 0.4 - [0, 4, 8].forEach(function(i) { - rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i); - }); - } - return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); -}; - -/** - * Handles a handshake request. - * - * @api private - */ - -Manager.prototype.handleHandshake = function (data, req, res) { - var self = this - , origin = req.headers.origin - , headers = { - 'Content-Type': 'text/plain' - }; - - function writeErr (status, message) { - if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) { - res.writeHead(200, { 'Content-Type': 'application/javascript' }); - res.end('io.j[' + data.query.jsonp + '](new Error("' + message + '"));'); - } else { - res.writeHead(status, headers); - res.end(message); - } - }; - - function error (err) { - writeErr(500, 'handshake error'); - self.log.warn('handshake error ' + err); - }; - - if (!this.verifyOrigin(req)) { - writeErr(403, 'handshake bad origin'); - return; - } - - var handshakeData = this.handshakeData(data); - - if (origin) { - // https://developer.mozilla.org/En/HTTP_Access_Control - headers['Access-Control-Allow-Origin'] = origin; - headers['Access-Control-Allow-Credentials'] = 'true'; - } - - this.authorize(handshakeData, function (err, authorized, newData) { - if (err) return error(err); - - if (authorized) { - var id = self.generateId() - , hs = [ - id - , self.enabled('heartbeats') ? self.get('heartbeat timeout') || '' : '' - , self.get('close timeout') || '' - , self.transports(data).join(',') - ].join(':'); - - if (data.query.jsonp && jsonpolling_re.test(data.query.jsonp)) { - hs = 'io.j[' + data.query.jsonp + '](' + JSON.stringify(hs) + ');'; - res.writeHead(200, { 'Content-Type': 'application/javascript' }); - } else { - res.writeHead(200, headers); - } - - res.end(hs); - - self.onHandshake(id, newData || handshakeData); - self.store.publish('handshake', id, newData || handshakeData); - - self.log.info('handshake authorized', id); - } else { - writeErr(403, 'handshake unauthorized'); - self.log.info('handshake unauthorized'); - } - }) -}; - -/** - * Gets normalized handshake data - * - * @api private - */ - -Manager.prototype.handshakeData = function (data) { - var connection = data.request.connection - , connectionAddress - , date = new Date; - - if (connection.remoteAddress) { - connectionAddress = { - address: connection.remoteAddress - , port: connection.remotePort - }; - } else if (connection.socket && connection.socket.remoteAddress) { - connectionAddress = { - address: connection.socket.remoteAddress - , port: connection.socket.remotePort - }; - } - - return { - headers: data.headers - , address: connectionAddress - , time: date.toString() - , query: data.query - , url: data.request.url - , xdomain: !!data.request.headers.origin - , secure: data.request.connection.secure - , issued: +date - }; -}; - -/** - * Verifies the origin of a request. - * - * @api private - */ - -Manager.prototype.verifyOrigin = function (request) { - var origin = request.headers.origin || request.headers.referer - , origins = this.get('origins'); - - if (origin === 'null') origin = '*'; - - if (origins.indexOf('*:*') !== -1) { - return true; - } - - if (origin) { - try { - var parts = url.parse(origin); - parts.port = parts.port || 80; - var ok = - ~origins.indexOf(parts.hostname + ':' + parts.port) || - ~origins.indexOf(parts.hostname + ':*') || - ~origins.indexOf('*:' + parts.port); - if (!ok) this.log.warn('illegal origin: ' + origin); - return ok; - } catch (ex) { - this.log.warn('error parsing origin'); - } - } - else { - this.log.warn('origin missing from handshake, yet required by config'); - } - return false; -}; - -/** - * Handles an incoming packet. - * - * @api private - */ - -Manager.prototype.handlePacket = function (sessid, packet) { - this.of(packet.endpoint || '').handlePacket(sessid, packet); -}; - -/** - * Performs authentication. - * - * @param Object client request data - * @api private - */ - -Manager.prototype.authorize = function (data, fn) { - if (this.get('authorization')) { - var self = this; - - this.get('authorization').call(this, data, function (err, authorized) { - self.log.debug('client ' + authorized ? 'authorized' : 'unauthorized'); - fn(err, authorized); - }); - } else { - this.log.debug('client authorized'); - fn(null, true); - } - - return this; -}; - -/** - * Retrieves the transports adviced to the user. - * - * @api private - */ - -Manager.prototype.transports = function (data) { - var transp = this.get('transports') - , ret = []; - - for (var i = 0, l = transp.length; i < l; i++) { - var transport = transp[i]; - - if (transport) { - if (!transport.checkClient || transport.checkClient(data)) { - ret.push(transport); - } - } - } - - return ret; -}; - -/** - * Checks whether a request is a socket.io one. - * - * @return {Object} a client request data object or `false` - * @api private - */ - -var regexp = /^\/([^\/]+)\/?([^\/]+)?\/?([^\/]+)?\/?$/ - -Manager.prototype.checkRequest = function (req) { - var resource = this.get('resource'); - - var match; - if (typeof resource === 'string') { - match = req.url.substr(0, resource.length); - if (match !== resource) match = null; - } else { - match = resource.exec(req.url); - if (match) match = match[0]; - } - - if (match) { - var uri = url.parse(req.url.substr(match.length), true) - , path = uri.pathname || '' - , pieces = path.match(regexp); - - // client request data - var data = { - query: uri.query || {} - , headers: req.headers - , request: req - , path: path - }; - - if (pieces) { - data.protocol = Number(pieces[1]); - data.transport = pieces[2]; - data.id = pieces[3]; - data.static = !!this.static.has(path); - }; - - return data; - } - - return false; -}; - -/** - * Declares a socket namespace - * - * @api public - */ - -Manager.prototype.of = function (nsp) { - if (this.namespaces[nsp]) { - return this.namespaces[nsp]; - } - - return this.namespaces[nsp] = new SocketNamespace(this, nsp); -}; - -/** - * Perform garbage collection on long living objects and properties that cannot - * be removed automatically. - * - * @api private - */ - -Manager.prototype.garbageCollection = function () { - // clean up unused handshakes - var ids = Object.keys(this.handshaken) - , i = ids.length - , now = Date.now() - , handshake; - - while (i--) { - handshake = this.handshaken[ids[i]]; - - if ('issued' in handshake && (now - handshake.issued) >= 3E4) { - this.onDisconnect(ids[i]); - } - } -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/namespace.js b/node_modules/karma/node_modules/socket.io/lib/namespace.js deleted file mode 100644 index 6e1e1c92..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/namespace.js +++ /dev/null @@ -1,355 +0,0 @@ -/** - * Module dependencies. - */ - -var Socket = require('./socket') - , EventEmitter = process.EventEmitter - , parser = require('./parser') - , util = require('./util'); - -/** - * Exports the constructor. - */ - -exports = module.exports = SocketNamespace; - -/** - * Constructor. - * - * @api public. - */ - -function SocketNamespace (mgr, name) { - this.manager = mgr; - this.name = name || ''; - this.sockets = {}; - this.auth = false; - this.setFlags(); -}; - -/** - * Inherits from EventEmitter. - */ - -SocketNamespace.prototype.__proto__ = EventEmitter.prototype; - -/** - * Copies emit since we override it. - * - * @api private - */ - -SocketNamespace.prototype.$emit = EventEmitter.prototype.emit; - -/** - * Retrieves all clients as Socket instances as an array. - * - * @api public - */ - -SocketNamespace.prototype.clients = function (room) { - var room = this.name + (room !== undefined ? - '/' + room : ''); - - if (!this.manager.rooms[room]) { - return []; - } - - return this.manager.rooms[room].map(function (id) { - return this.socket(id); - }, this); -}; - -/** - * Access logger interface. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('log', function () { - return this.manager.log; -}); - -/** - * Access store. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('store', function () { - return this.manager.store; -}); - -/** - * JSON message flag. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('json', function () { - this.flags.json = true; - return this; -}); - -/** - * Volatile message flag. - * - * @api public - */ - -SocketNamespace.prototype.__defineGetter__('volatile', function () { - this.flags.volatile = true; - return this; -}); - -/** - * Overrides the room to relay messages to (flag). - * - * @api public - */ - -SocketNamespace.prototype.in = SocketNamespace.prototype.to = function (room) { - this.flags.endpoint = this.name + (room ? '/' + room : ''); - return this; -}; - -/** - * Adds a session id we should prevent relaying messages to (flag). - * - * @api public - */ - -SocketNamespace.prototype.except = function (id) { - this.flags.exceptions.push(id); - return this; -}; - -/** - * Sets the default flags. - * - * @api private - */ - -SocketNamespace.prototype.setFlags = function () { - this.flags = { - endpoint: this.name - , exceptions: [] - }; - return this; -}; - -/** - * Sends out a packet. - * - * @api private - */ - -SocketNamespace.prototype.packet = function (packet) { - packet.endpoint = this.name; - - var store = this.store - , log = this.log - , volatile = this.flags.volatile - , exceptions = this.flags.exceptions - , packet = parser.encodePacket(packet); - - this.manager.onDispatch(this.flags.endpoint, packet, volatile, exceptions); - this.store.publish('dispatch', this.flags.endpoint, packet, volatile, exceptions); - - this.setFlags(); - - return this; -}; - -/** - * Sends to everyone. - * - * @api public - */ - -SocketNamespace.prototype.send = function (data) { - return this.packet({ - type: this.flags.json ? 'json' : 'message' - , data: data - }); -}; - -/** - * Emits to everyone (override). - * - * @api public - */ - -SocketNamespace.prototype.emit = function (name) { - if (name == 'newListener') { - return this.$emit.apply(this, arguments); - } - - return this.packet({ - type: 'event' - , name: name - , args: util.toArray(arguments).slice(1) - }); -}; - -/** - * Retrieves or creates a write-only socket for a client, unless specified. - * - * @param {Boolean} whether the socket will be readable when initialized - * @api public - */ - -SocketNamespace.prototype.socket = function (sid, readable) { - if (!this.sockets[sid]) { - this.sockets[sid] = new Socket(this.manager, sid, this, readable); - } - - return this.sockets[sid]; -}; - -/** - * Sets authorization for this namespace. - * - * @api public - */ - -SocketNamespace.prototype.authorization = function (fn) { - this.auth = fn; - return this; -}; - -/** - * Called when a socket disconnects entirely. - * - * @api private - */ - -SocketNamespace.prototype.handleDisconnect = function (sid, reason, raiseOnDisconnect) { - if (this.sockets[sid] && this.sockets[sid].readable) { - if (raiseOnDisconnect) this.sockets[sid].onDisconnect(reason); - delete this.sockets[sid]; - } -}; - -/** - * Performs authentication. - * - * @param Object client request data - * @api private - */ - -SocketNamespace.prototype.authorize = function (data, fn) { - if (this.auth) { - var self = this; - - this.auth.call(this, data, function (err, authorized) { - self.log.debug('client ' + - (authorized ? '' : 'un') + 'authorized for ' + self.name); - fn(err, authorized); - }); - } else { - this.log.debug('client authorized for ' + this.name); - fn(null, true); - } - - return this; -}; - -/** - * Handles a packet. - * - * @api private - */ - -SocketNamespace.prototype.handlePacket = function (sessid, packet) { - var socket = this.socket(sessid) - , dataAck = packet.ack == 'data' - , manager = this.manager - , self = this; - - function ack () { - self.log.debug('sending data ack packet'); - socket.packet({ - type: 'ack' - , args: util.toArray(arguments) - , ackId: packet.id - }); - }; - - function error (err) { - self.log.warn('handshake error ' + err + ' for ' + self.name); - socket.packet({ type: 'error', reason: err }); - }; - - function connect () { - self.manager.onJoin(sessid, self.name); - self.store.publish('join', sessid, self.name); - - // packet echo - socket.packet({ type: 'connect' }); - - // emit connection event - self.$emit('connection', socket); - }; - - switch (packet.type) { - case 'connect': - if (packet.endpoint == '') { - connect(); - } else { - var handshakeData = manager.handshaken[sessid]; - - this.authorize(handshakeData, function (err, authorized, newData) { - if (err) return error(err); - - if (authorized) { - manager.onHandshake(sessid, newData || handshakeData); - self.store.publish('handshake', sessid, newData || handshakeData); - connect(); - } else { - error('unauthorized'); - } - }); - } - break; - - case 'ack': - if (socket.acks[packet.ackId]) { - socket.acks[packet.ackId].apply(socket, packet.args); - } else { - this.log.info('unknown ack packet'); - } - break; - - case 'event': - // check if the emitted event is not blacklisted - if (-~manager.get('blacklist').indexOf(packet.name)) { - this.log.debug('ignoring blacklisted event `' + packet.name + '`'); - } else { - var params = [packet.name].concat(packet.args); - - if (dataAck) { - params.push(ack); - } - - socket.$emit.apply(socket, params); - } - break; - - case 'disconnect': - this.manager.onLeave(sessid, this.name); - this.store.publish('leave', sessid, this.name); - - socket.$emit('disconnect', packet.reason || 'packet'); - break; - - case 'json': - case 'message': - var params = ['message', packet.data]; - - if (dataAck) - params.push(ack); - - socket.$emit.apply(socket, params); - }; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/parser.js b/node_modules/karma/node_modules/socket.io/lib/parser.js deleted file mode 100644 index d56b5500..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/parser.js +++ /dev/null @@ -1,249 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -/** - * Packet types. - */ - -var packets = exports.packets = { - 'disconnect': 0 - , 'connect': 1 - , 'heartbeat': 2 - , 'message': 3 - , 'json': 4 - , 'event': 5 - , 'ack': 6 - , 'error': 7 - , 'noop': 8 - } - , packetslist = Object.keys(packets); - -/** - * Errors reasons. - */ - -var reasons = exports.reasons = { - 'transport not supported': 0 - , 'client not handshaken': 1 - , 'unauthorized': 2 - } - , reasonslist = Object.keys(reasons); - -/** - * Errors advice. - */ - -var advice = exports.advice = { - 'reconnect': 0 - } - , advicelist = Object.keys(advice); - -/** - * Encodes a packet. - * - * @api private - */ - -exports.encodePacket = function (packet) { - var type = packets[packet.type] - , id = packet.id || '' - , endpoint = packet.endpoint || '' - , ack = packet.ack - , data = null; - - switch (packet.type) { - case 'message': - if (packet.data !== '') - data = packet.data; - break; - - case 'event': - var ev = { name: packet.name }; - - if (packet.args && packet.args.length) { - ev.args = packet.args; - } - - data = JSON.stringify(ev); - break; - - case 'json': - data = JSON.stringify(packet.data); - break; - - case 'ack': - data = packet.ackId - + (packet.args && packet.args.length - ? '+' + JSON.stringify(packet.args) : ''); - break; - - case 'connect': - if (packet.qs) - data = packet.qs; - break; - - case 'error': - var reason = packet.reason ? reasons[packet.reason] : '' - , adv = packet.advice ? advice[packet.advice] : '' - - if (reason !== '' || adv !== '') - data = reason + (adv !== '' ? ('+' + adv) : '') - - break; - } - - // construct packet with required fragments - var encoded = type + ':' + id + (ack == 'data' ? '+' : '') + ':' + endpoint; - - // data fragment is optional - if (data !== null && data !== undefined) - encoded += ':' + data; - - return encoded; -}; - -/** - * Encodes multiple messages (payload). - * - * @param {Array} messages - * @api private - */ - -exports.encodePayload = function (packets) { - var decoded = ''; - - if (packets.length == 1) - return packets[0]; - - for (var i = 0, l = packets.length; i < l; i++) { - var packet = packets[i]; - decoded += '\ufffd' + packet.length + '\ufffd' + packets[i] - } - - return decoded; -}; - -/** - * Decodes a packet - * - * @api private - */ - -var regexp = /([^:]+):([0-9]+)?(\+)?:([^:]+)?:?([\s\S]*)?/; - -/** - * Wrap the JSON.parse in a seperate function the crankshaft optimizer will - * only punish this function for the usage for try catch - * - * @api private - */ - -function parse (data) { - try { return JSON.parse(data) } - catch (e) { return false } -} - -exports.decodePacket = function (data) { - var pieces = data.match(regexp); - - if (!pieces) return {}; - - var id = pieces[2] || '' - , data = pieces[5] || '' - , packet = { - type: packetslist[pieces[1]] - , endpoint: pieces[4] || '' - }; - - // whether we need to acknowledge the packet - if (id) { - packet.id = id; - if (pieces[3]) - packet.ack = 'data'; - else - packet.ack = true; - } - - // handle different packet types - switch (packet.type) { - case 'message': - packet.data = data || ''; - break; - - case 'event': - pieces = parse(data); - if (pieces) { - packet.name = pieces.name; - packet.args = pieces.args; - } - - packet.args = packet.args || []; - break; - - case 'json': - packet.data = parse(data); - break; - - case 'connect': - packet.qs = data || ''; - break; - - case 'ack': - pieces = data.match(/^([0-9]+)(\+)?(.*)/); - if (pieces) { - packet.ackId = pieces[1]; - packet.args = []; - - if (pieces[3]) { - packet.args = parse(pieces[3]) || []; - } - } - break; - - case 'error': - pieces = data.split('+'); - packet.reason = reasonslist[pieces[0]] || ''; - packet.advice = advicelist[pieces[1]] || ''; - } - - return packet; -}; - -/** - * Decodes data payload. Detects multiple messages - * - * @return {Array} messages - * @api public - */ - -exports.decodePayload = function (data) { - if (undefined == data || null == data) { - return []; - } - - if (data[0] == '\ufffd') { - var ret = []; - - for (var i = 1, length = ''; i < data.length; i++) { - if (data[i] == '\ufffd') { - ret.push(exports.decodePacket(data.substr(i + 1, length))); - i += Number(length) + 1; - length = ''; - } else { - length += data[i]; - } - } - - return ret; - } else { - return [exports.decodePacket(data)]; - } -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/socket.io.js b/node_modules/karma/node_modules/socket.io/lib/socket.io.js deleted file mode 100644 index d9d1c1fd..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/socket.io.js +++ /dev/null @@ -1,143 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var client = require('socket.io-client'); - -/** - * Version. - */ - -exports.version = '0.9.16'; - -/** - * Supported protocol version. - */ - -exports.protocol = 1; - -/** - * Client that we serve. - */ - -exports.clientVersion = client.version; - -/** - * Attaches a manager - * - * @param {HTTPServer/Number} a HTTP/S server or a port number to listen on. - * @param {Object} opts to be passed to Manager and/or http server - * @param {Function} callback if a port is supplied - * @api public - */ - -exports.listen = function (server, options, fn) { - if ('function' == typeof server) { - console.warn('Socket.IO\'s `listen()` method expects an `http.Server` instance\n' - + 'as its first parameter. Are you migrating from Express 2.x to 3.x?\n' - + 'If so, check out the "Socket.IO compatibility" section at:\n' - + 'https://github.com/visionmedia/express/wiki/Migrating-from-2.x-to-3.x'); - } - - if ('function' == typeof options) { - fn = options; - options = {}; - } - - if ('undefined' == typeof server) { - // create a server that listens on port 80 - server = 80; - } - - if ('number' == typeof server) { - // if a port number is passed - var port = server; - - if (options && options.key) - server = require('https').createServer(options); - else - server = require('http').createServer(); - - // default response - server.on('request', function (req, res) { - res.writeHead(200); - res.end('Welcome to socket.io.'); - }); - - server.listen(port, fn); - } - - // otherwise assume a http/s server - return new exports.Manager(server, options); -}; - -/** - * Manager constructor. - * - * @api public - */ - -exports.Manager = require('./manager'); - -/** - * Transport constructor. - * - * @api public - */ - -exports.Transport = require('./transport'); - -/** - * Socket constructor. - * - * @api public - */ - -exports.Socket = require('./socket'); - -/** - * Static constructor. - * - * @api public - */ - -exports.Static = require('./static'); - -/** - * Store constructor. - * - * @api public - */ - -exports.Store = require('./store'); - -/** - * Memory Store constructor. - * - * @api public - */ - -exports.MemoryStore = require('./stores/memory'); - -/** - * Redis Store constructor. - * - * @api public - */ - -exports.RedisStore = require('./stores/redis'); - -/** - * Parser. - * - * @api public - */ - -exports.parser = require('./parser'); diff --git a/node_modules/karma/node_modules/socket.io/lib/socket.js b/node_modules/karma/node_modules/socket.io/lib/socket.js deleted file mode 100644 index d9807f6d..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/socket.js +++ /dev/null @@ -1,369 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var parser = require('./parser') - , util = require('./util') - , EventEmitter = process.EventEmitter - -/** - * Export the constructor. - */ - -exports = module.exports = Socket; - -/** - * Default error event listener to prevent uncaught exceptions. - */ - -var defaultError = function () {}; - -/** - * Socket constructor. - * - * @param {Manager} manager instance - * @param {String} session id - * @param {Namespace} namespace the socket belongs to - * @param {Boolean} whether the - * @api public - */ - -function Socket (manager, id, nsp, readable) { - this.id = id; - this.namespace = nsp; - this.manager = manager; - this.disconnected = false; - this.ackPackets = 0; - this.acks = {}; - this.setFlags(); - this.readable = readable; - this.store = this.manager.store.client(this.id); - this.on('error', defaultError); -}; - -/** - * Inherits from EventEmitter. - */ - -Socket.prototype.__proto__ = EventEmitter.prototype; - -/** - * Accessor shortcut for the handshake data - * - * @api private - */ - -Socket.prototype.__defineGetter__('handshake', function () { - return this.manager.handshaken[this.id]; -}); - -/** - * Accessor shortcut for the transport type - * - * @api private - */ - -Socket.prototype.__defineGetter__('transport', function () { - return this.manager.transports[this.id].name; -}); - -/** - * Accessor shortcut for the logger. - * - * @api private - */ - -Socket.prototype.__defineGetter__('log', function () { - return this.manager.log; -}); - -/** - * JSON message flag. - * - * @api public - */ - -Socket.prototype.__defineGetter__('json', function () { - this.flags.json = true; - return this; -}); - -/** - * Volatile message flag. - * - * @api public - */ - -Socket.prototype.__defineGetter__('volatile', function () { - this.flags.volatile = true; - return this; -}); - -/** - * Broadcast message flag. - * - * @api public - */ - -Socket.prototype.__defineGetter__('broadcast', function () { - this.flags.broadcast = true; - return this; -}); - -/** - * Overrides the room to broadcast messages to (flag) - * - * @api public - */ - -Socket.prototype.to = Socket.prototype.in = function (room) { - this.flags.room = room; - return this; -}; - -/** - * Resets flags - * - * @api private - */ - -Socket.prototype.setFlags = function () { - this.flags = { - endpoint: this.namespace.name - , room: '' - }; - return this; -}; - -/** - * Triggered on disconnect - * - * @api private - */ - -Socket.prototype.onDisconnect = function (reason) { - if (!this.disconnected) { - this.$emit('disconnect', reason); - this.disconnected = true; - } -}; - -/** - * Joins a user to a room. - * - * @api public - */ - -Socket.prototype.join = function (name, fn) { - var nsp = this.namespace.name - , name = (nsp + '/') + name; - - this.manager.onJoin(this.id, name); - this.manager.store.publish('join', this.id, name); - - if (fn) { - this.log.warn('Client#join callback is deprecated'); - fn(); - } - - return this; -}; - -/** - * Un-joins a user from a room. - * - * @api public - */ - -Socket.prototype.leave = function (name, fn) { - var nsp = this.namespace.name - , name = (nsp + '/') + name; - - this.manager.onLeave(this.id, name); - this.manager.store.publish('leave', this.id, name); - - if (fn) { - this.log.warn('Client#leave callback is deprecated'); - fn(); - } - - return this; -}; - -/** - * Transmits a packet. - * - * @api private - */ - -Socket.prototype.packet = function (packet) { - if (this.flags.broadcast) { - this.log.debug('broadcasting packet'); - this.namespace.in(this.flags.room).except(this.id).packet(packet); - } else { - packet.endpoint = this.flags.endpoint; - packet = parser.encodePacket(packet); - - this.dispatch(packet, this.flags.volatile); - } - - this.setFlags(); - - return this; -}; - -/** - * Dispatches a packet - * - * @api private - */ - -Socket.prototype.dispatch = function (packet, volatile) { - if (this.manager.transports[this.id] && this.manager.transports[this.id].open) { - this.manager.transports[this.id].onDispatch(packet, volatile); - } else { - if (!volatile) { - this.manager.onClientDispatch(this.id, packet, volatile); - } - - this.manager.store.publish('dispatch:' + this.id, packet, volatile); - } -}; - -/** - * Stores data for the client. - * - * @api public - */ - -Socket.prototype.set = function (key, value, fn) { - this.store.set(key, value, fn); - return this; -}; - -/** - * Retrieves data for the client - * - * @api public - */ - -Socket.prototype.get = function (key, fn) { - this.store.get(key, fn); - return this; -}; - -/** - * Checks data for the client - * - * @api public - */ - -Socket.prototype.has = function (key, fn) { - this.store.has(key, fn); - return this; -}; - -/** - * Deletes data for the client - * - * @api public - */ - -Socket.prototype.del = function (key, fn) { - this.store.del(key, fn); - return this; -}; - -/** - * Kicks client - * - * @api public - */ - -Socket.prototype.disconnect = function () { - if (!this.disconnected) { - this.log.info('booting client'); - - if ('' === this.namespace.name) { - if (this.manager.transports[this.id] && this.manager.transports[this.id].open) { - this.manager.transports[this.id].onForcedDisconnect(); - } else { - this.manager.onClientDisconnect(this.id); - this.manager.store.publish('disconnect:' + this.id); - } - } else { - this.packet({type: 'disconnect'}); - this.manager.onLeave(this.id, this.namespace.name); - this.$emit('disconnect', 'booted'); - } - - } - - return this; -}; - -/** - * Send a message. - * - * @api public - */ - -Socket.prototype.send = function (data, fn) { - var packet = { - type: this.flags.json ? 'json' : 'message' - , data: data - }; - - if (fn) { - packet.id = ++this.ackPackets; - packet.ack = true; - this.acks[packet.id] = fn; - } - - return this.packet(packet); -}; - -/** - * Original emit function. - * - * @api private - */ - -Socket.prototype.$emit = EventEmitter.prototype.emit; - -/** - * Emit override for custom events. - * - * @api public - */ - -Socket.prototype.emit = function (ev) { - if (ev == 'newListener') { - return this.$emit.apply(this, arguments); - } - - var args = util.toArray(arguments).slice(1) - , lastArg = args[args.length - 1] - , packet = { - type: 'event' - , name: ev - }; - - if ('function' == typeof lastArg) { - packet.id = ++this.ackPackets; - packet.ack = lastArg.length ? 'data' : true; - this.acks[packet.id] = lastArg; - args = args.slice(0, args.length - 1); - } - - packet.args = args; - - return this.packet(packet); -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/static.js b/node_modules/karma/node_modules/socket.io/lib/static.js deleted file mode 100644 index fe505937..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/static.js +++ /dev/null @@ -1,395 +0,0 @@ - -/*! -* socket.io-node -* Copyright(c) 2011 LearnBoost -* MIT Licensed -*/ - -/** - * Module dependencies. - */ - -var client = require('socket.io-client') - , cp = require('child_process') - , fs = require('fs') - , util = require('./util'); - -/** - * File type details. - * - * @api private - */ - -var mime = { - js: { - type: 'application/javascript' - , encoding: 'utf8' - , gzip: true - } - , swf: { - type: 'application/x-shockwave-flash' - , encoding: 'binary' - , gzip: false - } -}; - -/** - * Regexp for matching custom transport patterns. Users can configure their own - * socket.io bundle based on the url structure. Different transport names are - * concatinated using the `+` char. /socket.io/socket.io+websocket.js should - * create a bundle that only contains support for the websocket. - * - * @api private - */ - -var bundle = /\+((?:\+)?[\w\-]+)*(?:\.v\d+\.\d+\.\d+)?(?:\.js)$/ - , versioning = /\.v\d+\.\d+\.\d+(?:\.js)$/; - -/** - * Export the constructor - */ - -exports = module.exports = Static; - -/** - * Static constructor - * - * @api public - */ - -function Static (manager) { - this.manager = manager; - this.cache = {}; - this.paths = {}; - - this.init(); -} - -/** - * Initialize the Static by adding default file paths. - * - * @api public - */ - -Static.prototype.init = function () { - /** - * Generates a unique id based the supplied transports array - * - * @param {Array} transports The array with transport types - * @api private - */ - function id (transports) { - var id = transports.join('').split('').map(function (char) { - return ('' + char.charCodeAt(0)).split('').pop(); - }).reduce(function (char, id) { - return char +id; - }); - - return client.version + ':' + id; - } - - /** - * Generates a socket.io-client file based on the supplied transports. - * - * @param {Array} transports The array with transport types - * @param {Function} callback Callback for the static.write - * @api private - */ - - function build (transports, callback) { - client.builder(transports, { - minify: self.manager.enabled('browser client minification') - }, function (err, content) { - callback(err, content ? new Buffer(content) : null, id(transports)); - } - ); - } - - var self = this; - - // add our default static files - this.add('/static/flashsocket/WebSocketMain.swf', { - file: client.dist + '/WebSocketMain.swf' - }); - - this.add('/static/flashsocket/WebSocketMainInsecure.swf', { - file: client.dist + '/WebSocketMainInsecure.swf' - }); - - // generates dedicated build based on the available transports - this.add('/socket.io.js', function (path, callback) { - build(self.manager.get('transports'), callback); - }); - - this.add('/socket.io.v', { mime: mime.js }, function (path, callback) { - build(self.manager.get('transports'), callback); - }); - - // allow custom builds based on url paths - this.add('/socket.io+', { mime: mime.js }, function (path, callback) { - var available = self.manager.get('transports') - , matches = path.match(bundle) - , transports = []; - - if (!matches) return callback('No valid transports'); - - // make sure they valid transports - matches[0].split('.')[0].split('+').slice(1).forEach(function (transport) { - if (!!~available.indexOf(transport)) { - transports.push(transport); - } - }); - - if (!transports.length) return callback('No valid transports'); - build(transports, callback); - }); - - // clear cache when transports change - this.manager.on('set:transports', function (key, value) { - delete self.cache['/socket.io.js']; - Object.keys(self.cache).forEach(function (key) { - if (bundle.test(key)) { - delete self.cache[key]; - } - }); - }); -}; - -/** - * Gzip compress buffers. - * - * @param {Buffer} data The buffer that needs gzip compression - * @param {Function} callback - * @api public - */ - -Static.prototype.gzip = function (data, callback) { - var gzip = cp.spawn('gzip', ['-9', '-c', '-f', '-n']) - , encoding = Buffer.isBuffer(data) ? 'binary' : 'utf8' - , buffer = [] - , err; - - gzip.stdout.on('data', function (data) { - buffer.push(data); - }); - - gzip.stderr.on('data', function (data) { - err = data +''; - buffer.length = 0; - }); - - gzip.on('close', function () { - if (err) return callback(err); - - var size = 0 - , index = 0 - , i = buffer.length - , content; - - while (i--) { - size += buffer[i].length; - } - - content = new Buffer(size); - i = buffer.length; - - buffer.forEach(function (buffer) { - var length = buffer.length; - - buffer.copy(content, index, 0, length); - index += length; - }); - - buffer.length = 0; - callback(null, content); - }); - - gzip.stdin.end(data, encoding); -}; - -/** - * Is the path a static file? - * - * @param {String} path The path that needs to be checked - * @api public - */ - -Static.prototype.has = function (path) { - // fast case - if (this.paths[path]) return this.paths[path]; - - var keys = Object.keys(this.paths) - , i = keys.length; - - while (i--) { - if (-~path.indexOf(keys[i])) return this.paths[keys[i]]; - } - - return false; -}; - -/** - * Add new paths new paths that can be served using the static provider. - * - * @param {String} path The path to respond to - * @param {Options} options Options for writing out the response - * @param {Function} [callback] Optional callback if no options.file is - * supplied this would be called instead. - * @api public - */ - -Static.prototype.add = function (path, options, callback) { - var extension = /(?:\.(\w{1,4}))$/.exec(path); - - if (!callback && typeof options == 'function') { - callback = options; - options = {}; - } - - options.mime = options.mime || (extension ? mime[extension[1]] : false); - - if (callback) options.callback = callback; - if (!(options.file || options.callback) || !options.mime) return false; - - this.paths[path] = options; - - return true; -}; - -/** - * Writes a static response. - * - * @param {String} path The path for the static content - * @param {HTTPRequest} req The request object - * @param {HTTPResponse} res The response object - * @api public - */ - -Static.prototype.write = function (path, req, res) { - /** - * Write a response without throwing errors because can throw error if the - * response is no longer writable etc. - * - * @api private - */ - - function write (status, headers, content, encoding) { - try { - res.writeHead(status, headers || undefined); - - // only write content if it's not a HEAD request and we actually have - // some content to write (304's doesn't have content). - res.end( - req.method !== 'HEAD' && content ? content : '' - , encoding || undefined - ); - } catch (e) {} - } - - /** - * Answers requests depending on the request properties and the reply object. - * - * @param {Object} reply The details and content to reply the response with - * @api private - */ - - function answer (reply) { - var cached = req.headers['if-none-match'] === reply.etag; - if (cached && self.manager.enabled('browser client etag')) { - return write(304); - } - - var accept = req.headers['accept-encoding'] || '' - , gzip = !!~accept.toLowerCase().indexOf('gzip') - , mime = reply.mime - , versioned = reply.versioned - , headers = { - 'Content-Type': mime.type - }; - - // check if we can add a etag - if (self.manager.enabled('browser client etag') && reply.etag && !versioned) { - headers['Etag'] = reply.etag; - } - - // see if we need to set Expire headers because the path is versioned - if (versioned) { - var expires = self.manager.get('browser client expires'); - headers['Cache-Control'] = 'private, x-gzip-ok="", max-age=' + expires; - headers['Date'] = new Date().toUTCString(); - headers['Expires'] = new Date(Date.now() + (expires * 1000)).toUTCString(); - } - - if (gzip && reply.gzip) { - headers['Content-Length'] = reply.gzip.length; - headers['Content-Encoding'] = 'gzip'; - headers['Vary'] = 'Accept-Encoding'; - write(200, headers, reply.gzip.content, mime.encoding); - } else { - headers['Content-Length'] = reply.length; - write(200, headers, reply.content, mime.encoding); - } - - self.manager.log.debug('served static content ' + path); - } - - var self = this - , details; - - // most common case first - if (this.manager.enabled('browser client cache') && this.cache[path]) { - return answer(this.cache[path]); - } else if (this.manager.get('browser client handler')) { - return this.manager.get('browser client handler').call(this, req, res); - } else if ((details = this.has(path))) { - /** - * A small helper function that will let us deal with fs and dynamic files - * - * @param {Object} err Optional error - * @param {Buffer} content The data - * @api private - */ - - function ready (err, content, etag) { - if (err) { - self.manager.log.warn('Unable to serve file. ' + (err.message || err)); - return write(500, null, 'Error serving static ' + path); - } - - // store the result in the cache - var reply = self.cache[path] = { - content: content - , length: content.length - , mime: details.mime - , etag: etag || client.version - , versioned: versioning.test(path) - }; - - // check if gzip is enabled - if (details.mime.gzip && self.manager.enabled('browser client gzip')) { - self.gzip(content, function (err, content) { - if (!err) { - reply.gzip = { - content: content - , length: content.length - } - } - - answer(reply); - }); - } else { - answer(reply); - } - } - - if (details.file) { - fs.readFile(details.file, ready); - } else if(details.callback) { - details.callback.call(this, path, ready); - } else { - write(404, null, 'File handle not found'); - } - } else { - write(404, null, 'File not found'); - } -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/store.js b/node_modules/karma/node_modules/socket.io/lib/store.js deleted file mode 100644 index 06c0389a..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/store.js +++ /dev/null @@ -1,98 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Expose the constructor. - */ - -exports = module.exports = Store; - -/** - * Module dependencies. - */ - -var EventEmitter = process.EventEmitter; - -/** - * Store interface - * - * @api public - */ - -function Store (options) { - this.options = options; - this.clients = {}; -}; - -/** - * Inherit from EventEmitter. - */ - -Store.prototype.__proto__ = EventEmitter.prototype; - -/** - * Initializes a client store - * - * @param {String} id - * @api public - */ - -Store.prototype.client = function (id) { - if (!this.clients[id]) { - this.clients[id] = new (this.constructor.Client)(this, id); - } - - return this.clients[id]; -}; - -/** - * Destroys a client - * - * @api {String} sid - * @param {Number} number of seconds to expire client data - * @api private - */ - -Store.prototype.destroyClient = function (id, expiration) { - if (this.clients[id]) { - this.clients[id].destroy(expiration); - delete this.clients[id]; - } - - return this; -}; - -/** - * Destroys the store - * - * @param {Number} number of seconds to expire client data - * @api private - */ - -Store.prototype.destroy = function (clientExpiration) { - var keys = Object.keys(this.clients) - , count = keys.length; - - for (var i = 0, l = count; i < l; i++) { - this.destroyClient(keys[i], clientExpiration); - } - - this.clients = {}; - - return this; -}; - -/** - * Client. - * - * @api public - */ - -Store.Client = function (store, id) { - this.store = store; - this.id = id; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/stores/memory.js b/node_modules/karma/node_modules/socket.io/lib/stores/memory.js deleted file mode 100644 index 8b731a79..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/stores/memory.js +++ /dev/null @@ -1,143 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , Store = require('../store'); - -/** - * Exports the constructor. - */ - -exports = module.exports = Memory; -Memory.Client = Client; - -/** - * Memory store - * - * @api public - */ - -function Memory (opts) { - Store.call(this, opts); -}; - -/** - * Inherits from Store. - */ - -Memory.prototype.__proto__ = Store.prototype; - -/** - * Publishes a message. - * - * @api private - */ - -Memory.prototype.publish = function () { }; - -/** - * Subscribes to a channel - * - * @api private - */ - -Memory.prototype.subscribe = function () { }; - -/** - * Unsubscribes - * - * @api private - */ - -Memory.prototype.unsubscribe = function () { }; - -/** - * Client constructor - * - * @api private - */ - -function Client () { - Store.Client.apply(this, arguments); - this.data = {}; -}; - -/** - * Inherits from Store.Client - */ - -Client.prototype.__proto__ = Store.Client; - -/** - * Gets a key - * - * @api public - */ - -Client.prototype.get = function (key, fn) { - fn(null, this.data[key] === undefined ? null : this.data[key]); - return this; -}; - -/** - * Sets a key - * - * @api public - */ - -Client.prototype.set = function (key, value, fn) { - this.data[key] = value; - fn && fn(null); - return this; -}; - -/** - * Has a key - * - * @api public - */ - -Client.prototype.has = function (key, fn) { - fn(null, key in this.data); -}; - -/** - * Deletes a key - * - * @api public - */ - -Client.prototype.del = function (key, fn) { - delete this.data[key]; - fn && fn(null); - return this; -}; - -/** - * Destroys the client. - * - * @param {Number} number of seconds to expire data - * @api private - */ - -Client.prototype.destroy = function (expiration) { - if ('number' != typeof expiration) { - this.data = {}; - } else { - var self = this; - - setTimeout(function () { - self.data = {}; - }, expiration * 1000); - } - - return this; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/stores/redis.js b/node_modules/karma/node_modules/socket.io/lib/stores/redis.js deleted file mode 100644 index 8fea235f..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/stores/redis.js +++ /dev/null @@ -1,269 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var crypto = require('crypto') - , Store = require('../store') - , assert = require('assert'); - -/** - * Exports the constructor. - */ - -exports = module.exports = Redis; -Redis.Client = Client; - -/** - * Redis store. - * Options: - * - nodeId (fn) gets an id that uniquely identifies this node - * - redis (fn) redis constructor, defaults to redis - * - redisPub (object) options to pass to the pub redis client - * - redisSub (object) options to pass to the sub redis client - * - redisClient (object) options to pass to the general redis client - * - pack (fn) custom packing, defaults to JSON or msgpack if installed - * - unpack (fn) custom packing, defaults to JSON or msgpack if installed - * - * @api public - */ - -function Redis (opts) { - opts = opts || {}; - - // node id to uniquely identify this node - var nodeId = opts.nodeId || function () { - // by default, we generate a random id - return Math.abs(Math.random() * Math.random() * Date.now() | 0); - }; - - this.nodeId = nodeId(); - - // packing / unpacking mechanism - if (opts.pack) { - this.pack = opts.pack; - this.unpack = opts.unpack; - } else { - try { - var msgpack = require('msgpack'); - this.pack = msgpack.pack; - this.unpack = msgpack.unpack; - } catch (e) { - this.pack = JSON.stringify; - this.unpack = JSON.parse; - } - } - - var redis = opts.redis || require('redis') - , RedisClient = redis.RedisClient; - - // initialize a pubsub client and a regular client - if (opts.redisPub instanceof RedisClient) { - this.pub = opts.redisPub; - } else { - opts.redisPub || (opts.redisPub = {}); - this.pub = redis.createClient(opts.redisPub.port, opts.redisPub.host, opts.redisPub); - } - if (opts.redisSub instanceof RedisClient) { - this.sub = opts.redisSub; - } else { - opts.redisSub || (opts.redisSub = {}); - this.sub = redis.createClient(opts.redisSub.port, opts.redisSub.host, opts.redisSub); - } - if (opts.redisClient instanceof RedisClient) { - this.cmd = opts.redisClient; - } else { - opts.redisClient || (opts.redisClient = {}); - this.cmd = redis.createClient(opts.redisClient.port, opts.redisClient.host, opts.redisClient); - } - - Store.call(this, opts); - - this.sub.setMaxListeners(0); - this.setMaxListeners(0); -}; - -/** - * Inherits from Store. - */ - -Redis.prototype.__proto__ = Store.prototype; - -/** - * Publishes a message. - * - * @api private - */ - -Redis.prototype.publish = function (name) { - var args = Array.prototype.slice.call(arguments, 1); - this.pub.publish(name, this.pack({ nodeId: this.nodeId, args: args })); - this.emit.apply(this, ['publish', name].concat(args)); -}; - -/** - * Subscribes to a channel - * - * @api private - */ - -Redis.prototype.subscribe = function (name, consumer, fn) { - this.sub.subscribe(name); - - if (consumer || fn) { - var self = this; - - self.sub.on('subscribe', function subscribe (ch) { - if (name == ch) { - function message (ch, msg) { - if (name == ch) { - msg = self.unpack(msg); - - // we check that the message consumed wasnt emitted by this node - if (self.nodeId != msg.nodeId) { - consumer.apply(null, msg.args); - } - } - }; - - self.sub.on('message', message); - - self.on('unsubscribe', function unsubscribe (ch) { - if (name == ch) { - self.sub.removeListener('message', message); - self.removeListener('unsubscribe', unsubscribe); - } - }); - - self.sub.removeListener('subscribe', subscribe); - - fn && fn(); - } - }); - } - - this.emit('subscribe', name, consumer, fn); -}; - -/** - * Unsubscribes - * - * @api private - */ - -Redis.prototype.unsubscribe = function (name, fn) { - this.sub.unsubscribe(name); - - if (fn) { - var client = this.sub; - - client.on('unsubscribe', function unsubscribe (ch) { - if (name == ch) { - fn(); - client.removeListener('unsubscribe', unsubscribe); - } - }); - } - - this.emit('unsubscribe', name, fn); -}; - -/** - * Destroys the store - * - * @api public - */ - -Redis.prototype.destroy = function () { - Store.prototype.destroy.call(this); - - this.pub.end(); - this.sub.end(); - this.cmd.end(); -}; - -/** - * Client constructor - * - * @api private - */ - -function Client (store, id) { - Store.Client.call(this, store, id); -}; - -/** - * Inherits from Store.Client - */ - -Client.prototype.__proto__ = Store.Client; - -/** - * Redis hash get - * - * @api private - */ - -Client.prototype.get = function (key, fn) { - this.store.cmd.hget(this.id, key, fn); - return this; -}; - -/** - * Redis hash set - * - * @api private - */ - -Client.prototype.set = function (key, value, fn) { - this.store.cmd.hset(this.id, key, value, fn); - return this; -}; - -/** - * Redis hash del - * - * @api private - */ - -Client.prototype.del = function (key, fn) { - this.store.cmd.hdel(this.id, key, fn); - return this; -}; - -/** - * Redis hash has - * - * @api private - */ - -Client.prototype.has = function (key, fn) { - this.store.cmd.hexists(this.id, key, function (err, has) { - if (err) return fn(err); - fn(null, !!has); - }); - return this; -}; - -/** - * Destroys client - * - * @param {Number} number of seconds to expire data - * @api private - */ - -Client.prototype.destroy = function (expiration) { - if ('number' != typeof expiration) { - this.store.cmd.del(this.id); - } else { - this.store.cmd.expire(this.id, expiration); - } - - return this; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transport.js b/node_modules/karma/node_modules/socket.io/lib/transport.js deleted file mode 100644 index 2e4c08bd..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transport.js +++ /dev/null @@ -1,534 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var parser = require('./parser'); - -/** - * Expose the constructor. - */ - -exports = module.exports = Transport; - -/** - * Transport constructor. - * - * @api public - */ - -function Transport (mng, data, req) { - this.manager = mng; - this.id = data.id; - this.disconnected = false; - this.drained = true; - this.handleRequest(req); -}; - -/** - * Access the logger. - * - * @api public - */ - -Transport.prototype.__defineGetter__('log', function () { - return this.manager.log; -}); - -/** - * Access the store. - * - * @api public - */ - -Transport.prototype.__defineGetter__('store', function () { - return this.manager.store; -}); - -/** - * Handles a request when it's set. - * - * @api private - */ - -Transport.prototype.handleRequest = function (req) { - this.log.debug('setting request', req.method, req.url); - this.req = req; - - if (req.method == 'GET') { - this.socket = req.socket; - this.open = true; - this.drained = true; - this.setHeartbeatInterval(); - - this.setHandlers(); - this.onSocketConnect(); - } -}; - -/** - * Called when a connection is first set. - * - * @api private - */ - -Transport.prototype.onSocketConnect = function () { }; - -/** - * Sets transport handlers - * - * @api private - */ - -Transport.prototype.setHandlers = function () { - var self = this; - - // we need to do this in a pub/sub way since the client can POST the message - // over a different socket (ie: different Transport instance) - this.store.subscribe('heartbeat-clear:' + this.id, function () { - self.onHeartbeatClear(); - }); - - this.store.subscribe('disconnect-force:' + this.id, function () { - self.onForcedDisconnect(); - }); - - this.store.subscribe('dispatch:' + this.id, function (packet, volatile) { - self.onDispatch(packet, volatile); - }); - - this.bound = { - end: this.onSocketEnd.bind(this) - , close: this.onSocketClose.bind(this) - , error: this.onSocketError.bind(this) - , drain: this.onSocketDrain.bind(this) - }; - - this.socket.on('end', this.bound.end); - this.socket.on('close', this.bound.close); - this.socket.on('error', this.bound.error); - this.socket.on('drain', this.bound.drain); - - this.handlersSet = true; -}; - -/** - * Removes transport handlers - * - * @api private - */ - -Transport.prototype.clearHandlers = function () { - if (this.handlersSet) { - this.store.unsubscribe('disconnect-force:' + this.id); - this.store.unsubscribe('heartbeat-clear:' + this.id); - this.store.unsubscribe('dispatch:' + this.id); - - this.socket.removeListener('end', this.bound.end); - this.socket.removeListener('close', this.bound.close); - this.socket.removeListener('error', this.bound.error); - this.socket.removeListener('drain', this.bound.drain); - } -}; - -/** - * Called when the connection dies - * - * @api private - */ - -Transport.prototype.onSocketEnd = function () { - this.end('socket end'); -}; - -/** - * Called when the connection dies - * - * @api private - */ - -Transport.prototype.onSocketClose = function (error) { - this.end(error ? 'socket error' : 'socket close'); -}; - -/** - * Called when the connection has an error. - * - * @api private - */ - -Transport.prototype.onSocketError = function (err) { - if (this.open) { - this.socket.destroy(); - this.onClose(); - } - - this.log.info('socket error ' + err.stack); -}; - -/** - * Called when the connection is drained. - * - * @api private - */ - -Transport.prototype.onSocketDrain = function () { - this.drained = true; -}; - -/** - * Called upon receiving a heartbeat packet. - * - * @api private - */ - -Transport.prototype.onHeartbeatClear = function () { - this.clearHeartbeatTimeout(); - this.setHeartbeatInterval(); -}; - -/** - * Called upon a forced disconnection. - * - * @api private - */ - -Transport.prototype.onForcedDisconnect = function () { - if (!this.disconnected) { - this.log.info('transport end by forced client disconnection'); - if (this.open) { - this.packet({ type: 'disconnect' }); - } - this.end('booted'); - } -}; - -/** - * Dispatches a packet. - * - * @api private - */ - -Transport.prototype.onDispatch = function (packet, volatile) { - if (volatile) { - this.writeVolatile(packet); - } else { - this.write(packet); - } -}; - -/** - * Sets the close timeout. - */ - -Transport.prototype.setCloseTimeout = function () { - if (!this.closeTimeout) { - var self = this; - - this.closeTimeout = setTimeout(function () { - self.log.debug('fired close timeout for client', self.id); - self.closeTimeout = null; - self.end('close timeout'); - }, this.manager.get('close timeout') * 1000); - - this.log.debug('set close timeout for client', this.id); - } -}; - -/** - * Clears the close timeout. - */ - -Transport.prototype.clearCloseTimeout = function () { - if (this.closeTimeout) { - clearTimeout(this.closeTimeout); - this.closeTimeout = null; - - this.log.debug('cleared close timeout for client', this.id); - } -}; - -/** - * Sets the heartbeat timeout - */ - -Transport.prototype.setHeartbeatTimeout = function () { - if (!this.heartbeatTimeout && this.manager.enabled('heartbeats')) { - var self = this; - - this.heartbeatTimeout = setTimeout(function () { - self.log.debug('fired heartbeat timeout for client', self.id); - self.heartbeatTimeout = null; - self.end('heartbeat timeout'); - }, this.manager.get('heartbeat timeout') * 1000); - - this.log.debug('set heartbeat timeout for client', this.id); - } -}; - -/** - * Clears the heartbeat timeout - * - * @param text - */ - -Transport.prototype.clearHeartbeatTimeout = function () { - if (this.heartbeatTimeout && this.manager.enabled('heartbeats')) { - clearTimeout(this.heartbeatTimeout); - this.heartbeatTimeout = null; - this.log.debug('cleared heartbeat timeout for client', this.id); - } -}; - -/** - * Sets the heartbeat interval. To be called when a connection opens and when - * a heartbeat is received. - * - * @api private - */ - -Transport.prototype.setHeartbeatInterval = function () { - if (!this.heartbeatInterval && this.manager.enabled('heartbeats')) { - var self = this; - - this.heartbeatInterval = setTimeout(function () { - self.heartbeat(); - self.heartbeatInterval = null; - }, this.manager.get('heartbeat interval') * 1000); - - this.log.debug('set heartbeat interval for client', this.id); - } -}; - -/** - * Clears all timeouts. - * - * @api private - */ - -Transport.prototype.clearTimeouts = function () { - this.clearCloseTimeout(); - this.clearHeartbeatTimeout(); - this.clearHeartbeatInterval(); -}; - -/** - * Sends a heartbeat - * - * @api private - */ - -Transport.prototype.heartbeat = function () { - if (this.open) { - this.log.debug('emitting heartbeat for client', this.id); - this.packet({ type: 'heartbeat' }); - this.setHeartbeatTimeout(); - } - - return this; -}; - -/** - * Handles a message. - * - * @param {Object} packet object - * @api private - */ - -Transport.prototype.onMessage = function (packet) { - var current = this.manager.transports[this.id]; - - if ('heartbeat' == packet.type) { - this.log.debug('got heartbeat packet'); - - if (current && current.open) { - current.onHeartbeatClear(); - } else { - this.store.publish('heartbeat-clear:' + this.id); - } - } else { - if ('disconnect' == packet.type && packet.endpoint == '') { - this.log.debug('got disconnection packet'); - - if (current) { - current.onForcedDisconnect(); - } else { - this.store.publish('disconnect-force:' + this.id); - } - - return; - } - - if (packet.id && packet.ack != 'data') { - this.log.debug('acknowledging packet automatically'); - - var ack = parser.encodePacket({ - type: 'ack' - , ackId: packet.id - , endpoint: packet.endpoint || '' - }); - - if (current && current.open) { - current.onDispatch(ack); - } else { - this.manager.onClientDispatch(this.id, ack); - this.store.publish('dispatch:' + this.id, ack); - } - } - - // handle packet locally or publish it - if (current) { - this.manager.onClientMessage(this.id, packet); - } else { - this.store.publish('message:' + this.id, packet); - } - } -}; - -/** - * Clears the heartbeat interval - * - * @api private - */ - -Transport.prototype.clearHeartbeatInterval = function () { - if (this.heartbeatInterval && this.manager.enabled('heartbeats')) { - clearTimeout(this.heartbeatInterval); - this.heartbeatInterval = null; - this.log.debug('cleared heartbeat interval for client', this.id); - } -}; - -/** - * Finishes the connection and makes sure client doesn't reopen - * - * @api private - */ - -Transport.prototype.disconnect = function (reason) { - this.packet({ type: 'disconnect' }); - this.end(reason); - - return this; -}; - -/** - * Closes the connection. - * - * @api private - */ - -Transport.prototype.close = function () { - if (this.open) { - this.doClose(); - this.onClose(); - } -}; - -/** - * Called upon a connection close. - * - * @api private - */ - -Transport.prototype.onClose = function () { - if (this.open) { - this.setCloseTimeout(); - this.clearHandlers(); - this.open = false; - this.manager.onClose(this.id); - this.store.publish('close', this.id); - } -}; - -/** - * Cleans up the connection, considers the client disconnected. - * - * @api private - */ - -Transport.prototype.end = function (reason) { - if (!this.disconnected) { - this.log.info('transport end (' + reason + ')'); - - var local = this.manager.transports[this.id]; - - this.close(); - this.clearTimeouts(); - this.disconnected = true; - - if (local) { - this.manager.onClientDisconnect(this.id, reason, true); - } else { - this.store.publish('disconnect:' + this.id, reason); - } - } -}; - -/** - * Signals that the transport should pause and buffer data. - * - * @api public - */ - -Transport.prototype.discard = function () { - this.log.debug('discarding transport'); - this.discarded = true; - this.clearTimeouts(); - this.clearHandlers(); - - return this; -}; - -/** - * Writes an error packet with the specified reason and advice. - * - * @param {Number} advice - * @param {Number} reason - * @api public - */ - -Transport.prototype.error = function (reason, advice) { - this.packet({ - type: 'error' - , reason: reason - , advice: advice - }); - - this.log.warn(reason, advice ? ('client should ' + advice) : ''); - this.end('error'); -}; - -/** - * Write a packet. - * - * @api public - */ - -Transport.prototype.packet = function (obj) { - return this.write(parser.encodePacket(obj)); -}; - -/** - * Writes a volatile message. - * - * @api private - */ - -Transport.prototype.writeVolatile = function (msg) { - if (this.open) { - if (this.drained) { - this.write(msg); - } else { - this.log.debug('ignoring volatile packet, buffer not drained'); - } - } else { - this.log.debug('ignoring volatile packet, transport not open'); - } -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/flashsocket.js b/node_modules/karma/node_modules/socket.io/lib/transports/flashsocket.js deleted file mode 100644 index dc2d78b4..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/flashsocket.js +++ /dev/null @@ -1,129 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ -var WebSocket = require('./websocket'); - -/** - * Export the constructor. - */ - -exports = module.exports = FlashSocket; - -/** - * The FlashSocket transport is just a proxy - * for WebSocket connections. - * - * @api public - */ - -function FlashSocket (mng, data, req) { - return WebSocket.call(this, mng, data, req); -} - -/** - * Inherits from WebSocket. - */ - -FlashSocket.prototype.__proto__ = WebSocket.prototype; - -/** - * Transport name - * - * @api public - */ - -FlashSocket.prototype.name = 'flashsocket'; - -/** - * Listens for new configuration changes of the Manager - * this way we can enable and disable the flash server. - * - * @param {Manager} Manager instance. - * @api private - */ - - -FlashSocket.init = function (manager) { - var server; - function create () { - - // Drop out immediately if the user has - // disabled the flash policy server - if (!manager.get('flash policy server')) { - return; - } - - server = require('policyfile').createServer({ - log: function(msg){ - manager.log.info(msg); - } - }, manager.get('origins')); - - server.on('close', function (e) { - server = null; - }); - - server.listen(manager.get('flash policy port'), manager.server); - - manager.flashPolicyServer = server; - } - - // listen for origin changes, so we can update the server - manager.on('set:origins', function (value, key) { - if (!server) return; - - // update the origins and compile a new response buffer - server.origins = Array.isArray(value) ? value : [value]; - server.compile(); - }); - - // destory the server and create a new server - manager.on('set:flash policy port', function (value, key) { - var transports = manager.get('transports'); - if (~transports.indexOf('flashsocket')) { - if (server) { - if (server.port === value) return; - // destroy the server and rebuild it on a new port - try { - server.close(); - } - catch (e) { /* ignore exception. could e.g. be that the server isn't started yet */ } - } - create(); - } - }); - - // create or destroy the server - manager.on('set:flash policy server', function (value, key) { - var transports = manager.get('transports'); - if (~transports.indexOf('flashsocket')) { - if (server && !value) { - // destroy the server - try { - server.close(); - } - catch (e) { /* ignore exception. could e.g. be that the server isn't started yet */ } - } - } else if (!server && value) { - // create the server - create(); - } - }); - - // only start the server - manager.on('set:transports', function (value, key){ - if (!server && ~manager.get('transports').indexOf('flashsocket')) { - create(); - } - }); - // check if we need to initialize at start - if (~manager.get('transports').indexOf('flashsocket')){ - create(); - } -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/htmlfile.js b/node_modules/karma/node_modules/socket.io/lib/transports/htmlfile.js deleted file mode 100644 index fce0c0ed..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/htmlfile.js +++ /dev/null @@ -1,83 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPTransport = require('./http'); - -/** - * Export the constructor. - */ - -exports = module.exports = HTMLFile; - -/** - * HTMLFile transport constructor. - * - * @api public - */ - -function HTMLFile (mng, data, req) { - HTTPTransport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -HTMLFile.prototype.__proto__ = HTTPTransport.prototype; - -/** - * Transport name - * - * @api public - */ - -HTMLFile.prototype.name = 'htmlfile'; - -/** - * Handles the request. - * - * @api private - */ - -HTMLFile.prototype.handleRequest = function (req) { - HTTPTransport.prototype.handleRequest.call(this, req); - - if (req.method == 'GET') { - req.res.writeHead(200, { - 'Content-Type': 'text/html; charset=UTF-8' - , 'Connection': 'keep-alive' - , 'Transfer-Encoding': 'chunked' - }); - - req.res.write( - '' - + '' - + new Array(174).join(' ') - ); - } -}; - -/** - * Performs the write. - * - * @api private - */ - -HTMLFile.prototype.write = function (data) { - // escape all forward slashes. see GH-1251 - data = ''; - - if (this.response.write(data)) { - this.drained = true; - } - - this.log.debug(this.name + ' writing', data); -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/http-polling.js b/node_modules/karma/node_modules/socket.io/lib/transports/http-polling.js deleted file mode 100644 index 89b7e042..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/http-polling.js +++ /dev/null @@ -1,147 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPTransport = require('./http'); - -/** - * Exports the constructor. - */ - -exports = module.exports = HTTPPolling; - -/** - * HTTP polling constructor. - * - * @api public. - */ - -function HTTPPolling (mng, data, req) { - HTTPTransport.call(this, mng, data, req); -}; - -/** - * Inherits from HTTPTransport. - * - * @api public. - */ - -HTTPPolling.prototype.__proto__ = HTTPTransport.prototype; - -/** - * Transport name - * - * @api public - */ - -HTTPPolling.prototype.name = 'httppolling'; - -/** - * Override setHandlers - * - * @api private - */ - -HTTPPolling.prototype.setHandlers = function () { - HTTPTransport.prototype.setHandlers.call(this); - this.socket.removeListener('end', this.bound.end); - this.socket.removeListener('close', this.bound.close); -}; - -/** - * Removes heartbeat timeouts for polling. - */ - -HTTPPolling.prototype.setHeartbeatInterval = function () { - return this; -}; - -/** - * Handles a request - * - * @api private - */ - -HTTPPolling.prototype.handleRequest = function (req) { - HTTPTransport.prototype.handleRequest.call(this, req); - - if (req.method == 'GET') { - var self = this; - - this.pollTimeout = setTimeout(function () { - self.packet({ type: 'noop' }); - self.log.debug(self.name + ' closed due to exceeded duration'); - }, this.manager.get('polling duration') * 1000); - - this.log.debug('setting poll timeout'); - } -}; - -/** - * Clears polling timeout - * - * @api private - */ - -HTTPPolling.prototype.clearPollTimeout = function () { - if (this.pollTimeout) { - clearTimeout(this.pollTimeout); - this.pollTimeout = null; - this.log.debug('clearing poll timeout'); - } - - return this; -}; - -/** - * Override clear timeouts to clear the poll timeout - * - * @api private - */ - -HTTPPolling.prototype.clearTimeouts = function () { - HTTPTransport.prototype.clearTimeouts.call(this); - - this.clearPollTimeout(); -}; - -/** - * doWrite to clear poll timeout - * - * @api private - */ - -HTTPPolling.prototype.doWrite = function () { - this.clearPollTimeout(); -}; - -/** - * Performs a write. - * - * @api private. - */ - -HTTPPolling.prototype.write = function (data, close) { - this.doWrite(data); - this.response.end(); - this.onClose(); -}; - -/** - * Override end. - * - * @api private - */ - -HTTPPolling.prototype.end = function (reason) { - this.clearPollTimeout(); - return HTTPTransport.prototype.end.call(this, reason); -}; - diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/http.js b/node_modules/karma/node_modules/socket.io/lib/transports/http.js deleted file mode 100644 index 28db794d..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/http.js +++ /dev/null @@ -1,121 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../transport') - , parser = require('../parser') - , qs = require('querystring'); - -/** - * Export the constructor. - */ - -exports = module.exports = HTTPTransport; - -/** - * HTTP interface constructor. For all non-websocket transports. - * - * @api public - */ - -function HTTPTransport (mng, data, req) { - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -HTTPTransport.prototype.__proto__ = Transport.prototype; - -/** - * Handles a request. - * - * @api private - */ - -HTTPTransport.prototype.handleRequest = function (req) { - - // Always set the response in case an error is returned to the client - this.response = req.res; - - if (req.method == 'POST') { - var buffer = '' - , res = req.res - , origin = req.headers.origin - , headers = { 'Content-Length': 1, 'Content-Type': 'text/plain; charset=UTF-8' } - , self = this; - - req.on('data', function (data) { - buffer += data; - - if (Buffer.byteLength(buffer) >= self.manager.get('destroy buffer size')) { - buffer = ''; - req.connection.destroy(); - } - }); - - req.on('end', function () { - res.writeHead(200, headers); - res.end('1'); - - self.onData(self.postEncoded ? qs.parse(buffer).d : buffer); - }); - - // prevent memory leaks for uncompleted requests - req.on('close', function () { - buffer = ''; - self.onClose(); - }); - - if (origin) { - // https://developer.mozilla.org/En/HTTP_Access_Control - headers['Access-Control-Allow-Origin'] = origin; - headers['Access-Control-Allow-Credentials'] = 'true'; - } - } else { - Transport.prototype.handleRequest.call(this, req); - } -}; - -/** - * Handles data payload. - * - * @api private - */ - -HTTPTransport.prototype.onData = function (data) { - var messages = parser.decodePayload(data); - this.log.debug(this.name + ' received data packet', data); - - for (var i = 0, l = messages.length; i < l; i++) { - this.onMessage(messages[i]); - } -}; - -/** - * Closes the request-response cycle - * - * @api private - */ - -HTTPTransport.prototype.doClose = function () { - this.response.end(); -}; - -/** - * Writes a payload of messages - * - * @api private - */ - -HTTPTransport.prototype.payload = function (msgs) { - this.write(parser.encodePayload(msgs)); -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/index.js b/node_modules/karma/node_modules/socket.io/lib/transports/index.js deleted file mode 100644 index b8655594..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/index.js +++ /dev/null @@ -1,12 +0,0 @@ - -/** - * Export transports. - */ - -module.exports = { - websocket: require('./websocket') - , flashsocket: require('./flashsocket') - , htmlfile: require('./htmlfile') - , 'xhr-polling': require('./xhr-polling') - , 'jsonp-polling': require('./jsonp-polling') -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/jsonp-polling.js b/node_modules/karma/node_modules/socket.io/lib/transports/jsonp-polling.js deleted file mode 100644 index ad7d5aff..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/jsonp-polling.js +++ /dev/null @@ -1,97 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPPolling = require('./http-polling'); -var jsonpolling_re = /^\d+$/ - -/** - * Export the constructor. - */ - -exports = module.exports = JSONPPolling; - -/** - * JSON-P polling transport. - * - * @api public - */ - -function JSONPPolling (mng, data, req) { - HTTPPolling.call(this, mng, data, req); - - this.head = 'io.j[0]('; - this.foot = ');'; - - if (data.query.i && jsonpolling_re.test(data.query.i)) { - this.head = 'io.j[' + data.query.i + ']('; - } -}; - -/** - * Inherits from Transport. - */ - -JSONPPolling.prototype.__proto__ = HTTPPolling.prototype; - -/** - * Transport name - * - * @api public - */ - -JSONPPolling.prototype.name = 'jsonppolling'; - -/** - * Make sure POST are decoded. - */ - -JSONPPolling.prototype.postEncoded = true; - -/** - * Handles incoming data. - * Due to a bug in \n handling by browsers, we expect a JSONified string. - * - * @api private - */ - -JSONPPolling.prototype.onData = function (data) { - try { - data = JSON.parse(data); - } catch (e) { - this.error('parse', 'reconnect'); - return; - } - - HTTPPolling.prototype.onData.call(this, data); -}; - -/** - * Performs the write. - * - * @api private - */ - -JSONPPolling.prototype.doWrite = function (data) { - HTTPPolling.prototype.doWrite.call(this); - - var data = data === undefined - ? '' : this.head + JSON.stringify(data) + this.foot; - - this.response.writeHead(200, { - 'Content-Type': 'text/javascript; charset=UTF-8' - , 'Content-Length': Buffer.byteLength(data) - , 'Connection': 'Keep-Alive' - , 'X-XSS-Protection': '0' - }); - - this.response.write(data); - this.log.debug(this.name + ' writing', data); -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js b/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js deleted file mode 100644 index 78a43043..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/websocket.js +++ /dev/null @@ -1,36 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var protocolVersions = require('./websocket/'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - var transport - , version = req.headers['sec-websocket-version']; - if (typeof version !== 'undefined' && typeof protocolVersions[version] !== 'undefined') { - transport = new protocolVersions[version](mng, data, req); - } - else transport = new protocolVersions['default'](mng, data, req); - if (typeof this.name !== 'undefined') transport.name = this.name; - return transport; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/default.js b/node_modules/karma/node_modules/socket.io/lib/transports/websocket/default.js deleted file mode 100644 index 091fdd44..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/default.js +++ /dev/null @@ -1,362 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../../transport') - , EventEmitter = process.EventEmitter - , crypto = require('crypto') - , parser = require('../../parser'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - // parser - var self = this; - - this.parser = new Parser(); - this.parser.on('data', function (packet) { - self.log.debug(self.name + ' received data packet', packet); - self.onMessage(parser.decodePacket(packet)); - }); - this.parser.on('close', function () { - self.end(); - }); - this.parser.on('error', function () { - self.end(); - }); - - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -WebSocket.prototype.__proto__ = Transport.prototype; - -/** - * Transport name - * - * @api public - */ - -WebSocket.prototype.name = 'websocket'; - -/** - * Websocket draft version - * - * @api public - */ - -WebSocket.prototype.protocolVersion = 'hixie-76'; - -/** - * Called when the socket connects. - * - * @api private - */ - -WebSocket.prototype.onSocketConnect = function () { - var self = this; - - this.socket.setNoDelay(true); - - this.buffer = true; - this.buffered = []; - - if (this.req.headers.upgrade !== 'WebSocket') { - this.log.warn(this.name + ' connection invalid'); - this.end(); - return; - } - - var origin = this.req.headers['origin'] - , waitingForNonce = false; - if(this.manager.settings['match origin protocol']){ - location = (origin.indexOf('https')>-1 ? 'wss' : 'ws') + '://' + this.req.headers.host + this.req.url; - }else if(this.socket.encrypted){ - location = 'wss://' + this.req.headers.host + this.req.url; - }else{ - location = 'ws://' + this.req.headers.host + this.req.url; - } - - if (this.req.headers['sec-websocket-key1']) { - // If we don't have the nonce yet, wait for it (HAProxy compatibility). - if (! (this.req.head && this.req.head.length >= 8)) { - waitingForNonce = true; - } - - var headers = [ - 'HTTP/1.1 101 WebSocket Protocol Handshake' - , 'Upgrade: WebSocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Origin: ' + origin - , 'Sec-WebSocket-Location: ' + location - ]; - - if (this.req.headers['sec-websocket-protocol']){ - headers.push('Sec-WebSocket-Protocol: ' - + this.req.headers['sec-websocket-protocol']); - } - } else { - var headers = [ - 'HTTP/1.1 101 Web Socket Protocol Handshake' - , 'Upgrade: WebSocket' - , 'Connection: Upgrade' - , 'WebSocket-Origin: ' + origin - , 'WebSocket-Location: ' + location - ]; - } - - try { - this.socket.write(headers.concat('', '').join('\r\n')); - this.socket.setTimeout(0); - this.socket.setNoDelay(true); - this.socket.setEncoding('utf8'); - } catch (e) { - this.end(); - return; - } - - if (waitingForNonce) { - this.socket.setEncoding('binary'); - } else if (this.proveReception(headers)) { - self.flush(); - } - - var headBuffer = ''; - - this.socket.on('data', function (data) { - if (waitingForNonce) { - headBuffer += data; - - if (headBuffer.length < 8) { - return; - } - - // Restore the connection to utf8 encoding after receiving the nonce - self.socket.setEncoding('utf8'); - waitingForNonce = false; - - // Stuff the nonce into the location where it's expected to be - self.req.head = headBuffer.substr(0, 8); - headBuffer = ''; - - if (self.proveReception(headers)) { - self.flush(); - } - - return; - } - - self.parser.add(data); - }); -}; - -/** - * Writes to the socket. - * - * @api private - */ - -WebSocket.prototype.write = function (data) { - if (this.open) { - this.drained = false; - - if (this.buffer) { - this.buffered.push(data); - return this; - } - - var length = Buffer.byteLength(data) - , buffer = new Buffer(2 + length); - - buffer.write('\x00', 'binary'); - buffer.write(data, 1, 'utf8'); - buffer.write('\xff', 1 + length, 'binary'); - - try { - if (this.socket.write(buffer)) { - this.drained = true; - } - } catch (e) { - this.end(); - } - - this.log.debug(this.name + ' writing', data); - } -}; - -/** - * Flushes the internal buffer - * - * @api private - */ - -WebSocket.prototype.flush = function () { - this.buffer = false; - - for (var i = 0, l = this.buffered.length; i < l; i++) { - this.write(this.buffered.splice(0, 1)[0]); - } -}; - -/** - * Finishes the handshake. - * - * @api private - */ - -WebSocket.prototype.proveReception = function (headers) { - var self = this - , k1 = this.req.headers['sec-websocket-key1'] - , k2 = this.req.headers['sec-websocket-key2']; - - if (k1 && k2){ - var md5 = crypto.createHash('md5'); - - [k1, k2].forEach(function (k) { - var n = parseInt(k.replace(/[^\d]/g, '')) - , spaces = k.replace(/[^ ]/g, '').length; - - if (spaces === 0 || n % spaces !== 0){ - self.log.warn('Invalid ' + self.name + ' key: "' + k + '".'); - self.end(); - return false; - } - - n /= spaces; - - md5.update(String.fromCharCode( - n >> 24 & 0xFF, - n >> 16 & 0xFF, - n >> 8 & 0xFF, - n & 0xFF)); - }); - - md5.update(this.req.head.toString('binary')); - - try { - this.socket.write(md5.digest('binary'), 'binary'); - } catch (e) { - this.end(); - } - } - - return true; -}; - -/** - * Writes a payload. - * - * @api private - */ - -WebSocket.prototype.payload = function (msgs) { - for (var i = 0, l = msgs.length; i < l; i++) { - this.write(msgs[i]); - } - - return this; -}; - -/** - * Closes the connection. - * - * @api private - */ - -WebSocket.prototype.doClose = function () { - this.socket.end(); -}; - -/** - * WebSocket parser - * - * @api public - */ - -function Parser () { - this.buffer = ''; - this.i = 0; -}; - -/** - * Inherits from EventEmitter. - */ - -Parser.prototype.__proto__ = EventEmitter.prototype; - -/** - * Adds data to the buffer. - * - * @api public - */ - -Parser.prototype.add = function (data) { - this.buffer += data; - this.parse(); -}; - -/** - * Parses the buffer. - * - * @api private - */ - -Parser.prototype.parse = function () { - for (var i = this.i, chr, l = this.buffer.length; i < l; i++){ - chr = this.buffer[i]; - - if (this.buffer.length == 2 && this.buffer[1] == '\u0000') { - this.emit('close'); - this.buffer = ''; - this.i = 0; - return; - } - - if (i === 0){ - if (chr != '\u0000') - this.error('Bad framing. Expected null byte as first frame'); - else - continue; - } - - if (chr == '\ufffd'){ - this.emit('data', this.buffer.substr(1, i - 1)); - this.buffer = this.buffer.substr(i + 1); - this.i = 0; - return this.parse(); - } - } -}; - -/** - * Handles an error - * - * @api private - */ - -Parser.prototype.error = function (reason) { - this.buffer = ''; - this.i = 0; - this.emit('error', reason); - return this; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js b/node_modules/karma/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js deleted file mode 100644 index 44f666a5..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/hybi-07-12.js +++ /dev/null @@ -1,622 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../../transport') - , EventEmitter = process.EventEmitter - , crypto = require('crypto') - , url = require('url') - , parser = require('../../parser') - , util = require('../../util'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; -exports.Parser = Parser; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - // parser - var self = this; - - this.manager = mng; - this.parser = new Parser(); - this.parser.on('data', function (packet) { - self.onMessage(parser.decodePacket(packet)); - }); - this.parser.on('ping', function () { - // version 8 ping => pong - try { - self.socket.write('\u008a\u0000'); - } - catch (e) { - self.end(); - return; - } - }); - this.parser.on('close', function () { - self.end(); - }); - this.parser.on('error', function (reason) { - self.log.warn(self.name + ' parser error: ' + reason); - self.end(); - }); - - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -WebSocket.prototype.__proto__ = Transport.prototype; - -/** - * Transport name - * - * @api public - */ - -WebSocket.prototype.name = 'websocket'; - -/** - * Websocket draft version - * - * @api public - */ - -WebSocket.prototype.protocolVersion = '07-12'; - -/** - * Called when the socket connects. - * - * @api private - */ - -WebSocket.prototype.onSocketConnect = function () { - var self = this; - - if (typeof this.req.headers.upgrade === 'undefined' || - this.req.headers.upgrade.toLowerCase() !== 'websocket') { - this.log.warn(this.name + ' connection invalid'); - this.end(); - return; - } - - var origin = this.req.headers['sec-websocket-origin'] - , location = ((this.manager.settings['match origin protocol'] ? - origin.match(/^https/) : this.socket.encrypted) ? - 'wss' : 'ws') - + '://' + this.req.headers.host + this.req.url; - - if (!this.verifyOrigin(origin)) { - this.log.warn(this.name + ' connection invalid: origin mismatch'); - this.end(); - return; - } - - if (!this.req.headers['sec-websocket-key']) { - this.log.warn(this.name + ' connection invalid: received no key'); - this.end(); - return; - } - - // calc key - var key = this.req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - try { - this.socket.write(headers.concat('', '').join('\r\n')); - this.socket.setTimeout(0); - this.socket.setNoDelay(true); - } catch (e) { - this.end(); - return; - } - - this.socket.on('data', function (data) { - self.parser.add(data); - }); -}; - -/** - * Verifies the origin of a request. - * - * @api private - */ - -WebSocket.prototype.verifyOrigin = function (origin) { - var origins = this.manager.get('origins'); - - if (origin === 'null') origin = '*'; - - if (origins.indexOf('*:*') !== -1) { - return true; - } - - if (origin) { - try { - var parts = url.parse(origin); - parts.port = parts.port || 80; - var ok = - ~origins.indexOf(parts.hostname + ':' + parts.port) || - ~origins.indexOf(parts.hostname + ':*') || - ~origins.indexOf('*:' + parts.port); - if (!ok) this.log.warn('illegal origin: ' + origin); - return ok; - } catch (ex) { - this.log.warn('error parsing origin'); - } - } - else { - this.log.warn('origin missing from websocket call, yet required by config'); - } - return false; -}; - -/** - * Writes to the socket. - * - * @api private - */ - -WebSocket.prototype.write = function (data) { - if (this.open) { - var buf = this.frame(0x81, data); - try { - this.socket.write(buf, 'binary'); - } - catch (e) { - this.end(); - return; - } - this.log.debug(this.name + ' writing', data); - } -}; - -/** - * Writes a payload. - * - * @api private - */ - -WebSocket.prototype.payload = function (msgs) { - for (var i = 0, l = msgs.length; i < l; i++) { - this.write(msgs[i]); - } - - return this; -}; - -/** - * Frame server-to-client output as a text packet. - * - * @api private - */ - -WebSocket.prototype.frame = function (opcode, str) { - var dataBuffer = new Buffer(str) - , dataLength = dataBuffer.length - , startOffset = 2 - , secondByte = dataLength; - if (dataLength > 65536) { - startOffset = 10; - secondByte = 127; - } - else if (dataLength > 125) { - startOffset = 4; - secondByte = 126; - } - var outputBuffer = new Buffer(dataLength + startOffset); - outputBuffer[0] = opcode; - outputBuffer[1] = secondByte; - dataBuffer.copy(outputBuffer, startOffset); - switch (secondByte) { - case 126: - outputBuffer[2] = dataLength >>> 8; - outputBuffer[3] = dataLength % 256; - break; - case 127: - var l = dataLength; - for (var i = 1; i <= 8; ++i) { - outputBuffer[startOffset - i] = l & 0xff; - l >>>= 8; - } - } - return outputBuffer; -}; - -/** - * Closes the connection. - * - * @api private - */ - -WebSocket.prototype.doClose = function () { - this.socket.end(); -}; - -/** - * WebSocket parser - * - * @api public - */ - -function Parser () { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.overflow = null; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.currentMessage = ''; - - var self = this; - this.opcodeHandlers = { - // text - '1': function(data) { - var finish = function(mask, data) { - self.currentMessage += self.unmask(mask, data); - if (self.state.lastFragment) { - self.emit('data', self.currentMessage); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // binary - '2': function(data) { - var finish = function(mask, data) { - if (typeof self.currentMessage == 'string') self.currentMessage = []; // build a buffer list - self.currentMessage.push(self.unmask(mask, data, true)); - if (self.state.lastFragment) { - self.emit('binary', self.concatBuffers(self.currentMessage)); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // close - '8': function(data) { - self.emit('close'); - self.reset(); - }, - // ping - '9': function(data) { - if (self.state.lastFragment == false) { - self.error('fragmented ping is not supported'); - return; - } - - var finish = function(mask, data) { - self.emit('ping', self.unmask(mask, data)); - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength == 0) { - finish(null, null); - } - else if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - expectData(util.unpack(data)); - }); - } - } - } - - this.expect('Opcode', 2, this.processPacket); -}; - -/** - * Inherits from EventEmitter. - */ - -Parser.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add new data to the parser. - * - * @api public - */ - -Parser.prototype.add = function(data) { - if (this.expectBuffer == null) { - this.addToOverflow(data); - return; - } - var toRead = Math.min(data.length, this.expectBuffer.length - this.expectOffset); - data.copy(this.expectBuffer, this.expectOffset, 0, toRead); - this.expectOffset += toRead; - if (toRead < data.length) { - // at this point the overflow buffer shouldn't at all exist - this.overflow = new Buffer(data.length - toRead); - data.copy(this.overflow, 0, toRead, toRead + this.overflow.length); - } - if (this.expectOffset == this.expectBuffer.length) { - var bufferForHandler = this.expectBuffer; - this.expectBuffer = null; - this.expectOffset = 0; - this.expectHandler.call(this, bufferForHandler); - } -} - -/** - * Adds a piece of data to the overflow. - * - * @api private - */ - -Parser.prototype.addToOverflow = function(data) { - if (this.overflow == null) this.overflow = data; - else { - var prevOverflow = this.overflow; - this.overflow = new Buffer(this.overflow.length + data.length); - prevOverflow.copy(this.overflow, 0); - data.copy(this.overflow, prevOverflow.length); - } -} - -/** - * Waits for a certain amount of bytes to be available, then fires a callback. - * - * @api private - */ - -Parser.prototype.expect = function(what, length, handler) { - this.expectBuffer = new Buffer(length); - this.expectOffset = 0; - this.expectHandler = handler; - if (this.overflow != null) { - var toOverflow = this.overflow; - this.overflow = null; - this.add(toOverflow); - } -} - -/** - * Start processing a new packet. - * - * @api private - */ - -Parser.prototype.processPacket = function (data) { - if ((data[0] & 0x70) != 0) { - this.error('reserved fields must be empty'); - } - this.state.lastFragment = (data[0] & 0x80) == 0x80; - this.state.masked = (data[1] & 0x80) == 0x80; - var opcode = data[0] & 0xf; - if (opcode == 0) { - // continuation frame - this.state.opcode = this.state.activeFragmentedOperation; - if (!(this.state.opcode == 1 || this.state.opcode == 2)) { - this.error('continuation frame cannot follow current opcode') - return; - } - } - else { - this.state.opcode = opcode; - if (this.state.lastFragment === false) { - this.state.activeFragmentedOperation = opcode; - } - } - var handler = this.opcodeHandlers[this.state.opcode]; - if (typeof handler == 'undefined') this.error('no handler for opcode ' + this.state.opcode); - else handler(data); -} - -/** - * Endprocessing a packet. - * - * @api private - */ - -Parser.prototype.endPacket = function() { - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - if (this.state.lastFragment && this.state.opcode == this.state.activeFragmentedOperation) { - // end current fragmented operation - this.state.activeFragmentedOperation = null; - } - this.state.lastFragment = false; - this.state.opcode = this.state.activeFragmentedOperation != null ? this.state.activeFragmentedOperation : 0; - this.state.masked = false; - this.expect('Opcode', 2, this.processPacket); -} - -/** - * Reset the parser state. - * - * @api private - */ - -Parser.prototype.reset = function() { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.overflow = null; - this.currentMessage = ''; -} - -/** - * Unmask received data. - * - * @api private - */ - -Parser.prototype.unmask = function (mask, buf, binary) { - if (mask != null) { - for (var i = 0, ll = buf.length; i < ll; i++) { - buf[i] ^= mask[i % 4]; - } - } - if (binary) return buf; - return buf != null ? buf.toString('utf8') : ''; -} - -/** - * Concatenates a list of buffers. - * - * @api private - */ - -Parser.prototype.concatBuffers = function(buffers) { - var length = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - length += buffers[i].length; - } - var mergedBuffer = new Buffer(length); - var offset = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - buffers[i].copy(mergedBuffer, offset); - offset += buffers[i].length; - } - return mergedBuffer; -} - -/** - * Handles an error - * - * @api private - */ - -Parser.prototype.error = function (reason) { - this.reset(); - this.emit('error', reason); - return this; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/hybi-16.js b/node_modules/karma/node_modules/socket.io/lib/transports/websocket/hybi-16.js deleted file mode 100644 index 69967dad..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/hybi-16.js +++ /dev/null @@ -1,622 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var Transport = require('../../transport') - , EventEmitter = process.EventEmitter - , crypto = require('crypto') - , url = require('url') - , parser = require('../../parser') - , util = require('../../util'); - -/** - * Export the constructor. - */ - -exports = module.exports = WebSocket; -exports.Parser = Parser; - -/** - * HTTP interface constructor. Interface compatible with all transports that - * depend on request-response cycles. - * - * @api public - */ - -function WebSocket (mng, data, req) { - // parser - var self = this; - - this.manager = mng; - this.parser = new Parser(); - this.parser.on('data', function (packet) { - self.onMessage(parser.decodePacket(packet)); - }); - this.parser.on('ping', function () { - // version 8 ping => pong - try { - self.socket.write('\u008a\u0000'); - } - catch (e) { - self.end(); - return; - } - }); - this.parser.on('close', function () { - self.end(); - }); - this.parser.on('error', function (reason) { - self.log.warn(self.name + ' parser error: ' + reason); - self.end(); - }); - - Transport.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -WebSocket.prototype.__proto__ = Transport.prototype; - -/** - * Transport name - * - * @api public - */ - -WebSocket.prototype.name = 'websocket'; - -/** - * Websocket draft version - * - * @api public - */ - -WebSocket.prototype.protocolVersion = '16'; - -/** - * Called when the socket connects. - * - * @api private - */ - -WebSocket.prototype.onSocketConnect = function () { - var self = this; - - if (typeof this.req.headers.upgrade === 'undefined' || - this.req.headers.upgrade.toLowerCase() !== 'websocket') { - this.log.warn(this.name + ' connection invalid'); - this.end(); - return; - } - - var origin = this.req.headers['origin'] || '' - , location = ((this.manager.settings['match origin protocol'] ? - origin.match(/^https/) : this.socket.encrypted) ? - 'wss' : 'ws') - + '://' + this.req.headers.host + this.req.url; - - if (!this.verifyOrigin(origin)) { - this.log.warn(this.name + ' connection invalid: origin mismatch'); - this.end(); - return; - } - - if (!this.req.headers['sec-websocket-key']) { - this.log.warn(this.name + ' connection invalid: received no key'); - this.end(); - return; - } - - // calc key - var key = this.req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - try { - this.socket.write(headers.concat('', '').join('\r\n')); - this.socket.setTimeout(0); - this.socket.setNoDelay(true); - } catch (e) { - this.end(); - return; - } - - this.socket.on('data', function (data) { - self.parser.add(data); - }); -}; - -/** - * Verifies the origin of a request. - * - * @api private - */ - -WebSocket.prototype.verifyOrigin = function (origin) { - var origins = this.manager.get('origins'); - - if (origin === 'null') origin = '*'; - - if (origins.indexOf('*:*') !== -1) { - return true; - } - - if (origin) { - try { - var parts = url.parse(origin); - parts.port = parts.port || 80; - var ok = - ~origins.indexOf(parts.hostname + ':' + parts.port) || - ~origins.indexOf(parts.hostname + ':*') || - ~origins.indexOf('*:' + parts.port); - if (!ok) this.log.warn('illegal origin: ' + origin); - return ok; - } catch (ex) { - this.log.warn('error parsing origin'); - } - } - else { - this.log.warn('origin missing from websocket call, yet required by config'); - } - return false; -}; - -/** - * Writes to the socket. - * - * @api private - */ - -WebSocket.prototype.write = function (data) { - if (this.open) { - var buf = this.frame(0x81, data); - try { - this.socket.write(buf, 'binary'); - } - catch (e) { - this.end(); - return; - } - this.log.debug(this.name + ' writing', data); - } -}; - -/** - * Writes a payload. - * - * @api private - */ - -WebSocket.prototype.payload = function (msgs) { - for (var i = 0, l = msgs.length; i < l; i++) { - this.write(msgs[i]); - } - - return this; -}; - -/** - * Frame server-to-client output as a text packet. - * - * @api private - */ - -WebSocket.prototype.frame = function (opcode, str) { - var dataBuffer = new Buffer(str) - , dataLength = dataBuffer.length - , startOffset = 2 - , secondByte = dataLength; - if (dataLength > 65536) { - startOffset = 10; - secondByte = 127; - } - else if (dataLength > 125) { - startOffset = 4; - secondByte = 126; - } - var outputBuffer = new Buffer(dataLength + startOffset); - outputBuffer[0] = opcode; - outputBuffer[1] = secondByte; - dataBuffer.copy(outputBuffer, startOffset); - switch (secondByte) { - case 126: - outputBuffer[2] = dataLength >>> 8; - outputBuffer[3] = dataLength % 256; - break; - case 127: - var l = dataLength; - for (var i = 1; i <= 8; ++i) { - outputBuffer[startOffset - i] = l & 0xff; - l >>>= 8; - } - } - return outputBuffer; -}; - -/** - * Closes the connection. - * - * @api private - */ - -WebSocket.prototype.doClose = function () { - this.socket.end(); -}; - -/** - * WebSocket parser - * - * @api public - */ - -function Parser () { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.overflow = null; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.currentMessage = ''; - - var self = this; - this.opcodeHandlers = { - // text - '1': function(data) { - var finish = function(mask, data) { - self.currentMessage += self.unmask(mask, data); - if (self.state.lastFragment) { - self.emit('data', self.currentMessage); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // binary - '2': function(data) { - var finish = function(mask, data) { - if (typeof self.currentMessage == 'string') self.currentMessage = []; // build a buffer list - self.currentMessage.push(self.unmask(mask, data, true)); - if (self.state.lastFragment) { - self.emit('binary', self.concatBuffers(self.currentMessage)); - self.currentMessage = ''; - } - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - if (util.unpack(data.slice(0, 4)) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported'); - return; - } - var lengthBytes = data.slice(4); // note: cap to 32 bit length - expectData(util.unpack(data)); - }); - } - }, - // close - '8': function(data) { - self.emit('close'); - self.reset(); - }, - // ping - '9': function(data) { - if (self.state.lastFragment == false) { - self.error('fragmented ping is not supported'); - return; - } - - var finish = function(mask, data) { - self.emit('ping', self.unmask(mask, data)); - self.endPacket(); - } - - var expectData = function(length) { - if (self.state.masked) { - self.expect('Mask', 4, function(data) { - var mask = data; - self.expect('Data', length, function(data) { - finish(mask, data); - }); - }); - } - else { - self.expect('Data', length, function(data) { - finish(null, data); - }); - } - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength == 0) { - finish(null, null); - } - else if (firstLength < 126) { - expectData(firstLength); - } - else if (firstLength == 126) { - self.expect('Length', 2, function(data) { - expectData(util.unpack(data)); - }); - } - else if (firstLength == 127) { - self.expect('Length', 8, function(data) { - expectData(util.unpack(data)); - }); - } - } - } - - this.expect('Opcode', 2, this.processPacket); -}; - -/** - * Inherits from EventEmitter. - */ - -Parser.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add new data to the parser. - * - * @api public - */ - -Parser.prototype.add = function(data) { - if (this.expectBuffer == null) { - this.addToOverflow(data); - return; - } - var toRead = Math.min(data.length, this.expectBuffer.length - this.expectOffset); - data.copy(this.expectBuffer, this.expectOffset, 0, toRead); - this.expectOffset += toRead; - if (toRead < data.length) { - // at this point the overflow buffer shouldn't at all exist - this.overflow = new Buffer(data.length - toRead); - data.copy(this.overflow, 0, toRead, toRead + this.overflow.length); - } - if (this.expectOffset == this.expectBuffer.length) { - var bufferForHandler = this.expectBuffer; - this.expectBuffer = null; - this.expectOffset = 0; - this.expectHandler.call(this, bufferForHandler); - } -} - -/** - * Adds a piece of data to the overflow. - * - * @api private - */ - -Parser.prototype.addToOverflow = function(data) { - if (this.overflow == null) this.overflow = data; - else { - var prevOverflow = this.overflow; - this.overflow = new Buffer(this.overflow.length + data.length); - prevOverflow.copy(this.overflow, 0); - data.copy(this.overflow, prevOverflow.length); - } -} - -/** - * Waits for a certain amount of bytes to be available, then fires a callback. - * - * @api private - */ - -Parser.prototype.expect = function(what, length, handler) { - this.expectBuffer = new Buffer(length); - this.expectOffset = 0; - this.expectHandler = handler; - if (this.overflow != null) { - var toOverflow = this.overflow; - this.overflow = null; - this.add(toOverflow); - } -} - -/** - * Start processing a new packet. - * - * @api private - */ - -Parser.prototype.processPacket = function (data) { - if ((data[0] & 0x70) != 0) { - this.error('reserved fields must be empty'); - return; - } - this.state.lastFragment = (data[0] & 0x80) == 0x80; - this.state.masked = (data[1] & 0x80) == 0x80; - var opcode = data[0] & 0xf; - if (opcode == 0) { - // continuation frame - this.state.opcode = this.state.activeFragmentedOperation; - if (!(this.state.opcode == 1 || this.state.opcode == 2)) { - this.error('continuation frame cannot follow current opcode') - return; - } - } - else { - this.state.opcode = opcode; - if (this.state.lastFragment === false) { - this.state.activeFragmentedOperation = opcode; - } - } - var handler = this.opcodeHandlers[this.state.opcode]; - if (typeof handler == 'undefined') this.error('no handler for opcode ' + this.state.opcode); - else handler(data); -} - -/** - * Endprocessing a packet. - * - * @api private - */ - -Parser.prototype.endPacket = function() { - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - if (this.state.lastFragment && this.state.opcode == this.state.activeFragmentedOperation) { - // end current fragmented operation - this.state.activeFragmentedOperation = null; - } - this.state.lastFragment = false; - this.state.opcode = this.state.activeFragmentedOperation != null ? this.state.activeFragmentedOperation : 0; - this.state.masked = false; - this.expect('Opcode', 2, this.processPacket); -} - -/** - * Reset the parser state. - * - * @api private - */ - -Parser.prototype.reset = function() { - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0 - }; - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.overflow = null; - this.currentMessage = ''; -} - -/** - * Unmask received data. - * - * @api private - */ - -Parser.prototype.unmask = function (mask, buf, binary) { - if (mask != null) { - for (var i = 0, ll = buf.length; i < ll; i++) { - buf[i] ^= mask[i % 4]; - } - } - if (binary) return buf; - return buf != null ? buf.toString('utf8') : ''; -} - -/** - * Concatenates a list of buffers. - * - * @api private - */ - -Parser.prototype.concatBuffers = function(buffers) { - var length = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - length += buffers[i].length; - } - var mergedBuffer = new Buffer(length); - var offset = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - buffers[i].copy(mergedBuffer, offset); - offset += buffers[i].length; - } - return mergedBuffer; -} - -/** - * Handles an error - * - * @api private - */ - -Parser.prototype.error = function (reason) { - this.reset(); - this.emit('error', reason); - return this; -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/index.js b/node_modules/karma/node_modules/socket.io/lib/transports/websocket/index.js deleted file mode 100644 index 3a952b75..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/websocket/index.js +++ /dev/null @@ -1,11 +0,0 @@ - -/** - * Export websocket versions. - */ - -module.exports = { - 7: require('./hybi-07-12'), - 8: require('./hybi-07-12'), - 13: require('./hybi-16'), - default: require('./default') -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/transports/xhr-polling.js b/node_modules/karma/node_modules/socket.io/lib/transports/xhr-polling.js deleted file mode 100644 index 1db5aeee..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/transports/xhr-polling.js +++ /dev/null @@ -1,69 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module requirements. - */ - -var HTTPPolling = require('./http-polling'); - -/** - * Export the constructor. - */ - -exports = module.exports = XHRPolling; - -/** - * Ajax polling transport. - * - * @api public - */ - -function XHRPolling (mng, data, req) { - HTTPPolling.call(this, mng, data, req); -}; - -/** - * Inherits from Transport. - */ - -XHRPolling.prototype.__proto__ = HTTPPolling.prototype; - -/** - * Transport name - * - * @api public - */ - -XHRPolling.prototype.name = 'xhr-polling'; - -/** - * Frames data prior to write. - * - * @api private - */ - -XHRPolling.prototype.doWrite = function (data) { - HTTPPolling.prototype.doWrite.call(this); - - var origin = this.req.headers.origin - , headers = { - 'Content-Type': 'text/plain; charset=UTF-8' - , 'Content-Length': data === undefined ? 0 : Buffer.byteLength(data) - , 'Connection': 'Keep-Alive' - }; - - if (origin) { - // https://developer.mozilla.org/En/HTTP_Access_Control - headers['Access-Control-Allow-Origin'] = origin; - headers['Access-Control-Allow-Credentials'] = 'true'; - } - - this.response.writeHead(200, headers); - this.response.write(data); - this.log.debug(this.name + ' writing', data); -}; diff --git a/node_modules/karma/node_modules/socket.io/lib/util.js b/node_modules/karma/node_modules/socket.io/lib/util.js deleted file mode 100644 index f7d9f2b4..00000000 --- a/node_modules/karma/node_modules/socket.io/lib/util.js +++ /dev/null @@ -1,50 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -/** - * Converts an enumerable to an array. - * - * @api public - */ - -exports.toArray = function (enu) { - var arr = []; - - for (var i = 0, l = enu.length; i < l; i++) - arr.push(enu[i]); - - return arr; -}; - -/** - * Unpacks a buffer to a number. - * - * @api public - */ - -exports.unpack = function (buffer) { - var n = 0; - for (var i = 0; i < buffer.length; ++i) { - n = (i == 0) ? buffer[i] : (n * 256) + buffer[i]; - } - return n; -} - -/** - * Left pads a string. - * - * @api public - */ - -exports.padl = function (s,n,c) { - return new Array(1 + n - s.length).join(c) + s; -} - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/base64id/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/base64id/.npmignore deleted file mode 100644 index 39e9864f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/base64id/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -support -test -examples diff --git a/node_modules/karma/node_modules/socket.io/node_modules/base64id/README.md b/node_modules/karma/node_modules/socket.io/node_modules/base64id/README.md deleted file mode 100644 index b4361c15..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/base64id/README.md +++ /dev/null @@ -1,18 +0,0 @@ -base64id -======== - -Node.js module that generates a base64 id. - -Uses crypto.randomBytes when available, falls back to unsafe methods for node.js <= 0.4. - -To increase performance, random bytes are buffered to minimize the number of synchronous calls to crypto.randomBytes. - -## Installation - - $ npm install mongoose - -## Usage - - var base64id = require('base64id'); - - var id = base64id.generateId(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/base64id/lib/base64id.js b/node_modules/karma/node_modules/socket.io/node_modules/base64id/lib/base64id.js deleted file mode 100644 index f6881597..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/base64id/lib/base64id.js +++ /dev/null @@ -1,103 +0,0 @@ -/*! - * base64id v0.1.0 - */ - -/** - * Module dependencies - */ - -var crypto = require('crypto'); - -/** - * Constructor - */ - -var Base64Id = function() { }; - -/** - * Get random bytes - * - * Uses a buffer if available, falls back to crypto.randomBytes - */ - -Base64Id.prototype.getRandomBytes = function(bytes) { - - var BUFFER_SIZE = 4096 - var self = this; - - bytes = bytes || 12; - - if (bytes > BUFFER_SIZE) { - return crypto.randomBytes(bytes); - } - - var bytesInBuffer = parseInt(BUFFER_SIZE/bytes); - var threshold = parseInt(bytesInBuffer*0.85); - - if (!threshold) { - return crypto.randomBytes(bytes); - } - - if (this.bytesBufferIndex == null) { - this.bytesBufferIndex = -1; - } - - if (this.bytesBufferIndex == bytesInBuffer) { - this.bytesBuffer = null; - this.bytesBufferIndex = -1; - } - - // No buffered bytes available or index above threshold - if (this.bytesBufferIndex == -1 || this.bytesBufferIndex > threshold) { - - if (!this.isGeneratingBytes) { - this.isGeneratingBytes = true; - crypto.randomBytes(BUFFER_SIZE, function(err, bytes) { - self.bytesBuffer = bytes; - self.bytesBufferIndex = 0; - self.isGeneratingBytes = false; - }); - } - - // Fall back to sync call when no buffered bytes are available - if (this.bytesBufferIndex == -1) { - return crypto.randomBytes(bytes); - } - } - - var result = this.bytesBuffer.slice(bytes*this.bytesBufferIndex, bytes*(this.bytesBufferIndex+1)); - this.bytesBufferIndex++; - - return result; -} - -/** - * Generates a base64 id - * - * (Original version from socket.io ) - */ - -Base64Id.prototype.generateId = function () { - var rand = new Buffer(15); // multiple of 3 for base64 - if (!rand.writeInt32BE) { - return Math.abs(Math.random() * Math.random() * Date.now() | 0).toString() - + Math.abs(Math.random() * Math.random() * Date.now() | 0).toString(); - } - this.sequenceNumber = (this.sequenceNumber + 1) | 0; - rand.writeInt32BE(this.sequenceNumber, 11); - if (crypto.randomBytes) { - this.getRandomBytes(12).copy(rand); - } else { - // not secure for node 0.4 - [0, 4, 8].forEach(function(i) { - rand.writeInt32BE(Math.random() * Math.pow(2, 32) | 0, i); - }); - } - return rand.toString('base64').replace(/\//g, '_').replace(/\+/g, '-'); -}; - -/** - * Export - */ - -exports = module.exports = new Base64Id(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/base64id/package.json b/node_modules/karma/node_modules/socket.io/node_modules/base64id/package.json deleted file mode 100644 index cbf12981..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/base64id/package.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "name": "base64id", - "version": "0.1.0", - "description": "Generates a base64 id", - "author": { - "name": "Kristian Faeldt", - "email": "faeldt_kristian@cyberagent.co.jp" - }, - "repository": { - "type": "git", - "url": "https://github.com/faeldt/base64id.git" - }, - "main": "./lib/base64id.js", - "engines": { - "node": ">= 0.4.0" - }, - "readme": "base64id\n========\n\nNode.js module that generates a base64 id.\n\nUses crypto.randomBytes when available, falls back to unsafe methods for node.js <= 0.4.\n\nTo increase performance, random bytes are buffered to minimize the number of synchronous calls to crypto.randomBytes.\n\n## Installation\n\n $ npm install mongoose\n\n## Usage\n\n var base64id = require('base64id');\n\n var id = base64id.generateId();\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/faeldt/base64id/issues" - }, - "homepage": "https://github.com/faeldt/base64id", - "_id": "base64id@0.1.0", - "_from": "base64id@0.1.0" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/.npmignore deleted file mode 100644 index b512c09d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/LICENSE b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/LICENSE deleted file mode 100644 index bdb8f617..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2011 Arnout Kazemier,3rd-Eden - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/Makefile b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/Makefile deleted file mode 100644 index 1362d66a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -doc: - dox --title "FlashPolicyFileServer" lib/* > doc/index.html - -test: - expresso -I lib $(TESTFLAGS) tests/*.test.js - -.PHONY: test doc \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/README.md b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/README.md deleted file mode 100644 index 527921ee..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/README.md +++ /dev/null @@ -1,98 +0,0 @@ -## LOL, WUT? -It basically allows you to allow or disallow Flash Player sockets from accessing your site. - -## Installation - -```bash -npm install policyfile -``` -## Usage - -The server is based on the regular and know `net` and `http` server patterns. So it you can just listen -for all the events that a `net` based server emits etc. But there is one extra event, the `connect_failed` -event. This event is triggered when we are unable to listen on the supplied port number. - -### createServer -Creates a new server instance and accepts 2 optional arguments: - -- `options` **Object** Options to configure the server instance - - `log` **Boolean** Enable logging to STDOUT and STDERR (defaults to true) -- `origins` **Array** An Array of origins that are allowed by the server (defaults to *:*) - -```js -var pf = require('policyfile'); -pf.createServer(); -pf.listen(); -``` - -#### server.listen -Start listening on the server and it takes 3 optional arguments - -- `port` **Number** On which port number should we listen? (defaults to 843, which is the first port number the FlashPlayer checks) -- `server` **Server** A http server, if we are unable to accept requests or run the server we can also answer the policy requests inline over the supplied HTTP server. -- `callback` **Function** A callback function that is called when listening to the server was successful. - -```js -var pf = require('policyfile'); -pf.createServer(); -pf.listen(1337, function(){ - console.log(':3 yay') -}); -``` - -Changing port numbers can be handy if you do not want to run your server as root and have port 843 forward to a non root port number (aka a number above 1024). - -```js -var pf = require('policyfile') - , http = require('http'); - -server = http.createServer(function(q,r){r.writeHead(200);r.end('hello world')}); -server.listen(80); - -pf.createServer(); -pf.listen(1337, server, function(){ - console.log(':3 yay') -}); -``` - -Support for serving inline requests over a existing HTTP connection as the FlashPlayer will first check port 843, but if it's unable to get a response there it will send a policy file request over port 80, which is usually your http server. - -#### server.add -Adds more origins to the policy file you can add as many arguments as you like. - -```js -var pf = require('policyfile'); -pf.createServer(['google.com:80']); -pf.listen(); -pf.add('blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080'); // now has 3 origins -``` - -#### server.add -Adds more origins to the policy file you can add as many arguments as you like. - -```js -var pf = require('policyfile'); -pf.createServer(['blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080']); -pf.listen(); -pf.remove('blog.3rd-Eden.com:8080'); // only contains the :80 version now -``` - -#### server.close -Shuts down the server - -```js -var pf = require('policyfile'); -pf.createServer(); -pf.listen(); -pf.close(); // OH NVM. -``` - -## API -http://3rd-eden.com/FlashPolicyFileServer/ - -## Examples -See https://github.com/3rd-Eden/FlashPolicyFileServer/tree/master/examples for examples - -## Licence - -MIT see LICENSE file in the repository \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/doc/index.html b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/doc/index.html deleted file mode 100644 index 743fcdaf..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/doc/index.html +++ /dev/null @@ -1,375 +0,0 @@ - - - FlashPolicyFileServer - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    FlashPolicyFileServer

    server

    lib/server.js
    -

    Module dependencies and cached references. -

    -
    -
    var slice = Array.prototype.slice
    -  , net = require('net');
    -
    -

    The server that does the Policy File severing

    - -

    Options

    - -
    • log false or a function that can output log information, defaults to console.log?
    - -

    - -
    • param: Object options Options to customize the servers functionality.

    • param: Array origins The origins that are allowed on this server, defaults to *:*.

    • api: public

    -
    -
    function Server(options, origins){
    -  var me = this;
    -  
    -  this.origins = origins || ['*:*'];
    -  this.port = 843;
    -  this.log = console.log;
    -  
    -  // merge `this` with the options
    -  Object.keys(options).forEach(function(key){
    -    me[key] &amp;&amp; (me[key] = options[key])
    -  });
    -  
    -  // create the net server
    -  this.socket = net.createServer(function createServer(socket){
    -    socket.on('error', function socketError(){ me.responder.call(me, socket) });
    -    me.responder.call(me, socket);
    -  });
    -  
    -  // Listen for errors as the port might be blocked because we do not have root priv.
    -  this.socket.on('error', function serverError(err){
    -    // Special and common case error handling
    -    if (err.errno == 13){
    -      me.log &amp;&amp; me.log(
    -        'Unable to listen to port `' + me.port + '` as your Node.js instance does not have root privileges. ' +
    -        (
    -          me.server
    -          ? 'The Flash Policy file will now be served inline over the supplied HTTP server, Flash Policy files request will suffer.'
    -          : 'No fallback server supplied.'
    -        )
    -      );
    -      
    -      me.socket.removeAllListeners();
    -      delete me.socket;
    -
    -      me.emit('connect_failed', err);
    -    } else {
    -      me.log &amp;&amp; me.log('FlashPolicyFileServer received a error event:\n' + (err.message ? err.message : err));
    -    }
    -  });
    -  
    -  this.socket.on('timeout', function serverTimeout(){});
    -  this.socket.on('close', function serverClosed(err){
    -    err &amp;&amp; me.log &amp;&amp; me.log('Server closing due to an error: \n' + (err.message ? err.message : err));
    -    
    -    if (me.server){
    -      // not online anymore
    -      delete me.server.online;
    -      
    -      // Remove the inline policy listener if we close down
    -      // but only when the server was `online` (see listen prototype)
    -      if( me.server['@'] &amp;&amp; me.server.online){
    -        me.server.removeListener('connection', me.server['@']);
    -      }
    -    }
    -    me.log &amp;&amp; me.log('Shutting down FlashPolicyFileServer');
    -  });
    -  
    -  // Compile the initial `buffer`
    -  this.compile();
    -}
    -
    -

    Start listening for requests

    - -

    - -
    • param: Number port The port number it should be listening to.

    • param: Server server A HTTP server instance, this will be used to listen for inline requests

    • param: Function cb The callback needs to be called once server is ready

    • api: public

    -
    -
    Server.prototype.listen = function listen(port, server, cb){
    -  var me = this
    -    , args = slice.call(arguments, 0)
    -    , callback;
    -  
    -  // assign the correct vars, for flexible arguments
    -  args.forEach(function args(arg){
    -    var type = typeof arg;
    -    
    -    if (type === 'number') me.port = arg;
    -    if (type === 'function') callback = arg;
    -    if (type === 'object') me.server = arg;
    -  });
    -  
    -  if (this.server){
    -    
    -    // no one in their right mind would ever create a `@` prototype, so Im just gonna store
    -    // my function on the server, so I can remove it later again once the server(s) closes
    -    this.server['@'] = function connection(socket){
    -      socket.once('data', function requestData(data){
    -        // if it's a Flash policy request, and we can write to the 
    -        if (
    -             data
    -          &amp;&amp; data[0] === 60
    -          &amp;&amp; data.toString() === '<policy-file-request/>\0'
    -          &amp;&amp; socket
    -          &amp;&amp; (socket.readyState === 'open' || socket.readyState === 'writeOnly')
    -        ){
    -          // send the buffer
    -          socket.end(me.buffer);
    -        }
    -      });
    -    };
    -    // attach it
    -    this.server.on('connection', this.server['@']);
    -  }
    -  
    -  // We add a callback method, so we can set a flag for when the server is `enabled` or `online`.
    -  // this flag is needed because if a error occurs and the we cannot boot up the server the
    -  // fallback functionality should not be removed during the `close` event
    -  this.socket.listen(this.port, function serverListening(){
    -   me.socket.online = true;
    -   
    -   if (callback) callback(), callback = undefined;
    -   
    -  });
    -  
    -  return this;
    -};
    -
    -

    Adds a new origin to the Flash Policy File.

    - -

    - -
    • param: Arguments The origins that need to be added.

    • api: public

    -
    -
    Server.prototype.add = function add(){
    -  var args = slice.call(arguments, 0)
    -    , i = args.length;
    -  
    -  // flag duplicates
    -  while (i--){
    -    if (this.origins.indexOf(args[i]) &gt;= 0){
    -      args[i] = null;
    -    }
    -  }
    -  
    -  // Add all the arguments to the array
    -  // but first we want to remove all `falsy` values from the args
    -  Array.prototype.push.apply(
    -    this.origins
    -  , args.filter(function(value){ return !!value })
    -  );
    -  
    -  this.compile();
    -  return this;
    -};
    -
    -

    Removes a origin from the Flash Policy File.

    - -

    - -
    • param: String origin The origin that needs to be removed from the server

    • api: public

    -
    -
    Server.prototype.remove = function remove(origin){
    -  var position = this.origins.indexOf(origin);
    -  
    -  // only remove and recompile if we have a match
    -  if (position &gt; 0){
    -    this.origins.splice(position,1);
    -    this.compile();
    -  }
    -  
    -  return this;
    -};
    -
    -

    Closes and cleans up the server

    - -
    • api: public

    -
    -
    Server.prototype.close = function close(){
    -  this.socket.removeAllListeners();
    -  this.socket.close();
    -  
    -  return this;
    -};
    -
    -

    Proxy the event listener requests to the created Net server -

    -
    -
    Object.keys(process.EventEmitter.prototype).forEach(function proxy(key){
    -  Server.prototype[key] = Server.prototype[key] || function (){
    -    if (this.socket) this.socket[key].apply(this.socket, arguments);
    -    return this;
    -  };
    -});
    -
    -

    Creates a new server instance.

    - -

    - -
    • param: Object options A options object to override the default config

    • param: Array origins The origins that should be allowed by the server

    • api: public

    -
    -
    exports.createServer = function createServer(options, origins){
    -  origins = Array.isArray(origins) ? origins : (Array.isArray(options) ? options : false);
    -  options = !Array.isArray(options) &amp;&amp; options ? options : {};
    -  
    -  return new Server(options, origins);
    -};
    -
    -

    Provide a hook to the original server, so it can be extended if needed. -

    -
    -
    exports.Server = Server;
    -
    -

    Module version -

    -
    -
    exports.version = '0.0.2';
    -
    -
    \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js deleted file mode 100644 index b439449a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/examples/basic.fallback.js +++ /dev/null @@ -1,8 +0,0 @@ -var http = require('http') - , fspfs = require('../'); - -var server = http.createServer(function(q,r){ r.writeHead(200); r.end(':3') }) - , flash = fspfs.createServer(); - -server.listen(8080); -flash.listen(8081,server); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/examples/basic.js b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/examples/basic.js deleted file mode 100644 index 5e2290f7..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/examples/basic.js +++ /dev/null @@ -1,5 +0,0 @@ -var http = require('http') - , fspfs = require('../'); - -var flash = fspfs.createServer(); -flash.listen(); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/index.js b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/index.js deleted file mode 100644 index 60cf2989..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/index.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('./lib/server.js'); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/lib/server.js b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/lib/server.js deleted file mode 100644 index a525772b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/lib/server.js +++ /dev/null @@ -1,289 +0,0 @@ -/** - * Module dependencies and cached references. - */ - -var slice = Array.prototype.slice - , net = require('net'); - -/** - * The server that does the Policy File severing - * - * Options: - * - `log` false or a function that can output log information, defaults to console.log? - * - * @param {Object} options Options to customize the servers functionality. - * @param {Array} origins The origins that are allowed on this server, defaults to `*:*`. - * @api public - */ - -function Server (options, origins) { - var me = this; - - this.origins = origins || ['*:*']; - this.port = 843; - this.log = console.log; - - // merge `this` with the options - Object.keys(options).forEach(function (key) { - me[key] && (me[key] = options[key]) - }); - - // create the net server - this.socket = net.createServer(function createServer (socket) { - socket.on('error', function socketError () { - me.responder.call(me, socket); - }); - - me.responder.call(me, socket); - }); - - // Listen for errors as the port might be blocked because we do not have root priv. - this.socket.on('error', function serverError (err) { - // Special and common case error handling - if (err.errno == 13) { - me.log && me.log( - 'Unable to listen to port `' + me.port + '` as your Node.js instance does not have root privileges. ' + - ( - me.server - ? 'The Flash Policy File requests will only be served inline over the supplied HTTP server. Inline serving is slower than a dedicated server instance.' - : 'No fallback server supplied, we will be unable to answer Flash Policy File requests.' - ) - ); - - me.emit('connect_failed', err); - me.socket.removeAllListeners(); - delete me.socket; - } else { - me.log && me.log('FlashPolicyFileServer received an error event:\n' + (err.message ? err.message : err)); - } - }); - - this.socket.on('timeout', function serverTimeout () {}); - this.socket.on('close', function serverClosed (err) { - err && me.log && me.log('Server closing due to an error: \n' + (err.message ? err.message : err)); - - if (me.server) { - // Remove the inline policy listener if we close down - // but only when the server was `online` (see listen prototype) - if (me.server['@'] && me.server.online) { - me.server.removeListener('connection', me.server['@']); - } - - // not online anymore - delete me.server.online; - } - }); - - // Compile the initial `buffer` - this.compile(); -} - -/** - * Start listening for requests - * - * @param {Number} port The port number it should be listening to. - * @param {Server} server A HTTP server instance, this will be used to listen for inline requests - * @param {Function} cb The callback needs to be called once server is ready - * @api public - */ - -Server.prototype.listen = function listen (port, server, cb){ - var me = this - , args = slice.call(arguments, 0) - , callback; - - // assign the correct vars, for flexible arguments - args.forEach(function args (arg){ - var type = typeof arg; - - if (type === 'number') me.port = arg; - if (type === 'function') callback = arg; - if (type === 'object') me.server = arg; - }); - - if (this.server) { - - // no one in their right mind would ever create a `@` prototype, so Im just gonna store - // my function on the server, so I can remove it later again once the server(s) closes - this.server['@'] = function connection (socket) { - socket.once('data', function requestData (data) { - // if it's a Flash policy request, and we can write to the - if ( - data - && data[0] === 60 - && data.toString() === '\0' - && socket - && (socket.readyState === 'open' || socket.readyState === 'writeOnly') - ){ - // send the buffer - try { - socket.end(me.buffer); - } catch (e) {} - } - }); - }; - - // attach it - this.server.on('connection', this.server['@']); - } - - // We add a callback method, so we can set a flag for when the server is `enabled` or `online`. - // this flag is needed because if a error occurs and the we cannot boot up the server the - // fallback functionality should not be removed during the `close` event - this.port >= 0 && this.socket.listen(this.port, function serverListening () { - me.socket.online = true; - if (callback) { - callback.call(me); - callback = undefined; - } - }); - - return this; -}; - -/** - * Responds to socket connects and writes the compile policy file. - * - * @param {net.Socket} socket The socket that needs to receive the message - * @api private - */ - -Server.prototype.responder = function responder (socket){ - if (socket && socket.readyState == 'open' && socket.end) { - try { - socket.end(this.buffer); - } catch (e) {} - } -}; - -/** - * Compiles the supplied origins to a Flash Policy File format and stores it in a Node.js Buffer - * this way it can be send over the wire without any performance loss. - * - * @api private - */ - -Server.prototype.compile = function compile (){ - var xml = [ - '' - , '' - , '' - ]; - - // add the allow access element - this.origins.forEach(function origin (origin){ - var parts = origin.split(':'); - xml.push(''); - }); - - xml.push(''); - - // store the result in a buffer so we don't have to re-generate it all the time - this.buffer = new Buffer(xml.join(''), 'utf8'); - - return this; -}; - -/** - * Adds a new origin to the Flash Policy File. - * - * @param {Arguments} The origins that need to be added. - * @api public - */ - -Server.prototype.add = function add(){ - var args = slice.call(arguments, 0) - , i = args.length; - - // flag duplicates - while (i--) { - if (this.origins.indexOf(args[i]) >= 0){ - args[i] = null; - } - } - - // Add all the arguments to the array - // but first we want to remove all `falsy` values from the args - Array.prototype.push.apply( - this.origins - , args.filter(function filter (value) { - return !!value; - }) - ); - - this.compile(); - return this; -}; - -/** - * Removes a origin from the Flash Policy File. - * - * @param {String} origin The origin that needs to be removed from the server - * @api public - */ - -Server.prototype.remove = function remove (origin){ - var position = this.origins.indexOf(origin); - - // only remove and recompile if we have a match - if (position > 0) { - this.origins.splice(position,1); - this.compile(); - } - - return this; -}; - -/** - * Closes and cleans up the server - * - * @api public - */ - -Server.prototype.close = function close () { - this.socket.removeAllListeners(); - this.socket.close(); - - return this; -}; - -/** - * Proxy the event listener requests to the created Net server - */ - -Object.keys(process.EventEmitter.prototype).forEach(function proxy (key){ - Server.prototype[key] = Server.prototype[key] || function () { - if (this.socket) { - this.socket[key].apply(this.socket, arguments); - } - - return this; - }; -}); - -/** - * Creates a new server instance. - * - * @param {Object} options A options object to override the default config - * @param {Array} origins The origins that should be allowed by the server - * @api public - */ - -exports.createServer = function createServer(options, origins){ - origins = Array.isArray(origins) ? origins : (Array.isArray(options) ? options : false); - options = !Array.isArray(options) && options ? options : {}; - - return new Server(options, origins); -}; - -/** - * Provide a hook to the original server, so it can be extended if needed. - */ - -exports.Server = Server; - -/** - * Module version - */ - -exports.version = '0.0.4'; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/package.json b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/package.json deleted file mode 100644 index 2b12e88c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/package.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "policyfile", - "version": "0.0.4", - "author": { - "name": "Arnout Kazemier" - }, - "description": "Flash Socket Policy File Server. A server to respond to Flash Socket Policy requests, both inline and through a dedicated server instance.", - "main": "index", - "keywords": [ - "flash", - "socket", - "policy", - "file", - "server", - "Flash Socket Policy File Server", - "cross domain" - ], - "directories": { - "lib": "./lib" - }, - "maintainers": [ - { - "name": "Arnout Kazemier", - "email": "info@3rd-Eden.com", - "url": "http://blog.3rd-Eden.com" - } - ], - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer/blob/master/LICENSE" - } - ], - "repositories": [ - { - "type": "git", - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer.git" - } - ], - "readme": "## LOL, WUT?\nIt basically allows you to allow or disallow Flash Player sockets from accessing your site.\n\n## Installation\n\n```bash\nnpm install policyfile\n```\n## Usage\n\nThe server is based on the regular and know `net` and `http` server patterns. So it you can just listen\nfor all the events that a `net` based server emits etc. But there is one extra event, the `connect_failed`\nevent. This event is triggered when we are unable to listen on the supplied port number.\n\n### createServer\nCreates a new server instance and accepts 2 optional arguments:\n\n- `options` **Object** Options to configure the server instance\n - `log` **Boolean** Enable logging to STDOUT and STDERR (defaults to true)\n- `origins` **Array** An Array of origins that are allowed by the server (defaults to *:*)\n\n```js\nvar pf = require('policyfile');\npf.createServer();\npf.listen();\n```\n\n#### server.listen\nStart listening on the server and it takes 3 optional arguments\n\n- `port` **Number** On which port number should we listen? (defaults to 843, which is the first port number the FlashPlayer checks)\n- `server` **Server** A http server, if we are unable to accept requests or run the server we can also answer the policy requests inline over the supplied HTTP server.\n- `callback` **Function** A callback function that is called when listening to the server was successful.\n\n```js\nvar pf = require('policyfile');\npf.createServer();\npf.listen(1337, function(){\n console.log(':3 yay')\n});\n```\n\nChanging port numbers can be handy if you do not want to run your server as root and have port 843 forward to a non root port number (aka a number above 1024).\n\n```js\nvar pf = require('policyfile')\n , http = require('http');\n\nserver = http.createServer(function(q,r){r.writeHead(200);r.end('hello world')});\nserver.listen(80);\n\npf.createServer();\npf.listen(1337, server, function(){\n console.log(':3 yay')\n});\n```\n\nSupport for serving inline requests over a existing HTTP connection as the FlashPlayer will first check port 843, but if it's unable to get a response there it will send a policy file request over port 80, which is usually your http server.\n\n#### server.add\nAdds more origins to the policy file you can add as many arguments as you like.\n\n```js\nvar pf = require('policyfile');\npf.createServer(['google.com:80']);\npf.listen();\npf.add('blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080'); // now has 3 origins\n```\n\n#### server.add\nAdds more origins to the policy file you can add as many arguments as you like.\n\n```js\nvar pf = require('policyfile');\npf.createServer(['blog.3rd-Eden.com:80', 'blog.3rd-Eden.com:8080']);\npf.listen();\npf.remove('blog.3rd-Eden.com:8080'); // only contains the :80 version now\n```\n\n#### server.close\nShuts down the server\n\n```js\nvar pf = require('policyfile');\npf.createServer();\npf.listen();\npf.close(); // OH NVM.\n```\n\n## API\nhttp://3rd-eden.com/FlashPolicyFileServer/\n\n## Examples\nSee https://github.com/3rd-Eden/FlashPolicyFileServer/tree/master/examples for examples\n\n## Licence\n\nMIT see LICENSE file in the repository", - "readmeFilename": "README.md", - "repository": { - "type": "git", - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer.git" - }, - "bugs": { - "url": "https://github.com/3rd-Eden/FlashPolicyFileServer/issues" - }, - "homepage": "https://github.com/3rd-Eden/FlashPolicyFileServer", - "_id": "policyfile@0.0.4", - "_from": "policyfile@0.0.4" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt deleted file mode 100644 index 5883cd44..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDXTCCAkWgAwIBAgIJAMUSOvlaeyQHMA0GCSqGSIb3DQEBBQUAMEUxCzAJBgNV -BAYTAkFVMRMwEQYDVQQIDApTb21lLVN0YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBX -aWRnaXRzIFB0eSBMdGQwHhcNMTAxMTE2MDkzMjQ5WhcNMTMxMTE1MDkzMjQ5WjBF -MQswCQYDVQQGEwJBVTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50 -ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB -CgKCAQEAz+LXZOjcQCJq3+ZKUFabj71oo/ex/XsBcFqtBThjjTw9CVEVwfPQQp4X -wtPiB204vnYXwQ1/R2NdTQqCZu47l79LssL/u2a5Y9+0NEU3nQA5qdt+1FAE0c5o -exPimXOrR3GWfKz7PmZ2O0117IeCUUXPG5U8umhDe/4mDF4ZNJiKc404WthquTqg -S7rLQZHhZ6D0EnGnOkzlmxJMYPNHSOY1/6ivdNUUcC87awNEA3lgfhy25IyBK3QJ -c+aYKNTbt70Lery3bu2wWLFGtmNiGlQTS4JsxImRsECTI727ObS7/FWAQsqW+COL -0Sa5BuMFrFIpjPrEe0ih7vRRbdmXRwIDAQABo1AwTjAdBgNVHQ4EFgQUDnV4d6mD -tOnluLoCjkUHTX/n4agwHwYDVR0jBBgwFoAUDnV4d6mDtOnluLoCjkUHTX/n4agw -DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOCAQEAFwV4MQfTo+qMv9JMiyno -IEiqfOz4RgtmBqRnXUffcjS2dhc7/z+FPZnM79Kej8eLHoVfxCyWRHFlzm93vEdv -wxOCrD13EDOi08OOZfxWyIlCa6Bg8cMAKqQzd2OvQOWqlRWBTThBJIhWflU33izX -Qn5GdmYqhfpc+9ZHHGhvXNydtRQkdxVK2dZNzLBvBlLlRmtoClU7xm3A+/5dddeP -AQHEPtyFlUw49VYtZ3ru6KqPms7MKvcRhYLsy9rwSfuuniMlx4d0bDR7TOkw0QQS -A0N8MGQRQpzl4mw4jLzyM5d5QtuGBh2P6hPGa0YQxtI3RPT/p6ENzzBiAKXiSfzo -xw== ------END CERTIFICATE----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key deleted file mode 100644 index f31ff3d9..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/ssl/ssl.private.key +++ /dev/null @@ -1,27 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIEowIBAAKCAQEAz+LXZOjcQCJq3+ZKUFabj71oo/ex/XsBcFqtBThjjTw9CVEV -wfPQQp4XwtPiB204vnYXwQ1/R2NdTQqCZu47l79LssL/u2a5Y9+0NEU3nQA5qdt+ -1FAE0c5oexPimXOrR3GWfKz7PmZ2O0117IeCUUXPG5U8umhDe/4mDF4ZNJiKc404 -WthquTqgS7rLQZHhZ6D0EnGnOkzlmxJMYPNHSOY1/6ivdNUUcC87awNEA3lgfhy2 -5IyBK3QJc+aYKNTbt70Lery3bu2wWLFGtmNiGlQTS4JsxImRsECTI727ObS7/FWA -QsqW+COL0Sa5BuMFrFIpjPrEe0ih7vRRbdmXRwIDAQABAoIBAGe4+9VqZfJN+dsq -8Osyuz01uQ8OmC0sAWTIqUlQgENIyf9rCJsUBlYmwR5BT6Z69XP6QhHdpSK+TiAR -XUz0EqG9HYzcxHIBaACP7j6iRoQ8R4kbbiWKo0z3WqQGIOqFjvD/mKEuQdE5mEYw -eOUCG6BnX1WY2Yr8WKd2AA/tp0/Y4d8z04u9eodMpSTbHTzYMJb5SbBN1vo6FY7q -8zSuO0BMzXlAxUsCwHsk1GQHFr8Oh3zIR7bQGtMBouI+6Lhh7sjFYsfxJboqMTBV -IKaA216M6ggHG7MU1/jeKcMGDmEfqQLQoyWp29rMK6TklUgipME2L3UD7vTyAVzz -xbVOpZkCgYEA8CXW4sZBBrSSrLR5SB+Ubu9qNTggLowOsC/kVKB2WJ4+xooc5HQo -mFhq1v/WxPQoWIxdYsfg2odlL+JclK5Qcy6vXmRSdAQ5lK9gBDKxZSYc3NwAw2HA -zyHCTK+I0n8PBYQ+yGcrxu0WqTGnlLW+Otk4CejO34WlgHwbH9bbY5UCgYEA3ZvT -C4+OoMHXlmICSt29zUrYiL33IWsR3/MaONxTEDuvgkOSXXQOl/8Ebd6Nu+3WbsSN -bjiPC/JyL1YCVmijdvFpl4gjtgvfJifs4G+QHvO6YfsYoVANk4u6g6rUuBIOwNK4 -RwYxwDc0oysp+g7tPxoSgDHReEVKJNzGBe9NGGsCgYEA4O4QP4gCEA3B9BF2J5+s -n9uPVxmiyvZUK6Iv8zP4pThTBBMIzNIf09G9AHPQ7djikU2nioY8jXKTzC3xGTHM -GJZ5m6fLsu7iH+nDvSreDSeNkTBfZqGAvoGYQ8uGE+L+ZuRfCcXYsxIOT5s6o4c3 -Dle2rVFpsuKzCY00urW796ECgYBn3go75+xEwrYGQSer6WR1nTgCV29GVYXKPooy -zmmMOT1Yw80NSkEw0pFD4cTyqVYREsTrPU0mn1sPfrOXxnGfZSVFpcR/Je9QVfQ7 -eW7GYxwfom335aqHVj10SxRqteP+UoWWnHujCPz94VRKZMakBddYCIGSan+G6YdS -7sdmwwKBgBc2qj0wvGXDF2kCLwSGfWoMf8CS1+5fIiUIdT1e/+7MfDdbmLMIFVjF -QKS3zVViXCbrG5SY6wS9hxoc57f6E2A8vcaX6zy2xkZlGHQCpWRtEM5R01OWJQaH -HsHMmQZGUQVoDm1oRkDhrTFK4K3ukc3rAxzeTZ96utOQN8/KJsTv ------END RSA PRIVATE KEY----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/unit.test.js b/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/unit.test.js deleted file mode 100644 index 932b3c14..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/policyfile/tests/unit.test.js +++ /dev/null @@ -1,231 +0,0 @@ -var fspfs = require('../') - , fs = require('fs') - , http = require('http') - , https = require('https') - , net = require('net') - , should = require('should') - , assert = require('assert'); - -module.exports = { - // Library version should be Semver compatible - 'Library version': function(){ - fspfs.version.should.match(/^\d+\.\d+\.\d+$/); - } - - // Creating a server instace should not cause any problems - // either using the new Server or createServer method. -, 'Create Server instance': function(){ - var server = fspfs.createServer() - , server2 = new fspfs.Server({log:false}, ['blog.3rd-Eden.com:1337']); - - // server 2 options test - server2.log.should.be.false; - server2.origins.length.should.equal(1); - server2.origins[0].should.equal('blog.3rd-Eden.com:1337'); - - // server defaults - (typeof server.log).should.be.equal('function'); - server.origins.length.should.equal(1); - server.origins[0].should.equal('*:*'); - - // instance checking, sanity check - assert.ok(server instanceof fspfs.Server); - assert.ok(!!server.buffer); - - // more options testing - server = fspfs.createServer(['blog.3rd-Eden.com:80']); - server.origins.length.should.equal(1); - server.origins[0].should.equal('blog.3rd-Eden.com:80'); - - server = fspfs.createServer({log:false},['blog.3rd-Eden.com:80']); - server.log.should.be.false; - server.origins.length.should.equal(1); - server.origins[0].should.equal('blog.3rd-Eden.com:80'); - - } - -, 'Add origin': function(){ - var server = fspfs.createServer(); - server.add('google.com:80', 'blog.3rd-Eden.com:1337'); - - server.origins.length.should.equal(3); - server.origins.indexOf('google.com:80').should.be.above(0); - - // don't allow duplicates - server.add('google.com:80', 'google.com:80'); - - var i = server.origins.length - , count = 0; - - while(i--){ - if (server.origins[i] === 'google.com:80'){ - count++; - } - } - - count.should.equal(1); - } - -, 'Remove origin': function(){ - var server = fspfs.createServer(); - server.add('google.com:80', 'blog.3rd-Eden.com:1337'); - server.origins.length.should.equal(3); - - server.remove('google.com:80'); - server.origins.length.should.equal(2); - server.origins.indexOf('google.com:80').should.equal(-1); - } - -, 'Buffer': function(){ - var server = fspfs.createServer(); - - Buffer.isBuffer(server.buffer).should.be.true; - server.buffer.toString().indexOf('to-ports="*"').should.be.above(0); - server.buffer.toString().indexOf('domain="*"').should.be.above(0); - server.buffer.toString().indexOf('domain="google.com"').should.equal(-1); - - // The buffers should be rebuild when new origins are added - server.add('google.com:80'); - server.buffer.toString().indexOf('to-ports="80"').should.be.above(0); - server.buffer.toString().indexOf('domain="google.com"').should.be.above(0); - - server.remove('google.com:80'); - server.buffer.toString().indexOf('to-ports="80"').should.equal(-1); - server.buffer.toString().indexOf('domain="google.com"').should.equal(-1); - } - -, 'Responder': function(){ - var server = fspfs.createServer() - , calls = 0 - // dummy socket to emulate a `real` socket - , dummySocket = { - readyState: 'open' - , end: function(buffer){ - calls++; - Buffer.isBuffer(buffer).should.be.true; - buffer.toString().should.equal(server.buffer.toString()); - } - }; - - server.responder(dummySocket); - calls.should.equal(1); - } - -, 'Event proxy': function(){ - var server = fspfs.createServer() - , calls = 0; - - Object.keys(process.EventEmitter.prototype).forEach(function proxy(key){ - assert.ok(!!server[key] && typeof server[key] === 'function'); - }); - - // test if it works by calling a none default event - server.on('pew', function(){ - calls++; - }); - - server.emit('pew'); - calls.should.equal(1); - } - -, 'inline response http': function(){ - var port = 1335 - , httpserver = http.createServer(function(q,r){r.writeHead(200);r.end(':3')}) - , server = fspfs.createServer(); - - httpserver.listen(port, function(){ - server.listen(port + 1, httpserver, function(){ - var client = net.createConnection(port); - client.write('\0'); - client.on('error', function(err){ - assert.ok(!err, err) - }); - client.on('data', function(data){ - - var response = data.toString(); - console.log(response); - - response.indexOf('to-ports="*"').should.be.above(0); - response.indexOf('domain="*"').should.be.above(0); - response.indexOf('domain="google.com"').should.equal(-1); - - // clean up - client.destroy(); - server.close(); - httpserver.close(); - }); - }); - }); - } - -, 'server response': function(){ - var port = 1340 - , server = fspfs.createServer(); - - server.listen(port, function(){ - var client = net.createConnection(port); - client.write('\0'); - client.on('error', function(err){ - assert.ok(!err, err) - }); - client.on('data', function(data){ - - var response = data.toString(); - - response.indexOf('to-ports="*"').should.be.above(0); - response.indexOf('domain="*"').should.be.above(0); - response.indexOf('domain="google.com"').should.equal(-1); - - // clean up - client.destroy(); - server.close(); - }); - }); - } - -, 'inline response https': function(){ - var port = 1345 - , ssl = { - key: fs.readFileSync(__dirname + '/ssl/ssl.private.key').toString() - , cert: fs.readFileSync(__dirname + '/ssl/ssl.crt').toString() - } - , httpserver = https.createServer(ssl, function(q,r){r.writeHead(200);r.end(':3')}) - , server = fspfs.createServer(); - - httpserver.listen(port, function(){ - server.listen(port + 1, httpserver, function(){ - var client = net.createConnection(port); - client.write('\0'); - client.on('error', function(err){ - assert.ok(!err, err) - }); - client.on('data', function(data){ - - var response = data.toString(); - - response.indexOf('to-ports="*"').should.be.above(0); - response.indexOf('domain="*"').should.be.above(0); - response.indexOf('domain="google.com"').should.equal(-1); - - // clean up - client.destroy(); - server.close(); - httpserver.close(); - }); - }); - }); - } - -, 'connect_failed': function(){ - var server = fspfs.createServer(); - - server.on('connect_failed', function(){ - assert.ok(true); - }); - - server.listen(function(){ - assert.ok(false, 'Run this test without root access'); - server.close(); - }); - } -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/redis/.npmignore deleted file mode 100644 index 3c3629e6..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/.npmignore +++ /dev/null @@ -1 +0,0 @@ -node_modules diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/README.md b/node_modules/karma/node_modules/socket.io/node_modules/redis/README.md deleted file mode 100644 index 46e7018c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/README.md +++ /dev/null @@ -1,691 +0,0 @@ -redis - a node.js redis client -=========================== - -This is a complete Redis client for node.js. It supports all Redis commands, including many recently added commands like EVAL from -experimental Redis server branches. - - -Install with: - - npm install redis - -Pieter Noordhuis has provided a binding to the official `hiredis` C library, which is non-blocking and fast. To use `hiredis`, do: - - npm install hiredis redis - -If `hiredis` is installed, `node_redis` will use it by default. Otherwise, a pure JavaScript parser will be used. - -If you use `hiredis`, be sure to rebuild it whenever you upgrade your version of node. There are mysterious failures that can -happen between node and native code modules after a node upgrade. - - -## Usage - -Simple example, included as `examples/simple.js`: - -```js - var redis = require("redis"), - client = redis.createClient(); - - // if you'd like to select database 3, instead of 0 (default), call - // client.select(3, function() { /* ... */ }); - - client.on("error", function (err) { - console.log("Error " + err); - }); - - client.set("string key", "string val", redis.print); - client.hset("hash key", "hashtest 1", "some value", redis.print); - client.hset(["hash key", "hashtest 2", "some other value"], redis.print); - client.hkeys("hash key", function (err, replies) { - console.log(replies.length + " replies:"); - replies.forEach(function (reply, i) { - console.log(" " + i + ": " + reply); - }); - client.quit(); - }); -``` - -This will display: - - mjr:~/work/node_redis (master)$ node example.js - Reply: OK - Reply: 0 - Reply: 0 - 2 replies: - 0: hashtest 1 - 1: hashtest 2 - mjr:~/work/node_redis (master)$ - - -## Performance - -Here are typical results of `multi_bench.js` which is similar to `redis-benchmark` from the Redis distribution. -It uses 50 concurrent connections with no pipelining. - -JavaScript parser: - - PING: 20000 ops 42283.30 ops/sec 0/5/1.182 - SET: 20000 ops 32948.93 ops/sec 1/7/1.515 - GET: 20000 ops 28694.40 ops/sec 0/9/1.740 - INCR: 20000 ops 39370.08 ops/sec 0/8/1.269 - LPUSH: 20000 ops 36429.87 ops/sec 0/8/1.370 - LRANGE (10 elements): 20000 ops 9891.20 ops/sec 1/9/5.048 - LRANGE (100 elements): 20000 ops 1384.56 ops/sec 10/91/36.072 - -hiredis parser: - - PING: 20000 ops 46189.38 ops/sec 1/4/1.082 - SET: 20000 ops 41237.11 ops/sec 0/6/1.210 - GET: 20000 ops 39682.54 ops/sec 1/7/1.257 - INCR: 20000 ops 40080.16 ops/sec 0/8/1.242 - LPUSH: 20000 ops 41152.26 ops/sec 0/3/1.212 - LRANGE (10 elements): 20000 ops 36563.07 ops/sec 1/8/1.363 - LRANGE (100 elements): 20000 ops 21834.06 ops/sec 0/9/2.287 - -The performance of `node_redis` improves dramatically with pipelining, which happens automatically in most normal programs. - - -### Sending Commands - -Each Redis command is exposed as a function on the `client` object. -All functions take either an `args` Array plus optional `callback` Function or -a variable number of individual arguments followed by an optional callback. -Here is an example of passing an array of arguments and a callback: - - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], function (err, res) {}); - -Here is that same call in the second style: - - client.mset("test keys 1", "test val 1", "test keys 2", "test val 2", function (err, res) {}); - -Note that in either form the `callback` is optional: - - client.set("some key", "some val"); - client.set(["some other key", "some val"]); - -If the key is missing, reply will be null (probably): - - client.get("missingkey", function(err, reply) { - // reply is null when the key is missing - console.log(reply); - }); - -For a list of Redis commands, see [Redis Command Reference](http://redis.io/commands) - -The commands can be specified in uppercase or lowercase for convenience. `client.get()` is the same as `client.GET()`. - -Minimal parsing is done on the replies. Commands that return a single line reply return JavaScript Strings, -integer replies return JavaScript Numbers, "bulk" replies return node Buffers, and "multi bulk" replies return a -JavaScript Array of node Buffers. `HGETALL` returns an Object with Buffers keyed by the hash keys. - -# API - -## Connection Events - -`client` will emit some events about the state of the connection to the Redis server. - -### "ready" - -`client` will emit `ready` a connection is established to the Redis server and the server reports -that it is ready to receive commands. Commands issued before the `ready` event are queued, -then replayed just before this event is emitted. - -### "connect" - -`client` will emit `connect` at the same time as it emits `ready` unless `client.options.no_ready_check` -is set. If this options is set, `connect` will be emitted when the stream is connected, and then -you are free to try to send commands. - -### "error" - -`client` will emit `error` when encountering an error connecting to the Redis server. - -Note that "error" is a special event type in node. If there are no listeners for an -"error" event, node will exit. This is usually what you want, but it can lead to some -cryptic error messages like this: - - mjr:~/work/node_redis (master)$ node example.js - - node.js:50 - throw e; - ^ - Error: ECONNREFUSED, Connection refused - at IOWatcher.callback (net:870:22) - at node.js:607:9 - -Not very useful in diagnosing the problem, but if your program isn't ready to handle this, -it is probably the right thing to just exit. - -`client` will also emit `error` if an exception is thrown inside of `node_redis` for whatever reason. -It would be nice to distinguish these two cases. - -### "end" - -`client` will emit `end` when an established Redis server connection has closed. - -### "drain" - -`client` will emit `drain` when the TCP connection to the Redis server has been buffering, but is now -writable. This event can be used to stream commands in to Redis and adapt to backpressure. Right now, -you need to check `client.command_queue.length` to decide when to reduce your send rate. Then you can -resume sending when you get `drain`. - -### "idle" - -`client` will emit `idle` when there are no outstanding commands that are awaiting a response. - -## redis.createClient(port, host, options) - -Create a new client connection. `port` defaults to `6379` and `host` defaults -to `127.0.0.1`. If you have `redis-server` running on the same computer as node, then the defaults for -port and host are probably fine. `options` in an object with the following possible properties: - -* `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed. -This may also be set to `javascript`. -* `return_buffers`: defaults to `false`. If set to `true`, then all replies will be sent to callbacks as node Buffer -objects instead of JavaScript Strings. -* `detect_buffers`: default to `false`. If set to `true`, then replies will be sent to callbacks as node Buffer objects -if any of the input arguments to the original command were Buffer objects. -This option lets you switch between Buffers and Strings on a per-command basis, whereas `return_buffers` applies to -every command on a client. -* `socket_nodelay`: defaults to `true`. Whether to call setNoDelay() on the TCP stream, which disables the -Nagle algorithm on the underlying socket. Setting this option to `false` can result in additional throughput at the -cost of more latency. Most applications will want this set to `true`. -* `no_ready_check`: defaults to `false`. When a connection is established to the Redis server, the server might still -be loading the database from disk. While loading, the server not respond to any commands. To work around this, -`node_redis` has a "ready check" which sends the `INFO` command to the server. The response from the `INFO` command -indicates whether the server is ready for more commands. When ready, `node_redis` emits a `ready` event. -Setting `no_ready_check` to `true` will inhibit this check. -* `enable_offline_queue`: defaults to `true`. By default, if there is no active -connection to the redis server, commands are added to a queue and are executed -once the connection has been established. Setting `enable_offline_queue` to -`false` will disable this feature and the callback will be execute immediately -with an error, or an error will be thrown if no callback is specified. - -```js - var redis = require("redis"), - client = redis.createClient(null, null, {detect_buffers: true}); - - client.set("foo_rand000000000000", "OK"); - - // This will return a JavaScript String - client.get("foo_rand000000000000", function (err, reply) { - console.log(reply.toString()); // Will print `OK` - }); - - // This will return a Buffer since original key is specified as a Buffer - client.get(new Buffer("foo_rand000000000000"), function (err, reply) { - console.log(reply.toString()); // Will print `` - }); - client.end(); -``` - -`createClient()` returns a `RedisClient` object that is named `client` in all of the examples here. - -## client.auth(password, callback) - -When connecting to Redis servers that require authentication, the `AUTH` command must be sent as the -first command after connecting. This can be tricky to coordinate with reconnections, the ready check, -etc. To make this easier, `client.auth()` stashes `password` and will send it after each connection, -including reconnections. `callback` is invoked only once, after the response to the very first -`AUTH` command sent. -NOTE: Your call to `client.auth()` should not be inside the ready handler. If -you are doing this wrong, `client` will emit an error that looks -something like this `Error: Ready check failed: ERR operation not permitted`. - -## client.end() - -Forcibly close the connection to the Redis server. Note that this does not wait until all replies have been parsed. -If you want to exit cleanly, call `client.quit()` to send the `QUIT` command after you have handled all replies. - -This example closes the connection to the Redis server before the replies have been read. You probably don't -want to do this: - -```js - var redis = require("redis"), - client = redis.createClient(); - - client.set("foo_rand000000000000", "some fantastic value"); - client.get("foo_rand000000000000", function (err, reply) { - console.log(reply.toString()); - }); - client.end(); -``` - -`client.end()` is useful for timeout cases where something is stuck or taking too long and you want -to start over. - -## Friendlier hash commands - -Most Redis commands take a single String or an Array of Strings as arguments, and replies are sent back as a single String or an Array of Strings. -When dealing with hash values, there are a couple of useful exceptions to this. - -### client.hgetall(hash) - -The reply from an HGETALL command will be converted into a JavaScript Object by `node_redis`. That way you can interact -with the responses using JavaScript syntax. - -Example: - - client.hmset("hosts", "mjr", "1", "another", "23", "home", "1234"); - client.hgetall("hosts", function (err, obj) { - console.dir(obj); - }); - -Output: - - { mjr: '1', another: '23', home: '1234' } - -### client.hmset(hash, obj, [callback]) - -Multiple values in a hash can be set by supplying an object: - - client.HMSET(key2, { - "0123456789": "abcdefghij", // NOTE: the key and value must both be strings - "some manner of key": "a type of value" - }); - -The properties and values of this Object will be set as keys and values in the Redis hash. - -### client.hmset(hash, key1, val1, ... keyn, valn, [callback]) - -Multiple values may also be set by supplying a list: - - client.HMSET(key1, "0123456789", "abcdefghij", "some manner of key", "a type of value"); - - -## Publish / Subscribe - -Here is a simple example of the API for publish / subscribe. This program opens two -client connections, subscribes to a channel on one of them, and publishes to that -channel on the other: - -```js - var redis = require("redis"), - client1 = redis.createClient(), client2 = redis.createClient(), - msg_count = 0; - - client1.on("subscribe", function (channel, count) { - client2.publish("a nice channel", "I am sending a message."); - client2.publish("a nice channel", "I am sending a second message."); - client2.publish("a nice channel", "I am sending my last message."); - }); - - client1.on("message", function (channel, message) { - console.log("client1 channel " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.unsubscribe(); - client1.end(); - client2.end(); - } - }); - - client1.incr("did a thing"); - client1.subscribe("a nice channel"); -``` - -When a client issues a `SUBSCRIBE` or `PSUBSCRIBE`, that connection is put into "pub/sub" mode. -At that point, only commands that modify the subscription set are valid. When the subscription -set is empty, the connection is put back into regular mode. - -If you need to send regular commands to Redis while in pub/sub mode, just open another connection. - -## Pub / Sub Events - -If a client has subscriptions active, it may emit these events: - -### "message" (channel, message) - -Client will emit `message` for every message received that matches an active subscription. -Listeners are passed the channel name as `channel` and the message Buffer as `message`. - -### "pmessage" (pattern, channel, message) - -Client will emit `pmessage` for every message received that matches an active subscription pattern. -Listeners are passed the original pattern used with `PSUBSCRIBE` as `pattern`, the sending channel -name as `channel`, and the message Buffer as `message`. - -### "subscribe" (channel, count) - -Client will emit `subscribe` in response to a `SUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. - -### "psubscribe" (pattern, count) - -Client will emit `psubscribe` in response to a `PSUBSCRIBE` command. Listeners are passed the -original pattern as `pattern`, and the new count of subscriptions for this client as `count`. - -### "unsubscribe" (channel, count) - -Client will emit `unsubscribe` in response to a `UNSUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. When -`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted. - -### "punsubscribe" (pattern, count) - -Client will emit `punsubscribe` in response to a `PUNSUBSCRIBE` command. Listeners are passed the -channel name as `channel` and the new count of subscriptions for this client as `count`. When -`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted. - -## client.multi([commands]) - -`MULTI` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by -Redis. The interface in `node_redis` is to return an individual `Multi` object by calling `client.multi()`. - -```js - var redis = require("./index"), - client = redis.createClient(), set_size = 20; - - client.sadd("bigset", "a member"); - client.sadd("bigset", "another member"); - - while (set_size > 0) { - client.sadd("bigset", "member " + set_size); - set_size -= 1; - } - - // multi chain with an individual callback - client.multi() - .scard("bigset") - .smembers("bigset") - .keys("*", function (err, replies) { - // NOTE: code in this callback is NOT atomic - // this only happens after the the .exec call finishes. - client.mget(replies, redis.print); - }) - .dbsize() - .exec(function (err, replies) { - console.log("MULTI got " + replies.length + " replies"); - replies.forEach(function (reply, index) { - console.log("Reply " + index + ": " + reply.toString()); - }); - }); -``` - -`client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the -same command methods as `client` objects do. Commands are queued up inside the `Multi` object -until `Multi.exec()` is invoked. - -You can either chain together `MULTI` commands as in the above example, or you can queue individual -commands while still sending regular client command as in this example: - -```js - var redis = require("redis"), - client = redis.createClient(), multi; - - // start a separate multi command queue - multi = client.multi(); - multi.incr("incr thing", redis.print); - multi.incr("incr other thing", redis.print); - - // runs immediately - client.mset("incr thing", 100, "incr other thing", 1, redis.print); - - // drains multi queue and runs atomically - multi.exec(function (err, replies) { - console.log(replies); // 101, 2 - }); - - // you can re-run the same transaction if you like - multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); - }); -``` - -In addition to adding commands to the `MULTI` queue individually, you can also pass an array -of commands and arguments to the constructor: - -```js - var redis = require("redis"), - client = redis.createClient(), multi; - - client.multi([ - ["mget", "multifoo", "multibar", redis.print], - ["incr", "multifoo"], - ["incr", "multibar"] - ]).exec(function (err, replies) { - console.log(replies); - }); -``` - - -## Monitor mode - -Redis supports the `MONITOR` command, which lets you see all commands received by the Redis server -across all client connections, including from other client libraries and other computers. - -After you send the `MONITOR` command, no other commands are valid on that connection. `node_redis` -will emit a `monitor` event for every new monitor message that comes across. The callback for the -`monitor` event takes a timestamp from the Redis server and an array of command arguments. - -Here is a simple example: - -```js - var client = require("redis").createClient(), - util = require("util"); - - client.monitor(function (err, res) { - console.log("Entering monitoring mode."); - }); - - client.on("monitor", function (time, args) { - console.log(time + ": " + util.inspect(args)); - }); -``` - -# Extras - -Some other things you might like to know about. - -## client.server_info - -After the ready probe completes, the results from the INFO command are saved in the `client.server_info` -object. - -The `versions` key contains an array of the elements of the version string for easy comparison. - - > client.server_info.redis_version - '2.3.0' - > client.server_info.versions - [ 2, 3, 0 ] - -## redis.print() - -A handy callback function for displaying return values when testing. Example: - -```js - var redis = require("redis"), - client = redis.createClient(); - - client.on("connect", function () { - client.set("foo_rand000000000000", "some fantastic value", redis.print); - client.get("foo_rand000000000000", redis.print); - }); -``` - -This will print: - - Reply: OK - Reply: some fantastic value - -Note that this program will not exit cleanly because the client is still connected. - -## redis.debug_mode - -Boolean to enable debug mode and protocol tracing. - -```js - var redis = require("redis"), - client = redis.createClient(); - - redis.debug_mode = true; - - client.on("connect", function () { - client.set("foo_rand000000000000", "some fantastic value"); - }); -``` - -This will display: - - mjr:~/work/node_redis (master)$ node ~/example.js - send command: *3 - $3 - SET - $20 - foo_rand000000000000 - $20 - some fantastic value - - on_data: +OK - -`send command` is data sent into Redis and `on_data` is data received from Redis. - -## client.send_command(command_name, args, callback) - -Used internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis -Wiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before -this library is updated, you can use `send_command()` to send arbitrary commands to Redis. - -All commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted. - -## client.connected - -Boolean tracking the state of the connection to the Redis server. - -## client.command_queue.length - -The number of commands that have been sent to the Redis server but not yet replied to. You can use this to -enforce some kind of maximum queue depth for commands while connected. - -Don't mess with `client.command_queue` though unless you really know what you are doing. - -## client.offline_queue.length - -The number of commands that have been queued up for a future connection. You can use this to enforce -some kind of maximum queue depth for pre-connection commands. - -## client.retry_delay - -Current delay in milliseconds before a connection retry will be attempted. This starts at `250`. - -## client.retry_backoff - -Multiplier for future retry timeouts. This should be larger than 1 to add more time between retries. -Defaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc. - -### Commands with Optional and Keyword arguments - -This applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation. - -Example: -```js -var args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ]; -client.zadd(args, function (err, response) { - if (err) throw err; - console.log('added '+response+' items.'); - - // -Infinity and +Infinity also work - var args1 = [ 'myzset', '+inf', '-inf' ]; - client.zrevrangebyscore(args1, function (err, response) { - if (err) throw err; - console.log('example1', response); - // write your code here - }); - - var max = 3, min = 1, offset = 1, count = 2; - var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ]; - client.zrevrangebyscore(args2, function (err, response) { - if (err) throw err; - console.log('example2', response); - // write your code here - }); -}); -``` - -## TODO - -Better tests for auth, disconnect/reconnect, and all combinations thereof. - -Stream large set/get values into and out of Redis. Otherwise the entire value must be in node's memory. - -Performance can be better for very large values. - -I think there are more performance improvements left in there for smaller values, especially for large lists of small values. - -## How to Contribute -- open a pull request and then wait for feedback (if - [DTrejo](http://github.com/dtrejo) does not get back to you within 2 days, - comment again with indignation!) - -## Contributors -Some people have have added features and fixed bugs in `node_redis` other than me. - -Ordered by date of first contribution. -[Auto-generated](http://github.com/dtrejo/node-authors) on Wed Jul 25 2012 19:14:59 GMT-0700 (PDT). - -- [Matt Ranney aka `mranney`](https://github.com/mranney) -- [Tim-Smart aka `tim-smart`](https://github.com/tim-smart) -- [Tj Holowaychuk aka `visionmedia`](https://github.com/visionmedia) -- [rick aka `technoweenie`](https://github.com/technoweenie) -- [Orion Henry aka `orionz`](https://github.com/orionz) -- [Aivo Paas aka `aivopaas`](https://github.com/aivopaas) -- [Hank Sims aka `hanksims`](https://github.com/hanksims) -- [Paul Carey aka `paulcarey`](https://github.com/paulcarey) -- [Pieter Noordhuis aka `pietern`](https://github.com/pietern) -- [nithesh aka `nithesh`](https://github.com/nithesh) -- [Andy Ray aka `andy2ray`](https://github.com/andy2ray) -- [unknown aka `unknowdna`](https://github.com/unknowdna) -- [Dave Hoover aka `redsquirrel`](https://github.com/redsquirrel) -- [Vladimir Dronnikov aka `dvv`](https://github.com/dvv) -- [Umair Siddique aka `umairsiddique`](https://github.com/umairsiddique) -- [Louis-Philippe Perron aka `lp`](https://github.com/lp) -- [Mark Dawson aka `markdaws`](https://github.com/markdaws) -- [Ian Babrou aka `bobrik`](https://github.com/bobrik) -- [Felix Geisendörfer aka `felixge`](https://github.com/felixge) -- [Jean-Hugues Pinson aka `undefined`](https://github.com/undefined) -- [Maksim Lin aka `maks`](https://github.com/maks) -- [Owen Smith aka `orls`](https://github.com/orls) -- [Zachary Scott aka `zzak`](https://github.com/zzak) -- [TEHEK Firefox aka `TEHEK`](https://github.com/TEHEK) -- [Isaac Z. Schlueter aka `isaacs`](https://github.com/isaacs) -- [David Trejo aka `DTrejo`](https://github.com/DTrejo) -- [Brian Noguchi aka `bnoguchi`](https://github.com/bnoguchi) -- [Philip Tellis aka `bluesmoon`](https://github.com/bluesmoon) -- [Marcus Westin aka `marcuswestin2`](https://github.com/marcuswestin2) -- [Jed Schmidt aka `jed`](https://github.com/jed) -- [Dave Peticolas aka `jdavisp3`](https://github.com/jdavisp3) -- [Trae Robrock aka `trobrock`](https://github.com/trobrock) -- [Shankar Karuppiah aka `shankar0306`](https://github.com/shankar0306) -- [Ignacio Burgueño aka `ignacio`](https://github.com/ignacio) - -Thanks. - -## LICENSE - "MIT License" - -Copyright (c) 2010 Matthew Ranney, http://ranney.com/ - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - -![spacer](http://ranney.com/1px.gif) diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/buffer_bench.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/buffer_bench.js deleted file mode 100644 index a504fbc0..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/buffer_bench.js +++ /dev/null @@ -1,89 +0,0 @@ -var source = new Buffer(100), - dest = new Buffer(100), i, j, k, tmp, count = 1000000, bytes = 100; - -for (i = 99 ; i >= 0 ; i--) { - source[i] = 120; -} - -var str = "This is a nice String.", - buf = new Buffer("This is a lovely Buffer."); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (Buffer.isBuffer(str)) {} -} -var end = new Date(); -console.log("Buffer.isBuffer(str) " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (Buffer.isBuffer(buf)) {} -} -var end = new Date(); -console.log("Buffer.isBuffer(buf) " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (str instanceof Buffer) {} -} -var end = new Date(); -console.log("str instanceof Buffer " + (end - start) + " ms"); - -var start = new Date(); -for (i = count * 100; i > 0 ; i--) { - if (buf instanceof Buffer) {} -} -var end = new Date(); -console.log("buf instanceof Buffer " + (end - start) + " ms"); - -for (i = bytes ; i > 0 ; i --) { - var start = new Date(); - for (j = count ; j > 0; j--) { - tmp = source.toString("ascii", 0, bytes); - } - var end = new Date(); - console.log("toString() " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i --) { - var start = new Date(); - for (j = count ; j > 0; j--) { - tmp = ""; - for (k = 0; k <= i ; k++) { - tmp += String.fromCharCode(source[k]); - } - } - var end = new Date(); - console.log("manual string " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - for (k = i ; k > 0 ; k--) { - dest[k] = source[k]; - } - } - var end = new Date(); - console.log("Manual copy " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - for (k = i ; k > 0 ; k--) { - dest[k] = 120; - } - } - var end = new Date(); - console.log("Direct assignment " + i + " bytes " + (end - start) + " ms"); -} - -for (i = bytes ; i > 0 ; i--) { - var start = new Date(); - for (j = count ; j > 0 ; j--) { - source.copy(dest, 0, 0, i); - } - var end = new Date(); - console.log("Buffer.copy() " + i + " bytes " + (end - start) + " ms"); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/hiredis_parser.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/hiredis_parser.js deleted file mode 100644 index f1515b11..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/hiredis_parser.js +++ /dev/null @@ -1,38 +0,0 @@ -var Parser = require('../lib/parser/hiredis').Parser; -var assert = require('assert'); - -/* -This test makes sure that exceptions thrown inside of "reply" event handlers -are not trapped and mistakenly emitted as parse errors. -*/ -(function testExecuteDoesNotCatchReplyCallbackExceptions() { - var parser = new Parser(); - var replies = [{}]; - - parser.reader = { - feed: function() {}, - get: function() { - return replies.shift(); - } - }; - - var emittedError = false; - var caughtException = false; - - parser - .on('error', function() { - emittedError = true; - }) - .on('reply', function() { - throw new Error('bad'); - }); - - try { - parser.execute(); - } catch (err) { - caughtException = true; - } - - assert.equal(caughtException, true); - assert.equal(emittedError, false); -})(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/re_sub_test.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/re_sub_test.js deleted file mode 100644 index 64b8f312..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/re_sub_test.js +++ /dev/null @@ -1,14 +0,0 @@ -var client = require('../index').createClient() - , client2 = require('../index').createClient() - , assert = require('assert'); - -client.once('subscribe', function (channel, count) { - client.unsubscribe('x'); - client.subscribe('x', function () { - client.quit(); - client2.quit(); - }); - client2.publish('x', 'hi'); -}); - -client.subscribe('x'); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js deleted file mode 100644 index 7abdd516..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/reconnect_test.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("../index").createClient(null, null, { -// max_attempts: 4 -}); - -redis.on("error", function (err) { - console.log("Redis says: " + err); -}); - -redis.on("ready", function () { - console.log("Redis ready."); -}); - -redis.on("reconnecting", function (arg) { - console.log("Redis reconnecting: " + JSON.stringify(arg)); -}); -redis.on("connect", function () { - console.log("Redis connected."); -}); - -setInterval(function () { - var now = Date.now(); - redis.set("now", now, function (err, res) { - if (err) { - console.log(now + " Redis reply error: " + err); - } else { - console.log(now + " Redis reply: " + res); - } - }); -}, 100); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/codec.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/codec.js deleted file mode 100644 index 7d764f60..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/codec.js +++ /dev/null @@ -1,16 +0,0 @@ -var json = { - encode: JSON.stringify, - decode: JSON.parse -}; - -var MsgPack = require('node-msgpack'); -msgpack = { - encode: MsgPack.pack, - decode: function(str) { return MsgPack.unpack(new Buffer(str)); } -}; - -bison = require('bison'); - -module.exports = json; -//module.exports = msgpack; -//module.exports = bison; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/pub.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/pub.js deleted file mode 100644 index 0acde7a6..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/pub.js +++ /dev/null @@ -1,38 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var profiler = require('v8-profiler'); -var codec = require('../codec'); - -var sent = 0; - -var pub = require('redis').createClient(null, null, { - //command_queue_high_water: 5, - //command_queue_low_water: 1 -}) -.on('ready', function() { - this.emit('drain'); -}) -.on('drain', function() { - process.nextTick(exec); -}); - -var payload = '1'; for (var i = 0; i < 12; ++i) payload += payload; -console.log('Message payload length', payload.length); - -function exec() { - pub.publish('timeline', codec.encode({ foo: payload })); - ++sent; - if (!pub.should_buffer) { - process.nextTick(exec); - } -} - -profiler.takeSnapshot('s_0'); - -exec(); - -setInterval(function() { - profiler.takeSnapshot('s_' + sent); - console.error('sent', sent, 'free', freemem(), 'cmdqlen', pub.command_queue.length, 'offqlen', pub.offline_queue.length); -}, 2000); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/run b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/run deleted file mode 100755 index bd9ac392..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/run +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node server.js & -node --debug pub.js diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/server.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/server.js deleted file mode 100644 index 035e6b74..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/pubsub/server.js +++ /dev/null @@ -1,23 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var codec = require('../codec'); - -var id = Math.random(); -var recv = 0; - -var sub = require('redis').createClient() - .on('ready', function() { - this.subscribe('timeline'); - }) - .on('message', function(channel, message) { - var self = this; - if (message) { - message = codec.decode(message); - ++recv; - } - }); - -setInterval(function() { - console.error('id', id, 'received', recv, 'free', freemem()); -}, 2000); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/pub.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/pub.js deleted file mode 100644 index 9caf1d0b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/pub.js +++ /dev/null @@ -1,49 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -//var profiler = require('v8-profiler'); -var codec = require('../codec'); - -var sent = 0; - -var pub = require('redis').createClient(null, null, { - //command_queue_high_water: 5, - //command_queue_low_water: 1 -}) -.on('ready', function() { - this.del('timeline'); - this.emit('drain'); -}) -.on('drain', function() { - process.nextTick(exec); -}); - -var payload = '1'; for (var i = 0; i < 12; ++i) payload += payload; -console.log('Message payload length', payload.length); - -function exec() { - pub.rpush('timeline', codec.encode({ foo: payload })); - ++sent; - if (!pub.should_buffer) { - process.nextTick(exec); - } -} - -//profiler.takeSnapshot('s_0'); - -exec(); - -setInterval(function() { - //var ss = profiler.takeSnapshot('s_' + sent); - //console.error(ss.stringify()); - pub.llen('timeline', function(err, result) { - console.error('sent', sent, 'free', freemem(), - 'cmdqlen', pub.command_queue.length, 'offqlen', pub.offline_queue.length, - 'llen', result - ); - }); -}, 2000); - -/*setTimeout(function() { - process.exit(); -}, 30000);*/ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/run b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/run deleted file mode 100755 index 8045ae80..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/run +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh -node server.js & -#node server.js & -#node server.js & -#node server.js & -node --debug pub.js diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/server.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/server.js deleted file mode 100644 index 9cbcdd9e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/rpushblpop/server.js +++ /dev/null @@ -1,30 +0,0 @@ -'use strict'; - -var freemem = require('os').freemem; -var codec = require('../codec'); - -var id = Math.random(); -var recv = 0; - -var cmd = require('redis').createClient(); -var sub = require('redis').createClient() - .on('ready', function() { - this.emit('timeline'); - }) - .on('timeline', function() { - var self = this; - this.blpop('timeline', 0, function(err, result) { - var message = result[1]; - if (message) { - message = codec.decode(message); - ++recv; - } - self.emit('timeline'); - }); - }); - -setInterval(function() { - cmd.llen('timeline', function(err, result) { - console.error('id', id, 'received', recv, 'free', freemem(), 'llen', result); - }); -}, 2000); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/00 b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/00 deleted file mode 100644 index 29d7bf7c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/00 +++ /dev/null @@ -1,13 +0,0 @@ -# size JSON msgpack bison -26602 2151.0170848180414 -25542 ? 2842.589272665782 -24835 ? ? 7280.4538397469805 -6104 6985.234528557929 -5045 ? 7217.461392841478 -4341 ? ? 14261.406335354604 -4180 15864.633685636572 -4143 ? 12954.806235781925 -4141 ? ? 44650.70733912719 -75 114227.07313350472 -40 ? 30162.440062810834 -39 ? ? 119815.66013519121 diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/plot b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/plot deleted file mode 100755 index 2563797c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/plot +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh - -gnuplot >size-rate.jpg << _EOF_ - -set terminal png nocrop enhanced font verdana 12 size 640,480 -set logscale x -set logscale y -set grid -set xlabel 'Serialized object size, octets' -set ylabel 'decode(encode(obj)) rate, 1/sec' -plot '00' using 1:2 title 'json' smooth bezier, '00' using 1:3 title 'msgpack' smooth bezier, '00' using 1:4 title 'bison' smooth bezier - -_EOF_ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/size-rate.png b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/size-rate.png deleted file mode 100644 index c9c2bee6..00000000 Binary files a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/size-rate.png and /dev/null differ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/speed.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/speed.js deleted file mode 100644 index 8e43cbc0..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/stress/speed/speed.js +++ /dev/null @@ -1,84 +0,0 @@ -var msgpack = require('node-msgpack'); -var bison = require('bison'); -var codec = { - JSON: { - encode: JSON.stringify, - decode: JSON.parse - }, - msgpack: { - encode: msgpack.pack, - decode: msgpack.unpack - }, - bison: bison -}; - -var obj, l; - -var s = '0'; -for (var i = 0; i < 12; ++i) s += s; - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [], - a: s, - ccc: s, - b: s + s + s -}; -for (i = 0; i < 100; ++i) obj.rand.push(Math.random()); -forObj(obj); - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -for (i = 0; i < 100; ++i) obj.rand.push(Math.random()); -forObj(obj); - -obj = { - foo: s, - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -forObj(obj); - -obj = { - arrrrrr: [{a:1,b:false,c:null,d:1.0}, 1111, 2222, 33333333], - rand: [] -}; -forObj(obj); - -function run(obj, codec) { - var t1 = Date.now(); - var n = 10000; - for (var i = 0; i < n; ++i) { - codec.decode(l = codec.encode(obj)); - } - var t2 = Date.now(); - //console.log('DONE', n*1000/(t2-t1), 'codecs/sec, length=', l.length); - return [n*1000/(t2-t1), l.length]; -} - -function series(obj, cname, n) { - var rate = 0; - var len = 0; - for (var i = 0; i < n; ++i) { - var r = run(obj, codec[cname]); - rate += r[0]; - len += r[1]; - } - rate /= n; - len /= n; - console.log(cname + ' ' + rate + ' ' + len); - return [rate, len]; -} - -function forObj(obj) { - var r = { - JSON: series(obj, 'JSON', 20), - msgpack: series(obj, 'msgpack', 20), - bison: series(obj, 'bison', 20) - }; - return r; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/sub_quit_test.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/sub_quit_test.js deleted file mode 100644 index ad1f4132..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/benches/sub_quit_test.js +++ /dev/null @@ -1,18 +0,0 @@ -var client = require("redis").createClient(), - client2 = require("redis").createClient(); - -client.subscribe("something"); -client.on("subscribe", function (channel, count) { - console.log("Got sub: " + channel); - client.unsubscribe("something"); -}); - -client.on("unsubscribe", function (channel, count) { - console.log("Got unsub: " + channel + ", quitting"); - client.quit(); -}); - -// exercise unsub before sub -client2.unsubscribe("something"); -client2.subscribe("another thing"); -client2.quit(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/changelog.md b/node_modules/karma/node_modules/socket.io/node_modules/redis/changelog.md deleted file mode 100644 index 4248288c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/changelog.md +++ /dev/null @@ -1,219 +0,0 @@ -Changelog -========= - -## v0.7.2 - April 29, 2012 - -Many contributed fixes. Thank you, contributors. - -* [GH-190] - pub/sub mode fix (Brian Noguchi) -* [GH-165] - parser selection fix (TEHEK) -* numerous documentation and examples updates -* auth errors emit Errors instead of Strings (David Trejo) - -## v0.7.1 - November 15, 2011 - -Fix regression in reconnect logic. - -Very much need automated tests for reconnection and queue logic. - -## v0.7.0 - November 14, 2011 - -Many contributed fixes. Thanks everybody. - -* [GH-127] - properly re-initialize parser on reconnect -* [GH-136] - handle passing undefined as callback (Ian Babrou) -* [GH-139] - properly handle exceptions thrown in pub/sub event handlers (Felix Geisendörfer) -* [GH-141] - detect closing state on stream error (Felix Geisendörfer) -* [GH-142] - re-select database on reconnection (Jean-Hugues Pinson) -* [GH-146] - add sort example (Maksim Lin) - -Some more goodies: - -* Fix bugs with node 0.6 -* Performance improvements -* New version of `multi_bench.js` that tests more realistic scenarios -* [GH-140] - support optional callback for subscribe commands -* Properly flush and error out command queue when connection fails -* Initial work on reconnection thresholds - -## v0.6.7 - July 30, 2011 - -(accidentally skipped v0.6.6) - -Fix and test for [GH-123] - -Passing an Array as as the last argument should expand as users -expect. The old behavior was to coerce the arguments into Strings, -which did surprising things with Arrays. - -## v0.6.5 - July 6, 2011 - -Contributed changes: - -* Support SlowBuffers (Umair Siddique) -* Add Multi to exports (Louis-Philippe Perron) -* Fix for drain event calculation (Vladimir Dronnikov) - -Thanks! - -## v0.6.4 - June 30, 2011 - -Fix bug with optional callbacks for hmset. - -## v0.6.2 - June 30, 2011 - -Bugs fixed: - -* authentication retry while server is loading db (danmaz74) [GH-101] -* command arguments processing issue with arrays - -New features: - -* Auto update of new commands from redis.io (Dave Hoover) -* Performance improvements and backpressure controls. -* Commands now return the true/false value from the underlying socket write(s). -* Implement command_queue high water and low water for more better control of queueing. - -See `examples/backpressure_drain.js` for more information. - -## v0.6.1 - June 29, 2011 - -Add support and tests for Redis scripting through EXEC command. - -Bug fix for monitor mode. (forddg) - -Auto update of new commands from redis.io (Dave Hoover) - -## v0.6.0 - April 21, 2011 - -Lots of bugs fixed. - -* connection error did not properly trigger reconnection logic [GH-85] -* client.hmget(key, [val1, val2]) was not expanding properly [GH-66] -* client.quit() while in pub/sub mode would throw an error [GH-87] -* client.multi(['hmset', 'key', {foo: 'bar'}]) fails [GH-92] -* unsubscribe before subscribe would make things very confused [GH-88] -* Add BRPOPLPUSH [GH-79] - -## v0.5.11 - April 7, 2011 - -Added DISCARD - -I originally didn't think DISCARD would do anything here because of the clever MULTI interface, but somebody -pointed out to me that DISCARD can be used to flush the WATCH set. - -## v0.5.10 - April 6, 2011 - -Added HVALS - -## v0.5.9 - March 14, 2011 - -Fix bug with empty Array arguments - Andy Ray - -## v0.5.8 - March 14, 2011 - -Add `MONITOR` command and special monitor command reply parsing. - -## v0.5.7 - February 27, 2011 - -Add magical auth command. - -Authentication is now remembered by the client and will be automatically sent to the server -on every connection, including any reconnections. - -## v0.5.6 - February 22, 2011 - -Fix bug in ready check with `return_buffers` set to `true`. - -Thanks to Dean Mao and Austin Chau. - -## v0.5.5 - February 16, 2011 - -Add probe for server readiness. - -When a Redis server starts up, it might take a while to load the dataset into memory. -During this time, the server will accept connections, but will return errors for all non-INFO -commands. Now node_redis will send an INFO command whenever it connects to a server. -If the info command indicates that the server is not ready, the client will keep trying until -the server is ready. Once it is ready, the client will emit a "ready" event as well as the -"connect" event. The client will queue up all commands sent before the server is ready, just -like it did before. When the server is ready, all offline/non-ready commands will be replayed. -This should be backward compatible with previous versions. - -To disable this ready check behavior, set `options.no_ready_check` when creating the client. - -As a side effect of this change, the key/val params from the info command are available as -`client.server_options`. Further, the version string is decomposed into individual elements -in `client.server_options.versions`. - -## v0.5.4 - February 11, 2011 - -Fix excess memory consumption from Queue backing store. - -Thanks to Gustaf Sjöberg. - -## v0.5.3 - February 5, 2011 - -Fix multi/exec error reply callback logic. - -Thanks to Stella Laurenzo. - -## v0.5.2 - January 18, 2011 - -Fix bug where unhandled error replies confuse the parser. - -## v0.5.1 - January 18, 2011 - -Fix bug where subscribe commands would not handle redis-server startup error properly. - -## v0.5.0 - December 29, 2010 - -Some bug fixes: - -* An important bug fix in reconnection logic. Previously, reply callbacks would be invoked twice after - a reconnect. -* Changed error callback argument to be an actual Error object. - -New feature: - -* Add friendly syntax for HMSET using an object. - -## v0.4.1 - December 8, 2010 - -Remove warning about missing hiredis. You probably do want it though. - -## v0.4.0 - December 5, 2010 - -Support for multiple response parsers and hiredis C library from Pieter Noordhuis. -Return Strings instead of Buffers by default. -Empty nested mb reply bug fix. - -## v0.3.9 - November 30, 2010 - -Fix parser bug on failed EXECs. - -## v0.3.8 - November 10, 2010 - -Fix for null MULTI response when WATCH condition fails. - -## v0.3.7 - November 9, 2010 - -Add "drain" and "idle" events. - -## v0.3.6 - November 3, 2010 - -Add all known Redis commands from Redis master, even ones that are coming in 2.2 and beyond. - -Send a friendlier "error" event message on stream errors like connection refused / reset. - -## v0.3.5 - October 21, 2010 - -A few bug fixes. - -* Fixed bug with `nil` multi-bulk reply lengths that showed up with `BLPOP` timeouts. -* Only emit `end` once when connection goes away. -* Fixed bug in `test.js` where driver finished before all tests completed. - -## unversioned wasteland - -See the git history for what happened before. diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js deleted file mode 100755 index 99fdf4df..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/diff_multi_bench_output.js +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/env node - -var colors = require('colors'), - fs = require('fs'), - _ = require('underscore'), - metrics = require('metrics'), - - // `node diff_multi_bench_output.js before.txt after.txt` - before = process.argv[2], - after = process.argv[3]; - -if (!before || !after) { - console.log('Please supply two file arguments:'); - var n = __filename; - n = n.substring(n.lastIndexOf('/', n.length)); - console.log(' ./' + n + ' multiBenchBefore.txt multiBenchAfter.txt'); - console.log('To generate multiBenchBefore.txt, run'); - console.log(' node multi_bench.js > multiBenchBefore.txt'); - console.log('Thank you for benchmarking responsibly.'); - return; -} - -var before_lines = fs.readFileSync(before, 'utf8').split('\n'), - after_lines = fs.readFileSync(after, 'utf8').split('\n'); - -console.log('Comparing before,', before.green, '(', before_lines.length, - 'lines)', 'to after,', after.green, '(', after_lines.length, 'lines)'); - -var total_ops = new metrics.Histogram.createUniformHistogram(); - -before_lines.forEach(function(b, i) { - var a = after_lines[i]; - if (!a || !b || !b.trim() || !a.trim()) { - // console.log('#ignored#', '>'+a+'<', '>'+b+'<'); - return; - } - - b_words = b.split(' ').filter(is_whitespace); - a_words = a.split(' ').filter(is_whitespace); - - var ops = - [b_words, a_words] - .map(function(words) { - // console.log(words); - return parseInt10(words.slice(-2, -1)); - }).filter(function(num) { - var isNaN = !num && num !== 0; - return !isNaN; - }); - if (ops.length != 2) return - - var delta = ops[1] - ops[0]; - - total_ops.update(delta); - - delta = humanize_diff(delta); - console.log( - // name of test - command_name(a_words) == command_name(b_words) - ? command_name(a_words) + ':' - : '404:', - // results of test - ops.join(' -> '), 'ops/sec (∆', delta, ')'); -}); - -console.log('Mean difference in ops/sec:', humanize_diff(total_ops.mean())); - -function is_whitespace(s) { - return !!s.trim(); -} - -function parseInt10(s) { - return parseInt(s, 10); -} - -// green if greater than 0, red otherwise -function humanize_diff(num) { - if (num > 0) { - return ('+' + num).green; - } - return ('' + num).red; -} - -function command_name(words) { - var line = words.join(' '); - return line.substr(0, line.indexOf(',')); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/auth.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/auth.js deleted file mode 100644 index 6c0a563c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/auth.js +++ /dev/null @@ -1,5 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -// This command is magical. Client stashes the password and will issue on every connect. -client.auth("somepass"); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js deleted file mode 100644 index 3488ef4d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/backpressure_drain.js +++ /dev/null @@ -1,33 +0,0 @@ -var redis = require("../index"), - client = redis.createClient(null, null, { - command_queue_high_water: 5, - command_queue_low_water: 1 - }), - remaining_ops = 100000, paused = false; - -function op() { - if (remaining_ops <= 0) { - console.error("Finished."); - process.exit(0); - } - - remaining_ops--; - if (client.hset("test hash", "val " + remaining_ops, remaining_ops) === false) { - console.log("Pausing at " + remaining_ops); - paused = true; - } else { - process.nextTick(op); - } -} - -client.on("drain", function () { - if (paused) { - console.log("Resuming at " + remaining_ops); - paused = false; - process.nextTick(op); - } else { - console.log("Got drain while not paused at " + remaining_ops); - } -}); - -op(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/eval.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/eval.js deleted file mode 100644 index c1fbf8a5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/eval.js +++ /dev/null @@ -1,9 +0,0 @@ -var redis = require("./index"), - client = redis.createClient(); - -redis.debug_mode = true; - -client.eval("return 100.5", 0, function (err, res) { - console.dir(err); - console.dir(res); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/extend.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/extend.js deleted file mode 100644 index 488b8c2d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/extend.js +++ /dev/null @@ -1,24 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -// Extend the RedisClient prototype to add a custom method -// This one converts the results from "INFO" into a JavaScript Object - -redis.RedisClient.prototype.parse_info = function (callback) { - this.info(function (err, res) { - var lines = res.toString().split("\r\n").sort(); - var obj = {}; - lines.forEach(function (line) { - var parts = line.split(':'); - if (parts[1]) { - obj[parts[0]] = parts[1]; - } - }); - callback(obj) - }); -}; - -client.parse_info(function (info) { - console.dir(info); - client.quit(); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/file.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/file.js deleted file mode 100644 index 4d2b5d1c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/file.js +++ /dev/null @@ -1,32 +0,0 @@ -// Read a file from disk, store it in Redis, then read it back from Redis. - -var redis = require("redis"), - client = redis.createClient(), - fs = require("fs"), - filename = "kids_in_cart.jpg"; - -// Get the file I use for testing like this: -// curl http://ranney.com/kids_in_cart.jpg -o kids_in_cart.jpg -// or just use your own file. - -// Read a file from fs, store it in Redis, get it back from Redis, write it back to fs. -fs.readFile(filename, function (err, data) { - if (err) throw err - console.log("Read " + data.length + " bytes from filesystem."); - - client.set(filename, data, redis.print); // set entire file - client.get(filename, function (err, reply) { // get entire file - if (err) { - console.log("Get error: " + err); - } else { - fs.writeFile("duplicate_" + filename, reply, function (err) { - if (err) { - console.log("Error on write: " + err) - } else { - console.log("File written."); - } - client.end(); - }); - } - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/mget.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/mget.js deleted file mode 100644 index 936740d3..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/mget.js +++ /dev/null @@ -1,5 +0,0 @@ -var client = require("redis").createClient(); - -client.mget(["sessions started", "sessions started", "foo"], function (err, res) { - console.dir(res); -}); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/monitor.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/monitor.js deleted file mode 100644 index 2cb6a4e1..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/monitor.js +++ /dev/null @@ -1,10 +0,0 @@ -var client = require("../index").createClient(), - util = require("util"); - -client.monitor(function (err, res) { - console.log("Entering monitoring mode."); -}); - -client.on("monitor", function (time, args) { - console.log(time + ": " + util.inspect(args)); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/multi.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/multi.js deleted file mode 100644 index 35c08e18..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/multi.js +++ /dev/null @@ -1,46 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(), set_size = 20; - -client.sadd("bigset", "a member"); -client.sadd("bigset", "another member"); - -while (set_size > 0) { - client.sadd("bigset", "member " + set_size); - set_size -= 1; -} - -// multi chain with an individual callback -client.multi() - .scard("bigset") - .smembers("bigset") - .keys("*", function (err, replies) { - client.mget(replies, redis.print); - }) - .dbsize() - .exec(function (err, replies) { - console.log("MULTI got " + replies.length + " replies"); - replies.forEach(function (reply, index) { - console.log("Reply " + index + ": " + reply.toString()); - }); - }); - -client.mset("incr thing", 100, "incr other thing", 1, redis.print); - -// start a separate multi command queue -var multi = client.multi(); -multi.incr("incr thing", redis.print); -multi.incr("incr other thing", redis.print); - -// runs immediately -client.get("incr thing", redis.print); // 100 - -// drains multi queue and runs atomically -multi.exec(function (err, replies) { - console.log(replies); // 101, 2 -}); - -// you can re-run the same transaction if you like -multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/multi2.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/multi2.js deleted file mode 100644 index 8be4d731..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/multi2.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(), multi; - -// start a separate command queue for multi -multi = client.multi(); -multi.incr("incr thing", redis.print); -multi.incr("incr other thing", redis.print); - -// runs immediately -client.mset("incr thing", 100, "incr other thing", 1, redis.print); - -// drains multi queue and runs atomically -multi.exec(function (err, replies) { - console.log(replies); // 101, 2 -}); - -// you can re-run the same transaction if you like -multi.exec(function (err, replies) { - console.log(replies); // 102, 3 - client.quit(); -}); - -client.multi([ - ["mget", "multifoo", "multibar", redis.print], - ["incr", "multifoo"], - ["incr", "multibar"] -]).exec(function (err, replies) { - console.log(replies.toString()); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/psubscribe.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/psubscribe.js deleted file mode 100644 index c57117b8..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/psubscribe.js +++ /dev/null @@ -1,33 +0,0 @@ -var redis = require("redis"), - client1 = redis.createClient(), - client2 = redis.createClient(), - client3 = redis.createClient(), - client4 = redis.createClient(), - msg_count = 0; - -redis.debug_mode = false; - -client1.on("psubscribe", function (pattern, count) { - console.log("client1 psubscribed to " + pattern + ", " + count + " total subscriptions"); - client2.publish("channeltwo", "Me!"); - client3.publish("channelthree", "Me too!"); - client4.publish("channelfour", "And me too!"); -}); - -client1.on("punsubscribe", function (pattern, count) { - console.log("client1 punsubscribed from " + pattern + ", " + count + " total subscriptions"); - client4.end(); - client3.end(); - client2.end(); - client1.end(); -}); - -client1.on("pmessage", function (pattern, channel, message) { - console.log("("+ pattern +")" + " client1 received message on " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.punsubscribe(); - } -}); - -client1.psubscribe("channel*"); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/pub_sub.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/pub_sub.js deleted file mode 100644 index aa508d6c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/pub_sub.js +++ /dev/null @@ -1,41 +0,0 @@ -var redis = require("redis"), - client1 = redis.createClient(), msg_count = 0, - client2 = redis.createClient(); - -redis.debug_mode = false; - -// Most clients probably don't do much on "subscribe". This example uses it to coordinate things within one program. -client1.on("subscribe", function (channel, count) { - console.log("client1 subscribed to " + channel + ", " + count + " total subscriptions"); - if (count === 2) { - client2.publish("a nice channel", "I am sending a message."); - client2.publish("another one", "I am sending a second message."); - client2.publish("a nice channel", "I am sending my last message."); - } -}); - -client1.on("unsubscribe", function (channel, count) { - console.log("client1 unsubscribed from " + channel + ", " + count + " total subscriptions"); - if (count === 0) { - client2.end(); - client1.end(); - } -}); - -client1.on("message", function (channel, message) { - console.log("client1 channel " + channel + ": " + message); - msg_count += 1; - if (msg_count === 3) { - client1.unsubscribe(); - } -}); - -client1.on("ready", function () { - // if you need auth, do it here - client1.incr("did a thing"); - client1.subscribe("a nice channel", "another one"); -}); - -client2.on("ready", function () { - // if you need auth, do it here -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/simple.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/simple.js deleted file mode 100644 index f1f2e320..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/simple.js +++ /dev/null @@ -1,24 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -client.on("error", function (err) { - console.log("error event - " + client.host + ":" + client.port + " - " + err); -}); - -client.set("string key", "string val", redis.print); -client.hset("hash key", "hashtest 1", "some value", redis.print); -client.hset(["hash key", "hashtest 2", "some other value"], redis.print); -client.hkeys("hash key", function (err, replies) { - if (err) { - return console.error("error response - " + err); - } - - console.log(replies.length + " replies:"); - replies.forEach(function (reply, i) { - console.log(" " + i + ": " + reply); - }); -}); - -client.quit(function (err, res) { - console.log("Exiting from quit command."); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/sort.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/sort.js deleted file mode 100644 index e7c6249e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/sort.js +++ /dev/null @@ -1,17 +0,0 @@ -var redis = require("redis"), - client = redis.createClient(); - -client.sadd("mylist", 1); -client.sadd("mylist", 2); -client.sadd("mylist", 3); - -client.set("weight_1", 5); -client.set("weight_2", 500); -client.set("weight_3", 1); - -client.set("object_1", "foo"); -client.set("object_2", "bar"); -client.set("object_3", "qux"); - -client.sort("mylist", "by", "weight_*", "get", "object_*", redis.print); -// Prints Reply: qux,foo,bar \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/subqueries.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/subqueries.js deleted file mode 100644 index 560db240..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/subqueries.js +++ /dev/null @@ -1,15 +0,0 @@ -// Sending commands in response to other commands. -// This example runs "type" against every key in the database -// -var client = require("redis").createClient(); - -client.keys("*", function (err, keys) { - keys.forEach(function (key, pos) { - client.type(key, function (err, keytype) { - console.log(key + " is " + keytype); - if (pos === (keys.length - 1)) { - client.quit(); - } - }); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/subquery.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/subquery.js deleted file mode 100644 index 861657e1..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/subquery.js +++ /dev/null @@ -1,19 +0,0 @@ -var client = require("redis").createClient(); - -function print_results(obj) { - console.dir(obj); -} - -// build a map of all keys and their types -client.keys("*", function (err, all_keys) { - var key_types = {}; - - all_keys.forEach(function (key, pos) { // use second arg of forEach to get pos - client.type(key, function (err, type) { - key_types[key] = type; - if (pos === all_keys.length - 1) { // callbacks all run in order - print_results(key_types); - } - }); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/unix_socket.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/unix_socket.js deleted file mode 100644 index 4a5e0bb0..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/unix_socket.js +++ /dev/null @@ -1,29 +0,0 @@ -var redis = require("redis"), - client = redis.createClient("/tmp/redis.sock"), - profiler = require("v8-profiler"); - -client.on("connect", function () { - console.log("Got Unix socket connection.") -}); - -client.on("error", function (err) { - console.log(err.message); -}); - -client.set("space chars", "space value"); - -setInterval(function () { - client.get("space chars"); -}, 100); - -function done() { - client.info(function (err, reply) { - console.log(reply.toString()); - client.quit(); - }); -} - -setTimeout(function () { - console.log("Taking snapshot."); - var snap = profiler.takeSnapshot(); -}, 5000); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/web_server.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/web_server.js deleted file mode 100644 index 9fd85923..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/examples/web_server.js +++ /dev/null @@ -1,31 +0,0 @@ -// A simple web server that generates dyanmic content based on responses from Redis - -var http = require("http"), server, - redis_client = require("redis").createClient(); - -server = http.createServer(function (request, response) { - response.writeHead(200, { - "Content-Type": "text/plain" - }); - - var redis_info, total_requests; - - redis_client.info(function (err, reply) { - redis_info = reply; // stash response in outer scope - }); - redis_client.incr("requests", function (err, reply) { - total_requests = reply; // stash response in outer scope - }); - redis_client.hincrby("ip", request.connection.remoteAddress, 1); - redis_client.hgetall("ip", function (err, reply) { - // This is the last reply, so all of the previous replies must have completed already - response.write("This page was generated after talking to redis.\n\n" + - "Redis info:\n" + redis_info + "\n" + - "Total requests: " + total_requests + "\n\n" + - "IP count: \n"); - Object.keys(reply).forEach(function (ip) { - response.write(" " + ip + ": " + reply[ip] + "\n"); - }); - response.end(); - }); -}).listen(80); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/generate_commands.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/generate_commands.js deleted file mode 100644 index e6949d3a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/generate_commands.js +++ /dev/null @@ -1,39 +0,0 @@ -var http = require("http"), - fs = require("fs"); - -function prettyCurrentTime() { - var date = new Date(); - return date.toLocaleString(); -} - -function write_file(commands, path) { - var file_contents, out_commands; - - console.log("Writing " + Object.keys(commands).length + " commands to " + path); - - file_contents = "// This file was generated by ./generate_commands.js on " + prettyCurrentTime() + "\n"; - - out_commands = Object.keys(commands).map(function (key) { - return key.toLowerCase(); - }); - - file_contents += "module.exports = " + JSON.stringify(out_commands, null, " ") + ";\n"; - - fs.writeFile(path, file_contents); -} - -http.get({host: "redis.io", path: "/commands.json"}, function (res) { - var body = ""; - - console.log("Response from redis.io/commands.json: " + res.statusCode); - - res.on('data', function (chunk) { - body += chunk; - }); - - res.on('end', function () { - write_file(JSON.parse(body), "lib/commands.js"); - }); -}).on('error', function (e) { - console.log("Error fetching command list from redis.io: " + e.message); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/index.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/index.js deleted file mode 100644 index 61cb4e91..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/index.js +++ /dev/null @@ -1,1113 +0,0 @@ -/*global Buffer require exports console setTimeout */ - -var net = require("net"), - util = require("./lib/util"), - Queue = require("./lib/queue"), - to_array = require("./lib/to_array"), - events = require("events"), - crypto = require("crypto"), - parsers = [], commands, - connection_id = 0, - default_port = 6379, - default_host = "127.0.0.1"; - -// can set this to true to enable for all connections -exports.debug_mode = false; - -// hiredis might not be installed -try { - require("./lib/parser/hiredis"); - parsers.push(require("./lib/parser/hiredis")); -} catch (err) { - if (exports.debug_mode) { - console.warn("hiredis parser not installed."); - } -} - -parsers.push(require("./lib/parser/javascript")); - -function RedisClient(stream, options) { - this.stream = stream; - this.options = options = options || {}; - - this.connection_id = ++connection_id; - this.connected = false; - this.ready = false; - this.connections = 0; - if (this.options.socket_nodelay === undefined) { - this.options.socket_nodelay = true; - } - this.should_buffer = false; - this.command_queue_high_water = this.options.command_queue_high_water || 1000; - this.command_queue_low_water = this.options.command_queue_low_water || 0; - this.max_attempts = null; - if (options.max_attempts && !isNaN(options.max_attempts) && options.max_attempts > 0) { - this.max_attempts = +options.max_attempts; - } - this.command_queue = new Queue(); // holds sent commands to de-pipeline them - this.offline_queue = new Queue(); // holds commands issued but not able to be sent - this.commands_sent = 0; - this.connect_timeout = false; - if (options.connect_timeout && !isNaN(options.connect_timeout) && options.connect_timeout > 0) { - this.connect_timeout = +options.connect_timeout; - } - - this.enable_offline_queue = true; - if (typeof this.options.enable_offline_queue === "boolean") { - this.enable_offline_queue = this.options.enable_offline_queue; - } - - this.initialize_retry_vars(); - this.pub_sub_mode = false; - this.subscription_set = {}; - this.monitoring = false; - this.closing = false; - this.server_info = {}; - this.auth_pass = null; - this.parser_module = null; - this.selected_db = null; // save the selected db here, used when reconnecting - - this.old_state = null; - - var self = this; - - this.stream.on("connect", function () { - self.on_connect(); - }); - - this.stream.on("data", function (buffer_from_socket) { - self.on_data(buffer_from_socket); - }); - - this.stream.on("error", function (msg) { - self.on_error(msg.message); - }); - - this.stream.on("close", function () { - self.connection_gone("close"); - }); - - this.stream.on("end", function () { - self.connection_gone("end"); - }); - - this.stream.on("drain", function () { - self.should_buffer = false; - self.emit("drain"); - }); - - events.EventEmitter.call(this); -} -util.inherits(RedisClient, events.EventEmitter); -exports.RedisClient = RedisClient; - -RedisClient.prototype.initialize_retry_vars = function () { - this.retry_timer = null; - this.retry_totaltime = 0; - this.retry_delay = 150; - this.retry_backoff = 1.7; - this.attempts = 1; -}; - -// flush offline_queue and command_queue, erroring any items with a callback first -RedisClient.prototype.flush_and_error = function (message) { - var command_obj; - while (this.offline_queue.length > 0) { - command_obj = this.offline_queue.shift(); - if (typeof command_obj.callback === "function") { - command_obj.callback(message); - } - } - this.offline_queue = new Queue(); - - while (this.command_queue.length > 0) { - command_obj = this.command_queue.shift(); - if (typeof command_obj.callback === "function") { - command_obj.callback(message); - } - } - this.command_queue = new Queue(); -}; - -RedisClient.prototype.on_error = function (msg) { - var message = "Redis connection to " + this.host + ":" + this.port + " failed - " + msg, - self = this, command_obj; - - if (this.closing) { - return; - } - - if (exports.debug_mode) { - console.warn(message); - } - - this.flush_and_error(message); - - this.connected = false; - this.ready = false; - - this.emit("error", new Error(message)); - // "error" events get turned into exceptions if they aren't listened for. If the user handled this error - // then we should try to reconnect. - this.connection_gone("error"); -}; - -RedisClient.prototype.do_auth = function () { - var self = this; - - if (exports.debug_mode) { - console.log("Sending auth to " + self.host + ":" + self.port + " id " + self.connection_id); - } - self.send_anyway = true; - self.send_command("auth", [this.auth_pass], function (err, res) { - if (err) { - if (err.toString().match("LOADING")) { - // if redis is still loading the db, it will not authenticate and everything else will fail - console.log("Redis still loading, trying to authenticate later"); - setTimeout(function () { - self.do_auth(); - }, 2000); // TODO - magic number alert - return; - } else { - return self.emit("error", new Error("Auth error: " + err.message)); - } - } - if (res.toString() !== "OK") { - return self.emit("error", new Error("Auth failed: " + res.toString())); - } - if (exports.debug_mode) { - console.log("Auth succeeded " + self.host + ":" + self.port + " id " + self.connection_id); - } - if (self.auth_callback) { - self.auth_callback(err, res); - self.auth_callback = null; - } - - // now we are really connected - self.emit("connect"); - if (self.options.no_ready_check) { - self.on_ready(); - } else { - self.ready_check(); - } - }); - self.send_anyway = false; -}; - -RedisClient.prototype.on_connect = function () { - if (exports.debug_mode) { - console.log("Stream connected " + this.host + ":" + this.port + " id " + this.connection_id); - } - var self = this; - - this.connected = true; - this.ready = false; - this.attempts = 0; - this.connections += 1; - this.command_queue = new Queue(); - this.emitted_end = false; - this.initialize_retry_vars(); - if (this.options.socket_nodelay) { - this.stream.setNoDelay(); - } - this.stream.setTimeout(0); - - this.init_parser(); - - if (this.auth_pass) { - this.do_auth(); - } else { - this.emit("connect"); - - if (this.options.no_ready_check) { - this.on_ready(); - } else { - this.ready_check(); - } - } -}; - -RedisClient.prototype.init_parser = function () { - var self = this; - - if (this.options.parser) { - if (! parsers.some(function (parser) { - if (parser.name === self.options.parser) { - self.parser_module = parser; - if (exports.debug_mode) { - console.log("Using parser module: " + self.parser_module.name); - } - return true; - } - })) { - throw new Error("Couldn't find named parser " + self.options.parser + " on this system"); - } - } else { - if (exports.debug_mode) { - console.log("Using default parser module: " + parsers[0].name); - } - this.parser_module = parsers[0]; - } - - this.parser_module.debug_mode = exports.debug_mode; - - // return_buffers sends back Buffers from parser to callback. detect_buffers sends back Buffers from parser, but - // converts to Strings if the input arguments are not Buffers. - this.reply_parser = new this.parser_module.Parser({ - return_buffers: self.options.return_buffers || self.options.detect_buffers || false - }); - - // "reply error" is an error sent back by Redis - this.reply_parser.on("reply error", function (reply) { - self.return_error(new Error(reply)); - }); - this.reply_parser.on("reply", function (reply) { - self.return_reply(reply); - }); - // "error" is bad. Somehow the parser got confused. It'll try to reset and continue. - this.reply_parser.on("error", function (err) { - self.emit("error", new Error("Redis reply parser error: " + err.stack)); - }); -}; - -RedisClient.prototype.on_ready = function () { - var self = this; - - this.ready = true; - - if (this.old_state !== null) { - this.monitoring = this.old_state.monitoring; - this.pub_sub_mode = this.old_state.pub_sub_mode; - this.selected_db = this.old_state.selected_db; - this.old_state = null; - } - - // magically restore any modal commands from a previous connection - if (this.selected_db !== null) { - this.send_command('select', [this.selected_db]); - } - if (this.pub_sub_mode === true) { - // only emit "ready" when all subscriptions were made again - var callback_count = 0; - var callback = function() { - callback_count--; - if (callback_count == 0) { - self.emit("ready"); - } - } - Object.keys(this.subscription_set).forEach(function (key) { - var parts = key.split(" "); - if (exports.debug_mode) { - console.warn("sending pub/sub on_ready " + parts[0] + ", " + parts[1]); - } - callback_count++; - self.send_command(parts[0] + "scribe", [parts[1]], callback); - }); - return; - } else if (this.monitoring) { - this.send_command("monitor"); - } else { - this.send_offline_queue(); - } - this.emit("ready"); -}; - -RedisClient.prototype.on_info_cmd = function (err, res) { - var self = this, obj = {}, lines, retry_time; - - if (err) { - return self.emit("error", new Error("Ready check failed: " + err.message)); - } - - lines = res.toString().split("\r\n"); - - lines.forEach(function (line) { - var parts = line.split(':'); - if (parts[1]) { - obj[parts[0]] = parts[1]; - } - }); - - obj.versions = []; - obj.redis_version.split('.').forEach(function (num) { - obj.versions.push(+num); - }); - - // expose info key/vals to users - this.server_info = obj; - - if (!obj.loading || (obj.loading && obj.loading === "0")) { - if (exports.debug_mode) { - console.log("Redis server ready."); - } - this.on_ready(); - } else { - retry_time = obj.loading_eta_seconds * 1000; - if (retry_time > 1000) { - retry_time = 1000; - } - if (exports.debug_mode) { - console.log("Redis server still loading, trying again in " + retry_time); - } - setTimeout(function () { - self.ready_check(); - }, retry_time); - } -}; - -RedisClient.prototype.ready_check = function () { - var self = this; - - if (exports.debug_mode) { - console.log("checking server ready state..."); - } - - this.send_anyway = true; // secret flag to send_command to send something even if not "ready" - this.info(function (err, res) { - self.on_info_cmd(err, res); - }); - this.send_anyway = false; -}; - -RedisClient.prototype.send_offline_queue = function () { - var command_obj, buffered_writes = 0; - - while (this.offline_queue.length > 0) { - command_obj = this.offline_queue.shift(); - if (exports.debug_mode) { - console.log("Sending offline command: " + command_obj.command); - } - buffered_writes += !this.send_command(command_obj.command, command_obj.args, command_obj.callback); - } - this.offline_queue = new Queue(); - // Even though items were shifted off, Queue backing store still uses memory until next add, so just get a new Queue - - if (!buffered_writes) { - this.should_buffer = false; - this.emit("drain"); - } -}; - -RedisClient.prototype.connection_gone = function (why) { - var self = this, message; - - // If a retry is already in progress, just let that happen - if (this.retry_timer) { - return; - } - - if (exports.debug_mode) { - console.warn("Redis connection is gone from " + why + " event."); - } - this.connected = false; - this.ready = false; - - if (this.old_state === null) { - var state = { - monitoring: this.monitoring, - pub_sub_mode: this.pub_sub_mode, - selected_db: this.selected_db - }; - this.old_state = state; - this.monitoring = false; - this.pub_sub_mode = false; - this.selected_db = null; - } - - // since we are collapsing end and close, users don't expect to be called twice - if (! this.emitted_end) { - this.emit("end"); - this.emitted_end = true; - } - - this.flush_and_error("Redis connection gone from " + why + " event."); - - // If this is a requested shutdown, then don't retry - if (this.closing) { - this.retry_timer = null; - if (exports.debug_mode) { - console.warn("connection ended from quit command, not retrying."); - } - return; - } - - this.retry_delay = Math.floor(this.retry_delay * this.retry_backoff); - - if (exports.debug_mode) { - console.log("Retry connection in " + this.current_retry_delay + " ms"); - } - - if (this.max_attempts && this.attempts >= this.max_attempts) { - this.retry_timer = null; - // TODO - some people need a "Redis is Broken mode" for future commands that errors immediately, and others - // want the program to exit. Right now, we just log, which doesn't really help in either case. - console.error("node_redis: Couldn't get Redis connection after " + this.max_attempts + " attempts."); - return; - } - - this.attempts += 1; - this.emit("reconnecting", { - delay: self.retry_delay, - attempt: self.attempts - }); - this.retry_timer = setTimeout(function () { - if (exports.debug_mode) { - console.log("Retrying connection..."); - } - - self.retry_totaltime += self.current_retry_delay; - - if (self.connect_timeout && self.retry_totaltime >= self.connect_timeout) { - self.retry_timer = null; - // TODO - engage Redis is Broken mode for future commands, or whatever - console.error("node_redis: Couldn't get Redis connection after " + self.retry_totaltime + "ms."); - return; - } - - self.stream.connect(self.port, self.host); - self.retry_timer = null; - }, this.retry_delay); -}; - -RedisClient.prototype.on_data = function (data) { - if (exports.debug_mode) { - console.log("net read " + this.host + ":" + this.port + " id " + this.connection_id + ": " + data.toString()); - } - - try { - this.reply_parser.execute(data); - } catch (err) { - // This is an unexpected parser problem, an exception that came from the parser code itself. - // Parser should emit "error" events if it notices things are out of whack. - // Callbacks that throw exceptions will land in return_reply(), below. - // TODO - it might be nice to have a different "error" event for different types of errors - this.emit("error", err); - } -}; - -RedisClient.prototype.return_error = function (err) { - var command_obj = this.command_queue.shift(), queue_len = this.command_queue.getLength(); - - if (this.pub_sub_mode === false && queue_len === 0) { - this.emit("idle"); - this.command_queue = new Queue(); - } - if (this.should_buffer && queue_len <= this.command_queue_low_water) { - this.emit("drain"); - this.should_buffer = false; - } - - if (command_obj && typeof command_obj.callback === "function") { - try { - command_obj.callback(err); - } catch (callback_err) { - // if a callback throws an exception, re-throw it on a new stack so the parser can keep going - process.nextTick(function () { - throw callback_err; - }); - } - } else { - console.log("node_redis: no callback to send error: " + err.message); - // this will probably not make it anywhere useful, but we might as well throw - process.nextTick(function () { - throw err; - }); - } -}; - -// if a callback throws an exception, re-throw it on a new stack so the parser can keep going. -// put this try/catch in its own function because V8 doesn't optimize this well yet. -function try_callback(callback, reply) { - try { - callback(null, reply); - } catch (err) { - process.nextTick(function () { - throw err; - }); - } -} - -// hgetall converts its replies to an Object. If the reply is empty, null is returned. -function reply_to_object(reply) { - var obj = {}, j, jl, key, val; - - if (reply.length === 0) { - return null; - } - - for (j = 0, jl = reply.length; j < jl; j += 2) { - key = reply[j].toString(); - val = reply[j + 1]; - obj[key] = val; - } - - return obj; -} - -function reply_to_strings(reply) { - var i; - - if (Buffer.isBuffer(reply)) { - return reply.toString(); - } - - if (Array.isArray(reply)) { - for (i = 0; i < reply.length; i++) { - reply[i] = reply[i].toString(); - } - return reply; - } - - return reply; -} - -RedisClient.prototype.return_reply = function (reply) { - var command_obj, obj, i, len, type, timestamp, argindex, args, queue_len; - - command_obj = this.command_queue.shift(), - queue_len = this.command_queue.getLength(); - - if (this.pub_sub_mode === false && queue_len === 0) { - this.emit("idle"); - this.command_queue = new Queue(); // explicitly reclaim storage from old Queue - } - if (this.should_buffer && queue_len <= this.command_queue_low_water) { - this.emit("drain"); - this.should_buffer = false; - } - - if (command_obj && !command_obj.sub_command) { - if (typeof command_obj.callback === "function") { - if (this.options.detect_buffers && command_obj.buffer_args === false) { - // If detect_buffers option was specified, then the reply from the parser will be Buffers. - // If this command did not use Buffer arguments, then convert the reply to Strings here. - reply = reply_to_strings(reply); - } - - // TODO - confusing and error-prone that hgetall is special cased in two places - if (reply && 'hgetall' === command_obj.command.toLowerCase()) { - reply = reply_to_object(reply); - } - - try_callback(command_obj.callback, reply); - } else if (exports.debug_mode) { - console.log("no callback for reply: " + (reply && reply.toString && reply.toString())); - } - } else if (this.pub_sub_mode || (command_obj && command_obj.sub_command)) { - if (Array.isArray(reply)) { - type = reply[0].toString(); - - if (type === "message") { - this.emit("message", reply[1].toString(), reply[2]); // channel, message - } else if (type === "pmessage") { - this.emit("pmessage", reply[1].toString(), reply[2].toString(), reply[3]); // pattern, channel, message - } else if (type === "subscribe" || type === "unsubscribe" || type === "psubscribe" || type === "punsubscribe") { - if (reply[2] === 0) { - this.pub_sub_mode = false; - if (this.debug_mode) { - console.log("All subscriptions removed, exiting pub/sub mode"); - } - } else { - this.pub_sub_mode = true; - } - // subscribe commands take an optional callback and also emit an event, but only the first response is included in the callback - // TODO - document this or fix it so it works in a more obvious way - if (command_obj && typeof command_obj.callback === "function") { - try_callback(command_obj.callback, reply[1].toString()); - } - this.emit(type, reply[1].toString(), reply[2]); // channel, count - } else { - throw new Error("subscriptions are active but got unknown reply type " + type); - } - } else if (! this.closing) { - throw new Error("subscriptions are active but got an invalid reply: " + reply); - } - } else if (this.monitoring) { - len = reply.indexOf(" "); - timestamp = reply.slice(0, len); - argindex = reply.indexOf('"'); - args = reply.slice(argindex + 1, -1).split('" "').map(function (elem) { - return elem.replace(/\\"/g, '"'); - }); - this.emit("monitor", timestamp, args); - } else { - throw new Error("node_redis command queue state error. If you can reproduce this, please report it."); - } -}; - -// This Command constructor is ever so slightly faster than using an object literal, but more importantly, using -// a named constructor helps it show up meaningfully in the V8 CPU profiler and in heap snapshots. -function Command(command, args, sub_command, buffer_args, callback) { - this.command = command; - this.args = args; - this.sub_command = sub_command; - this.buffer_args = buffer_args; - this.callback = callback; -} - -RedisClient.prototype.send_command = function (command, args, callback) { - var arg, this_args, command_obj, i, il, elem_count, buffer_args, stream = this.stream, command_str = "", buffered_writes = 0, last_arg_type; - - if (typeof command !== "string") { - throw new Error("First argument to send_command must be the command name string, not " + typeof command); - } - - if (Array.isArray(args)) { - if (typeof callback === "function") { - // probably the fastest way: - // client.command([arg1, arg2], cb); (straight passthrough) - // send_command(command, [arg1, arg2], cb); - } else if (! callback) { - // most people find this variable argument length form more convenient, but it uses arguments, which is slower - // client.command(arg1, arg2, cb); (wraps up arguments into an array) - // send_command(command, [arg1, arg2, cb]); - // client.command(arg1, arg2); (callback is optional) - // send_command(command, [arg1, arg2]); - // client.command(arg1, arg2, undefined); (callback is undefined) - // send_command(command, [arg1, arg2, undefined]); - last_arg_type = typeof args[args.length - 1]; - if (last_arg_type === "function" || last_arg_type === "undefined") { - callback = args.pop(); - } - } else { - throw new Error("send_command: last argument must be a callback or undefined"); - } - } else { - throw new Error("send_command: second argument must be an array"); - } - - // if the last argument is an array and command is sadd, expand it out: - // client.sadd(arg1, [arg2, arg3, arg4], cb); - // converts to: - // client.sadd(arg1, arg2, arg3, arg4, cb); - if ((command === 'sadd' || command === 'SADD') && args.length > 0 && Array.isArray(args[args.length - 1])) { - args = args.slice(0, -1).concat(args[args.length - 1]); - } - - buffer_args = false; - for (i = 0, il = args.length, arg; i < il; i += 1) { - if (Buffer.isBuffer(args[i])) { - buffer_args = true; - } - } - - command_obj = new Command(command, args, false, buffer_args, callback); - - if ((!this.ready && !this.send_anyway) || !stream.writable) { - if (exports.debug_mode) { - if (!stream.writable) { - console.log("send command: stream is not writeable."); - } - } - - if (this.enable_offline_queue) { - if (exports.debug_mode) { - console.log("Queueing " + command + " for next server connection."); - } - this.offline_queue.push(command_obj); - this.should_buffer = true; - } else { - var not_writeable_error = new Error('send_command: stream not writeable. enable_offline_queue is false'); - if (command_obj.callback) { - command_obj.callback(not_writeable_error); - } else { - throw not_writeable_error; - } - } - - return false; - } - - if (command === "subscribe" || command === "psubscribe" || command === "unsubscribe" || command === "punsubscribe") { - this.pub_sub_command(command_obj); - } else if (command === "monitor") { - this.monitoring = true; - } else if (command === "quit") { - this.closing = true; - } else if (this.pub_sub_mode === true) { - throw new Error("Connection in pub/sub mode, only pub/sub commands may be used"); - } - this.command_queue.push(command_obj); - this.commands_sent += 1; - - elem_count = args.length + 1; - - // Always use "Multi bulk commands", but if passed any Buffer args, then do multiple writes, one for each arg. - // This means that using Buffers in commands is going to be slower, so use Strings if you don't already have a Buffer. - - command_str = "*" + elem_count + "\r\n$" + command.length + "\r\n" + command + "\r\n"; - - if (! buffer_args) { // Build up a string and send entire command in one write - for (i = 0, il = args.length, arg; i < il; i += 1) { - arg = args[i]; - if (typeof arg !== "string") { - arg = String(arg); - } - command_str += "$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"; - } - if (exports.debug_mode) { - console.log("send " + this.host + ":" + this.port + " id " + this.connection_id + ": " + command_str); - } - buffered_writes += !stream.write(command_str); - } else { - if (exports.debug_mode) { - console.log("send command (" + command_str + ") has Buffer arguments"); - } - buffered_writes += !stream.write(command_str); - - for (i = 0, il = args.length, arg; i < il; i += 1) { - arg = args[i]; - if (!(Buffer.isBuffer(arg) || arg instanceof String)) { - arg = String(arg); - } - - if (Buffer.isBuffer(arg)) { - if (arg.length === 0) { - if (exports.debug_mode) { - console.log("send_command: using empty string for 0 length buffer"); - } - buffered_writes += !stream.write("$0\r\n\r\n"); - } else { - buffered_writes += !stream.write("$" + arg.length + "\r\n"); - buffered_writes += !stream.write(arg); - buffered_writes += !stream.write("\r\n"); - if (exports.debug_mode) { - console.log("send_command: buffer send " + arg.length + " bytes"); - } - } - } else { - if (exports.debug_mode) { - console.log("send_command: string send " + Buffer.byteLength(arg) + " bytes: " + arg); - } - buffered_writes += !stream.write("$" + Buffer.byteLength(arg) + "\r\n" + arg + "\r\n"); - } - } - } - if (exports.debug_mode) { - console.log("send_command buffered_writes: " + buffered_writes, " should_buffer: " + this.should_buffer); - } - if (buffered_writes || this.command_queue.getLength() >= this.command_queue_high_water) { - this.should_buffer = true; - } - return !this.should_buffer; -}; - -RedisClient.prototype.pub_sub_command = function (command_obj) { - var i, key, command, args; - - if (this.pub_sub_mode === false && exports.debug_mode) { - console.log("Entering pub/sub mode from " + command_obj.command); - } - this.pub_sub_mode = true; - command_obj.sub_command = true; - - command = command_obj.command; - args = command_obj.args; - if (command === "subscribe" || command === "psubscribe") { - if (command === "subscribe") { - key = "sub"; - } else { - key = "psub"; - } - for (i = 0; i < args.length; i++) { - this.subscription_set[key + " " + args[i]] = true; - } - } else { - if (command === "unsubscribe") { - key = "sub"; - } else { - key = "psub"; - } - for (i = 0; i < args.length; i++) { - delete this.subscription_set[key + " " + args[i]]; - } - } -}; - -RedisClient.prototype.end = function () { - this.stream._events = {}; - this.connected = false; - this.ready = false; - return this.stream.end(); -}; - -function Multi(client, args) { - this.client = client; - this.queue = [["MULTI"]]; - if (Array.isArray(args)) { - this.queue = this.queue.concat(args); - } -} - -exports.Multi = Multi; - -// take 2 arrays and return the union of their elements -function set_union(seta, setb) { - var obj = {}; - - seta.forEach(function (val) { - obj[val] = true; - }); - setb.forEach(function (val) { - obj[val] = true; - }); - return Object.keys(obj); -} - -// This static list of commands is updated from time to time. ./lib/commands.js can be updated with generate_commands.js -commands = set_union(["get", "set", "setnx", "setex", "append", "strlen", "del", "exists", "setbit", "getbit", "setrange", "getrange", "substr", - "incr", "decr", "mget", "rpush", "lpush", "rpushx", "lpushx", "linsert", "rpop", "lpop", "brpop", "brpoplpush", "blpop", "llen", "lindex", - "lset", "lrange", "ltrim", "lrem", "rpoplpush", "sadd", "srem", "smove", "sismember", "scard", "spop", "srandmember", "sinter", "sinterstore", - "sunion", "sunionstore", "sdiff", "sdiffstore", "smembers", "zadd", "zincrby", "zrem", "zremrangebyscore", "zremrangebyrank", "zunionstore", - "zinterstore", "zrange", "zrangebyscore", "zrevrangebyscore", "zcount", "zrevrange", "zcard", "zscore", "zrank", "zrevrank", "hset", "hsetnx", - "hget", "hmset", "hmget", "hincrby", "hdel", "hlen", "hkeys", "hvals", "hgetall", "hexists", "incrby", "decrby", "getset", "mset", "msetnx", - "randomkey", "select", "move", "rename", "renamenx", "expire", "expireat", "keys", "dbsize", "auth", "ping", "echo", "save", "bgsave", - "bgrewriteaof", "shutdown", "lastsave", "type", "multi", "exec", "discard", "sync", "flushdb", "flushall", "sort", "info", "monitor", "ttl", - "persist", "slaveof", "debug", "config", "subscribe", "unsubscribe", "psubscribe", "punsubscribe", "publish", "watch", "unwatch", "cluster", - "restore", "migrate", "dump", "object", "client", "eval", "evalsha"], require("./lib/commands")); - -commands.forEach(function (command) { - RedisClient.prototype[command] = function (args, callback) { - if (Array.isArray(args) && typeof callback === "function") { - return this.send_command(command, args, callback); - } else { - return this.send_command(command, to_array(arguments)); - } - }; - RedisClient.prototype[command.toUpperCase()] = RedisClient.prototype[command]; - - Multi.prototype[command] = function () { - this.queue.push([command].concat(to_array(arguments))); - return this; - }; - Multi.prototype[command.toUpperCase()] = Multi.prototype[command]; -}); - -// store db in this.select_db to restore it on reconnect -RedisClient.prototype.select = function (db, callback) { - var self = this; - - this.send_command('select', [db], function (err, res) { - if (err === null) { - self.selected_db = db; - } - if (typeof(callback) === 'function') { - callback(err, res); - } - }); -}; -RedisClient.prototype.SELECT = RedisClient.prototype.select; - -// Stash auth for connect and reconnect. Send immediately if already connected. -RedisClient.prototype.auth = function () { - var args = to_array(arguments); - this.auth_pass = args[0]; - this.auth_callback = args[1]; - if (exports.debug_mode) { - console.log("Saving auth as " + this.auth_pass); - } - - if (this.connected) { - this.send_command("auth", args); - } -}; -RedisClient.prototype.AUTH = RedisClient.prototype.auth; - -RedisClient.prototype.hmget = function (arg1, arg2, arg3) { - if (Array.isArray(arg2) && typeof arg3 === "function") { - return this.send_command("hmget", [arg1].concat(arg2), arg3); - } else if (Array.isArray(arg1) && typeof arg2 === "function") { - return this.send_command("hmget", arg1, arg2); - } else { - return this.send_command("hmget", to_array(arguments)); - } -}; -RedisClient.prototype.HMGET = RedisClient.prototype.hmget; - -RedisClient.prototype.hmset = function (args, callback) { - var tmp_args, tmp_keys, i, il, key; - - if (Array.isArray(args) && typeof callback === "function") { - return this.send_command("hmset", args, callback); - } - - args = to_array(arguments); - if (typeof args[args.length - 1] === "function") { - callback = args[args.length - 1]; - args.length -= 1; - } else { - callback = null; - } - - if (args.length === 2 && typeof args[0] === "string" && typeof args[1] === "object") { - // User does: client.hmset(key, {key1: val1, key2: val2}) - tmp_args = [ args[0] ]; - tmp_keys = Object.keys(args[1]); - for (i = 0, il = tmp_keys.length; i < il ; i++) { - key = tmp_keys[i]; - tmp_args.push(key); - if (typeof args[1][key] !== "string") { - var err = new Error("hmset expected value to be a string", key, ":", args[1][key]); - if (callback) return callback(err); - else throw err; - } - tmp_args.push(args[1][key]); - } - args = tmp_args; - } - - return this.send_command("hmset", args, callback); -}; -RedisClient.prototype.HMSET = RedisClient.prototype.hmset; - -Multi.prototype.hmset = function () { - var args = to_array(arguments), tmp_args; - if (args.length >= 2 && typeof args[0] === "string" && typeof args[1] === "object") { - tmp_args = [ "hmset", args[0] ]; - Object.keys(args[1]).map(function (key) { - tmp_args.push(key); - tmp_args.push(args[1][key]); - }); - if (args[2]) { - tmp_args.push(args[2]); - } - args = tmp_args; - } else { - args.unshift("hmset"); - } - - this.queue.push(args); - return this; -}; -Multi.prototype.HMSET = Multi.prototype.hmset; - -Multi.prototype.exec = function (callback) { - var self = this; - - // drain queue, callback will catch "QUEUED" or error - // TODO - get rid of all of these anonymous functions which are elegant but slow - this.queue.forEach(function (args, index) { - var command = args[0], obj; - if (typeof args[args.length - 1] === "function") { - args = args.slice(1, -1); - } else { - args = args.slice(1); - } - if (args.length === 1 && Array.isArray(args[0])) { - args = args[0]; - } - if (command.toLowerCase() === 'hmset' && typeof args[1] === 'object') { - obj = args.pop(); - Object.keys(obj).forEach(function (key) { - args.push(key); - args.push(obj[key]); - }); - } - this.client.send_command(command, args, function (err, reply) { - if (err) { - var cur = self.queue[index]; - if (typeof cur[cur.length - 1] === "function") { - cur[cur.length - 1](err); - } else { - throw new Error(err); - } - self.queue.splice(index, 1); - } - }); - }, this); - - // TODO - make this callback part of Multi.prototype instead of creating it each time - return this.client.send_command("EXEC", [], function (err, replies) { - if (err) { - if (callback) { - callback(new Error(err)); - return; - } else { - throw new Error(err); - } - } - - var i, il, j, jl, reply, args; - - if (replies) { - for (i = 1, il = self.queue.length; i < il; i += 1) { - reply = replies[i - 1]; - args = self.queue[i]; - - // TODO - confusing and error-prone that hgetall is special cased in two places - if (reply && args[0].toLowerCase() === "hgetall") { - replies[i - 1] = reply = reply_to_object(reply); - } - - if (typeof args[args.length - 1] === "function") { - args[args.length - 1](null, reply); - } - } - } - - if (callback) { - callback(null, replies); - } - }); -}; -Multi.prototype.EXEC = Multi.prototype.exec; - -RedisClient.prototype.multi = function (args) { - return new Multi(this, args); -}; -RedisClient.prototype.MULTI = function (args) { - return new Multi(this, args); -}; - - -// stash original eval method -var eval = RedisClient.prototype.eval; -// hook eval with an attempt to evalsha for cached scripts -RedisClient.prototype.eval = -RedisClient.prototype.EVAL = function () { - var self = this, - args = to_array(arguments), - callback; - - if (typeof args[args.length - 1] === "function") { - callback = args.pop(); - } - - // replace script source with sha value - var source = args[0]; - args[0] = crypto.createHash("sha1").update(source).digest("hex"); - - self.evalsha(args, function (err, reply) { - if (err && /NOSCRIPT/.test(err.message)) { - args[0] = source; - eval.call(self, args, callback); - - } else if (callback) { - callback(err, reply); - } - }); -}; - - -exports.createClient = function (port_arg, host_arg, options) { - var port = port_arg || default_port, - host = host_arg || default_host, - redis_client, net_client; - - net_client = net.createConnection(port, host); - - redis_client = new RedisClient(net_client, options); - - redis_client.port = port; - redis_client.host = host; - - return redis_client; -}; - -exports.print = function (err, reply) { - if (err) { - console.log("Error: " + err); - } else { - console.log("Reply: " + reply); - } -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/commands.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/commands.js deleted file mode 100644 index f57cca96..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/commands.js +++ /dev/null @@ -1,147 +0,0 @@ -// This file was generated by ./generate_commands.js on Mon Aug 06 2012 15:04:06 GMT-0700 (PDT) -module.exports = [ - "append", - "auth", - "bgrewriteaof", - "bgsave", - "bitcount", - "bitop", - "blpop", - "brpop", - "brpoplpush", - "client kill", - "client list", - "config get", - "config set", - "config resetstat", - "dbsize", - "debug object", - "debug segfault", - "decr", - "decrby", - "del", - "discard", - "dump", - "echo", - "eval", - "evalsha", - "exec", - "exists", - "expire", - "expireat", - "flushall", - "flushdb", - "get", - "getbit", - "getrange", - "getset", - "hdel", - "hexists", - "hget", - "hgetall", - "hincrby", - "hincrbyfloat", - "hkeys", - "hlen", - "hmget", - "hmset", - "hset", - "hsetnx", - "hvals", - "incr", - "incrby", - "incrbyfloat", - "info", - "keys", - "lastsave", - "lindex", - "linsert", - "llen", - "lpop", - "lpush", - "lpushx", - "lrange", - "lrem", - "lset", - "ltrim", - "mget", - "migrate", - "monitor", - "move", - "mset", - "msetnx", - "multi", - "object", - "persist", - "pexpire", - "pexpireat", - "ping", - "psetex", - "psubscribe", - "pttl", - "publish", - "punsubscribe", - "quit", - "randomkey", - "rename", - "renamenx", - "restore", - "rpop", - "rpoplpush", - "rpush", - "rpushx", - "sadd", - "save", - "scard", - "script exists", - "script flush", - "script kill", - "script load", - "sdiff", - "sdiffstore", - "select", - "set", - "setbit", - "setex", - "setnx", - "setrange", - "shutdown", - "sinter", - "sinterstore", - "sismember", - "slaveof", - "slowlog", - "smembers", - "smove", - "sort", - "spop", - "srandmember", - "srem", - "strlen", - "subscribe", - "sunion", - "sunionstore", - "sync", - "time", - "ttl", - "type", - "unsubscribe", - "unwatch", - "watch", - "zadd", - "zcard", - "zcount", - "zincrby", - "zinterstore", - "zrange", - "zrangebyscore", - "zrank", - "zrem", - "zremrangebyrank", - "zremrangebyscore", - "zrevrange", - "zrevrangebyscore", - "zrevrank", - "zscore", - "zunionstore" -]; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js deleted file mode 100644 index cbb15ba3..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/parser/hiredis.js +++ /dev/null @@ -1,46 +0,0 @@ -/*global Buffer require exports console setTimeout */ - -var events = require("events"), - util = require("../util"), - hiredis = require("hiredis"); - -exports.debug_mode = false; -exports.name = "hiredis"; - -function HiredisReplyParser(options) { - this.name = exports.name; - this.options = options || {}; - this.reset(); - events.EventEmitter.call(this); -} - -util.inherits(HiredisReplyParser, events.EventEmitter); - -exports.Parser = HiredisReplyParser; - -HiredisReplyParser.prototype.reset = function () { - this.reader = new hiredis.Reader({ - return_buffers: this.options.return_buffers || false - }); -}; - -HiredisReplyParser.prototype.execute = function (data) { - var reply; - this.reader.feed(data); - while (true) { - try { - reply = this.reader.get(); - } catch (err) { - this.emit("error", err); - break; - } - - if (reply === undefined) break; - - if (reply && reply.constructor === Error) { - this.emit("reply error", reply); - } else { - this.emit("reply", reply); - } - } -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/parser/javascript.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/parser/javascript.js deleted file mode 100644 index b8f5bc68..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/parser/javascript.js +++ /dev/null @@ -1,317 +0,0 @@ -/*global Buffer require exports console setTimeout */ - -// TODO - incorporate these V8 pro tips: -// pre-allocate Arrays if length is known in advance -// do not use delete -// use numbers for parser state - -var events = require("events"), - util = require("../util"); - -exports.debug_mode = false; -exports.name = "javascript"; - -function RedisReplyParser(options) { - this.name = exports.name; - this.options = options || {}; - this.reset(); - events.EventEmitter.call(this); -} - -util.inherits(RedisReplyParser, events.EventEmitter); - -exports.Parser = RedisReplyParser; - -// Buffer.toString() is quite slow for small strings -function small_toString(buf, len) { - var tmp = "", i; - - for (i = 0; i < len; i += 1) { - tmp += String.fromCharCode(buf[i]); - } - - return tmp; -} - -// Reset parser to it's original state. -RedisReplyParser.prototype.reset = function () { - this.return_buffer = new Buffer(16384); // for holding replies, might grow - this.return_string = ""; - this.tmp_string = ""; // for holding size fields - - this.multi_bulk_length = 0; - this.multi_bulk_replies = null; - this.multi_bulk_pos = 0; - this.multi_bulk_nested_length = 0; - this.multi_bulk_nested_replies = null; - - this.states = { - TYPE: 1, - SINGLE_LINE: 2, - MULTI_BULK_COUNT: 3, - INTEGER_LINE: 4, - BULK_LENGTH: 5, - ERROR_LINE: 6, - BULK_DATA: 7, - UNKNOWN_TYPE: 8, - FINAL_CR: 9, - FINAL_LF: 10, - MULTI_BULK_COUNT_LF: 11, - BULK_LF: 12 - }; - - this.state = this.states.TYPE; -}; - -RedisReplyParser.prototype.parser_error = function (message) { - this.emit("error", message); - this.reset(); -}; - -RedisReplyParser.prototype.execute = function (incoming_buf) { - var pos = 0, bd_tmp, bd_str, i, il, states = this.states; - //, state_times = {}, start_execute = new Date(), start_switch, end_switch, old_state; - //start_switch = new Date(); - - while (pos < incoming_buf.length) { - // old_state = this.state; - // console.log("execute: " + this.state + ", " + pos + "/" + incoming_buf.length + ", " + String.fromCharCode(incoming_buf[pos])); - - switch (this.state) { - case 1: // states.TYPE - this.type = incoming_buf[pos]; - pos += 1; - - switch (this.type) { - case 43: // + - this.state = states.SINGLE_LINE; - this.return_buffer.end = 0; - this.return_string = ""; - break; - case 42: // * - this.state = states.MULTI_BULK_COUNT; - this.tmp_string = ""; - break; - case 58: // : - this.state = states.INTEGER_LINE; - this.return_buffer.end = 0; - this.return_string = ""; - break; - case 36: // $ - this.state = states.BULK_LENGTH; - this.tmp_string = ""; - break; - case 45: // - - this.state = states.ERROR_LINE; - this.return_buffer.end = 0; - this.return_string = ""; - break; - default: - this.state = states.UNKNOWN_TYPE; - } - break; - case 4: // states.INTEGER_LINE - if (incoming_buf[pos] === 13) { - this.send_reply(+small_toString(this.return_buffer, this.return_buffer.end)); - this.state = states.FINAL_LF; - } else { - this.return_buffer[this.return_buffer.end] = incoming_buf[pos]; - this.return_buffer.end += 1; - } - pos += 1; - break; - case 6: // states.ERROR_LINE - if (incoming_buf[pos] === 13) { - this.send_error(this.return_buffer.toString("ascii", 0, this.return_buffer.end)); - this.state = states.FINAL_LF; - } else { - this.return_buffer[this.return_buffer.end] = incoming_buf[pos]; - this.return_buffer.end += 1; - } - pos += 1; - break; - case 2: // states.SINGLE_LINE - if (incoming_buf[pos] === 13) { - this.send_reply(this.return_string); - this.state = states.FINAL_LF; - } else { - this.return_string += String.fromCharCode(incoming_buf[pos]); - } - pos += 1; - break; - case 3: // states.MULTI_BULK_COUNT - if (incoming_buf[pos] === 13) { // \r - this.state = states.MULTI_BULK_COUNT_LF; - } else { - this.tmp_string += String.fromCharCode(incoming_buf[pos]); - } - pos += 1; - break; - case 11: // states.MULTI_BULK_COUNT_LF - if (incoming_buf[pos] === 10) { // \n - if (this.multi_bulk_length) { // nested multi-bulk - this.multi_bulk_nested_length = this.multi_bulk_length; - this.multi_bulk_nested_replies = this.multi_bulk_replies; - this.multi_bulk_nested_pos = this.multi_bulk_pos; - } - this.multi_bulk_length = +this.tmp_string; - this.multi_bulk_pos = 0; - this.state = states.TYPE; - if (this.multi_bulk_length < 0) { - this.send_reply(null); - this.multi_bulk_length = 0; - } else if (this.multi_bulk_length === 0) { - this.multi_bulk_pos = 0; - this.multi_bulk_replies = null; - this.send_reply([]); - } else { - this.multi_bulk_replies = new Array(this.multi_bulk_length); - } - } else { - this.parser_error(new Error("didn't see LF after NL reading multi bulk count")); - return; - } - pos += 1; - break; - case 5: // states.BULK_LENGTH - if (incoming_buf[pos] === 13) { // \r - this.state = states.BULK_LF; - } else { - this.tmp_string += String.fromCharCode(incoming_buf[pos]); - } - pos += 1; - break; - case 12: // states.BULK_LF - if (incoming_buf[pos] === 10) { // \n - this.bulk_length = +this.tmp_string; - if (this.bulk_length === -1) { - this.send_reply(null); - this.state = states.TYPE; - } else if (this.bulk_length === 0) { - this.send_reply(new Buffer("")); - this.state = states.FINAL_CR; - } else { - this.state = states.BULK_DATA; - if (this.bulk_length > this.return_buffer.length) { - if (exports.debug_mode) { - console.log("Growing return_buffer from " + this.return_buffer.length + " to " + this.bulk_length); - } - this.return_buffer = new Buffer(this.bulk_length); - } - this.return_buffer.end = 0; - } - } else { - this.parser_error(new Error("didn't see LF after NL while reading bulk length")); - return; - } - pos += 1; - break; - case 7: // states.BULK_DATA - this.return_buffer[this.return_buffer.end] = incoming_buf[pos]; - this.return_buffer.end += 1; - pos += 1; - if (this.return_buffer.end === this.bulk_length) { - bd_tmp = new Buffer(this.bulk_length); - // When the response is small, Buffer.copy() is a lot slower. - if (this.bulk_length > 10) { - this.return_buffer.copy(bd_tmp, 0, 0, this.bulk_length); - } else { - for (i = 0, il = this.bulk_length; i < il; i += 1) { - bd_tmp[i] = this.return_buffer[i]; - } - } - this.send_reply(bd_tmp); - this.state = states.FINAL_CR; - } - break; - case 9: // states.FINAL_CR - if (incoming_buf[pos] === 13) { // \r - this.state = states.FINAL_LF; - pos += 1; - } else { - this.parser_error(new Error("saw " + incoming_buf[pos] + " when expecting final CR")); - return; - } - break; - case 10: // states.FINAL_LF - if (incoming_buf[pos] === 10) { // \n - this.state = states.TYPE; - pos += 1; - } else { - this.parser_error(new Error("saw " + incoming_buf[pos] + " when expecting final LF")); - return; - } - break; - default: - this.parser_error(new Error("invalid state " + this.state)); - } - // end_switch = new Date(); - // if (state_times[old_state] === undefined) { - // state_times[old_state] = 0; - // } - // state_times[old_state] += (end_switch - start_switch); - // start_switch = end_switch; - } - // console.log("execute ran for " + (Date.now() - start_execute) + " ms, on " + incoming_buf.length + " Bytes. "); - // Object.keys(state_times).forEach(function (state) { - // console.log(" " + state + ": " + state_times[state]); - // }); -}; - -RedisReplyParser.prototype.send_error = function (reply) { - if (this.multi_bulk_length > 0 || this.multi_bulk_nested_length > 0) { - // TODO - can this happen? Seems like maybe not. - this.add_multi_bulk_reply(reply); - } else { - this.emit("reply error", reply); - } -}; - -RedisReplyParser.prototype.send_reply = function (reply) { - if (this.multi_bulk_length > 0 || this.multi_bulk_nested_length > 0) { - if (!this.options.return_buffers && Buffer.isBuffer(reply)) { - this.add_multi_bulk_reply(reply.toString("utf8")); - } else { - this.add_multi_bulk_reply(reply); - } - } else { - if (!this.options.return_buffers && Buffer.isBuffer(reply)) { - this.emit("reply", reply.toString("utf8")); - } else { - this.emit("reply", reply); - } - } -}; - -RedisReplyParser.prototype.add_multi_bulk_reply = function (reply) { - if (this.multi_bulk_replies) { - this.multi_bulk_replies[this.multi_bulk_pos] = reply; - this.multi_bulk_pos += 1; - if (this.multi_bulk_pos < this.multi_bulk_length) { - return; - } - } else { - this.multi_bulk_replies = reply; - } - - if (this.multi_bulk_nested_length > 0) { - this.multi_bulk_nested_replies[this.multi_bulk_nested_pos] = this.multi_bulk_replies; - this.multi_bulk_nested_pos += 1; - - this.multi_bulk_length = 0; - this.multi_bulk_replies = null; - this.multi_bulk_pos = 0; - - if (this.multi_bulk_nested_length === this.multi_bulk_nested_pos) { - this.emit("reply", this.multi_bulk_nested_replies); - this.multi_bulk_nested_length = 0; - this.multi_bulk_nested_pos = 0; - this.multi_bulk_nested_replies = null; - } - } else { - this.emit("reply", this.multi_bulk_replies); - this.multi_bulk_length = 0; - this.multi_bulk_replies = null; - this.multi_bulk_pos = 0; - } -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/queue.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/queue.js deleted file mode 100644 index 56254e1c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/queue.js +++ /dev/null @@ -1,61 +0,0 @@ -var to_array = require("./to_array"); - -// Queue class adapted from Tim Caswell's pattern library -// http://github.com/creationix/pattern/blob/master/lib/pattern/queue.js - -function Queue() { - this.tail = []; - this.head = []; - this.offset = 0; -} - -Queue.prototype.shift = function () { - if (this.offset === this.head.length) { - var tmp = this.head; - tmp.length = 0; - this.head = this.tail; - this.tail = tmp; - this.offset = 0; - if (this.head.length === 0) { - return; - } - } - return this.head[this.offset++]; // sorry, JSLint -}; - -Queue.prototype.push = function (item) { - return this.tail.push(item); -}; - -Queue.prototype.forEach = function (fn, thisv) { - var array = this.head.slice(this.offset), i, il; - - array.push.apply(array, this.tail); - - if (thisv) { - for (i = 0, il = array.length; i < il; i += 1) { - fn.call(thisv, array[i], i, array); - } - } else { - for (i = 0, il = array.length; i < il; i += 1) { - fn(array[i], i, array); - } - } - - return array; -}; - -Queue.prototype.getLength = function () { - return this.head.length - this.offset + this.tail.length; -}; - -Object.defineProperty(Queue.prototype, 'length', { - get: function () { - return this.getLength(); - } -}); - - -if(typeof module !== 'undefined' && module.exports) { - module.exports = Queue; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/to_array.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/to_array.js deleted file mode 100644 index 88a57e18..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/to_array.js +++ /dev/null @@ -1,12 +0,0 @@ -function to_array(args) { - var len = args.length, - arr = new Array(len), i; - - for (i = 0; i < len; i += 1) { - arr[i] = args[i]; - } - - return arr; -} - -module.exports = to_array; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/util.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/util.js deleted file mode 100644 index fc255ae9..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/lib/util.js +++ /dev/null @@ -1,11 +0,0 @@ -// Support for very old versions of node where the module was called "sys". At some point, we should abandon this. - -var util; - -try { - util = require("util"); -} catch (err) { - util = require("sys"); -} - -module.exports = util; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/mem.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/mem.js deleted file mode 100644 index 5144ab28..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/mem.js +++ /dev/null @@ -1,11 +0,0 @@ -var client = require("redis").createClient(); - -client.set("foo", "barvalskdjlksdjflkdsjflksdjdflkdsjflksdjflksdj", function (err, res) { - if (err) { - console.log("Got an error, please adapt somehow."); - } else { - console.log("Got a result: " + res); - } -}); - -client.quit(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/multi_bench.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/multi_bench.js deleted file mode 100644 index 5be2e564..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/multi_bench.js +++ /dev/null @@ -1,225 +0,0 @@ -var redis = require("./index"), - metrics = require("metrics"), - num_clients = parseInt(process.argv[2], 10) || 5, - num_requests = 20000, - tests = [], - versions_logged = false, - client_options = { - return_buffers: false - }, - small_str, large_str, small_buf, large_buf; - -redis.debug_mode = false; - -function lpad(input, len, chr) { - var str = input.toString(); - chr = chr || " "; - - while (str.length < len) { - str = chr + str; - } - return str; -} - -metrics.Histogram.prototype.print_line = function () { - var obj = this.printObj(); - - return lpad(obj.min, 4) + "/" + lpad(obj.max, 4) + "/" + lpad(obj.mean.toFixed(2), 7) + "/" + lpad(obj.p95.toFixed(2), 7); -}; - -function Test(args) { - var self = this; - - this.args = args; - - this.callback = null; - this.clients = []; - this.clients_ready = 0; - this.commands_sent = 0; - this.commands_completed = 0; - this.max_pipeline = this.args.pipeline || num_requests; - this.client_options = args.client_options || client_options; - - this.connect_latency = new metrics.Histogram(); - this.ready_latency = new metrics.Histogram(); - this.command_latency = new metrics.Histogram(); -} - -Test.prototype.run = function (callback) { - var self = this, i; - - this.callback = callback; - - for (i = 0; i < num_clients ; i++) { - this.new_client(i); - } -}; - -Test.prototype.new_client = function (id) { - var self = this, new_client; - - new_client = redis.createClient(6379, "127.0.0.1", this.client_options); - new_client.create_time = Date.now(); - - new_client.on("connect", function () { - self.connect_latency.update(Date.now() - new_client.create_time); - }); - - new_client.on("ready", function () { - if (! versions_logged) { - console.log("Client count: " + num_clients + ", node version: " + process.versions.node + ", server version: " + - new_client.server_info.redis_version + ", parser: " + new_client.reply_parser.name); - versions_logged = true; - } - self.ready_latency.update(Date.now() - new_client.create_time); - self.clients_ready++; - if (self.clients_ready === self.clients.length) { - self.on_clients_ready(); - } - }); - - self.clients[id] = new_client; -}; - -Test.prototype.on_clients_ready = function () { - process.stdout.write(lpad(this.args.descr, 13) + ", " + lpad(this.args.pipeline, 5) + "/" + this.clients_ready + " "); - this.test_start = Date.now(); - - this.fill_pipeline(); -}; - -Test.prototype.fill_pipeline = function () { - var pipeline = this.commands_sent - this.commands_completed; - - while (this.commands_sent < num_requests && pipeline < this.max_pipeline) { - this.commands_sent++; - pipeline++; - this.send_next(); - } - - if (this.commands_completed === num_requests) { - this.print_stats(); - this.stop_clients(); - } -}; - -Test.prototype.stop_clients = function () { - var self = this; - - this.clients.forEach(function (client, pos) { - if (pos === self.clients.length - 1) { - client.quit(function (err, res) { - self.callback(); - }); - } else { - client.quit(); - } - }); -}; - -Test.prototype.send_next = function () { - var self = this, - cur_client = this.commands_sent % this.clients.length, - command_num = this.commands_sent, - start = Date.now(); - - this.clients[cur_client][this.args.command](this.args.args, function (err, res) { - if (err) { - throw err; - } - self.commands_completed++; - self.command_latency.update(Date.now() - start); - self.fill_pipeline(); - }); -}; - -Test.prototype.print_stats = function () { - var duration = Date.now() - this.test_start; - - console.log("min/max/avg/p95: " + this.command_latency.print_line() + " " + lpad(duration, 6) + "ms total, " + - lpad((num_requests / (duration / 1000)).toFixed(2), 8) + " ops/sec"); -}; - -small_str = "1234"; -small_buf = new Buffer(small_str); -large_str = (new Array(4097).join("-")); -large_buf = new Buffer(large_str); - -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 1})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 50})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 200})); -tests.push(new Test({descr: "PING", command: "ping", args: [], pipeline: 20000})); - -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 1})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 50})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 200})); -tests.push(new Test({descr: "SET small str", command: "set", args: ["foo_rand000000000000", small_str], pipeline: 20000})); - -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 1})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 50})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 200})); -tests.push(new Test({descr: "SET small buf", command: "set", args: ["foo_rand000000000000", small_buf], pipeline: 20000})); - -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 1})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 50})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 200})); -tests.push(new Test({descr: "GET small str", command: "get", args: ["foo_rand000000000000"], pipeline: 20000})); - -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 1, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 50, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 200, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET small buf", command: "get", args: ["foo_rand000000000000"], pipeline: 20000, client_opts: { return_buffers: true} })); - -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 1})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 50})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 200})); -tests.push(new Test({descr: "SET large str", command: "set", args: ["foo_rand000000000001", large_str], pipeline: 20000})); - -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 1})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 50})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 200})); -tests.push(new Test({descr: "SET large buf", command: "set", args: ["foo_rand000000000001", large_buf], pipeline: 20000})); - -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 1})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 50})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 200})); -tests.push(new Test({descr: "GET large str", command: "get", args: ["foo_rand000000000001"], pipeline: 20000})); - -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 1, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 50, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 200, client_opts: { return_buffers: true} })); -tests.push(new Test({descr: "GET large buf", command: "get", args: ["foo_rand000000000001"], pipeline: 20000, client_opts: { return_buffers: true} })); - -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 1})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 50})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 200})); -tests.push(new Test({descr: "INCR", command: "incr", args: ["counter_rand000000000000"], pipeline: 20000})); - -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 1})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 50})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 200})); -tests.push(new Test({descr: "LPUSH", command: "lpush", args: ["mylist", small_str], pipeline: 20000})); - -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 1})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 50})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 200})); -tests.push(new Test({descr: "LRANGE 10", command: "lrange", args: ["mylist", "0", "9"], pipeline: 20000})); - -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 1})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 50})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 200})); -tests.push(new Test({descr: "LRANGE 100", command: "lrange", args: ["mylist", "0", "99"], pipeline: 20000})); - -function next() { - var test = tests.shift(); - if (test) { - test.run(function () { - next(); - }); - } else { - console.log("End of tests."); - process.exit(0); - } -} - -next(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/package.json b/node_modules/karma/node_modules/socket.io/node_modules/redis/package.json deleted file mode 100644 index 962c042e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/package.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "redis", - "version": "0.7.3", - "description": "Redis client library", - "author": { - "name": "Matt Ranney", - "email": "mjr@ranney.com" - }, - "maintainers": [ - { - "name": "David Trejo", - "email": "david.daniel.trejo@gmail.com", - "url": "http://dtrejo.com/" - } - ], - "main": "./index.js", - "scripts": { - "test": "node ./test.js" - }, - "devDependencies": { - "metrics": ">=0.1.5" - }, - "repository": { - "type": "git", - "url": "git://github.com/mranney/node_redis.git" - }, - "readme": "redis - a node.js redis client\n===========================\n\nThis is a complete Redis client for node.js. It supports all Redis commands, including many recently added commands like EVAL from\nexperimental Redis server branches.\n\n\nInstall with:\n\n npm install redis\n\nPieter Noordhuis has provided a binding to the official `hiredis` C library, which is non-blocking and fast. To use `hiredis`, do:\n\n npm install hiredis redis\n\nIf `hiredis` is installed, `node_redis` will use it by default. Otherwise, a pure JavaScript parser will be used.\n\nIf you use `hiredis`, be sure to rebuild it whenever you upgrade your version of node. There are mysterious failures that can\nhappen between node and native code modules after a node upgrade.\n\n\n## Usage\n\nSimple example, included as `examples/simple.js`:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n // if you'd like to select database 3, instead of 0 (default), call\n // client.select(3, function() { /* ... */ });\n\n client.on(\"error\", function (err) {\n console.log(\"Error \" + err);\n });\n\n client.set(\"string key\", \"string val\", redis.print);\n client.hset(\"hash key\", \"hashtest 1\", \"some value\", redis.print);\n client.hset([\"hash key\", \"hashtest 2\", \"some other value\"], redis.print);\n client.hkeys(\"hash key\", function (err, replies) {\n console.log(replies.length + \" replies:\");\n replies.forEach(function (reply, i) {\n console.log(\" \" + i + \": \" + reply);\n });\n client.quit();\n });\n```\n\nThis will display:\n\n mjr:~/work/node_redis (master)$ node example.js\n Reply: OK\n Reply: 0\n Reply: 0\n 2 replies:\n 0: hashtest 1\n 1: hashtest 2\n mjr:~/work/node_redis (master)$\n\n\n## Performance\n\nHere are typical results of `multi_bench.js` which is similar to `redis-benchmark` from the Redis distribution.\nIt uses 50 concurrent connections with no pipelining.\n\nJavaScript parser:\n\n PING: 20000 ops 42283.30 ops/sec 0/5/1.182\n SET: 20000 ops 32948.93 ops/sec 1/7/1.515\n GET: 20000 ops 28694.40 ops/sec 0/9/1.740\n INCR: 20000 ops 39370.08 ops/sec 0/8/1.269\n LPUSH: 20000 ops 36429.87 ops/sec 0/8/1.370\n LRANGE (10 elements): 20000 ops 9891.20 ops/sec 1/9/5.048\n LRANGE (100 elements): 20000 ops 1384.56 ops/sec 10/91/36.072\n\nhiredis parser:\n\n PING: 20000 ops 46189.38 ops/sec 1/4/1.082\n SET: 20000 ops 41237.11 ops/sec 0/6/1.210\n GET: 20000 ops 39682.54 ops/sec 1/7/1.257\n INCR: 20000 ops 40080.16 ops/sec 0/8/1.242\n LPUSH: 20000 ops 41152.26 ops/sec 0/3/1.212\n LRANGE (10 elements): 20000 ops 36563.07 ops/sec 1/8/1.363\n LRANGE (100 elements): 20000 ops 21834.06 ops/sec 0/9/2.287\n\nThe performance of `node_redis` improves dramatically with pipelining, which happens automatically in most normal programs.\n\n\n### Sending Commands\n\nEach Redis command is exposed as a function on the `client` object.\nAll functions take either an `args` Array plus optional `callback` Function or\na variable number of individual arguments followed by an optional callback.\nHere is an example of passing an array of arguments and a callback:\n\n client.mset([\"test keys 1\", \"test val 1\", \"test keys 2\", \"test val 2\"], function (err, res) {});\n\nHere is that same call in the second style:\n\n client.mset(\"test keys 1\", \"test val 1\", \"test keys 2\", \"test val 2\", function (err, res) {});\n\nNote that in either form the `callback` is optional:\n\n client.set(\"some key\", \"some val\");\n client.set([\"some other key\", \"some val\"]);\n\nIf the key is missing, reply will be null (probably):\n\n client.get(\"missingkey\", function(err, reply) {\n // reply is null when the key is missing\n console.log(reply);\n });\n\nFor a list of Redis commands, see [Redis Command Reference](http://redis.io/commands)\n\nThe commands can be specified in uppercase or lowercase for convenience. `client.get()` is the same as `client.GET()`.\n\nMinimal parsing is done on the replies. Commands that return a single line reply return JavaScript Strings,\ninteger replies return JavaScript Numbers, \"bulk\" replies return node Buffers, and \"multi bulk\" replies return a\nJavaScript Array of node Buffers. `HGETALL` returns an Object with Buffers keyed by the hash keys.\n\n# API\n\n## Connection Events\n\n`client` will emit some events about the state of the connection to the Redis server.\n\n### \"ready\"\n\n`client` will emit `ready` a connection is established to the Redis server and the server reports\nthat it is ready to receive commands. Commands issued before the `ready` event are queued,\nthen replayed just before this event is emitted.\n\n### \"connect\"\n\n`client` will emit `connect` at the same time as it emits `ready` unless `client.options.no_ready_check`\nis set. If this options is set, `connect` will be emitted when the stream is connected, and then\nyou are free to try to send commands.\n\n### \"error\"\n\n`client` will emit `error` when encountering an error connecting to the Redis server.\n\nNote that \"error\" is a special event type in node. If there are no listeners for an\n\"error\" event, node will exit. This is usually what you want, but it can lead to some\ncryptic error messages like this:\n\n mjr:~/work/node_redis (master)$ node example.js\n\n node.js:50\n throw e;\n ^\n Error: ECONNREFUSED, Connection refused\n at IOWatcher.callback (net:870:22)\n at node.js:607:9\n\nNot very useful in diagnosing the problem, but if your program isn't ready to handle this,\nit is probably the right thing to just exit.\n\n`client` will also emit `error` if an exception is thrown inside of `node_redis` for whatever reason.\nIt would be nice to distinguish these two cases.\n\n### \"end\"\n\n`client` will emit `end` when an established Redis server connection has closed.\n\n### \"drain\"\n\n`client` will emit `drain` when the TCP connection to the Redis server has been buffering, but is now\nwritable. This event can be used to stream commands in to Redis and adapt to backpressure. Right now,\nyou need to check `client.command_queue.length` to decide when to reduce your send rate. Then you can\nresume sending when you get `drain`.\n\n### \"idle\"\n\n`client` will emit `idle` when there are no outstanding commands that are awaiting a response.\n\n## redis.createClient(port, host, options)\n\nCreate a new client connection. `port` defaults to `6379` and `host` defaults\nto `127.0.0.1`. If you have `redis-server` running on the same computer as node, then the defaults for\nport and host are probably fine. `options` in an object with the following possible properties:\n\n* `parser`: which Redis protocol reply parser to use. Defaults to `hiredis` if that module is installed.\nThis may also be set to `javascript`.\n* `return_buffers`: defaults to `false`. If set to `true`, then all replies will be sent to callbacks as node Buffer\nobjects instead of JavaScript Strings.\n* `detect_buffers`: default to `false`. If set to `true`, then replies will be sent to callbacks as node Buffer objects\nif any of the input arguments to the original command were Buffer objects.\nThis option lets you switch between Buffers and Strings on a per-command basis, whereas `return_buffers` applies to\nevery command on a client.\n* `socket_nodelay`: defaults to `true`. Whether to call setNoDelay() on the TCP stream, which disables the\nNagle algorithm on the underlying socket. Setting this option to `false` can result in additional throughput at the\ncost of more latency. Most applications will want this set to `true`.\n* `no_ready_check`: defaults to `false`. When a connection is established to the Redis server, the server might still\nbe loading the database from disk. While loading, the server not respond to any commands. To work around this,\n`node_redis` has a \"ready check\" which sends the `INFO` command to the server. The response from the `INFO` command\nindicates whether the server is ready for more commands. When ready, `node_redis` emits a `ready` event.\nSetting `no_ready_check` to `true` will inhibit this check.\n* `enable_offline_queue`: defaults to `true`. By default, if there is no active\nconnection to the redis server, commands are added to a queue and are executed\nonce the connection has been established. Setting `enable_offline_queue` to\n`false` will disable this feature and the callback will be execute immediately\nwith an error, or an error will be thrown if no callback is specified.\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(null, null, {detect_buffers: true});\n\n client.set(\"foo_rand000000000000\", \"OK\");\n\n // This will return a JavaScript String\n client.get(\"foo_rand000000000000\", function (err, reply) {\n console.log(reply.toString()); // Will print `OK`\n });\n\n // This will return a Buffer since original key is specified as a Buffer\n client.get(new Buffer(\"foo_rand000000000000\"), function (err, reply) {\n console.log(reply.toString()); // Will print ``\n });\n client.end();\n```\n\n`createClient()` returns a `RedisClient` object that is named `client` in all of the examples here.\n\n## client.auth(password, callback)\n\nWhen connecting to Redis servers that require authentication, the `AUTH` command must be sent as the\nfirst command after connecting. This can be tricky to coordinate with reconnections, the ready check,\netc. To make this easier, `client.auth()` stashes `password` and will send it after each connection,\nincluding reconnections. `callback` is invoked only once, after the response to the very first\n`AUTH` command sent.\nNOTE: Your call to `client.auth()` should not be inside the ready handler. If\nyou are doing this wrong, `client` will emit an error that looks\nsomething like this `Error: Ready check failed: ERR operation not permitted`.\n\n## client.end()\n\nForcibly close the connection to the Redis server. Note that this does not wait until all replies have been parsed.\nIf you want to exit cleanly, call `client.quit()` to send the `QUIT` command after you have handled all replies.\n\nThis example closes the connection to the Redis server before the replies have been read. You probably don't\nwant to do this:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n client.set(\"foo_rand000000000000\", \"some fantastic value\");\n client.get(\"foo_rand000000000000\", function (err, reply) {\n console.log(reply.toString());\n });\n client.end();\n```\n\n`client.end()` is useful for timeout cases where something is stuck or taking too long and you want\nto start over.\n\n## Friendlier hash commands\n\nMost Redis commands take a single String or an Array of Strings as arguments, and replies are sent back as a single String or an Array of Strings.\nWhen dealing with hash values, there are a couple of useful exceptions to this.\n\n### client.hgetall(hash)\n\nThe reply from an HGETALL command will be converted into a JavaScript Object by `node_redis`. That way you can interact\nwith the responses using JavaScript syntax.\n\nExample:\n\n client.hmset(\"hosts\", \"mjr\", \"1\", \"another\", \"23\", \"home\", \"1234\");\n client.hgetall(\"hosts\", function (err, obj) {\n console.dir(obj);\n });\n\nOutput:\n\n { mjr: '1', another: '23', home: '1234' }\n\n### client.hmset(hash, obj, [callback])\n\nMultiple values in a hash can be set by supplying an object:\n\n client.HMSET(key2, {\n \"0123456789\": \"abcdefghij\", // NOTE: the key and value must both be strings\n \"some manner of key\": \"a type of value\"\n });\n\nThe properties and values of this Object will be set as keys and values in the Redis hash.\n\n### client.hmset(hash, key1, val1, ... keyn, valn, [callback])\n\nMultiple values may also be set by supplying a list:\n\n client.HMSET(key1, \"0123456789\", \"abcdefghij\", \"some manner of key\", \"a type of value\");\n\n\n## Publish / Subscribe\n\nHere is a simple example of the API for publish / subscribe. This program opens two\nclient connections, subscribes to a channel on one of them, and publishes to that\nchannel on the other:\n\n```js\n var redis = require(\"redis\"),\n client1 = redis.createClient(), client2 = redis.createClient(),\n msg_count = 0;\n\n client1.on(\"subscribe\", function (channel, count) {\n client2.publish(\"a nice channel\", \"I am sending a message.\");\n client2.publish(\"a nice channel\", \"I am sending a second message.\");\n client2.publish(\"a nice channel\", \"I am sending my last message.\");\n });\n\n client1.on(\"message\", function (channel, message) {\n console.log(\"client1 channel \" + channel + \": \" + message);\n msg_count += 1;\n if (msg_count === 3) {\n client1.unsubscribe();\n client1.end();\n client2.end();\n }\n });\n\n client1.incr(\"did a thing\");\n client1.subscribe(\"a nice channel\");\n```\n\nWhen a client issues a `SUBSCRIBE` or `PSUBSCRIBE`, that connection is put into \"pub/sub\" mode.\nAt that point, only commands that modify the subscription set are valid. When the subscription\nset is empty, the connection is put back into regular mode.\n\nIf you need to send regular commands to Redis while in pub/sub mode, just open another connection.\n\n## Pub / Sub Events\n\nIf a client has subscriptions active, it may emit these events:\n\n### \"message\" (channel, message)\n\nClient will emit `message` for every message received that matches an active subscription.\nListeners are passed the channel name as `channel` and the message Buffer as `message`.\n\n### \"pmessage\" (pattern, channel, message)\n\nClient will emit `pmessage` for every message received that matches an active subscription pattern.\nListeners are passed the original pattern used with `PSUBSCRIBE` as `pattern`, the sending channel\nname as `channel`, and the message Buffer as `message`.\n\n### \"subscribe\" (channel, count)\n\nClient will emit `subscribe` in response to a `SUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`.\n\n### \"psubscribe\" (pattern, count)\n\nClient will emit `psubscribe` in response to a `PSUBSCRIBE` command. Listeners are passed the\noriginal pattern as `pattern`, and the new count of subscriptions for this client as `count`.\n\n### \"unsubscribe\" (channel, count)\n\nClient will emit `unsubscribe` in response to a `UNSUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`. When\n`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted.\n\n### \"punsubscribe\" (pattern, count)\n\nClient will emit `punsubscribe` in response to a `PUNSUBSCRIBE` command. Listeners are passed the\nchannel name as `channel` and the new count of subscriptions for this client as `count`. When\n`count` is 0, this client has left pub/sub mode and no more pub/sub events will be emitted.\n\n## client.multi([commands])\n\n`MULTI` commands are queued up until an `EXEC` is issued, and then all commands are run atomically by\nRedis. The interface in `node_redis` is to return an individual `Multi` object by calling `client.multi()`.\n\n```js\n var redis = require(\"./index\"),\n client = redis.createClient(), set_size = 20;\n\n client.sadd(\"bigset\", \"a member\");\n client.sadd(\"bigset\", \"another member\");\n\n while (set_size > 0) {\n client.sadd(\"bigset\", \"member \" + set_size);\n set_size -= 1;\n }\n\n // multi chain with an individual callback\n client.multi()\n .scard(\"bigset\")\n .smembers(\"bigset\")\n .keys(\"*\", function (err, replies) {\n // NOTE: code in this callback is NOT atomic\n // this only happens after the the .exec call finishes.\n client.mget(replies, redis.print);\n })\n .dbsize()\n .exec(function (err, replies) {\n console.log(\"MULTI got \" + replies.length + \" replies\");\n replies.forEach(function (reply, index) {\n console.log(\"Reply \" + index + \": \" + reply.toString());\n });\n });\n```\n\n`client.multi()` is a constructor that returns a `Multi` object. `Multi` objects share all of the\nsame command methods as `client` objects do. Commands are queued up inside the `Multi` object\nuntil `Multi.exec()` is invoked.\n\nYou can either chain together `MULTI` commands as in the above example, or you can queue individual\ncommands while still sending regular client command as in this example:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(), multi;\n\n // start a separate multi command queue\n multi = client.multi();\n multi.incr(\"incr thing\", redis.print);\n multi.incr(\"incr other thing\", redis.print);\n\n // runs immediately\n client.mset(\"incr thing\", 100, \"incr other thing\", 1, redis.print);\n\n // drains multi queue and runs atomically\n multi.exec(function (err, replies) {\n console.log(replies); // 101, 2\n });\n\n // you can re-run the same transaction if you like\n multi.exec(function (err, replies) {\n console.log(replies); // 102, 3\n client.quit();\n });\n```\n\nIn addition to adding commands to the `MULTI` queue individually, you can also pass an array\nof commands and arguments to the constructor:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient(), multi;\n\n client.multi([\n [\"mget\", \"multifoo\", \"multibar\", redis.print],\n [\"incr\", \"multifoo\"],\n [\"incr\", \"multibar\"]\n ]).exec(function (err, replies) {\n console.log(replies);\n });\n```\n\n\n## Monitor mode\n\nRedis supports the `MONITOR` command, which lets you see all commands received by the Redis server\nacross all client connections, including from other client libraries and other computers.\n\nAfter you send the `MONITOR` command, no other commands are valid on that connection. `node_redis`\nwill emit a `monitor` event for every new monitor message that comes across. The callback for the\n`monitor` event takes a timestamp from the Redis server and an array of command arguments.\n\nHere is a simple example:\n\n```js\n var client = require(\"redis\").createClient(),\n util = require(\"util\");\n\n client.monitor(function (err, res) {\n console.log(\"Entering monitoring mode.\");\n });\n\n client.on(\"monitor\", function (time, args) {\n console.log(time + \": \" + util.inspect(args));\n });\n```\n\n# Extras\n\nSome other things you might like to know about.\n\n## client.server_info\n\nAfter the ready probe completes, the results from the INFO command are saved in the `client.server_info`\nobject.\n\nThe `versions` key contains an array of the elements of the version string for easy comparison.\n\n > client.server_info.redis_version\n '2.3.0'\n > client.server_info.versions\n [ 2, 3, 0 ]\n\n## redis.print()\n\nA handy callback function for displaying return values when testing. Example:\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n client.on(\"connect\", function () {\n client.set(\"foo_rand000000000000\", \"some fantastic value\", redis.print);\n client.get(\"foo_rand000000000000\", redis.print);\n });\n```\n\nThis will print:\n\n Reply: OK\n Reply: some fantastic value\n\nNote that this program will not exit cleanly because the client is still connected.\n\n## redis.debug_mode\n\nBoolean to enable debug mode and protocol tracing.\n\n```js\n var redis = require(\"redis\"),\n client = redis.createClient();\n\n redis.debug_mode = true;\n\n client.on(\"connect\", function () {\n client.set(\"foo_rand000000000000\", \"some fantastic value\");\n });\n```\n\nThis will display:\n\n mjr:~/work/node_redis (master)$ node ~/example.js\n send command: *3\n $3\n SET\n $20\n foo_rand000000000000\n $20\n some fantastic value\n\n on_data: +OK\n\n`send command` is data sent into Redis and `on_data` is data received from Redis.\n\n## client.send_command(command_name, args, callback)\n\nUsed internally to send commands to Redis. For convenience, nearly all commands that are published on the Redis\nWiki have been added to the `client` object. However, if I missed any, or if new commands are introduced before\nthis library is updated, you can use `send_command()` to send arbitrary commands to Redis.\n\nAll commands are sent as multi-bulk commands. `args` can either be an Array of arguments, or omitted.\n\n## client.connected\n\nBoolean tracking the state of the connection to the Redis server.\n\n## client.command_queue.length\n\nThe number of commands that have been sent to the Redis server but not yet replied to. You can use this to\nenforce some kind of maximum queue depth for commands while connected.\n\nDon't mess with `client.command_queue` though unless you really know what you are doing.\n\n## client.offline_queue.length\n\nThe number of commands that have been queued up for a future connection. You can use this to enforce\nsome kind of maximum queue depth for pre-connection commands.\n\n## client.retry_delay\n\nCurrent delay in milliseconds before a connection retry will be attempted. This starts at `250`.\n\n## client.retry_backoff\n\nMultiplier for future retry timeouts. This should be larger than 1 to add more time between retries.\nDefaults to 1.7. The default initial connection retry is 250, so the second retry will be 425, followed by 723.5, etc.\n\n### Commands with Optional and Keyword arguments\n\nThis applies to anything that uses an optional `[WITHSCORES]` or `[LIMIT offset count]` in the [redis.io/commands](http://redis.io/commands) documentation.\n\nExample:\n```js\nvar args = [ 'myzset', 1, 'one', 2, 'two', 3, 'three', 99, 'ninety-nine' ];\nclient.zadd(args, function (err, response) {\n if (err) throw err;\n console.log('added '+response+' items.');\n\n // -Infinity and +Infinity also work\n var args1 = [ 'myzset', '+inf', '-inf' ];\n client.zrevrangebyscore(args1, function (err, response) {\n if (err) throw err;\n console.log('example1', response);\n // write your code here\n });\n\n var max = 3, min = 1, offset = 1, count = 2;\n var args2 = [ 'myzset', max, min, 'WITHSCORES', 'LIMIT', offset, count ];\n client.zrevrangebyscore(args2, function (err, response) {\n if (err) throw err;\n console.log('example2', response);\n // write your code here\n });\n});\n```\n\n## TODO\n\nBetter tests for auth, disconnect/reconnect, and all combinations thereof.\n\nStream large set/get values into and out of Redis. Otherwise the entire value must be in node's memory.\n\nPerformance can be better for very large values.\n\nI think there are more performance improvements left in there for smaller values, especially for large lists of small values.\n\n## How to Contribute\n- open a pull request and then wait for feedback (if\n [DTrejo](http://github.com/dtrejo) does not get back to you within 2 days,\n comment again with indignation!)\n\n## Contributors\nSome people have have added features and fixed bugs in `node_redis` other than me.\n\nOrdered by date of first contribution.\n[Auto-generated](http://github.com/dtrejo/node-authors) on Wed Jul 25 2012 19:14:59 GMT-0700 (PDT).\n\n- [Matt Ranney aka `mranney`](https://github.com/mranney)\n- [Tim-Smart aka `tim-smart`](https://github.com/tim-smart)\n- [Tj Holowaychuk aka `visionmedia`](https://github.com/visionmedia)\n- [rick aka `technoweenie`](https://github.com/technoweenie)\n- [Orion Henry aka `orionz`](https://github.com/orionz)\n- [Aivo Paas aka `aivopaas`](https://github.com/aivopaas)\n- [Hank Sims aka `hanksims`](https://github.com/hanksims)\n- [Paul Carey aka `paulcarey`](https://github.com/paulcarey)\n- [Pieter Noordhuis aka `pietern`](https://github.com/pietern)\n- [nithesh aka `nithesh`](https://github.com/nithesh)\n- [Andy Ray aka `andy2ray`](https://github.com/andy2ray)\n- [unknown aka `unknowdna`](https://github.com/unknowdna)\n- [Dave Hoover aka `redsquirrel`](https://github.com/redsquirrel)\n- [Vladimir Dronnikov aka `dvv`](https://github.com/dvv)\n- [Umair Siddique aka `umairsiddique`](https://github.com/umairsiddique)\n- [Louis-Philippe Perron aka `lp`](https://github.com/lp)\n- [Mark Dawson aka `markdaws`](https://github.com/markdaws)\n- [Ian Babrou aka `bobrik`](https://github.com/bobrik)\n- [Felix Geisendörfer aka `felixge`](https://github.com/felixge)\n- [Jean-Hugues Pinson aka `undefined`](https://github.com/undefined)\n- [Maksim Lin aka `maks`](https://github.com/maks)\n- [Owen Smith aka `orls`](https://github.com/orls)\n- [Zachary Scott aka `zzak`](https://github.com/zzak)\n- [TEHEK Firefox aka `TEHEK`](https://github.com/TEHEK)\n- [Isaac Z. Schlueter aka `isaacs`](https://github.com/isaacs)\n- [David Trejo aka `DTrejo`](https://github.com/DTrejo)\n- [Brian Noguchi aka `bnoguchi`](https://github.com/bnoguchi)\n- [Philip Tellis aka `bluesmoon`](https://github.com/bluesmoon)\n- [Marcus Westin aka `marcuswestin2`](https://github.com/marcuswestin2)\n- [Jed Schmidt aka `jed`](https://github.com/jed)\n- [Dave Peticolas aka `jdavisp3`](https://github.com/jdavisp3)\n- [Trae Robrock aka `trobrock`](https://github.com/trobrock)\n- [Shankar Karuppiah aka `shankar0306`](https://github.com/shankar0306)\n- [Ignacio Burgueño aka `ignacio`](https://github.com/ignacio)\n\nThanks.\n\n## LICENSE - \"MIT License\"\n\nCopyright (c) 2010 Matthew Ranney, http://ranney.com/\n\nPermission is hereby granted, free of charge, to any person\nobtaining a copy of this software and associated documentation\nfiles (the \"Software\"), to deal in the Software without\nrestriction, including without limitation the rights to use,\ncopy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the\nSoftware is furnished to do so, subject to the following\nconditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\nOF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\nHOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\nWHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\nFROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\nOTHER DEALINGS IN THE SOFTWARE.\n\n![spacer](http://ranney.com/1px.gif)\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/mranney/node_redis/issues" - }, - "homepage": "https://github.com/mranney/node_redis", - "_id": "redis@0.7.3", - "_from": "redis@0.7.3" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/redis/test.js b/node_modules/karma/node_modules/socket.io/node_modules/redis/test.js deleted file mode 100644 index 0a03375e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/redis/test.js +++ /dev/null @@ -1,1618 +0,0 @@ -/*global require console setTimeout process Buffer */ -var redis = require("./index"), - client = redis.createClient(), - client2 = redis.createClient(), - client3 = redis.createClient(), - assert = require("assert"), - crypto = require("crypto"), - util = require("./lib/util"), - test_db_num = 15, // this DB will be flushed and used for testing - tests = {}, - connected = false, - ended = false, - next, cur_start, run_next_test, all_tests, all_start, test_count; - -// Set this to truthy to see the wire protocol and other debugging info -redis.debug_mode = process.argv[2]; - -function buffers_to_strings(arr) { - return arr.map(function (val) { - return val.toString(); - }); -} - -function require_number(expected, label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected " + expected + ", got error: " + err); - assert.strictEqual(expected, results, label + " " + expected + " !== " + results); - assert.strictEqual(typeof results, "number", label); - return true; - }; -} - -function require_number_any(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected any number, got error: " + err); - assert.strictEqual(typeof results, "number", label + " " + results + " is not a number"); - return true; - }; -} - -function require_number_pos(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected positive number, got error: " + err); - assert.strictEqual(true, (results > 0), label + " " + results + " is not a positive number"); - return true; - }; -} - -function require_string(str, label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected string '" + str + "', got error: " + err); - assert.equal(str, results, label + " " + str + " does not match " + results); - return true; - }; -} - -function require_null(label) { - return function (err, results) { - assert.strictEqual(null, err, label + " expected null, got error: " + err); - assert.strictEqual(null, results, label + ": " + results + " is not null"); - return true; - }; -} - -function require_error(label) { - return function (err, results) { - assert.notEqual(err, null, label + " err is null, but an error is expected here."); - return true; - }; -} - -function is_empty_array(obj) { - return Array.isArray(obj) && obj.length === 0; -} - -function last(name, fn) { - return function (err, results) { - fn(err, results); - next(name); - }; -} - -next = function next(name) { - console.log(" \x1b[33m" + (Date.now() - cur_start) + "\x1b[0m ms"); - run_next_test(); -}; - -// Tests are run in the order they are defined. So FLUSHDB should be stay first. - -tests.FLUSHDB = function () { - var name = "FLUSHDB"; - client.select(test_db_num, require_string("OK", name)); - client2.select(test_db_num, require_string("OK", name)); - client3.select(test_db_num, require_string("OK", name)); - client.mset("flush keys 1", "flush val 1", "flush keys 2", "flush val 2", require_string("OK", name)); - client.FLUSHDB(require_string("OK", name)); - client.dbsize(last(name, require_number(0, name))); -}; - -tests.MULTI_1 = function () { - var name = "MULTI_1", multi1, multi2; - - // Provoke an error at queue time - multi1 = client.multi(); - multi1.mset("multifoo", "10", "multibar", "20", require_string("OK", name)); - multi1.set("foo2", require_error(name)); - multi1.incr("multifoo", require_number(11, name)); - multi1.incr("multibar", require_number(21, name)); - multi1.exec(); - - // Confirm that the previous command, while containing an error, still worked. - multi2 = client.multi(); - multi2.incr("multibar", require_number(22, name)); - multi2.incr("multifoo", require_number(12, name)); - multi2.exec(function (err, replies) { - assert.strictEqual(22, replies[0]); - assert.strictEqual(12, replies[1]); - next(name); - }); -}; - -tests.MULTI_2 = function () { - var name = "MULTI_2"; - - // test nested multi-bulk replies - client.multi([ - ["mget", "multifoo", "multibar", function (err, res) { - assert.strictEqual(2, res.length, name); - assert.strictEqual("12", res[0].toString(), name); - assert.strictEqual("22", res[1].toString(), name); - }], - ["set", "foo2", require_error(name)], - ["incr", "multifoo", require_number(13, name)], - ["incr", "multibar", require_number(23, name)] - ]).exec(function (err, replies) { - assert.strictEqual(2, replies[0].length, name); - assert.strictEqual("12", replies[0][0].toString(), name); - assert.strictEqual("22", replies[0][1].toString(), name); - - assert.strictEqual("13", replies[1].toString()); - assert.strictEqual("23", replies[2].toString()); - next(name); - }); -}; - -tests.MULTI_3 = function () { - var name = "MULTI_3"; - - client.sadd("some set", "mem 1"); - client.sadd("some set", "mem 2"); - client.sadd("some set", "mem 3"); - client.sadd("some set", "mem 4"); - - // make sure empty mb reply works - client.del("some missing set"); - client.smembers("some missing set", function (err, reply) { - // make sure empty mb reply works - assert.strictEqual(true, is_empty_array(reply), name); - }); - - // test nested multi-bulk replies with empty mb elements. - client.multi([ - ["smembers", "some set"], - ["del", "some set"], - ["smembers", "some set"] - ]) - .scard("some set") - .exec(function (err, replies) { - assert.strictEqual(true, is_empty_array(replies[2]), name); - next(name); - }); -}; - -tests.MULTI_4 = function () { - var name = "MULTI_4"; - - client.multi() - .mset('some', '10', 'keys', '20') - .incr('some') - .incr('keys') - .mget('some', 'keys') - .exec(function (err, replies) { - assert.strictEqual(null, err); - assert.equal('OK', replies[0]); - assert.equal(11, replies[1]); - assert.equal(21, replies[2]); - assert.equal(11, replies[3][0].toString()); - assert.equal(21, replies[3][1].toString()); - next(name); - }); -}; - -tests.MULTI_5 = function () { - var name = "MULTI_5"; - - // test nested multi-bulk replies with nulls. - client.multi([ - ["mget", ["multifoo", "some", "random value", "keys"]], - ["incr", "multifoo"] - ]) - .exec(function (err, replies) { - assert.strictEqual(replies.length, 2, name); - assert.strictEqual(replies[0].length, 4, name); - next(name); - }); -}; - -tests.MULTI_6 = function () { - var name = "MULTI_6"; - - client.multi() - .hmset("multihash", "a", "foo", "b", 1) - .hmset("multihash", { - extra: "fancy", - things: "here" - }) - .hgetall("multihash") - .exec(function (err, replies) { - assert.strictEqual(null, err); - assert.equal("OK", replies[0]); - assert.equal(Object.keys(replies[2]).length, 4); - assert.equal("foo", replies[2].a); - assert.equal("1", replies[2].b); - assert.equal("fancy", replies[2].extra); - assert.equal("here", replies[2].things); - next(name); - }); -}; - -tests.EVAL_1 = function () { - var name = "EVAL_1"; - - if (client.server_info.versions[0] >= 2 && client.server_info.versions[1] >= 5) { - // test {EVAL - Lua integer -> Redis protocol type conversion} - client.eval("return 100.5", 0, require_number(100, name)); - // test {EVAL - Lua string -> Redis protocol type conversion} - client.eval("return 'hello world'", 0, require_string("hello world", name)); - // test {EVAL - Lua true boolean -> Redis protocol type conversion} - client.eval("return true", 0, require_number(1, name)); - // test {EVAL - Lua false boolean -> Redis protocol type conversion} - client.eval("return false", 0, require_null(name)); - // test {EVAL - Lua status code reply -> Redis protocol type conversion} - client.eval("return {ok='fine'}", 0, require_string("fine", name)); - // test {EVAL - Lua error reply -> Redis protocol type conversion} - client.eval("return {err='this is an error'}", 0, require_error(name)); - // test {EVAL - Lua table -> Redis protocol type conversion} - client.eval("return {1,2,3,'ciao',{1,2}}", 0, function (err, res) { - assert.strictEqual(5, res.length, name); - assert.strictEqual(1, res[0], name); - assert.strictEqual(2, res[1], name); - assert.strictEqual(3, res[2], name); - assert.strictEqual("ciao", res[3], name); - assert.strictEqual(2, res[4].length, name); - assert.strictEqual(1, res[4][0], name); - assert.strictEqual(2, res[4][1], name); - }); - // test {EVAL - Are the KEYS and ARGS arrays populated correctly?} - client.eval("return {KEYS[1],KEYS[2],ARGV[1],ARGV[2]}", 2, "a", "b", "c", "d", function (err, res) { - assert.strictEqual(4, res.length, name); - assert.strictEqual("a", res[0], name); - assert.strictEqual("b", res[1], name); - assert.strictEqual("c", res[2], name); - assert.strictEqual("d", res[3], name); - }); - - // prepare sha sum for evalsha cache test - var source = "return redis.call('get', 'sha test')", - sha = crypto.createHash('sha1').update(source).digest('hex'); - - client.set("sha test", "eval get sha test", function (err, res) { - if (err) throw err; - // test {EVAL - is Lua able to call Redis API?} - client.eval(source, 0, function (err, res) { - require_string("eval get sha test", name)(err, res); - // test {EVALSHA - Can we call a SHA1 if already defined?} - client.evalsha(sha, 0, require_string("eval get sha test", name)); - // test {EVALSHA - Do we get an error on non defined SHA1?} - client.evalsha("ffffffffffffffffffffffffffffffffffffffff", 0, require_error(name)); - }); - }); - - // test {EVAL - Redis integer -> Lua type conversion} - client.set("incr key", 0, function (err, reply) { - if (err) throw err; - client.eval("local foo = redis.call('incr','incr key')\n" + "return {type(foo),foo}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("number", res[0], name); - assert.strictEqual(1, res[1], name); - }); - }); - - client.set("bulk reply key", "bulk reply value", function (err, res) { - // test {EVAL - Redis bulk -> Lua type conversion} - client.eval("local foo = redis.call('get','bulk reply key'); return {type(foo),foo}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("string", res[0], name); - assert.strictEqual("bulk reply value", res[1], name); - }); - }); - - // test {EVAL - Redis multi bulk -> Lua type conversion} - client.multi() - .del("mylist") - .rpush("mylist", "a") - .rpush("mylist", "b") - .rpush("mylist", "c") - .exec(function (err, replies) { - if (err) throw err; - client.eval("local foo = redis.call('lrange','mylist',0,-1); return {type(foo),foo[1],foo[2],foo[3],# foo}", 0, function (err, res) { - assert.strictEqual(5, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("a", res[1], name); - assert.strictEqual("b", res[2], name); - assert.strictEqual("c", res[3], name); - assert.strictEqual(3, res[4], name); - }); - }); - // test {EVAL - Redis status reply -> Lua type conversion} - client.eval("local foo = redis.call('set','mykey','myval'); return {type(foo),foo['ok']}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("OK", res[1], name); - }); - // test {EVAL - Redis error reply -> Lua type conversion} - client.set("error reply key", "error reply value", function (err, res) { - if (err) throw err; - client.eval("local foo = redis.pcall('incr','error reply key'); return {type(foo),foo['err']}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("table", res[0], name); - assert.strictEqual("ERR value is not an integer or out of range", res[1], name); - }); - }); - // test {EVAL - Redis nil bulk reply -> Lua type conversion} - client.del("nil reply key", function (err, res) { - if (err) throw err; - client.eval("local foo = redis.call('get','nil reply key'); return {type(foo),foo == false}", 0, function (err, res) { - if (err) throw err; - assert.strictEqual(2, res.length, name); - assert.strictEqual("boolean", res[0], name); - assert.strictEqual(1, res[1], name); - next(name); - }); - }); - } else { - console.log("Skipping " + name + " because server version isn't new enough."); - next(name); - } -}; - -tests.WATCH_MULTI = function () { - var name = 'WATCH_MULTI', multi; - - if (client.server_info.versions[0] >= 2 && client.server_info.versions[1] >= 1) { - client.watch(name); - client.incr(name); - multi = client.multi(); - multi.incr(name); - multi.exec(last(name, require_null(name))); - } else { - console.log("Skipping " + name + " because server version isn't new enough."); - next(name); - } -}; - -tests.detect_buffers = function () { - var name = "detect_buffers", detect_client = redis.createClient(null, null, {detect_buffers: true}); - - detect_client.on("ready", function () { - // single Buffer or String - detect_client.set("string key 1", "string value"); - detect_client.get("string key 1", require_string("string value", name)); - detect_client.get(new Buffer("string key 1"), function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Buffer.isBuffer(reply), name); - assert.strictEqual("", reply.inspect(), name); - }); - - detect_client.hmset("hash key 2", "key 1", "val 1", "key 2", "val 2"); - // array of Buffers or Strings - detect_client.hmget("hash key 2", "key 1", "key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Array.isArray(reply), name); - assert.strictEqual(2, reply.length, name); - assert.strictEqual("val 1", reply[0], name); - assert.strictEqual("val 2", reply[1], name); - }); - detect_client.hmget(new Buffer("hash key 2"), "key 1", "key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual(true, Array.isArray(reply)); - assert.strictEqual(2, reply.length, name); - assert.strictEqual(true, Buffer.isBuffer(reply[0])); - assert.strictEqual(true, Buffer.isBuffer(reply[1])); - assert.strictEqual("", reply[0].inspect(), name); - assert.strictEqual("", reply[1].inspect(), name); - }); - - // Object of Buffers or Strings - detect_client.hgetall("hash key 2", function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual("object", typeof reply, name); - assert.strictEqual(2, Object.keys(reply).length, name); - assert.strictEqual("val 1", reply["key 1"], name); - assert.strictEqual("val 2", reply["key 2"], name); - }); - detect_client.hgetall(new Buffer("hash key 2"), function (err, reply) { - assert.strictEqual(null, err, name); - assert.strictEqual("object", typeof reply, name); - assert.strictEqual(2, Object.keys(reply).length, name); - assert.strictEqual(true, Buffer.isBuffer(reply["key 1"])); - assert.strictEqual(true, Buffer.isBuffer(reply["key 2"])); - assert.strictEqual("", reply["key 1"].inspect(), name); - assert.strictEqual("", reply["key 2"].inspect(), name); - }); - - detect_client.quit(function (err, res) { - next(name); - }); - }); -}; - -tests.socket_nodelay = function () { - var name = "socket_nodelay", c1, c2, c3, ready_count = 0, quit_count = 0; - - c1 = redis.createClient(null, null, {socket_nodelay: true}); - c2 = redis.createClient(null, null, {socket_nodelay: false}); - c3 = redis.createClient(null, null); - - function quit_check() { - quit_count++; - - if (quit_count === 3) { - next(name); - } - } - - function run() { - assert.strictEqual(true, c1.options.socket_nodelay, name); - assert.strictEqual(false, c2.options.socket_nodelay, name); - assert.strictEqual(true, c3.options.socket_nodelay, name); - - c1.set(["set key 1", "set val"], require_string("OK", name)); - c1.set(["set key 2", "set val"], require_string("OK", name)); - c1.get(["set key 1"], require_string("set val", name)); - c1.get(["set key 2"], require_string("set val", name)); - - c2.set(["set key 3", "set val"], require_string("OK", name)); - c2.set(["set key 4", "set val"], require_string("OK", name)); - c2.get(["set key 3"], require_string("set val", name)); - c2.get(["set key 4"], require_string("set val", name)); - - c3.set(["set key 5", "set val"], require_string("OK", name)); - c3.set(["set key 6", "set val"], require_string("OK", name)); - c3.get(["set key 5"], require_string("set val", name)); - c3.get(["set key 6"], require_string("set val", name)); - - c1.quit(quit_check); - c2.quit(quit_check); - c3.quit(quit_check); - } - - function ready_check() { - ready_count++; - if (ready_count === 3) { - run(); - } - } - - c1.on("ready", ready_check); - c2.on("ready", ready_check); - c3.on("ready", ready_check); -}; - -tests.reconnect = function () { - var name = "reconnect"; - - client.set("recon 1", "one"); - client.set("recon 2", "two", function (err, res) { - // Do not do this in normal programs. This is to simulate the server closing on us. - // For orderly shutdown in normal programs, do client.quit() - client.stream.destroy(); - }); - - client.on("reconnecting", function on_recon(params) { - client.on("connect", function on_connect() { - client.select(test_db_num, require_string("OK", name)); - client.get("recon 1", require_string("one", name)); - client.get("recon 1", require_string("one", name)); - client.get("recon 2", require_string("two", name)); - client.get("recon 2", require_string("two", name)); - client.removeListener("connect", on_connect); - client.removeListener("reconnecting", on_recon); - next(name); - }); - }); -}; - -tests.idle = function () { - var name = "idle"; - - client.on("idle", function on_idle() { - client.removeListener("idle", on_idle); - next(name); - }); - - client.set("idle", "test"); -}; - -tests.HSET = function () { - var key = "test hash", - field1 = new Buffer("0123456789"), - value1 = new Buffer("abcdefghij"), - field2 = new Buffer(0), - value2 = new Buffer(0), - name = "HSET"; - - client.HSET(key, field1, value1, require_number(1, name)); - client.HGET(key, field1, require_string(value1.toString(), name)); - - // Empty value - client.HSET(key, field1, value2, require_number(0, name)); - client.HGET([key, field1], require_string("", name)); - - // Empty key, empty value - client.HSET([key, field2, value1], require_number(1, name)); - client.HSET(key, field2, value2, last(name, require_number(0, name))); -}; - -tests.HLEN = function () { - var key = "test hash", - field1 = new Buffer("0123456789"), - value1 = new Buffer("abcdefghij"), - field2 = new Buffer(0), - value2 = new Buffer(0), - name = "HSET", - timeout = 1000; - - client.HSET(key, field1, value1, function (err, results) { - client.HLEN(key, function (err, len) { - assert.ok(2 === +len); - next(name); - }); - }); -} - -tests.HMSET_BUFFER_AND_ARRAY = function () { - // Saving a buffer and an array to the same key should not error - var key = "test hash", - field1 = "buffer", - value1 = new Buffer("abcdefghij"), - field2 = "array", - value2 = ["array contents"], - name = "HSET"; - - client.HMSET(key, field1, value1, field2, value2, last(name, require_string("OK", name))); -}; - -// TODO - add test for HMSET with optional callbacks - -tests.HMGET = function () { - var key1 = "test hash 1", key2 = "test hash 2", name = "HMGET"; - - // redis-like hmset syntax - client.HMSET(key1, "0123456789", "abcdefghij", "some manner of key", "a type of value", require_string("OK", name)); - - // fancy hmset syntax - client.HMSET(key2, { - "0123456789": "abcdefghij", - "some manner of key": "a type of value" - }, require_string("OK", name)); - - client.HMGET(key1, "0123456789", "some manner of key", function (err, reply) { - assert.strictEqual("abcdefghij", reply[0].toString(), name); - assert.strictEqual("a type of value", reply[1].toString(), name); - }); - - client.HMGET(key2, "0123456789", "some manner of key", function (err, reply) { - assert.strictEqual("abcdefghij", reply[0].toString(), name); - assert.strictEqual("a type of value", reply[1].toString(), name); - }); - - client.HMGET(key1, ["0123456789"], function (err, reply) { - assert.strictEqual("abcdefghij", reply[0], name); - }); - - client.HMGET(key1, ["0123456789", "some manner of key"], function (err, reply) { - assert.strictEqual("abcdefghij", reply[0], name); - assert.strictEqual("a type of value", reply[1], name); - }); - - client.HMGET(key1, "missing thing", "another missing thing", function (err, reply) { - assert.strictEqual(null, reply[0], name); - assert.strictEqual(null, reply[1], name); - next(name); - }); -}; - -tests.HINCRBY = function () { - var name = "HINCRBY"; - client.hset("hash incr", "value", 10, require_number(1, name)); - client.HINCRBY("hash incr", "value", 1, require_number(11, name)); - client.HINCRBY("hash incr", "value 2", 1, last(name, require_number(1, name))); -}; - -tests.SUBSCRIBE = function () { - var client1 = client, msg_count = 0, name = "SUBSCRIBE"; - - client1.on("subscribe", function (channel, count) { - if (channel === "chan1") { - client2.publish("chan1", "message 1", require_number(1, name)); - client2.publish("chan2", "message 2", require_number(1, name)); - client2.publish("chan1", "message 3", require_number(1, name)); - } - }); - - client1.on("unsubscribe", function (channel, count) { - if (count === 0) { - // make sure this connection can go into and out of pub/sub mode - client1.incr("did a thing", last(name, require_number(2, name))); - } - }); - - client1.on("message", function (channel, message) { - msg_count += 1; - assert.strictEqual("message " + msg_count, message.toString()); - if (msg_count === 3) { - client1.unsubscribe("chan1", "chan2"); - } - }); - - client1.set("did a thing", 1, require_string("OK", name)); - client1.subscribe("chan1", "chan2", function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual("chan1", results.toString(), name); - }); -}; - -tests.SUB_UNSUB_SUB = function () { - var name = "SUB_UNSUB_SUB"; - client3.subscribe('chan3'); - client3.unsubscribe('chan3'); - client3.subscribe('chan3', function (err, results) { - assert.strictEqual(null, err, "unexpected error: " + err); - client2.publish('chan3', 'foo'); - }); - client3.on('message', function (channel, message) { - assert.strictEqual(channel, 'chan3'); - assert.strictEqual(message, 'foo'); - next(name); - }); -}; - -tests.SUBSCRIBE_QUIT = function () { - var name = "SUBSCRIBE_QUIT"; - client3.on("end", function () { - next(name); - }); - client3.on("subscribe", function (channel, count) { - client3.quit(); - }); - client3.subscribe("chan3"); -}; - -tests.SUBSCRIBE_CLOSE_RESUBSCRIBE = function () { - var name = "SUBSCRIBE_CLOSE_RESUBSCRIBE"; - var c1 = redis.createClient(); - var c2 = redis.createClient(); - var count = 0; - - /* Create two clients. c1 subscribes to two channels, c2 will publish to them. - c2 publishes the first message. - c1 gets the message and drops its connection. It must resubscribe itself. - When it resubscribes, c2 publishes the second message, on the same channel - c1 gets the message and drops its connection. It must resubscribe itself, again. - When it resubscribes, c2 publishes the third message, on the second channel - c1 gets the message and drops its connection. When it reconnects, the test ends. - */ - - c1.on("message", function(channel, message) { - if (channel === "chan1") { - assert.strictEqual(message, "hi on channel 1"); - c1.stream.end(); - - } else if (channel === "chan2") { - assert.strictEqual(message, "hi on channel 2"); - c1.stream.end(); - - } else { - c1.quit(); - c2.quit(); - assert.fail("test failed"); - } - }) - - c1.subscribe("chan1", "chan2"); - - c2.once("ready", function() { - console.log("c2 is ready"); - c1.on("ready", function(err, results) { - console.log("c1 is ready", count); - - count++; - if (count == 1) { - c2.publish("chan1", "hi on channel 1"); - return; - - } else if (count == 2) { - c2.publish("chan2", "hi on channel 2"); - - } else { - c1.quit(function() { - c2.quit(function() { - next(name); - }); - }); - } - }); - - c2.publish("chan1", "hi on channel 1"); - - }); -}; - -tests.EXISTS = function () { - var name = "EXISTS"; - client.del("foo", "foo2", require_number_any(name)); - client.set("foo", "bar", require_string("OK", name)); - client.EXISTS("foo", require_number(1, name)); - client.EXISTS("foo2", last(name, require_number(0, name))); -}; - -tests.DEL = function () { - var name = "DEL"; - client.DEL("delkey", require_number_any(name)); - client.set("delkey", "delvalue", require_string("OK", name)); - client.DEL("delkey", require_number(1, name)); - client.exists("delkey", require_number(0, name)); - client.DEL("delkey", require_number(0, name)); - client.mset("delkey", "delvalue", "delkey2", "delvalue2", require_string("OK", name)); - client.DEL("delkey", "delkey2", last(name, require_number(2, name))); -}; - -tests.TYPE = function () { - var name = "TYPE"; - client.set(["string key", "should be a string"], require_string("OK", name)); - client.rpush(["list key", "should be a list"], require_number_pos(name)); - client.sadd(["set key", "should be a set"], require_number_any(name)); - client.zadd(["zset key", "10.0", "should be a zset"], require_number_any(name)); - client.hset(["hash key", "hashtest", "should be a hash"], require_number_any(0, name)); - - client.TYPE(["string key"], require_string("string", name)); - client.TYPE(["list key"], require_string("list", name)); - client.TYPE(["set key"], require_string("set", name)); - client.TYPE(["zset key"], require_string("zset", name)); - client.TYPE("not here yet", require_string("none", name)); - client.TYPE(["hash key"], last(name, require_string("hash", name))); -}; - -tests.KEYS = function () { - var name = "KEYS"; - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], require_string("OK", name)); - client.KEYS(["test keys*"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(2, results.length, name); - assert.strictEqual("test keys 1", results[0].toString(), name); - assert.strictEqual("test keys 2", results[1].toString(), name); - next(name); - }); -}; - -tests.MULTIBULK_ZERO_LENGTH = function () { - var name = "MULTIBULK_ZERO_LENGTH"; - client.KEYS(['users:*'], function (err, results) { - assert.strictEqual(null, err, 'error on empty multibulk reply'); - assert.strictEqual(true, is_empty_array(results), "not an empty array"); - next(name); - }); -}; - -tests.RANDOMKEY = function () { - var name = "RANDOMKEY"; - client.mset(["test keys 1", "test val 1", "test keys 2", "test val 2"], require_string("OK", name)); - client.RANDOMKEY([], function (err, results) { - assert.strictEqual(null, err, name + " result sent back unexpected error: " + err); - assert.strictEqual(true, /\w+/.test(results), name); - next(name); - }); -}; - -tests.RENAME = function () { - var name = "RENAME"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.RENAME(["foo", "new foo"], require_string("OK", name)); - client.exists(["foo"], require_number(0, name)); - client.exists(["new foo"], last(name, require_number(1, name))); -}; - -tests.RENAMENX = function () { - var name = "RENAMENX"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.set(['foo2', 'bar2'], require_string("OK", name)); - client.RENAMENX(["foo", "foo2"], require_number(0, name)); - client.exists(["foo"], require_number(1, name)); - client.exists(["foo2"], require_number(1, name)); - client.del(["foo2"], require_number(1, name)); - client.RENAMENX(["foo", "foo2"], require_number(1, name)); - client.exists(["foo"], require_number(0, name)); - client.exists(["foo2"], last(name, require_number(1, name))); -}; - -tests.DBSIZE = function () { - var name = "DBSIZE"; - client.set(['foo', 'bar'], require_string("OK", name)); - client.DBSIZE([], last(name, require_number_pos("DBSIZE"))); -}; - -tests.GET = function () { - var name = "GET"; - client.set(["get key", "get val"], require_string("OK", name)); - client.GET(["get key"], last(name, require_string("get val", name))); -}; - -tests.SET = function () { - var name = "SET"; - client.SET(["set key", "set val"], require_string("OK", name)); - client.get(["set key"], last(name, require_string("set val", name))); -}; - -tests.GETSET = function () { - var name = "GETSET"; - client.set(["getset key", "getset val"], require_string("OK", name)); - client.GETSET(["getset key", "new getset val"], require_string("getset val", name)); - client.get(["getset key"], last(name, require_string("new getset val", name))); -}; - -tests.MGET = function () { - var name = "MGET"; - client.mset(["mget keys 1", "mget val 1", "mget keys 2", "mget val 2", "mget keys 3", "mget val 3"], require_string("OK", name)); - client.MGET("mget keys 1", "mget keys 2", "mget keys 3", function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(3, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual("mget val 2", results[1].toString(), name); - assert.strictEqual("mget val 3", results[2].toString(), name); - }); - client.MGET(["mget keys 1", "mget keys 2", "mget keys 3"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(3, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual("mget val 2", results[1].toString(), name); - assert.strictEqual("mget val 3", results[2].toString(), name); - }); - client.MGET(["mget keys 1", "some random shit", "mget keys 2", "mget keys 3"], function (err, results) { - assert.strictEqual(null, err, "result sent back unexpected error: " + err); - assert.strictEqual(4, results.length, name); - assert.strictEqual("mget val 1", results[0].toString(), name); - assert.strictEqual(null, results[1], name); - assert.strictEqual("mget val 2", results[2].toString(), name); - assert.strictEqual("mget val 3", results[3].toString(), name); - next(name); - }); -}; - -tests.SETNX = function () { - var name = "SETNX"; - client.set(["setnx key", "setnx value"], require_string("OK", name)); - client.SETNX(["setnx key", "new setnx value"], require_number(0, name)); - client.del(["setnx key"], require_number(1, name)); - client.exists(["setnx key"], require_number(0, name)); - client.SETNX(["setnx key", "new setnx value"], require_number(1, name)); - client.exists(["setnx key"], last(name, require_number(1, name))); -}; - -tests.SETEX = function () { - var name = "SETEX"; - client.SETEX(["setex key", "100", "setex val"], require_string("OK", name)); - client.exists(["setex key"], require_number(1, name)); - client.ttl(["setex key"], last(name, require_number_pos(name))); -}; - -tests.MSETNX = function () { - var name = "MSETNX"; - client.mset(["mset1", "val1", "mset2", "val2", "mset3", "val3"], require_string("OK", name)); - client.MSETNX(["mset3", "val3", "mset4", "val4"], require_number(0, name)); - client.del(["mset3"], require_number(1, name)); - client.MSETNX(["mset3", "val3", "mset4", "val4"], require_number(1, name)); - client.exists(["mset3"], require_number(1, name)); - client.exists(["mset4"], last(name, require_number(1, name))); -}; - -tests.HGETALL = function () { - var name = "HGETALL"; - client.hmset(["hosts", "mjr", "1", "another", "23", "home", "1234"], require_string("OK", name)); - client.HGETALL(["hosts"], function (err, obj) { - assert.strictEqual(null, err, name + " result sent back unexpected error: " + err); - assert.strictEqual(3, Object.keys(obj).length, name); - assert.strictEqual("1", obj.mjr.toString(), name); - assert.strictEqual("23", obj.another.toString(), name); - assert.strictEqual("1234", obj.home.toString(), name); - next(name); - }); -}; - -tests.HGETALL_NULL = function () { - var name = "HGETALL_NULL"; - - client.hgetall("missing", function (err, obj) { - assert.strictEqual(null, err); - assert.strictEqual(null, obj); - next(name); - }); -}; - -tests.UTF8 = function () { - var name = "UTF8", - utf8_sample = "ಠ_ಠ"; - - client.set(["utf8test", utf8_sample], require_string("OK", name)); - client.get(["utf8test"], function (err, obj) { - assert.strictEqual(null, err); - assert.strictEqual(utf8_sample, obj); - next(name); - }); -}; - -// Set tests were adapted from Brian Hammond's redis-node-client.js, which has a comprehensive test suite - -tests.SADD = function () { - var name = "SADD"; - - client.del('set0'); - client.SADD('set0', 'member0', require_number(1, name)); - client.sadd('set0', 'member0', last(name, require_number(0, name))); -}; - -tests.SADD2 = function () { - var name = "SADD2"; - - client.del("set0"); - client.sadd("set0", ["member0", "member1", "member2"], require_number(3, name)); - client.smembers("set0", function (err, res) { - assert.strictEqual(res.length, 3); - assert.strictEqual(res[0], "member0"); - assert.strictEqual(res[1], "member1"); - assert.strictEqual(res[2], "member2"); - }); - client.SADD("set1", ["member0", "member1", "member2"], require_number(3, name)); - client.smembers("set1", function (err, res) { - assert.strictEqual(res.length, 3); - assert.strictEqual(res[0], "member0"); - assert.strictEqual(res[1], "member1"); - assert.strictEqual(res[2], "member2"); - next(name); - }); -}; - -tests.SISMEMBER = function () { - var name = "SISMEMBER"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.sismember('set0', 'member0', require_number(1, name)); - client.sismember('set0', 'member1', last(name, require_number(0, name))); -}; - -tests.SCARD = function () { - var name = "SCARD"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.scard('set0', require_number(1, name)); - client.sadd('set0', 'member1', require_number(1, name)); - client.scard('set0', last(name, require_number(2, name))); -}; - -tests.SREM = function () { - var name = "SREM"; - - client.del('set0'); - client.sadd('set0', 'member0', require_number(1, name)); - client.srem('set0', 'foobar', require_number(0, name)); - client.srem('set0', 'member0', require_number(1, name)); - client.scard('set0', last(name, require_number(0, name))); -}; - -tests.SPOP = function () { - var name = "SPOP"; - - client.del('zzz'); - client.sadd('zzz', 'member0', require_number(1, name)); - client.scard('zzz', require_number(1, name)); - - client.spop('zzz', function (err, value) { - if (err) { - assert.fail(err); - } - assert.equal(value, 'member0', name); - }); - - client.scard('zzz', last(name, require_number(0, name))); -}; - -tests.SDIFF = function () { - var name = "SDIFF"; - - client.del('foo'); - client.sadd('foo', 'x', require_number(1, name)); - client.sadd('foo', 'a', require_number(1, name)); - client.sadd('foo', 'b', require_number(1, name)); - client.sadd('foo', 'c', require_number(1, name)); - - client.sadd('bar', 'c', require_number(1, name)); - - client.sadd('baz', 'a', require_number(1, name)); - client.sadd('baz', 'd', require_number(1, name)); - - client.sdiff('foo', 'bar', 'baz', function (err, values) { - if (err) { - assert.fail(err, name); - } - values.sort(); - assert.equal(values.length, 2, name); - assert.equal(values[0], 'b', name); - assert.equal(values[1], 'x', name); - next(name); - }); -}; - -tests.SDIFFSTORE = function () { - var name = "SDIFFSTORE"; - - client.del('foo'); - client.del('bar'); - client.del('baz'); - client.del('quux'); - - client.sadd('foo', 'x', require_number(1, name)); - client.sadd('foo', 'a', require_number(1, name)); - client.sadd('foo', 'b', require_number(1, name)); - client.sadd('foo', 'c', require_number(1, name)); - - client.sadd('bar', 'c', require_number(1, name)); - - client.sadd('baz', 'a', require_number(1, name)); - client.sadd('baz', 'd', require_number(1, name)); - - // NB: SDIFFSTORE returns the number of elements in the dstkey - - client.sdiffstore('quux', 'foo', 'bar', 'baz', require_number(2, name)); - - client.smembers('quux', function (err, values) { - if (err) { - assert.fail(err, name); - } - var members = buffers_to_strings(values).sort(); - - assert.deepEqual(members, [ 'b', 'x' ], name); - next(name); - }); -}; - -tests.SMEMBERS = function () { - var name = "SMEMBERS"; - - client.del('foo'); - client.sadd('foo', 'x', require_number(1, name)); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(members), [ 'x' ], name); - }); - - client.sadd('foo', 'y', require_number(1, name)); - - client.smembers('foo', function (err, values) { - if (err) { - assert.fail(err, name); - } - assert.equal(values.length, 2, name); - var members = buffers_to_strings(values).sort(); - - assert.deepEqual(members, [ 'x', 'y' ], name); - next(name); - }); -}; - -tests.SMOVE = function () { - var name = "SMOVE"; - - client.del('foo'); - client.del('bar'); - - client.sadd('foo', 'x', require_number(1, name)); - client.smove('foo', 'bar', 'x', require_number(1, name)); - client.sismember('foo', 'x', require_number(0, name)); - client.sismember('bar', 'x', require_number(1, name)); - client.smove('foo', 'bar', 'x', last(name, require_number(0, name))); -}; - -tests.SINTER = function () { - var name = "SINTER"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sinter('sa', 'sb', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 2, name); - assert.deepEqual(buffers_to_strings(intersection).sort(), [ 'b', 'c' ], name); - }); - - client.sinter('sb', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 2, name); - assert.deepEqual(buffers_to_strings(intersection).sort(), [ 'c', 'd' ], name); - }); - - client.sinter('sa', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 1, name); - assert.equal(intersection[0], 'c', name); - }); - - // 3-way - - client.sinter('sa', 'sb', 'sc', function (err, intersection) { - if (err) { - assert.fail(err, name); - } - assert.equal(intersection.length, 1, name); - assert.equal(intersection[0], 'c', name); - next(name); - }); -}; - -tests.SINTERSTORE = function () { - var name = "SINTERSTORE"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - client.del('foo'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sinterstore('foo', 'sa', 'sb', 'sc', require_number(1, name)); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(members), [ 'c' ], name); - next(name); - }); -}; - -tests.SUNION = function () { - var name = "SUNION"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sunion('sa', 'sb', 'sc', function (err, union) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(union).sort(), ['a', 'b', 'c', 'd', 'e'], name); - next(name); - }); -}; - -tests.SUNIONSTORE = function () { - var name = "SUNIONSTORE"; - - client.del('sa'); - client.del('sb'); - client.del('sc'); - client.del('foo'); - - client.sadd('sa', 'a', require_number(1, name)); - client.sadd('sa', 'b', require_number(1, name)); - client.sadd('sa', 'c', require_number(1, name)); - - client.sadd('sb', 'b', require_number(1, name)); - client.sadd('sb', 'c', require_number(1, name)); - client.sadd('sb', 'd', require_number(1, name)); - - client.sadd('sc', 'c', require_number(1, name)); - client.sadd('sc', 'd', require_number(1, name)); - client.sadd('sc', 'e', require_number(1, name)); - - client.sunionstore('foo', 'sa', 'sb', 'sc', function (err, cardinality) { - if (err) { - assert.fail(err, name); - } - assert.equal(cardinality, 5, name); - }); - - client.smembers('foo', function (err, members) { - if (err) { - assert.fail(err, name); - } - assert.equal(members.length, 5, name); - assert.deepEqual(buffers_to_strings(members).sort(), ['a', 'b', 'c', 'd', 'e'], name); - next(name); - }); -}; - -// SORT test adapted from Brian Hammond's redis-node-client.js, which has a comprehensive test suite - -tests.SORT = function () { - var name = "SORT"; - - client.del('y'); - client.del('x'); - - client.rpush('y', 'd', require_number(1, name)); - client.rpush('y', 'b', require_number(2, name)); - client.rpush('y', 'a', require_number(3, name)); - client.rpush('y', 'c', require_number(4, name)); - - client.rpush('x', '3', require_number(1, name)); - client.rpush('x', '9', require_number(2, name)); - client.rpush('x', '2', require_number(3, name)); - client.rpush('x', '4', require_number(4, name)); - - client.set('w3', '4', require_string("OK", name)); - client.set('w9', '5', require_string("OK", name)); - client.set('w2', '12', require_string("OK", name)); - client.set('w4', '6', require_string("OK", name)); - - client.set('o2', 'buz', require_string("OK", name)); - client.set('o3', 'foo', require_string("OK", name)); - client.set('o4', 'baz', require_string("OK", name)); - client.set('o9', 'bar', require_string("OK", name)); - - client.set('p2', 'qux', require_string("OK", name)); - client.set('p3', 'bux', require_string("OK", name)); - client.set('p4', 'lux', require_string("OK", name)); - client.set('p9', 'tux', require_string("OK", name)); - - // Now the data has been setup, we can test. - - // But first, test basic sorting. - - // y = [ d b a c ] - // sort y ascending = [ a b c d ] - // sort y descending = [ d c b a ] - - client.sort('y', 'asc', 'alpha', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['a', 'b', 'c', 'd'], name); - }); - - client.sort('y', 'desc', 'alpha', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['d', 'c', 'b', 'a'], name); - }); - - // Now try sorting numbers in a list. - // x = [ 3, 9, 2, 4 ] - - client.sort('x', 'asc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [2, 3, 4, 9], name); - }); - - client.sort('x', 'desc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [9, 4, 3, 2], name); - }); - - // Try sorting with a 'by' pattern. - - client.sort('x', 'by', 'w*', 'asc', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), [3, 9, 4, 2], name); - }); - - // Try sorting with a 'by' pattern and 1 'get' pattern. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['foo', 'bar', 'baz', 'buz'], name); - }); - - // Try sorting with a 'by' pattern and 2 'get' patterns. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', 'get', 'p*', function (err, sorted) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(sorted), ['foo', 'bux', 'bar', 'tux', 'baz', 'lux', 'buz', 'qux'], name); - }); - - // Try sorting with a 'by' pattern and 2 'get' patterns. - // Instead of getting back the sorted set/list, store the values to a list. - // Then check that the values are there in the expected order. - - client.sort('x', 'by', 'w*', 'asc', 'get', 'o*', 'get', 'p*', 'store', 'bacon', function (err) { - if (err) { - assert.fail(err, name); - } - }); - - client.lrange('bacon', 0, -1, function (err, values) { - if (err) { - assert.fail(err, name); - } - assert.deepEqual(buffers_to_strings(values), ['foo', 'bux', 'bar', 'tux', 'baz', 'lux', 'buz', 'qux'], name); - next(name); - }); - - // TODO - sort by hash value -}; - -tests.MONITOR = function () { - var name = "MONITOR", responses = [], monitor_client; - - monitor_client = redis.createClient(); - monitor_client.monitor(function (err, res) { - client.mget("some", "keys", "foo", "bar"); - client.set("json", JSON.stringify({ - foo: "123", - bar: "sdflkdfsjk", - another: false - })); - }); - monitor_client.on("monitor", function (time, args) { - // skip monitor command for Redis <= 2.4.16 - if (args[0] === "monitor") return; - - responses.push(args); - if (responses.length === 2) { - assert.strictEqual(5, responses[0].length); - assert.strictEqual("mget", responses[0][0]); - assert.strictEqual("some", responses[0][1]); - assert.strictEqual("keys", responses[0][2]); - assert.strictEqual("foo", responses[0][3]); - assert.strictEqual("bar", responses[0][4]); - assert.strictEqual(3, responses[1].length); - assert.strictEqual("set", responses[1][0]); - assert.strictEqual("json", responses[1][1]); - assert.strictEqual('{"foo":"123","bar":"sdflkdfsjk","another":false}', responses[1][2]); - monitor_client.quit(function (err, res) { - next(name); - }); - } - }); -}; - -tests.BLPOP = function () { - var name = "BLPOP"; - - client.rpush("blocking list", "initial value", function (err, res) { - client2.BLPOP("blocking list", 0, function (err, res) { - assert.strictEqual("blocking list", res[0].toString()); - assert.strictEqual("initial value", res[1].toString()); - - client.rpush("blocking list", "wait for this value"); - }); - client2.BLPOP("blocking list", 0, function (err, res) { - assert.strictEqual("blocking list", res[0].toString()); - assert.strictEqual("wait for this value", res[1].toString()); - next(name); - }); - }); -}; - -tests.BLPOP_TIMEOUT = function () { - var name = "BLPOP_TIMEOUT"; - - // try to BLPOP the list again, which should be empty. This should timeout and return null. - client2.BLPOP("blocking list", 1, function (err, res) { - if (err) { - throw err; - } - - assert.strictEqual(res, null); - next(name); - }); -}; - -tests.EXPIRE = function () { - var name = "EXPIRE"; - client.set(['expiry key', 'bar'], require_string("OK", name)); - client.EXPIRE(["expiry key", "1"], require_number_pos(name)); - setTimeout(function () { - client.exists(["expiry key"], last(name, require_number(0, name))); - }, 2000); -}; - -tests.TTL = function () { - var name = "TTL"; - client.set(["ttl key", "ttl val"], require_string("OK", name)); - client.expire(["ttl key", "100"], require_number_pos(name)); - setTimeout(function () { - client.TTL(["ttl key"], last(name, require_number_pos(0, name))); - }, 500); -}; - -tests.OPTIONAL_CALLBACK = function () { - var name = "OPTIONAL_CALLBACK"; - client.del("op_cb1"); - client.set("op_cb1", "x"); - client.get("op_cb1", last(name, require_string("x", name))); -}; - -tests.OPTIONAL_CALLBACK_UNDEFINED = function () { - var name = "OPTIONAL_CALLBACK_UNDEFINED"; - client.del("op_cb2"); - client.set("op_cb2", "y", undefined); - client.get("op_cb2", last(name, require_string("y", name))); -}; - -tests.HMSET_THROWS_ON_NON_STRINGS = function () { - var name = "HMSET_THROWS_ON_NON_STRINGS"; - var hash = name; - var data = { "a": [ "this is not a string" ] }; - - client.hmset(hash, data, cb); - function cb(e, r) { - assert(e); // should be an error! - } - - // alternative way it throws - function thrower() { - client.hmset(hash, data); - } - assert.throws(thrower); - next(name); -}; - -tests.ENABLE_OFFLINE_QUEUE_TRUE = function () { - var name = "ENABLE_OFFLINE_QUEUE_TRUE"; - var cli = redis.createClient(9999, null, { - max_attempts: 1 - // default :) - // enable_offline_queue: true - }); - cli.on('error', function(e) { - // ignore, b/c expecting a "can't connect" error - }); - return setTimeout(function() { - cli.set(name, name, function(err, result) { - assert.ifError(err); - }); - - return setTimeout(function(){ - assert.strictEqual(cli.offline_queue.length, 1); - return next(name); - }, 25); - }, 50); -}; - -tests.ENABLE_OFFLINE_QUEUE_FALSE = function () { - var name = "ENABLE_OFFLINE_QUEUE_FALSE"; - var cli = redis.createClient(9999, null, { - max_attempts: 1, - enable_offline_queue: false - }); - cli.on('error', function() { - // ignore, see above - }); - assert.throws(function () { - cli.set(name, name) - }) - assert.doesNotThrow(function () { - cli.set(name, name, function (err) { - // should callback with an error - assert.ok(err); - setTimeout(function () { - next(name); - }, 50); - }); - }); -}; - -// TODO - need a better way to test auth, maybe auto-config a local Redis server or something. -// Yes, this is the real password. Please be nice, thanks. -tests.auth = function () { - var name = "AUTH", client4, ready_count = 0; - - client4 = redis.createClient(9006, "filefish.redistogo.com"); - client4.auth("664b1b6aaf134e1ec281945a8de702a9", function (err, res) { - assert.strictEqual(null, err, name); - assert.strictEqual("OK", res.toString(), name); - }); - - // test auth, then kill the connection so it'll auto-reconnect and auto-re-auth - client4.on("ready", function () { - ready_count++; - if (ready_count === 1) { - client4.stream.destroy(); - } else { - client4.quit(function (err, res) { - next(name); - }); - } - }); -}; - -all_tests = Object.keys(tests); -all_start = new Date(); -test_count = 0; - -run_next_test = function run_next_test() { - var test_name = all_tests.shift(); - if (typeof tests[test_name] === "function") { - util.print('- \x1b[1m' + test_name.toLowerCase() + '\x1b[0m:'); - cur_start = new Date(); - test_count += 1; - tests[test_name](); - } else { - console.log('\n completed \x1b[32m%d\x1b[0m tests in \x1b[33m%d\x1b[0m ms\n', test_count, new Date() - all_start); - client.quit(); - client2.quit(); - } -}; - -client.once("ready", function start_tests() { - console.log("Connected to " + client.host + ":" + client.port + ", Redis server version " + client.server_info.redis_version + "\n"); - console.log("Using reply parser " + client.reply_parser.name); - - run_next_test(); - - connected = true; -}); - -client.on('end', function () { - ended = true; -}); - -// Exit immediately on connection failure, which triggers "exit", below, which fails the test -client.on("error", function (err) { - console.error("client: " + err.stack); - process.exit(); -}); -client2.on("error", function (err) { - console.error("client2: " + err.stack); - process.exit(); -}); -client3.on("error", function (err) { - console.error("client3: " + err.stack); - process.exit(); -}); -client.on("reconnecting", function (params) { - console.log("reconnecting: " + util.inspect(params)); -}); - -process.on('uncaughtException', function (err) { - console.error("Uncaught exception: " + err.stack); - process.exit(1); -}); - -process.on('exit', function (code) { - assert.equal(true, connected); - assert.equal(true, ended); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/.npmignore deleted file mode 100644 index c27cb503..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/.npmignore +++ /dev/null @@ -1,2 +0,0 @@ -test/node_modules -support diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/History.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/History.md deleted file mode 100644 index 0867b2f3..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/History.md +++ /dev/null @@ -1,237 +0,0 @@ - -0.9.16 / 2013-06-06 -=================== - - * transports: fix escaping for tests - -0.9.15 / 2013-06-06 -=================== - - * transports: added unescaping for escaped htmlfile - * skipped 12-14 to match socket.io server version - -0.9.11 / 2012-11-02 -=================== - - * Enable use of 'xhr' transport in Node.js - * Fix the problem with disconnecting xhr-polling users - * Add should to devDependencies - * Prefer XmlHttpRequest if CORS is available - * Make client compatible with AMD loaders. - -0.9.10 / 2012-08-10 -=================== - - * fix removeAllListeners to behave as expected. - * set withCredentials to true only if xdomain. - * socket: disable disconnect on unload by default. - -0.9.9 / 2012-08-01 -================== - - * socket: fixed disconnect xhr url and made it actually sync - * *: bump xmlhttprequest dep - -0.9.8 / 2012-07-24 -================== - - * Fixed build. - -0.9.7 / 2012-07-24 -================== - - * iOS websocket crash fix. - * Fixed potential `open` collision. - * Fixed disconnectSync. - -0.9.6 / 2012-04-17 -================== - - * Don't position the jsonp form off the screen (android fix). - -0.9.5 / 2012-04-05 -================== - - * Bumped version. - -0.9.4 / 2012-04-01 -================== - - * Fixes polling loop upon reconnect advice (fixes #438). - -0.9.3 / 2012-03-28 -================== - - * Fix XHR.check, which was throwing an error transparently and causing non-IE browsers to fall back to JSONP [mikito] - * Fixed forced disconnect on window close [zzzaaa] - -0.9.2 / 2012-03-13 -================== - - * Transport order set by "options" [zzzaaa] - -0.9.1-1 / 2012-03-02 -==================== - - * Fixed active-x-obfuscator NPM dependency. - -0.9.1 / 2012-03-02 -================== - - * Misc corrections. - * Added warning within Firefox about webworker test in test runner. - * Update ws dependency [einaros] - * Implemented client side heartbeat checks. [felixge] - * Improved Firewall support with ActiveX obfuscation. [felixge] - * Fixed error handling during connection process. [Outsideris] - -0.9.0 / 2012-02-26 -================== - - * Added DS_Store to gitignore. - * Updated depedencies. - * Bumped uglify - * Tweaking code so it doesn't throw an exception when used inside a WebWorker in Firefox - * Do not rely on Array.prototype.indexOf as it breaks with pages that use the Prototype.js library. - * Windows support landed - * Use @einaros ws module instead of the old crap one - * Fix for broken closeTimeout and 'IE + xhr' goes into infinite loop on disconnection - * Disabled reconnection on error if reconnect option is set to false - * Set withCredentials to true before xhr to fix authentication - * Clears the timeout from reconnection attempt when there is a successful or failed reconnection. - This fixes the issue of setTimeout's carrying over from previous reconnection - and changing (skipping) values of self.reconnectionDelay in the newer reconnection. - * Removed decoding of parameters when chunking the query string. - This was used later on to construct the url to post to the socket.io server - for connection and if we're adding custom parameters of our own to this url - (for example for OAuth authentication) they were being sent decoded, which is wrong. - -0.8.7 / 2011-11-05 -================== - - * Bumped client - -0.8.6 / 2011-10-27 -================== - - * Added WebWorker support. - * Fixed swfobject and web_socket.js to not assume window. - * Fixed CORS detection for webworker. - * Fix `defer` for webkit in a webworker. - * Fixed io.util.request to not rely on window. - * FIxed; use global instead of window and dont rely on document. - * Fixed; JSON-P handshake if CORS is not available. - * Made underlying Transport disconnection trigger immediate socket.io disconnect. - * Fixed warning when compressing with Google Closure Compiler. - * Fixed builder's uglify utf-8 support. - * Added workaround for loading indicator in FF jsonp-polling. [3rd-Eden] - * Fixed host discovery lookup. [holic] - * Fixed close timeout when disconnected/reconnecting. [jscharlach] - * Fixed jsonp-polling feature detection. - * Fixed jsonp-polling client POSTing of \n. - * Fixed test runner on IE6/7 - -0.8.5 / 2011-10-07 -================== - - * Bumped client - -0.8.4 / 2011-09-06 -================== - - * Corrected build - -0.8.3 / 2011-09-03 -================== - - * Fixed `\n` parsing for non-JSON packets. - * Fixed; make Socket.IO XHTML doctype compatible (fixes #460 from server) - * Fixed support for Node.JS running `socket.io-client`. - * Updated repository name in `package.json`. - * Added support for different policy file ports without having to port - forward 843 on the server side [3rd-Eden] - -0.8.2 / 2011-08-29 -================== - - * Fixed flashsocket detection. - -0.8.1 / 2011-08-29 -================== - - * Bump version. - -0.8.0 / 2011-08-28 -================== - - * Added MozWebSocket support (hybi-10 doesn't require API changes) [einaros]. - -0.7.11 / 2011-08-27 -=================== - - * Corrected previous release (missing build). - -0.7.10 / 2011-08-27 -=================== - - * Fix for failing fallback in websockets - -0.7.9 / 2011-08-12 -================== - - * Added check on `Socket#onConnect` to prevent double `connect` events on the main manager. - * Fixed socket namespace connect test. Remove broken alternative namespace connect test. - * Removed test handler for removed test. - * Bumped version to match `socket.io` server. - -0.7.5 / 2011-08-08 -================== - - * Added querystring support for `connect` [3rd-Eden] - * Added partial Node.JS transports support [3rd-Eden, josephg] - * Fixed builder test. - * Changed `util.inherit` to replicate Object.create / __proto__. - * Changed and cleaned up some acceptance tests. - * Fixed race condition with a test that could not be run multiple times. - * Added test for encoding a payload. - * Added the ability to override the transport to use in acceptance test [3rd-Eden] - * Fixed multiple connect packets [DanielBaulig] - * Fixed jsonp-polling over-buffering [3rd-Eden] - * Fixed ascii preservation in minified socket.io client [3rd-Eden] - * Fixed socket.io in situations where the page is not served through utf8. - * Fixed namespaces not reconnecting after disconnect [3rd-Eden] - * Fixed default port for secure connections. - -0.7.4 / 2011-07-12 -================== - - * Added `SocketNamespace#of` shortcut. [3rd-Eden] - * Fixed a IE payload decoding bug. [3rd-Eden] - * Honor document protocol, unless overriden. [dvv] - * Fixed new builder dependencies. [3rd-Eden] - -0.7.3 / 2011-06-30 -================== - - * Fixed; acks don't depend on arity. They're automatic for `.send` and - callback based for `.emit`. [dvv] - * Added support for sub-sockets authorization. [3rd-Eden] - * Added BC support for `new io.connect`. [fat] - * Fixed double `connect` events. [3rd-Eden] - * Fixed reconnection with jsonp-polling maintaining old sessionid. [franck34] - -0.7.2 / 2011-06-22 -================== - - * Added `noop` message type. - -0.7.1 / 2011-06-21 -================== - - * Bumped socket.io dependency version for acceptance tests. - -0.7.0 / 2011-06-21 -================== - - * http://socket.io/announcement.html - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/Makefile b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/Makefile deleted file mode 100644 index f2d2f41a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/Makefile +++ /dev/null @@ -1,20 +0,0 @@ - -ALL_TESTS = $(shell find test/ -name '*.test.js') - -run-tests: - @./node_modules/.bin/expresso \ - -I lib \ - -I support \ - --serial \ - $(TESTS) - -test: - @$(MAKE) TESTS="$(ALL_TESTS)" run-tests - -test-acceptance: - @node support/test-runner/app $(TRANSPORT) - -build: - @node ./bin/builder.js - -.PHONY: test diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/README.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/README.md deleted file mode 100644 index cdb7715a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/README.md +++ /dev/null @@ -1,246 +0,0 @@ -socket.io -========= - -#### Sockets for the rest of us - -The `socket.io` client is basically a simple HTTP Socket interface implementation. -It looks similar to WebSocket while providing additional features and -leveraging other transports when WebSocket is not supported by the user's -browser. - -```js -var socket = io.connect('http://domain.com'); -socket.on('connect', function () { - // socket connected -}); -socket.on('custom event', function () { - // server emitted a custom event -}); -socket.on('disconnect', function () { - // socket disconnected -}); -socket.send('hi there'); -``` - -### Recipes - -#### Utilizing namespaces (ie: multiple sockets) - -If you want to namespace all the messages and events emitted to a particular -endpoint, simply specify it as part of the `connect` uri: - -```js -var chat = io.connect('http://localhost/chat'); -chat.on('connect', function () { - // chat socket connected -}); - -var news = io.connect('/news'); // io.connect auto-detects host -news.on('connect', function () { - // news socket connected -}); -``` - -#### Emitting custom events - -To ease with the creation of applications, you can emit custom events outside -of the global `message` event. - -```js -var socket = io.connect(); -socket.emit('server custom event', { my: 'data' }); -``` - -#### Forcing disconnection - -```js -var socket = io.connect(); -socket.on('connect', function () { - socket.disconnect(); -}); -``` - -### Documentation - -#### io#connect - -```js -io.connect(uri, [options]); -``` - -##### Options: - -- *resource* - - socket.io - - The resource is what allows the `socket.io` server to identify incoming connections by `socket.io` clients. In other words, any HTTP server can implement socket.io and still serve other normal, non-realtime HTTP requests. - -- *transports* - -```js -['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling'] -``` - - A list of the transports to attempt to utilize (in order of preference). - -- *'connect timeout'* - -```js -5000 -``` - - The amount of milliseconds a transport has to create a connection before we consider it timed out. - -- *'try multiple transports'* - -```js -true -``` - - A boolean indicating if we should try other transports when the connectTimeout occurs. - -- *reconnect* - -```js -true -``` - - A boolean indicating if we should automatically reconnect if a connection is disconnected. - -- *'reconnection delay'* - -```js -500 -``` - - The amount of milliseconds before we try to connect to the server again. We are using a exponential back off algorithm for the following reconnections, on each reconnect attempt this value will get multiplied (500 > 1000 > 2000 > 4000 > 8000). - - -- *'max reconnection attempts'* - -```js -10 -``` - - The amount of attempts should we make using the current transport to connect to the server? After this we will do one final attempt, and re-try with all enabled transport methods before we give up. - -##### Properties: - -- *options* - - The passed in options combined with the defaults. - -- *connected* - - Whether the socket is connected or not. - -- *connecting* - - Whether the socket is connecting or not. - -- *reconnecting* - - Whether we are reconnecting or not. - -- *transport* - - The transport instance. - -##### Methods: - -- *connect(λ)* - - Establishes a connection. If λ is supplied as argument, it will be called once the connection is established. - -- *send(message)* - - A string of data to send. - -- *disconnect* - - Closes the connection. - -- *on(event, λ)* - - Adds a listener for the event *event*. - -- *once(event, λ)* - - Adds a one time listener for the event *event*. The listener is removed after the first time the event is fired. - -- *removeListener(event, λ)* - - Removes the listener λ for the event *event*. - -##### Events: - -- *connect* - - Fired when the connection is established and the handshake successful. - -- *connecting(transport_type)* - - Fired when a connection is attempted, passing the transport name. - -- *connect_failed* - - Fired when the connection timeout occurs after the last connection attempt. - This only fires if the `connectTimeout` option is set. - If the `tryTransportsOnConnectTimeout` option is set, this only fires once all - possible transports have been tried. - -- *message(message)* - - Fired when a message arrives from the server - -- *close* - - Fired when the connection is closed. Be careful with using this event, as some transports will fire it even under temporary, expected disconnections (such as XHR-Polling). - -- *disconnect* - - Fired when the connection is considered disconnected. - -- *reconnect(transport_type,reconnectionAttempts)* - - Fired when the connection has been re-established. This only fires if the `reconnect` option is set. - -- *reconnecting(reconnectionDelay,reconnectionAttempts)* - - Fired when a reconnection is attempted, passing the next delay for the next reconnection. - -- *reconnect_failed* - - Fired when all reconnection attempts have failed and we where unsuccessful in reconnecting to the server. - -### Contributors - -Guillermo Rauch <guillermo@learnboost.com> - -Arnout Kazemier <info@3rd-eden.com> - -### License - -(The MIT License) - -Copyright (c) 2010 LearnBoost <dev@learnboost.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/bin/builder.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/bin/builder.js deleted file mode 100755 index 7383c75a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/bin/builder.js +++ /dev/null @@ -1,303 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var fs = require('fs') - , socket = require('../lib/io') - , uglify = require('uglify-js') - , activeXObfuscator = require('active-x-obfuscator'); - -/** - * License headers. - * - * @api private - */ - -var template = '/*! Socket.IO.%ext% build:' + socket.version + ', %type%. Copyright(c) 2011 LearnBoost MIT Licensed */\n' - , development = template.replace('%type%', 'development').replace('%ext%', 'js') - , production = template.replace('%type%', 'production').replace('%ext%', 'min.js'); - -/** - * If statements, these allows you to create serveride & client side compatible - * code using specially designed `if` statements that remove serverside - * designed code from the source files - * - * @api private - */ - -var starttagIF = '// if node' - , endtagIF = '// end node'; - -/** - * The modules that are required to create a base build of Socket.IO. - * - * @const - * @type {Array} - * @api private - */ - -var base = [ - 'io.js' - , 'util.js' - , 'events.js' - , 'json.js' - , 'parser.js' - , 'transport.js' - , 'socket.js' - , 'namespace.js' - ]; - -/** - * The available transports for Socket.IO. These are mapped as: - * - * - `key` the name of the transport - * - `value` the dependencies for the transport - * - * @const - * @type {Object} - * @api public - */ - -var baseTransports = { - 'websocket': ['transports/websocket.js'] - , 'flashsocket': [ - 'transports/websocket.js' - , 'transports/flashsocket.js' - , 'vendor/web-socket-js/swfobject.js' - , 'vendor/web-socket-js/web_socket.js' - ] - , 'htmlfile': ['transports/xhr.js', 'transports/htmlfile.js'] - /* FIXME: re-enable me once we have multi-part support - , 'xhr-multipart': ['transports/xhr.js', 'transports/xhr-multipart.js'] */ - , 'xhr-polling': ['transports/xhr.js', 'transports/xhr-polling.js'] - , 'jsonp-polling': [ - 'transports/xhr.js' - , 'transports/xhr-polling.js' - , 'transports/jsonp-polling.js' - ] -}; - -/** - * Wrappers for client-side usage. - * This enables usage in top-level browser window, client-side CommonJS systems and AMD loaders. - * If doing a node build for server-side client, this wrapper is NOT included. - * @api private - */ -var wrapperPre = "\nvar io = ('undefined' === typeof module ? {} : module.exports);\n(function() {\n"; - -var wrapperPost = "\nif (typeof define === \"function\" && define.amd) {" + - "\n define([], function () { return io; });" + - "\n}\n})();"; - - -/** - * Builds a custom Socket.IO distribution based on the transports that you - * need. You can configure the build to create development build or production - * build (minified). - * - * @param {Array} transports The transports that needs to be bundled. - * @param {Object} [options] Options to configure the building process. - * @param {Function} callback Last argument should always be the callback - * @callback {String|Boolean} err An optional argument, if it exists than an error - * occurred during the build process. - * @callback {String} result The result of the build process. - * @api public - */ - -var builder = module.exports = function () { - var transports, options, callback, error = null - , args = Array.prototype.slice.call(arguments, 0) - , settings = { - minify: true - , node: false - , custom: [] - }; - - // Fancy pancy argument support this makes any pattern possible mainly - // because we require only one of each type - args.forEach(function (arg) { - var type = Object.prototype.toString.call(arg) - .replace(/\[object\s(\w+)\]/gi , '$1' ).toLowerCase(); - - switch (type) { - case 'array': - return transports = arg; - case 'object': - return options = arg; - case 'function': - return callback = arg; - } - }); - - // Add defaults - options = options || {}; - transports = transports || Object.keys(baseTransports); - - // Merge the data - for(var option in options) { - settings[option] = options[option]; - } - - // Start creating a dependencies chain with all the required files for the - // custom Socket.IO bundle. - var files = []; - base.forEach(function (file) { - files.push(__dirname + '/../lib/' + file); - }); - - transports.forEach(function (transport) { - var dependencies = baseTransports[transport]; - if (!dependencies) { - error = 'Unsupported transport `' + transport + '` supplied as argument.'; - return; - } - - // Add the files to the files list, but only if they are not added before - dependencies.forEach(function (file) { - var path = __dirname + '/../lib/' + file; - if (!~files.indexOf(path)) files.push(path); - }) - }); - - // check to see if the files tree compilation generated any errors. - if (error) return callback(error); - - var results = {}; - files.forEach(function (file) { - fs.readFile(file, function (err, content) { - if (err) error = err; - results[file] = content; - - // check if we are done yet, or not.. Just by checking the size of the result - // object. - if (Object.keys(results).length !== files.length) return; - - // we are done, did we error? - if (error) return callback(error); - - // start with the license header - var code = development - , ignore = 0; - - // pre-wrapper for non-server-side builds - if (!settings.node) code += wrapperPre; - - // concatenate the file contents in order - files.forEach(function (file) { - code += results[file]; - }); - - // check if we need to add custom code - if (settings.custom.length) { - settings.custom.forEach(function (content) { - code += content; - }); - } - - // post-wrapper for non-server-side builds - if (!settings.node) { - code += wrapperPost; - } - - code = activeXObfuscator(code); - - // Search for conditional code blocks that need to be removed as they - // where designed for a server side env. but only if we don't want to - // make this build node compatible. - if (!settings.node) { - code = code.split('\n').filter(function (line) { - // check if there are tags in here - var start = line.indexOf(starttagIF) >= 0 - , end = line.indexOf(endtagIF) >= 0 - , ret = ignore; - - // ignore the current line - if (start) { - ignore++; - ret = ignore; - } - - // stop ignoring the next line - if (end) { - ignore--; - } - - return ret == 0; - }).join('\n'); - } - - // check if we need to process it any further - if (settings.minify) { - var ast = uglify.parser.parse(code); - ast = uglify.uglify.ast_mangle(ast); - ast = uglify.uglify.ast_squeeze(ast); - - code = production + uglify.uglify.gen_code(ast, { ascii_only: true }); - } - - callback(error, code); - }) - }) -}; - -/** - * Builder version is also the current client version - * this way we don't have to do another include for the - * clients version number and we can just include the builder. - * - * @type {String} - * @api public - */ - -builder.version = socket.version; - -/** - * A list of all build in transport types. - * - * @type {Object} - * @api public - */ - -builder.transports = baseTransports; - -/** - * Command line support, this allows us to generate builds without having - * to load it as module. - */ - -if (!module.parent){ - // the first 2 are `node` and the path to this file, we don't need them - var args = process.argv.slice(2); - - // build a development build - builder(args.length ? args : false, { minify:false }, function (err, content) { - if (err) return console.error(err); - - fs.write( - fs.openSync(__dirname + '/../dist/socket.io.js', 'w') - , content - , 0 - , 'utf8' - ); - console.log('Successfully generated the development build: socket.io.js'); - }); - - // and build a production build - builder(args.length ? args : false, function (err, content) { - if (err) return console.error(err); - - fs.write( - fs.openSync(__dirname + '/../dist/socket.io.min.js', 'w') - , content - , 0 - , 'utf8' - ); - console.log('Successfully generated the production build: socket.io.min.js'); - }); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-bind/component.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-bind/component.json deleted file mode 100644 index ebdf6422..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-bind/component.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "bind", - "version": "0.0.1", - "description": "function binding utility", - "keywords": [ - "bind", - "utility" - ], - "dependencies": {}, - "scripts": [ - "index.js" - ], - "repo": "https://raw.github.com/component/bind" -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-bind/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-bind/index.js deleted file mode 100644 index 9808fc06..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-bind/index.js +++ /dev/null @@ -1,24 +0,0 @@ - -/** - * Slice reference. - */ - -var slice = [].slice; - -/** - * Bind `obj` to `fn`. - * - * @param {Object} obj - * @param {Function|String} fn or string - * @return {Function} - * @api public - */ - -module.exports = function(obj, fn){ - if ('string' == typeof fn) fn = obj[fn]; - if ('function' != typeof fn) throw new Error('bind() requires a function'); - var args = [].slice.call(arguments, 2); - return function(){ - return fn.apply(obj, args.concat(slice.call(arguments))); - } -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-emitter/component.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-emitter/component.json deleted file mode 100644 index 0eec23b1..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-emitter/component.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "name": "emitter", - "description": "Event emitter", - "keywords": [ - "emitter", - "events" - ], - "version": "0.0.6", - "scripts": [ - "index.js" - ], - "repo": "https://raw.github.com/component/emitter" -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-emitter/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-emitter/index.js deleted file mode 100644 index 8cc74ae8..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-emitter/index.js +++ /dev/null @@ -1,147 +0,0 @@ - -/** - * Expose `Emitter`. - */ - -module.exports = Emitter; - -/** - * Initialize a new `Emitter`. - * - * @api public - */ - -function Emitter(obj) { - if (obj) return mixin(obj); -}; - -/** - * Mixin the emitter properties. - * - * @param {Object} obj - * @return {Object} - * @api private - */ - -function mixin(obj) { - for (var key in Emitter.prototype) { - obj[key] = Emitter.prototype[key]; - } - return obj; -} - -/** - * Listen on the given `event` with `fn`. - * - * @param {String} event - * @param {Function} fn - * @return {Emitter} - * @api public - */ - -Emitter.prototype.on = function(event, fn){ - this._callbacks = this._callbacks || {}; - (this._callbacks[event] = this._callbacks[event] || []) - .push(fn); - return this; -}; - -/** - * Adds an `event` listener that will be invoked a single - * time then automatically removed. - * - * @param {String} event - * @param {Function} fn - * @return {Emitter} - * @api public - */ - -Emitter.prototype.once = function(event, fn){ - var self = this; - this._callbacks = this._callbacks || {}; - - function on() { - self.off(event, on); - fn.apply(this, arguments); - } - - fn._off = on; - this.on(event, on); - return this; -}; - -/** - * Remove the given callback for `event` or all - * registered callbacks. - * - * @param {String} event - * @param {Function} fn - * @return {Emitter} - * @api public - */ - -Emitter.prototype.off = function(event, fn){ - this._callbacks = this._callbacks || {}; - var callbacks = this._callbacks[event]; - if (!callbacks) return this; - - // remove all handlers - if (1 == arguments.length) { - delete this._callbacks[event]; - return this; - } - - // remove specific handler - var i = callbacks.indexOf(fn._off || fn); - if (~i) callbacks.splice(i, 1); - return this; -}; - -/** - * Emit `event` with the given args. - * - * @param {String} event - * @param {Mixed} ... - * @return {Emitter} - */ - -Emitter.prototype.emit = function(event){ - this._callbacks = this._callbacks || {}; - var args = [].slice.call(arguments, 1) - , callbacks = this._callbacks[event]; - - if (callbacks) { - callbacks = callbacks.slice(0); - for (var i = 0, len = callbacks.length; i < len; ++i) { - callbacks[i].apply(this, args); - } - } - - return this; -}; - -/** - * Return array of callbacks for `event`. - * - * @param {String} event - * @return {Array} - * @api public - */ - -Emitter.prototype.listeners = function(event){ - this._callbacks = this._callbacks || {}; - return this._callbacks[event] || []; -}; - -/** - * Check if this emitter has `event` handlers. - * - * @param {String} event - * @return {Boolean} - * @api public - */ - -Emitter.prototype.hasListeners = function(event){ - return !! this.listeners(event).length; -}; - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json-fallback/component.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json-fallback/component.json deleted file mode 100644 index 6b35f453..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json-fallback/component.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "json-fallback", - "repo": "component/json", - "description": "JSON parser / stringifier fallback", - "version": "0.0.1", - "keywords": [ - "json", - "fallback" - ], - "dependencies": {}, - "development": {}, - "scripts": [ - "index.js" - ] -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json-fallback/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json-fallback/index.js deleted file mode 100644 index 5a47ca6f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json-fallback/index.js +++ /dev/null @@ -1,486 +0,0 @@ -/* - json2.js - 2011-10-19 - - Public Domain. - - NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. - - See http://www.JSON.org/js.html - - - This code should be minified before deployment. - See http://javascript.crockford.com/jsmin.html - - USE YOUR OWN COPY. IT IS EXTREMELY UNWISE TO LOAD CODE FROM SERVERS YOU DO - NOT CONTROL. - - - This file creates a global JSON object containing two methods: stringify - and parse. - - JSON.stringify(value, replacer, space) - value any JavaScript value, usually an object or array. - - replacer an optional parameter that determines how object - values are stringified for objects. It can be a - function or an array of strings. - - space an optional parameter that specifies the indentation - of nested structures. If it is omitted, the text will - be packed without extra whitespace. If it is a number, - it will specify the number of spaces to indent at each - level. If it is a string (such as '\t' or ' '), - it contains the characters used to indent at each level. - - This method produces a JSON text from a JavaScript value. - - When an object value is found, if the object contains a toJSON - method, its toJSON method will be called and the result will be - stringified. A toJSON method does not serialize: it returns the - value represented by the name/value pair that should be serialized, - or undefined if nothing should be serialized. The toJSON method - will be passed the key associated with the value, and this will be - bound to the value - - For example, this would serialize Dates as ISO strings. - - Date.prototype.toJSON = function (key) { - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - return this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z'; - }; - - You can provide an optional replacer method. It will be passed the - key and value of each member, with this bound to the containing - object. The value that is returned from your method will be - serialized. If your method returns undefined, then the member will - be excluded from the serialization. - - If the replacer parameter is an array of strings, then it will be - used to select the members to be serialized. It filters the results - such that only members with keys listed in the replacer array are - stringified. - - Values that do not have JSON representations, such as undefined or - functions, will not be serialized. Such values in objects will be - dropped; in arrays they will be replaced with null. You can use - a replacer function to replace those with JSON values. - JSON.stringify(undefined) returns undefined. - - The optional space parameter produces a stringification of the - value that is filled with line breaks and indentation to make it - easier to read. - - If the space parameter is a non-empty string, then that string will - be used for indentation. If the space parameter is a number, then - the indentation will be that many spaces. - - Example: - - text = JSON.stringify(['e', {pluribus: 'unum'}]); - // text is '["e",{"pluribus":"unum"}]' - - - text = JSON.stringify(['e', {pluribus: 'unum'}], null, '\t'); - // text is '[\n\t"e",\n\t{\n\t\t"pluribus": "unum"\n\t}\n]' - - text = JSON.stringify([new Date()], function (key, value) { - return this[key] instanceof Date ? - 'Date(' + this[key] + ')' : value; - }); - // text is '["Date(---current time---)"]' - - - JSON.parse(text, reviver) - This method parses a JSON text to produce an object or array. - It can throw a SyntaxError exception. - - The optional reviver parameter is a function that can filter and - transform the results. It receives each of the keys and values, - and its return value is used instead of the original value. - If it returns what it received, then the structure is not modified. - If it returns undefined then the member is deleted. - - Example: - - // Parse the text. Values that look like ISO date strings will - // be converted to Date objects. - - myData = JSON.parse(text, function (key, value) { - var a; - if (typeof value === 'string') { - a = -/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2}(?:\.\d*)?)Z$/.exec(value); - if (a) { - return new Date(Date.UTC(+a[1], +a[2] - 1, +a[3], +a[4], - +a[5], +a[6])); - } - } - return value; - }); - - myData = JSON.parse('["Date(09/09/2001)"]', function (key, value) { - var d; - if (typeof value === 'string' && - value.slice(0, 5) === 'Date(' && - value.slice(-1) === ')') { - d = new Date(value.slice(5, -1)); - if (d) { - return d; - } - } - return value; - }); - - - This is a reference implementation. You are free to copy, modify, or - redistribute. -*/ - -/*jslint evil: true, regexp: true */ - -/*members "", "\b", "\t", "\n", "\f", "\r", "\"", JSON, "\\", apply, - call, charCodeAt, getUTCDate, getUTCFullYear, getUTCHours, - getUTCMinutes, getUTCMonth, getUTCSeconds, hasOwnProperty, join, - lastIndex, length, parse, prototype, push, replace, slice, stringify, - test, toJSON, toString, valueOf -*/ - - -// Create a JSON object only if one does not already exist. We create the -// methods in a closure to avoid creating global variables. - -var JSON = {}; - -(function () { - 'use strict'; - - function f(n) { - // Format integers to have at least two digits. - return n < 10 ? '0' + n : n; - } - - if (typeof Date.prototype.toJSON !== 'function') { - - Date.prototype.toJSON = function (key) { - - return isFinite(this.valueOf()) - ? this.getUTCFullYear() + '-' + - f(this.getUTCMonth() + 1) + '-' + - f(this.getUTCDate()) + 'T' + - f(this.getUTCHours()) + ':' + - f(this.getUTCMinutes()) + ':' + - f(this.getUTCSeconds()) + 'Z' - : null; - }; - - String.prototype.toJSON = - Number.prototype.toJSON = - Boolean.prototype.toJSON = function (key) { - return this.valueOf(); - }; - } - - var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, - gap, - indent, - meta = { // table of character substitutions - '\b': '\\b', - '\t': '\\t', - '\n': '\\n', - '\f': '\\f', - '\r': '\\r', - '"' : '\\"', - '\\': '\\\\' - }, - rep; - - - function quote(string) { - -// If the string contains no control characters, no quote characters, and no -// backslash characters, then we can safely slap some quotes around it. -// Otherwise we must also replace the offending characters with safe escape -// sequences. - - escapable.lastIndex = 0; - return escapable.test(string) ? '"' + string.replace(escapable, function (a) { - var c = meta[a]; - return typeof c === 'string' - ? c - : '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }) + '"' : '"' + string + '"'; - } - - - function str(key, holder) { - -// Produce a string from holder[key]. - - var i, // The loop counter. - k, // The member key. - v, // The member value. - length, - mind = gap, - partial, - value = holder[key]; - -// If the value has a toJSON method, call it to obtain a replacement value. - - if (value && typeof value === 'object' && - typeof value.toJSON === 'function') { - value = value.toJSON(key); - } - -// If we were called with a replacer function, then call the replacer to -// obtain a replacement value. - - if (typeof rep === 'function') { - value = rep.call(holder, key, value); - } - -// What happens next depends on the value's type. - - switch (typeof value) { - case 'string': - return quote(value); - - case 'number': - -// JSON numbers must be finite. Encode non-finite numbers as null. - - return isFinite(value) ? String(value) : 'null'; - - case 'boolean': - case 'null': - -// If the value is a boolean or null, convert it to a string. Note: -// typeof null does not produce 'null'. The case is included here in -// the remote chance that this gets fixed someday. - - return String(value); - -// If the type is 'object', we might be dealing with an object or an array or -// null. - - case 'object': - -// Due to a specification blunder in ECMAScript, typeof null is 'object', -// so watch out for that case. - - if (!value) { - return 'null'; - } - -// Make an array to hold the partial results of stringifying this object value. - - gap += indent; - partial = []; - -// Is the value an array? - - if (Object.prototype.toString.apply(value) === '[object Array]') { - -// The value is an array. Stringify every element. Use null as a placeholder -// for non-JSON values. - - length = value.length; - for (i = 0; i < length; i += 1) { - partial[i] = str(i, value) || 'null'; - } - -// Join all of the elements together, separated with commas, and wrap them in -// brackets. - - v = partial.length === 0 - ? '[]' - : gap - ? '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' - : '[' + partial.join(',') + ']'; - gap = mind; - return v; - } - -// If the replacer is an array, use it to select the members to be stringified. - - if (rep && typeof rep === 'object') { - length = rep.length; - for (i = 0; i < length; i += 1) { - if (typeof rep[i] === 'string') { - k = rep[i]; - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } else { - -// Otherwise, iterate through all of the keys in the object. - - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = str(k, value); - if (v) { - partial.push(quote(k) + (gap ? ': ' : ':') + v); - } - } - } - } - -// Join all of the member texts together, separated with commas, -// and wrap them in braces. - - v = partial.length === 0 - ? '{}' - : gap - ? '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' - : '{' + partial.join(',') + '}'; - gap = mind; - return v; - } - } - -// If the JSON object does not yet have a stringify method, give it one. - - if (typeof JSON.stringify !== 'function') { - JSON.stringify = function (value, replacer, space) { - -// The stringify method takes a value and an optional replacer, and an optional -// space parameter, and returns a JSON text. The replacer can be a function -// that can replace values, or an array of strings that will select the keys. -// A default replacer method can be provided. Use of the space parameter can -// produce text that is more easily readable. - - var i; - gap = ''; - indent = ''; - -// If the space parameter is a number, make an indent string containing that -// many spaces. - - if (typeof space === 'number') { - for (i = 0; i < space; i += 1) { - indent += ' '; - } - -// If the space parameter is a string, it will be used as the indent string. - - } else if (typeof space === 'string') { - indent = space; - } - -// If there is a replacer, it must be a function or an array. -// Otherwise, throw an error. - - rep = replacer; - if (replacer && typeof replacer !== 'function' && - (typeof replacer !== 'object' || - typeof replacer.length !== 'number')) { - throw new Error('JSON.stringify'); - } - -// Make a fake root object containing our value under the key of ''. -// Return the result of stringifying the value. - - return str('', {'': value}); - }; - } - - -// If the JSON object does not yet have a parse method, give it one. - - if (typeof JSON.parse !== 'function') { - JSON.parse = function (text, reviver) { - -// The parse method takes a text and an optional reviver function, and returns -// a JavaScript value if the text is a valid JSON text. - - var j; - - function walk(holder, key) { - -// The walk method is used to recursively walk the resulting structure so -// that modifications can be made. - - var k, v, value = holder[key]; - if (value && typeof value === 'object') { - for (k in value) { - if (Object.prototype.hasOwnProperty.call(value, k)) { - v = walk(value, k); - if (v !== undefined) { - value[k] = v; - } else { - delete value[k]; - } - } - } - } - return reviver.call(holder, key, value); - } - - -// Parsing happens in four stages. In the first stage, we replace certain -// Unicode characters with escape sequences. JavaScript handles many characters -// incorrectly, either silently deleting them, or treating them as line endings. - - text = String(text); - cx.lastIndex = 0; - if (cx.test(text)) { - text = text.replace(cx, function (a) { - return '\\u' + - ('0000' + a.charCodeAt(0).toString(16)).slice(-4); - }); - } - -// In the second stage, we run the text against regular expressions that look -// for non-JSON patterns. We are especially concerned with '()' and 'new' -// because they can cause invocation, and '=' because it can cause mutation. -// But just to be safe, we want to reject all unexpected forms. - -// We split the second stage into 4 regexp operations in order to work around -// crippling inefficiencies in IE's and Safari's regexp engines. First we -// replace the JSON backslash pairs with '@' (a non-JSON character). Second, we -// replace all simple value tokens with ']' characters. Third, we delete all -// open brackets that follow a colon or comma or that begin the text. Finally, -// we look to see that the remaining characters are only whitespace or ']' or -// ',' or ':' or '{' or '}'. If that is so, then the text is safe for eval. - - if (/^[\],:{}\s]*$/ - .test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, '@') - .replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, ']') - .replace(/(?:^|:|,)(?:\s*\[)+/g, ''))) { - -// In the third stage we use the eval function to compile the text into a -// JavaScript structure. The '{' operator is subject to a syntactic ambiguity -// in JavaScript: it can begin a block or an object literal. We wrap the text -// in parens to eliminate the ambiguity. - - j = eval('(' + text + ')'); - -// In the optional fourth stage, we recursively walk the new structure, passing -// each name/value pair to a reviver function for possible transformation. - - return typeof reviver === 'function' - ? walk({'': j}, '') - : j; - } - -// If the text is not JSON parseable, then a SyntaxError is thrown. - - throw new SyntaxError('JSON.parse'); - }; - } -}()); - -module.exports = JSON \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json/component.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json/component.json deleted file mode 100644 index da7097cf..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json/component.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "json", - "repo": "component/json", - "description": "JSON parser / stringifier", - "version": "0.0.1", - "keywords": [ - "json" - ], - "dependencies": {}, - "development": {}, - "optional": { - "component/json-fallback": "*" - }, - "scripts": [ - "index.js" - ] -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json/index.js deleted file mode 100644 index c05cc28c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/component-json/index.js +++ /dev/null @@ -1,4 +0,0 @@ - -module.exports = 'undefined' == typeof JSON - ? require('json-fallback') - : JSON; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/component.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/component.json deleted file mode 100644 index b90c1f27..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/component.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "engine.io", - "version": "0.4.0", - "dependencies": { - "component/emitter": "0.0.6", - "visionmedia/debug": "*" - }, - "main": "lib/index.js", - "scripts": [ - "lib/index.js", - "lib/parser.js", - "lib/socket.js", - "lib/transport.js", - "lib/emitter.js", - "lib/util.js", - "lib/transports/index.js", - "lib/transports/polling.js", - "lib/transports/polling-xhr.js", - "lib/transports/polling-jsonp.js", - "lib/transports/websocket.js", - "lib/transports/flashsocket.js" - ], - "repo": "https://raw.github.com/learnboost/engine.io-client" -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/emitter.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/emitter.js deleted file mode 100644 index 142a9bf6..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/emitter.js +++ /dev/null @@ -1,52 +0,0 @@ - -/** - * Module dependencies. - */ - -var Emitter; - -try { - Emitter = require('emitter'); -} catch(e){ - Emitter = require('emitter-component'); -} - -/** - * Module exports. - */ - -module.exports = Emitter; - -/** - * Compatibility with `WebSocket#addEventListener`. - * - * @api public - */ - -Emitter.prototype.addEventListener = Emitter.prototype.on; - -/** - * Compatibility with `WebSocket#removeEventListener`. - * - * @api public - */ - -Emitter.prototype.removeEventListener = Emitter.prototype.off; - -/** - * Node-compatible `EventEmitter#removeListener` - * - * @api public - */ - -Emitter.prototype.removeListener = Emitter.prototype.off; - -/** - * Node-compatible `EventEmitter#removeAllListeners` - * - * @api public - */ - -Emitter.prototype.removeAllListeners = function(){ - this._callbacks = {}; -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/index.js deleted file mode 100644 index d463b3fb..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./socket'); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/parser.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/parser.js deleted file mode 100644 index 2c2928e8..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/parser.js +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Module dependencies. - */ - -var util = require('./util') - -/** - * Packet types. - */ - -var packets = exports.packets = { - open: 0 // non-ws - , close: 1 // non-ws - , ping: 2 - , pong: 3 - , message: 4 - , upgrade: 5 - , noop: 6 -}; - -var packetslist = util.keys(packets); - -/** - * Premade error packet. - */ - -var err = { type: 'error', data: 'parser error' } - -/** - * Encodes a packet. - * - * [ `:` ] - * - * Example: - * - * 5:hello world - * 3 - * 4 - * - * @api private - */ - -exports.encodePacket = function (packet) { - var encoded = packets[packet.type] - - // data fragment is optional - if (undefined !== packet.data) { - encoded += String(packet.data); - } - - return '' + encoded; -}; - -/** - * Decodes a packet. - * - * @return {Object} with `type` and `data` (if any) - * @api private - */ - -exports.decodePacket = function (data) { - var type = data.charAt(0); - - if (Number(type) != type || !packetslist[type]) { - return err; - } - - if (data.length > 1) { - return { type: packetslist[type], data: data.substring(1) }; - } else { - return { type: packetslist[type] }; - } -}; - -/** - * Encodes multiple messages (payload). - * - * :data - * - * Example: - * - * 11:hello world2:hi - * - * @param {Array} packets - * @api private - */ - -exports.encodePayload = function (packets) { - if (!packets.length) { - return '0:'; - } - - var encoded = '' - , message - - for (var i = 0, l = packets.length; i < l; i++) { - message = exports.encodePacket(packets[i]); - encoded += message.length + ':' + message; - } - - return encoded; -}; - -/* - * Decodes data when a payload is maybe expected. - * - * @param {String} data - * @return {Array} packets - * @api public - */ - -exports.decodePayload = function (data) { - if (data == '') { - // parser error - ignoring payload - return [err]; - } - - var packets = [] - , length = '' - , n, msg, packet - - for (var i = 0, l = data.length; i < l; i++) { - var chr = data.charAt(i) - - if (':' != chr) { - length += chr; - } else { - if ('' == length || (length != (n = Number(length)))) { - // parser error - ignoring payload - return [err]; - } - - msg = data.substr(i + 1, n); - - if (length != msg.length) { - // parser error - ignoring payload - return [err]; - } - - if (msg.length) { - packet = exports.decodePacket(msg); - - if (err.type == packet.type && err.data == packet.data) { - // parser error in individual packet - ignoring payload - return [err]; - } - - packets.push(packet); - } - - // advance cursor - i += n; - length = '' - } - } - - if (length != '') { - // parser error - ignoring payload - return [err]; - } - - return packets; -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/socket.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/socket.js deleted file mode 100644 index ad86283b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/socket.js +++ /dev/null @@ -1,492 +0,0 @@ -/** - * Module dependencies. - */ - -var util = require('./util') - , transports = require('./transports') - , Emitter = require('./emitter') - , debug = require('debug')('engine-client:socket'); - -/** - * Module exports. - */ - -module.exports = Socket; - -/** - * Global reference. - */ - -var global = 'undefined' != typeof window ? window : global; - -/** - * Socket constructor. - * - * @param {Object} options - * @api public - */ - -function Socket(opts){ - if (!(this instanceof Socket)) return new Socket(opts); - - if ('string' == typeof opts) { - var uri = util.parseUri(opts); - opts = arguments[1] || {}; - opts.host = uri.host; - opts.secure = uri.protocol == 'https' || uri.protocol == 'wss'; - opts.port = uri.port; - } - - opts = opts || {}; - this.secure = null != opts.secure ? opts.secure : (global.location && 'https:' == location.protocol); - this.host = opts.host || opts.hostname || (global.location ? location.hostname : 'localhost'); - this.port = opts.port || (global.location && location.port ? location.port : (this.secure ? 443 : 80)); - this.query = opts.query || {}; - this.query.uid = rnd(); - this.upgrade = false !== opts.upgrade; - this.resource = opts.resource || 'default'; - this.path = (opts.path || '/engine.io').replace(/\/$/, ''); - this.path += '/' + this.resource + '/'; - this.forceJSONP = !!opts.forceJSONP; - this.timestampParam = opts.timestampParam || 't'; - this.timestampRequests = !!opts.timestampRequests; - this.flashPath = opts.flashPath || ''; - this.transports = opts.transports || ['polling', 'websocket', 'flashsocket']; - this.readyState = ''; - this.writeBuffer = []; - this.policyPort = opts.policyPort || 843; - this.open(); - - Socket.sockets.push(this); - Socket.sockets.evs.emit('add', this); -}; - -/** - * Mix in `Emitter`. - */ - -Emitter(Socket.prototype); - -/** - * Protocol version. - * - * @api public - */ - -Socket.protocol = 1; - -/** - * Static EventEmitter. - */ - -Socket.sockets = []; -Socket.sockets.evs = new Emitter; - -/** - * Expose deps for legacy compatibility - * and standalone browser access. - */ - -Socket.Socket = Socket; -Socket.Transport = require('./transport'); -Socket.Emitter = require('./emitter'); -Socket.transports = require('./transports'); -Socket.util = require('./util'); -Socket.parser = require('./parser'); - -/** - * Creates transport of the given type. - * - * @param {String} transport name - * @return {Transport} - * @api private - */ - -Socket.prototype.createTransport = function (name) { - debug('creating transport "%s"', name); - var query = clone(this.query); - query.transport = name; - - if (this.id) { - query.sid = this.id; - } - - var transport = new transports[name]({ - host: this.host - , port: this.port - , secure: this.secure - , path: this.path - , query: query - , forceJSONP: this.forceJSONP - , timestampRequests: this.timestampRequests - , timestampParam: this.timestampParam - , flashPath: this.flashPath - , policyPort: this.policyPort - }); - - return transport; -}; - -function clone (obj) { - var o = {}; - for (var i in obj) { - if (obj.hasOwnProperty(i)) { - o[i] = obj[i]; - } - } - return o; -} - -/** - * Initializes transport to use and starts probe. - * - * @api private - */ - -Socket.prototype.open = function () { - this.readyState = 'opening'; - var transport = this.createTransport(this.transports[0]); - transport.open(); - this.setTransport(transport); -}; - -/** - * Sets the current transport. Disables the existing one (if any). - * - * @api private - */ - -Socket.prototype.setTransport = function (transport) { - var self = this; - - if (this.transport) { - debug('clearing existing transport'); - this.transport.removeAllListeners(); - } - - // set up transport - this.transport = transport; - - // set up transport listeners - transport - .on('drain', function () { - self.flush(); - }) - .on('packet', function (packet) { - self.onPacket(packet); - }) - .on('error', function (e) { - self.onError(e); - }) - .on('close', function () { - self.onClose('transport close'); - }); -}; - -/** - * Probes a transport. - * - * @param {String} transport name - * @api private - */ - -Socket.prototype.probe = function (name) { - debug('probing transport "%s"', name); - var transport = this.createTransport(name, { probe: 1 }) - , failed = false - , self = this; - - transport.once('open', function () { - if (failed) return; - - debug('probe transport "%s" opened', name); - transport.send([{ type: 'ping', data: 'probe' }]); - transport.once('packet', function (msg) { - if (failed) return; - if ('pong' == msg.type && 'probe' == msg.data) { - debug('probe transport "%s" pong', name); - self.upgrading = true; - self.emit('upgrading', transport); - - debug('pausing current transport "%s"', self.transport.name); - self.transport.pause(function () { - if (failed) return; - if ('closed' == self.readyState || 'closing' == self.readyState) { - return; - } - debug('changing transport and sending upgrade packet'); - transport.removeListener('error', onerror); - self.emit('upgrade', transport); - self.setTransport(transport); - transport.send([{ type: 'upgrade' }]); - transport = null; - self.upgrading = false; - self.flush(); - }); - } else { - debug('probe transport "%s" failed', name); - var err = new Error('probe error'); - err.transport = transport.name; - self.emit('error', err); - } - }); - }); - - transport.once('error', onerror); - function onerror(err) { - if (failed) return; - - // Any callback called by transport should be ignored since now - failed = true; - - var error = new Error('probe error: ' + err); - error.transport = transport.name; - - transport.close(); - transport = null; - - debug('probe transport "%s" failed because of error: %s', name, err); - - self.emit('error', error); - }; - - transport.open(); - - this.once('close', function () { - if (transport) { - debug('socket closed prematurely - aborting probe'); - failed = true; - transport.close(); - transport = null; - } - }); - - this.once('upgrading', function (to) { - if (transport && to.name != transport.name) { - debug('"%s" works - aborting "%s"', to.name, transport.name); - transport.close(); - transport = null; - } - }); -}; - -/** - * Called when connection is deemed open. - * - * @api public - */ - -Socket.prototype.onOpen = function () { - debug('socket open'); - this.readyState = 'open'; - this.emit('open'); - this.onopen && this.onopen.call(this); - this.flush(); - - // we check for `readyState` in case an `open` - // listener alreay closed the socket - if ('open' == this.readyState && this.upgrade && this.transport.pause) { - debug('starting upgrade probes'); - for (var i = 0, l = this.upgrades.length; i < l; i++) { - this.probe(this.upgrades[i]); - } - } -}; - -/** - * Handles a packet. - * - * @api private - */ - -Socket.prototype.onPacket = function (packet) { - if ('opening' == this.readyState || 'open' == this.readyState) { - debug('socket receive: type "%s", data "%s"', packet.type, packet.data); - - this.emit('packet', packet); - - // Socket is live - any packet counts - this.emit('heartbeat'); - - switch (packet.type) { - case 'open': - this.onHandshake(util.parseJSON(packet.data)); - break; - - case 'pong': - this.ping(); - break; - - case 'error': - var err = new Error('server error'); - err.code = packet.data; - this.emit('error', err); - break; - - case 'message': - this.emit('message', packet.data); - var event = { data: packet.data }; - event.toString = function () { - return packet.data; - }; - this.onmessage && this.onmessage.call(this, event); - break; - } - } else { - debug('packet received with socket readyState "%s"', this.readyState); - } -}; - -/** - * Called upon handshake completion. - * - * @param {Object} handshake obj - * @api private - */ - -Socket.prototype.onHandshake = function (data) { - this.emit('handshake', data); - this.id = data.sid; - this.transport.query.sid = data.sid; - this.upgrades = data.upgrades; - this.pingInterval = data.pingInterval; - this.pingTimeout = data.pingTimeout; - this.onOpen(); - this.ping(); - - // Prolong liveness of socket on heartbeat - this.removeListener('heartbeat', this.onHeartbeat); - this.on('heartbeat', this.onHeartbeat); -}; - -/** - * Resets ping timeout. - * - * @api private - */ - -Socket.prototype.onHeartbeat = function (timeout) { - clearTimeout(this.pingTimeoutTimer); - var self = this; - self.pingTimeoutTimer = setTimeout(function () { - if ('closed' == self.readyState) return; - self.onClose('ping timeout'); - }, timeout || (self.pingInterval + self.pingTimeout)); -}; - -/** - * Pings server every `this.pingInterval` and expects response - * within `this.pingTimeout` or closes connection. - * - * @api private - */ - -Socket.prototype.ping = function () { - var self = this; - clearTimeout(self.pingIntervalTimer); - self.pingIntervalTimer = setTimeout(function () { - debug('writing ping packet - expecting pong within %sms', self.pingTimeout); - self.sendPacket('ping'); - self.onHeartbeat(self.pingTimeout); - }, self.pingInterval); -}; - -/** - * Flush write buffers. - * - * @api private - */ - -Socket.prototype.flush = function () { - if ('closed' != this.readyState && this.transport.writable && - !this.upgrading && this.writeBuffer.length) { - debug('flushing %d packets in socket', this.writeBuffer.length); - this.transport.send(this.writeBuffer); - this.writeBuffer = []; - } -}; - -/** - * Sends a message. - * - * @param {String} message. - * @return {Socket} for chaining. - * @api public - */ - -Socket.prototype.write = -Socket.prototype.send = function (msg) { - this.sendPacket('message', msg); - return this; -}; - -/** - * Sends a packet. - * - * @param {String} packet type. - * @param {String} data. - * @api private - */ - -Socket.prototype.sendPacket = function (type, data) { - var packet = { type: type, data: data }; - this.emit('packetCreate', packet); - this.writeBuffer.push(packet); - this.flush(); -}; - -/** - * Closes the connection. - * - * @api private - */ - -Socket.prototype.close = function () { - if ('opening' == this.readyState || 'open' == this.readyState) { - this.onClose('forced close'); - debug('socket closing - telling transport to close'); - this.transport.close(); - this.transport.removeAllListeners(); - } - - return this; -}; - -/** - * Called upon transport error - * - * @api private - */ - -Socket.prototype.onError = function (err) { - this.emit('error', err); - this.onClose('transport error', err); -}; - -/** - * Called upon transport close. - * - * @api private - */ - -Socket.prototype.onClose = function (reason, desc) { - if ('closed' != this.readyState) { - debug('socket close with reason: "%s"', reason); - clearTimeout(this.pingIntervalTimer); - clearTimeout(this.pingTimeoutTimer); - this.readyState = 'closed'; - this.emit('close', reason, desc); - this.onclose && this.onclose.call(this); - this.id = null; - } -}; - -/** - * Generates a random uid. - * - * @api private - */ - -function rnd () { - return String(Math.random()).substr(5) + String(Math.random()).substr(5); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transport.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transport.js deleted file mode 100644 index 5760f84b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transport.js +++ /dev/null @@ -1,141 +0,0 @@ - -/** - * Module dependencies. - */ - -var util = require('./util') - , parser = require('./parser') - , Emitter = require('./emitter'); - -/** - * Module exports. - */ - -module.exports = Transport; - -/** - * Transport abstract constructor. - * - * @param {Object} options. - * @api private - */ - -function Transport (opts) { - this.path = opts.path; - this.host = opts.host; - this.port = opts.port; - this.secure = opts.secure; - this.query = opts.query; - this.timestampParam = opts.timestampParam; - this.timestampRequests = opts.timestampRequests; - this.readyState = ''; -}; - -/** - * Mix in `Emitter`. - */ - -Emitter(Transport.prototype); - -/** - * Emits an error. - * - * @param {String} str - * @return {Transport} for chaining - * @api public - */ - -Transport.prototype.onError = function (msg, desc) { - var err = new Error(msg); - err.type = 'TransportError'; - err.description = desc; - this.emit('error', err); - return this; -}; - -/** - * Opens the transport. - * - * @api public - */ - -Transport.prototype.open = function () { - if ('closed' == this.readyState || '' == this.readyState) { - this.readyState = 'opening'; - this.doOpen(); - } - - return this; -}; - -/** - * Closes the transport. - * - * @api private - */ - -Transport.prototype.close = function () { - if ('opening' == this.readyState || 'open' == this.readyState) { - this.doClose(); - this.onClose(); - } - - return this; -}; - -/** - * Sends multiple packets. - * - * @param {Array} packets - * @api private - */ - -Transport.prototype.send = function(packets){ - if ('open' == this.readyState) { - this.write(packets); - } else { - throw new Error('Transport not open'); - } -}; - -/** - * Called upon open - * - * @api private - */ - -Transport.prototype.onOpen = function () { - this.readyState = 'open'; - this.writable = true; - this.emit('open'); -}; - -/** - * Called with data. - * - * @param {String} data - * @api private - */ - -Transport.prototype.onData = function (data) { - this.onPacket(parser.decodePacket(data)); -}; - -/** - * Called with a decoded packet. - */ - -Transport.prototype.onPacket = function (packet) { - this.emit('packet', packet); -}; - -/** - * Called upon close. - * - * @api private - */ - -Transport.prototype.onClose = function () { - this.readyState = 'closed'; - this.emit('close'); -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/flashsocket.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/flashsocket.js deleted file mode 100644 index 9a5a1082..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/flashsocket.js +++ /dev/null @@ -1,254 +0,0 @@ - -/** - * Module dependencies. - */ - -var WS = require('./websocket') - , util = require('../util') - , debug = require('debug')('engine.io-client:flashsocket'); - -/** - * Module exports. - */ - -module.exports = FlashWS; - -/** - * Obfuscated key for Blue Coat. - */ - -var xobject = global[['Active'].concat('Object').join('X')]; - -/** - * FlashWS constructor. - * - * @api public - */ - -function FlashWS (options) { - WS.call(this, options); - this.flashPath = options.flashPath; - this.policyPort = options.policyPort; -}; - -/** - * Inherits from WebSocket. - */ - -util.inherits(FlashWS, WS); - -/** - * Transport name. - * - * @api public - */ - -FlashWS.prototype.name = 'flashsocket'; - -/** - * Opens the transport. - * - * @api public - */ - -FlashWS.prototype.doOpen = function () { - if (!this.check()) { - // let the probe timeout - return; - } - - // instrument websocketjs logging - function log (type) { - return function(){ - var str = Array.prototype.join.call(arguments, ' '); - debug('[websocketjs %s] %s', type, str); - }; - }; - - WEB_SOCKET_LOGGER = { log: log('debug'), error: log('error') }; - WEB_SOCKET_SUPPRESS_CROSS_DOMAIN_SWF_ERROR = true; - WEB_SOCKET_DISABLE_AUTO_INITIALIZATION = true; - - if ('undefined' == typeof WEB_SOCKET_SWF_LOCATION) { - WEB_SOCKET_SWF_LOCATION = this.flashPath + 'WebSocketMainInsecure.swf'; - } - - // dependencies - var deps = [this.flashPath + 'web_socket.js']; - - if ('undefined' == typeof swfobject) { - deps.unshift(this.flashPath + 'swfobject.js'); - } - - var self = this; - - load(deps, function () { - self.ready(function () { - WebSocket.__addTask(function () { - WS.prototype.doOpen.call(self); - }); - }); - }); -}; - -/** - * Override to prevent closing uninitialized flashsocket. - * - * @api private - */ - -FlashWS.prototype.doClose = function () { - if (!this.socket) return; - var self = this; - WebSocket.__addTask(function() { - WS.prototype.doClose.call(self); - }); -}; - -/** - * Writes to the Flash socket. - * - * @api private - */ - -FlashWS.prototype.write = function() { - var self = this, args = arguments; - WebSocket.__addTask(function () { - WS.prototype.write.apply(self, args); - }); -}; - -/** - * Called upon dependencies are loaded. - * - * @api private - */ - -FlashWS.prototype.ready = function (fn) { - if (typeof WebSocket == 'undefined' || - !('__initialize' in WebSocket) || !swfobject) { - return; - } - - if (swfobject.getFlashPlayerVersion().major < 10) { - return; - } - - function init () { - // Only start downloading the swf file when the checked that this browser - // actually supports it - if (!FlashWS.loaded) { - if (843 != self.policyPort) { - WebSocket.loadFlashPolicyFile('xmlsocket://' + self.host + ':' + self.policyPort); - } - - WebSocket.__initialize(); - FlashWS.loaded = true; - } - - fn.call(self); - } - - var self = this; - if (document.body) { - return init(); - } - - util.load(init); -}; - -/** - * Feature detection for flashsocket. - * - * @return {Boolean} whether this transport is available. - * @api public - */ - -FlashWS.prototype.check = function () { - if ('undefined' != typeof process) { - return false; - } - - if (typeof WebSocket != 'undefined' && !('__initialize' in WebSocket)) { - return false; - } - - if (xobject) { - var control = null; - try { - control = new xobject('ShockwaveFlash.ShockwaveFlash'); - } catch (e) { } - if (control) { - return true; - } - } else { - for (var i = 0, l = navigator.plugins.length; i < l; i++) { - for (var j = 0, m = navigator.plugins[i].length; j < m; j++) { - if (navigator.plugins[i][j].description == 'Shockwave Flash') { - return true; - } - } - } - } - - return false; -}; - -/** - * Lazy loading of scripts. - * Based on $script by Dustin Diaz - MIT - */ - -var scripts = {}; - -/** - * Injects a script. Keeps tracked of injected ones. - * - * @param {String} path - * @param {Function} callback - * @api private - */ - -function create (path, fn) { - if (scripts[path]) return fn(); - - var el = document.createElement('script'); - var loaded = false; - - debug('loading "%s"', path); - el.onload = el.onreadystatechange = function () { - if (loaded || scripts[path]) return; - var rs = el.readyState; - if (!rs || 'loaded' == rs || 'complete' == rs) { - debug('loaded "%s"', path); - el.onload = el.onreadystatechange = null; - loaded = true; - scripts[path] = true; - fn(); - } - }; - - el.async = 1; - el.src = path; - - var head = document.getElementsByTagName('head')[0]; - head.insertBefore(el, head.firstChild); -}; - -/** - * Loads scripts and fires a callback. - * - * @param {Array} paths - * @param {Function} callback - */ - -function load (arr, fn) { - function process (i) { - if (!arr[i]) return fn(); - create(arr[i], function () { - process(++i); - }); - }; - - process(0); -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/index.js deleted file mode 100644 index 374620b0..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/index.js +++ /dev/null @@ -1,62 +0,0 @@ - -/** - * Module dependencies - */ - -var XHR = require('./polling-xhr') - , JSONP = require('./polling-jsonp') - , websocket = require('./websocket') - , flashsocket = require('./flashsocket') - , util = require('../util'); - -/** - * Export transports. - */ - -exports.polling = polling; -exports.websocket = websocket; -exports.flashsocket = flashsocket; - -/** - * Global reference. - */ - -var global = 'undefined' != typeof window ? window : global; - -/** - * Polling transport polymorphic constructor. - * Decides on xhr vs jsonp based on feature detection. - * - * @api private - */ - -function polling (opts) { - var xhr - , xd = false - , isXProtocol = false; - - if (global.location) { - var isSSL = 'https:' == location.protocol; - var port = location.port; - - // some user agents have empty `location.port` - if (Number(port) != port) { - port = isSSL ? 443 : 80; - } - - xd = opts.host != location.hostname || port != opts.port; - isXProtocol = opts.secure != isSSL; - } - - xhr = util.request(xd); - /* See #7 at http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx */ - if (isXProtocol && global.XDomainRequest && xhr instanceof global.XDomainRequest) { - return new JSONP(opts); - } - - if (xhr && !opts.forceJSONP) { - return new XHR(opts); - } else { - return new JSONP(opts); - } -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/polling-jsonp.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/polling-jsonp.js deleted file mode 100644 index fde3e79e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/components/learnboost-engine.io-client/lib/transports/polling-jsonp.js +++ /dev/null @@ -1,221 +0,0 @@ - -/** - * Module requirements. - */ - -var Polling = require('./polling') - , util = require('../util'); - -/** - * Module exports. - */ - -module.exports = JSONPPolling; - -/** - * Global reference. - */ - -var global = 'undefined' != typeof window ? window : global; - -/** - * Cached regular expressions. - */ - -var rNewline = /\n/g; - -/** - * Global JSONP callbacks. - */ - -var callbacks; - -/** - * Callbacks count. - */ - -var index = 0; - -/** - * Noop. - */ - -function empty () { } - -/** - * JSONP Polling constructor. - * - * @param {Object} opts. - * @api public - */ - -function JSONPPolling (opts) { - Polling.call(this, opts); - - // define global callbacks array if not present - // we do this here (lazily) to avoid unneeded global pollution - if (!callbacks) { - // we need to consider multiple engines in the same page - if (!global.___eio) global.___eio = []; - callbacks = global.___eio; - } - - // callback identifier - this.index = callbacks.length; - - // add callback to jsonp global - var self = this; - callbacks.push(function (msg) { - self.onData(msg); - }); - - // append to query string - this.query.j = this.index; -}; - -/** - * Inherits from Polling. - */ - -util.inherits(JSONPPolling, Polling); - -/** - * Opens the socket. - * - * @api private - */ - -JSONPPolling.prototype.doOpen = function () { - var self = this; - util.defer(function () { - Polling.prototype.doOpen.call(self); - }); -}; - -/** - * Closes the socket - * - * @api private - */ - -JSONPPolling.prototype.doClose = function () { - if (this.script) { - this.script.parentNode.removeChild(this.script); - this.script = null; - } - - if (this.form) { - this.form.parentNode.removeChild(this.form); - this.form = null; - } - - Polling.prototype.doClose.call(this); -}; - -/** - * Starts a poll cycle. - * - * @api private - */ - -JSONPPolling.prototype.doPoll = function () { - var script = document.createElement('script'); - - if (this.script) { - this.script.parentNode.removeChild(this.script); - this.script = null; - } - - script.async = true; - script.src = this.uri(); - - var insertAt = document.getElementsByTagName('script')[0]; - insertAt.parentNode.insertBefore(script, insertAt); - this.script = script; - - if (util.ua.gecko) { - setTimeout(function () { - var iframe = document.createElement('iframe'); - document.body.appendChild(iframe); - document.body.removeChild(iframe); - }, 100); - } -}; - -/** - * Writes with a hidden iframe. - * - * @param {String} data to send - * @param {Function} called upon flush. - * @api private - */ - -JSONPPolling.prototype.doWrite = function (data, fn) { - var self = this; - - if (!this.form) { - var form = document.createElement('form') - , area = document.createElement('textarea') - , id = this.iframeId = 'eio_iframe_' + this.index - , iframe; - - form.className = 'socketio'; - form.style.position = 'absolute'; - form.style.top = '-1000px'; - form.style.left = '-1000px'; - form.target = id; - form.method = 'POST'; - form.setAttribute('accept-charset', 'utf-8'); - area.name = 'd'; - form.appendChild(area); - document.body.appendChild(form); - - this.form = form; - this.area = area; - } - - this.form.action = this.uri(); - - function complete () { - initIframe(); - fn(); - }; - - function initIframe () { - if (self.iframe) { - self.form.removeChild(self.iframe); - } - - try { - // ie6 dynamic iframes with target="" support (thanks Chris Lambacher) - iframe = document.createElement(''; -html += '
    '; -html += '
    '; -html += '
    Upload File
    '; -html += '
    Want to upload multiple files at once? Please upgrade to the latest Flash Player, then reload this page. For some reason our Flash based uploader did not load, so you are currently using our single file uploader.
    '; -html += spacer(1,20) + '
    '; -var url = zero_client.targetURL; -if (url.indexOf('?') > -1) url += '&'; else url += '?'; -url += 'format=jshtml&onafter=' + escape('window.parent.upload_basic_finish(response);'); -Debug.trace('upload', "Prepping basic upload: " + url); -html += '
    '; -html += '
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('page_white_get.png', 'Upload', "upload_basic_go()") + '
    '; -html += '
    '; -html += ''; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -show_popup_dialog(528, 200, html); -} -function upload_basic_go() { -$('f_upload_basic').submit(); -$('d_upload_form').hide(); -$('d_upload_progress').show(); -} -function upload_basic_finish(response) { -Debug.trace('upload', "Basic upload complete: " + dumper(response)); -setTimeout( 'upload_basic_finish_2()', 100 ); -} -function upload_basic_finish_2() { -$('i_upload_basic').src = 'blank.html'; -setTimeout( 'upload_basic_finish_3()', 100 ); -} -function upload_basic_finish_3() { -hide_popup_dialog(); -delete session.progress; -show_progress_dialog( 0, 'Finishing Upload...', true ); -fire_callback( session.upload_callback ); -} -function upload_destroy() { -if (zero_client) { -zero_client.destroy(); -delete ZeroUpload.clients[ zero_client.id ]; -zero_client = null; -} -} -function prep_upload(dom_id, url, callback, types) { -session.upload_callback = callback; -if (url) { -if (url.indexOf('?') > -1) url += '&'; else url += '?'; -url += 'session=' + session.cookie.get('effect_session_id'); -} -upload_destroy(); -zero_client = new ZeroUpload.Client(); -if (url) zero_client.setURL( url ); -zero_client.setHandCursor( true ); -if (types) zero_client.setFileTypes( types[0], types[1] ); -zero_client.addEventListener( 'queueStart', uploadQueueStart ); -zero_client.addEventListener( 'fileStart', uploadFileStart ); -zero_client.addEventListener( 'progress', uploadProgress ); -zero_client.addEventListener( 'fileComplete', uploadFileComplete ); -zero_client.addEventListener( 'queueComplete', uploadQueueComplete ); -zero_client.addEventListener( 'error', uploadError ); -zero_client.addEventListener( 'debug', function(client, eventName, args) { -Debug.trace('upload', "Caught event: " + eventName); -} ); -if (dom_id) { -Debug.trace('upload', "Gluing ZeroUpload to: " + dom_id); -zero_client.glue( dom_id ); -} -} -Class.create( 'Debug', { -__static: { -enabled: false, -categories: { all: 1 }, -buffer: [], -max_rows: 5000, -win: null, -ie: !!navigator.userAgent.match(/MSIE/), -ie6: !!navigator.userAgent.match(/MSIE\D+6/), -init: function() { -Debug.enabled = true; -Debug.trace( 'debug', 'Debug log start' ); -var html = '

    '; -if (Debug.ie) { -setTimeout( function() { -document.body.insertAdjacentHTML('beforeEnd', -'
    ' + html + '
    ' -); -}, 1000 ); -} -else { -var div = document.createElement('DIV'); -div.id = 'd_debug'; -div.setAttribute('id', 'd_debug'); -div.style.position = Debug.ie6 ? 'absolute' : 'fixed'; -div.style.zIndex = '101'; -div.style.left = '0px'; -div.style.top = '0px'; -div.style.width = '100%'; -div.innerHTML = html; -document.getElementsByTagName('body')[0].appendChild(div); -} -}, -show: function() { -if (!Debug.win || Debug.win.closed) { -Debug.trace('debug', "Opening debug window"); -Debug.win = window.open( '', 'DebugWindow', 'width=600,height=500,menubar=no,resizable=yes,scrollbars=yes,location=no,status=no,toolbar=no,directories=no' ); -if (!Debug.win) return alert("Failed to open window. Popup blocker maybe?"); -var doc = Debug.win.document; -doc.open(); -doc.writeln( 'Debug Log' ); -doc.writeln( '
    ' ); -doc.writeln( '
    ' ); -doc.writeln( '
    ' ); -doc.writeln( '' ); -doc.writeln( '' ); -doc.writeln( '
    ' ); -doc.writeln( '' ); -doc.close(); -} -Debug.win.focus(); -}, -console_execute: function() { -var cmd = Debug.win.document.getElementById('fe_command'); -if (cmd.value.length) { -Debug.trace( 'console', cmd.value ); -try { -Debug.trace( 'console', '' + eval(cmd.value) ); -} -catch (e) { -Debug.trace( 'error', 'JavaScript Interpreter Exception: ' + e.toString() ); -} -} -}, -get_time_stamp: function(now) { -var date = new Date( now * 1000 ); -var hh = date.getHours(); if (hh < 10) hh = "0" + hh; -var mi = date.getMinutes(); if (mi < 10) mi = "0" + mi; -var ss = date.getSeconds(); if (ss < 10) ss = "0" + ss; -var sss = '' + date.getMilliseconds(); while (sss.length < 3) sss = "0" + sss; -return '' + hh + ':' + mi + ':' + ss + '.' + sss; -}, -refresh_console: function() { -if (!Debug.win || Debug.win.closed) return; -var div = Debug.win.document.getElementById('d_debug_log'); -if (div) { -var row = null; -while ( row = Debug.buffer.shift() ) { -var time_stamp = Debug.get_time_stamp(row.time); -var msg = row.msg; -msg = msg.replace(/\t/g, "    "); -msg = msg.replace(//g, ">"); -msg = msg.replace(/\n/g, "
    \n"); -var html = ''; -var sty = 'float:left; font-family: Consolas, Courier, mono; font-size: 12px; cursor:default; margin-right:10px; margin-bottom:1px; padding:2px;'; -html += '
    ' + time_stamp + '
    '; -html += '
    ' + row.cat + '
    '; -html += '
    ' + msg + '
    '; -html += '
    '; -var chunk = Debug.win.document.createElement('DIV'); -chunk.style['float'] = 'none'; -chunk.innerHTML = html; -div.appendChild(chunk); -} -var cmd = Debug.win.document.getElementById('fe_command'); -cmd.focus(); -} -Debug.dirty = 0; -Debug.win.scrollTo(0, 99999); -}, -hires_time_now: function() { -var now = new Date(); -return ( now.getTime() / 1000 ); -}, -trace: function(cat, msg) { -if (arguments.length == 1) { -msg = cat; -cat = 'debug'; -} -if (Debug.categories.all || Debug.categories[cat]) { -Debug.buffer.push({ cat: cat, msg: msg, time: Debug.hires_time_now() }); -if (Debug.buffer.length > Debug.max_rows) Debug.buffer.shift(); -if (!Debug.dirty) { -Debug.dirty = 1; -setTimeout( 'Debug.refresh_console();', 1 ); -} -} -} -} -} ); -var session = { -inited: false, -api_mod_cache: {}, -query: parseQueryString( ''+location.search ), -cookie: new CookieTree({ path: '/effect/' }), -storage: {}, -storage_dirty: false, -hooks: { -keys: {} -}, -username: '', -em_width: 11, -audioResourceMatch: /\.mp3$/i, -imageResourceMatch: /\.(jpe|jpeg|jpg|png|gif)$/i, -textResourceMatch: /\.xml$/i, -movieResourceMatch: /\.(flv|mp4|mp4v|mov|3gp|3g2)$/i, -imageResourceMatchString: '\.(jpe|jpeg|jpg|png|gif)$' -}; -session.debug = session.query.debug ? true : false; -var page_manager = null; -var preload_icons = []; -var preload_images = [ -'loading.gif', -'aquaprogressbar.gif', -'aquaprogressbar_bkgnd.gif' -]; -function get_base_url() { -return protocol + '://' + location.hostname + session.config.BaseURI; -} -function effect_init() { -if (session.inited) return; -session.inited = true; -assert( window.config, "Config not loaded" ); -session.config = window.config; -Debug.trace("Starting up"); -rendering_page = false; -preload(); -window.$R = {}; -for (var key in config.RegExpShortcuts) { -$R[key] = new RegExp( config.RegExpShortcuts[key] ); -} -ww_precalc_font("body", "effect_precalc_font_finish"); -page_manager = new Effect.PageManager( config.Pages.Page ); -var session_id = session.cookie.get('effect_session_id'); -if (session_id && session_id.match(/^login/)) { -do_session_recover(); -} -else { -show_default_login_status(); -Nav.init(); -} -Blog.search({ -stag: 'sidebar_docs', -limit: 20, -title_only: true, -sort_by: 'seq', -sort_dir: -1, -target: 'd_sidebar_documents', -outer_div_class: 'sidebar_blog_row', -title_class: 'sidebar_blog_title', -after: '' -}); -Blog.search({ -stag: 'sidebar_tutorials', -limit: 5, -title_only: true, -sort_by: 'seq', -sort_dir: -1, -target: 'd_sidebar_tutorials', -outer_div_class: 'sidebar_blog_row', -title_class: 'sidebar_blog_title', -after: '' -}); -Blog.search({ -stag: 'sidebar_plugins', -limit: 5, -title_only: true, -sort_by: 'seq', -sort_dir: -1, -target: 'd_sidebar_plugins', -outer_div_class: 'sidebar_blog_row', -title_class: 'sidebar_blog_title', -after: '' -}); -$('fe_search_bar').onkeydown = delay_onChange_input_text; -user_storage_idle(); -} -function effect_precalc_font_finish(width, height) { -session.em_width = width; -} -function preload() { -for (var idx = 0, len = preload_icons.length; idx < len; idx++) { -var url = images_uri + '/icons/' + preload_icons[idx] + '.gif'; -preload_icons[idx] = new Image(); -preload_icons[idx].src = url; -} -for (var idx = 0, len = preload_images.length; idx < len; idx++) { -var url = images_uri + '/' + preload_images[idx]; -preload_images[idx] = new Image(); -preload_images[idx].src = url; -} -} -function $P(id) { -if (!id) id = page_manager.current_page_id; -var page = page_manager.find(id); -assert( !!page, "Failed to locate page: " + id ); -return page; -} -function get_pref(name) { -if (!session.user || !session.user.Preferences) return alert("ASSERT FAILURE! Tried to lookup pref " + name + " and user is not yet loaded!"); -return session.user.Preferences[name]; -} -function get_bool_pref(name) { -return (get_pref(name) == 1); -} -function set_pref(name, value) { -session.user.Preferences[name] = value; -} -function set_bool_pref(name, value) { -set_pref(name, value ? '1' : '0'); -} -function save_prefs() { -var prefs_to_save = {}; -if (arguments.length) { -for (var idx = 0, len = arguments.length; idx < len; idx++) { -var key = arguments[idx]; -prefs_to_save[key] = get_pref(key); -} -} -else prefs_to_save = session.user.Preferences; -effect_api_mod_touch('user_get'); -effect_api_send('user_update', { -Username: session.username, -Preferences: prefs_to_save -}, 'save_prefs_2'); -} -function save_prefs_2(response) { -do_message('success', 'Preferences saved.'); -} - -function get_full_name(username) { -var user = session.users[username]; -if (!user) return username; -return user.FullName; -} -function get_buddy_icon_url(username, size) { -var mod = session.api_mod_cache.get_buddy_icon || 0; -if (!size) size = 32; -var url = '/effect/api/get_buddy_icon?username='+username + '&mod=' + mod + '&size=' + size; -return url; -} -function get_buddy_icon_display(username, show_icon, show_name) { -if ((typeof(show_icon) == 'undefined') && get_bool_pref('show_user_icons')) show_icon = 1; -if ((typeof(show_name) == 'undefined') && get_bool_pref('show_user_names')) show_name = 1; -var html = ''; -if (show_icon) html += ''; -if (show_icon && show_name) html += '
    '; -if (show_name) html += username; -return html; -} -function do_session_recover() { -session.hooks.after_error = 'do_logout'; -effect_api_send('session_recover', {}, 'do_login_2', { _from_recover: 1 } ); -} -function require_login() { -if (session.user) return true; -Debug.trace('Page requires login, showing login page'); -session.nav_after_login = Nav.currentAnchor(); -setTimeout( function() { -Nav.go( 'Login' ); -}, 1 ); -return false; -} -function popup_window(url, name) { -if (!url) url = ''; -if (!name) name = ''; -var win = window.open(url, name); -if (!win) return alert('Failed to open popup window. If you have a popup blocker, please disable it for this website and try again.'); -return win; -} -function do_login_prompt() { -hide_popup_dialog(); -delete session.progress; -if (!session.temp_password) session.temp_password = ''; -if (!session.username) session.username = ''; -var temp_username = session.open_id || session.username || ''; -var html = ''; -html += '
    '; -html += '
    '; -html += '
    Effect Developer Login
    '; -html += '
    '; -html += '
    Effect Username  or  '+icon('openid', 'OpenID', 'popup_window(\'http://openid.net/\')', 'What is OpenID?')+'


    '; -html += '
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "clear_login()") + ' ' + large_icon_button('check', 'Login', 'do_login()') + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ENTER_KEY] = 'do_login'; -session.hooks.keys[ESC_KEY] = 'clear_login'; -safe_focus( 'fe_username' ); -show_popup_dialog(450, 225, html); -} -function do_openid_reg(title, auto_login_button) { -hide_popup_dialog(); -delete session.progress; -if (!title) title = 'Register Account Using OpenID'; -if (typeof(auto_login_button) == 'undefined') auto_login_button = 1; -var html = ''; -html += '
    '; -html += '
    '; -html += '
    '+title+'
    '; -html += '
    '; -html += '
    '+icon('openid', 'Enter Your OpenID URL:')+'
    '; -if (auto_login_button) html += '


    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', title.match(/login/i) ? 'Login' : 'Register', 'do_openid_login()') + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ENTER_KEY] = 'do_openid_login'; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_username' ); -show_popup_dialog(450, 225, html); -} -function do_login_prompt_2() { -hide_popup_dialog(); -delete session.progress; -if (!session.temp_password) session.temp_password = ''; -if (!session.username) session.username = ''; -var html = ''; -html += '
    '; -html += '"; - second_cell = ""; - row = $("").attr("id", "s" + index).attr("class", "location_row").html(first_cell + second_cell); - $locationsDiv.append(row); - } - if (index === this.numSearchToDisplay) { - $locationsDiv.append(""); - return $locationsDiv.append(""); - } - }, this); - return this.geocoder.geocode({ - address: address - }, __bind(function(result, status) { - if (status !== "OK") { - $('.error_message').html(t("Search Address Failed")).fadeIn(); - return; - } - _.each(result, showResults); - $("#search_results").html($locationsDiv); - this.locationChange("search"); - this.searchResults = result; - return this.displaySearchLoc(); - }, this)); - }; - ClientsRequestView.prototype.mouseoverLocation = function(e) { - var $el, id, marker; - $el = $(e.currentTarget); - id = $el.attr("id").substring(1); - marker = this.markers[id]; - return marker.setAnimation(google.maps.Animation.BOUNCE); - }; - ClientsRequestView.prototype.mouseoutLocation = function(e) { - var $el, id, marker; - $el = $(e.currentTarget); - id = $el.attr("id").substring(1); - marker = this.markers[id]; - return marker.setAnimation(null); - }; - ClientsRequestView.prototype.searchLocation = function(e) { - e.preventDefault(); - $("#address").val($(e.currentTarget).html()); - return this.searchAddress(); - }; - ClientsRequestView.prototype.favoriteClick = function(e) { - var index, location; - e.preventDefault(); - $(".favorites").attr("href", ""); - index = $(e.currentTarget).removeAttr("href").attr("id"); - location = new google.maps.LatLng(USER.locations[index].latitude, USER.locations[index].longitude); - return this.panToLocation(location); - }; - ClientsRequestView.prototype.clickLocation = function(e) { - var id; - id = $(e.currentTarget).attr("id").substring(1); - return this.panToLocation(this.markers[id].getPosition()); - }; - ClientsRequestView.prototype.panToLocation = function(location) { - this.map.panTo(location); - this.map.setZoom(16); - return this.pickup_icon.setPosition(location); - }; - ClientsRequestView.prototype.locationLinkHandle = function(e) { - var panelName; - e.preventDefault(); - panelName = $(e.currentTarget).attr("id"); - return this.locationChange(panelName); - }; - ClientsRequestView.prototype.locationChange = function(type) { - $(".locations_link").attr("href", "").css("font-weight", "normal"); - switch (type) { - case "favorite": - $(".search_results").attr("href", ""); - $(".locations_link#favorite").removeAttr("href").css("font-weight", "bold"); - $("#search_results").hide(); - $("#favorite_results").fadeIn(); - return this.displayFavLoc(); - case "search": - $(".favorites").attr("href", ""); - $(".locations_link#search").removeAttr("href").css("font-weight", "bold"); - $("#favorite_results").hide(); - $("#search_results").fadeIn(); - return this.displaySearchLoc(); - } - }; - ClientsRequestView.prototype.rateTrip = function(e) { - var rating; - rating = $(e.currentTarget).attr("id"); - $(".stars").attr("src", "/web/img/star_inactive.png"); - return _(rating).times(function(index) { - return $(".stars#" + (index + 1)).attr("src", "/web/img/star_active.png"); - }); - }; - ClientsRequestView.prototype.pickupHandle = function(e) { - var $el, callback, message; - e.preventDefault(); - $el = $(e.currentTarget).find("span"); - switch ($el.html()) { - case t("Request Pickup"): - _.delay(this.requestRide, 3000); - $("#status_message").html(t("Sending pickup request...")); - $el.html(t("Cancel Pickup")).parent().attr("class", "button_red"); - this.pickup_icon.setDraggable(false); - this.map.panTo(this.pickup_icon.getPosition()); - return this.map.setZoom(18); - case t("Cancel Pickup"): - if (this.status === "ready") { - $el.html(t("Request Pickup")).parent().attr("class", "button_green"); - return this.pickup_icon.setDraggable(true); - } else { - callback = __bind(function(v, m, f) { - if (v) { - this.AskDispatch("PickupCanceledClient"); - return this.setStatus("ready"); - } - }, this); - message = t("Cancel Request Prompt"); - if (this.status === "arriving") { - message = 'Cancel Request Arrived Prompt'; - } - return $.prompt(message, { - buttons: { - Ok: true, - Cancel: false - }, - callback: callback - }); - } - } - }; - ClientsRequestView.prototype.requestRide = function() { - if ($("#pickupHandle").find("span").html() === t("Cancel Pickup")) { - this.AskDispatch("Pickup"); - return this.setStatus("searching"); - } - }; - ClientsRequestView.prototype.removeCabs = function() { - _.each(this.cabs, __bind(function(point) { - return point.setMap(null); - }, this)); - return this.cabs = []; - }; - ClientsRequestView.prototype.addToFavLoc = function(e) { - var $el, lat, lng, nickname; - e.preventDefault(); - $el = $(e.currentTarget); - $el.find(".error_message").html(""); - nickname = $el.find("#favLocNickname").val().toString(); - lat = $el.find("#pickupLat").val().toString(); - lng = $el.find("#pickupLng").val().toString(); - if (nickname.length < 3) { - $el.find(".error_message").html(t("Favorite Location Nickname Length Error")); - return; - } - this.ShowSpinner("submit"); - return $.ajax({ - type: 'POST', - url: API + "/locations", - dataType: 'json', - data: { - token: USER.token, - nickname: nickname, - latitude: lat, - longitude: lng - }, - success: __bind(function(data, textStatus, jqXHR) { - return $el.html(t("Favorite Location Save Succeeded")); - }, this), - error: __bind(function(jqXHR, textStatus, errorThrown) { - return $el.find(".error_message").html(t("Favorite Location Save Failed")); - }, this), - complete: __bind(function(data) { - return this.HideSpinner(); - }, this) - }); - }; - ClientsRequestView.prototype.showFavLoc = function(e) { - $(e.currentTarget).fadeOut(); - return $("#favLoc_form").fadeIn(); - }; - ClientsRequestView.prototype.selectInputText = function(e) { - e.currentTarget.focus(); - return e.currentTarget.select(); - }; - ClientsRequestView.prototype.displayFavLoc = function() { - var alphabet, bounds; - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - this.removeMarkers(); - bounds = new google.maps.LatLngBounds(); - _.each(USER.locations, __bind(function(location, index) { - var marker; - marker = new google.maps.Marker({ - position: new google.maps.LatLng(location.latitude, location.longitude), - map: this.map, - title: t("Favorite Location Title", { - id: alphabet != null ? alphabet[index] : void 0 - }), - icon: "https://www.google.com/mapfiles/marker" + alphabet[index] + ".png" - }); - this.markers.push(marker); - bounds.extend(marker.getPosition()); - return google.maps.event.addListener(marker, 'click', __bind(function() { - return this.pickup_icon.setPosition(marker.getPosition()); - }, this)); - }, this)); - this.pickup_icon.setPosition(_.first(this.markers).getPosition()); - return this.map.fitBounds(bounds); - }; - ClientsRequestView.prototype.displaySearchLoc = function() { - var alphabet; - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - this.removeMarkers(); - return _.each(this.searchResults, __bind(function(result, index) { - var marker; - if (index < this.numSearchToDisplay) { - marker = new google.maps.Marker({ - position: result.geometry.location, - map: this.map, - title: t("Search Location Title", { - id: alphabet != null ? alphabet[index] : void 0 - }), - icon: "https://www.google.com/mapfiles/marker" + alphabet[index] + ".png" - }); - this.markers.push(marker); - return this.panToLocation(result.geometry.location); - } - }, this)); - }; - ClientsRequestView.prototype.removeMarkers = function() { - _.each(this.markers, __bind(function(marker) { - return marker.setMap(null); - }, this)); - return this.markers = []; - }; - ClientsRequestView.prototype.AskDispatch = function(ask, options) { - var attrs, lowestETA, processData, showCab; - if (ask == null) { - ask = ""; - } - if (options == null) { - options = {}; - } - switch (ask) { - case "NearestCab": - attrs = { - latitude: this.pickup_icon.getPosition().lat(), - longitude: this.pickup_icon.getPosition().lng() - }; - lowestETA = 99999; - showCab = __bind(function(cab) { - var point; - point = new google.maps.Marker({ - position: new google.maps.LatLng(cab.latitude, cab.longitude), - map: this.map, - icon: this.cabMarker, - title: t("ETA Message", { - minutes: app.helpers.FormatSeconds(cab != null ? cab.eta : void 0, true) - }) - }); - if (cab.eta < lowestETA) { - lowestETA = cab.eta; - } - return this.cabs.push(point); - }, this); - processData = __bind(function(data, textStatus, jqXHR) { - if (this.status === "ready") { - this.removeCabs(); - if (data.sorry) { - $("#status_message").html(data.sorry).fadeIn(); - } else { - _.each(data.driverLocations, showCab); - $("#status_message").html(t("Nearest Cab Message", { - minutes: app.helpers.FormatSeconds(lowestETA, true) - })).fadeIn(); - } - if (Backbone.history.fragment === "!/request") { - return _.delay(this.showCabs, this.pollInterval); - } - } - }, this); - return this.AjaxCall(ask, processData, attrs); - case "StatusClient": - processData = __bind(function(data, textStatus, jqXHR) { - var bounds, cabLocation, locationSaved, point, userLocation; - if (data.messageType === "OK") { - switch (data.status) { - case "completed": - this.removeCabs(); - this.setStatus("rate"); - return this.fetchTripDetails(data.tripID); - case "open": - return this.setStatus("ready"); - case "begintrip": - this.setStatus("riding"); - cabLocation = new google.maps.LatLng(data.latitude, data.longitude); - this.removeCabs(); - this.pickup_icon.setMap(null); - point = new google.maps.Marker({ - position: cabLocation, - map: this.map, - icon: this.cabMarker - }); - this.cabs.push(point); - this.map.panTo(point.getPosition()); - $("#rideName").html(data.driverName); - $("#ridePhone").html(data.driverMobile); - $("#ride_address_wrapper").hide(); - if (Backbone.history.fragment === "!/request") { - return _.delay(this.AskDispatch, this.pollInterval, "StatusClient"); - } - break; - case "pending": - this.setStatus("searching"); - if (Backbone.history.fragment === "!/request") { - return _.delay(this.AskDispatch, this.pollInterval, "StatusClient"); - } - break; - case "accepted": - case "arrived": - if (data.status === "accepted") { - this.setStatus("waiting"); - $("#status_message").html(t("Arrival ETA Message", { - minutes: app.helpers.FormatSeconds(data.eta, true) - })); - } else { - this.setStatus("arriving"); - $("#status_message").html(t("Arriving Now Message")); - } - userLocation = new google.maps.LatLng(data.pickupLocation.latitude, data.pickupLocation.longitude); - cabLocation = new google.maps.LatLng(data.latitude, data.longitude); - this.pickup_icon.setPosition(userLocation); - this.removeCabs(); - $("#rideName").html(data.driverName); - $("#ridePhone").html(data.driverMobile); - if ($("#rideAddress").html() === "") { - locationSaved = false; - _.each(USER.locations, __bind(function(location) { - if (parseFloat(location.latitude) === parseFloat(data.pickupLocation.latitude) && parseFloat(location.longitude) === parseFloat(data.pickupLocation.longitude)) { - return locationSaved = true; - } - }, this)); - if (locationSaved) { - $("#addToFavButton").hide(); - } - $("#pickupLat").val(data.pickupLocation.latitude); - $("#pickupLng").val(data.pickupLocation.longitude); - this.geocoder.geocode({ - location: userLocation - }, __bind(function(result, status) { - $("#rideAddress").html(result[0].formatted_address); - return $("#favLocNickname").val("" + result[0].address_components[0].short_name + " " + result[0].address_components[1].short_name); - }, this)); - } - point = new google.maps.Marker({ - position: cabLocation, - map: this.map, - icon: this.cabMarker - }); - this.cabs.push(point); - bounds = bounds = new google.maps.LatLngBounds(); - bounds.extend(cabLocation); - bounds.extend(userLocation); - this.map.fitBounds(bounds); - if (Backbone.history.fragment === "!/request") { - return _.delay(this.AskDispatch, this.pollInterval, "StatusClient"); - } - } - } - }, this); - return this.AjaxCall(ask, processData); - case "Pickup": - attrs = { - latitude: this.pickup_icon.getPosition().lat(), - longitude: this.pickup_icon.getPosition().lng() - }; - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "Error") { - return $("#status_message").html(data.description); - } else { - return this.AskDispatch("StatusClient"); - } - }, this); - return this.AjaxCall(ask, processData, attrs); - case "PickupCanceledClient": - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "OK") { - return this.setStatus("ready"); - } else { - return $("#status_message").html(data.description); - } - }, this); - return this.AjaxCall(ask, processData, attrs); - case "RatingDriver": - attrs = { - rating: options.rating - }; - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "OK") { - this.setStatus("init"); - } else { - $("status_message").html(t("Rating Driver Failed")); - } - return this.HideSpinner(); - }, this); - return this.AjaxCall(ask, processData, attrs); - case "Feedback": - attrs = { - message: options.message - }; - processData = __bind(function(data, textStatus, jqXHR) { - if (data.messageType === "OK") { - return alert("rated"); - } - }, this); - return this.AjaxCall(ask, processData, attrs); - } - }; - ClientsRequestView.prototype.AjaxCall = function(type, successCallback, attrs) { - if (attrs == null) { - attrs = {}; - } - _.extend(attrs, { - token: USER.token, - messageType: type, - app: "client", - version: "1.0.60", - device: "web" - }); - return $.ajax({ - type: 'POST', - url: DISPATCH + "/", - processData: false, - data: JSON.stringify(attrs), - success: successCallback, - dataType: 'json', - error: __bind(function(jqXHR, textStatus, errorThrown) { - $("#status_message").html(errorThrown); - return this.HideSpinner(); - }, this) - }); - }; - return ClientsRequestView; - })(); -}).call(this); -}, "views/clients/settings": function(exports, require, module) {(function() { - var clientsSettingsTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsSettingsTemplate = require('templates/clients/settings'); - exports.ClientsSettingsView = (function() { - __extends(ClientsSettingsView, UberView); - function ClientsSettingsView() { - this.render = __bind(this.render, this); - this.initialize = __bind(this.initialize, this); - ClientsSettingsView.__super__.constructor.apply(this, arguments); - } - ClientsSettingsView.prototype.id = 'settings_view'; - ClientsSettingsView.prototype.className = 'view_container'; - ClientsSettingsView.prototype.events = { - 'submit #profile_pic_form': 'processPicUpload', - 'click #submit_pic': 'processPicUpload', - 'click a.setting_change': "changeTab", - 'submit #edit_info_form': "submitInfo", - 'click #change_password': 'changePass' - }; - ClientsSettingsView.prototype.divs = { - 'info_div': "Information", - 'pic_div': "Picture" - }; - ClientsSettingsView.prototype.pageTitle = t("Settings") + " | " + t("Uber"); - ClientsSettingsView.prototype.tabTitle = { - 'info_div': t("Information"), - 'pic_div': t("Picture") - }; - ClientsSettingsView.prototype.initialize = function() { - return this.mixin(require('web-lib/mixins/i18n_phone_form').i18nPhoneForm); - }; - ClientsSettingsView.prototype.render = function(type) { - if (type == null) { - type = "info"; - } - this.RefreshUserInfo(__bind(function() { - var $el, alphabet; - this.delegateEvents(); - this.HideSpinner(); - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - $el = $(this.el); - $(this.el).html(clientsSettingsTemplate({ - type: type - })); - $el.find("#" + type + "_div").show(); - $el.find("a[href='" + type + "_div']").parent().addClass("active"); - return document.title = "" + this.tabTitle[type + '_div'] + " " + this.pageTitle; - }, this)); - this.delegateEvents(); - return this; - }; - ClientsSettingsView.prototype.changeTab = function(e) { - var $eTarget, $el, div, link, pageDiv, _i, _j, _len, _len2, _ref, _ref2; - e.preventDefault(); - $eTarget = $(e.currentTarget); - this.ClearGlobalStatus(); - $el = $(this.el); - _ref = $el.find(".setting_change"); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - link = _ref[_i]; - $(link).parent().removeClass("active"); - } - $eTarget.parent().addClass("active"); - _ref2 = _.keys(this.divs); - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - div = _ref2[_j]; - $el.find("#" + div).hide(); - } - pageDiv = $eTarget.attr('href'); - $el.find("#" + pageDiv).show(); - Backbone.history.navigate("!/settings/" + (this.divs[pageDiv].toLowerCase().replace(" ", "-")), false); - document.title = "" + this.tabTitle[pageDiv] + " " + this.pageTitle; - if (pageDiv === "loc_div") { - try { - google.maps.event.trigger(this.map, 'resize'); - return this.map.fitBounds(this.bounds); - } catch (_e) {} - } - }; - ClientsSettingsView.prototype.submitInfo = function(e) { - var $e, attrs, client, options; - $('#global_status').find('.success_message').text(''); - $('#global_status').find('.error_message').text(''); - $('.error_message').text(''); - e.preventDefault(); - $e = $(e.currentTarget); - attrs = $e.serializeToJson(); - attrs['mobile_country_id'] = this.$('#mobile_country_id').val(); - if (attrs['password'] === '') { - delete attrs['password']; - } - options = { - success: __bind(function(response) { - this.ShowSuccess(t("Information Update Succeeded")); - return this.RefreshUserInfo(); - }, this), - error: __bind(function(model, data) { - var errors; - if (data.status === 406) { - errors = JSON.parse(data.responseText); - return _.each(_.keys(errors), function(field) { - return $("#" + field).parent().find('span.error_message').text(errors[field]); - }); - } else { - return this.ShowError(t("Information Update Failed")); - } - }, this), - type: "PUT" - }; - client = new app.models.client({ - id: USER.id - }); - return client.save(attrs, options); - }; - ClientsSettingsView.prototype.changePass = function(e) { - e.preventDefault(); - $(e.currentTarget).hide(); - return $("#password").show(); - }; - ClientsSettingsView.prototype.processPicUpload = function(e) { - e.preventDefault(); - this.ShowSpinner("submit"); - return $.ajaxFileUpload({ - url: API + '/user_pictures', - secureuri: false, - fileElementId: 'picture', - data: { - token: USER.token - }, - dataType: 'json', - complete: __bind(function(data, status) { - this.HideSpinner(); - if (status === 'success') { - this.ShowSuccess(t("Picture Update Succeeded")); - return this.RefreshUserInfo(__bind(function() { - return $("#settingsProfPic").attr("src", USER.picture_url + ("?" + (Math.floor(Math.random() * 1000)))); - }, this)); - } else { - if (data.error) { - return this.ShowError(data.error); - } else { - return this.ShowError("Picture Update Failed"); - } - } - }, this) - }); - }; - return ClientsSettingsView; - })(); -}).call(this); -}, "views/clients/sign_up": function(exports, require, module) {(function() { - var clientsSignUpTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsSignUpTemplate = require('templates/clients/sign_up'); - exports.ClientsSignUpView = (function() { - __extends(ClientsSignUpView, UberView); - function ClientsSignUpView() { - ClientsSignUpView.__super__.constructor.apply(this, arguments); - } - ClientsSignUpView.prototype.id = 'signup_view'; - ClientsSignUpView.prototype.className = 'view_container'; - ClientsSignUpView.prototype.initialize = function() { - this.mixin(require('web-lib/mixins/i18n_phone_form').i18nPhoneForm); - return $('#location_country').live('change', function() { - if (!$('#mobile').val()) { - return $('#mobile_country').find("option[value=" + ($(this).val()) + "]").attr('selected', 'selected').end().trigger('change'); - } - }); - }; - ClientsSignUpView.prototype.events = { - 'submit form': 'signup', - 'click button': 'signup', - 'change #card_number': 'showCardType', - 'change #location_country': 'countryChange' - }; - ClientsSignUpView.prototype.render = function(invite) { - this.HideSpinner(); - $(this.el).html(clientsSignUpTemplate({ - invite: invite - })); - return this; - }; - ClientsSignUpView.prototype.signup = function(e) { - var $el, attrs, client, error_messages, options; - e.preventDefault(); - $el = $("form"); - $el.find('#terms_error').hide(); - if (!$el.find('#signup_terms input[type=checkbox]').attr('checked')) { - $('#spinner.submit').hide(); - $el.find('#terms_error').show(); - return; - } - error_messages = $el.find('.error_message').html(""); - attrs = { - first_name: $el.find('#first_name').val(), - last_name: $el.find('#last_name').val(), - email: $el.find('#email').val(), - password: $el.find('#password').val(), - location_country: $el.find('#location_country option:selected').attr('data-iso2'), - location: $el.find('#location').val(), - language: $el.find('#language').val(), - mobile_country: $el.find('#mobile_country option:selected').attr('data-iso2'), - mobile: $el.find('#mobile').val(), - card_number: $el.find('#card_number').val(), - card_expiration_month: $el.find('#card_expiration_month').val(), - card_expiration_year: $el.find('#card_expiration_year').val(), - card_code: $el.find('#card_code').val(), - use_case: $el.find('#use_case').val(), - promotion_code: $el.find('#promotion_code').val() - }; - options = { - statusCode: { - 200: function(response) { - $.cookie('token', response.token); - amplify.store('USERjson', response); - app.refreshMenu(); - return app.routers.clients.navigate('!/dashboard', true); - }, - 406: function(e) { - var error, errors, _i, _len, _ref, _results; - errors = JSON.parse(e.responseText); - _ref = _.keys(errors); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - error = _ref[_i]; - _results.push($('#' + error).parent().find('span').html($('#' + error).parent().find('span').html() + " " + errors[error])); - } - return _results; - } - }, - complete: __bind(function(response) { - return this.HideSpinner(); - }, this) - }; - client = new app.models.client; - $('.spinner#submit').show(); - return client.save(attrs, options); - }; - ClientsSignUpView.prototype.countryChange = function(e) { - var $e; - $e = $(e.currentTarget); - return $("#mobile_country").val($e.val()).trigger('change'); - }; - ClientsSignUpView.prototype.showCardType = function(e) { - var $el, reAmerica, reDiscover, reMaster, reVisa, validCard; - reVisa = /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/; - reMaster = /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/; - reAmerica = /^6011-?\d{4}-?\d{4}-?\d{4}$/; - reDiscover = /^3[4,7]\d{13}$/; - $el = $("#card_logos_signup"); - validCard = false; - if (e.currentTarget.value.match(reVisa)) { - $el.find("#overlay_left").css('width', "0px"); - return $el.find("#overlay_right").css('width', "75%"); - } else if (e.currentTarget.value.match(reMaster)) { - $el.find("#overlay_left").css('width', "25%"); - return $el.find("#overlay_right").css('width', "50%"); - } else if (e.currentTarget.value.match(reAmerica)) { - $el.find("#overlay_left").css('width', "75%"); - $el.find("#overlay_right").css('width', "0px"); - return console.log("amex"); - } else if (e.currentTarget.value.match(reDiscover)) { - $el.find("#overlay_left").css('width', "50%"); - return $el.find("#overlay_right").css('width', "25%"); - } else { - $el.find("#overlay_left").css('width', "0px"); - return $el.find("#overlay_right").css('width', "0px"); - } - }; - return ClientsSignUpView; - })(); -}).call(this); -}, "views/clients/trip_detail": function(exports, require, module) {(function() { - var clientsTripDetailTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsTripDetailTemplate = require('templates/clients/trip_detail'); - exports.TripDetailView = (function() { - __extends(TripDetailView, UberView); - function TripDetailView() { - this.resendReceipt = __bind(this.resendReceipt, this); - TripDetailView.__super__.constructor.apply(this, arguments); - } - TripDetailView.prototype.id = 'trip_detail_view'; - TripDetailView.prototype.className = 'view_container'; - TripDetailView.prototype.events = { - 'click a#fare_review': 'showFareReview', - 'click #fare_review_hide': 'hideFareReview', - 'submit #form_review_form': 'submitFareReview', - 'click #submit_fare_review': 'submitFareReview', - 'click .resendReceipt': 'resendReceipt' - }; - TripDetailView.prototype.render = function(id) { - if (id == null) { - id = 'invalid'; - } - this.ReadUserInfo(); - this.HideSpinner(); - this.model = new app.models.trip({ - id: id - }); - this.model.fetch({ - data: { - relationships: 'points,driver,city.country' - }, - dataType: 'json', - success: __bind(function() { - var trip; - trip = this.model; - $(this.el).html(clientsTripDetailTemplate({ - trip: trip - })); - this.RequireMaps(__bind(function() { - var bounds, endPos, map, myOptions, path, polyline, startPos; - bounds = new google.maps.LatLngBounds(); - path = []; - _.each(this.model.get('points'), __bind(function(point) { - path.push(new google.maps.LatLng(point.lat, point.lng)); - return bounds.extend(_.last(path)); - }, this)); - myOptions = { - zoom: 12, - center: path[0], - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoomControl: false, - rotateControl: false, - panControl: false, - mapTypeControl: false, - scrollwheel: false - }; - map = new google.maps.Map(document.getElementById("trip_details_map"), myOptions); - map.fitBounds(bounds); - startPos = new google.maps.Marker({ - position: _.first(path), - map: map, - title: t("Trip started here"), - icon: 'https://uber-static.s3.amazonaws.com/marker_start.png' - }); - endPos = new google.maps.Marker({ - position: _.last(path), - map: map, - title: t("Trip ended here"), - icon: 'https://uber-static.s3.amazonaws.com/marker_end.png' - }); - startPos.setMap(map); - endPos.setMap(map); - polyline = new google.maps.Polyline({ - path: path, - strokeColor: '#003F87', - strokeOpacity: 1, - strokeWeight: 5 - }); - return polyline.setMap(map); - }, this)); - return this.HideSpinner(); - }, this) - }); - this.ShowSpinner('load'); - this.delegateEvents(); - return this; - }; - TripDetailView.prototype.showFareReview = function(e) { - e.preventDefault(); - $('#fare_review_box').slideDown(); - return $('#fare_review').hide(); - }; - TripDetailView.prototype.hideFareReview = function(e) { - e.preventDefault(); - $('#fare_review_box').slideUp(); - return $('#fare_review').show(); - }; - TripDetailView.prototype.submitFareReview = function(e) { - var attrs, errorMessage, id, options; - e.preventDefault(); - errorMessage = $(".error_message"); - errorMessage.hide(); - id = $("#tripid").val(); - this.model = new app.models.trip({ - id: id - }); - attrs = { - note: $('#form_review_message').val(), - note_type: 'client_fare_review' - }; - options = { - success: __bind(function(response) { - $(".success_message").fadeIn(); - return $("#fare_review_form_wrapper").slideUp(); - }, this), - error: __bind(function(error) { - return errorMessage.fadeIn(); - }, this) - }; - return this.model.save(attrs, options); - }; - TripDetailView.prototype.resendReceipt = function(e) { - var $e; - e.preventDefault(); - $e = $(e.currentTarget); - this.$(".resendReceiptSuccess").empty().show(); - this.$(".resentReceiptError").empty().show(); - e.preventDefault(); - $('#spinner').show(); - return $.ajax('/api/trips/func/resend_receipt', { - data: { - token: $.cookie('token'), - trip_id: this.model.id - }, - type: 'POST', - complete: __bind(function(xhr) { - var response; - response = JSON.parse(xhr.responseText); - $('#spinner').hide(); - switch (xhr.status) { - case 200: - this.$(".resendReceiptSuccess").html("Receipt has been emailed"); - return this.$(".resendReceiptSuccess").fadeOut(2000); - default: - this.$(".resendReceiptError").html("Receipt has failed to be emailed"); - return this.$(".resendReceiptError").fadeOut(2000); - } - }, this) - }); - }; - return TripDetailView; - })(); -}).call(this); -}, "views/shared/menu": function(exports, require, module) {(function() { - var menuTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - menuTemplate = require('templates/shared/menu'); - exports.SharedMenuView = (function() { - __extends(SharedMenuView, Backbone.View); - function SharedMenuView() { - SharedMenuView.__super__.constructor.apply(this, arguments); - } - SharedMenuView.prototype.id = 'menu_view'; - SharedMenuView.prototype.render = function() { - var type; - if ($.cookie('token') === null) { - type = 'guest'; - } else { - type = 'client'; - } - $(this.el).html(menuTemplate({ - type: type - })); - return this; - }; - return SharedMenuView; - })(); -}).call(this); -}, "web-lib/collections/countries": function(exports, require, module) {(function() { - var UberCollection; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberCollection = require('web-lib/uber_collection').UberCollection; - exports.CountriesCollection = (function() { - __extends(CountriesCollection, UberCollection); - function CountriesCollection() { - CountriesCollection.__super__.constructor.apply(this, arguments); - } - CountriesCollection.prototype.model = app.models.country; - CountriesCollection.prototype.url = '/countries'; - return CountriesCollection; - })(); -}).call(this); -}, "web-lib/collections/vehicle_types": function(exports, require, module) {(function() { - var UberCollection, vehicleType, _ref; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberCollection = require('web-lib/uber_collection').UberCollection; - vehicleType = (typeof app !== "undefined" && app !== null ? (_ref = app.models) != null ? _ref.vehicleType : void 0 : void 0) || require('models/vehicle_type').VehicleType; - exports.VehicleTypesCollection = (function() { - __extends(VehicleTypesCollection, UberCollection); - function VehicleTypesCollection() { - VehicleTypesCollection.__super__.constructor.apply(this, arguments); - } - VehicleTypesCollection.prototype.model = vehicleType; - VehicleTypesCollection.prototype.url = '/vehicle_types'; - VehicleTypesCollection.prototype.defaultColumns = ['id', 'created_at', 'updated_at', 'deleted_at', 'created_by_user_id', 'updated_by_user_id', 'city_id', 'type', 'make', 'model', 'capacity', 'minimum_year', 'actions']; - VehicleTypesCollection.prototype.tableColumns = function(cols) { - var actions, c, capacity, city_id, columnValues, created_at, created_by_user_id, deleted_at, headerRow, id, make, minimum_year, model, type, updated_at, updated_by_user_id, _i, _len; - id = { - sTitle: 'Id' - }; - created_at = { - sTitle: 'Created At (UTC)', - 'sType': 'string' - }; - updated_at = { - sTitle: 'Updated At (UTC)', - 'sType': 'string' - }; - deleted_at = { - sTitle: 'Deleted At (UTC)', - 'sType': 'string' - }; - created_by_user_id = { - sTitle: 'Created By' - }; - updated_by_user_id = { - sTitle: 'Updated By' - }; - city_id = { - sTitle: 'City' - }; - type = { - sTitle: 'Type' - }; - make = { - sTitle: 'Make' - }; - model = { - sTitle: 'Model' - }; - capacity = { - sTitle: 'Capacity' - }; - minimum_year = { - sTitle: 'Min. Year' - }; - actions = { - sTitle: 'Actions' - }; - columnValues = { - id: id, - created_at: created_at, - updated_at: updated_at, - deleted_at: deleted_at, - created_by_user_id: created_by_user_id, - updated_by_user_id: updated_by_user_id, - city_id: city_id, - type: type, - make: make, - model: model, - capacity: capacity, - minimum_year: minimum_year, - actions: actions - }; - headerRow = []; - for (_i = 0, _len = cols.length; _i < _len; _i++) { - c = cols[_i]; - if (columnValues[c]) { - headerRow.push(columnValues[c]); - } - } - return headerRow; - }; - return VehicleTypesCollection; - })(); -}).call(this); -}, "web-lib/helpers": function(exports, require, module) {(function() { - var __indexOf = Array.prototype.indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (this[i] === item) return i; - } - return -1; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - exports.helpers = { - pin: function(num, color) { - if (color == null) { - color = 'FF0000'; - } - return ""; - }, - reverseGeocode: function(latitude, longitude) { - if (latitude && longitude) { - return "" + latitude + ", " + longitude + ""; - } else { - return ''; - } - }, - linkedName: function(model) { - var first_name, id, last_name, role, url; - role = model.role || model.get('role'); - id = model.id || model.get('id'); - first_name = model.first_name || model.get('first_name'); - last_name = model.last_name || model.get('last_name'); - url = "/" + role + "s/" + id; - return "" + first_name + " " + last_name + ""; - }, - linkedVehicle: function(vehicle, vehicleType) { - return " " + (vehicleType != null ? vehicleType.get('make') : void 0) + " " + (vehicleType != null ? vehicleType.get('model') : void 0) + " " + (vehicle.get('year')) + " "; - }, - linkedUserId: function(userType, userId) { - return "" + userType + " " + userId + ""; - }, - timeDelta: function(start, end) { - var delta; - if (typeof start === 'string') { - start = this.parseDate(start); - } - if (typeof end === 'string') { - end = this.parseDate(end); - } - if (end && start) { - delta = end.getTime() - start.getTime(); - return this.formatSeconds(delta / 1000); - } else { - return '00:00'; - } - }, - formatSeconds: function(s) { - var minutes, seconds; - s = Math.floor(s); - minutes = Math.floor(s / 60); - seconds = s - minutes * 60; - return "" + (this.leadingZero(minutes)) + ":" + (this.leadingZero(seconds)); - }, - formatCurrency: function(strValue, reverseSign, currency) { - var currency_locale, lc, mf; - if (reverseSign == null) { - reverseSign = false; - } - if (currency == null) { - currency = null; - } - strValue = String(strValue); - if (reverseSign) { - strValue = ~strValue.indexOf('-') ? strValue.split('-').join('') : ['-', strValue].join(''); - } - currency_locale = i18n.currencyToLocale[currency]; - try { - if (!(currency_locale != null) || currency_locale === i18n.locale) { - return i18n.jsworld.mf.format(strValue); - } else { - lc = new jsworld.Locale(POSIX_LC[currency_locale]); - mf = new jsworld.MonetaryFormatter(lc); - return mf.format(strValue); - } - } catch (error) { - i18n.log(error); - return strValue; - } - }, - formatTripFare: function(trip, type) { - var _ref, _ref2; - if (type == null) { - type = "fare"; - } - if (!trip.get('fare')) { - return 'n/a'; - } - if (((_ref = trip.get('fare_breakdown_local')) != null ? _ref.currency : void 0) != null) { - return app.helpers.formatCurrency(trip.get("" + type + "_local"), false, (_ref2 = trip.get('fare_breakdown_local')) != null ? _ref2.currency : void 0); - } else if (trip.get("" + type + "_string") != null) { - return trip.get("" + type + "_string"); - } else if (trip.get("" + type + "_local") != null) { - return trip.get("" + type + "_local"); - } else { - return 'n/a'; - } - }, - formatPhoneNumber: function(phoneNumber, countryCode) { - if (countryCode == null) { - countryCode = "+1"; - } - if (phoneNumber != null) { - phoneNumber = String(phoneNumber); - switch (countryCode) { - case '+1': - return countryCode + ' ' + phoneNumber.substring(0, 3) + '-' + phoneNumber.substring(3, 6) + '-' + phoneNumber.substring(6, 10); - case '+33': - return countryCode + ' ' + phoneNumber.substring(0, 1) + ' ' + phoneNumber.substring(1, 3) + ' ' + phoneNumber.substring(3, 5) + ' ' + phoneNumber.substring(5, 7) + ' ' + phoneNumber.substring(7, 9); - default: - countryCode + phoneNumber; - } - } - return "" + countryCode + " " + phoneNumber; - }, - parseDate: function(d, cityTime, tz) { - var city_filter, parsed, _ref; - if (cityTime == null) { - cityTime = true; - } - if (tz == null) { - tz = null; - } - if (((_ref = !d.substr(-6, 1)) === '+' || _ref === '-') || d.length === 19) { - d += '+00:00'; - } - if (/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/.test(d)) { - parsed = d.match(/(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})/); - d = new Date(); - d.setUTCFullYear(parsed[1]); - d.setUTCMonth(parsed[2] - 1); - d.setUTCDate(parsed[3]); - d.setUTCHours(parsed[4]); - d.setUTCMinutes(parsed[5]); - d.setUTCSeconds(parsed[6]); - } else { - d = Date.parse(d); - } - if (typeof d === 'number') { - d = new Date(d); - } - d = new timezoneJS.Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), 'Etc/UTC'); - if (tz) { - d.convertToTimezone(tz); - } else if (cityTime) { - city_filter = $.cookie('city_filter'); - if (city_filter) { - tz = $("#city_filter option[value=" + city_filter + "]").attr('data-timezone'); - if (tz) { - d.convertToTimezone(tz); - } - } - } - return d; - }, - dateToTimezone: function(d) { - var city_filter, tz; - d = new timezoneJS.Date(d.getUTCFullYear(), d.getUTCMonth(), d.getUTCDate(), d.getUTCHours(), d.getUTCMinutes(), d.getUTCSeconds(), 'Etc/UTC'); - city_filter = $.cookie('city_filter'); - if (city_filter) { - tz = $("#city_filter option[value=" + city_filter + "]").attr('data-timezone'); - d.convertToTimezone(tz); - } - return d; - }, - fixAMPM: function(d, formatted) { - if (d.hours >= 12) { - return formatted.replace(/\b[AP]M\b/, 'PM'); - } else { - return formatted.replace(/\b[AP]M\b/, 'AM'); - } - }, - formatDate: function(d, time, timezone) { - var formatted; - if (time == null) { - time = true; - } - if (timezone == null) { - timezone = null; - } - d = this.parseDate(d, true, timezone); - formatted = time ? ("" + (i18n.jsworld.dtf.formatDate(d)) + " ") + this.formatTime(d, d.getTimezoneInfo()) : i18n.jsworld.dtf.formatDate(d); - return this.fixAMPM(d, formatted); - }, - formatDateLong: function(d, time, timezone) { - if (time == null) { - time = true; - } - if (timezone == null) { - timezone = null; - } - d = this.parseDate(d, true, timezone); - timezone = d.getTimezoneInfo().tzAbbr; - if (time) { - return (i18n.jsworld.dtf.formatDateTime(d)) + (" " + timezone); - } else { - return i18n.jsworld.dtf.formatDate(d); - } - }, - formatTimezoneJSDate: function(d) { - var day, hours, jsDate, minutes, month, year; - year = d.getFullYear(); - month = this.leadingZero(d.getMonth()); - day = this.leadingZero(d.getDate()); - hours = this.leadingZero(d.getHours()); - minutes = this.leadingZero(d.getMinutes()); - jsDate = new Date(year, month, day, hours, minutes, 0); - return jsDate.toDateString(); - }, - formatTime: function(d, timezone) { - var formatted; - if (timezone == null) { - timezone = null; - } - formatted = ("" + (i18n.jsworld.dtf.formatTime(d))) + (timezone != null ? " " + (timezone != null ? timezone.tzAbbr : void 0) : ""); - return this.fixAMPM(d, formatted); - }, - formatISODate: function(d) { - var pad; - pad = function(n) { - if (n < 10) { - return '0' + n; - } - return n; - }; - return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + 'Z'; - }, - formatExpDate: function(d) { - var month, year; - d = this.parseDate(d); - year = d.getFullYear(); - month = this.leadingZero(d.getMonth() + 1); - return "" + year + "-" + month; - }, - formatLatLng: function(lat, lng, precision) { - if (precision == null) { - precision = 8; - } - return parseFloat(lat).toFixed(precision) + ',' + parseFloat(lng).toFixed(precision); - }, - leadingZero: function(num) { - if (num < 10) { - return "0" + num; - } else { - return num; - } - }, - roundNumber: function(num, dec) { - return Math.round(num * Math.pow(10, dec)) / Math.pow(10, dec); - }, - notesToHTML: function(notes) { - var i, note, notesHTML, _i, _len; - notesHTML = ''; - i = 1; - if (notes) { - for (_i = 0, _len = notes.length; _i < _len; _i++) { - note = notes[_i]; - notesHTML += "" + note['userid'] + "     " + (this.formatDate(note['created_at'])) + "

    " + note['note'] + "

    "; - notesHTML += "
    "; - } - } - return notesHTML.replace("'", '"e'); - }, - formatPhone: function(n) { - var parts, phone, regexObj; - n = "" + n; - regexObj = /^(?:\+?1[-. ]?)?(?:\(?([0-9]{3})\)?[-. ]?)?([0-9]{3})[-. ]?([0-9]{4})$/; - if (regexObj.test(n)) { - parts = n.match(regexObj); - phone = ""; - if (parts[1]) { - phone += "(" + parts[1] + ") "; - } - phone += "" + parts[2] + "-" + parts[3]; - } else { - phone = n; - } - return phone; - }, - usStates: ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'District of Columbia', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'], - onboardingPages: ['applied', 'ready_to_interview', 'pending_interview', 'interviewed', 'accepted', 'ready_to_onboard', 'pending_onboarding', 'active', 'waitlisted', 'rejected'], - driverBreadCrumb: function(loc, model) { - var onboardingPage, out, _i, _len, _ref; - out = "Drivers > "; - if (!(model != null)) { - out += ""; - } else { - out += "" + (this.onboardingUrlToName(model.get('driver_status'))) + ""; - out += " > " + (this.linkedName(model)) + " (" + (model.get('role')) + ") #" + (model.get('id')); - } - return out; - }, - onboardingUrlToName: function(url) { - return url != null ? url.replace(/_/g, " ").replace(/(^|\s)([a-z])/g, function(m, p1, p2) { - return p1 + p2.toUpperCase(); - }) : void 0; - }, - formatVehicle: function(vehicle) { - if (vehicle.get('make') && vehicle.get('model') && vehicle.get('license_plate')) { - return "" + (vehicle.get('make')) + " " + (vehicle.get('model')) + " (" + (vehicle.get('license_plate')) + ")"; - } - }, - docArbitraryFields: function(docName, cityDocs) { - var doc, field, out, _i, _j, _len, _len2, _ref; - out = ""; - for (_i = 0, _len = cityDocs.length; _i < _len; _i++) { - doc = cityDocs[_i]; - if (doc.name === docName && __indexOf.call(_.keys(doc), "metaFields") >= 0) { - _ref = doc.metaFields; - for (_j = 0, _len2 = _ref.length; _j < _len2; _j++) { - field = _ref[_j]; - out += "" + field.label + ":
    "; - } - } - } - return out; - }, - capitaliseFirstLetter: function(string) { - return string.charAt(0).toUpperCase() + string.slice(1); - }, - createDocUploadForm: function(docName, driverId, vehicleId, cityMeta, vehicleName, expirationRequired) { - var ddocs, expDropdowns, pdocs, vdocs; - if (driverId == null) { - driverId = "None"; - } - if (vehicleId == null) { - vehicleId = "None"; - } - if (cityMeta == null) { - cityMeta = []; - } - if (vehicleName == null) { - vehicleName = false; - } - if (expirationRequired == null) { - expirationRequired = false; - } - ddocs = cityMeta["driverRequiredDocs"] || []; - pdocs = cityMeta["partnerRequiredDocs"] || []; - vdocs = cityMeta["vehicleRequiredDocs"] || []; - expDropdowns = "Expiration Date:\n -\n"; - return " \n
    \n \n \n \n\n
    \n " + (vehicleName ? vehicleName : "") + " " + docName + "\n
    \n\n
    \n \n
    \n\n
    \n " + (expirationRequired ? expDropdowns : "") + "\n
    \n\n
    \n " + (app.helpers.docArbitraryFields(docName, _.union(ddocs, pdocs, vdocs))) + "\n
    \n\n
    \n \n
    \n\n
    \n"; - }, - countrySelector: function(name, options) { - var countries, countryCodePrefix, defaultOptions; - if (options == null) { - options = {}; - } - defaultOptions = { - selectedKey: 'telephone_code', - selectedValue: '+1', - silent: false - }; - _.extend(defaultOptions, options); - options = defaultOptions; - countries = new app.collections.countries(); - countries.fetch({ - data: { - limit: 300 - }, - success: function(countries) { - var $option, $select, country, selected, _i, _len, _ref; - selected = false; - _ref = countries.models || []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - country = _ref[_i]; - $select = $("select[name=" + name + "]"); - $option = $('').val(country.id).attr('data-iso2', country.get('iso2')).attr('data-prefix', country.get('telephone_code')).html(country.get('name')); - if (country.get(options.selectedKey) === options.selectedValue && !selected) { - selected = true; - $option.attr('selected', 'selected'); - } - $select.append($option); - } - if (selected && !options.silent) { - return $select.val(options.selected).trigger('change'); - } - } - }); - countryCodePrefix = options.countryCodePrefix ? "data-country-code-prefix='" + options.countryCodePrefix + "'" : ''; - return ""; - }, - missingDocsOnDriver: function(driver) { - var city, docsReq, documents, partnerDocs; - city = driver.get('city'); - documents = driver.get('documents'); - if ((city != null) && (documents != null)) { - docsReq = _.pluck(city != null ? city.get('meta')["driverRequiredDocs"] : void 0, "name"); - if (driver.get('role') === "partner") { - partnerDocs = _.pluck(city != null ? city.get('meta')["partnerRequiredDocs"] : void 0, "name"); - docsReq = _.union(docsReq, partnerDocs); - } - return _.reject(docsReq, __bind(function(doc) { - return __indexOf.call((documents != null ? documents.pluck("name") : void 0) || [], doc) >= 0; - }, this)); - } else { - return []; - } - } - }; -}).call(this); -}, "web-lib/i18n": function(exports, require, module) {(function() { - exports.i18n = { - defaultLocale: 'en_US', - cookieName: '_LOCALE_', - locales: { - 'en_US': "English (US)", - 'fr_FR': "Français" - }, - currencyToLocale: { - 'USD': 'en_US', - 'EUR': 'fr_FR' - }, - logglyKey: 'd2d5a9bc-7ebe-4538-a180-81e62c705b1b', - logglyHost: 'https://logs.loggly.com', - init: function() { - this.castor = new window.loggly({ - url: this.logglyHost + '/inputs/' + this.logglyKey + '?rt=1', - level: 'error' - }); - this.setLocale($.cookie(this.cookieName) || this.defaultLocale); - window.t = _.bind(this.t, this); - this.loadLocaleTranslations(this.locale); - if (!(this[this.defaultLocale] != null)) { - return this.loadLocaleTranslations(this.defaultLocale); - } - }, - loadLocaleTranslations: function(locale) { - var loadPaths, path, _i, _len, _results; - loadPaths = ['web-lib/translations/' + locale, 'web-lib/translations/' + locale.slice(0, 2), 'translations/' + locale, 'translations/' + locale.slice(0, 2)]; - _results = []; - for (_i = 0, _len = loadPaths.length; _i < _len; _i++) { - path = loadPaths[_i]; - locale = path.substring(path.lastIndexOf('/') + 1); - if (this[locale] == null) { - this[locale] = {}; - } - _results.push((function() { - try { - return _.extend(this[locale], require(path).translations); - } catch (error) { - - } - }).call(this)); - } - return _results; - }, - getLocale: function() { - return this.locale; - }, - setLocale: function(locale) { - var message, parts, _ref; - parts = locale.split('_'); - this.locale = parts[0].toLowerCase(); - if (parts.length > 1) { - this.locale += "_" + (parts[1].toUpperCase()); - } - if (this.locale) { - $.cookie(this.cookieName, this.locale, { - path: '/', - domain: '.uber.com' - }); - } - try { - ((_ref = this.jsworld) != null ? _ref : this.jsworld = {}).lc = new jsworld.Locale(POSIX_LC[this.locale]); - this.jsworld.mf = new jsworld.MonetaryFormatter(this.jsworld.lc); - this.jsworld.nf = new jsworld.NumericFormatter(this.jsworld.lc); - this.jsworld.dtf = new jsworld.DateTimeFormatter(this.jsworld.lc); - this.jsworld.np = new jsworld.NumericParser(this.jsworld.lc); - this.jsworld.mp = new jsworld.MonetaryParser(this.jsworld.lc); - return this.jsworld.dtp = new jsworld.DateTimeParser(this.jsworld.lc); - } catch (error) { - message = 'JsWorld error with locale: ' + this.locale; - return this.log({ - message: message, - error: error - }); - } - }, - getTemplate: function(id) { - var _ref, _ref2; - return ((_ref = this[this.locale]) != null ? _ref[id] : void 0) || ((_ref2 = this[this.locale.slice(0, 2)]) != null ? _ref2[id] : void 0); - }, - getTemplateDefault: function(id) { - var _ref, _ref2; - return ((_ref = this[this.defaultLocale]) != null ? _ref[id] : void 0) || ((_ref2 = this[this.defaultLocale.slice(0, 2)]) != null ? _ref2[id] : void 0); - }, - getTemplateOrDefault: function(id) { - return this.getTemplate(id) || this.getTemplateDefault(id); - }, - t: function(id, vars) { - var errStr, locale, template; - if (vars == null) { - vars = {}; - } - locale = this.getLocale(); - template = this.getTemplate(id); - if (template == null) { - if (/dev|test/.test(window.location.host)) { - template = "(?) " + id; - } else { - template = this.getTemplateDefault(id); - } - errStr = "Missing [" + locale + "] translation for [" + id + "] at [" + window.location.hash + "] - Default template is [" + template + "]"; - this.log({ - error: errStr, - locale: locale, - id: id, - defaultTemplate: template - }); - } - if (template) { - return _.template(template, vars); - } else { - return id; - } - }, - log: function(error) { - if (/dev/.test(window.location.host)) { - if ((typeof console !== "undefined" && console !== null ? console.log : void 0) != null) { - return console.log(error); - } - } else { - _.extend(error, { - host: window.location.host, - hash: window.location.hash - }); - return this.castor.error(JSON.stringify(error)); - } - } - }; -}).call(this); -}, "web-lib/mixins/i18n_phone_form": function(exports, require, module) {(function() { - exports.i18nPhoneForm = { - _events: { - 'change select[data-country-code-prefix]': 'setCountryCodePrefix' - }, - setCountryCodePrefix: function(e) { - var $el, prefix; - $el = $(e.currentTarget); - prefix = $el.find('option:selected').attr('data-prefix'); - return $("#" + ($el.attr('data-country-code-prefix'))).text(prefix); - } - }; -}).call(this); -}, "web-lib/models/country": function(exports, require, module) {(function() { - var UberModel; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberModel = require('web-lib/uber_model').UberModel; - exports.Country = (function() { - __extends(Country, UberModel); - function Country() { - Country.__super__.constructor.apply(this, arguments); - } - Country.prototype.url = function() { - if (this.id) { - return "/countries/" + this.id; - } else { - return '/countries'; - } - }; - return Country; - })(); -}).call(this); -}, "web-lib/models/vehicle_type": function(exports, require, module) {(function() { - var UberModel; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - UberModel = require('web-lib/uber_model').UberModel; - exports.VehicleType = (function() { - __extends(VehicleType, UberModel); - function VehicleType() { - this.toString = __bind(this.toString, this); - VehicleType.__super__.constructor.apply(this, arguments); - } - VehicleType.prototype.endpoint = 'vehicle_types'; - VehicleType.prototype.toTableRow = function(cols) { - var actions, c, capacity, city_id, columnValues, created_at, created_by_user_id, deleted_at, id, make, minimum_year, model, rows, type, updated_at, updated_by_user_id, _i, _len, _ref; - id = "" + (this.get('id')) + ""; - if (this.get('created_at')) { - created_at = app.helpers.formatDate(this.get('created_at')); - } - if (this.get('updated_at')) { - updated_at = app.helpers.formatDate(this.get('updated_at')); - } - if (this.get('deleted_at')) { - deleted_at = app.helpers.formatDate(this.get('deleted_at')); - } - created_by_user_id = "" + (this.get('created_by_user_id')) + ""; - updated_by_user_id = "" + (this.get('updated_by_user_id')) + ""; - city_id = (_ref = this.get('city')) != null ? _ref.get('display_name') : void 0; - type = this.get('type'); - make = this.get('make'); - model = this.get('model'); - capacity = this.get('capacity'); - minimum_year = this.get('minimum_year'); - actions = "Show"; - if (!this.get('deleted_at')) { - actions += " Edit"; - actions += " Delete"; - } - columnValues = { - id: id, - created_at: created_at, - updated_at: updated_at, - deleted_at: deleted_at, - created_by_user_id: created_by_user_id, - updated_by_user_id: updated_by_user_id, - city_id: city_id, - type: type, - make: make, - model: model, - capacity: capacity, - minimum_year: minimum_year, - actions: actions - }; - rows = []; - for (_i = 0, _len = cols.length; _i < _len; _i++) { - c = cols[_i]; - rows.push(columnValues[c] ? columnValues[c] : '-'); - } - return rows; - }; - VehicleType.prototype.toString = function() { - return this.get('make') + ' ' + this.get('model') + ' ' + this.get('type') + (" (" + (this.get('capacity')) + ")"); - }; - return VehicleType; - })(); -}).call(this); -}, "web-lib/templates/footer": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var locale, title, _ref; - __out.push('\n\n\n\n\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "web-lib/translations/en": function(exports, require, module) {(function() { - exports.translations = { - "Info": "Info", - "Learn More": "Learn More", - "Pricing": "Pricing", - "FAQ": "FAQ", - "Support": "Support", - "Support & FAQ": "Support & FAQ", - "Contact Us": "Contact Us", - "Jobs": "Jobs", - "Phones": "Phones", - "Text Message": "Text Message", - "iPhone": "iPhone", - "Android": "Android", - "Drivers": "Drivers", - "Apply": "Apply", - "Sign In": "Sign In", - "Social": "Social", - "Twitter": "Twitter", - "Facebook": "Facebook", - "Blog": "Blog", - "Legal": "Legal", - "Company_Footer": "Company", - "Privacy Policy": "Privacy Policy", - "Terms": "Terms", - "Copyright © Uber Technologies, Inc.": "Copyright © Uber Technologies, Inc.", - "Language:": "Language:", - "Apply to Drive": "Apply to Drive", - "Expiration": "Expiration", - "Fare": "Fare", - "Driver": "Driver ", - "Dashboard": "Dashboard", - "Forgot Password": "Forgot Password", - "Trip Details": "Trip Details", - "Save": "Save", - "Cancel": "Cancel", - "Edit": "Edit", - "Password": "Password", - "First Name": "First Name", - "Last Name": "Last Name", - "Email Address": "Email Address", - "Submit": "Submit", - "Mobile Number": "Mobile Number", - "Zip Code": "Zip Code", - "Sign Out": "Sign Out", - "Confirm Email Message": "Attempting to confirm email...", - "Upload": "Upload", - "Rating": "Rating", - "Pickup Time": "Pickup Time", - "2011": "2011", - "2012": "2012", - "2013": "2013", - "2014": "2014", - "2015": "2015", - "2016": "2016", - "2017": "2017", - "2018": "2018", - "2019": "2019", - "2020": "2020", - "2021": "2021", - "2022": "2022", - "01": "01", - "02": "02", - "03": "03", - "04": "04", - "05": "05", - "06": "06", - "07": "07", - "08": "08", - "09": "09", - "10": "10", - "11": "11", - "12": "12" - }; -}).call(this); -}, "web-lib/translations/fr": function(exports, require, module) {(function() { - exports.translations = { - "Info": "Info", - "Learn More": "En Savoir Plus", - "Pricing": "Calcul du Prix", - "Support & FAQ": "Aide & FAQ", - "Contact Us": "Contactez Nous", - "Jobs": "Emplois", - "Phones": "Téléphones", - "Text Message": "SMS", - "iPhone": "iPhone", - "Android": "Android", - "Apply to Drive": "Candidature Chauffeur", - "Sign In": "Connexion", - "Social": "Contact", - "Twitter": "Twitter", - "Facebook": "Facebook", - "Blog": "Blog", - "Privacy Policy": "Protection des Données Personelles", - "Terms": "Conditions Générales", - "Copyright © Uber Technologies, Inc.": "© Uber, Inc.", - "Language:": "Langue:", - "Forgot Password": "Mot de passe oublié", - "Company_Footer": "À Propos d'Uber", - "Expiration": "Expiration", - "Fare": "Tarif", - "Driver": "Chauffeur", - "Drivers": "Chauffeurs", - "Dashboard": "Tableau de bord", - "Forgot Password": "Mot de passe oublié", - "Forgot Password?": "Mot de passe oublié?", - "Trip Details": "Détails de la course", - "Save": "Enregistrer", - "Cancel": "Annuler", - "Edit": "Modifier", - "Password": "Mot de passe", - "First Name": "Prénom", - "Last Name": "Nom", - "Email Address": "E-mail", - "Submit": "Soumettre", - "Mobile Number": "Téléphone Portable", - "Zip Code": "Code Postal", - "Sign Out": "Se déconnecter", - "Confirm Email Message": "E-mail de confirmation", - "Upload": "Télécharger", - "Rating": "Notation", - "Pickup Time": "Heure de prise en charge", - "2011": "2011", - "2012": "2012", - "2013": "2013", - "2014": "2014", - "2015": "2015", - "2016": "2016", - "2017": "2017", - "2018": "2018", - "2019": "2019", - "2020": "2020", - "2021": "2021", - "2022": "2022", - "01": "01", - "02": "02", - "03": "03", - "04": "04", - "05": "05", - "06": "06", - "07": "07", - "08": "08", - "09": "09", - "10": "10", - "11": "11", - "12": "12" - }; -}).call(this); -}, "web-lib/uber_collection": function(exports, require, module) {(function() { - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - exports.UberCollection = (function() { - __extends(UberCollection, Backbone.Collection); - function UberCollection() { - UberCollection.__super__.constructor.apply(this, arguments); - } - UberCollection.prototype.parse = function(data) { - var model, tmp, _i, _in, _len, _out; - _in = data.resources || data; - _out = []; - if (data.meta) { - this.meta = data.meta; - } - for (_i = 0, _len = _in.length; _i < _len; _i++) { - model = _in[_i]; - tmp = new this.model; - tmp.set(tmp.parse(model)); - _out.push(tmp); - } - return _out; - }; - UberCollection.prototype.isRenderable = function() { - if (this.models.length) { - return true; - } - }; - UberCollection.prototype.toTableRows = function(cols) { - var tableRows; - tableRows = []; - _.each(this.models, function(model) { - return tableRows.push(model.toTableRow(cols)); - }); - return tableRows; - }; - return UberCollection; - })(); -}).call(this); -}, "web-lib/uber_model": function(exports, require, module) {(function() { - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __indexOf = Array.prototype.indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (this[i] === item) return i; - } - return -1; - }; - exports.UberModel = (function() { - __extends(UberModel, Backbone.Model); - function UberModel() { - this.refetch = __bind(this.refetch, this); - this.fetch = __bind(this.fetch, this); - this.save = __bind(this.save, this); - this.parse = __bind(this.parse, this); - UberModel.__super__.constructor.apply(this, arguments); - } - UberModel.prototype.endpoint = 'set_api_endpoint_in_subclass'; - UberModel.prototype.refetchOptions = {}; - UberModel.prototype.url = function(type) { - var endpoint_path; - endpoint_path = "/" + this.endpoint; - if (this.get('id')) { - return endpoint_path + ("/" + (this.get('id'))); - } else { - return endpoint_path; - } - }; - UberModel.prototype.isRenderable = function() { - var i, key, value, _ref; - i = 0; - _ref = this.attributes; - for (key in _ref) { - if (!__hasProp.call(_ref, key)) continue; - value = _ref[key]; - if (this.attributes.hasOwnProperty(key)) { - i += 1; - } - if (i > 1) { - return true; - } - } - return !(i === 1); - }; - UberModel.prototype.parse = function(response) { - var attrs, key, model, models, _i, _j, _k, _len, _len2, _len3, _ref, _ref2; - if (typeof response === 'object') { - _ref = _.intersection(_.keys(app.models), _.keys(response)); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - if (response[key]) { - attrs = this.parse(response[key]); - if (typeof attrs === 'object') { - response[key] = new app.models[key](attrs); - } - } - } - _ref2 = _.intersection(_.keys(app.collections), _.keys(response)); - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - key = _ref2[_j]; - models = response[key]; - if (_.isArray(models)) { - response[key] = new app.collections[key]; - for (_k = 0, _len3 = models.length; _k < _len3; _k++) { - model = models[_k]; - attrs = app.collections[key].prototype.model.prototype.parse(model); - response[key].add(new response[key].model(attrs)); - } - } - } - } - return response; - }; - UberModel.prototype.save = function(attributes, options) { - var attr, _i, _j, _len, _len2, _ref, _ref2; - if (options == null) { - options = {}; - } - _ref = _.intersection(_.keys(app.models), _.keys(this.attributes)); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - attr = _ref[_i]; - if (typeof this.get(attr) === "object") { - this.unset(attr, { - silent: true - }); - } - } - _ref2 = _.intersection(_.keys(app.collections), _.keys(this.attributes)); - for (_j = 0, _len2 = _ref2.length; _j < _len2; _j++) { - attr = _ref2[_j]; - if (typeof this.get(attr) === "object") { - this.unset(attr, { - silent: true - }); - } - } - if ((options != null) && options.diff && (attributes != null) && attributes !== {}) { - attributes['id'] = this.get('id'); - attributes['token'] = this.get('token'); - this.clear({ - 'silent': true - }); - this.set(attributes, { - silent: true - }); - } - if (__indexOf.call(_.keys(options), "data") < 0 && __indexOf.call(_.keys(this.refetchOptions || {}), "data") >= 0) { - options.data = this.refetchOptions.data; - } - return Backbone.Model.prototype.save.call(this, attributes, options); - }; - UberModel.prototype.fetch = function(options) { - this.refetchOptions = options; - return Backbone.Model.prototype.fetch.call(this, options); - }; - UberModel.prototype.refetch = function() { - return this.fetch(this.refetchOptions); - }; - return UberModel; - })(); -}).call(this); -}, "web-lib/uber_router": function(exports, require, module) {(function() { - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - exports.UberRouter = (function() { - __extends(UberRouter, Backbone.Router); - function UberRouter() { - UberRouter.__super__.constructor.apply(this, arguments); - } - UberRouter.prototype.datePickers = function(format) { - if (format == null) { - format = "%Z-%m-%dT%H:%i:%s%:"; - } - $('.datepicker').AnyTime_noPicker(); - return $('.datepicker').AnyTime_picker({ - 'format': format, - 'formatUtcOffset': '%@' - }); - }; - UberRouter.prototype.autoGrowInput = function() { - return $('.editable input').autoGrowInput(); - }; - UberRouter.prototype.windowTitle = function(title) { - return $(document).attr('title', title); - }; - return UberRouter; - })(); -}).call(this); -}, "web-lib/uber_show_view": function(exports, require, module) {(function() { - var UberView; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - UberView = require('web-lib/uber_view').UberView; - exports.UberShowView = (function() { - __extends(UberShowView, UberView); - function UberShowView() { - UberShowView.__super__.constructor.apply(this, arguments); - } - UberShowView.prototype.view = 'show'; - UberShowView.prototype.events = { - 'click #edit': 'edit', - 'submit form': 'save', - 'click .cancel': 'cancel' - }; - UberShowView.prototype.errors = null; - UberShowView.prototype.showTemplate = null; - UberShowView.prototype.editTemplate = null; - UberShowView.prototype.initialize = function() { - if (this.init_hook) { - this.init_hook(); - } - _.bindAll(this, 'render'); - return this.model.bind('change', this.render); - }; - UberShowView.prototype.render = function() { - var $el; - $el = $(this.el); - this.selectView(); - if (this.view === 'show') { - $el.html(this.showTemplate({ - model: this.model - })); - } else if (this.view === 'edit') { - $el.html(this.editTemplate({ - model: this.model, - errors: this.errors || {}, - collections: this.collections || {} - })); - } else { - $el.html(this.newTemplate({ - model: this.model, - errors: this.errors || {}, - collections: this.collections || {} - })); - } - if (this.render_hook) { - this.render_hook(); - } - this.errors = null; - this.userIdsToLinkedNames(); - this.datePickers(); - return this.place(); - }; - UberShowView.prototype.selectView = function() { - var url; - if (this.options.urlRendering) { - url = window.location.hash; - if (url.match(/\/new/)) { - return this.view = 'new'; - } else if (url.match(/\/edit/)) { - return this.view = 'edit'; - } else { - return this.view = 'show'; - } - } - }; - UberShowView.prototype.edit = function(e) { - e.preventDefault(); - if (this.options.urlRendering) { - window.location.hash = '#/' + this.model.endpoint + '/' + this.model.get('id') + '/edit'; - } else { - this.view = 'edit'; - } - return this.model.change(); - }; - UberShowView.prototype.save = function(e) { - var attributes, ele, form_attrs, _i, _len, _ref; - e.preventDefault(); - attributes = $(e.currentTarget).serializeToJson(); - form_attrs = {}; - _ref = $('input[type="radio"]'); - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - ele = _ref[_i]; - if ($(ele).is(':checked')) { - form_attrs[$(ele).attr('name')] = $(ele).attr('value'); - } - } - attributes = _.extend(attributes, form_attrs); - if (this.relationships) { - attributes = _.extend(attributes, { - relationships: this.relationships - }); - } - if (this.filter_attributes != null) { - this.filter_attributes(attributes); - } - return this.model.save(attributes, { - silent: true, - success: __bind(function(model) { - if (this.options.urlRendering) { - window.location.hash = '#/' + this.model.endpoint + '/' + this.model.get('id'); - } else { - this.view = 'show'; - } - return this.flash('success', "Uber save!"); - }, this), - statusCode: { - 406: __bind(function(xhr) { - this.errors = JSON.parse(xhr.responseText); - return this.flash('error', 'That was not Uber.'); - }, this) - }, - error: __bind(function(model, xhr) { - var code, message, responseJSON, responseText; - code = xhr.status; - responseText = xhr.responseText; - if (responseText) { - responseJSON = JSON.parse(responseText); - } - if (responseJSON && (typeof responseJSON === 'object') && (responseJSON.hasOwnProperty('error'))) { - message = responseJSON.error; - } - return this.flash('error', (code || 'Unknown') + ' error' + (': ' + message || '')); - }, this), - complete: __bind(function() { - return this.model.change(); - }, this) - }); - }; - UberShowView.prototype.cancel = function(e) { - e.preventDefault(); - if (this.options.urlRendering) { - window.location.hash = '#/' + this.model.endpoint + '/' + this.model.get('id'); - } else { - this.view = 'show'; - } - return this.model.fetch({ - silent: true, - complete: __bind(function() { - return this.model.change(); - }, this) - }); - }; - return UberShowView; - })(); -}).call(this); -}, "web-lib/uber_sync": function(exports, require, module) {(function() { - var methodType; - var __indexOf = Array.prototype.indexOf || function(item) { - for (var i = 0, l = this.length; i < l; i++) { - if (this[i] === item) return i; - } - return -1; - }; - methodType = { - create: 'POST', - update: 'PUT', - "delete": 'DELETE', - read: 'GET' - }; - exports.UberSync = function(method, model, options) { - var token; - options.type = methodType[method]; - options.url = _.isString(this.url) ? '/api' + this.url : '/api' + this.url(options.type); - options.data = _.extend({}, options.data); - if (__indexOf.call(_.keys(options.data), "city_id") < 0) { - if ($.cookie('city_filter')) { - _.extend(options.data, { - city_id: $.cookie('city_filter') - }); - } - } else { - delete options.data['city_id']; - } - if (options.type === 'POST' || options.type === 'PUT') { - _.extend(options.data, model.toJSON()); - } - token = $.cookie('token') ? $.cookie('token') : typeof USER !== "undefined" && USER !== null ? USER.get('token') : ""; - _.extend(options.data, { - token: token - }); - if (method === "delete") { - options.contentType = 'application/json'; - options.data = JSON.stringify(options.data); - } - return $.ajax(options); - }; -}).call(this); -}, "web-lib/uber_view": function(exports, require, module) {(function() { - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - exports.UberView = (function() { - __extends(UberView, Backbone.View); - function UberView() { - this.processDocumentUpload = __bind(this.processDocumentUpload, this); - UberView.__super__.constructor.apply(this, arguments); - } - UberView.prototype.className = 'view_container'; - UberView.prototype.hashId = function() { - return parseInt(location.hash.split('/')[2]); - }; - UberView.prototype.place = function(content) { - var $target; - $target = this.options.scope ? this.options.scope.find(this.options.selector) : $(this.options.selector); - $target[this.options.method || 'html'](content || this.el); - this.delegateEvents(); - $('#spinner').hide(); - return this; - }; - UberView.prototype.mixin = function(m, args) { - var events, self; - if (args == null) { - args = {}; - } - self = this; - events = m._events; - _.extend(this, m); - if (m.initialize) { - m.initialize(self, args); - } - return _.each(_.keys(events), function(key) { - var event, func, selector, split; - split = key.split(' '); - event = split[0]; - selector = split[1]; - func = events[key]; - return $(self.el).find(selector).live(event, function(e) { - return self[func](e); - }); - }); - }; - UberView.prototype.datePickers = function(format) { - if (format == null) { - format = "%Z-%m-%dT%H:%i:%s%:"; - } - $('.datepicker').AnyTime_noPicker(); - return $('.datepicker').AnyTime_picker({ - 'format': format, - 'formatUtcOffset': '%@' - }); - }; - UberView.prototype.dataTable = function(collection, selector, options, params, cols) { - var defaults; - if (selector == null) { - selector = 'table'; - } - if (options == null) { - options = {}; - } - if (params == null) { - params = {}; - } - if (cols == null) { - cols = []; - } - $(selector).empty(); - if (!cols.length) { - cols = collection.defaultColumns; - } - defaults = { - aoColumns: collection.tableColumns(cols), - bDestroy: true, - bSort: false, - bProcessing: true, - bFilter: false, - bServerSide: true, - bPaginate: true, - bScrollInfinite: true, - bScrollCollapse: true, - sScrollY: '600px', - iDisplayLength: 50, - fnServerData: function(source, data, callback) { - var defaultParams; - defaultParams = { - limit: data[4].value, - offset: data[3].value - }; - return collection.fetch({ - data: _.extend(defaultParams, params), - success: function() { - return callback({ - aaData: collection.toTableRows(cols), - iTotalRecords: collection.meta.count, - iTotalDisplayRecords: collection.meta.count - }); - }, - error: function() { - return new Error({ - message: 'Loading error.' - }); - } - }); - }, - fnRowCallback: function(nRow, aData, iDisplayIndex, iDisplayIndexFull) { - $('[data-tooltip]', nRow).qtip({ - content: { - attr: 'data-tooltip' - }, - style: { - classes: "ui-tooltip-light ui-tooltip-rounded ui-tooltip-shadow" - } - }); - return nRow; - } - }; - return $(this.el).find(selector).dataTable(_.extend(defaults, options)); - }; - UberView.prototype.dataTableLocal = function(collection, selector, options, params, cols) { - var $dataTable, defaults; - if (selector == null) { - selector = 'table'; - } - if (options == null) { - options = {}; - } - if (params == null) { - params = {}; - } - if (cols == null) { - cols = []; - } - $(selector).empty(); - if (!cols.length || cols.length === 0) { - cols = collection.defaultColumns; - } - defaults = { - aaData: collection.toTableRows(cols), - aoColumns: collection.tableColumns(cols), - bDestroy: true, - bSort: false, - bProcessing: true, - bFilter: false, - bScrollInfinite: true, - bScrollCollapse: true, - sScrollY: '600px', - iDisplayLength: -1 - }; - $dataTable = $(this.el).find(selector).dataTable(_.extend(defaults, options)); - _.delay(__bind(function() { - if ($dataTable && $dataTable.length > 0) { - return $dataTable.fnAdjustColumnSizing(); - } - }, this), 1); - return $dataTable; - }; - UberView.prototype.reverseGeocode = function() { - var $el; - return ''; - $el = $(this.el); - return this.requireMaps(function() { - var geocoder; - geocoder = new google.maps.Geocoder(); - return $el.find('[data-point]').each(function() { - var $this, latLng, point; - $this = $(this); - point = JSON.parse($this.attr('data-point')); - latLng = new google.maps.LatLng(point.latitude, point.longitude); - return geocoder.geocode({ - latLng: latLng - }, function(data, status) { - if (status === google.maps.GeocoderStatus.OK) { - return $this.text(data[0].formatted_address); - } - }); - }); - }); - }; - UberView.prototype.userIdsToLinkedNames = function() { - var $el; - $el = $(this.el); - return $el.find('a[data-user-id][data-user-type]').each(function() { - var $this, user, userType; - $this = $(this); - userType = $this.attr('data-user-type') === 'user' ? 'client' : $this.attr('data-user-type'); - user = new app.models[userType]({ - id: $this.attr('data-user-id') - }); - return user.fetch({ - success: function(user) { - return $this.html(app.helpers.linkedName(user)).attr('href', "!/" + user.role + "s/" + user.id); - }, - error: function() { - if ($this.attr('data-user-type') === 'user') { - user = new app.models['driver']({ - id: $this.attr('data-user-id') - }); - return user.fetch({ - success: function(user) { - return $this.html(app.helpers.linkedName(user)).attr('href', "!/driver/" + user.id); - } - }); - } - } - }); - }); - }; - UberView.prototype.selectedCity = function() { - var $selected, city, cityFilter; - cityFilter = $.cookie('city_filter'); - $selected = $("#city_filter option[value=" + cityFilter + "]"); - if (city_filter && $selected.length) { - return city = { - lat: parseFloat($selected.attr('data-lat')), - lng: parseFloat($selected.attr('data-lng')), - timezone: $selected.attr('data-timezone') - }; - } else { - return city = { - lat: 37.775, - lng: -122.45, - timezone: 'Etc/UTC' - }; - } - }; - UberView.prototype.updateModel = function(e, success) { - var $el, attrs, model, self; - e.preventDefault(); - $el = $(e.currentTarget); - self = this; - model = new this.model.__proto__.constructor({ - id: this.model.id - }); - attrs = {}; - $el.find('[name]').each(function() { - var $this; - $this = $(this); - return attrs["" + ($this.attr('name'))] = $this.val(); - }); - self.model.set(attrs); - $el.find('span.error').text(''); - return model.save(attrs, { - complete: function(xhr) { - var response; - response = JSON.parse(xhr.responseText); - switch (xhr.status) { - case 200: - self.model = model; - $el.find('[name]').val(''); - if (success) { - return success(); - } - break; - case 406: - return _.each(response, function(error, field) { - return $el.find("[name=" + field + "]").parent().find('span.error').text(error); - }); - default: - return this.unanticipatedError(response); - } - } - }); - }; - UberView.prototype.autoUpdateModel = function(e) { - var $el, arg, model, self, val; - $el = $(e.currentTarget); - val = $el.val(); - self = this; - if (val !== this.model.get($el.attr('id'))) { - arg = {}; - arg[$el.attr('id')] = $el.is(':checkbox') ? $el.is(':checked') ? 1 : 0 : val; - $('.editable span').empty(); - this.model.set(arg); - model = new this.model.__proto__.constructor({ - id: this.model.id - }); - return model.save(arg, { - complete: function(xhr) { - var key, response, _i, _len, _ref, _results; - response = JSON.parse(xhr.responseText); - switch (xhr.status) { - case 200: - self.flash('success', 'Saved!'); - return $el.blur(); - case 406: - self.flash('error', 'That was not Uber.'); - _ref = _.keys(response); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - _results.push($el.parent().find('span').html(response[key])); - } - return _results; - break; - default: - return self.unanticipatedError; - } - } - }); - } - }; - UberView.prototype.unanticipatedError = function(response) { - return self.flash('error', response); - }; - UberView.prototype.flash = function(type, text) { - var $banner; - $banner = $("." + type); - $banner.find('p').text(text).end().css('border', '1px solid #999').animate({ - top: 0 - }, 500); - return setTimeout(function() { - return $banner.animate({ - top: -$banner.outerHeight() - }, 500); - }, 3000); - }; - UberView.prototype.requireMaps = function(callback) { - if (typeof google !== 'undefined' && google.maps) { - return callback(); - } else { - return $.getScript("https://www.google.com/jsapi?key=" + CONFIG.googleJsApiKey, function() { - return google.load('maps', 3, { - callback: callback, - other_params: 'sensor=false&language=en' - }); - }); - } - }; - UberView.prototype.select_drop_down = function(model, key) { - var value; - value = model.get(key); - if (value) { - return $("select[id='" + key + "'] option[value='" + value + "']").attr('selected', 'selected'); - } - }; - UberView.prototype.processDocumentUpload = function(e) { - var $fi, $form, arbData, curDate, data, expDate, expM, expY, expiration, fileElementId, invalid; - e.preventDefault(); - $form = $(e.currentTarget); - $fi = $("input[type=file]", $form); - $(".validationError").removeClass("validationError"); - if (!$fi.val()) { - return $fi.addClass("validationError"); - } else { - fileElementId = $fi.attr('id'); - expY = $("select[name=expiration-year]", $form).val(); - expM = $("select[name=expiration-month]", $form).val(); - invalid = false; - if (expY && expM) { - expDate = new Date(expY, expM, 28); - curDate = new Date(); - if (expDate < curDate) { - invalid = true; - $(".expiration", $form).addClass("validationError"); - } - expiration = "" + expY + "-" + expM + "-28T23:59:59Z"; - } - arbData = {}; - $(".arbitraryField", $form).each(__bind(function(i, e) { - arbData[$(e).attr('name')] = $(e).val(); - if ($(e).val() === "") { - invalid = true; - return $(e).addClass("validationError"); - } - }, this)); - if (!invalid) { - data = { - token: $.cookie('token') || USER.get('token'), - name: $("input[name=fileName]", $form).val(), - meta: escape(JSON.stringify(arbData)), - user_id: $("input[name=driver_id]", $form).val(), - vehicle_id: $("input[name=vehicle_id]", $form).val() - }; - if (expiration) { - data['expiration'] = expiration; - } - $("#spinner").show(); - return $.ajaxFileUpload({ - url: '/api/documents', - secureuri: false, - fileElementId: fileElementId, - data: data, - complete: __bind(function(resp, status) { - var key, _i, _len, _ref, _results; - $("#spinner").hide(); - if (status === "success") { - if (this.model) { - this.model.refetch(); - } else { - USER.refetch(); - } - } - if (status === "error") { - _ref = _.keys(resp); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - key = _ref[_i]; - _results.push($("*[name=" + key + "]", $form).addClass("validationError")); - } - return _results; - } - }, this) - }); - } - } - }; - return UberView; - })(); -}).call(this); -}, "web-lib/views/footer": function(exports, require, module) {(function() { - var footerTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - footerTemplate = require('web-lib/templates/footer'); - exports.SharedFooterView = (function() { - __extends(SharedFooterView, Backbone.View); - function SharedFooterView() { - SharedFooterView.__super__.constructor.apply(this, arguments); - } - SharedFooterView.prototype.id = 'footer_view'; - SharedFooterView.prototype.events = { - 'click .language': 'intl_set_cookie_locale' - }; - SharedFooterView.prototype.render = function() { - $(this.el).html(footerTemplate()); - this.delegateEvents(); - return this; - }; - SharedFooterView.prototype.intl_set_cookie_locale = function(e) { - var _ref; - i18n.setLocale(e != null ? (_ref = e.srcElement) != null ? _ref.id : void 0 : void 0); - return location.reload(); - }; - return SharedFooterView; - })(); -}).call(this); -}}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/embed-tokens.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/embed-tokens.js deleted file mode 100755 index 61307eeb..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/embed-tokens.js +++ /dev/null @@ -1,15 +0,0 @@ -#! /usr/bin/env node - -global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util"); -var fs = require("fs"); -var uglify = require("uglify-js"), // symlink ~/.node_libraries/uglify-js.js to ../uglify-js.js - jsp = uglify.parser, - pro = uglify.uglify; - -var code = fs.readFileSync("embed-tokens.js", "utf8").replace(/^#.*$/mg, ""); -var ast = jsp.parse(code, null, true); - -// trololo -function fooBar() {} - -console.log(sys.inspect(ast, null, null)); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto.js deleted file mode 100644 index 945960c2..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto.js +++ /dev/null @@ -1,26 +0,0 @@ -function unique(arqw) { - var a = [], i, j - outer: for (i = 0; i < arqw.length; i++) { - for (j = 0; j < a.length; j++) { - if (a[j] == arqw[i]) { - continue outer - } - } - a[a.length] = arqw[i] - } - return a -} - - -function unique(arqw) { - var crap = [], i, j - outer: for (i = 0; i < arqw.length; i++) { - for (j = 0; j < crap.length; j++) { - if (crap[j] == arqw[i]) { - continue outer - } - } - crap[crap.length] = arqw[i] - } - return crap -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto2.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto2.js deleted file mode 100644 index d13b2bc0..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/goto2.js +++ /dev/null @@ -1,8 +0,0 @@ -function q(qooo) { - var a; - foo: for(;;) { - a++; - if (something) break foo; - return qooo; - } -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/hoist.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/hoist.js deleted file mode 100644 index 4bf2b94d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/hoist.js +++ /dev/null @@ -1,33 +0,0 @@ -function foo(arg1, arg2, arg3, arg4, arg5, arg6) { - var a = 5; - { - var d = 10, mak = 20, buz = 30; - var q = buz * 2; - } - if (moo) { - var a, b, c; - } - for (var arg1 = 0, d = 20; arg1 < 10; ++arg1) - console.log(arg3); - for (var i in mak) {} - for (j in d) {} - var d; - - function test() { - - }; - - //test(); - - (function moo(first, second){ - console.log(first); - })(1); - - (function moo(first, second){ - console.log(moo()); - })(1); -} - - -var foo; -var bar; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument.js deleted file mode 100644 index c6a9d798..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument.js +++ /dev/null @@ -1,97 +0,0 @@ -// sample on how to use the parser and walker API to instrument some code - -var jsp = require("uglify-js").parser; -var pro = require("uglify-js").uglify; - -function instrument(code) { - var ast = jsp.parse(code, false, true); // true for the third arg specifies that we want - // to have start/end tokens embedded in the - // statements - var w = pro.ast_walker(); - - // we're gonna need this to push elements that we're currently looking at, to avoid - // endless recursion. - var analyzing = []; - function do_stat() { - var ret; - if (this[0].start && analyzing.indexOf(this) < 0) { - // without the `analyzing' hack, w.walk(this) would re-enter here leading - // to infinite recursion - analyzing.push(this); - ret = [ "splice", // XXX: "block" is safer - [ [ "stat", - [ "call", [ "name", "trace" ], - [ [ "string", this[0].toString() ], - [ "num", this[0].start.line ], - [ "num", this[0].start.col ], - [ "num", this[0].end.line ], - [ "num", this[0].end.col ]]]], - w.walk(this) ]]; - analyzing.pop(this); - } - return ret; - }; - var new_ast = w.with_walkers({ - "stat" : do_stat, - "label" : do_stat, - "break" : do_stat, - "continue" : do_stat, - "debugger" : do_stat, - "var" : do_stat, - "const" : do_stat, - "return" : do_stat, - "throw" : do_stat, - "try" : do_stat, - "defun" : do_stat, - "if" : do_stat, - "while" : do_stat, - "do" : do_stat, - "for" : do_stat, - "for-in" : do_stat, - "switch" : do_stat, - "with" : do_stat - }, function(){ - return w.walk(ast); - }); - return pro.gen_code(new_ast, { beautify: true }); -} - - - - -////// test code follows. - -var code = instrument(test.toString()); -console.log(code); - -function test() { - // simple stats - a = 5; - c += a + b; - "foo"; - - // var - var foo = 5; - const bar = 6, baz = 7; - - // switch block. note we can't track case lines the same way. - switch ("foo") { - case "foo": - return 1; - case "bar": - return 2; - } - - // for/for in - for (var i = 0; i < 5; ++i) { - console.log("Hello " + i); - } - for (var i in [ 1, 2, 3]) { - console.log(i); - } - - // note however that the following is broken. I guess we - // should add the block brackets in this case... - for (var i = 0; i < 5; ++i) - console.log("foo"); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument2.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument2.js deleted file mode 100644 index 6aee5f3f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/instrument2.js +++ /dev/null @@ -1,138 +0,0 @@ -// sample on how to use the parser and walker API to instrument some code - -var jsp = require("uglify-js").parser; -var pro = require("uglify-js").uglify; - -function instrument(code) { - var ast = jsp.parse(code, false, true); // true for the third arg specifies that we want - // to have start/end tokens embedded in the - // statements - var w = pro.ast_walker(); - - function trace (line, comment) { - var code = pro.gen_code(line, { beautify: true }); - var data = line[0] - - var args = [] - if (!comment) comment = "" - if (typeof data === "object") { - code = code.split(/\n/).shift() - args = [ [ "string", data.toString() ], - [ "string", code ], - [ "num", data.start.line ], - [ "num", data.start.col ], - [ "num", data.end.line ], - [ "num", data.end.col ]] - } else { - args = [ [ "string", data ], - [ "string", code ]] - - } - return [ "call", [ "name", "trace" ], args ]; - } - - // we're gonna need this to push elements that we're currently looking at, to avoid - // endless recursion. - var analyzing = []; - function do_stat() { - var ret; - if (this[0].start && analyzing.indexOf(this) < 0) { - // without the `analyzing' hack, w.walk(this) would re-enter here leading - // to infinite recursion - analyzing.push(this); - ret = [ "splice", - [ [ "stat", trace(this) ], - w.walk(this) ]]; - analyzing.pop(this); - } - return ret; - } - - function do_cond(c, t, f) { - return [ this[0], w.walk(c), - ["seq", trace(t), w.walk(t) ], - ["seq", trace(f), w.walk(f) ]]; - } - - function do_binary(c, l, r) { - if (c !== "&&" && c !== "||") { - return [this[0], c, w.walk(l), w.walk(r)]; - } - return [ this[0], c, - ["seq", trace(l), w.walk(l) ], - ["seq", trace(r), w.walk(r) ]]; - } - - var new_ast = w.with_walkers({ - "stat" : do_stat, - "label" : do_stat, - "break" : do_stat, - "continue" : do_stat, - "debugger" : do_stat, - "var" : do_stat, - "const" : do_stat, - "return" : do_stat, - "throw" : do_stat, - "try" : do_stat, - "defun" : do_stat, - "if" : do_stat, - "while" : do_stat, - "do" : do_stat, - "for" : do_stat, - "for-in" : do_stat, - "switch" : do_stat, - "with" : do_stat, - "conditional" : do_cond, - "binary" : do_binary - }, function(){ - return w.walk(ast); - }); - return pro.gen_code(new_ast, { beautify: true }); -} - - -////// test code follows. - -var code = instrument(test.toString()); -console.log(code); - -function test() { - // simple stats - a = 5; - c += a + b; - "foo"; - - // var - var foo = 5; - const bar = 6, baz = 7; - - // switch block. note we can't track case lines the same way. - switch ("foo") { - case "foo": - return 1; - case "bar": - return 2; - } - - // for/for in - for (var i = 0; i < 5; ++i) { - console.log("Hello " + i); - } - for (var i in [ 1, 2, 3]) { - console.log(i); - } - - for (var i = 0; i < 5; ++i) - console.log("foo"); - - for (var i = 0; i < 5; ++i) { - console.log("foo"); - } - - var k = plurp() ? 1 : 0; - var x = a ? doX(y) && goZoo("zoo") - : b ? blerg({ x: y }) - : null; - - var x = X || Y; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/liftvars.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/liftvars.js deleted file mode 100644 index 2f4b7fe2..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/liftvars.js +++ /dev/null @@ -1,8 +0,0 @@ -var UNUSED_VAR1 = 19; - -function main() { - var unused_var2 = 20; - alert(100); -} - -main(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/test.js deleted file mode 100755 index f295fba8..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/test.js +++ /dev/null @@ -1,30 +0,0 @@ -#! /usr/bin/env node - -global.sys = require(/^v0\.[012]/.test(process.version) ? "sys" : "util"); -var fs = require("fs"); -var uglify = require("uglify-js"), // symlink ~/.node_libraries/uglify-js.js to ../uglify-js.js - jsp = uglify.parser, - pro = uglify.uglify; - -var code = fs.readFileSync("hoist.js", "utf8"); -var ast = jsp.parse(code); - -ast = pro.ast_lift_variables(ast); - -var w = pro.ast_walker(); -ast = w.with_walkers({ - "function": function() { - var node = w.dive(this); // walk depth first - console.log(pro.gen_code(node, { beautify: true })); - return node; - }, - "name": function(name) { - return [ this[0], "X" ]; - } -}, function(){ - return w.walk(ast); -}); - -console.log(pro.gen_code(ast, { - beautify: true -})); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs.js deleted file mode 100644 index 0d5b7e0e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs.js +++ /dev/null @@ -1,3930 +0,0 @@ -/** - * @fileoverview - * - * JsWorld - * - *

    Javascript library for localised formatting and parsing of: - *

      - *
    • Numbers - *
    • Dates and times - *
    • Currency - *
    - * - *

    The library classes are configured with standard POSIX locale definitions - * derived from Unicode's Common Locale Data Repository (CLDR). - * - *

    Website: JsWorld - * - * @author Vladimir Dzhuvinov - * @version 2.5 (2011-12-23) - */ - - - -/** - * @namespace Namespace container for the JsWorld library objects. - */ -jsworld = {}; - - -/** - * @function - * - * @description Formats a JavaScript Date object as an ISO-8601 date/time - * string. - * - * @param {Date} [d] A valid JavaScript Date object. If undefined the - * current date/time will be used. - * @param {Boolean} [withTZ] Include timezone offset, default false. - * - * @returns {String} The date/time formatted as YYYY-MM-DD HH:MM:SS. - */ -jsworld.formatIsoDateTime = function(d, withTZ) { - - if (typeof d === "undefined") - d = new Date(); // now - - if (typeof withTZ === "undefined") - withTZ = false; - - var s = jsworld.formatIsoDate(d) + " " + jsworld.formatIsoTime(d); - - if (withTZ) { - - var diff = d.getHours() - d.getUTCHours(); - var hourDiff = Math.abs(diff); - - var minuteUTC = d.getUTCMinutes(); - var minute = d.getMinutes(); - - if (minute != minuteUTC && minuteUTC < 30 && diff < 0) - hourDiff--; - - if (minute != minuteUTC && minuteUTC > 30 && diff > 0) - hourDiff--; - - var minuteDiff; - if (minute != minuteUTC) - minuteDiff = ":30"; - else - minuteDiff = ":00"; - - var timezone; - if (hourDiff < 10) - timezone = "0" + hourDiff + minuteDiff; - - else - timezone = "" + hourDiff + minuteDiff; - - if (diff < 0) - timezone = "-" + timezone; - - else - timezone = "+" + timezone; - - s = s + timezone; - } - - return s; -}; - - -/** - * @function - * - * @description Formats a JavaScript Date object as an ISO-8601 date string. - * - * @param {Date} [d] A valid JavaScript Date object. If undefined the current - * date will be used. - * - * @returns {String} The date formatted as YYYY-MM-DD. - */ -jsworld.formatIsoDate = function(d) { - - if (typeof d === "undefined") - d = new Date(); // now - - var year = d.getFullYear(); - var month = d.getMonth() + 1; - var day = d.getDate(); - - return year + "-" + jsworld._zeroPad(month, 2) + "-" + jsworld._zeroPad(day, 2); -}; - - -/** - * @function - * - * @description Formats a JavaScript Date object as an ISO-8601 time string. - * - * @param {Date} [d] A valid JavaScript Date object. If undefined the current - * time will be used. - * - * @returns {String} The time formatted as HH:MM:SS. - */ -jsworld.formatIsoTime = function(d) { - - if (typeof d === "undefined") - d = new Date(); // now - - var hour = d.getHours(); - var minute = d.getMinutes(); - var second = d.getSeconds(); - - return jsworld._zeroPad(hour, 2) + ":" + jsworld._zeroPad(minute, 2) + ":" + jsworld._zeroPad(second, 2); -}; - - -/** - * @function - * - * @description Parses an ISO-8601 formatted date/time string to a JavaScript - * Date object. - * - * @param {String} isoDateTimeVal An ISO-8601 formatted date/time string. - * - *

    Accepted formats: - * - *

      - *
    • YYYY-MM-DD HH:MM:SS - *
    • YYYYMMDD HHMMSS - *
    • YYYY-MM-DD HHMMSS - *
    • YYYYMMDD HH:MM:SS - *
    - * - * @returns {Date} The corresponding Date object. - * - * @throws Error on a badly formatted date/time string or on a invalid date. - */ -jsworld.parseIsoDateTime = function(isoDateTimeVal) { - - if (typeof isoDateTimeVal != "string") - throw "Error: The parameter must be a string"; - - // First, try to match "YYYY-MM-DD HH:MM:SS" format - var matches = isoDateTimeVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/); - - // If unsuccessful, try to match "YYYYMMDD HHMMSS" format - if (matches === null) - matches = isoDateTimeVal.match(/^(\d\d\d\d)(\d\d)(\d\d)[T ](\d\d)(\d\d)(\d\d)/); - - // ... try to match "YYYY-MM-DD HHMMSS" format - if (matches === null) - matches = isoDateTimeVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d)(\d\d)(\d\d)/); - - // ... try to match "YYYYMMDD HH:MM:SS" format - if (matches === null) - matches = isoDateTimeVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/); - - // Report bad date/time string - if (matches === null) - throw "Error: Invalid ISO-8601 date/time string"; - - // Force base 10 parse int as some values may have leading zeros! - // (to avoid implicit octal base conversion) - var year = parseInt(matches[1], 10); - var month = parseInt(matches[2], 10); - var day = parseInt(matches[3], 10); - - var hour = parseInt(matches[4], 10); - var mins = parseInt(matches[5], 10); - var secs = parseInt(matches[6], 10); - - // Simple value range check, leap years not checked - // Note: the originial ISO time spec for leap hours (24:00:00) and seconds (00:00:60) is not supported - if (month < 1 || month > 12 || - day < 1 || day > 31 || - hour < 0 || hour > 23 || - mins < 0 || mins > 59 || - secs < 0 || secs > 59 ) - - throw "Error: Invalid ISO-8601 date/time value"; - - var d = new Date(year, month - 1, day, hour, mins, secs); - - // Check if the input date was valid - // (JS Date does automatic forward correction) - if (d.getDate() != day || d.getMonth() +1 != month) - throw "Error: Invalid date"; - - return d; -}; - - -/** - * @function - * - * @description Parses an ISO-8601 formatted date string to a JavaScript - * Date object. - * - * @param {String} isoDateVal An ISO-8601 formatted date string. - * - *

    Accepted formats: - * - *

      - *
    • YYYY-MM-DD - *
    • YYYYMMDD - *
    - * - * @returns {Date} The corresponding Date object. - * - * @throws Error on a badly formatted date string or on a invalid date. - */ -jsworld.parseIsoDate = function(isoDateVal) { - - if (typeof isoDateVal != "string") - throw "Error: The parameter must be a string"; - - // First, try to match "YYYY-MM-DD" format - var matches = isoDateVal.match(/^(\d\d\d\d)-(\d\d)-(\d\d)/); - - // If unsuccessful, try to match "YYYYMMDD" format - if (matches === null) - matches = isoDateVal.match(/^(\d\d\d\d)(\d\d)(\d\d)/); - - // Report bad date/time string - if (matches === null) - throw "Error: Invalid ISO-8601 date string"; - - // Force base 10 parse int as some values may have leading zeros! - // (to avoid implicit octal base conversion) - var year = parseInt(matches[1], 10); - var month = parseInt(matches[2], 10); - var day = parseInt(matches[3], 10); - - // Simple value range check, leap years not checked - if (month < 1 || month > 12 || - day < 1 || day > 31 ) - - throw "Error: Invalid ISO-8601 date value"; - - var d = new Date(year, month - 1, day); - - // Check if the input date was valid - // (JS Date does automatic forward correction) - if (d.getDate() != day || d.getMonth() +1 != month) - throw "Error: Invalid date"; - - return d; -}; - - -/** - * @function - * - * @description Parses an ISO-8601 formatted time string to a JavaScript - * Date object. - * - * @param {String} isoTimeVal An ISO-8601 formatted time string. - * - *

    Accepted formats: - * - *

      - *
    • HH:MM:SS - *
    • HHMMSS - *
    - * - * @returns {Date} The corresponding Date object, with year, month and day set - * to zero. - * - * @throws Error on a badly formatted time string. - */ -jsworld.parseIsoTime = function(isoTimeVal) { - - if (typeof isoTimeVal != "string") - throw "Error: The parameter must be a string"; - - // First, try to match "HH:MM:SS" format - var matches = isoTimeVal.match(/^(\d\d):(\d\d):(\d\d)/); - - // If unsuccessful, try to match "HHMMSS" format - if (matches === null) - matches = isoTimeVal.match(/^(\d\d)(\d\d)(\d\d)/); - - // Report bad date/time string - if (matches === null) - throw "Error: Invalid ISO-8601 date/time string"; - - // Force base 10 parse int as some values may have leading zeros! - // (to avoid implicit octal base conversion) - var hour = parseInt(matches[1], 10); - var mins = parseInt(matches[2], 10); - var secs = parseInt(matches[3], 10); - - // Simple value range check, leap years not checked - if (hour < 0 || hour > 23 || - mins < 0 || mins > 59 || - secs < 0 || secs > 59 ) - - throw "Error: Invalid ISO-8601 time value"; - - return new Date(0, 0, 0, hour, mins, secs); -}; - - -/** - * @private - * - * @description Trims leading and trailing whitespace from a string. - * - *

    Used non-regexp the method from http://blog.stevenlevithan.com/archives/faster-trim-javascript - * - * @param {String} str The string to trim. - * - * @returns {String} The trimmed string. - */ -jsworld._trim = function(str) { - - var whitespace = ' \n\r\t\f\x0b\xa0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000'; - - for (var i = 0; i < str.length; i++) { - - if (whitespace.indexOf(str.charAt(i)) === -1) { - str = str.substring(i); - break; - } - } - - for (i = str.length - 1; i >= 0; i--) { - if (whitespace.indexOf(str.charAt(i)) === -1) { - str = str.substring(0, i + 1); - break; - } - } - - return whitespace.indexOf(str.charAt(0)) === -1 ? str : ''; -}; - - - -/** - * @private - * - * @description Returns true if the argument represents a decimal number. - * - * @param {Number|String} arg The argument to test. - * - * @returns {Boolean} true if the argument represents a decimal number, - * otherwise false. - */ -jsworld._isNumber = function(arg) { - - if (typeof arg == "number") - return true; - - if (typeof arg != "string") - return false; - - // ensure string - var s = arg + ""; - - return (/^-?(\d+|\d*\.\d+)$/).test(s); -}; - - -/** - * @private - * - * @description Returns true if the argument represents a decimal integer. - * - * @param {Number|String} arg The argument to test. - * - * @returns {Boolean} true if the argument represents an integer, otherwise - * false. - */ -jsworld._isInteger = function(arg) { - - if (typeof arg != "number" && typeof arg != "string") - return false; - - // convert to string - var s = arg + ""; - - return (/^-?\d+$/).test(s); -}; - - -/** - * @private - * - * @description Returns true if the argument represents a decimal float. - * - * @param {Number|String} arg The argument to test. - * - * @returns {Boolean} true if the argument represents a float, otherwise false. - */ -jsworld._isFloat = function(arg) { - - if (typeof arg != "number" && typeof arg != "string") - return false; - - // convert to string - var s = arg + ""; - - return (/^-?\.\d+?$/).test(s); -}; - - -/** - * @private - * - * @description Checks if the specified formatting option is contained - * within the options string. - * - * @param {String} option The option to search for. - * @param {String} optionsString The options string. - * - * @returns {Boolean} true if the flag is found, else false - */ -jsworld._hasOption = function(option, optionsString) { - - if (typeof option != "string" || typeof optionsString != "string") - return false; - - if (optionsString.indexOf(option) != -1) - return true; - else - return false; -}; - - -/** - * @private - * - * @description String replacement function. - * - * @param {String} s The string to work on. - * @param {String} target The string to search for. - * @param {String} replacement The replacement. - * - * @returns {String} The new string. - */ -jsworld._stringReplaceAll = function(s, target, replacement) { - - var out; - - if (target.length == 1 && replacement.length == 1) { - // simple char/char case somewhat faster - out = ""; - - for (var i = 0; i < s.length; i++) { - - if (s.charAt(i) == target.charAt(0)) - out = out + replacement.charAt(0); - else - out = out + s.charAt(i); - } - - return out; - } - else { - // longer target and replacement strings - out = s; - - var index = out.indexOf(target); - - while (index != -1) { - - out = out.replace(target, replacement); - - index = out.indexOf(target); - } - - return out; - } -}; - - -/** - * @private - * - * @description Tests if a string starts with the specified substring. - * - * @param {String} testedString The string to test. - * @param {String} sub The string to match. - * - * @returns {Boolean} true if the test succeeds. - */ -jsworld._stringStartsWith = function (testedString, sub) { - - if (testedString.length < sub.length) - return false; - - for (var i = 0; i < sub.length; i++) { - if (testedString.charAt(i) != sub.charAt(i)) - return false; - } - - return true; -}; - - -/** - * @private - * - * @description Gets the requested precision from an options string. - * - *

    Example: ".3" returns 3 decimal places precision. - * - * @param {String} optionsString The options string. - * - * @returns {integer Number} The requested precision, -1 if not specified. - */ -jsworld._getPrecision = function (optionsString) { - - if (typeof optionsString != "string") - return -1; - - var m = optionsString.match(/\.(\d)/); - if (m) - return parseInt(m[1], 10); - else - return -1; -}; - - -/** - * @private - * - * @description Takes a decimal numeric amount (optionally as string) and - * returns its integer and fractional parts packed into an object. - * - * @param {Number|String} amount The amount, e.g. "123.45" or "-56.78" - * - * @returns {object} Parsed amount object with properties: - * {String} integer : the integer part - * {String} fraction : the fraction part - */ -jsworld._splitNumber = function (amount) { - - if (typeof amount == "number") - amount = amount + ""; - - var obj = {}; - - // remove negative sign - if (amount.charAt(0) == "-") - amount = amount.substring(1); - - // split amount into integer and decimal parts - var amountParts = amount.split("."); - if (!amountParts[1]) - amountParts[1] = ""; // we need "" instead of null - - obj.integer = amountParts[0]; - obj.fraction = amountParts[1]; - - return obj; -}; - - -/** - * @private - * - * @description Formats the integer part using the specified grouping - * and thousands separator. - * - * @param {String} intPart The integer part of the amount, as string. - * @param {String} grouping The grouping definition. - * @param {String} thousandsSep The thousands separator. - * - * @returns {String} The formatted integer part. - */ -jsworld._formatIntegerPart = function (intPart, grouping, thousandsSep) { - - // empty separator string? no grouping? - // -> return immediately with no formatting! - if (thousandsSep == "" || grouping == "-1") - return intPart; - - // turn the semicolon-separated string of integers into an array - var groupSizes = grouping.split(";"); - - // the formatted output string - var out = ""; - - // the intPart string position to process next, - // start at string end, e.g. "10000000 0) { - - // get next group size (if any, otherwise keep last) - if (groupSizes.length > 0) - size = parseInt(groupSizes.shift(), 10); - - // int parse error? - if (isNaN(size)) - throw "Error: Invalid grouping"; - - // size is -1? -> no more grouping, so just copy string remainder - if (size == -1) { - out = intPart.substring(0, pos) + out; - break; - } - - pos -= size; // move to next sep. char. position - - // position underrun? -> just copy string remainder - if (pos < 1) { - out = intPart.substring(0, pos + size) + out; - break; - } - - // extract group and apply sep. char. - out = thousandsSep + intPart.substring(pos, pos + size) + out; - } - - return out; -}; - - -/** - * @private - * - * @description Formats the fractional part to the specified decimal - * precision. - * - * @param {String} fracPart The fractional part of the amount - * @param {integer Number} precision The desired decimal precision - * - * @returns {String} The formatted fractional part. - */ -jsworld._formatFractionPart = function (fracPart, precision) { - - // append zeroes up to precision if necessary - for (var i=0; fracPart.length < precision; i++) - fracPart = fracPart + "0"; - - return fracPart; -}; - - -/** - * @private - * - * @desription Converts a number to string and pad it with leading zeroes if the - * string is shorter than length. - * - * @param {integer Number} number The number value subjected to selective padding. - * @param {integer Number} length If the number has fewer digits than this length - * apply padding. - * - * @returns {String} The formatted string. - */ -jsworld._zeroPad = function(number, length) { - - // ensure string - var s = number + ""; - - while (s.length < length) - s = "0" + s; - - return s; -}; - - -/** - * @private - * @description Converts a number to string and pads it with leading spaces if - * the string is shorter than length. - * - * @param {integer Number} number The number value subjected to selective padding. - * @param {integer Number} length If the number has fewer digits than this length - * apply padding. - * - * @returns {String} The formatted string. - */ -jsworld._spacePad = function(number, length) { - - // ensure string - var s = number + ""; - - while (s.length < length) - s = " " + s; - - return s; -}; - - - -/** - * @class - * Represents a POSIX-style locale with its numeric, monetary and date/time - * properties. Also provides a set of locale helper methods. - * - *

    The locale properties follow the POSIX standards: - * - *

    - * - * @public - * @constructor - * @description Creates a new locale object (POSIX-style) with the specified - * properties. - * - * @param {object} properties An object containing the raw locale properties: - * - * @param {String} properties.decimal_point - * - * A string containing the symbol that shall be used as the decimal - * delimiter (radix character) in numeric, non-monetary formatted - * quantities. This property cannot be omitted and cannot be set to the - * empty string. - * - * - * @param {String} properties.thousands_sep - * - * A string containing the symbol that shall be used as a separator for - * groups of digits to the left of the decimal delimiter in numeric, - * non-monetary formatted monetary quantities. - * - * - * @param {String} properties.grouping - * - * Defines the size of each group of digits in formatted non-monetary - * quantities. The operand is a sequence of integers separated by - * semicolons. Each integer specifies the number of digits in each group, - * with the initial integer defining the size of the group immediately - * preceding the decimal delimiter, and the following integers defining - * the preceding groups. If the last integer is not -1, then the size of - * the previous group (if any) shall be repeatedly used for the - * remainder of the digits. If the last integer is -1, then no further - * grouping shall be performed. - * - * - * @param {String} properties.int_curr_symbol - * - * The first three letters signify the ISO-4217 currency code, - * the fourth letter is the international symbol separation character - * (normally a space). - * - * - * @param {String} properties.currency_symbol - * - * The local shorthand currency symbol, e.g. "$" for the en_US locale - * - * - * @param {String} properties.mon_decimal_point - * - * The symbol to be used as the decimal delimiter (radix character) - * - * - * @param {String} properties.mon_thousands_sep - * - * The symbol to be used as a separator for groups of digits to the - * left of the decimal delimiter. - * - * - * @param {String} properties.mon_grouping - * - * A string that defines the size of each group of digits. The - * operand is a sequence of integers separated by semicolons (";"). - * Each integer specifies the number of digits in each group, with the - * initial integer defining the size of the group preceding the - * decimal delimiter, and the following integers defining the - * preceding groups. If the last integer is not -1, then the size of - * the previous group (if any) must be repeatedly used for the - * remainder of the digits. If the last integer is -1, then no - * further grouping is to be performed. - * - * - * @param {String} properties.positive_sign - * - * The string to indicate a non-negative monetary amount. - * - * - * @param {String} properties.negative_sign - * - * The string to indicate a negative monetary amount. - * - * - * @param {integer Number} properties.frac_digits - * - * An integer representing the number of fractional digits (those to - * the right of the decimal delimiter) to be written in a formatted - * monetary quantity using currency_symbol. - * - * - * @param {integer Number} properties.int_frac_digits - * - * An integer representing the number of fractional digits (those to - * the right of the decimal delimiter) to be written in a formatted - * monetary quantity using int_curr_symbol. - * - * - * @param {integer Number} properties.p_cs_precedes - * - * An integer set to 1 if the currency_symbol precedes the value for a - * monetary quantity with a non-negative value, and set to 0 if the - * symbol succeeds the value. - * - * - * @param {integer Number} properties.n_cs_precedes - * - * An integer set to 1 if the currency_symbol precedes the value for a - * monetary quantity with a negative value, and set to 0 if the symbol - * succeeds the value. - * - * - * @param {integer Number} properties.p_sep_by_space - * - * Set to a value indicating the separation of the currency_symbol, - * the sign string, and the value for a non-negative formatted monetary - * quantity: - * - *

    0 No space separates the currency symbol and value.

    - * - *

    1 If the currency symbol and sign string are adjacent, a space - * separates them from the value; otherwise, a space separates - * the currency symbol from the value.

    - * - *

    2 If the currency symbol and sign string are adjacent, a space - * separates them; otherwise, a space separates the sign string - * from the value.

    - * - * - * @param {integer Number} properties.n_sep_by_space - * - * Set to a value indicating the separation of the currency_symbol, - * the sign string, and the value for a negative formatted monetary - * quantity. Rules same as for p_sep_by_space. - * - * - * @param {integer Number} properties.p_sign_posn - * - * An integer set to a value indicating the positioning of the - * positive_sign for a monetary quantity with a non-negative value: - * - *

    0 Parentheses enclose the quantity and the currency_symbol.

    - * - *

    1 The sign string precedes the quantity and the currency_symbol.

    - * - *

    2 The sign string succeeds the quantity and the currency_symbol.

    - * - *

    3 The sign string precedes the currency_symbol.

    - * - *

    4 The sign string succeeds the currency_symbol.

    - * - * - * @param {integer Number} properties.n_sign_posn - * - * An integer set to a value indicating the positioning of the - * negative_sign for a negative formatted monetary quantity. Rules same - * as for p_sign_posn. - * - * - * @param {integer Number} properties.int_p_cs_precedes - * - * An integer set to 1 if the int_curr_symbol precedes the value for a - * monetary quantity with a non-negative value, and set to 0 if the - * symbol succeeds the value. - * - * - * @param {integer Number} properties.int_n_cs_precedes - * - * An integer set to 1 if the int_curr_symbol precedes the value for a - * monetary quantity with a negative value, and set to 0 if the symbol - * succeeds the value. - * - * - * @param {integer Number} properties.int_p_sep_by_space - * - * Set to a value indicating the separation of the int_curr_symbol, - * the sign string, and the value for a non-negative internationally - * formatted monetary quantity. Rules same as for p_sep_by_space. - * - * - * @param {integer Number} properties.int_n_sep_by_space - * - * Set to a value indicating the separation of the int_curr_symbol, - * the sign string, and the value for a negative internationally - * formatted monetary quantity. Rules same as for p_sep_by_space. - * - * - * @param {integer Number} properties.int_p_sign_posn - * - * An integer set to a value indicating the positioning of the - * positive_sign for a positive monetary quantity formatted with the - * international format. Rules same as for p_sign_posn. - * - * - * @param {integer Number} properties.int_n_sign_posn - * - * An integer set to a value indicating the positioning of the - * negative_sign for a negative monetary quantity formatted with the - * international format. Rules same as for p_sign_posn. - * - * - * @param {String[] | String} properties.abday - * - * The abbreviated weekday names, corresponding to the %a conversion - * specification. The property must be either an array of 7 strings or - * a string consisting of 7 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the abbreviated name - * of the day corresponding to Sunday, the second the abbreviated name - * of the day corresponding to Monday, and so on. - * - * - * @param {String[] | String} properties.day - * - * The full weekday names, corresponding to the %A conversion - * specification. The property must be either an array of 7 strings or - * a string consisting of 7 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the full name of the - * day corresponding to Sunday, the second the full name of the day - * corresponding to Monday, and so on. - * - * - * @param {String[] | String} properties.abmon - * - * The abbreviated month names, corresponding to the %b conversion - * specification. The property must be either an array of 12 strings or - * a string consisting of 12 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the abbreviated name - * of the first month of the year (January), the second the abbreviated - * name of the second month, and so on. - * - * - * @param {String[] | String} properties.mon - * - * The full month names, corresponding to the %B conversion - * specification. The property must be either an array of 12 strings or - * a string consisting of 12 semicolon-separated substrings, each - * surrounded by double-quotes. The first must be the full name of the - * first month of the year (January), the second the full name of the second - * month, and so on. - * - * - * @param {String} properties.d_fmt - * - * The appropriate date representation. The string may contain any - * combination of characters and conversion specifications (%). - * - * - * @param {String} properties.t_fmt - * - * The appropriate time representation. The string may contain any - * combination of characters and conversion specifications (%). - * - * - * @param {String} properties.d_t_fmt - * - * The appropriate date and time representation. The string may contain - * any combination of characters and conversion specifications (%). - * - * - * @param {String[] | String} properties.am_pm - * - * The appropriate representation of the ante-meridiem and post-meridiem - * strings, corresponding to the %p conversion specification. The property - * must be either an array of 2 strings or a string consisting of 2 - * semicolon-separated substrings, each surrounded by double-quotes. - * The first string must represent the ante-meridiem designation, the - * last string the post-meridiem designation. - * - * - * @throws @throws Error on a undefined or invalid locale property. - */ -jsworld.Locale = function(properties) { - - - /** - * @private - * - * @description Identifies the class for internal library purposes. - */ - this._className = "jsworld.Locale"; - - - /** - * @private - * - * @description Parses a day or month name definition list, which - * could be a ready JS array, e.g. ["Mon", "Tue", "Wed"...] or - * it could be a string formatted according to the classic POSIX - * definition e.g. "Mon";"Tue";"Wed";... - * - * @param {String[] | String} namesAn array or string defining - * the week/month names. - * @param {integer Number} expectedItems The number of expected list - * items, e.g. 7 for weekdays, 12 for months. - * - * @returns {String[]} The parsed (and checked) items. - * - * @throws Error on missing definition, unexpected item count or - * missing double-quotes. - */ - this._parseList = function(names, expectedItems) { - - var array = []; - - if (names == null) { - throw "Names not defined"; - } - else if (typeof names == "object") { - // we got a ready array - array = names; - } - else if (typeof names == "string") { - // we got the names in the classic POSIX form, do parse - array = names.split(";", expectedItems); - - for (var i = 0; i < array.length; i++) { - // check for and strip double quotes - if (array[i][0] == "\"" && array[i][array[i].length - 1] == "\"") - array[i] = array[i].slice(1, -1); - else - throw "Missing double quotes"; - } - } - else { - throw "Names must be an array or a string"; - } - - if (array.length != expectedItems) - throw "Expected " + expectedItems + " items, got " + array.length; - - return array; - }; - - - /** - * @private - * - * @description Validates a date/time format string, such as "H:%M:%S". - * Checks that the argument is of type "string" and is not empty. - * - * @param {String} formatString The format string. - * - * @returns {String} The validated string. - * - * @throws Error on null or empty string. - */ - this._validateFormatString = function(formatString) { - - if (typeof formatString == "string" && formatString.length > 0) - return formatString; - else - throw "Empty or no string"; - }; - - - // LC_NUMERIC - - if (properties == null || typeof properties != "object") - throw "Error: Invalid/missing locale properties"; - - - if (typeof properties.decimal_point != "string") - throw "Error: Invalid/missing decimal_point property"; - - this.decimal_point = properties.decimal_point; - - - if (typeof properties.thousands_sep != "string") - throw "Error: Invalid/missing thousands_sep property"; - - this.thousands_sep = properties.thousands_sep; - - - if (typeof properties.grouping != "string") - throw "Error: Invalid/missing grouping property"; - - this.grouping = properties.grouping; - - - // LC_MONETARY - - if (typeof properties.int_curr_symbol != "string") - throw "Error: Invalid/missing int_curr_symbol property"; - - if (! /[A-Za-z]{3}.?/.test(properties.int_curr_symbol)) - throw "Error: Invalid int_curr_symbol property"; - - this.int_curr_symbol = properties.int_curr_symbol; - - - if (typeof properties.currency_symbol != "string") - throw "Error: Invalid/missing currency_symbol property"; - - this.currency_symbol = properties.currency_symbol; - - - if (typeof properties.frac_digits != "number" && properties.frac_digits < 0) - throw "Error: Invalid/missing frac_digits property"; - - this.frac_digits = properties.frac_digits; - - - // may be empty string/null for currencies with no fractional part - if (properties.mon_decimal_point === null || properties.mon_decimal_point == "") { - - if (this.frac_digits > 0) - throw "Error: Undefined mon_decimal_point property"; - else - properties.mon_decimal_point = ""; - } - - if (typeof properties.mon_decimal_point != "string") - throw "Error: Invalid/missing mon_decimal_point property"; - - this.mon_decimal_point = properties.mon_decimal_point; - - - if (typeof properties.mon_thousands_sep != "string") - throw "Error: Invalid/missing mon_thousands_sep property"; - - this.mon_thousands_sep = properties.mon_thousands_sep; - - - if (typeof properties.mon_grouping != "string") - throw "Error: Invalid/missing mon_grouping property"; - - this.mon_grouping = properties.mon_grouping; - - - if (typeof properties.positive_sign != "string") - throw "Error: Invalid/missing positive_sign property"; - - this.positive_sign = properties.positive_sign; - - - if (typeof properties.negative_sign != "string") - throw "Error: Invalid/missing negative_sign property"; - - this.negative_sign = properties.negative_sign; - - - - if (properties.p_cs_precedes !== 0 && properties.p_cs_precedes !== 1) - throw "Error: Invalid/missing p_cs_precedes property, must be 0 or 1"; - - this.p_cs_precedes = properties.p_cs_precedes; - - - if (properties.n_cs_precedes !== 0 && properties.n_cs_precedes !== 1) - throw "Error: Invalid/missing n_cs_precedes, must be 0 or 1"; - - this.n_cs_precedes = properties.n_cs_precedes; - - - if (properties.p_sep_by_space !== 0 && - properties.p_sep_by_space !== 1 && - properties.p_sep_by_space !== 2) - throw "Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2"; - - this.p_sep_by_space = properties.p_sep_by_space; - - - if (properties.n_sep_by_space !== 0 && - properties.n_sep_by_space !== 1 && - properties.n_sep_by_space !== 2) - throw "Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2"; - - this.n_sep_by_space = properties.n_sep_by_space; - - - if (properties.p_sign_posn !== 0 && - properties.p_sign_posn !== 1 && - properties.p_sign_posn !== 2 && - properties.p_sign_posn !== 3 && - properties.p_sign_posn !== 4) - throw "Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.p_sign_posn = properties.p_sign_posn; - - - if (properties.n_sign_posn !== 0 && - properties.n_sign_posn !== 1 && - properties.n_sign_posn !== 2 && - properties.n_sign_posn !== 3 && - properties.n_sign_posn !== 4) - throw "Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.n_sign_posn = properties.n_sign_posn; - - - if (typeof properties.int_frac_digits != "number" && properties.int_frac_digits < 0) - throw "Error: Invalid/missing int_frac_digits property"; - - this.int_frac_digits = properties.int_frac_digits; - - - if (properties.int_p_cs_precedes !== 0 && properties.int_p_cs_precedes !== 1) - throw "Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1"; - - this.int_p_cs_precedes = properties.int_p_cs_precedes; - - - if (properties.int_n_cs_precedes !== 0 && properties.int_n_cs_precedes !== 1) - throw "Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1"; - - this.int_n_cs_precedes = properties.int_n_cs_precedes; - - - if (properties.int_p_sep_by_space !== 0 && - properties.int_p_sep_by_space !== 1 && - properties.int_p_sep_by_space !== 2) - throw "Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2"; - - this.int_p_sep_by_space = properties.int_p_sep_by_space; - - - if (properties.int_n_sep_by_space !== 0 && - properties.int_n_sep_by_space !== 1 && - properties.int_n_sep_by_space !== 2) - throw "Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2"; - - this.int_n_sep_by_space = properties.int_n_sep_by_space; - - - if (properties.int_p_sign_posn !== 0 && - properties.int_p_sign_posn !== 1 && - properties.int_p_sign_posn !== 2 && - properties.int_p_sign_posn !== 3 && - properties.int_p_sign_posn !== 4) - throw "Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_p_sign_posn = properties.int_p_sign_posn; - - - if (properties.int_n_sign_posn !== 0 && - properties.int_n_sign_posn !== 1 && - properties.int_n_sign_posn !== 2 && - properties.int_n_sign_posn !== 3 && - properties.int_n_sign_posn !== 4) - throw "Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_n_sign_posn = properties.int_n_sign_posn; - - - // LC_TIME - - if (properties == null || typeof properties != "object") - throw "Error: Invalid/missing time locale properties"; - - - // parse the supported POSIX LC_TIME properties - - // abday - try { - this.abday = this._parseList(properties.abday, 7); - } - catch (error) { - throw "Error: Invalid abday property: " + error; - } - - // day - try { - this.day = this._parseList(properties.day, 7); - } - catch (error) { - throw "Error: Invalid day property: " + error; - } - - // abmon - try { - this.abmon = this._parseList(properties.abmon, 12); - } catch (error) { - throw "Error: Invalid abmon property: " + error; - } - - // mon - try { - this.mon = this._parseList(properties.mon, 12); - } catch (error) { - throw "Error: Invalid mon property: " + error; - } - - // d_fmt - try { - this.d_fmt = this._validateFormatString(properties.d_fmt); - } catch (error) { - throw "Error: Invalid d_fmt property: " + error; - } - - // t_fmt - try { - this.t_fmt = this._validateFormatString(properties.t_fmt); - } catch (error) { - throw "Error: Invalid t_fmt property: " + error; - } - - // d_t_fmt - try { - this.d_t_fmt = this._validateFormatString(properties.d_t_fmt); - } catch (error) { - throw "Error: Invalid d_t_fmt property: " + error; - } - - // am_pm - try { - var am_pm_strings = this._parseList(properties.am_pm, 2); - this.am = am_pm_strings[0]; - this.pm = am_pm_strings[1]; - } catch (error) { - // ignore empty/null string errors - this.am = ""; - this.pm = ""; - } - - - /** - * @public - * - * @description Returns the abbreviated name of the specified weekday. - * - * @param {integer Number} [weekdayNum] An integer between 0 and 6. Zero - * corresponds to Sunday, one to Monday, etc. If omitted the - * method will return an array of all abbreviated weekday - * names. - * - * @returns {String | String[]} The abbreviated name of the specified weekday - * or an array of all abbreviated weekday names. - * - * @throws Error on invalid argument. - */ - this.getAbbreviatedWeekdayName = function(weekdayNum) { - - if (typeof weekdayNum == "undefined" || weekdayNum === null) - return this.abday; - - if (! jsworld._isInteger(weekdayNum) || weekdayNum < 0 || weekdayNum > 6) - throw "Error: Invalid weekday argument, must be an integer [0..6]"; - - return this.abday[weekdayNum]; - }; - - - /** - * @public - * - * @description Returns the name of the specified weekday. - * - * @param {integer Number} [weekdayNum] An integer between 0 and 6. Zero - * corresponds to Sunday, one to Monday, etc. If omitted the - * method will return an array of all weekday names. - * - * @returns {String | String[]} The name of the specified weekday or an - * array of all weekday names. - * - * @throws Error on invalid argument. - */ - this.getWeekdayName = function(weekdayNum) { - - if (typeof weekdayNum == "undefined" || weekdayNum === null) - return this.day; - - if (! jsworld._isInteger(weekdayNum) || weekdayNum < 0 || weekdayNum > 6) - throw "Error: Invalid weekday argument, must be an integer [0..6]"; - - return this.day[weekdayNum]; - }; - - - /** - * @public - * - * @description Returns the abbreviated name of the specified month. - * - * @param {integer Number} [monthNum] An integer between 0 and 11. Zero - * corresponds to January, one to February, etc. If omitted the - * method will return an array of all abbreviated month names. - * - * @returns {String | String[]} The abbreviated name of the specified month - * or an array of all abbreviated month names. - * - * @throws Error on invalid argument. - */ - this.getAbbreviatedMonthName = function(monthNum) { - - if (typeof monthNum == "undefined" || monthNum === null) - return this.abmon; - - if (! jsworld._isInteger(monthNum) || monthNum < 0 || monthNum > 11) - throw "Error: Invalid month argument, must be an integer [0..11]"; - - return this.abmon[monthNum]; - }; - - - /** - * @public - * - * @description Returns the name of the specified month. - * - * @param {integer Number} [monthNum] An integer between 0 and 11. Zero - * corresponds to January, one to February, etc. If omitted the - * method will return an array of all month names. - * - * @returns {String | String[]} The name of the specified month or an array - * of all month names. - * - * @throws Error on invalid argument. - */ - this.getMonthName = function(monthNum) { - - if (typeof monthNum == "undefined" || monthNum === null) - return this.mon; - - if (! jsworld._isInteger(monthNum) || monthNum < 0 || monthNum > 11) - throw "Error: Invalid month argument, must be an integer [0..11]"; - - return this.mon[monthNum]; - }; - - - - /** - * @public - * - * @description Gets the decimal delimiter (radix) character for - * numeric quantities. - * - * @returns {String} The radix character. - */ - this.getDecimalPoint = function() { - - return this.decimal_point; - }; - - - /** - * @public - * - * @description Gets the local shorthand currency symbol. - * - * @returns {String} The currency symbol. - */ - this.getCurrencySymbol = function() { - - return this.currency_symbol; - }; - - - /** - * @public - * - * @description Gets the internaltion currency symbol (ISO-4217 code). - * - * @returns {String} The international currency symbol. - */ - this.getIntCurrencySymbol = function() { - - return this.int_curr_symbol.substring(0,3); - }; - - - /** - * @public - * - * @description Gets the position of the local (shorthand) currency - * symbol relative to the amount. Assumes a non-negative amount. - * - * @returns {Boolean} True if the symbol precedes the amount, false if - * the symbol succeeds the amount. - */ - this.currencySymbolPrecedes = function() { - - if (this.p_cs_precedes == 1) - return true; - else - return false; - }; - - - /** - * @public - * - * @description Gets the position of the international (ISO-4217 code) - * currency symbol relative to the amount. Assumes a non-negative - * amount. - * - * @returns {Boolean} True if the symbol precedes the amount, false if - * the symbol succeeds the amount. - */ - this.intCurrencySymbolPrecedes = function() { - - if (this.int_p_cs_precedes == 1) - return true; - else - return false; - - }; - - - /** - * @public - * - * @description Gets the decimal delimiter (radix) for monetary - * quantities. - * - * @returns {String} The radix character. - */ - this.getMonetaryDecimalPoint = function() { - - return this.mon_decimal_point; - }; - - - /** - * @public - * - * @description Gets the number of fractional digits for local - * (shorthand) symbol formatting. - * - * @returns {integer Number} The number of fractional digits. - */ - this.getFractionalDigits = function() { - - return this.frac_digits; - }; - - - /** - * @public - * - * @description Gets the number of fractional digits for - * international (ISO-4217 code) formatting. - * - * @returns {integer Number} The number of fractional digits. - */ - this.getIntFractionalDigits = function() { - - return this.int_frac_digits; - }; -}; - - - -/** - * @class - * Class for localised formatting of numbers. - * - *

    See: - * POSIX LC_NUMERIC. - * - * - * @public - * @constructor - * @description Creates a new numeric formatter for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_NUMERIC formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.NumericFormatter = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - this.lc = locale; - - - /** - * @public - * - * @description Formats a decimal numeric value according to the preset - * locale. - * - * @param {Number|String} number The number to format. - * @param {String} [options] Options to modify the formatted output: - *

      - *
    • "^" suppress grouping - *
    • "+" force positive sign for positive amounts - *
    • "~" suppress positive/negative sign - *
    • ".n" specify decimal precision 'n' - *
    - * - * @returns {String} The formatted number. - * - * @throws "Error: Invalid input" on bad input. - */ - this.format = function(number, options) { - - if (typeof number == "string") - number = jsworld._trim(number); - - if (! jsworld._isNumber(number)) - throw "Error: The input is not a number"; - - var floatAmount = parseFloat(number, 10); - - // get the required precision - var reqPrecision = jsworld._getPrecision(options); - - // round to required precision - if (reqPrecision != -1) - floatAmount = Math.round(floatAmount * Math.pow(10, reqPrecision)) / Math.pow(10, reqPrecision); - - - // convert the float number to string and parse into - // object with properties integer and fraction - var parsedAmount = jsworld._splitNumber(String(floatAmount)); - - // format integer part with grouping chars - var formattedIntegerPart; - - if (floatAmount === 0) - formattedIntegerPart = "0"; - else - formattedIntegerPart = jsworld._hasOption("^", options) ? - parsedAmount.integer : - jsworld._formatIntegerPart(parsedAmount.integer, - this.lc.grouping, - this.lc.thousands_sep); - - // format the fractional part - var formattedFractionPart = - reqPrecision != -1 ? - jsworld._formatFractionPart(parsedAmount.fraction, reqPrecision) : - parsedAmount.fraction; - - - // join the integer and fraction parts using the decimal_point property - var formattedAmount = - formattedFractionPart.length ? - formattedIntegerPart + this.lc.decimal_point + formattedFractionPart : - formattedIntegerPart; - - // prepend sign? - if (jsworld._hasOption("~", options) || floatAmount === 0) { - // suppress both '+' and '-' signs, i.e. return abs value - return formattedAmount; - } - else { - if (jsworld._hasOption("+", options) || floatAmount < 0) { - if (floatAmount > 0) - // force '+' sign for positive amounts - return "+" + formattedAmount; - else if (floatAmount < 0) - // prepend '-' sign - return "-" + formattedAmount; - else - // zero case - return formattedAmount; - } - else { - // positive amount with no '+' sign - return formattedAmount; - } - } - }; -}; - - -/** - * @class - * Class for localised formatting of dates and times. - * - *

    See: - * POSIX LC_TIME. - * - * @public - * @constructor - * @description Creates a new date/time formatter for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_TIME formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.DateTimeFormatter = function(locale) { - - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance."; - - this.lc = locale; - - - /** - * @public - * - * @description Formats a date according to the preset locale. - * - * @param {Date|String} date A valid Date object instance or a string - * containing a valid ISO-8601 formatted date, e.g. "2010-31-03" - * or "2010-03-31 23:59:59". - * - * @returns {String} The formatted date - * - * @throws Error on invalid date argument - */ - this.formatDate = function(date) { - - var d = null; - - if (typeof date == "string") { - // assume ISO-8601 date string - try { - d = jsworld.parseIsoDate(date); - } catch (error) { - // try full ISO-8601 date/time string - d = jsworld.parseIsoDateTime(date); - } - } - else if (date !== null && typeof date == "object") { - // assume ready Date object - d = date; - } - else { - throw "Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"; - } - - return this._applyFormatting(d, this.lc.d_fmt); - }; - - - /** - * @public - * - * @description Formats a time according to the preset locale. - * - * @param {Date|String} date A valid Date object instance or a string - * containing a valid ISO-8601 formatted time, e.g. "23:59:59" - * or "2010-03-31 23:59:59". - * - * @returns {String} The formatted time. - * - * @throws Error on invalid date argument. - */ - this.formatTime = function(date) { - - var d = null; - - if (typeof date == "string") { - // assume ISO-8601 time string - try { - d = jsworld.parseIsoTime(date); - } catch (error) { - // try full ISO-8601 date/time string - d = jsworld.parseIsoDateTime(date); - } - } - else if (date !== null && typeof date == "object") { - // assume ready Date object - d = date; - } - else { - throw "Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"; - } - - return this._applyFormatting(d, this.lc.t_fmt); - }; - - - /** - * @public - * - * @description Formats a date/time value according to the preset - * locale. - * - * @param {Date|String} date A valid Date object instance or a string - * containing a valid ISO-8601 formatted date/time, e.g. - * "2010-03-31 23:59:59". - * - * @returns {String} The formatted time. - * - * @throws Error on invalid argument. - */ - this.formatDateTime = function(date) { - - var d = null; - - if (typeof date == "string") { - // assume ISO-8601 format - d = jsworld.parseIsoDateTime(date); - } - else if (date !== null && typeof date == "object") { - // assume ready Date object - d = date; - } - else { - throw "Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"; - } - - return this._applyFormatting(d, this.lc.d_t_fmt); - }; - - - /** - * @private - * - * @description Apples formatting to the Date object according to the - * format string. - * - * @param {Date} d A valid Date instance. - * @param {String} s The formatting string with '%' placeholders. - * - * @returns {String} The formatted string. - */ - this._applyFormatting = function(d, s) { - - s = s.replace(/%%/g, '%'); - s = s.replace(/%a/g, this.lc.abday[d.getDay()]); - s = s.replace(/%A/g, this.lc.day[d.getDay()]); - s = s.replace(/%b/g, this.lc.abmon[d.getMonth()]); - s = s.replace(/%B/g, this.lc.mon[d.getMonth()]); - s = s.replace(/%d/g, jsworld._zeroPad(d.getDate(), 2)); - s = s.replace(/%e/g, jsworld._spacePad(d.getDate(), 2)); - s = s.replace(/%F/g, d.getFullYear() + - "-" + - jsworld._zeroPad(d.getMonth()+1, 2) + - "-" + - jsworld._zeroPad(d.getDate(), 2)); - s = s.replace(/%h/g, this.lc.abmon[d.getMonth()]); // same as %b - s = s.replace(/%H/g, jsworld._zeroPad(d.getHours(), 2)); - s = s.replace(/%I/g, jsworld._zeroPad(this._hours12(d.getHours()), 2)); - s = s.replace(/%k/g, d.getHours()); - s = s.replace(/%l/g, this._hours12(d.getHours())); - s = s.replace(/%m/g, jsworld._zeroPad(d.getMonth()+1, 2)); - s = s.replace(/%n/g, "\n"); - s = s.replace(/%M/g, jsworld._zeroPad(d.getMinutes(), 2)); - s = s.replace(/%p/g, this._getAmPm(d.getHours())); - s = s.replace(/%P/g, this._getAmPm(d.getHours()).toLocaleLowerCase()); // safe? - s = s.replace(/%R/g, jsworld._zeroPad(d.getHours(), 2) + - ":" + - jsworld._zeroPad(d.getMinutes(), 2)); - s = s.replace(/%S/g, jsworld._zeroPad(d.getSeconds(), 2)); - s = s.replace(/%T/g, jsworld._zeroPad(d.getHours(), 2) + - ":" + - jsworld._zeroPad(d.getMinutes(), 2) + - ":" + - jsworld._zeroPad(d.getSeconds(), 2)); - s = s.replace(/%w/g, this.lc.day[d.getDay()]); - s = s.replace(/%y/g, new String(d.getFullYear()).substring(2)); - s = s.replace(/%Y/g, d.getFullYear()); - - s = s.replace(/%Z/g, ""); // to do: ignored until a reliable TMZ method found - - s = s.replace(/%[a-zA-Z]/g, ""); // ignore all other % sequences - - return s; - }; - - - /** - * @private - * - * @description Does 24 to 12 hour conversion. - * - * @param {integer Number} hour24 Hour [0..23]. - * - * @returns {integer Number} Corresponding hour [1..12]. - */ - this._hours12 = function(hour24) { - - if (hour24 === 0) - return 12; // 00h is 12AM - - else if (hour24 > 12) - return hour24 - 12; // 1PM to 11PM - - else - return hour24; // 1AM to 12PM - }; - - - /** - * @private - * - * @description Gets the appropriate localised AM or PM string depending - * on the day hour. Special cases: midnight is 12AM, noon is 12PM. - * - * @param {integer Number} hour24 Hour [0..23]. - * - * @returns {String} The corresponding localised AM or PM string. - */ - this._getAmPm = function(hour24) { - - if (hour24 < 12) - return this.lc.am; - else - return this.lc.pm; - }; -}; - - - -/** - * @class Class for localised formatting of currency amounts. - * - *

    See: - * POSIX LC_MONETARY. - * - * @public - * @constructor - * @description Creates a new monetary formatter for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_MONETARY formatting properties. - * @param {String} [currencyCode] Set the currency explicitly by - * passing its international ISO-4217 code, e.g. "USD", "EUR", "GBP". - * Use this optional parameter to override the default local currency - * @param {String} [altIntSymbol] Non-local currencies are formatted - * with their international ISO-4217 code to prevent ambiguity. - * Use this optional argument to force a different symbol, such as the - * currency's shorthand sign. This is mostly useful when the shorthand - * sign is both internationally recognised and identifies the currency - * uniquely (e.g. the Euro sign). - * - * @throws Error on constructor failure. - */ -jsworld.MonetaryFormatter = function(locale, currencyCode, altIntSymbol) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - this.lc = locale; - - /** - * @private - * @description Lookup table to determine the fraction digits for a - * specific currency; most currencies subdivide at 1/100 (2 fractional - * digits), so we store only those that deviate from the default. - * - *

    The data is from Unicode's CLDR version 1.7.0. The two currencies - * with non-decimal subunits (MGA and MRO) are marked as having no - * fractional digits as well as all currencies that have no subunits - * in circulation. - * - *

    It is "hard-wired" for referential convenience and is only looked - * up when an overriding currencyCode parameter is supplied. - */ - this.currencyFractionDigits = { - "AFN" : 0, "ALL" : 0, "AMD" : 0, "BHD" : 3, "BIF" : 0, - "BYR" : 0, "CLF" : 0, "CLP" : 0, "COP" : 0, "CRC" : 0, - "DJF" : 0, "GNF" : 0, "GYD" : 0, "HUF" : 0, "IDR" : 0, - "IQD" : 0, "IRR" : 0, "ISK" : 0, "JOD" : 3, "JPY" : 0, - "KMF" : 0, "KRW" : 0, "KWD" : 3, "LAK" : 0, "LBP" : 0, - "LYD" : 3, "MGA" : 0, "MMK" : 0, "MNT" : 0, "MRO" : 0, - "MUR" : 0, "OMR" : 3, "PKR" : 0, "PYG" : 0, "RSD" : 0, - "RWF" : 0, "SLL" : 0, "SOS" : 0, "STD" : 0, "SYP" : 0, - "TND" : 3, "TWD" : 0, "TZS" : 0, "UGX" : 0, "UZS" : 0, - "VND" : 0, "VUV" : 0, "XAF" : 0, "XOF" : 0, "XPF" : 0, - "YER" : 0, "ZMK" : 0 - }; - - - // optional currencyCode argument? - if (typeof currencyCode == "string") { - // user wanted to override the local currency - this.currencyCode = currencyCode.toUpperCase(); - - // must override the frac digits too, for some - // currencies have 0, 2 or 3! - var numDigits = this.currencyFractionDigits[this.currencyCode]; - if (typeof numDigits != "number") - numDigits = 2; // default for most currencies - this.lc.frac_digits = numDigits; - this.lc.int_frac_digits = numDigits; - } - else { - // use local currency - this.currencyCode = this.lc.int_curr_symbol.substring(0,3).toUpperCase(); - } - - // extract intl. currency separator - this.intSep = this.lc.int_curr_symbol.charAt(3); - - // flag local or intl. sign formatting? - if (this.currencyCode == this.lc.int_curr_symbol.substring(0,3)) { - // currency matches the local one? -> - // formatting with local symbol and parameters - this.internationalFormatting = false; - this.curSym = this.lc.currency_symbol; - } - else { - // currency doesn't match the local -> - - // do we have an overriding currency symbol? - if (typeof altIntSymbol == "string") { - // -> force formatting with local parameters, using alt symbol - this.curSym = altIntSymbol; - this.internationalFormatting = false; - } - else { - // -> force formatting with intl. sign and parameters - this.internationalFormatting = true; - } - } - - - /** - * @public - * - * @description Gets the currency symbol used in formatting. - * - * @returns {String} The currency symbol. - */ - this.getCurrencySymbol = function() { - - return this.curSym; - }; - - - /** - * @public - * - * @description Gets the position of the currency symbol relative to - * the amount. Assumes a non-negative amount and local formatting. - * - * @param {String} intFlag Optional flag to force international - * formatting by passing the string "i". - * - * @returns {Boolean} True if the symbol precedes the amount, false if - * the symbol succeeds the amount. - */ - this.currencySymbolPrecedes = function(intFlag) { - - if (typeof intFlag == "string" && intFlag == "i") { - // international formatting was forced - if (this.lc.int_p_cs_precedes == 1) - return true; - else - return false; - - } - else { - // check whether local formatting is on or off - if (this.internationalFormatting) { - if (this.lc.int_p_cs_precedes == 1) - return true; - else - return false; - } - else { - if (this.lc.p_cs_precedes == 1) - return true; - else - return false; - } - } - }; - - - /** - * @public - * - * @description Gets the decimal delimiter (radix) used in formatting. - * - * @returns {String} The radix character. - */ - this.getDecimalPoint = function() { - - return this.lc.mon_decimal_point; - }; - - - /** - * @public - * - * @description Gets the number of fractional digits. Assumes local - * formatting. - * - * @param {String} intFlag Optional flag to force international - * formatting by passing the string "i". - * - * @returns {integer Number} The number of fractional digits. - */ - this.getFractionalDigits = function(intFlag) { - - if (typeof intFlag == "string" && intFlag == "i") { - // international formatting was forced - return this.lc.int_frac_digits; - } - else { - // check whether local formatting is on or off - if (this.internationalFormatting) - return this.lc.int_frac_digits; - else - return this.lc.frac_digits; - } - }; - - - /** - * @public - * - * @description Formats a monetary amount according to the preset - * locale. - * - *

    -	 * For local currencies the native shorthand symbol will be used for
    -	 * formatting.
    -	 * Example:
    -	 *        locale is en_US
    -	 *        currency is USD
    -	 *        -> the "$" symbol will be used, e.g. $123.45
    -	 *        
    -	 * For non-local currencies the international ISO-4217 code will be
    -	 * used for formatting.
    -	 * Example:
    -	 *       locale is en_US (which has USD as currency)
    -	 *       currency is EUR
    -	 *       -> the ISO three-letter code will be used, e.g. EUR 123.45
    -	 *
    -	 * If the currency is non-local, but an alternative currency symbol was
    -	 * provided, this will be used instead.
    -	 * Example
    -	 *       locale is en_US (which has USD as currency)
    -	 *       currency is EUR
    -	 *       an alternative symbol is provided - "€"
    -	 *       -> the alternative symbol will be used, e.g. €123.45
    -	 * 
    - * - * @param {Number|String} amount The amount to format as currency. - * @param {String} [options] Options to modify the formatted output: - *
      - *
    • "^" suppress grouping - *
    • "!" suppress the currency symbol - *
    • "~" suppress the currency symbol and the sign (positive or negative) - *
    • "i" force international sign (ISO-4217 code) formatting - *
    • ".n" specify decimal precision - * - * @returns The formatted currency amount as string. - * - * @throws "Error: Invalid amount" on bad amount. - */ - this.format = function(amount, options) { - - // if the amount is passed as string, check that it parses to a float - var floatAmount; - - if (typeof amount == "string") { - amount = jsworld._trim(amount); - floatAmount = parseFloat(amount); - - if (typeof floatAmount != "number" || isNaN(floatAmount)) - throw "Error: Amount string not a number"; - } - else if (typeof amount == "number") { - floatAmount = amount; - } - else { - throw "Error: Amount not a number"; - } - - // get the required precision, ".n" option arg overrides default locale config - var reqPrecision = jsworld._getPrecision(options); - - if (reqPrecision == -1) { - if (this.internationalFormatting || jsworld._hasOption("i", options)) - reqPrecision = this.lc.int_frac_digits; - else - reqPrecision = this.lc.frac_digits; - } - - // round - floatAmount = Math.round(floatAmount * Math.pow(10, reqPrecision)) / Math.pow(10, reqPrecision); - - - // convert the float amount to string and parse into - // object with properties integer and fraction - var parsedAmount = jsworld._splitNumber(String(floatAmount)); - - // format integer part with grouping chars - var formattedIntegerPart; - - if (floatAmount === 0) - formattedIntegerPart = "0"; - else - formattedIntegerPart = jsworld._hasOption("^", options) ? - parsedAmount.integer : - jsworld._formatIntegerPart(parsedAmount.integer, - this.lc.mon_grouping, - this.lc.mon_thousands_sep); - - - // format the fractional part - var formattedFractionPart; - - if (reqPrecision == -1) { - // pad fraction with trailing zeros accoring to default locale [int_]frac_digits - if (this.internationalFormatting || jsworld._hasOption("i", options)) - formattedFractionPart = - jsworld._formatFractionPart(parsedAmount.fraction, this.lc.int_frac_digits); - else - formattedFractionPart = - jsworld._formatFractionPart(parsedAmount.fraction, this.lc.frac_digits); - } - else { - // pad fraction with trailing zeros according to optional format parameter - formattedFractionPart = - jsworld._formatFractionPart(parsedAmount.fraction, reqPrecision); - } - - - // join integer and decimal parts using the mon_decimal_point property - var quantity; - - if (this.lc.frac_digits > 0 || formattedFractionPart.length) - quantity = formattedIntegerPart + this.lc.mon_decimal_point + formattedFractionPart; - else - quantity = formattedIntegerPart; - - - // do final formatting with sign and symbol - if (jsworld._hasOption("~", options)) { - return quantity; - } - else { - var suppressSymbol = jsworld._hasOption("!", options) ? true : false; - - var sign = floatAmount < 0 ? "-" : "+"; - - if (this.internationalFormatting || jsworld._hasOption("i", options)) { - - // format with ISO-4217 code (suppressed or not) - if (suppressSymbol) - return this._formatAsInternationalCurrencyWithNoSym(sign, quantity); - else - return this._formatAsInternationalCurrency(sign, quantity); - } - else { - // format with local currency code (suppressed or not) - if (suppressSymbol) - return this._formatAsLocalCurrencyWithNoSym(sign, quantity); - else - return this._formatAsLocalCurrency(sign, quantity); - } - } - }; - - - /** - * @private - * - * @description Assembles the final string with sign, separator and symbol as local - * currency. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string. - */ - this._formatAsLocalCurrency = function (sign, q) { - - // assemble final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - if (sign == "+") { - - // parentheses - if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return "(" + q + this.curSym + ")"; - } - else if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return "(" + this.curSym + q + ")"; - } - else if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return "(" + q + " " + this.curSym + ")"; - } - else if (this.lc.p_sign_posn === 0 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return "(" + this.curSym + " " + q + ")"; - } - - // sign before q + sym - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q + this.curSym; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q + " " + this.curSym; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + " " + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + " " + q + this.curSym; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + this.curSym + q; - } - - // sign after q + sym - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.curSym + q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.curSym + " " + q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.curSym + q + " " + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign + this.curSym; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign + this.curSym; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + this.curSym + " " + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign + " " + this.curSym; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + this.curSym + q; - } - - // sign after symbol - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.curSym + this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.curSym + this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.curSym + " " + this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return "(" + q + this.curSym + ")"; - } - else if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return "(" + this.curSym + q + ")"; - } - else if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return "(" + q + " " + this.curSym + ")"; - } - else if (this.lc.n_sign_posn === 0 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return "(" + this.curSym + " " + q + ")"; - } - - // sign before q + sym - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q + this.curSym; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q + " " + this.curSym; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + " " + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + " " + q + this.curSym; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + this.curSym + q; - } - - // sign after q + sym - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.curSym + q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.curSym + " " + q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.curSym + q + " " + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign + this.curSym; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign + this.curSym; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + this.curSym + " " + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign + " " + this.curSym; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + this.curSym + q; - } - - // sign after symbol - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.curSym + this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.curSym + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.curSym + this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.curSym + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.curSym + " " + this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC MONETARY definition"; - }; - - - /** - * @private - * - * @description Assembles the final string with sign, separator and ISO-4217 - * currency code. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string. - */ - this._formatAsInternationalCurrency = function (sign, q) { - - // assemble the final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - - if (sign == "+") { - - // parentheses - if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return "(" + q + this.currencyCode + ")"; - } - else if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return "(" + this.currencyCode + q + ")"; - } - else if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return "(" + q + this.intSep + this.currencyCode + ")"; - } - else if (this.lc.int_p_sign_posn === 0 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return "(" + this.currencyCode + this.intSep + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q + this.intSep + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + this.intSep + q + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + this.currencyCode + q; - } - - // sign after q + sym - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.intSep + q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + q + this.intSep + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign + this.intSep + this.currencyCode; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + this.currencyCode + q; - } - - // sign after symbol - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.currencyCode + this.intSep + this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return "(" + q + this.currencyCode + ")"; - } - else if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return "(" + this.currencyCode + q + ")"; - } - else if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return "(" + q + this.intSep + this.currencyCode + ")"; - } - else if (this.lc.int_n_sign_posn === 0 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return "(" + this.currencyCode + this.intSep + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q + this.intSep + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + this.intSep + q + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + this.currencyCode + q; - } - - // sign after q + sym - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.intSep + q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + q + this.intSep + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.currencyCode + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign + this.intSep + this.currencyCode; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + this.currencyCode + q; - } - - // sign after symbol - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.currencyCode + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.currencyCode + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.currencyCode + this.intSep + this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC MONETARY definition"; - }; - - - /** - * @private - * - * @description Assembles the final string with sign and separator, but suppress the - * local currency symbol. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string - */ - this._formatAsLocalCurrencyWithNoSym = function (sign, q) { - - // assemble the final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - - if (sign == "+") { - - // parentheses - if (this.lc.p_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 1 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - - // sign after q + sym - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 2 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return q + " " + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 3 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - - // sign after symbol - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 0 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 1 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + " " + q; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 0) { - return q + " " + this.lc.positive_sign; - } - else if (this.lc.p_sign_posn === 4 && this.lc.p_sep_by_space === 2 && this.lc.p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.n_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 1 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - - // sign after q + sym - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 2 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return q + " " + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 3 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - - // sign after symbol - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 0 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 1 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + " " + q; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 0) { - return q + " " + this.lc.negative_sign; - } - else if (this.lc.n_sign_posn === 4 && this.lc.n_sep_by_space === 2 && this.lc.n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC MONETARY definition"; - }; - - - /** - * @private - * - * @description Assembles the final string with sign and separator, but suppress - * the ISO-4217 currency code. - * - * @param {String} sign The amount sign: "+" or "-". - * @param {String} q The formatted quantity (unsigned). - * - * @returns {String} The final formatted string. - */ - this._formatAsInternationalCurrencyWithNoSym = function (sign, q) { - - // assemble the final formatted amount by going over all possible value combinations of: - // sign {+,-} , sign position {0,1,2,3,4} , separator {0,1,2} , symbol position {0,1} - - if (sign == "+") { - - // parentheses - if (this.lc.int_p_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 1 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - - // sign after q + sym - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 2 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return q + this.intSep + this.lc.positive_sign; - } - - // sign before sym - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 3 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - - // sign after symbol - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 0) { - return q + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 0 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 1 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + this.intSep + q; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 0) { - return q + this.intSep + this.lc.positive_sign; - } - else if (this.lc.int_p_sign_posn === 4 && this.lc.int_p_sep_by_space === 2 && this.lc.int_p_cs_precedes === 1) { - return this.lc.positive_sign + q; - } - - } - else if (sign == "-") { - - // parentheses enclose q + sym - if (this.lc.int_n_sign_posn === 0) { - return "(" + q + ")"; - } - - // sign before q + sym - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 1 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - - // sign after q + sym - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 2 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return q + this.intSep + this.lc.negative_sign; - } - - // sign before sym - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 3 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - - // sign after symbol - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 0) { - return q + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 0 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 1 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + this.intSep + q; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 0) { - return q + this.intSep + this.lc.negative_sign; - } - else if (this.lc.int_n_sign_posn === 4 && this.lc.int_n_sep_by_space === 2 && this.lc.int_n_cs_precedes === 1) { - return this.lc.negative_sign + q; - } - } - - // throw error if we fall through - throw "Error: Invalid POSIX LC_MONETARY definition"; - }; -}; - - -/** - * @class - * Class for parsing localised number strings. - * - * @public - * @constructor - * @description Creates a new numeric parser for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_NUMERIC formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.NumericParser = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - this.lc = locale; - - - /** - * @public - * - * @description Parses a numeric string formatted according to the - * preset locale. Leading and trailing whitespace is ignored; the number - * may also be formatted without thousands separators. - * - * @param {String} formattedNumber The formatted number. - * - * @returns {Number} The parsed number. - * - * @throws Error on a parse exception. - */ - this.parse = function(formattedNumber) { - - if (typeof formattedNumber != "string") - throw "Parse error: Argument must be a string"; - - // trim whitespace - var s = jsworld._trim(formattedNumber); - - // remove any thousand separator symbols - s = jsworld._stringReplaceAll(formattedNumber, this.lc.thousands_sep, ""); - - // replace any local decimal point symbols with the symbol used - // in JavaScript "." - s = jsworld._stringReplaceAll(s, this.lc.decimal_point, "."); - - // test if the string represents a number - if (jsworld._isNumber(s)) - return parseFloat(s, 10); - else - throw "Parse error: Invalid number string"; - }; -}; - - -/** - * @class - * Class for parsing localised date and time strings. - * - * @public - * @constructor - * @description Creates a new date/time parser for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_TIME formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.DateTimeParser = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance."; - - this.lc = locale; - - - /** - * @public - * - * @description Parses a time string formatted according to the - * POSIX LC_TIME t_fmt property of the preset locale. - * - * @param {String} formattedTime The formatted time. - * - * @returns {String} The parsed time in ISO-8601 format (HH:MM:SS), e.g. - * "23:59:59". - * - * @throws Error on a parse exception. - */ - this.parseTime = function(formattedTime) { - - if (typeof formattedTime != "string") - throw "Parse error: Argument must be a string"; - - var dt = this._extractTokens(this.lc.t_fmt, formattedTime); - - var timeDefined = false; - - if (dt.hour !== null && dt.minute !== null && dt.second !== null) { - timeDefined = true; - } - else if (dt.hourAmPm !== null && dt.am !== null && dt.minute !== null && dt.second !== null) { - if (dt.am) { - // AM [12(midnight), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 0; - else - dt.hour = parseInt(dt.hourAmPm, 10); - } - else { - // PM [12(noon), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 12; - else - dt.hour = parseInt(dt.hourAmPm, 10) + 12; - } - timeDefined = true; - } - - if (timeDefined) - return jsworld._zeroPad(dt.hour, 2) + - ":" + - jsworld._zeroPad(dt.minute, 2) + - ":" + - jsworld._zeroPad(dt.second, 2); - else - throw "Parse error: Invalid/ambiguous time string"; - }; - - - /** - * @public - * - * @description Parses a date string formatted according to the - * POSIX LC_TIME d_fmt property of the preset locale. - * - * @param {String} formattedDate The formatted date, must be valid. - * - * @returns {String} The parsed date in ISO-8601 format (YYYY-MM-DD), - * e.g. "2010-03-31". - * - * @throws Error on a parse exception. - */ - this.parseDate = function(formattedDate) { - - if (typeof formattedDate != "string") - throw "Parse error: Argument must be a string"; - - var dt = this._extractTokens(this.lc.d_fmt, formattedDate); - - var dateDefined = false; - - if (dt.year !== null && dt.month !== null && dt.day !== null) { - dateDefined = true; - } - - if (dateDefined) - return jsworld._zeroPad(dt.year, 4) + - "-" + - jsworld._zeroPad(dt.month, 2) + - "-" + - jsworld._zeroPad(dt.day, 2); - else - throw "Parse error: Invalid date string"; - }; - - - /** - * @public - * - * @description Parses a date/time string formatted according to the - * POSIX LC_TIME d_t_fmt property of the preset locale. - * - * @param {String} formattedDateTime The formatted date/time, must be - * valid. - * - * @returns {String} The parsed date/time in ISO-8601 format - * (YYYY-MM-DD HH:MM:SS), e.g. "2010-03-31 23:59:59". - * - * @throws Error on a parse exception. - */ - this.parseDateTime = function(formattedDateTime) { - - if (typeof formattedDateTime != "string") - throw "Parse error: Argument must be a string"; - - var dt = this._extractTokens(this.lc.d_t_fmt, formattedDateTime); - - var timeDefined = false; - var dateDefined = false; - - if (dt.hour !== null && dt.minute !== null && dt.second !== null) { - timeDefined = true; - } - else if (dt.hourAmPm !== null && dt.am !== null && dt.minute !== null && dt.second !== null) { - if (dt.am) { - // AM [12(midnight), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 0; - else - dt.hour = parseInt(dt.hourAmPm, 10); - } - else { - // PM [12(noon), 1 .. 11] - if (dt.hourAmPm == 12) - dt.hour = 12; - else - dt.hour = parseInt(dt.hourAmPm, 10) + 12; - } - timeDefined = true; - } - - if (dt.year !== null && dt.month !== null && dt.day !== null) { - dateDefined = true; - } - - if (dateDefined && timeDefined) - return jsworld._zeroPad(dt.year, 4) + - "-" + - jsworld._zeroPad(dt.month, 2) + - "-" + - jsworld._zeroPad(dt.day, 2) + - " " + - jsworld._zeroPad(dt.hour, 2) + - ":" + - jsworld._zeroPad(dt.minute, 2) + - ":" + - jsworld._zeroPad(dt.second, 2); - else - throw "Parse error: Invalid/ambiguous date/time string"; - }; - - - /** - * @private - * - * @description Parses a string according to the specified format - * specification. - * - * @param {String} fmtSpec The format specification, e.g. "%I:%M:%S %p". - * @param {String} s The string to parse. - * - * @returns {object} An object with set properties year, month, day, - * hour, minute and second if the corresponding values are - * found in the parsed string. - * - * @throws Error on a parse exception. - */ - this._extractTokens = function(fmtSpec, s) { - - // the return object containing the parsed date/time properties - var dt = { - // for date and date/time strings - "year" : null, - "month" : null, - "day" : null, - - // for time and date/time strings - "hour" : null, - "hourAmPm" : null, - "am" : null, - "minute" : null, - "second" : null, - - // used internally only - "weekday" : null - }; - - - // extract and process each token in the date/time spec - while (fmtSpec.length > 0) { - - // Do we have a valid "%\w" placeholder in stream? - if (fmtSpec.charAt(0) == "%" && fmtSpec.charAt(1) != "") { - - // get placeholder - var placeholder = fmtSpec.substring(0,2); - - if (placeholder == "%%") { - // escaped '%'' - s = s.substring(1); - } - else if (placeholder == "%a") { - // abbreviated weekday name - for (var i = 0; i < this.lc.abday.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.abday[i])) { - dt.weekday = i; - s = s.substring(this.lc.abday[i].length); - break; - } - } - - if (dt.weekday === null) - throw "Parse error: Unrecognised abbreviated weekday name (%a)"; - } - else if (placeholder == "%A") { - // weekday name - for (var i = 0; i < this.lc.day.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.day[i])) { - dt.weekday = i; - s = s.substring(this.lc.day[i].length); - break; - } - } - - if (dt.weekday === null) - throw "Parse error: Unrecognised weekday name (%A)"; - } - else if (placeholder == "%b" || placeholder == "%h") { - // abbreviated month name - for (var i = 0; i < this.lc.abmon.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.abmon[i])) { - dt.month = i + 1; - s = s.substring(this.lc.abmon[i].length); - break; - } - } - - if (dt.month === null) - throw "Parse error: Unrecognised abbreviated month name (%b)"; - } - else if (placeholder == "%B") { - // month name - for (var i = 0; i < this.lc.mon.length; i++) { - - if (jsworld._stringStartsWith(s, this.lc.mon[i])) { - dt.month = i + 1; - s = s.substring(this.lc.mon[i].length); - break; - } - } - - if (dt.month === null) - throw "Parse error: Unrecognised month name (%B)"; - } - else if (placeholder == "%d") { - // day of the month [01..31] - if (/^0[1-9]|[1-2][0-9]|3[0-1]/.test(s)) { - dt.day = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised day of the month (%d)"; - } - else if (placeholder == "%e") { - // day of the month [1..31] - - // Note: if %e is leading in fmt string -> space padded! - - var day = s.match(/^\s?(\d{1,2})/); - dt.day = parseInt(day, 10); - - if (isNaN(dt.day) || dt.day < 1 || dt.day > 31) - throw "Parse error: Unrecognised day of the month (%e)"; - - s = s.substring(day.length); - } - else if (placeholder == "%F") { - // equivalent to %Y-%m-%d (ISO-8601 date format) - - // year [nnnn] - if (/^\d\d\d\d/.test(s)) { - dt.year = parseInt(s.substring(0,4), 10); - s = s.substring(4); - } - else { - throw "Parse error: Unrecognised date (%F)"; - } - - // - - if (jsworld._stringStartsWith(s, "-")) - s = s.substring(1); - else - throw "Parse error: Unrecognised date (%F)"; - - // month [01..12] - if (/^0[1-9]|1[0-2]/.test(s)) { - dt.month = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised date (%F)"; - - // - - if (jsworld._stringStartsWith(s, "-")) - s = s.substring(1); - else - throw "Parse error: Unrecognised date (%F)"; - - // day of the month [01..31] - if (/^0[1-9]|[1-2][0-9]|3[0-1]/.test(s)) { - dt.day = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised date (%F)"; - } - else if (placeholder == "%H") { - // hour [00..23] - if (/^[0-1][0-9]|2[0-3]/.test(s)) { - dt.hour = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised hour (%H)"; - } - else if (placeholder == "%I") { - // hour [01..12] - if (/^0[1-9]|1[0-2]/.test(s)) { - dt.hourAmPm = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised hour (%I)"; - } - else if (placeholder == "%k") { - // hour [0..23] - var h = s.match(/^(\d{1,2})/); - dt.hour = parseInt(h, 10); - - if (isNaN(dt.hour) || dt.hour < 0 || dt.hour > 23) - throw "Parse error: Unrecognised hour (%k)"; - - s = s.substring(h.length); - } - else if (placeholder == "%l") { - // hour AM/PM [1..12] - var h = s.match(/^(\d{1,2})/); - dt.hourAmPm = parseInt(h, 10); - - if (isNaN(dt.hourAmPm) || dt.hourAmPm < 1 || dt.hourAmPm > 12) - throw "Parse error: Unrecognised hour (%l)"; - - s = s.substring(h.length); - } - else if (placeholder == "%m") { - // month [01..12] - if (/^0[1-9]|1[0-2]/.test(s)) { - dt.month = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised month (%m)"; - } - else if (placeholder == "%M") { - // minute [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.minute = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised minute (%M)"; - } - else if (placeholder == "%n") { - // new line - - if (s.charAt(0) == "\n") - s = s.substring(1); - else - throw "Parse error: Unrecognised new line (%n)"; - } - else if (placeholder == "%p") { - // locale's equivalent of AM/PM - if (jsworld._stringStartsWith(s, this.lc.am)) { - dt.am = true; - s = s.substring(this.lc.am.length); - } - else if (jsworld._stringStartsWith(s, this.lc.pm)) { - dt.am = false; - s = s.substring(this.lc.pm.length); - } - else - throw "Parse error: Unrecognised AM/PM value (%p)"; - } - else if (placeholder == "%P") { - // same as %p but forced lower case - if (jsworld._stringStartsWith(s, this.lc.am.toLowerCase())) { - dt.am = true; - s = s.substring(this.lc.am.length); - } - else if (jsworld._stringStartsWith(s, this.lc.pm.toLowerCase())) { - dt.am = false; - s = s.substring(this.lc.pm.length); - } - else - throw "Parse error: Unrecognised AM/PM value (%P)"; - } - else if (placeholder == "%R") { - // same as %H:%M - - // hour [00..23] - if (/^[0-1][0-9]|2[0-3]/.test(s)) { - dt.hour = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%R)"; - - // : - if (jsworld._stringStartsWith(s, ":")) - s = s.substring(1); - else - throw "Parse error: Unrecognised time (%R)"; - - // minute [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.minute = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%R)"; - - } - else if (placeholder == "%S") { - // second [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.second = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised second (%S)"; - } - else if (placeholder == "%T") { - // same as %H:%M:%S - - // hour [00..23] - if (/^[0-1][0-9]|2[0-3]/.test(s)) { - dt.hour = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%T)"; - - // : - if (jsworld._stringStartsWith(s, ":")) - s = s.substring(1); - else - throw "Parse error: Unrecognised time (%T)"; - - // minute [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.minute = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%T)"; - - // : - if (jsworld._stringStartsWith(s, ":")) - s = s.substring(1); - else - throw "Parse error: Unrecognised time (%T)"; - - // second [00..59] - if (/^[0-5][0-9]/.test(s)) { - dt.second = parseInt(s.substring(0,2), 10); - s = s.substring(2); - } - else - throw "Parse error: Unrecognised time (%T)"; - } - else if (placeholder == "%w") { - // weekday [0..6] - if (/^\d/.test(s)) { - dt.weekday = parseInt(s.substring(0,1), 10); - s = s.substring(1); - } - else - throw "Parse error: Unrecognised weekday number (%w)"; - } - else if (placeholder == "%y") { - // year [00..99] - if (/^\d\d/.test(s)) { - var year2digits = parseInt(s.substring(0,2), 10); - - // this conversion to year[nnnn] is arbitrary!!! - if (year2digits > 50) - dt.year = 1900 + year2digits; - else - dt.year = 2000 + year2digits; - - s = s.substring(2); - } - else - throw "Parse error: Unrecognised year (%y)"; - } - else if (placeholder == "%Y") { - // year [nnnn] - if (/^\d\d\d\d/.test(s)) { - dt.year = parseInt(s.substring(0,4), 10); - s = s.substring(4); - } - else - throw "Parse error: Unrecognised year (%Y)"; - } - - else if (placeholder == "%Z") { - // time-zone place holder is not supported - - if (fmtSpec.length === 0) - break; // ignore rest of fmt spec - } - - // remove the spec placeholder that was just parsed - fmtSpec = fmtSpec.substring(2); - } - else { - // If we don't have a placeholder, the chars - // at pos. 0 of format spec and parsed string must match - - // Note: Space chars treated 1:1 ! - - if (fmtSpec.charAt(0) != s.charAt(0)) - throw "Parse error: Unexpected symbol \"" + s.charAt(0) + "\" in date/time string"; - - fmtSpec = fmtSpec.substring(1); - s = s.substring(1); - } - } - - // parsing finished, return composite date/time object - return dt; - }; -}; - - -/** - * @class - * Class for parsing localised currency amount strings. - * - * @public - * @constructor - * @description Creates a new monetary parser for the specified locale. - * - * @param {jsworld.Locale} locale A locale object specifying the required - * POSIX LC_MONETARY formatting properties. - * - * @throws Error on constructor failure. - */ -jsworld.MonetaryParser = function(locale) { - - if (typeof locale != "object" || locale._className != "jsworld.Locale") - throw "Constructor error: You must provide a valid jsworld.Locale instance"; - - - this.lc = locale; - - - /** - * @public - * - * @description Parses a currency amount string formatted according to - * the preset locale. Leading and trailing whitespace is ignored; the - * amount may also be formatted without thousands separators. Both - * the local (shorthand) symbol and the ISO 4217 code are accepted to - * designate the currency in the formatted amount. - * - * @param {String} formattedCurrency The formatted currency amount. - * - * @returns {Number} The parsed amount. - * - * @throws Error on a parse exception. - */ - this.parse = function(formattedCurrency) { - - if (typeof formattedCurrency != "string") - throw "Parse error: Argument must be a string"; - - // Detect the format type and remove the currency symbol - var symbolType = this._detectCurrencySymbolType(formattedCurrency); - - var formatType, s; - - if (symbolType == "local") { - formatType = "local"; - s = formattedCurrency.replace(this.lc.getCurrencySymbol(), ""); - } - else if (symbolType == "int") { - formatType = "int"; - s = formattedCurrency.replace(this.lc.getIntCurrencySymbol(), ""); - } - else if (symbolType == "none") { - formatType = "local"; // assume local - s = formattedCurrency; - } - else - throw "Parse error: Internal assert failure"; - - // Remove any thousands separators - s = jsworld._stringReplaceAll(s, this.lc.mon_thousands_sep, ""); - - // Replace any local radix char with JavaScript's "." - s = s.replace(this.lc.mon_decimal_point, "."); - - // Remove all whitespaces - s = s.replace(/\s*/g, ""); - - // Remove any local non-negative sign - s = this._removeLocalNonNegativeSign(s, formatType); - - // Replace any local minus sign with JavaScript's "-" and put - // it in front of the amount if necessary - // (special parentheses rule checked too) - s = this._normaliseNegativeSign(s, formatType); - - // Finally, we should be left with a bare parsable decimal number - if (jsworld._isNumber(s)) - return parseFloat(s, 10); - else - throw "Parse error: Invalid currency amount string"; - }; - - - /** - * @private - * - * @description Tries to detect the symbol type used in the specified - * formatted currency string: local(shorthand), - * international (ISO-4217 code) or none. - * - * @param {String} formattedCurrency The the formatted currency string. - * - * @return {String} With possible values "local", "int" or "none". - */ - this._detectCurrencySymbolType = function(formattedCurrency) { - - // Check for whichever sign (int/local) is longer first - // to cover cases such as MOP/MOP$ and ZAR/R - - if (this.lc.getCurrencySymbol().length > this.lc.getIntCurrencySymbol().length) { - - if (formattedCurrency.indexOf(this.lc.getCurrencySymbol()) != -1) - return "local"; - else if (formattedCurrency.indexOf(this.lc.getIntCurrencySymbol()) != -1) - return "int"; - else - return "none"; - } - else { - if (formattedCurrency.indexOf(this.lc.getIntCurrencySymbol()) != -1) - return "int"; - else if (formattedCurrency.indexOf(this.lc.getCurrencySymbol()) != -1) - return "local"; - else - return "none"; - } - }; - - - /** - * @private - * - * @description Removes a local non-negative sign in a formatted - * currency string if it is found. This is done according to the - * locale properties p_sign_posn and int_p_sign_posn. - * - * @param {String} s The input string. - * @param {String} formatType With possible values "local" or "int". - * - * @returns {String} The processed string. - */ - this._removeLocalNonNegativeSign = function(s, formatType) { - - s = s.replace(this.lc.positive_sign, ""); - - // check for enclosing parentheses rule - if (((formatType == "local" && this.lc.p_sign_posn === 0) || - (formatType == "int" && this.lc.int_p_sign_posn === 0) ) && - /\(\d+\.?\d*\)/.test(s)) { - s = s.replace("(", ""); - s = s.replace(")", ""); - } - - return s; - }; - - - /** - * @private - * - * @description Replaces a local negative sign with the standard - * JavaScript minus ("-") sign placed in the correct position - * (preceding the amount). This is done according to the locale - * properties for negative sign symbol and relative position. - * - * @param {String} s The input string. - * @param {String} formatType With possible values "local" or "int". - * - * @returns {String} The processed string. - */ - this._normaliseNegativeSign = function(s, formatType) { - - // replace local negative symbol with JavaScript's "-" - s = s.replace(this.lc.negative_sign, "-"); - - // check for enclosing parentheses rule and replace them - // with negative sign before the amount - if ((formatType == "local" && this.lc.n_sign_posn === 0) || - (formatType == "int" && this.lc.int_n_sign_posn === 0) ) { - - if (/^\(\d+\.?\d*\)$/.test(s)) { - - s = s.replace("(", ""); - s = s.replace(")", ""); - return "-" + s; - } - } - - // check for rule negative sign succeeding the amount - if (formatType == "local" && this.lc.n_sign_posn == 2 || - formatType == "int" && this.lc.int_n_sign_posn == 2 ) { - - if (/^\d+\.?\d*-$/.test(s)) { - s = s.replace("-", ""); - return "-" + s; - } - } - - // check for rule cur. sym. succeeds and sign adjacent - if (formatType == "local" && this.lc.n_cs_precedes === 0 && this.lc.n_sign_posn == 3 || - formatType == "local" && this.lc.n_cs_precedes === 0 && this.lc.n_sign_posn == 4 || - formatType == "int" && this.lc.int_n_cs_precedes === 0 && this.lc.int_n_sign_posn == 3 || - formatType == "int" && this.lc.int_n_cs_precedes === 0 && this.lc.int_n_sign_posn == 4 ) { - - if (/^\d+\.?\d*-$/.test(s)) { - s = s.replace("-", ""); - return "-" + s; - } - } - - return s; - }; -}; - -// end-of-file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs2.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs2.js deleted file mode 100644 index 4e9f9672..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/uglify-hangs2.js +++ /dev/null @@ -1,166 +0,0 @@ -jsworld.Locale = function(properties) { - - // LC_NUMERIC - - - this.frac_digits = properties.frac_digits; - - - // may be empty string/null for currencies with no fractional part - if (properties.mon_decimal_point === null || properties.mon_decimal_point == "") { - - if (this.frac_digits > 0) - throw "Error: Undefined mon_decimal_point property"; - else - properties.mon_decimal_point = ""; - } - - if (typeof properties.mon_decimal_point != "string") - throw "Error: Invalid/missing mon_decimal_point property"; - - this.mon_decimal_point = properties.mon_decimal_point; - - - if (typeof properties.mon_thousands_sep != "string") - throw "Error: Invalid/missing mon_thousands_sep property"; - - this.mon_thousands_sep = properties.mon_thousands_sep; - - - if (typeof properties.mon_grouping != "string") - throw "Error: Invalid/missing mon_grouping property"; - - this.mon_grouping = properties.mon_grouping; - - - if (typeof properties.positive_sign != "string") - throw "Error: Invalid/missing positive_sign property"; - - this.positive_sign = properties.positive_sign; - - - if (typeof properties.negative_sign != "string") - throw "Error: Invalid/missing negative_sign property"; - - this.negative_sign = properties.negative_sign; - - - if (properties.p_cs_precedes !== 0 && properties.p_cs_precedes !== 1) - throw "Error: Invalid/missing p_cs_precedes property, must be 0 or 1"; - - this.p_cs_precedes = properties.p_cs_precedes; - - - if (properties.n_cs_precedes !== 0 && properties.n_cs_precedes !== 1) - throw "Error: Invalid/missing n_cs_precedes, must be 0 or 1"; - - this.n_cs_precedes = properties.n_cs_precedes; - - - if (properties.p_sep_by_space !== 0 && - properties.p_sep_by_space !== 1 && - properties.p_sep_by_space !== 2) - throw "Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2"; - - this.p_sep_by_space = properties.p_sep_by_space; - - - if (properties.n_sep_by_space !== 0 && - properties.n_sep_by_space !== 1 && - properties.n_sep_by_space !== 2) - throw "Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2"; - - this.n_sep_by_space = properties.n_sep_by_space; - - - if (properties.p_sign_posn !== 0 && - properties.p_sign_posn !== 1 && - properties.p_sign_posn !== 2 && - properties.p_sign_posn !== 3 && - properties.p_sign_posn !== 4) - throw "Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.p_sign_posn = properties.p_sign_posn; - - - if (properties.n_sign_posn !== 0 && - properties.n_sign_posn !== 1 && - properties.n_sign_posn !== 2 && - properties.n_sign_posn !== 3 && - properties.n_sign_posn !== 4) - throw "Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.n_sign_posn = properties.n_sign_posn; - - - if (typeof properties.int_frac_digits != "number" && properties.int_frac_digits < 0) - throw "Error: Invalid/missing int_frac_digits property"; - - this.int_frac_digits = properties.int_frac_digits; - - - if (properties.int_p_cs_precedes !== 0 && properties.int_p_cs_precedes !== 1) - throw "Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1"; - - this.int_p_cs_precedes = properties.int_p_cs_precedes; - - - if (properties.int_n_cs_precedes !== 0 && properties.int_n_cs_precedes !== 1) - throw "Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1"; - - this.int_n_cs_precedes = properties.int_n_cs_precedes; - - - if (properties.int_p_sep_by_space !== 0 && - properties.int_p_sep_by_space !== 1 && - properties.int_p_sep_by_space !== 2) - throw "Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2"; - - this.int_p_sep_by_space = properties.int_p_sep_by_space; - - - if (properties.int_n_sep_by_space !== 0 && - properties.int_n_sep_by_space !== 1 && - properties.int_n_sep_by_space !== 2) - throw "Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2"; - - this.int_n_sep_by_space = properties.int_n_sep_by_space; - - - if (properties.int_p_sign_posn !== 0 && - properties.int_p_sign_posn !== 1 && - properties.int_p_sign_posn !== 2 && - properties.int_p_sign_posn !== 3 && - properties.int_p_sign_posn !== 4) - throw "Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_p_sign_posn = properties.int_p_sign_posn; - - - if (properties.int_n_sign_posn !== 0 && - properties.int_n_sign_posn !== 1 && - properties.int_n_sign_posn !== 2 && - properties.int_n_sign_posn !== 3 && - properties.int_n_sign_posn !== 4) - throw "Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4"; - - this.int_n_sign_posn = properties.int_n_sign_posn; - - - // LC_TIME - - if (properties == null || typeof properties != "object") - throw "Error: Invalid/missing time locale properties"; - - - // parse the supported POSIX LC_TIME properties - - // abday - try { - this.abday = this._parseList(properties.abday, 7); - } - catch (error) { - throw "Error: Invalid abday property: " + error; - } - -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js deleted file mode 100644 index 4305e232..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/uglify-js.js +++ /dev/null @@ -1,17 +0,0 @@ -//convienence function(src, [options]); -function uglify(orig_code, options){ - options || (options = {}); - var jsp = uglify.parser; - var pro = uglify.uglify; - - var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST - ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names - ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations - var final_code = pro.gen_code(ast, options.gen_options); // compressed code here - return final_code; -}; - -uglify.parser = require("./lib/parse-js"); -uglify.uglify = require("./lib/process"); - -module.exports = uglify \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.npmignore deleted file mode 100644 index 82337939..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.npmignore +++ /dev/null @@ -1,6 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.travis.yml b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.travis.yml deleted file mode 100644 index 08e4dad6..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -npm_args: --ws:native -node_js: - - "0.6" - - "0.8" - - "0.10" diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/History.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/History.md deleted file mode 100644 index 63cf0ea6..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/History.md +++ /dev/null @@ -1,312 +0,0 @@ -v0.4.31 - September 23th, 2013 -===================== - -* Component support - -v0.4.30 - August 30th, 2013 -===================== - -* BufferedAmount could be undefined, default to 0 [TooTallNate] -* Support protocols as second argument and options as third [TooTallNate] -* Proper browserify shim [mcollina] -* Broadcasting example in README [stefanocudini] - -v0.4.29 - August 23th, 2013 -===================== -* Small clean up of the Node 0.11 support by using NAN from the NPM registry [kkoopa] -* Support for custom `Agent`'s through the options. [gramakri] & [TooTallNate] -* Support for custom headers through the options [3rd-Eden] -* Added a `gypfile` flag to the package.json for compiled module discovery [wolfeidau] - -v0.4.28 - August 16th, 2013 -===================== -* Node 0.11 support. [kkoopa] -* Authorization headers are sent when basic auth is used in the url [jcrugzz] -* Origin header will now include the port number [Jason Plum] -* Race condition fixed where data was received before the readyState was updated. [saschagehlich] - -v0.4.27 - June 27th, 2013 -===================== -* Frames are no longer masked in `wscat`. [slaskis] -* Don't retrain reference to large slab buffers. [jmatthewsr-msi] -* Don't use Buffer.byteLength for ArrayBuffer's. [Anthony Pesch] -* Fix browser field in package.json. [shtylman] -* Client-side certificate support & documentation improvements. [Lukas Berns] -* WebSocket readyState's is added to the prototype for spec compatiblity. [BallBearing] -* Use Object.defineProperty. [arlolra] -* Autodetect ArrayBuffers as binary when sending. [BallBearing] -* Check instanceof Buffer for binary data. [arlolra] -* Emit the close event before destroying the internal socket. [3rd-Eden] -* Don't setup multiply timeouts for one connection. [AndreasMadsen] -* Allow support for binding to ethereal port. [wpreul] -* Fix broken terminate reference. [3rd-Eden] -* Misc node 0.10 test fixes and documentation improvements. [3rd-Eden] -* Ensure ssl options are propagated to request. [einaros] -* Add 'Host' and 'Origin' to request header. [Lars-Magnus Skog] -* Subprotocol support. [kanaka] -* Honor ArrayBufferView's byteOffset when sending. [Anthony Pesch] -* Added target attribute for events. [arlolra] - -v0.4.26 - Skipped -===================== - -v0.4.25 - December 17th, 2012 -===================== -* Removed install.js. [shtylman] -* Added browser field to package.json. [shtylman] -* Support overwriting host header. [Raynos] -* Emit 'listening' also with custom http server. [sebiq] - -v0.4.24 - December 6th, 2012 -===================== -* Yet another intermediate release, to not delay minor features any longer. -* Native support installation issues further circumvented. [einaros] - -v0.4.23 - November 19th, 2012 -===================== -* Service release - last before major upgrade. -* Changes default host from 127.0.0.1 to 0.0.0.0. [einaros] - -v0.4.22 - October 3rd, 2012 -===================== -* clear failsafe cleanup timeout once cleanup is called [AndreasMadsen] -* added w3c compatible CloseEvent for onclose / addEventListener("close", ...). [einaros] -* fix the sub protocol header handler [sonnyp] -* fix unhandled exception if socket closes and 'error' is emitted [jmatthewsr-ms] - -v0.4.21 - July 14th, 2012 -===================== -* Emit error if server reponds with anything other than status code 101. [einaros] -* Added 'headers' event to server. [rauchg] -* path.exists moved to fs.exists. [blakmatrix] - -v0.4.20 - June 26th, 2012 -===================== -* node v0.8.0 compatibility release. - -v0.4.19 - June 19th, 2012 -===================== -* Change sender to merge buffers for relatively small payloads, may improve perf in some cases [einaros] -* Avoid EventEmitter for Receiver classes. As above this may improve perf. [einaros] -* Renamed fallback files from the somewhat misleading '*Windows'. [einaros] - -v0.4.18 - June 14th 2012 -===================== -* Fixed incorrect md5 digest encoding in Hixie handshake [nicokaiser] -* Added example of use with Express 3 [einaros] -* Change installation procedure to not require --ws:native to build native extensions. They will now build if a compiler is available. [einaros] - -v0.4.17 - June 13th 2012 -===================== -* Improve error handling during connection handshaking [einaros] -* Ensure that errors are caught also after connection teardown [nicokaiser] -* Update 'mocha' version to 1.1.0. [einaros] -* Stop showing 'undefined' for some error logs. [tricknotes] -* Update 'should' version to 0.6.3 [tricknotes] - -v0.4.16 - June 1st 2012 -===================== -* Build fix for Windows. [einaros] - -v0.4.15 - May 20th 2012 -===================== -* Enable fauxe streaming for hixie tansport. [einaros] -* Allow hixie sender to deal with buffers. [einaros/pigne] -* Allow error code 1011. [einaros] -* Fix framing for empty packets (empty pings and pongs might break). [einaros] -* Improve error and close handling, to avoid connections lingering in CLOSING state. [einaros] - -v0.4.14 - Apr 30th 2012 -===================== -* use node-gyp instead of node-waf [TooTallNate] -* remove old windows compatibility makefile, and silently fall back to native modules [einaros] -* ensure connection status [nicokaiser] -* websocket client updated to use port 443 by default for wss:// connections [einaros] -* support unix sockets [kschzt] - -v0.4.13 - Apr 12th 2012 -===================== - -* circumvent node 0.6+ related memory leak caused by Object.defineProperty [nicokaiser] -* improved error handling, improving stability in massive load use cases [nicokaiser] - -v0.4.12 - Mar 30th 2012 -===================== - -* various memory leak / possible memory leak cleanups [einaros] -* api documentation [nicokaiser] -* add option to disable client tracking [nicokaiser] - -v0.4.11 - Mar 24th 2012 -===================== - -* node v0.7 compatibillity release -* gyp support [TooTallNate] -* commander dependency update [jwueller] -* loadbalancer support [nicokaiser] - -v0.4.10 - Mar 22th 2012 -===================== - -* Final hixie close frame fixes. [nicokaiser] - -v0.4.9 - Mar 21st 2012 -===================== - -* Various hixie bugfixes (such as proper close frame handling). [einaros] - -v0.4.8 - Feb 29th 2012 -===================== - -* Allow verifyClient to run asynchronously [karlsequin] -* Various bugfixes and cleanups. [einaros] - -v0.4.7 - Feb 21st 2012 -===================== - -* Exposed bytesReceived from websocket client object, which makes it possible to implement bandwidth sampling. [einaros] -* Updated browser based file upload example to include and output per websocket channel bandwidth sampling. [einaros] -* Changed build scripts to check which architecture is currently in use. Required after the node.js changes to have prebuilt packages target ia32 by default. [einaros] - -v0.4.6 - Feb 9th 2012 -===================== - -* Added browser based file upload example. [einaros] -* Added server-to-browser status push example. [einaros] -* Exposed pause() and resume() on WebSocket object, to enable client stream shaping. [einaros] - -v0.4.5 - Feb 7th 2012 -===================== - -* Corrected regression bug in handling of connections with the initial frame delivered across both http upgrade head and a standalone packet. This would lead to a race condition, which in some cases could cause message corruption. [einaros] - -v0.4.4 - Feb 6th 2012 -===================== - -* Pass original request object to verifyClient, for cookie or authentication verifications. [einaros] -* Implemented addEventListener and slightly improved the emulation API by adding a MessageEvent with a readonly data attribute. [aslakhellesoy] -* Rewrite parts of hybi receiver to avoid stack overflows for large amounts of packets bundled in the same buffer / packet. [einaros] - -v0.4.3 - Feb 4th 2012 -===================== - -* Prioritized update: Corrected issue which would cause sockets to stay open longer than necessary, and resource leakage because of this. [einaros] - -v0.4.2 - Feb 4th 2012 -===================== - -* Breaking change: WebSocketServer's verifyOrigin option has been renamed to verifyClient. [einaros] -* verifyClient now receives { origin: 'origin header', secure: true/false }, where 'secure' will be true for ssl connections. [einaros] -* Split benchmark, in preparation for more thorough case. [einaros] -* Introduced hixie-76 draft support for server, since Safari (iPhone / iPad / OS X) and Opera still aren't updated to use Hybi. [einaros] -* Expose 'supports' object from WebSocket, to indicate e.g. the underlying transport's support for binary data. [einaros] -* Test and code cleanups. [einaros] - -v0.4.1 - Jan 25th 2012 -===================== - -* Use readline in wscat [tricknotes] -* Refactor _state away, in favor of the new _readyState [tricknotes] -* travis-ci integration [einaros] -* Fixed race condition in testsuite, causing a few tests to fail (without actually indicating errors) on travis [einaros] -* Expose pong event [paddybyers] -* Enabled running of WebSocketServer in noServer-mode, meaning that upgrades are passed in manually. [einaros] -* Reworked connection procedure for WebSocketServer, and cleaned up tests. [einaros] - -v0.4.0 - Jan 2nd 2012 -===================== - -* Windows compatibility [einaros] -* Windows compatible test script [einaros] - -v0.3.9 - Jan 1st 2012 -====================== - -* Improved protocol framing performance [einaros] -* WSS support [kazuyukitanimura] -* WSS tests [einaros] -* readyState exposed [justinlatimer, tricknotes] -* url property exposed [justinlatimer] -* Removed old 'state' property [einaros] -* Test cleanups [einaros] - -v0.3.8 - Dec 27th 2011 -====================== - -* Made it possible to listen on specific paths, which is especially good to have for precreated http servers [einaros] -* Extensive WebSocket / WebSocketServer cleanup, including changing all internal properties to unconfigurable, unenumerable properties [einaros] -* Receiver modifications to ensure even better performance with fragmented sends [einaros] -* Fixed issue in sender.js, which would cause SlowBuffer instances (such as returned from the crypto library's randomBytes) to be copied (and thus be dead slow) [einaros] -* Removed redundant buffer copy in sender.js, which should improve server performance [einaros] - -v0.3.7 - Dec 25nd 2011 -====================== - -* Added a browser based API which uses EventEmitters internally [3rd-Eden] -* Expose request information from upgrade event for websocket server clients [mmalecki] - -v0.3.6 - Dec 19th 2011 -====================== - -* Added option to let WebSocket.Server use an already existing http server [mmalecki] -* Migrating various option structures to use options.js module [einaros] -* Added a few more tests, options and handshake verifications to ensure that faulty connections are dealt with [einaros] -* Code cleanups in Sender and Receiver, to ensure even faster parsing [einaros] - -v0.3.5 - Dec 13th 2011 -====================== - -* Optimized Sender.js, Receiver.js and bufferutil.cc: - * Apply loop-unrolling-like small block copies rather than use node.js Buffer#copy() (which is slow). - * Mask blocks of data using combination of 32bit xor and loop-unrolling, instead of single bytes. - * Keep pre-made send buffer for small transfers. -* Leak fixes and code cleanups. - -v0.3.3 - Dec 12th 2011 -====================== - -* Compile fix for Linux. -* Rewrote parts of WebSocket.js, to avoid try/catch and thus avoid optimizer bailouts. - -v0.3.2 - Dec 11th 2011 -====================== - -* Further performance updates, including the additions of a native BufferUtil module, which deals with several of the cpu intensive WebSocket operations. - -v0.3.1 - Dec 8th 2011 -====================== - -* Service release, fixing broken tests. - -v0.3.0 - Dec 8th 2011 -====================== - -* Node.js v0.4.x compatibility. -* Code cleanups and efficiency improvements. -* WebSocket server added, although this will still mainly be a client library. -* WebSocket server certified to pass the Autobahn test suite. -* Protocol improvements and corrections - such as handling (redundant) masks for empty fragments. -* 'wscat' command line utility added, which can act as either client or server. - -v0.2.6 - Dec 3rd 2011 -====================== - -* Renamed to 'ws'. Big woop, right -- but easy-websocket really just doesn't cut it anymore! - -v0.2.5 - Dec 3rd 2011 -====================== - - * Rewrote much of the WebSocket parser, to ensure high speed for highly fragmented messages. - * Added a BufferPool, as a start to more efficiently deal with allocations for WebSocket connections. More work to come, in that area. - * Updated the Autobahn report, at http://einaros.github.com/easy-websocket, with comparisons against WebSocket-Node 1.0.2 and Chrome 16. - -v0.2.0 - Nov 25th 2011 -====================== - - * Major rework to make sure all the Autobahn test cases pass. Also updated the internal tests to cover more corner cases. - -v0.1.2 - Nov 14th 2011 -====================== - - * Back and forth, back and forth: now settled on keeping the api (event names, methods) closer to the websocket browser api. This will stick now. - * Started keeping this history record. Better late than never, right? diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/Makefile b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/Makefile deleted file mode 100644 index 151aa2ba..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/Makefile +++ /dev/null @@ -1,40 +0,0 @@ -ALL_TESTS = $(shell find test/ -name '*.test.js') -ALL_INTEGRATION = $(shell find test/ -name '*.integration.js') - -all: - node-gyp configure build - -clean: - node-gyp clean - -run-tests: - @./node_modules/.bin/mocha \ - -t 2000 \ - -s 2400 \ - $(TESTFLAGS) \ - $(TESTS) - -run-integrationtests: - @./node_modules/.bin/mocha \ - -t 5000 \ - -s 6000 \ - $(TESTFLAGS) \ - $(TESTS) - -test: - @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests - -integrationtest: - @$(MAKE) NODE_TLS_REJECT_UNAUTHORIZED=0 NODE_PATH=lib TESTS="$(ALL_INTEGRATION)" run-integrationtests - -benchmark: - @node bench/sender.benchmark.js - @node bench/parser.benchmark.js - -autobahn: - @NODE_PATH=lib node test/autobahn.js - -autobahn-server: - @NODE_PATH=lib node test/autobahn-server.js - -.PHONY: test diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/README.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/README.md deleted file mode 100644 index e6646e76..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/README.md +++ /dev/null @@ -1,171 +0,0 @@ -[![Build Status](https://secure.travis-ci.org/einaros/ws.png)](http://travis-ci.org/einaros/ws) - -# ws: a node.js websocket library # - -`ws` is a simple to use websocket implementation, up-to-date against RFC-6455, and [probably the fastest WebSocket library for node.js](http://web.archive.org/web/20130314230536/http://hobbycoding.posterous.com/the-fastest-websocket-module-for-nodejs). - -Passes the quite extensive Autobahn test suite. See http://einaros.github.com/ws for the full reports. - -Comes with a command line utility, `wscat`, which can either act as a server (--listen), or client (--connect); Use it to debug simple websocket services. - -## Protocol support ## - -* **Hixie draft 76** (Old and deprecated, but still in use by Safari and Opera. Added to ws version 0.4.2, but server only. Can be disabled by setting the `disableHixie` option to true.) -* **HyBi drafts 07-12** (Use the option `protocolVersion: 8`, or argument `-p 8` for wscat) -* **HyBi drafts 13-17** (Current default, alternatively option `protocolVersion: 13`, or argument `-p 13` for wscat) - -_See the echo.websocket.org example below for how to use the `protocolVersion` option._ - -## Usage ## - -### Installing ### - -`npm install ws` - -### Sending and receiving text data ### - -```js -var WebSocket = require('ws'); -var ws = new WebSocket('ws://www.host.com/path'); -ws.on('open', function() { - ws.send('something'); -}); -ws.on('message', function(data, flags) { - // flags.binary will be set if a binary data is received - // flags.masked will be set if the data was masked -}); -``` - -### Sending binary data ### - -```js -var WebSocket = require('ws'); -var ws = new WebSocket('ws://www.host.com/path'); -ws.on('open', function() { - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.send(array, {binary: true, mask: true}); -}); -``` - -Setting `mask`, as done for the send options above, will cause the data to be masked according to the websocket protocol. The same option applies for text data. - -### Server example ### - -```js -var WebSocketServer = require('ws').Server - , wss = new WebSocketServer({port: 8080}); -wss.on('connection', function(ws) { - ws.on('message', function(message) { - console.log('received: %s', message); - }); - ws.send('something'); -}); -``` - -### Server sending broadcast data ### - -```js -var WebSocketServer = require('ws').Server - , wss = new WebSocketServer({port: 8080}); - -wss.broadcast = function(data) { - for(var i in this.clients) - this.clients[i].send(data); -}; -``` - -### Error handling best practices ### - -```js -// If the WebSocket is closed before the following send is attempted -ws.send('something'); - -// Errors (both immediate and async write errors) can be detected in an optional callback. -// The callback is also the only way of being notified that data has actually been sent. -ws.send('something', function(error) { - // if error is null, the send has been completed, - // otherwise the error object will indicate what failed. -}); - -// Immediate errors can also be handled with try/catch-blocks, but **note** -// that since sends are inherently asynchronous, socket write failures will *not* -// be captured when this technique is used. -try { - ws.send('something'); -} -catch (e) { - // handle error -} -``` - -### echo.websocket.org demo ### - -```js -var WebSocket = require('ws'); -var ws = new WebSocket('ws://echo.websocket.org/', {protocolVersion: 8, origin: 'http://websocket.org'}); -ws.on('open', function() { - console.log('connected'); - ws.send(Date.now().toString(), {mask: true}); -}); -ws.on('close', function() { - console.log('disconnected'); -}); -ws.on('message', function(data, flags) { - console.log('Roundtrip time: ' + (Date.now() - parseInt(data)) + 'ms', flags); - setTimeout(function() { - ws.send(Date.now().toString(), {mask: true}); - }, 500); -}); -``` - -### wscat against echo.websocket.org ### - - $ npm install -g ws - $ wscat -c ws://echo.websocket.org -p 8 - connected (press CTRL+C to quit) - > hi there - < hi there - > are you a happy parrot? - < are you a happy parrot? - -### Other examples ### - -For a full example with a browser client communicating with a ws server, see the examples folder. - -Note that the usage together with Express 3.0 is quite different from Express 2.x. The difference is expressed in the two different serverstats-examples. - -Otherwise, see the test cases. - -### Running the tests ### - -`make test` - -## API Docs ## - -See the doc/ directory for Node.js-like docs for the ws classes. - -## License ## - -(The MIT License) - -Copyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/parser.benchmark.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/parser.benchmark.js deleted file mode 100644 index ff5f737c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/parser.benchmark.js +++ /dev/null @@ -1,115 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Benchmark dependencies. - */ - -var benchmark = require('benchmark') - , Receiver = require('../').Receiver - , suite = new benchmark.Suite('Receiver'); -require('tinycolor'); -require('./util'); - -/** - * Setup receiver. - */ - -suite.on('start', function () { - receiver = new Receiver(); -}); - -suite.on('cycle', function () { - receiver = new Receiver(); -}); - -/** - * Benchmarks. - */ - -var pingMessage = 'Hello' - , pingPacket1 = getBufferFromHexString('89 ' + (pack(2, 0x80 | pingMessage.length)) + - ' 34 83 a8 68 '+ getHexStringFromBuffer(mask(pingMessage, '34 83 a8 68'))); -suite.add('ping message', function () { - receiver.add(pingPacket1); -}); - -var pingPacket2 = getBufferFromHexString('89 00') -suite.add('ping with no data', function () { - receiver.add(pingPacket2); -}); - -var closePacket = getBufferFromHexString('88 00'); -suite.add('close message', function () { - receiver.add(closePacket); - receiver.endPacket(); -}); - -var maskedTextPacket = getBufferFromHexString('81 93 34 83 a8 68 01 b9 92 52 4f a1 c6 09 59 e6 8a 52 16 e6 cb 00 5b a1 d5'); -suite.add('masked text message', function () { - receiver.add(maskedTextPacket); -}); - -binaryDataPacket = (function() { - var length = 125 - , message = new Buffer(length) - for (var i = 0; i < length; ++i) message[i] = i % 10; - return getBufferFromHexString('82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' - + getHexStringFromBuffer(mask(message), '34 83 a8 68')); -})(); -suite.add('binary data (125 bytes)', function () { - try { - receiver.add(binaryDataPacket); - - } - catch(e) {console.log(e)} -}); - -binaryDataPacket2 = (function() { - var length = 65535 - , message = new Buffer(length) - for (var i = 0; i < length; ++i) message[i] = i % 10; - return getBufferFromHexString('82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' - + getHexStringFromBuffer(mask(message), '34 83 a8 68')); -})(); -suite.add('binary data (65535 bytes)', function () { - receiver.add(binaryDataPacket2); -}); - -binaryDataPacket3 = (function() { - var length = 200*1024 - , message = new Buffer(length) - for (var i = 0; i < length; ++i) message[i] = i % 10; - return getBufferFromHexString('82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' - + getHexStringFromBuffer(mask(message), '34 83 a8 68')); -})(); -suite.add('binary data (200 kB)', function () { - receiver.add(binaryDataPacket3); -}); - -/** - * Output progress. - */ - -suite.on('cycle', function (bench, details) { - console.log('\n ' + suite.name.grey, details.name.white.bold); - console.log(' ' + [ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -/** - * Run/export benchmarks. - */ - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/sender.benchmark.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/sender.benchmark.js deleted file mode 100644 index 20c171a5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/sender.benchmark.js +++ /dev/null @@ -1,66 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Benchmark dependencies. - */ - -var benchmark = require('benchmark') - , Sender = require('../').Sender - , suite = new benchmark.Suite('Sender'); -require('tinycolor'); -require('./util'); - -/** - * Setup sender. - */ - -suite.on('start', function () { - sender = new Sender(); - sender._socket = { write: function() {} }; -}); - -suite.on('cycle', function () { - sender = new Sender(); - sender._socket = { write: function() {} }; -}); - -/** - * Benchmarks - */ - -framePacket = new Buffer(200*1024); -framePacket.fill(99); -suite.add('frameAndSend, unmasked (200 kB)', function () { - sender.frameAndSend(0x2, framePacket, true, false); -}); -suite.add('frameAndSend, masked (200 kB)', function () { - sender.frameAndSend(0x2, framePacket, true, true); -}); - -/** - * Output progress. - */ - -suite.on('cycle', function (bench, details) { - console.log('\n ' + suite.name.grey, details.name.white.bold); - console.log(' ' + [ - details.hz.toFixed(2).cyan + ' ops/sec'.grey - , details.count.toString().white + ' times executed'.grey - , 'benchmark took '.grey + details.times.elapsed.toString().white + ' sec.'.grey - , - ].join(', '.grey)); -}); - -/** - * Run/export benchmarks. - */ - -if (!module.parent) { - suite.run(); -} else { - module.exports = suite; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/speed.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/speed.js deleted file mode 100644 index 3ce64146..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/speed.js +++ /dev/null @@ -1,105 +0,0 @@ -var cluster = require('cluster') - , WebSocket = require('../') - , WebSocketServer = WebSocket.Server - , crypto = require('crypto') - , util = require('util') - , ansi = require('ansi'); -require('tinycolor'); - -function roundPrec(num, prec) { - var mul = Math.pow(10, prec); - return Math.round(num * mul) / mul; -} - -function humanSize(bytes) { - if (bytes >= 1048576) return roundPrec(bytes / 1048576, 2) + ' MB'; - if (bytes >= 1024) return roundPrec(bytes / 1024, 2) + ' kB'; - return roundPrec(bytes, 2) + ' B'; -} - -function generateRandomData(size) { - var buffer = new Buffer(size); - for (var i = 0; i < size; ++i) { - buffer[i] = ~~(Math.random() * 127); - } - return buffer; -} - -if (cluster.isMaster) { - var wss = new WebSocketServer({port: 8181}, function() { - cluster.fork(); - }); - wss.on('connection', function(ws) { - ws.on('message', function(data, flags) { - ws.send(data, {binary: flags&&flags.binary}); - }); - ws.on('close', function() {}); - }); - cluster.on('death', function(worker) { - wss.close(); - }); -} -else { - var cursor = ansi(process.stdout); - - var configs = [ - [true, 10000, 64], - [true, 5000, 16*1024], - [true, 1000, 128*1024], - [true, 100, 1024*1024], - [true, 1, 500*1024*1024], - [false, 10000, 64], - [false, 5000, 16*1024], - [false, 1000, 128*1024], - [false, 100, 1024*1024], - ]; - - var largest = configs[0][1]; - for (var i = 0, l = configs.length; i < l; ++i) { - if (configs[i][2] > largest) largest = configs[i][2]; - } - - console.log('Generating %s of test data ...', humanSize(largest)); - var randomBytes = generateRandomData(largest); - - function roundtrip(useBinary, roundtrips, size, cb) { - var data = randomBytes.slice(0, size); - var prefix = util.format('Running %d roundtrips of %s %s data', roundtrips, humanSize(size), useBinary ? 'binary' : 'text'); - console.log(prefix); - var client = new WebSocket('ws://localhost:' + '8181'); - var dt; - var roundtrip = 0; - function send() { - client.send(data, {binary: useBinary}); - } - client.on('error', function(e) { - console.error(e); - process.exit(); - }); - client.on('open', function() { - dt = Date.now(); - send(); - }); - client.on('message', function(data, flags) { - if (++roundtrip == roundtrips) { - var elapsed = Date.now() - dt; - cursor.up(); - console.log('%s:\t%ss\t%s' - , useBinary ? prefix.green : prefix.cyan - , roundPrec(elapsed / 1000, 1).toString().green.bold - , (humanSize((size * roundtrips) / elapsed * 1000) + '/s').blue.bold); - client.close(); - cb(); - return; - } - process.nextTick(send); - }); - } - - (function run() { - if (configs.length == 0) process.exit(); - var config = configs.shift(); - config.push(run); - roundtrip.apply(null, config); - })(); -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/util.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/util.js deleted file mode 100644 index 5f012819..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bench/util.js +++ /dev/null @@ -1,105 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Returns a Buffer from a "ff 00 ff"-type hex string. - */ - -getBufferFromHexString = function(byteStr) { - var bytes = byteStr.split(' '); - var buf = new Buffer(bytes.length); - for (var i = 0; i < bytes.length; ++i) { - buf[i] = parseInt(bytes[i], 16); - } - return buf; -} - -/** - * Returns a hex string from a Buffer. - */ - -getHexStringFromBuffer = function(data) { - var s = ''; - for (var i = 0; i < data.length; ++i) { - s += padl(data[i].toString(16), 2, '0') + ' '; - } - return s.trim(); -} - -/** - * Splits a buffer in two parts. - */ - -splitBuffer = function(buffer) { - var b1 = new Buffer(Math.ceil(buffer.length / 2)); - buffer.copy(b1, 0, 0, b1.length); - var b2 = new Buffer(Math.floor(buffer.length / 2)); - buffer.copy(b2, 0, b1.length, b1.length + b2.length); - return [b1, b2]; -} - -/** - * Performs hybi07+ type masking on a hex string or buffer. - */ - -mask = function(buf, maskString) { - if (typeof buf == 'string') buf = new Buffer(buf); - var mask = getBufferFromHexString(maskString || '34 83 a8 68'); - for (var i = 0; i < buf.length; ++i) { - buf[i] ^= mask[i % 4]; - } - return buf; -} - -/** - * Returns a hex string representing the length of a message - */ - -getHybiLengthAsHexString = function(len, masked) { - if (len < 126) { - var buf = new Buffer(1); - buf[0] = (masked ? 0x80 : 0) | len; - } - else if (len < 65536) { - var buf = new Buffer(3); - buf[0] = (masked ? 0x80 : 0) | 126; - getBufferFromHexString(pack(4, len)).copy(buf, 1); - } - else { - var buf = new Buffer(9); - buf[0] = (masked ? 0x80 : 0) | 127; - getBufferFromHexString(pack(16, len)).copy(buf, 1); - } - return getHexStringFromBuffer(buf); -} - -/** - * Unpacks a Buffer into a number. - */ - -unpack = function(buffer) { - var n = 0; - for (var i = 0; i < buffer.length; ++i) { - n = (i == 0) ? buffer[i] : (n * 256) + buffer[i]; - } - return n; -} - -/** - * Returns a hex string, representing a specific byte count 'length', from a number. - */ - -pack = function(length, number) { - return padl(number.toString(16), length, '0').replace(/([0-9a-f][0-9a-f])/gi, '$1 ').trim(); -} - -/** - * Left pads the string 's' to a total length of 'n' with char 'c'. - */ - -padl = function(s, n, c) { - return new Array(1 + n - s.length).join(c) + s; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bin/wscat b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bin/wscat deleted file mode 100755 index 0ec894df..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/bin/wscat +++ /dev/null @@ -1,190 +0,0 @@ -#!/usr/bin/env node - -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var WebSocket = require('../') - , fs = require('fs') - , program = require('commander') - , util = require('util') - , events = require('events') - , readline = require('readline'); - -/** - * InputReader - processes console input - */ - -function Console() { - this.stdin = process.stdin; - this.stdout = process.stdout; - - this.readlineInterface = readline.createInterface(this.stdin, this.stdout); - - var self = this; - this.readlineInterface.on('line', function(data) { - self.emit('line', data); - }); - this.readlineInterface.on('close', function() { - self.emit('close'); - }); - - this._resetInput = function() { - self.clear(); - } -} -util.inherits(Console, events.EventEmitter); - -Console.Colors = { - Red: '\033[31m', - Green: '\033[32m', - Yellow: '\033[33m', - Blue: '\033[34m', - Default: '\033[39m' -}; - -Console.prototype.prompt = function() { - this.readlineInterface.prompt(); -} - -Console.prototype.print = function(msg, color) { - this.clear(); - color = color || Console.Colors.Default; - this.stdout.write(color + msg + Console.Colors.Default + '\n'); - this.prompt(); -} - -Console.prototype.clear = function() { - this.stdout.write('\033[2K\033[E'); -} - -Console.prototype.pause = function() { - this.stdin.on('keypress', this._resetInput); -} - -Console.prototype.resume = function() { - this.stdin.removeListener('keypress', this._resetInput); -} - -/** - * The actual application - */ - -var version = JSON.parse(fs.readFileSync(__dirname + '/../package.json', 'utf8')).version; -program - .version(version) - .usage('[options] ') - .option('-l, --listen ', 'listen on port') - .option('-c, --connect ', 'connect to a websocket server') - .option('-p, --protocol ', 'optional protocol version') - .option('-o, --origin ', 'optional origin') - .option('--host ', 'optional host') - .option('-s, --subprotocol ', 'optional subprotocol') - .parse(process.argv); - -if (program.listen && program.connect) { - console.error('\033[33merror: use either --listen or --connect\033[39m'); - process.exit(-1); -} -else if (program.listen) { - var wsConsole = new Console(); - wsConsole.pause(); - var options = {}; - if (program.protocol) options.protocolVersion = program.protocol; - if (program.origin) options.origin = program.origin; - if (program.subprotocol) options.protocol = program.subprotocol; - var ws = null; - var wss = new WebSocket.Server({port: program.listen}, function() { - wsConsole.print('listening on port ' + program.listen + ' (press CTRL+C to quit)', Console.Colors.Green); - wsConsole.clear(); - }); - wsConsole.on('close', function() { - if (ws) { - try { - ws.close(); - } - catch (e) {} - } - process.exit(0); - }); - wsConsole.on('line', function(data) { - if (ws) { - ws.send(data, {mask: false}); - wsConsole.prompt(); - } - }); - wss.on('connection', function(newClient) { - if (ws) { - // limit to one client - newClient.terminate(); - return; - }; - ws = newClient; - wsConsole.resume(); - wsConsole.prompt(); - wsConsole.print('client connected', Console.Colors.Green); - ws.on('close', function() { - wsConsole.print('disconnected', Console.Colors.Green); - wsConsole.clear(); - wsConsole.pause(); - ws = null; - }); - ws.on('error', function(code, description) { - wsConsole.print('error: ' + code + (description ? ' ' + description : ''), Console.Colors.Yellow); - }); - ws.on('message', function(data, flags) { - wsConsole.print('< ' + data, Console.Colors.Blue); - }); - }); - wss.on('error', function(error) { - wsConsole.print('error: ' + error.toString(), Console.Colors.Yellow); - process.exit(-1); - }); -} -else if (program.connect) { - var wsConsole = new Console(); - var options = {}; - if (program.protocol) options.protocolVersion = program.protocol; - if (program.origin) options.origin = program.origin; - if (program.subprotocol) options.protocol = program.subprotocol; - if (program.host) options.host = program.host; - var ws = new WebSocket(program.connect, options); - ws.on('open', function() { - wsConsole.print('connected (press CTRL+C to quit)', Console.Colors.Green); - wsConsole.on('line', function(data) { - ws.send(data, {mask: true}); - wsConsole.prompt(); - }); - }); - ws.on('close', function() { - wsConsole.print('disconnected', Console.Colors.Green); - wsConsole.clear(); - process.exit(); - }); - ws.on('error', function(code, description) { - wsConsole.print('error: ' + code + (description ? ' ' + description : ''), Console.Colors.Yellow); - process.exit(-1); - }); - ws.on('message', function(data, flags) { - wsConsole.print('< ' + data, Console.Colors.Blue); - }); - wsConsole.on('close', function() { - if (ws) { - try { - ws.close(); - } - catch(e) {} - process.exit(); - } - }); -} -else { - console.error('\033[33merror: use either --listen or --connect\033[39m'); - process.exit(-1); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/binding.gyp b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/binding.gyp deleted file mode 100644 index c9b4d1a4..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/binding.gyp +++ /dev/null @@ -1,16 +0,0 @@ -{ - 'targets': [ - { - 'target_name': 'validation', - 'include_dirs': ["> $(depfile) -# Add extra rules as in (2). -# We remove slashes and replace spaces with new lines; -# remove blank lines; -# delete the first line and append a colon to the remaining lines. -sed -e 's|\\||' -e 'y| |\n|' $(depfile).raw |\ - grep -v '^$$' |\ - sed -e 1d -e 's|$$|:|' \ - >> $(depfile) -rm $(depfile).raw -endef - -# Command definitions: -# - cmd_foo is the actual command to run; -# - quiet_cmd_foo is the brief-output summary of the command. - -quiet_cmd_cc = CC($(TOOLSET)) $@ -cmd_cc = $(CC.$(TOOLSET)) $(GYP_CFLAGS) $(DEPFLAGS) $(CFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_cxx = CXX($(TOOLSET)) $@ -cmd_cxx = $(CXX.$(TOOLSET)) $(GYP_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< - -quiet_cmd_objc = CXX($(TOOLSET)) $@ -cmd_objc = $(CC.$(TOOLSET)) $(GYP_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< - -quiet_cmd_objcxx = CXX($(TOOLSET)) $@ -cmd_objcxx = $(CXX.$(TOOLSET)) $(GYP_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# Commands for precompiled header files. -quiet_cmd_pch_c = CXX($(TOOLSET)) $@ -cmd_pch_c = $(CC.$(TOOLSET)) $(GYP_PCH_CFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_cc = CXX($(TOOLSET)) $@ -cmd_pch_cc = $(CC.$(TOOLSET)) $(GYP_PCH_CXXFLAGS) $(DEPFLAGS) $(CXXFLAGS.$(TOOLSET)) -c -o $@ $< -quiet_cmd_pch_m = CXX($(TOOLSET)) $@ -cmd_pch_m = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCFLAGS) $(DEPFLAGS) -c -o $@ $< -quiet_cmd_pch_mm = CXX($(TOOLSET)) $@ -cmd_pch_mm = $(CC.$(TOOLSET)) $(GYP_PCH_OBJCXXFLAGS) $(DEPFLAGS) -c -o $@ $< - -# gyp-mac-tool is written next to the root Makefile by gyp. -# Use $(4) for the command, since $(2) and $(3) are used as flag by do_cmd -# already. -quiet_cmd_mac_tool = MACTOOL $(4) $< -cmd_mac_tool = ./gyp-mac-tool $(4) $< "$@" - -quiet_cmd_mac_package_framework = PACKAGE FRAMEWORK $@ -cmd_mac_package_framework = ./gyp-mac-tool package-framework "$@" $(4) - -quiet_cmd_infoplist = INFOPLIST $@ -cmd_infoplist = $(CC.$(TOOLSET)) -E -P -Wno-trigraphs -x c $(INFOPLIST_DEFINES) "$<" -o "$@" - -quiet_cmd_touch = TOUCH $@ -cmd_touch = touch $@ - -quiet_cmd_copy = COPY $@ -# send stderr to /dev/null to ignore messages when linking directories. -cmd_copy = rm -rf "$@" && cp -af "$<" "$@" - -quiet_cmd_alink = LIBTOOL-STATIC $@ -cmd_alink = rm -f $@ && ./gyp-mac-tool filter-libtool libtool $(GYP_LIBTOOLFLAGS) -static -o $@ $(filter %.o,$^) - -quiet_cmd_link = LINK($(TOOLSET)) $@ -cmd_link = $(LINK.$(TOOLSET)) $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -# TODO(thakis): Find out and document the difference between shared_library and -# loadable_module on mac. -quiet_cmd_solink = SOLINK($(TOOLSET)) $@ -cmd_solink = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o "$@" $(LD_INPUTS) $(LIBS) - -# TODO(thakis): The solink_module rule is likely wrong. Xcode seems to pass -# -bundle -single_module here (for osmesa.so). -quiet_cmd_solink_module = SOLINK_MODULE($(TOOLSET)) $@ -cmd_solink_module = $(LINK.$(TOOLSET)) -shared $(GYP_LDFLAGS) $(LDFLAGS.$(TOOLSET)) -o $@ $(filter-out FORCE_DO_CMD, $^) $(LIBS) - - -# Define an escape_quotes function to escape single quotes. -# This allows us to handle quotes properly as long as we always use -# use single quotes and escape_quotes. -escape_quotes = $(subst ','\'',$(1)) -# This comment is here just to include a ' to unconfuse syntax highlighting. -# Define an escape_vars function to escape '$' variable syntax. -# This allows us to read/write command lines with shell variables (e.g. -# $LD_LIBRARY_PATH), without triggering make substitution. -escape_vars = $(subst $$,$$$$,$(1)) -# Helper that expands to a shell command to echo a string exactly as it is in -# make. This uses printf instead of echo because printf's behaviour with respect -# to escape sequences is more portable than echo's across different shells -# (e.g., dash, bash). -exact_echo = printf '%s\n' '$(call escape_quotes,$(1))' - -# Helper to compare the command we're about to run against the command -# we logged the last time we ran the command. Produces an empty -# string (false) when the commands match. -# Tricky point: Make has no string-equality test function. -# The kernel uses the following, but it seems like it would have false -# positives, where one string reordered its arguments. -# arg_check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ -# $(filter-out $(cmd_$@), $(cmd_$(1)))) -# We instead substitute each for the empty string into the other, and -# say they're equal if both substitutions produce the empty string. -# .d files contain ? instead of spaces, take that into account. -command_changed = $(or $(subst $(cmd_$(1)),,$(cmd_$(call replace_spaces,$@))),\ - $(subst $(cmd_$(call replace_spaces,$@)),,$(cmd_$(1)))) - -# Helper that is non-empty when a prerequisite changes. -# Normally make does this implicitly, but we force rules to always run -# so we can check their command lines. -# $? -- new prerequisites -# $| -- order-only dependencies -prereq_changed = $(filter-out FORCE_DO_CMD,$(filter-out $|,$?)) - -# Helper that executes all postbuilds until one fails. -define do_postbuilds - @E=0;\ - for p in $(POSTBUILDS); do\ - eval $$p;\ - E=$$?;\ - if [ $$E -ne 0 ]; then\ - break;\ - fi;\ - done;\ - if [ $$E -ne 0 ]; then\ - rm -rf "$@";\ - exit $$E;\ - fi -endef - -# do_cmd: run a command via the above cmd_foo names, if necessary. -# Should always run for a given target to handle command-line changes. -# Second argument, if non-zero, makes it do asm/C/C++ dependency munging. -# Third argument, if non-zero, makes it do POSTBUILDS processing. -# Note: We intentionally do NOT call dirx for depfile, since it contains ? for -# spaces already and dirx strips the ? characters. -define do_cmd -$(if $(or $(command_changed),$(prereq_changed)), - @$(call exact_echo, $($(quiet)cmd_$(1))) - @mkdir -p "$(call dirx,$@)" "$(dir $(depfile))" - $(if $(findstring flock,$(word 2,$(cmd_$1))), - @$(cmd_$(1)) - @echo " $(quiet_cmd_$(1)): Finished", - @$(cmd_$(1)) - ) - @$(call exact_echo,$(call escape_vars,cmd_$(call replace_spaces,$@) := $(cmd_$(1)))) > $(depfile) - @$(if $(2),$(fixup_dep)) - $(if $(and $(3), $(POSTBUILDS)), - $(call do_postbuilds) - ) -) -endef - -# Declare the "all" target first so it is the default, -# even though we don't have the deps yet. -.PHONY: all -all: - -# make looks for ways to re-generate included makefiles, but in our case, we -# don't have a direct way. Explicitly telling make that it has nothing to do -# for them makes it go faster. -%.d: ; - -# Use FORCE_DO_CMD to force a target to run. Should be coupled with -# do_cmd. -.PHONY: FORCE_DO_CMD -FORCE_DO_CMD: - -TOOLSET := target -# Suffix rules, putting all outputs into $(obj). -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.m FORCE_DO_CMD - @$(call do_cmd,objc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.mm FORCE_DO_CMD - @$(call do_cmd,objcxx,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(srcdir)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -# Try building from generated source, too. -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.m FORCE_DO_CMD - @$(call do_cmd,objc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.mm FORCE_DO_CMD - @$(call do_cmd,objcxx,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj).$(TOOLSET)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - -$(obj).$(TOOLSET)/%.o: $(obj)/%.c FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cpp FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.cxx FORCE_DO_CMD - @$(call do_cmd,cxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.m FORCE_DO_CMD - @$(call do_cmd,objc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.mm FORCE_DO_CMD - @$(call do_cmd,objcxx,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.S FORCE_DO_CMD - @$(call do_cmd,cc,1) -$(obj).$(TOOLSET)/%.o: $(obj)/%.s FORCE_DO_CMD - @$(call do_cmd,cc,1) - - -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,bufferutil.target.mk)))),) - include bufferutil.target.mk -endif -ifeq ($(strip $(foreach prefix,$(NO_LOAD),\ - $(findstring $(join ^,$(prefix)),\ - $(join ^,validation.target.mk)))),) - include validation.target.mk -endif - -quiet_cmd_regen_makefile = ACTION Regenerating $@ -cmd_regen_makefile = /usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp -fmake --ignore-environment "--toplevel-dir=." -I/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi -I/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi -I/Users/izhukov/.node-gyp/0.10.22/common.gypi "--depth=." "-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" "-Dnode_root_dir=/Users/izhukov/.node-gyp/0.10.22" "-Dmodule_root_dir=/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws" binding.gyp -Makefile: $(srcdir)/../../../../../../../../../../.node-gyp/0.10.22/common.gypi $(srcdir)/build/config.gypi $(srcdir)/binding.gyp $(srcdir)/../../../../../../../../../../../../usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi - $(call do_cmd,regen_makefile) - -# "all" is a concatenation of the "all" targets from all the included -# sub-makefiles. This is just here to clarify. -all: - -# Add in dependency-tracking rules. $(all_deps) is the list of every single -# target in our tree. Only consider the ones with .d (dependency) info: -d_files := $(wildcard $(foreach f,$(all_deps),$(depsdir)/$(f).d)) -ifneq ($(d_files),) - include $(d_files) -endif diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d deleted file mode 100644 index 8b191311..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/bufferutil.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/bufferutil.node := ./gyp-mac-tool flock ./Release/linker.lock c++ -shared -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -install_name @rpath/bufferutil.node -o Release/bufferutil.node Release/obj.target/bufferutil/src/bufferutil.o -undefined dynamic_lookup diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d deleted file mode 100644 index 96b92036..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d +++ /dev/null @@ -1,23 +0,0 @@ -cmd_Release/obj.target/bufferutil/src/bufferutil.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/izhukov/.node-gyp/0.10.22/src -I/Users/izhukov/.node-gyp/0.10.22/deps/uv/include -I/Users/izhukov/.node-gyp/0.10.22/deps/v8/include -I/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/bufferutil/src/bufferutil.o.d.raw -c -o Release/obj.target/bufferutil/src/bufferutil.o ../src/bufferutil.cc -Release/obj.target/bufferutil/src/bufferutil.o: ../src/bufferutil.cc \ - /Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8stdint.h \ - /Users/izhukov/.node-gyp/0.10.22/src/node.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-unix.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/ngx-queue.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-darwin.h \ - /Users/izhukov/.node-gyp/0.10.22/src/node_object_wrap.h \ - /Users/izhukov/.node-gyp/0.10.22/src/node_buffer.h \ - /Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h -../src/bufferutil.cc: -/Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8.h: -/Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8stdint.h: -/Users/izhukov/.node-gyp/0.10.22/src/node.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-unix.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/ngx-queue.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-darwin.h: -/Users/izhukov/.node-gyp/0.10.22/src/node_object_wrap.h: -/Users/izhukov/.node-gyp/0.10.22/src/node_buffer.h: -/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h: diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d deleted file mode 100644 index e327f957..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/obj.target/validation/src/validation.o.d +++ /dev/null @@ -1,23 +0,0 @@ -cmd_Release/obj.target/validation/src/validation.o := c++ '-D_DARWIN_USE_64_BIT_INODE=1' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DBUILDING_NODE_EXTENSION' -I/Users/izhukov/.node-gyp/0.10.22/src -I/Users/izhukov/.node-gyp/0.10.22/deps/uv/include -I/Users/izhukov/.node-gyp/0.10.22/deps/v8/include -I/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan -Os -gdwarf-2 -mmacosx-version-min=10.5 -arch x86_64 -Wall -Wendif-labels -W -Wno-unused-parameter -fno-rtti -fno-exceptions -fno-threadsafe-statics -fno-strict-aliasing -MMD -MF ./Release/.deps/Release/obj.target/validation/src/validation.o.d.raw -c -o Release/obj.target/validation/src/validation.o ../src/validation.cc -Release/obj.target/validation/src/validation.o: ../src/validation.cc \ - /Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8stdint.h \ - /Users/izhukov/.node-gyp/0.10.22/src/node.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-unix.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/ngx-queue.h \ - /Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-darwin.h \ - /Users/izhukov/.node-gyp/0.10.22/src/node_object_wrap.h \ - /Users/izhukov/.node-gyp/0.10.22/src/node_buffer.h \ - /Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h -../src/validation.cc: -/Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8.h: -/Users/izhukov/.node-gyp/0.10.22/deps/v8/include/v8stdint.h: -/Users/izhukov/.node-gyp/0.10.22/src/node.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-unix.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/ngx-queue.h: -/Users/izhukov/.node-gyp/0.10.22/deps/uv/include/uv-private/uv-darwin.h: -/Users/izhukov/.node-gyp/0.10.22/src/node_object_wrap.h: -/Users/izhukov/.node-gyp/0.10.22/src/node_buffer.h: -/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h: diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/validation.node.d b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/validation.node.d deleted file mode 100644 index 869c91e2..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/.deps/Release/validation.node.d +++ /dev/null @@ -1 +0,0 @@ -cmd_Release/validation.node := ./gyp-mac-tool flock ./Release/linker.lock c++ -shared -Wl,-search_paths_first -mmacosx-version-min=10.5 -arch x86_64 -L./Release -install_name @rpath/validation.node -o Release/validation.node Release/obj.target/validation/src/validation.o -undefined dynamic_lookup diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/bufferutil.node b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/bufferutil.node deleted file mode 100755 index 192474d8..00000000 Binary files a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/bufferutil.node and /dev/null differ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/linker.lock b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/linker.lock deleted file mode 100644 index e69de29b..00000000 diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o deleted file mode 100644 index c6615bb2..00000000 Binary files a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/bufferutil/src/bufferutil.o and /dev/null differ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation/src/validation.o b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation/src/validation.o deleted file mode 100644 index 62b54ece..00000000 Binary files a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/obj.target/validation/src/validation.o and /dev/null differ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/validation.node b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/validation.node deleted file mode 100755 index 054cdc48..00000000 Binary files a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/Release/validation.node and /dev/null differ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile deleted file mode 100644 index a69b3d2c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/binding.Makefile +++ /dev/null @@ -1,6 +0,0 @@ -# This file is generated by gyp; do not edit. - -export builddir_name ?= build/./. -.PHONY: all -all: - $(MAKE) bufferutil validation diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/bufferutil.target.mk b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/bufferutil.target.mk deleted file mode 100644 index 9d47e6e9..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/bufferutil.target.mk +++ /dev/null @@ -1,158 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := bufferutil -DEFS_Debug := \ - '-D_DARWIN_USE_64_BIT_INODE=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' \ - '-DDEBUG' \ - '-D_DEBUG' - -# Flags passed to all source files. -CFLAGS_Debug := \ - -O0 \ - -gdwarf-2 \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -Wall \ - -Wendif-labels \ - -W \ - -Wno-unused-parameter - -# Flags passed to only C files. -CFLAGS_C_Debug := \ - -fno-strict-aliasing - -# Flags passed to only C++ files. -CFLAGS_CC_Debug := \ - -fno-rtti \ - -fno-exceptions \ - -fno-threadsafe-statics \ - -fno-strict-aliasing - -# Flags passed to only ObjC files. -CFLAGS_OBJC_Debug := - -# Flags passed to only ObjC++ files. -CFLAGS_OBJCC_Debug := - -INCS_Debug := \ - -I/Users/izhukov/.node-gyp/0.10.22/src \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/uv/include \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/v8/include \ - -I/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan - -DEFS_Release := \ - '-D_DARWIN_USE_64_BIT_INODE=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -Os \ - -gdwarf-2 \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -Wall \ - -Wendif-labels \ - -W \ - -Wno-unused-parameter - -# Flags passed to only C files. -CFLAGS_C_Release := \ - -fno-strict-aliasing - -# Flags passed to only C++ files. -CFLAGS_CC_Release := \ - -fno-rtti \ - -fno-exceptions \ - -fno-threadsafe-statics \ - -fno-strict-aliasing - -# Flags passed to only ObjC files. -CFLAGS_OBJC_Release := - -# Flags passed to only ObjC++ files. -CFLAGS_OBJCC_Release := - -INCS_Release := \ - -I/Users/izhukov/.node-gyp/0.10.22/src \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/uv/include \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/v8/include \ - -I/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan - -OBJS := \ - $(obj).target/$(TARGET)/src/bufferutil.o - -# Add to the list of files we specially track dependencies for. -all_deps += $(OBJS) - -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual. -$(OBJS): TOOLSET := $(TOOLSET) -$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) -$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) -$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE)) -$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE)) - -# Suffix rules, putting all outputs into $(obj). - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# Try building from generated source, too. - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# End of this set of suffix rules -### Rules for final target. -LDFLAGS_Debug := \ - -Wl,-search_paths_first \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -L$(builddir) \ - -install_name @rpath/bufferutil.node - -LIBTOOLFLAGS_Debug := \ - -Wl,-search_paths_first - -LDFLAGS_Release := \ - -Wl,-search_paths_first \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -L$(builddir) \ - -install_name @rpath/bufferutil.node - -LIBTOOLFLAGS_Release := \ - -Wl,-search_paths_first - -LIBS := \ - -undefined dynamic_lookup - -$(builddir)/bufferutil.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) -$(builddir)/bufferutil.node: LIBS := $(LIBS) -$(builddir)/bufferutil.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE)) -$(builddir)/bufferutil.node: TOOLSET := $(TOOLSET) -$(builddir)/bufferutil.node: $(OBJS) FORCE_DO_CMD - $(call do_cmd,solink_module) - -all_deps += $(builddir)/bufferutil.node -# Add target alias -.PHONY: bufferutil -bufferutil: $(builddir)/bufferutil.node - -# Short alias for building this executable. -.PHONY: bufferutil.node -bufferutil.node: $(builddir)/bufferutil.node - -# Add executable to "all" target. -.PHONY: all -all: $(builddir)/bufferutil.node - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi deleted file mode 100644 index ebe1f41a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/config.gypi +++ /dev/null @@ -1,112 +0,0 @@ -# Do not edit. File was generated by node-gyp's "configure" step -{ - "target_defaults": { - "cflags": [], - "default_configuration": "Release", - "defines": [], - "include_dirs": [], - "libraries": [] - }, - "variables": { - "clang": 1, - "host_arch": "x64", - "node_install_npm": "true", - "node_prefix": "", - "node_shared_cares": "false", - "node_shared_http_parser": "false", - "node_shared_libuv": "false", - "node_shared_openssl": "false", - "node_shared_v8": "false", - "node_shared_zlib": "false", - "node_tag": "", - "node_unsafe_optimizations": 0, - "node_use_dtrace": "true", - "node_use_etw": "false", - "node_use_openssl": "true", - "node_use_perfctr": "false", - "python": "/usr/bin/python", - "target_arch": "x64", - "v8_enable_gdbjit": 0, - "v8_no_strict_aliasing": 1, - "v8_use_snapshot": "false", - "nodedir": "/Users/izhukov/.node-gyp/0.10.22", - "copy_dev_lib": "true", - "standalone_static_library": 1, - "save_dev": "true", - "browser": "", - "viewer": "man", - "rollback": "true", - "usage": "", - "globalignorefile": "/usr/local/etc/npmignore", - "init_author_url": "", - "shell": "/bin/bash", - "parseable": "", - "shrinkwrap": "true", - "userignorefile": "/Users/izhukov/.npmignore", - "cache_max": "null", - "init_author_email": "", - "sign_git_tag": "", - "ignore": "", - "long": "", - "registry": "https://registry.npmjs.org/", - "fetch_retries": "2", - "npat": "", - "message": "%s", - "versions": "", - "globalconfig": "/usr/local/etc/npmrc", - "always_auth": "", - "cache_lock_retries": "10", - "fetch_retry_mintimeout": "10000", - "proprietary_attribs": "true", - "coverage": "", - "json": "", - "pre": "", - "description": "true", - "engine_strict": "", - "https_proxy": "", - "init_module": "/Users/izhukov/.npm-init.js", - "userconfig": "/Users/izhukov/.npmrc", - "npaturl": "http://npat.npmjs.org/", - "node_version": "v0.10.22", - "user": "", - "editor": "vi", - "save": "", - "tag": "latest", - "global": "", - "optional": "true", - "username": "", - "bin_links": "true", - "force": "", - "searchopts": "", - "depth": "null", - "rebuild_bundle": "true", - "searchsort": "name", - "unicode": "true", - "yes": "", - "fetch_retry_maxtimeout": "60000", - "strict_ssl": "true", - "dev": "", - "fetch_retry_factor": "10", - "group": "20", - "cache_lock_stale": "60000", - "version": "", - "cache_min": "10", - "cache": "/Users/izhukov/.npm", - "searchexclude": "", - "color": "true", - "save_optional": "", - "user_agent": "node/v0.10.22 darwin x64", - "cache_lock_wait": "10000", - "production": "", - "save_bundle": "", - "init_version": "0.0.0", - "umask": "18", - "git": "git", - "init_author_name": "", - "onload_script": "", - "tmp": "/var/folders/2l/8552b3mn10jdp069ksjlh5000000gn/T/", - "unsafe_perm": "true", - "link": "", - "prefix": "/usr/local" - } -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/gyp-mac-tool b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/gyp-mac-tool deleted file mode 100755 index 2f5e141f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/gyp-mac-tool +++ /dev/null @@ -1,224 +0,0 @@ -#!/usr/bin/env python -# Generated by gyp. Do not edit. -# Copyright (c) 2012 Google Inc. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -"""Utility functions to perform Xcode-style build steps. - -These functions are executed via gyp-mac-tool when using the Makefile generator. -""" - -import fcntl -import os -import plistlib -import re -import shutil -import string -import subprocess -import sys - - -def main(args): - executor = MacTool() - exit_code = executor.Dispatch(args) - if exit_code is not None: - sys.exit(exit_code) - - -class MacTool(object): - """This class performs all the Mac tooling steps. The methods can either be - executed directly, or dispatched from an argument list.""" - - def Dispatch(self, args): - """Dispatches a string command to a method.""" - if len(args) < 1: - raise Exception("Not enough arguments") - - method = "Exec%s" % self._CommandifyName(args[0]) - return getattr(self, method)(*args[1:]) - - def _CommandifyName(self, name_string): - """Transforms a tool name like copy-info-plist to CopyInfoPlist""" - return name_string.title().replace('-', '') - - def ExecCopyBundleResource(self, source, dest): - """Copies a resource file to the bundle/Resources directory, performing any - necessary compilation on each resource.""" - extension = os.path.splitext(source)[1].lower() - if os.path.isdir(source): - # Copy tree. - if os.path.exists(dest): - shutil.rmtree(dest) - shutil.copytree(source, dest) - elif extension == '.xib': - return self._CopyXIBFile(source, dest) - elif extension == '.strings': - self._CopyStringsFile(source, dest) - else: - shutil.copyfile(source, dest) - - def _CopyXIBFile(self, source, dest): - """Compiles a XIB file with ibtool into a binary plist in the bundle.""" - tools_dir = os.environ.get('DEVELOPER_BIN_DIR', '/usr/bin') - args = [os.path.join(tools_dir, 'ibtool'), '--errors', '--warnings', - '--notices', '--output-format', 'human-readable-text', '--compile', - dest, source] - ibtool_section_re = re.compile(r'/\*.*\*/') - ibtool_re = re.compile(r'.*note:.*is clipping its content') - ibtoolout = subprocess.Popen(args, stdout=subprocess.PIPE) - current_section_header = None - for line in ibtoolout.stdout: - if ibtool_section_re.match(line): - current_section_header = line - elif not ibtool_re.match(line): - if current_section_header: - sys.stdout.write(current_section_header) - current_section_header = None - sys.stdout.write(line) - return ibtoolout.returncode - - def _CopyStringsFile(self, source, dest): - """Copies a .strings file using iconv to reconvert the input into UTF-16.""" - input_code = self._DetectInputEncoding(source) or "UTF-8" - - # Xcode's CpyCopyStringsFile / builtin-copyStrings seems to call - # CFPropertyListCreateFromXMLData() behind the scenes; at least it prints - # CFPropertyListCreateFromXMLData(): Old-style plist parser: missing - # semicolon in dictionary. - # on invalid files. Do the same kind of validation. - import CoreFoundation - s = open(source).read() - d = CoreFoundation.CFDataCreate(None, s, len(s)) - _, error = CoreFoundation.CFPropertyListCreateFromXMLData(None, d, 0, None) - if error: - return - - fp = open(dest, 'w') - args = ['/usr/bin/iconv', '--from-code', input_code, '--to-code', - 'UTF-16', source] - subprocess.call(args, stdout=fp) - fp.close() - - def _DetectInputEncoding(self, file_name): - """Reads the first few bytes from file_name and tries to guess the text - encoding. Returns None as a guess if it can't detect it.""" - fp = open(file_name, 'rb') - try: - header = fp.read(3) - except e: - fp.close() - return None - fp.close() - if header.startswith("\xFE\xFF"): - return "UTF-16BE" - elif header.startswith("\xFF\xFE"): - return "UTF-16LE" - elif header.startswith("\xEF\xBB\xBF"): - return "UTF-8" - else: - return None - - def ExecCopyInfoPlist(self, source, dest): - """Copies the |source| Info.plist to the destination directory |dest|.""" - # Read the source Info.plist into memory. - fd = open(source, 'r') - lines = fd.read() - fd.close() - - # Go through all the environment variables and replace them as variables in - # the file. - for key in os.environ: - if key.startswith('_'): - continue - evar = '${%s}' % key - lines = string.replace(lines, evar, os.environ[key]) - - # Write out the file with variables replaced. - fd = open(dest, 'w') - fd.write(lines) - fd.close() - - # Now write out PkgInfo file now that the Info.plist file has been - # "compiled". - self._WritePkgInfo(dest) - - def _WritePkgInfo(self, info_plist): - """This writes the PkgInfo file from the data stored in Info.plist.""" - plist = plistlib.readPlist(info_plist) - if not plist: - return - - # Only create PkgInfo for executable types. - package_type = plist['CFBundlePackageType'] - if package_type != 'APPL': - return - - # The format of PkgInfo is eight characters, representing the bundle type - # and bundle signature, each four characters. If that is missing, four - # '?' characters are used instead. - signature_code = plist.get('CFBundleSignature', '????') - if len(signature_code) != 4: # Wrong length resets everything, too. - signature_code = '?' * 4 - - dest = os.path.join(os.path.dirname(info_plist), 'PkgInfo') - fp = open(dest, 'w') - fp.write('%s%s' % (package_type, signature_code)) - fp.close() - - def ExecFlock(self, lockfile, *cmd_list): - """Emulates the most basic behavior of Linux's flock(1).""" - # Rely on exception handling to report errors. - fd = os.open(lockfile, os.O_RDONLY|os.O_NOCTTY|os.O_CREAT, 0o666) - fcntl.flock(fd, fcntl.LOCK_EX) - return subprocess.call(cmd_list) - - def ExecFilterLibtool(self, *cmd_list): - """Calls libtool and filters out 'libtool: file: foo.o has no symbols'.""" - libtool_re = re.compile(r'^libtool: file: .* has no symbols$') - libtoolout = subprocess.Popen(cmd_list, stderr=subprocess.PIPE) - _, err = libtoolout.communicate() - for line in err.splitlines(): - if not libtool_re.match(line): - print >>sys.stderr, line - return libtoolout.returncode - - def ExecPackageFramework(self, framework, version): - """Takes a path to Something.framework and the Current version of that and - sets up all the symlinks.""" - # Find the name of the binary based on the part before the ".framework". - binary = os.path.basename(framework).split('.')[0] - - CURRENT = 'Current' - RESOURCES = 'Resources' - VERSIONS = 'Versions' - - if not os.path.exists(os.path.join(framework, VERSIONS, version, binary)): - # Binary-less frameworks don't seem to contain symlinks (see e.g. - # chromium's out/Debug/org.chromium.Chromium.manifest/ bundle). - return - - # Move into the framework directory to set the symlinks correctly. - pwd = os.getcwd() - os.chdir(framework) - - # Set up the Current version. - self._Relink(version, os.path.join(VERSIONS, CURRENT)) - - # Set up the root symlinks. - self._Relink(os.path.join(VERSIONS, CURRENT, binary), binary) - self._Relink(os.path.join(VERSIONS, CURRENT, RESOURCES), RESOURCES) - - # Back to where we were before! - os.chdir(pwd) - - def _Relink(self, dest, link): - """Creates a symlink to |dest| named |link|. If |link| already exists, - it is overwritten.""" - if os.path.lexists(link): - os.remove(link) - os.symlink(dest, link) - - -if __name__ == '__main__': - sys.exit(main(sys.argv[1:])) diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/validation.target.mk b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/validation.target.mk deleted file mode 100644 index 13ecfeba..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/build/validation.target.mk +++ /dev/null @@ -1,158 +0,0 @@ -# This file is generated by gyp; do not edit. - -TOOLSET := target -TARGET := validation -DEFS_Debug := \ - '-D_DARWIN_USE_64_BIT_INODE=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' \ - '-DDEBUG' \ - '-D_DEBUG' - -# Flags passed to all source files. -CFLAGS_Debug := \ - -O0 \ - -gdwarf-2 \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -Wall \ - -Wendif-labels \ - -W \ - -Wno-unused-parameter - -# Flags passed to only C files. -CFLAGS_C_Debug := \ - -fno-strict-aliasing - -# Flags passed to only C++ files. -CFLAGS_CC_Debug := \ - -fno-rtti \ - -fno-exceptions \ - -fno-threadsafe-statics \ - -fno-strict-aliasing - -# Flags passed to only ObjC files. -CFLAGS_OBJC_Debug := - -# Flags passed to only ObjC++ files. -CFLAGS_OBJCC_Debug := - -INCS_Debug := \ - -I/Users/izhukov/.node-gyp/0.10.22/src \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/uv/include \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/v8/include \ - -I/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan - -DEFS_Release := \ - '-D_DARWIN_USE_64_BIT_INODE=1' \ - '-D_LARGEFILE_SOURCE' \ - '-D_FILE_OFFSET_BITS=64' \ - '-DBUILDING_NODE_EXTENSION' - -# Flags passed to all source files. -CFLAGS_Release := \ - -Os \ - -gdwarf-2 \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -Wall \ - -Wendif-labels \ - -W \ - -Wno-unused-parameter - -# Flags passed to only C files. -CFLAGS_C_Release := \ - -fno-strict-aliasing - -# Flags passed to only C++ files. -CFLAGS_CC_Release := \ - -fno-rtti \ - -fno-exceptions \ - -fno-threadsafe-statics \ - -fno-strict-aliasing - -# Flags passed to only ObjC files. -CFLAGS_OBJC_Release := - -# Flags passed to only ObjC++ files. -CFLAGS_OBJCC_Release := - -INCS_Release := \ - -I/Users/izhukov/.node-gyp/0.10.22/src \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/uv/include \ - -I/Users/izhukov/.node-gyp/0.10.22/deps/v8/include \ - -I/Users/izhukov/Documents/webogram/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan - -OBJS := \ - $(obj).target/$(TARGET)/src/validation.o - -# Add to the list of files we specially track dependencies for. -all_deps += $(OBJS) - -# CFLAGS et al overrides must be target-local. -# See "Target-specific Variable Values" in the GNU Make manual. -$(OBJS): TOOLSET := $(TOOLSET) -$(OBJS): GYP_CFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) -$(OBJS): GYP_CXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) -$(OBJS): GYP_OBJCFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_C_$(BUILDTYPE)) $(CFLAGS_OBJC_$(BUILDTYPE)) -$(OBJS): GYP_OBJCXXFLAGS := $(DEFS_$(BUILDTYPE)) $(INCS_$(BUILDTYPE)) $(CFLAGS_$(BUILDTYPE)) $(CFLAGS_CC_$(BUILDTYPE)) $(CFLAGS_OBJCC_$(BUILDTYPE)) - -# Suffix rules, putting all outputs into $(obj). - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(srcdir)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# Try building from generated source, too. - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj).$(TOOLSET)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -$(obj).$(TOOLSET)/$(TARGET)/%.o: $(obj)/%.cc FORCE_DO_CMD - @$(call do_cmd,cxx,1) - -# End of this set of suffix rules -### Rules for final target. -LDFLAGS_Debug := \ - -Wl,-search_paths_first \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -L$(builddir) \ - -install_name @rpath/validation.node - -LIBTOOLFLAGS_Debug := \ - -Wl,-search_paths_first - -LDFLAGS_Release := \ - -Wl,-search_paths_first \ - -mmacosx-version-min=10.5 \ - -arch x86_64 \ - -L$(builddir) \ - -install_name @rpath/validation.node - -LIBTOOLFLAGS_Release := \ - -Wl,-search_paths_first - -LIBS := \ - -undefined dynamic_lookup - -$(builddir)/validation.node: GYP_LDFLAGS := $(LDFLAGS_$(BUILDTYPE)) -$(builddir)/validation.node: LIBS := $(LIBS) -$(builddir)/validation.node: GYP_LIBTOOLFLAGS := $(LIBTOOLFLAGS_$(BUILDTYPE)) -$(builddir)/validation.node: TOOLSET := $(TOOLSET) -$(builddir)/validation.node: $(OBJS) FORCE_DO_CMD - $(call do_cmd,solink_module) - -all_deps += $(builddir)/validation.node -# Add target alias -.PHONY: validation -validation: $(builddir)/validation.node - -# Short alias for building this executable. -.PHONY: validation.node -validation.node: $(builddir)/validation.node - -# Add executable to "all" target. -.PHONY: all -all: $(builddir)/validation.node - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log deleted file mode 100644 index d493584f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/builderror.log +++ /dev/null @@ -1,2 +0,0 @@ -gyp http GET http://nodejs.org/dist/v0.10.22/node-v0.10.22.tar.gz -gyp http 200 http://nodejs.org/dist/v0.10.22/node-v0.10.22.tar.gz diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/doc/ws.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/doc/ws.md deleted file mode 100644 index d84fd625..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/doc/ws.md +++ /dev/null @@ -1,181 +0,0 @@ -# ws - -## Class: ws.Server - -This class is a WebSocket server. It is an `EventEmitter`. - -### new ws.Server([options], [callback]) - -* `options` Object - * `host` String - * `port` Number - * `server` http.Server - * `verifyClient` Function - * `path` String - * `noServer` Boolean - * `disableHixie` Boolean - * `clientTracking` Boolean -* `callback` Function - -Construct a new server object. - -Either `port` or `server` must be provided, otherwise you might enable -`noServer` if you want to pass the requests directly. Please note that the -`callback` is only used when you supply the a `port` number in the options. - -### server.close([code], [data]) - -Close the server and terminate all clients - -### server.handleUpgrade(request, socket, upgradeHead, callback) - -Handles a HTTP Upgrade request. `request` is an instance of `http.ServerRequest`, `socket` is an instance of `net.Socket`. - -When the Upgrade was successfully, the `callback` will be called with a `ws.WebSocket` object as parameter. - -### Event: 'error' - -`function (error) { }` - -If the underlying server emits an error, it will be forwarded here. - -### Event: 'headers' - -`function (headers) { }` - -Emitted with the object of HTTP headers that are going to be written to the `Stream` as part of the handshake. - -### Event: 'connection' - -`function (socket) { }` - -When a new WebSocket connection is established. `socket` is an object of type `ws.WebSocket`. - - -## Class: ws.WebSocket - -This class represents a WebSocket connection. It is an `EventEmitter`. - -### new ws.WebSocket(address, [options]) - -* `address` String|Array -* `options` Object - * `protocol` String - * `agent` Agent - * `headers` Object - * `protocolVersion` Number|String - -- the following only apply if `address` is a String - * `host` String - * `origin` String - * `pfx` String|Buffer - * `key` String|Buffer - * `passphrase` String - * `cert` String|Buffer - * `ca` Array - * `ciphers` String - * `rejectUnauthorized` Boolean - -Instantiating with an `address` creates a new WebSocket client object. If `address` is an Array (request, socket, rest), it is instantiated as a Server client (e.g. called from the `ws.Server`). - -### websocket.bytesReceived - -Received bytes count. - -### websocket.readyState - -Possible states are `WebSocket.CONNECTING`, `WebSocket.OPEN`, `WebSocket.CLOSING`, `WebSocket.CLOSED`. - -### websocket.protocolVersion - -The WebSocket protocol version used for this connection, `8`, `13` or `hixie-76` (the latter only for server clients). - -### websocket.url - -The URL of the WebSocket server (only for clients) - -### websocket.supports - -Describes the feature of the used protocol version. E.g. `supports.binary` is a boolean that describes if the connection supports binary messages. - -### websocket.close([code], [data]) - -Gracefully closes the connection, after sending a description message - -### websocket.pause() - -Pause the client stream - -### websocket.ping([data], [options], [dontFailWhenClosed]) - -Sends a ping. `data` is sent, `options` is an object with members `mask` and `binary`. `dontFailWhenClosed` indicates whether or not to throw if the connection isnt open. - -### websocket.pong([data], [options], [dontFailWhenClosed]) - -Sends a pong. `data` is sent, `options` is an object with members `mask` and `binary`. `dontFailWhenClosed` indicates whether or not to throw if the connection isnt open. - - -### websocket.resume() - -Resume the client stream - -### websocket.send(data, [options], [callback]) - -Sends `data` through the connection. `options` can be an object with members `mask` and `binary`. The optional `callback` is executed after the send completes. - -### websocket.stream([options], callback) - -Streams data through calls to a user supplied function. `options` can be an object with members `mask` and `binary`. `callback` is executed on successive ticks of which send is `function (data, final)`. - -### websocket.terminate() - -Immediately shuts down the connection - -### websocket.onopen -### websocket.onerror -### websocket.onclose -### websocket.onmessage - -Emulates the W3C Browser based WebSocket interface using function members. - -### websocket.addEventListener(method, listener) - -Emulates the W3C Browser based WebSocket interface using addEventListener. - -### Event: 'error' - -`function (error) { }` - -If the client emits an error, this event is emitted (errors from the underlying `net.Socket` are forwarded here). - -### Event: 'close' - -`function (code, message) { }` - -Is emitted when the connection is closed. `code` is defined in the WebSocket specification. - -The `close` event is also emitted when then underlying `net.Socket` closes the connection (`end` or `close`). - -### Event: 'message' - -`function (data, flags) { }` - -Is emitted when data is received. `flags` is an object with member `binary`. - -### Event: 'ping' - -`function (data, flags) { }` - -Is emitted when a ping is received. `flags` is an object with member `binary`. - -### Event: 'pong' - -`function (data, flags) { }` - -Is emitted when a pong is received. `flags` is an object with member `binary`. - -### Event: 'open' - -`function () { }` - -Emitted when the connection is established. - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/.npmignore deleted file mode 100644 index dcd57568..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/.npmignore +++ /dev/null @@ -1 +0,0 @@ -uploaded diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/package.json deleted file mode 100644 index 7816f273..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "author": "", - "name": "fileapi", - "version": "0.0.0", - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "engines": { - "node": "~0.6.8" - }, - "dependencies": { - "express": "latest", - "ansi": "https://github.com/einaros/ansi.js/tarball/master" - }, - "devDependencies": {}, - "optionalDependencies": {} -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/app.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/app.js deleted file mode 100644 index e812cc3e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/app.js +++ /dev/null @@ -1,39 +0,0 @@ -function onFilesSelected(e) { - var button = e.srcElement; - button.disabled = true; - var progress = document.querySelector('div#progress'); - progress.innerHTML = '0%'; - var files = e.target.files; - var totalFiles = files.length; - var filesSent = 0; - if (totalFiles) { - var uploader = new Uploader('ws://localhost:8080', function () { - Array.prototype.slice.call(files, 0).forEach(function(file) { - if (file.name == '.') { - --totalFiles; - return; - } - uploader.sendFile(file, function(error) { - if (error) { - console.log(error); - return; - } - ++filesSent; - progress.innerHTML = ~~(filesSent / totalFiles * 100) + '%'; - console.log('Sent: ' + file.name); - }); - }); - }); - } - uploader.ondone = function() { - uploader.close(); - progress.innerHTML = '100% done, ' + totalFiles + ' files sent.'; - } -} - -window.onload = function() { - var importButtons = document.querySelectorAll('[type="file"]'); - Array.prototype.slice.call(importButtons, 0).forEach(function(importButton) { - importButton.addEventListener('change', onFilesSelected, false); - }); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/index.html b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/index.html deleted file mode 100644 index 0d463dd5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/index.html +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - -

      This example will upload an entire directory tree to the node.js server via a fast and persistent WebSocket connection.

      -

      Note that the example is Chrome only for now.

      -

      - Upload status: -
      Please select a directory to upload.
      - - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/uploader.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/uploader.js deleted file mode 100644 index 0c34a7fa..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/public/uploader.js +++ /dev/null @@ -1,55 +0,0 @@ -function Uploader(url, cb) { - this.ws = new WebSocket(url); - if (cb) this.ws.onopen = cb; - this.sendQueue = []; - this.sending = null; - this.sendCallback = null; - this.ondone = null; - var self = this; - this.ws.onmessage = function(event) { - var data = JSON.parse(event.data); - if (data.event == 'complete') { - if (data.path != self.sending.path) { - self.sendQueue = []; - self.sending = null; - self.sendCallback = null; - throw new Error('Got message for wrong file!'); - } - self.sending = null; - var callback = self.sendCallback; - self.sendCallback = null; - if (callback) callback(); - if (self.sendQueue.length === 0 && self.ondone) self.ondone(null); - if (self.sendQueue.length > 0) { - var args = self.sendQueue.pop(); - setTimeout(function() { self.sendFile.apply(self, args); }, 0); - } - } - else if (data.event == 'error') { - self.sendQueue = []; - self.sending = null; - var callback = self.sendCallback; - self.sendCallback = null; - var error = new Error('Server reported send error for file ' + data.path); - if (callback) callback(error); - if (self.ondone) self.ondone(error); - } - } -} - -Uploader.prototype.sendFile = function(file, cb) { - if (this.ws.readyState != WebSocket.OPEN) throw new Error('Not connected'); - if (this.sending) { - this.sendQueue.push(arguments); - return; - } - var fileData = { name: file.name, path: file.webkitRelativePath }; - this.sending = fileData; - this.sendCallback = cb; - this.ws.send(JSON.stringify(fileData)); - this.ws.send(file); -} - -Uploader.prototype.close = function() { - this.ws.close(); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/server.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/server.js deleted file mode 100644 index badfeba7..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/fileapi/server.js +++ /dev/null @@ -1,103 +0,0 @@ -var WebSocketServer = require('../../').Server - , express = require('express') - , fs = require('fs') - , http = require('http') - , util = require('util') - , path = require('path') - , app = express.createServer() - , events = require('events') - , ansi = require('ansi') - , cursor = ansi(process.stdout); - -function BandwidthSampler(ws, interval) { - interval = interval || 2000; - var previousByteCount = 0; - var self = this; - var intervalId = setInterval(function() { - var byteCount = ws.bytesReceived; - var bytesPerSec = (byteCount - previousByteCount) / (interval / 1000); - previousByteCount = byteCount; - self.emit('sample', bytesPerSec); - }, interval); - ws.on('close', function() { - clearInterval(intervalId); - }); -} -util.inherits(BandwidthSampler, events.EventEmitter); - -function makePathForFile(filePath, prefix, cb) { - if (typeof cb !== 'function') throw new Error('callback is required'); - filePath = path.dirname(path.normalize(filePath)).replace(/^(\/|\\)+/, ''); - var pieces = filePath.split(/(\\|\/)/); - var incrementalPath = prefix; - function step(error) { - if (error) return cb(error); - if (pieces.length == 0) return cb(null, incrementalPath); - incrementalPath += '/' + pieces.shift(); - fs.exists(incrementalPath, function(exists) { - if (!exists) fs.mkdir(incrementalPath, step); - else process.nextTick(step); - }); - } - step(); -} - -cursor.eraseData(2).goto(1, 1); -app.use(express.static(__dirname + '/public')); - -var clientId = 0; -var wss = new WebSocketServer({server: app}); -wss.on('connection', function(ws) { - var thisId = ++clientId; - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('Client #%d connected', thisId); - - var sampler = new BandwidthSampler(ws); - sampler.on('sample', function(bps) { - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('WebSocket #%d incoming bandwidth: %d MB/s', thisId, Math.round(bps / (1024*1024))); - }); - - var filesReceived = 0; - var currentFile = null; - ws.on('message', function(data, flags) { - if (!flags.binary) { - currentFile = JSON.parse(data); - // note: a real-world app would want to sanity check the data - } - else { - if (currentFile == null) return; - makePathForFile(currentFile.path, __dirname + '/uploaded', function(error, path) { - if (error) { - console.log(error); - ws.send(JSON.stringify({event: 'error', path: currentFile.path, message: error.message})); - return; - } - fs.writeFile(path + '/' + currentFile.name, data, function(error) { - ++filesReceived; - // console.log('received %d bytes long file, %s', data.length, currentFile.path); - ws.send(JSON.stringify({event: 'complete', path: currentFile.path})); - currentFile = null; - }); - }); - } - }); - - ws.on('close', function() { - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('Client #%d disconnected. %d files received.', thisId, filesReceived); - }); - - ws.on('error', function(e) { - cursor.goto(1, 4 + thisId).eraseLine(); - console.log('Client #%d error: %s', thisId, e.message); - }); -}); - -fs.mkdir(__dirname + '/uploaded', function(error) { - // ignore errors, most likely means directory exists - console.log('Uploaded files will be saved to %s/uploaded.', __dirname); - console.log('Remember to wipe this directory if you upload lots and lots.'); - app.listen(8080); - console.log('Listening on http://localhost:8080'); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/package.json deleted file mode 100644 index 99722c42..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "", - "name": "serverstats", - "version": "0.0.0", - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "engines": { - "node": ">0.4.0" - }, - "dependencies": { - "express": "~3.0.0" - }, - "devDependencies": {}, - "optionalDependencies": {} -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html deleted file mode 100644 index 24d84e12..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/public/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - Server Stats
      - RSS:

      - Heap total:

      - Heap used:

      - - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/server.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/server.js deleted file mode 100644 index 88bbc9eb..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats-express_3/server.js +++ /dev/null @@ -1,21 +0,0 @@ -var WebSocketServer = require('../../').Server - , http = require('http') - , express = require('express') - , app = express(); - -app.use(express.static(__dirname + '/public')); - -var server = http.createServer(app); -server.listen(8080); - -var wss = new WebSocketServer({server: server}); -wss.on('connection', function(ws) { - var id = setInterval(function() { - ws.send(JSON.stringify(process.memoryUsage()), function() { /* ignore errors */ }); - }, 100); - console.log('started client interval'); - ws.on('close', function() { - console.log('stopping client interval'); - clearInterval(id); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/package.json deleted file mode 100644 index 65c900ab..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "author": "", - "name": "serverstats", - "version": "0.0.0", - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "engines": { - "node": ">0.4.0" - }, - "dependencies": { - "express": "2.x" - }, - "devDependencies": {}, - "optionalDependencies": {} -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/public/index.html b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/public/index.html deleted file mode 100644 index 24d84e12..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/public/index.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - Server Stats
      - RSS:

      - Heap total:

      - Heap used:

      - - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/server.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/server.js deleted file mode 100644 index 0bbce368..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/serverstats/server.js +++ /dev/null @@ -1,19 +0,0 @@ -var WebSocketServer = require('../../').Server - , http = require('http') - , express = require('express') - , app = express.createServer(); - -app.use(express.static(__dirname + '/public')); -app.listen(8080); - -var wss = new WebSocketServer({server: app}); -wss.on('connection', function(ws) { - var id = setInterval(function() { - ws.send(JSON.stringify(process.memoryUsage()), function() { /* ignore errors */ }); - }, 100); - console.log('started client interval'); - ws.on('close', function() { - console.log('stopping client interval'); - clearInterval(id); - }) -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/ssl.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/ssl.js deleted file mode 100644 index bf1bf530..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/examples/ssl.js +++ /dev/null @@ -1,59 +0,0 @@ - -(function(){ - - "use strict"; - - var fs = require('fs'); - - // you'll probably load configuration from config - var cfg = { - ssl: true, - port: 8080, - ssl_key: '/path/to/you/ssl.key', - ssl_cert: '/path/to/you/ssl.crt' - }; - - var httpServ = ( cfg.ssl ) ? require('https') : require('http'); - - var WebSocketServer = require('../').Server; - - var app = null; - - // dummy request processing - var processRequest = function( req, res ) { - - res.writeHead(200); - res.end("All glory to WebSockets!\n"); - }; - - if ( cfg.ssl ) { - - app = httpServ.createServer({ - - // providing server with SSL key/cert - key: fs.readFileSync( cfg.ssl_key ), - cert: fs.readFileSync( cfg.ssl_cert ) - - }, processRequest ).listen( cfg.port ); - - } else { - - app = httpServ.createServer( processRequest ).listen( cfg.port ); - } - - // passing or reference to web server so WS would knew port and SSL capabilities - var wss = new WebSocketServer( { server: app } ); - - - wss.on( 'connection', function ( wsConnect ) { - - wsConnect.on( 'message', function ( message ) { - - console.log( message ); - - }); - - }); - - -}()); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/index.js deleted file mode 100644 index 3423ff23..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/index.js +++ /dev/null @@ -1,26 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports = require('./lib/WebSocket'); -module.exports.Server = require('./lib/WebSocketServer'); -module.exports.Sender = require('./lib/Sender'); -module.exports.Receiver = require('./lib/Receiver'); - -module.exports.createServer = function (options, connectionListener) { - var server = new module.exports.Server(options); - if (typeof connectionListener === 'function') { - server.on('connection', connectionListener); - } - return server; -}; - -module.exports.connect = module.exports.createConnection = function (address, openListener) { - var client = new module.exports(address); - if (typeof openListener === 'function') { - client.on('open', openListener); - } - return client; -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferPool.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferPool.js deleted file mode 100644 index faf8637c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferPool.js +++ /dev/null @@ -1,59 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util'); - -function BufferPool(initialSize, growStrategy, shrinkStrategy) { - if (typeof initialSize === 'function') { - shrinkStrategy = growStrategy; - growStrategy = initialSize; - initialSize = 0; - } - else if (typeof initialSize === 'undefined') { - initialSize = 0; - } - this._growStrategy = (growStrategy || function(db, size) { - return db.used + size; - }).bind(null, this); - this._shrinkStrategy = (shrinkStrategy || function(db) { - return initialSize; - }).bind(null, this); - this._buffer = initialSize ? new Buffer(initialSize) : null; - this._offset = 0; - this._used = 0; - this._changeFactor = 0; - this.__defineGetter__('size', function(){ - return this._buffer == null ? 0 : this._buffer.length; - }); - this.__defineGetter__('used', function(){ - return this._used; - }); -} - -BufferPool.prototype.get = function(length) { - if (this._buffer == null || this._offset + length > this._buffer.length) { - var newBuf = new Buffer(this._growStrategy(length)); - this._buffer = newBuf; - this._offset = 0; - } - this._used += length; - var buf = this._buffer.slice(this._offset, this._offset + length); - this._offset += length; - return buf; -} - -BufferPool.prototype.reset = function(forceNewBuffer) { - var len = this._shrinkStrategy(); - if (len < this.size) this._changeFactor -= 1; - if (forceNewBuffer || this._changeFactor < -2) { - this._changeFactor = 0; - this._buffer = len ? new Buffer(len) : null; - } - this._offset = 0; - this._used = 0; -} - -module.exports = BufferPool; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.fallback.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.fallback.js deleted file mode 100644 index 508542c9..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.fallback.js +++ /dev/null @@ -1,47 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports.BufferUtil = { - merge: function(mergedBuffer, buffers) { - var offset = 0; - for (var i = 0, l = buffers.length; i < l; ++i) { - var buf = buffers[i]; - buf.copy(mergedBuffer, offset); - offset += buf.length; - } - }, - mask: function(source, mask, output, offset, length) { - var maskNum = mask.readUInt32LE(0, true); - var i = 0; - for (; i < length - 3; i += 4) { - var num = maskNum ^ source.readUInt32LE(i, true); - if (num < 0) num = 4294967296 + num; - output.writeUInt32LE(num, offset + i, true); - } - switch (length % 4) { - case 3: output[offset + i + 2] = source[i + 2] ^ mask[2]; - case 2: output[offset + i + 1] = source[i + 1] ^ mask[1]; - case 1: output[offset + i] = source[i] ^ mask[0]; - case 0:; - } - }, - unmask: function(data, mask) { - var maskNum = mask.readUInt32LE(0, true); - var length = data.length; - var i = 0; - for (; i < length - 3; i += 4) { - var num = maskNum ^ data.readUInt32LE(i, true); - if (num < 0) num = 4294967296 + num; - data.writeUInt32LE(num, i, true); - } - switch (length % 4) { - case 3: data[i + 2] = data[i + 2] ^ mask[2]; - case 2: data[i + 1] = data[i + 1] ^ mask[1]; - case 1: data[i] = data[i] ^ mask[0]; - case 0:; - } - } -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.js deleted file mode 100644 index 15d35b98..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/BufferUtil.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -try { - module.exports = require('../build/Release/bufferutil'); -} catch (e) { try { - module.exports = require('../build/default/bufferutil'); -} catch (e) { try { - module.exports = require('./BufferUtil.fallback'); -} catch (e) { - console.error('bufferutil.node seems to not have been built. Run npm install.'); - throw e; -}}} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/ErrorCodes.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/ErrorCodes.js deleted file mode 100644 index 55ebd529..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/ErrorCodes.js +++ /dev/null @@ -1,24 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports = { - isValidErrorCode: function(code) { - return (code >= 1000 && code <= 1011 && code != 1004 && code != 1005 && code != 1006) || - (code >= 3000 && code <= 4999); - }, - 1000: 'normal', - 1001: 'going away', - 1002: 'protocol error', - 1003: 'unsupported data', - 1004: 'reserved', - 1005: 'reserved for extensions', - 1006: 'reserved for extensions', - 1007: 'inconsistent or invalid data', - 1008: 'policy violation', - 1009: 'message too big', - 1010: 'extension handshake missing', - 1011: 'an unexpected condition prevented the request from being fulfilled', -}; \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.hixie.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.hixie.js deleted file mode 100644 index f54ad966..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.hixie.js +++ /dev/null @@ -1,180 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util'); - -/** - * State constants - */ - -var EMPTY = 0 - , BODY = 1; -var BINARYLENGTH = 2 - , BINARYBODY = 3; - -/** - * Hixie Receiver implementation - */ - -function Receiver () { - this.state = EMPTY; - this.buffers = []; - this.messageEnd = -1; - this.spanLength = 0; - this.dead = false; - - this.onerror = function() {}; - this.ontext = function() {}; - this.onbinary = function() {}; - this.onclose = function() {}; - this.onping = function() {}; - this.onpong = function() {}; -} - -module.exports = Receiver; - -/** - * Add new data to the parser. - * - * @api public - */ - -Receiver.prototype.add = function(data) { - var self = this; - function doAdd() { - if (self.state === EMPTY) { - if (data.length == 2 && data[0] == 0xFF && data[1] == 0x00) { - self.reset(); - self.onclose(); - return; - } - if (data[0] === 0x80) { - self.messageEnd = 0; - self.state = BINARYLENGTH; - data = data.slice(1); - } else { - - if (data[0] !== 0x00) { - self.error('payload must start with 0x00 byte', true); - return; - } - data = data.slice(1); - self.state = BODY; - - } - } - if (self.state === BINARYLENGTH) { - var i = 0; - while ((i < data.length) && (data[i] & 0x80)) { - self.messageEnd = 128 * self.messageEnd + (data[i] & 0x7f); - ++i; - } - if (i < data.length) { - self.messageEnd = 128 * self.messageEnd + (data[i] & 0x7f); - self.state = BINARYBODY; - ++i; - } - if (i > 0) - data = data.slice(i); - } - if (self.state === BINARYBODY) { - var dataleft = self.messageEnd - self.spanLength; - if (data.length >= dataleft) { - // consume the whole buffer to finish the frame - self.buffers.push(data); - self.spanLength += dataleft; - self.messageEnd = dataleft; - return self.parse(); - } - // frame's not done even if we consume it all - self.buffers.push(data); - self.spanLength += data.length; - return; - } - self.buffers.push(data); - if ((self.messageEnd = bufferIndex(data, 0xFF)) != -1) { - self.spanLength += self.messageEnd; - return self.parse(); - } - else self.spanLength += data.length; - } - while(data) data = doAdd(); -} - -/** - * Releases all resources used by the receiver. - * - * @api public - */ - -Receiver.prototype.cleanup = function() { - this.dead = true; - this.state = EMPTY; - this.buffers = []; -} - -/** - * Process buffered data. - * - * @api public - */ - -Receiver.prototype.parse = function() { - var output = new Buffer(this.spanLength); - var outputIndex = 0; - for (var bi = 0, bl = this.buffers.length; bi < bl - 1; ++bi) { - var buffer = this.buffers[bi]; - buffer.copy(output, outputIndex); - outputIndex += buffer.length; - } - var lastBuffer = this.buffers[this.buffers.length - 1]; - if (this.messageEnd > 0) lastBuffer.copy(output, outputIndex, 0, this.messageEnd); - if (this.state !== BODY) --this.messageEnd; - var tail = null; - if (this.messageEnd < lastBuffer.length - 1) { - tail = lastBuffer.slice(this.messageEnd + 1); - } - this.reset(); - this.ontext(output.toString('utf8')); - return tail; -} - -/** - * Handles an error - * - * @api private - */ - -Receiver.prototype.error = function (reason, terminate) { - this.reset(); - this.onerror(reason, terminate); - return this; -} - -/** - * Reset parser state - * - * @api private - */ - -Receiver.prototype.reset = function (reason) { - if (this.dead) return; - this.state = EMPTY; - this.buffers = []; - this.messageEnd = -1; - this.spanLength = 0; -} - -/** - * Internal api - */ - -function bufferIndex(buffer, byte) { - for (var i = 0, l = buffer.length; i < l; ++i) { - if (buffer[i] === byte) return i; - } - return -1; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js deleted file mode 100644 index 2752726f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Receiver.js +++ /dev/null @@ -1,591 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util') - , Validation = require('./Validation').Validation - , ErrorCodes = require('./ErrorCodes') - , BufferPool = require('./BufferPool') - , bufferUtil = require('./BufferUtil').BufferUtil; - -/** - * Node version 0.4 and 0.6 compatibility - */ - -var isNodeV4 = /^v0\.4/.test(process.version); - -/** - * HyBi Receiver implementation - */ - -function Receiver () { - // memory pool for fragmented messages - var fragmentedPoolPrevUsed = -1; - this.fragmentedBufferPool = new BufferPool(1024, function(db, length) { - return db.used + length; - }, function(db) { - return fragmentedPoolPrevUsed = fragmentedPoolPrevUsed >= 0 ? - (fragmentedPoolPrevUsed + db.used) / 2 : - db.used; - }); - - // memory pool for unfragmented messages - var unfragmentedPoolPrevUsed = -1; - this.unfragmentedBufferPool = new BufferPool(1024, function(db, length) { - return db.used + length; - }, function(db) { - return unfragmentedPoolPrevUsed = unfragmentedPoolPrevUsed >= 0 ? - (unfragmentedPoolPrevUsed + db.used) / 2 : - db.used; - }); - - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0, - fragmentedOperation: false - }; - this.overflow = []; - this.headerBuffer = new Buffer(10); - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.currentMessage = []; - this.expectHeader(2, this.processPacket); - this.dead = false; - - this.onerror = function() {}; - this.ontext = function() {}; - this.onbinary = function() {}; - this.onclose = function() {}; - this.onping = function() {}; - this.onpong = function() {}; -}; - -module.exports = Receiver; - -/** - * Add new data to the parser. - * - * @api public - */ - -Receiver.prototype.add = function(data) { - var dataLength = data.length; - if (dataLength == 0) return; - if (this.expectBuffer == null) { - this.overflow.push(data); - return; - } - var toRead = Math.min(dataLength, this.expectBuffer.length - this.expectOffset); - fastCopy(toRead, data, this.expectBuffer, this.expectOffset); - this.expectOffset += toRead; - if (toRead < dataLength) { - this.overflow.push(data.slice(toRead)); - } - while (this.expectBuffer && this.expectOffset == this.expectBuffer.length) { - var bufferForHandler = this.expectBuffer; - this.expectBuffer = null; - this.expectOffset = 0; - this.expectHandler.call(this, bufferForHandler); - } -} - -/** - * Releases all resources used by the receiver. - * - * @api public - */ - -Receiver.prototype.cleanup = function() { - this.dead = true; - this.overflow = null; - this.headerBuffer = null; - this.expectBuffer = null; - this.expectHandler = null; - this.unfragmentedBufferPool = null; - this.fragmentedBufferPool = null; - this.state = null; - this.currentMessage = null; - this.onerror = null; - this.ontext = null; - this.onbinary = null; - this.onclose = null; - this.onping = null; - this.onpong = null; -} - -/** - * Waits for a certain amount of header bytes to be available, then fires a callback. - * - * @api private - */ - -Receiver.prototype.expectHeader = function(length, handler) { - if (length == 0) { - handler(null); - return; - } - this.expectBuffer = this.headerBuffer.slice(this.expectOffset, this.expectOffset + length); - this.expectHandler = handler; - var toRead = length; - while (toRead > 0 && this.overflow.length > 0) { - var fromOverflow = this.overflow.pop(); - if (toRead < fromOverflow.length) this.overflow.push(fromOverflow.slice(toRead)); - var read = Math.min(fromOverflow.length, toRead); - fastCopy(read, fromOverflow, this.expectBuffer, this.expectOffset); - this.expectOffset += read; - toRead -= read; - } -} - -/** - * Waits for a certain amount of data bytes to be available, then fires a callback. - * - * @api private - */ - -Receiver.prototype.expectData = function(length, handler) { - if (length == 0) { - handler(null); - return; - } - this.expectBuffer = this.allocateFromPool(length, this.state.fragmentedOperation); - this.expectHandler = handler; - var toRead = length; - while (toRead > 0 && this.overflow.length > 0) { - var fromOverflow = this.overflow.pop(); - if (toRead < fromOverflow.length) this.overflow.push(fromOverflow.slice(toRead)); - var read = Math.min(fromOverflow.length, toRead); - fastCopy(read, fromOverflow, this.expectBuffer, this.expectOffset); - this.expectOffset += read; - toRead -= read; - } -} - -/** - * Allocates memory from the buffer pool. - * - * @api private - */ - -Receiver.prototype.allocateFromPool = !isNodeV4 - ? function(length, isFragmented) { return (isFragmented ? this.fragmentedBufferPool : this.unfragmentedBufferPool).get(length); } - : function(length) { return new Buffer(length); }; - -/** - * Start processing a new packet. - * - * @api private - */ - -Receiver.prototype.processPacket = function (data) { - if ((data[0] & 0x70) != 0) { - this.error('reserved fields must be empty', 1002); - return; - } - this.state.lastFragment = (data[0] & 0x80) == 0x80; - this.state.masked = (data[1] & 0x80) == 0x80; - var opcode = data[0] & 0xf; - if (opcode === 0) { - // continuation frame - this.state.fragmentedOperation = true; - this.state.opcode = this.state.activeFragmentedOperation; - if (!(this.state.opcode == 1 || this.state.opcode == 2)) { - this.error('continuation frame cannot follow current opcode', 1002); - return; - } - } - else { - if (opcode < 3 && this.state.activeFragmentedOperation != null) { - this.error('data frames after the initial data frame must have opcode 0', 1002); - return; - } - this.state.opcode = opcode; - if (this.state.lastFragment === false) { - this.state.fragmentedOperation = true; - this.state.activeFragmentedOperation = opcode; - } - else this.state.fragmentedOperation = false; - } - var handler = opcodes[this.state.opcode]; - if (typeof handler == 'undefined') this.error('no handler for opcode ' + this.state.opcode, 1002); - else { - handler.start.call(this, data); - } -} - -/** - * Endprocessing a packet. - * - * @api private - */ - -Receiver.prototype.endPacket = function() { - if (!this.state.fragmentedOperation) this.unfragmentedBufferPool.reset(true); - else if (this.state.lastFragment) this.fragmentedBufferPool.reset(false); - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - if (this.state.lastFragment && this.state.opcode === this.state.activeFragmentedOperation) { - // end current fragmented operation - this.state.activeFragmentedOperation = null; - } - this.state.lastFragment = false; - this.state.opcode = this.state.activeFragmentedOperation != null ? this.state.activeFragmentedOperation : 0; - this.state.masked = false; - this.expectHeader(2, this.processPacket); -} - -/** - * Reset the parser state. - * - * @api private - */ - -Receiver.prototype.reset = function() { - if (this.dead) return; - this.state = { - activeFragmentedOperation: null, - lastFragment: false, - masked: false, - opcode: 0, - fragmentedOperation: false - }; - this.fragmentedBufferPool.reset(true); - this.unfragmentedBufferPool.reset(true); - this.expectOffset = 0; - this.expectBuffer = null; - this.expectHandler = null; - this.overflow = []; - this.currentMessage = []; -} - -/** - * Unmask received data. - * - * @api private - */ - -Receiver.prototype.unmask = function (mask, buf, binary) { - if (mask != null && buf != null) bufferUtil.unmask(buf, mask); - if (binary) return buf; - return buf != null ? buf.toString('utf8') : ''; -} - -/** - * Concatenates a list of buffers. - * - * @api private - */ - -Receiver.prototype.concatBuffers = function(buffers) { - var length = 0; - for (var i = 0, l = buffers.length; i < l; ++i) length += buffers[i].length; - var mergedBuffer = new Buffer(length); - bufferUtil.merge(mergedBuffer, buffers); - return mergedBuffer; -} - -/** - * Handles an error - * - * @api private - */ - -Receiver.prototype.error = function (reason, protocolErrorCode) { - this.reset(); - this.onerror(reason, protocolErrorCode); - return this; -} - -/** - * Buffer utilities - */ - -function readUInt16BE(start) { - return (this[start]<<8) + - this[start+1]; -} - -function readUInt32BE(start) { - return (this[start]<<24) + - (this[start+1]<<16) + - (this[start+2]<<8) + - this[start+3]; -} - -function fastCopy(length, srcBuffer, dstBuffer, dstOffset) { - switch (length) { - default: srcBuffer.copy(dstBuffer, dstOffset, 0, length); break; - case 16: dstBuffer[dstOffset+15] = srcBuffer[15]; - case 15: dstBuffer[dstOffset+14] = srcBuffer[14]; - case 14: dstBuffer[dstOffset+13] = srcBuffer[13]; - case 13: dstBuffer[dstOffset+12] = srcBuffer[12]; - case 12: dstBuffer[dstOffset+11] = srcBuffer[11]; - case 11: dstBuffer[dstOffset+10] = srcBuffer[10]; - case 10: dstBuffer[dstOffset+9] = srcBuffer[9]; - case 9: dstBuffer[dstOffset+8] = srcBuffer[8]; - case 8: dstBuffer[dstOffset+7] = srcBuffer[7]; - case 7: dstBuffer[dstOffset+6] = srcBuffer[6]; - case 6: dstBuffer[dstOffset+5] = srcBuffer[5]; - case 5: dstBuffer[dstOffset+4] = srcBuffer[4]; - case 4: dstBuffer[dstOffset+3] = srcBuffer[3]; - case 3: dstBuffer[dstOffset+2] = srcBuffer[2]; - case 2: dstBuffer[dstOffset+1] = srcBuffer[1]; - case 1: dstBuffer[dstOffset] = srcBuffer[0]; - } -} - -/** - * Opcode handlers - */ - -var opcodes = { - // text - '1': { - start: function(data) { - var self = this; - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['1'].getData.call(self, firstLength); - } - else if (firstLength == 126) { - self.expectHeader(2, function(data) { - opcodes['1'].getData.call(self, readUInt16BE.call(data, 0)); - }); - } - else if (firstLength == 127) { - self.expectHeader(8, function(data) { - if (readUInt32BE.call(data, 0) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported', 1008); - return; - } - opcodes['1'].getData.call(self, readUInt32BE.call(data, 4)); - }); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['1'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['1'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var packet = this.unmask(mask, data, true); - if (packet != null) this.currentMessage.push(packet); - if (this.state.lastFragment) { - var messageBuffer = this.concatBuffers(this.currentMessage); - if (!Validation.isValidUTF8(messageBuffer)) { - this.error('invalid utf8 sequence', 1007); - return; - } - this.ontext(messageBuffer.toString('utf8'), {masked: this.state.masked, buffer: messageBuffer}); - this.currentMessage = []; - } - this.endPacket(); - } - }, - // binary - '2': { - start: function(data) { - var self = this; - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['2'].getData.call(self, firstLength); - } - else if (firstLength == 126) { - self.expectHeader(2, function(data) { - opcodes['2'].getData.call(self, readUInt16BE.call(data, 0)); - }); - } - else if (firstLength == 127) { - self.expectHeader(8, function(data) { - if (readUInt32BE.call(data, 0) != 0) { - self.error('packets with length spanning more than 32 bit is currently not supported', 1008); - return; - } - opcodes['2'].getData.call(self, readUInt32BE.call(data, 4, true)); - }); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['2'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['2'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var packet = this.unmask(mask, data, true); - if (packet != null) this.currentMessage.push(packet); - if (this.state.lastFragment) { - var messageBuffer = this.concatBuffers(this.currentMessage); - this.onbinary(messageBuffer, {masked: this.state.masked, buffer: messageBuffer}); - this.currentMessage = []; - } - this.endPacket(); - } - }, - // close - '8': { - start: function(data) { - var self = this; - if (self.state.lastFragment == false) { - self.error('fragmented close is not supported', 1002); - return; - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['8'].getData.call(self, firstLength); - } - else { - self.error('control frames cannot have more than 125 bytes of data', 1002); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['8'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['8'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - var self = this; - data = self.unmask(mask, data, true); - if (data && data.length == 1) { - self.error('close packets with data must be at least two bytes long', 1002); - return; - } - var code = data && data.length > 1 ? readUInt16BE.call(data, 0) : 1000; - if (!ErrorCodes.isValidErrorCode(code)) { - self.error('invalid error code', 1002); - return; - } - var message = ''; - if (data && data.length > 2) { - var messageBuffer = data.slice(2); - if (!Validation.isValidUTF8(messageBuffer)) { - self.error('invalid utf8 sequence', 1007); - return; - } - message = messageBuffer.toString('utf8'); - } - this.onclose(code, message, {masked: self.state.masked}); - this.reset(); - }, - }, - // ping - '9': { - start: function(data) { - var self = this; - if (self.state.lastFragment == false) { - self.error('fragmented ping is not supported', 1002); - return; - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['9'].getData.call(self, firstLength); - } - else { - self.error('control frames cannot have more than 125 bytes of data', 1002); - } - }, - getData: function(length) { - var self = this; - if (self.state.masked) { - self.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['9'].finish.call(self, mask, data); - }); - }); - } - else { - self.expectData(length, function(data) { - opcodes['9'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - this.onping(this.unmask(mask, data, true), {masked: this.state.masked, binary: true}); - this.endPacket(); - } - }, - // pong - '10': { - start: function(data) { - var self = this; - if (self.state.lastFragment == false) { - self.error('fragmented pong is not supported', 1002); - return; - } - - // decode length - var firstLength = data[1] & 0x7f; - if (firstLength < 126) { - opcodes['10'].getData.call(self, firstLength); - } - else { - self.error('control frames cannot have more than 125 bytes of data', 1002); - } - }, - getData: function(length) { - var self = this; - if (this.state.masked) { - this.expectHeader(4, function(data) { - var mask = data; - self.expectData(length, function(data) { - opcodes['10'].finish.call(self, mask, data); - }); - }); - } - else { - this.expectData(length, function(data) { - opcodes['10'].finish.call(self, null, data); - }); - } - }, - finish: function(mask, data) { - this.onpong(this.unmask(mask, data, true), {masked: this.state.masked, binary: true}); - this.endPacket(); - } - } -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.hixie.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.hixie.js deleted file mode 100644 index 1754afb6..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.hixie.js +++ /dev/null @@ -1,123 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var events = require('events') - , util = require('util') - , EventEmitter = events.EventEmitter; - -/** - * Hixie Sender implementation - */ - -function Sender(socket) { - this.socket = socket; - this.continuationFrame = false; - this.isClosed = false; -} - -module.exports = Sender; - -/** - * Inherits from EventEmitter. - */ - -util.inherits(Sender, events.EventEmitter); - -/** - * Frames and writes data. - * - * @api public - */ - -Sender.prototype.send = function(data, options, cb) { - if (this.isClosed) return; -/* - if (options && options.binary) { - this.error('hixie websockets do not support binary'); - return; - } -*/ - var isString = typeof data == 'string' - , length = isString ? Buffer.byteLength(data) : data.length - , lengthbytes = (length > 127) ? 2 : 1 // assume less than 2**14 bytes - , writeStartMarker = this.continuationFrame == false - , writeEndMarker = !options || !(typeof options.fin != 'undefined' && !options.fin) - , buffer = new Buffer((writeStartMarker ? ((options && options.binary) ? (1 + lengthbytes) : 1) : 0) + length + ((writeEndMarker && !(options && options.binary)) ? 1 : 0)) - , offset = writeStartMarker ? 1 : 0; - - if (writeStartMarker) { - if (options && options.binary) { - buffer.write('\x80', 'binary'); - // assume length less than 2**14 bytes - if (lengthbytes > 1) - buffer.write(String.fromCharCode(128+length/128), offset++, 'binary'); - buffer.write(String.fromCharCode(length&0x7f), offset++, 'binary'); - } else - buffer.write('\x00', 'binary'); - } - - if (isString) buffer.write(data, offset, 'utf8'); - else data.copy(buffer, offset, 0); - - if (writeEndMarker) { - if (options && options.binary) { - // sending binary, not writing end marker - } else - buffer.write('\xff', offset + length, 'binary'); - this.continuationFrame = false; - } - else this.continuationFrame = true; - - try { - this.socket.write(buffer, 'binary', cb); - } catch (e) { - this.error(e.toString()); - } -} - -/** - * Sends a close instruction to the remote party. - * - * @api public - */ - -Sender.prototype.close = function(code, data, mask, cb) { - if (this.isClosed) return; - this.isClosed = true; - try { - if (this.continuationFrame) this.socket.write(new Buffer([0xff], 'binary')); - this.socket.write(new Buffer([0xff, 0x00]), 'binary', cb); - } catch (e) { - this.error(e.toString()); - } -} - -/** - * Sends a ping message to the remote party. Not available for hixie. - * - * @api public - */ - -Sender.prototype.ping = function(data, options) {} - -/** - * Sends a pong message to the remote party. Not available for hixie. - * - * @api public - */ - -Sender.prototype.pong = function(data, options) {} - -/** - * Handles an error - * - * @api private - */ - -Sender.prototype.error = function (reason) { - this.emit('error', reason); - return this; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.js deleted file mode 100644 index fc3b4378..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Sender.js +++ /dev/null @@ -1,227 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var events = require('events') - , util = require('util') - , EventEmitter = events.EventEmitter - , ErrorCodes = require('./ErrorCodes') - , bufferUtil = require('./BufferUtil').BufferUtil; - -/** - * HyBi Sender implementation - */ - -function Sender(socket) { - this._socket = socket; - this.firstFragment = true; -} - -/** - * Inherits from EventEmitter. - */ - -util.inherits(Sender, events.EventEmitter); - -/** - * Sends a close instruction to the remote party. - * - * @api public - */ - -Sender.prototype.close = function(code, data, mask) { - if (typeof code !== 'undefined') { - if (typeof code !== 'number' || - !ErrorCodes.isValidErrorCode(code)) throw new Error('first argument must be a valid error code number'); - } - code = code || 1000; - var dataBuffer = new Buffer(2 + (data ? Buffer.byteLength(data) : 0)); - writeUInt16BE.call(dataBuffer, code, 0); - if (dataBuffer.length > 2) dataBuffer.write(data, 2); - this.frameAndSend(0x8, dataBuffer, true, mask); -} - -/** - * Sends a ping message to the remote party. - * - * @api public - */ - -Sender.prototype.ping = function(data, options) { - var mask = options && options.mask; - this.frameAndSend(0x9, data || '', true, mask); -} - -/** - * Sends a pong message to the remote party. - * - * @api public - */ - -Sender.prototype.pong = function(data, options) { - var mask = options && options.mask; - this.frameAndSend(0xa, data || '', true, mask); -} - -/** - * Sends text or binary data to the remote party. - * - * @api public - */ - -Sender.prototype.send = function(data, options, cb) { - var finalFragment = options && options.fin === false ? false : true; - var mask = options && options.mask; - var opcode = options && options.binary ? 2 : 1; - if (this.firstFragment === false) opcode = 0; - else this.firstFragment = false; - if (finalFragment) this.firstFragment = true - this.frameAndSend(opcode, data, finalFragment, mask, cb); -} - -/** - * Frames and sends a piece of data according to the HyBi WebSocket protocol. - * - * @api private - */ - -Sender.prototype.frameAndSend = function(opcode, data, finalFragment, maskData, cb) { - var canModifyData = false; - - if (!data) { - try { - this._socket.write(new Buffer([opcode | (finalFragment ? 0x80 : 0), 0 | (maskData ? 0x80 : 0)].concat(maskData ? [0, 0, 0, 0] : [])), 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - return; - } - - if (!Buffer.isBuffer(data)) { - canModifyData = true; - if (data && (typeof data.byteLength !== 'undefined' || typeof data.buffer !== 'undefined')) { - data = getArrayBuffer(data); - } else { - data = new Buffer(data); - } - } - - var dataLength = data.length - , dataOffset = maskData ? 6 : 2 - , secondByte = dataLength; - - if (dataLength >= 65536) { - dataOffset += 8; - secondByte = 127; - } - else if (dataLength > 125) { - dataOffset += 2; - secondByte = 126; - } - - var mergeBuffers = dataLength < 32768 || (maskData && !canModifyData); - var totalLength = mergeBuffers ? dataLength + dataOffset : dataOffset; - var outputBuffer = new Buffer(totalLength); - outputBuffer[0] = finalFragment ? opcode | 0x80 : opcode; - - switch (secondByte) { - case 126: - writeUInt16BE.call(outputBuffer, dataLength, 2); - break; - case 127: - writeUInt32BE.call(outputBuffer, 0, 2); - writeUInt32BE.call(outputBuffer, dataLength, 6); - } - - if (maskData) { - outputBuffer[1] = secondByte | 0x80; - var mask = this._randomMask || (this._randomMask = getRandomMask()); - outputBuffer[dataOffset - 4] = mask[0]; - outputBuffer[dataOffset - 3] = mask[1]; - outputBuffer[dataOffset - 2] = mask[2]; - outputBuffer[dataOffset - 1] = mask[3]; - if (mergeBuffers) { - bufferUtil.mask(data, mask, outputBuffer, dataOffset, dataLength); - try { - this._socket.write(outputBuffer, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - else { - bufferUtil.mask(data, mask, data, 0, dataLength); - try { - this._socket.write(outputBuffer, 'binary'); - this._socket.write(data, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - } - else { - outputBuffer[1] = secondByte; - if (mergeBuffers) { - data.copy(outputBuffer, dataOffset); - try { - this._socket.write(outputBuffer, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - else { - try { - this._socket.write(outputBuffer, 'binary'); - this._socket.write(data, 'binary', cb); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else this.emit('error', e); - } - } - } -} - -module.exports = Sender; - -function writeUInt16BE(value, offset) { - this[offset] = (value & 0xff00)>>8; - this[offset+1] = value & 0xff; -} - -function writeUInt32BE(value, offset) { - this[offset] = (value & 0xff000000)>>24; - this[offset+1] = (value & 0xff0000)>>16; - this[offset+2] = (value & 0xff00)>>8; - this[offset+3] = value & 0xff; -} - -function getArrayBuffer(data) { - // data is either an ArrayBuffer or ArrayBufferView. - var array = new Uint8Array(data.buffer || data) - , l = data.byteLength || data.length - , o = data.byteOffset || 0 - , buffer = new Buffer(l); - for (var i = 0; i < l; ++i) { - buffer[i] = array[o+i]; - } - return buffer; -} - -function getRandomMask() { - return new Buffer([ - ~~(Math.random() * 255), - ~~(Math.random() * 255), - ~~(Math.random() * 255), - ~~(Math.random() * 255) - ]); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.fallback.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.fallback.js deleted file mode 100644 index 2c7c4fd4..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.fallback.js +++ /dev/null @@ -1,12 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -module.exports.Validation = { - isValidUTF8: function(buffer) { - return true; - } -}; - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.js deleted file mode 100644 index 0f3109a0..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/Validation.js +++ /dev/null @@ -1,16 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -try { - module.exports = require('../build/Release/validation'); -} catch (e) { try { - module.exports = require('../build/default/validation'); -} catch (e) { try { - module.exports = require('./Validation.fallback'); -} catch (e) { - console.error('validation.node seems to not have been built. Run npm install.'); - throw e; -}}} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js deleted file mode 100644 index cce3cb41..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocket.js +++ /dev/null @@ -1,818 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util') - , events = require('events') - , http = require('http') - , https = require('https') - , crypto = require('crypto') - , url = require('url') - , fs = require('fs') - , Options = require('options') - , Sender = require('./Sender') - , Receiver = require('./Receiver') - , SenderHixie = require('./Sender.hixie') - , ReceiverHixie = require('./Receiver.hixie'); - -/** - * Constants - */ - -// Default protocol version - -var protocolVersion = 13; - -// Close timeout - -var closeTimeout = 30000; // Allow 5 seconds to terminate the connection cleanly - -/** - * Node version 0.4 and 0.6 compatibility - */ - -var isNodeV4 = /^v0\.4/.test(process.version); - -/** - * WebSocket implementation - */ - -function WebSocket(address, protocols, options) { - - if (protocols && !Array.isArray(protocols) && 'object' == typeof protocols) { - // accept the "options" Object as the 2nd argument - options = protocols; - protocols = null; - } - if ('string' == typeof protocols) { - protocols = [ protocols ]; - } - if (!Array.isArray(protocols)) { - protocols = []; - } - // TODO: actually handle the `Sub-Protocols` part of the WebSocket client - - this._socket = null; - this.bytesReceived = 0; - this.readyState = null; - this.supports = {}; - - if (Array.isArray(address)) { - initAsServerClient.apply(this, address.concat(options)); - } else { - initAsClient.apply(this, [address, protocols, options]); - } -} - -/** - * Inherits from EventEmitter. - */ - -util.inherits(WebSocket, events.EventEmitter); - -/** - * Ready States - */ - -["CONNECTING", "OPEN", "CLOSING", "CLOSED"].forEach(function (state, index) { - WebSocket.prototype[state] = WebSocket[state] = index; -}); - -/** - * Gracefully closes the connection, after sending a description message to the server - * - * @param {Object} data to be sent to the server - * @api public - */ - -WebSocket.prototype.close = function(code, data) { - if (this.readyState == WebSocket.CLOSING || this.readyState == WebSocket.CLOSED) return; - if (this.readyState == WebSocket.CONNECTING) { - this.readyState = WebSocket.CLOSED; - return; - } - try { - this.readyState = WebSocket.CLOSING; - this._closeCode = code; - this._closeMessage = data; - var mask = !this._isServer; - this._sender.close(code, data, mask); - } - catch (e) { - this.emit('error', e); - } - finally { - this.terminate(); - } -} - -/** - * Pause the client stream - * - * @api public - */ - -WebSocket.prototype.pause = function() { - if (this.readyState != WebSocket.OPEN) throw new Error('not opened'); - return this._socket.pause(); -} - -/** - * Sends a ping - * - * @param {Object} data to be sent to the server - * @param {Object} Members - mask: boolean, binary: boolean - * @param {boolean} dontFailWhenClosed indicates whether or not to throw if the connection isnt open - * @api public - */ - -WebSocket.prototype.ping = function(data, options, dontFailWhenClosed) { - if (this.readyState != WebSocket.OPEN) { - if (dontFailWhenClosed === true) return; - throw new Error('not opened'); - } - options = options || {}; - if (typeof options.mask == 'undefined') options.mask = !this._isServer; - this._sender.ping(data, options); -} - -/** - * Sends a pong - * - * @param {Object} data to be sent to the server - * @param {Object} Members - mask: boolean, binary: boolean - * @param {boolean} dontFailWhenClosed indicates whether or not to throw if the connection isnt open - * @api public - */ - -WebSocket.prototype.pong = function(data, options, dontFailWhenClosed) { - if (this.readyState != WebSocket.OPEN) { - if (dontFailWhenClosed === true) return; - throw new Error('not opened'); - } - options = options || {}; - if (typeof options.mask == 'undefined') options.mask = !this._isServer; - this._sender.pong(data, options); -} - -/** - * Resume the client stream - * - * @api public - */ - -WebSocket.prototype.resume = function() { - if (this.readyState != WebSocket.OPEN) throw new Error('not opened'); - return this._socket.resume(); -} - -/** - * Sends a piece of data - * - * @param {Object} data to be sent to the server - * @param {Object} Members - mask: boolean, binary: boolean - * @param {function} Optional callback which is executed after the send completes - * @api public - */ - -WebSocket.prototype.send = function(data, options, cb) { - if (typeof options == 'function') { - cb = options; - options = {}; - } - if (this.readyState != WebSocket.OPEN) { - if (typeof cb == 'function') cb(new Error('not opened')); - else throw new Error('not opened'); - return; - } - if (!data) data = ''; - if (this._queue) { - var self = this; - this._queue.push(function() { self.send(data, options, cb); }); - return; - } - options = options || {}; - options.fin = true; - if (typeof options.binary == 'undefined') { - options.binary = (data instanceof ArrayBuffer || data instanceof Buffer || - data instanceof Uint8Array || - data instanceof Uint16Array || - data instanceof Uint32Array || - data instanceof Int8Array || - data instanceof Int16Array || - data instanceof Int32Array || - data instanceof Float32Array || - data instanceof Float64Array); - } - if (typeof options.mask == 'undefined') options.mask = !this._isServer; - if (data instanceof fs.ReadStream) { - startQueue(this); - var self = this; - sendStream(this, data, options, function(error) { - process.nextTick(function() { executeQueueSends(self); }); - if (typeof cb == 'function') cb(error); - }); - } - else this._sender.send(data, options, cb); -} - -/** - * Streams data through calls to a user supplied function - * - * @param {Object} Members - mask: boolean, binary: boolean - * @param {function} 'function (error, send)' which is executed on successive ticks of which send is 'function (data, final)'. - * @api public - */ - -WebSocket.prototype.stream = function(options, cb) { - if (typeof options == 'function') { - cb = options; - options = {}; - } - var self = this; - if (typeof cb != 'function') throw new Error('callback must be provided'); - if (this.readyState != WebSocket.OPEN) { - if (typeof cb == 'function') cb(new Error('not opened')); - else throw new Error('not opened'); - return; - } - if (this._queue) { - this._queue.push(function() { self.stream(options, cb); }); - return; - } - options = options || {}; - if (typeof options.mask == 'undefined') options.mask = !this._isServer; - startQueue(this); - var send = function(data, final) { - try { - if (self.readyState != WebSocket.OPEN) throw new Error('not opened'); - options.fin = final === true; - self._sender.send(data, options); - if (!final) process.nextTick(cb.bind(null, null, send)); - else executeQueueSends(self); - } - catch (e) { - if (typeof cb == 'function') cb(e); - else { - delete self._queue; - self.emit('error', e); - } - } - } - process.nextTick(cb.bind(null, null, send)); -} - -/** - * Immediately shuts down the connection - * - * @api public - */ - -WebSocket.prototype.terminate = function() { - if (this.readyState == WebSocket.CLOSED) return; - if (this._socket) { - try { - // End the connection - this._socket.end(); - } - catch (e) { - // Socket error during end() call, so just destroy it right now - cleanupWebsocketResources.call(this, true); - return; - } - - // Add a timeout to ensure that the connection is completely - // cleaned up within 30 seconds, even if the clean close procedure - // fails for whatever reason - this._closeTimer = setTimeout(cleanupWebsocketResources.bind(this, true), closeTimeout); - } - else if (this.readyState == WebSocket.CONNECTING) { - cleanupWebsocketResources.call(this, true); - } -}; - -/** - * Expose bufferedAmount - * - * @api public - */ - -Object.defineProperty(WebSocket.prototype, 'bufferedAmount', { - get: function get() { - var amount = 0; - if (this._socket) { - amount = this._socket.bufferSize || 0; - } - return amount; - } -}); - -/** - * Emulates the W3C Browser based WebSocket interface using function members. - * - * @see http://dev.w3.org/html5/websockets/#the-websocket-interface - * @api public - */ - -['open', 'error', 'close', 'message'].forEach(function(method) { - Object.defineProperty(WebSocket.prototype, 'on' + method, { - /** - * Returns the current listener - * - * @returns {Mixed} the set function or undefined - * @api public - */ - - get: function get() { - var listener = this.listeners(method)[0]; - return listener ? (listener._listener ? listener._listener : listener) : undefined; - }, - - /** - * Start listening for events - * - * @param {Function} listener the listener - * @returns {Mixed} the set function or undefined - * @api public - */ - - set: function set(listener) { - this.removeAllListeners(method); - this.addEventListener(method, listener); - } - }); -}); - -/** - * Emulates the W3C Browser based WebSocket interface using addEventListener. - * - * @see https://developer.mozilla.org/en/DOM/element.addEventListener - * @see http://dev.w3.org/html5/websockets/#the-websocket-interface - * @api public - */ -WebSocket.prototype.addEventListener = function(method, listener) { - var target = this; - if (typeof listener === 'function') { - if (method === 'message') { - function onMessage (data, flags) { - listener.call(this, new MessageEvent(data, flags.binary ? 'Binary' : 'Text', target)); - } - // store a reference so we can return the original function from the addEventListener hook - onMessage._listener = listener; - this.on(method, onMessage); - } else if (method === 'close') { - function onClose (code, message) { - listener.call(this, new CloseEvent(code, message, target)); - } - // store a reference so we can return the original function from the addEventListener hook - onClose._listener = listener; - this.on(method, onClose); - } else if (method === 'error') { - function onError (event) { - event.target = target; - listener.call(this, event); - } - // store a reference so we can return the original function from the addEventListener hook - onError._listener = listener; - this.on(method, onError); - } else if (method === 'open') { - function onOpen () { - listener.call(this, new OpenEvent(target)); - } - // store a reference so we can return the original function from the addEventListener hook - onOpen._listener = listener; - this.on(method, onOpen); - } else { - this.on(method, listener); - } - } -} - -module.exports = WebSocket; - -/** - * W3C MessageEvent - * - * @see http://www.w3.org/TR/html5/comms.html - * @api private - */ - -function MessageEvent(dataArg, typeArg, target) { - this.data = dataArg; - this.type = typeArg; - this.target = target; -} - -/** - * W3C CloseEvent - * - * @see http://www.w3.org/TR/html5/comms.html - * @api private - */ - -function CloseEvent(code, reason, target) { - this.wasClean = (typeof code == 'undefined' || code == 1000); - this.code = code; - this.reason = reason; - this.target = target; -} - -/** - * W3C OpenEvent - * - * @see http://www.w3.org/TR/html5/comms.html - * @api private - */ - -function OpenEvent(target) { - this.target = target; -} - -/** - * Entirely private apis, - * which may or may not be bound to a sepcific WebSocket instance. - */ - -function initAsServerClient(req, socket, upgradeHead, options) { - options = new Options({ - protocolVersion: protocolVersion, - protocol: null - }).merge(options); - - // expose state properties - this.protocol = options.value.protocol; - this.protocolVersion = options.value.protocolVersion; - this.supports.binary = (this.protocolVersion != 'hixie-76'); - this.upgradeReq = req; - this.readyState = WebSocket.CONNECTING; - this._isServer = true; - - // establish connection - if (options.value.protocolVersion == 'hixie-76') establishConnection.call(this, ReceiverHixie, SenderHixie, socket, upgradeHead); - else establishConnection.call(this, Receiver, Sender, socket, upgradeHead); -} - -function initAsClient(address, protocols, options) { - options = new Options({ - origin: null, - protocolVersion: protocolVersion, - host: null, - headers: null, - protocol: null, - agent: null, - - // ssl-related options - pfx: null, - key: null, - passphrase: null, - cert: null, - ca: null, - ciphers: null, - rejectUnauthorized: null - }).merge(options); - if (options.value.protocolVersion != 8 && options.value.protocolVersion != 13) { - throw new Error('unsupported protocol version'); - } - - // verify url and establish http class - var serverUrl = url.parse(address); - var isUnixSocket = serverUrl.protocol === 'ws+unix:'; - if (!serverUrl.host && !isUnixSocket) throw new Error('invalid url'); - var isSecure = serverUrl.protocol === 'wss:' || serverUrl.protocol === 'https:'; - var httpObj = isSecure ? https : http; - var port = serverUrl.port || (isSecure ? 443 : 80); - var auth = serverUrl.auth; - - // expose state properties - this._isServer = false; - this.url = address; - this.protocolVersion = options.value.protocolVersion; - this.supports.binary = (this.protocolVersion != 'hixie-76'); - - // begin handshake - var key = new Buffer(options.value.protocolVersion + '-' + Date.now()).toString('base64'); - var shasum = crypto.createHash('sha1'); - shasum.update(key + '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'); - var expectedServerKey = shasum.digest('base64'); - - var agent = options.value.agent; - // node<=v0.4.x compatibility - if (!agent && isNodeV4) { - isNodeV4 = true; - agent = new httpObj.Agent({ - host: serverUrl.hostname, - port: port - }); - } - - var headerHost = serverUrl.hostname; - // Append port number to Host and Origin header, only if specified in the url and non-default - if(serverUrl.port) { - if((isSecure && (port != 443)) || (!isSecure && (port != 80))){ - headerHost = headerHost + ':' + port; - } - } - - var requestOptions = { - port: port, - host: serverUrl.hostname, - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Host': headerHost, - 'Origin': headerHost, - 'Sec-WebSocket-Version': options.value.protocolVersion, - 'Sec-WebSocket-Key': key - } - }; - - // If we have basic auth. - if (auth) { - requestOptions.headers['Authorization'] = 'Basic ' + new Buffer(auth).toString('base64'); - } - - if (options.value.protocol) { - requestOptions.headers['Sec-WebSocket-Protocol'] = options.value.protocol; - } - - if (options.value.host) { - requestOptions.headers['Host'] = options.value.host; - } - - if (options.value.headers) { - for (var header in options.value.headers) { - if (options.value.headers.hasOwnProperty(header)) { - requestOptions.headers[header] = options.value.headers[header]; - } - } - } - - if (options.isDefinedAndNonNull('pfx') - || options.isDefinedAndNonNull('key') - || options.isDefinedAndNonNull('passphrase') - || options.isDefinedAndNonNull('cert') - || options.isDefinedAndNonNull('ca') - || options.isDefinedAndNonNull('ciphers') - || options.isDefinedAndNonNull('rejectUnauthorized')) { - - if (isNodeV4) { - throw new Error('Client side certificates are not supported on Node 0.4.x'); - } - - if (options.isDefinedAndNonNull('pfx')) requestOptions.pfx = options.value.pfx; - if (options.isDefinedAndNonNull('key')) requestOptions.key = options.value.key; - if (options.isDefinedAndNonNull('passphrase')) requestOptions.passphrase = options.value.passphrase; - if (options.isDefinedAndNonNull('cert')) requestOptions.cert = options.value.cert; - if (options.isDefinedAndNonNull('ca')) requestOptions.ca = options.value.ca; - if (options.isDefinedAndNonNull('ciphers')) requestOptions.ciphers = options.value.ciphers; - if (options.isDefinedAndNonNull('rejectUnauthorized')) requestOptions.rejectUnauthorized = options.value.rejectUnauthorized; - - if (!agent) { - // global agent ignores client side certificates - agent = new httpObj.Agent(requestOptions); - } - } - - if (isNodeV4) { - requestOptions.path = (serverUrl.pathname || '/') + (serverUrl.search || ''); - } - else requestOptions.path = serverUrl.path || '/'; - - if (agent) { - requestOptions.agent = agent; - } - - if (isUnixSocket) { - requestOptions.socketPath = serverUrl.pathname; - } - if (options.value.origin) { - if (options.value.protocolVersion < 13) requestOptions.headers['Sec-WebSocket-Origin'] = options.value.origin; - else requestOptions.headers['Origin'] = options.value.origin; - } - - var self = this; - var req = httpObj.request(requestOptions); - - (isNodeV4 ? agent : req).on('error', function(error) { - self.emit('error', error); - cleanupWebsocketResources.call(this, error); - }); - (isNodeV4 ? agent : req).once('response', function(res) { - var error = new Error('unexpected server response (' + res.statusCode + ')'); - self.emit('error', error); - cleanupWebsocketResources.call(this, error); - }); - (isNodeV4 ? agent : req).once('upgrade', function(res, socket, upgradeHead) { - if (self.readyState == WebSocket.CLOSED) { - // client closed before server accepted connection - self.emit('close'); - removeAllListeners(self); - socket.end(); - return; - } - var serverKey = res.headers['sec-websocket-accept']; - if (typeof serverKey == 'undefined' || serverKey !== expectedServerKey) { - self.emit('error', 'invalid server key'); - removeAllListeners(self); - socket.end(); - return; - } - - var serverProt = res.headers['sec-websocket-protocol']; - var protList = (options.value.protocol || "").split(/, */); - var protError = null; - if (!options.value.protocol && serverProt) { - protError = 'server sent a subprotocol even though none requested'; - } else if (options.value.protocol && !serverProt) { - protError = 'server sent no subprotocol even though requested'; - } else if (serverProt && protList.indexOf(serverProt) === -1) { - protError = 'server responded with an invalid protocol'; - } - if (protError) { - self.emit('error', protError); - removeAllListeners(self); - socket.end(); - return; - } else if (serverProt) { - self.protocol = serverProt; - } - - establishConnection.call(self, Receiver, Sender, socket, upgradeHead); - - // perform cleanup on http resources - removeAllListeners(isNodeV4 ? agent : req); - req = null; - agent = null; - }); - - req.end(); - this.readyState = WebSocket.CONNECTING; -} - -function establishConnection(ReceiverClass, SenderClass, socket, upgradeHead) { - this._socket = socket; - socket.setTimeout(0); - socket.setNoDelay(true); - var self = this; - this._receiver = new ReceiverClass(); - - // socket cleanup handlers - socket.on('end', cleanupWebsocketResources.bind(this)); - socket.on('close', cleanupWebsocketResources.bind(this)); - socket.on('error', cleanupWebsocketResources.bind(this)); - - // ensure that the upgradeHead is added to the receiver - function firstHandler(data) { - if (self.readyState != WebSocket.OPEN) return; - if (upgradeHead && upgradeHead.length > 0) { - self.bytesReceived += upgradeHead.length; - var head = upgradeHead; - upgradeHead = null; - self._receiver.add(head); - } - dataHandler = realHandler; - if (data) { - self.bytesReceived += data.length; - self._receiver.add(data); - } - } - // subsequent packets are pushed straight to the receiver - function realHandler(data) { - if (data) self.bytesReceived += data.length; - self._receiver.add(data); - } - var dataHandler = firstHandler; - // if data was passed along with the http upgrade, - // this will schedule a push of that on to the receiver. - // this has to be done on next tick, since the caller - // hasn't had a chance to set event handlers on this client - // object yet. - process.nextTick(firstHandler); - - // receiver event handlers - self._receiver.ontext = function (data, flags) { - flags = flags || {}; - self.emit('message', data, flags); - }; - self._receiver.onbinary = function (data, flags) { - flags = flags || {}; - flags.binary = true; - self.emit('message', data, flags); - }; - self._receiver.onping = function(data, flags) { - flags = flags || {}; - self.pong(data, {mask: !self._isServer, binary: flags.binary === true}, true); - self.emit('ping', data, flags); - }; - self._receiver.onpong = function(data, flags) { - self.emit('pong', data, flags); - }; - self._receiver.onclose = function(code, data, flags) { - flags = flags || {}; - self.close(code, data); - }; - self._receiver.onerror = function(reason, errorCode) { - // close the connection when the receiver reports a HyBi error code - self.close(typeof errorCode != 'undefined' ? errorCode : 1002, ''); - self.emit('error', reason, errorCode); - }; - - // finalize the client - this._sender = new SenderClass(socket); - this._sender.on('error', function(error) { - self.close(1002, ''); - self.emit('error', error); - }); - this.readyState = WebSocket.OPEN; - this.emit('open'); - - socket.on('data', dataHandler); -} - -function startQueue(instance) { - instance._queue = instance._queue || []; -} - -function executeQueueSends(instance) { - var queue = instance._queue; - if (typeof queue == 'undefined') return; - delete instance._queue; - for (var i = 0, l = queue.length; i < l; ++i) { - queue[i](); - } -} - -function sendStream(instance, stream, options, cb) { - stream.on('data', function(data) { - if (instance.readyState != WebSocket.OPEN) { - if (typeof cb == 'function') cb(new Error('not opened')); - else { - delete instance._queue; - instance.emit('error', new Error('not opened')); - } - return; - } - options.fin = false; - instance._sender.send(data, options); - }); - stream.on('end', function() { - if (instance.readyState != WebSocket.OPEN) { - if (typeof cb == 'function') cb(new Error('not opened')); - else { - delete instance._queue; - instance.emit('error', new Error('not opened')); - } - return; - } - options.fin = true; - instance._sender.send(null, options); - if (typeof cb == 'function') cb(null); - }); -} - -function cleanupWebsocketResources(error) { - if (this.readyState == WebSocket.CLOSED) return; - var emitClose = this.readyState != WebSocket.CONNECTING; - this.readyState = WebSocket.CLOSED; - - clearTimeout(this._closeTimer); - this._closeTimer = null; - if (emitClose) this.emit('close', this._closeCode || 1000, this._closeMessage || ''); - - if (this._socket) { - removeAllListeners(this._socket); - // catch all socket error after removing all standard handlers - var socket = this._socket; - this._socket.on('error', function() { - try { socket.destroy(); } catch (e) {} - }); - try { - if (!error) this._socket.end(); - else this._socket.destroy(); - } - catch (e) { /* Ignore termination errors */ } - this._socket = null; - } - if (this._sender) { - removeAllListeners(this._sender); - this._sender = null; - } - if (this._receiver) { - this._receiver.cleanup(); - this._receiver = null; - } - removeAllListeners(this); - this.on('error', function() {}); // catch all errors after this - delete this._queue; -} - -function removeAllListeners(instance) { - if (isNodeV4) { - // node v4 doesn't *actually* remove all listeners globally, - // so we do that instead - instance._events = {}; - } - else instance.removeAllListeners(); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocketServer.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocketServer.js deleted file mode 100644 index da759f8b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/WebSocketServer.js +++ /dev/null @@ -1,460 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var util = require('util') - , events = require('events') - , http = require('http') - , crypto = require('crypto') - , url = require('url') - , Options = require('options') - , WebSocket = require('./WebSocket') - , tls = require('tls') - , url = require('url'); - -/** - * WebSocket Server implementation - */ - -function WebSocketServer(options, callback) { - options = new Options({ - host: '0.0.0.0', - port: null, - server: null, - verifyClient: null, - handleProtocols: null, - path: null, - noServer: false, - disableHixie: false, - clientTracking: true - }).merge(options); - - if (!options.isDefinedAndNonNull('port') && !options.isDefinedAndNonNull('server') && !options.value.noServer) { - throw new TypeError('`port` or a `server` must be provided'); - } - - var self = this; - - if (options.isDefinedAndNonNull('port')) { - this._server = http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.end('Not implemented'); - }); - this._server.listen(options.value.port, options.value.host, callback); - this._closeServer = function() { self._server.close(); }; - } - else if (options.value.server) { - this._server = options.value.server; - if (options.value.path) { - // take note of the path, to avoid collisions when multiple websocket servers are - // listening on the same http server - if (this._server._webSocketPaths && options.value.server._webSocketPaths[options.value.path]) { - throw new Error('two instances of WebSocketServer cannot listen on the same http server path'); - } - if (typeof this._server._webSocketPaths !== 'object') { - this._server._webSocketPaths = {}; - } - this._server._webSocketPaths[options.value.path] = 1; - } - } - if (this._server) this._server.once('listening', function() { self.emit('listening'); }); - - if (typeof this._server != 'undefined') { - this._server.on('error', function(error) { - self.emit('error', error) - }); - this._server.on('upgrade', function(req, socket, upgradeHead) { - //copy upgradeHead to avoid retention of large slab buffers used in node core - var head = new Buffer(upgradeHead.length); - upgradeHead.copy(head); - - self.handleUpgrade(req, socket, head, function(client) { - self.emit('connection'+req.url, client); - self.emit('connection', client); - }); - }); - } - - this.options = options.value; - this.path = options.value.path; - this.clients = []; -} - -/** - * Inherits from EventEmitter. - */ - -util.inherits(WebSocketServer, events.EventEmitter); - -/** - * Immediately shuts down the connection. - * - * @api public - */ - -WebSocketServer.prototype.close = function() { - // terminate all associated clients - var error = null; - try { - for (var i = 0, l = this.clients.length; i < l; ++i) { - this.clients[i].terminate(); - } - } - catch (e) { - error = e; - } - - // remove path descriptor, if any - if (this.path && this._server._webSocketPaths) { - delete this._server._webSocketPaths[this.path]; - if (Object.keys(this._server._webSocketPaths).length == 0) { - delete this._server._webSocketPaths; - } - } - - // close the http server if it was internally created - try { - if (typeof this._closeServer !== 'undefined') { - this._closeServer(); - } - } - finally { - delete this._server; - } - if (error) throw error; -} - -/** - * Handle a HTTP Upgrade request. - * - * @api public - */ - -WebSocketServer.prototype.handleUpgrade = function(req, socket, upgradeHead, cb) { - // check for wrong path - if (this.options.path) { - var u = url.parse(req.url); - if (u && u.pathname !== this.options.path) return; - } - - if (typeof req.headers.upgrade === 'undefined' || req.headers.upgrade.toLowerCase() !== 'websocket') { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - if (req.headers['sec-websocket-key1']) handleHixieUpgrade.apply(this, arguments); - else handleHybiUpgrade.apply(this, arguments); -} - -module.exports = WebSocketServer; - -/** - * Entirely private apis, - * which may or may not be bound to a sepcific WebSocket instance. - */ - -function handleHybiUpgrade(req, socket, upgradeHead, cb) { - // handle premature socket errors - var errorHandler = function() { - try { socket.destroy(); } catch (e) {} - } - socket.on('error', errorHandler); - - // verify key presence - if (!req.headers['sec-websocket-key']) { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - // verify version - var version = parseInt(req.headers['sec-websocket-version']); - if ([8, 13].indexOf(version) === -1) { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - // verify protocol - var protocols = req.headers['sec-websocket-protocol']; - - // verify client - var origin = version < 13 ? - req.headers['sec-websocket-origin'] : - req.headers['origin']; - - // handler to call when the connection sequence completes - var self = this; - var completeHybiUpgrade2 = function(protocol) { - - // calc key - var key = req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - if (typeof protocol != 'undefined') { - headers.push('Sec-WebSocket-Protocol: ' + protocol); - } - - // allows external modification/inspection of handshake headers - self.emit('headers', headers); - - socket.setTimeout(0); - socket.setNoDelay(true); - try { - socket.write(headers.concat('', '').join('\r\n')); - } - catch (e) { - // if the upgrade write fails, shut the connection down hard - try { socket.destroy(); } catch (e) {} - return; - } - - var client = new WebSocket([req, socket, upgradeHead], { - protocolVersion: version, - protocol: protocol - }); - - if (self.options.clientTracking) { - self.clients.push(client); - client.on('close', function() { - var index = self.clients.indexOf(client); - if (index != -1) { - self.clients.splice(index, 1); - } - }); - } - - // signal upgrade complete - socket.removeListener('error', errorHandler); - cb(client); - } - - // optionally call external protocol selection handler before - // calling completeHybiUpgrade2 - var completeHybiUpgrade1 = function() { - // choose from the sub-protocols - if (typeof self.options.handleProtocols == 'function') { - var protList = (protocols || "").split(/, */); - var callbackCalled = false; - var res = self.options.handleProtocols(protList, function(result, protocol) { - callbackCalled = true; - if (!result) abortConnection(socket, 404, 'Unauthorized') - else completeHybiUpgrade2(protocol); - }); - if (!callbackCalled) { - // the handleProtocols handler never called our callback - abortConnection(socket, 501, 'Could not process protocols'); - } - return; - } else { - if (typeof protocols !== 'undefined') { - completeHybiUpgrade2(protocols.split(/, */)[0]); - } - else { - completeHybiUpgrade2(); - } - } - } - - // optionally call external client verification handler - if (typeof this.options.verifyClient == 'function') { - var info = { - origin: origin, - secure: typeof req.connection.authorized !== 'undefined' || typeof req.connection.encrypted !== 'undefined', - req: req - }; - if (this.options.verifyClient.length == 2) { - this.options.verifyClient(info, function(result) { - if (!result) abortConnection(socket, 401, 'Unauthorized') - else completeHybiUpgrade1(); - }); - return; - } - else if (!this.options.verifyClient(info)) { - abortConnection(socket, 401, 'Unauthorized'); - return; - } - } - - completeHybiUpgrade1(); -} - -function handleHixieUpgrade(req, socket, upgradeHead, cb) { - // handle premature socket errors - var errorHandler = function() { - try { socket.destroy(); } catch (e) {} - } - socket.on('error', errorHandler); - - // bail if options prevent hixie - if (this.options.disableHixie) { - abortConnection(socket, 401, 'Hixie support disabled'); - return; - } - - // verify key presence - if (!req.headers['sec-websocket-key2']) { - abortConnection(socket, 400, 'Bad Request'); - return; - } - - var origin = req.headers['origin'] - , self = this; - - // setup handshake completion to run after client has been verified - var onClientVerified = function() { - var wshost; - if (!req.headers['x-forwarded-host']) - wshost = req.headers.host; - else - wshost = req.headers['x-forwarded-host']; - var location = ((req.headers['x-forwarded-proto'] === 'https' || socket.encrypted) ? 'wss' : 'ws') + '://' + wshost + req.url - , protocol = req.headers['sec-websocket-protocol']; - - // handshake completion code to run once nonce has been successfully retrieved - var completeHandshake = function(nonce, rest) { - // calculate key - var k1 = req.headers['sec-websocket-key1'] - , k2 = req.headers['sec-websocket-key2'] - , md5 = crypto.createHash('md5'); - - [k1, k2].forEach(function (k) { - var n = parseInt(k.replace(/[^\d]/g, '')) - , spaces = k.replace(/[^ ]/g, '').length; - if (spaces === 0 || n % spaces !== 0){ - abortConnection(socket, 400, 'Bad Request'); - return; - } - n /= spaces; - md5.update(String.fromCharCode( - n >> 24 & 0xFF, - n >> 16 & 0xFF, - n >> 8 & 0xFF, - n & 0xFF)); - }); - md5.update(nonce.toString('binary')); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: WebSocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Location: ' + location - ]; - if (typeof protocol != 'undefined') headers.push('Sec-WebSocket-Protocol: ' + protocol); - if (typeof origin != 'undefined') headers.push('Sec-WebSocket-Origin: ' + origin); - - socket.setTimeout(0); - socket.setNoDelay(true); - try { - // merge header and hash buffer - var headerBuffer = new Buffer(headers.concat('', '').join('\r\n')); - var hashBuffer = new Buffer(md5.digest('binary'), 'binary'); - var handshakeBuffer = new Buffer(headerBuffer.length + hashBuffer.length); - headerBuffer.copy(handshakeBuffer, 0); - hashBuffer.copy(handshakeBuffer, headerBuffer.length); - - // do a single write, which - upon success - causes a new client websocket to be setup - socket.write(handshakeBuffer, 'binary', function(err) { - if (err) return; // do not create client if an error happens - var client = new WebSocket([req, socket, rest], { - protocolVersion: 'hixie-76', - protocol: protocol - }); - if (self.options.clientTracking) { - self.clients.push(client); - client.on('close', function() { - var index = self.clients.indexOf(client); - if (index != -1) { - self.clients.splice(index, 1); - } - }); - } - - // signal upgrade complete - socket.removeListener('error', errorHandler); - cb(client); - }); - } - catch (e) { - try { socket.destroy(); } catch (e) {} - return; - } - } - - // retrieve nonce - var nonceLength = 8; - if (upgradeHead && upgradeHead.length >= nonceLength) { - var nonce = upgradeHead.slice(0, nonceLength); - var rest = upgradeHead.length > nonceLength ? upgradeHead.slice(nonceLength) : null; - completeHandshake.call(self, nonce, rest); - } - else { - // nonce not present in upgradeHead, so we must wait for enough data - // data to arrive before continuing - var nonce = new Buffer(nonceLength); - upgradeHead.copy(nonce, 0); - var received = upgradeHead.length; - var rest = null; - var handler = function (data) { - var toRead = Math.min(data.length, nonceLength - received); - if (toRead === 0) return; - data.copy(nonce, received, 0, toRead); - received += toRead; - if (received == nonceLength) { - socket.removeListener('data', handler); - if (toRead < data.length) rest = data.slice(toRead); - completeHandshake.call(self, nonce, rest); - } - } - socket.on('data', handler); - } - } - - // verify client - if (typeof this.options.verifyClient == 'function') { - var info = { - origin: origin, - secure: typeof req.connection.authorized !== 'undefined' || typeof req.connection.encrypted !== 'undefined', - req: req - }; - if (this.options.verifyClient.length == 2) { - var self = this; - this.options.verifyClient(info, function(result) { - if (!result) abortConnection(socket, 401, 'Unauthorized') - else onClientVerified.apply(self); - }); - return; - } - else if (!this.options.verifyClient(info)) { - abortConnection(socket, 401, 'Unauthorized'); - return; - } - } - - // no client verification required - onClientVerified(); -} - -function abortConnection(socket, code, name) { - try { - var response = [ - 'HTTP/1.1 ' + code + ' ' + name, - 'Content-type: text/html' - ]; - socket.write(response.concat('', '').join('\r\n')); - } - catch (e) { /* ignore errors - we've aborted this connection */ } - finally { - // ensure that an early aborted connection is shut down completely - try { socket.destroy(); } catch (e) {} - } -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/browser.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/browser.js deleted file mode 100644 index 8d3a755c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/lib/browser.js +++ /dev/null @@ -1,43 +0,0 @@ - -/** - * Module dependencies. - */ - -var global = (function() { return this; })(); - -/** - * WebSocket constructor. - */ - -var WebSocket = global.WebSocket || global.MozWebSocket; - -/** - * Module exports. - */ - -module.exports = WebSocket ? ws : null; - -/** - * WebSocket constructor. - * - * The third `opts` options object gets ignored in web browsers, since it's - * non-standard, and throws a TypeError if passed to the constructor. - * See: https://github.com/einaros/ws/issues/227 - * - * @param {String} uri - * @param {Array} protocols (optional) - * @param {Object) opts (optional) - * @api public - */ - -function ws(uri, protocols, opts) { - var instance; - if (protocols) { - instance = new WebSocket(uri, protocols); - } else { - instance = new WebSocket(uri); - } - return instance; -} - -if (WebSocket) ws.prototype = WebSocket.prototype; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.npmignore deleted file mode 100644 index f1250e58..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -support -test -examples -*.sock diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.travis.yml b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.travis.yml deleted file mode 100644 index f1d0f13c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.4 - - 0.6 diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/History.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/History.md deleted file mode 100644 index 4961d2e2..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/History.md +++ /dev/null @@ -1,107 +0,0 @@ - -0.6.1 / 2012-06-01 -================== - - * Added: append (yes or no) on confirmation - * Added: allow node.js v0.7.x - -0.6.0 / 2012-04-10 -================== - - * Added `.prompt(obj, callback)` support. Closes #49 - * Added default support to .choose(). Closes #41 - * Fixed the choice example - -0.5.1 / 2011-12-20 -================== - - * Fixed `password()` for recent nodes. Closes #36 - -0.5.0 / 2011-12-04 -================== - - * Added sub-command option support [itay] - -0.4.3 / 2011-12-04 -================== - - * Fixed custom help ordering. Closes #32 - -0.4.2 / 2011-11-24 -================== - - * Added travis support - * Fixed: line-buffered input automatically trimmed. Closes #31 - -0.4.1 / 2011-11-18 -================== - - * Removed listening for "close" on --help - -0.4.0 / 2011-11-15 -================== - - * Added support for `--`. Closes #24 - -0.3.3 / 2011-11-14 -================== - - * Fixed: wait for close event when writing help info [Jerry Hamlet] - -0.3.2 / 2011-11-01 -================== - - * Fixed long flag definitions with values [felixge] - -0.3.1 / 2011-10-31 -================== - - * Changed `--version` short flag to `-V` from `-v` - * Changed `.version()` so it's configurable [felixge] - -0.3.0 / 2011-10-31 -================== - - * Added support for long flags only. Closes #18 - -0.2.1 / 2011-10-24 -================== - - * "node": ">= 0.4.x < 0.7.0". Closes #20 - -0.2.0 / 2011-09-26 -================== - - * Allow for defaults that are not just boolean. Default peassignment only occurs for --no-*, optional, and required arguments. [Jim Isaacs] - -0.1.0 / 2011-08-24 -================== - - * Added support for custom `--help` output - -0.0.5 / 2011-08-18 -================== - - * Changed: when the user enters nothing prompt for password again - * Fixed issue with passwords beginning with numbers [NuckChorris] - -0.0.4 / 2011-08-15 -================== - - * Fixed `Commander#args` - -0.0.3 / 2011-08-15 -================== - - * Added default option value support - -0.0.2 / 2011-08-15 -================== - - * Added mask support to `Command#password(str[, mask], fn)` - * Added `Command#password(str, fn)` - -0.0.1 / 2010-01-03 -================== - - * Initial release diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Makefile b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Makefile deleted file mode 100644 index 00746255..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Makefile +++ /dev/null @@ -1,7 +0,0 @@ - -TESTS = $(shell find test/test.*.js) - -test: - @./test/run $(TESTS) - -.PHONY: test \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Readme.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Readme.md deleted file mode 100644 index b8328c37..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/Readme.md +++ /dev/null @@ -1,262 +0,0 @@ -# Commander.js - - The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). - - [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) - -## Installation - - $ npm install commander - -## Option parsing - - Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('commander'); - -program - .version('0.0.1') - .option('-p, --peppers', 'Add peppers') - .option('-P, --pineapple', 'Add pineapple') - .option('-b, --bbq', 'Add bbq sauce') - .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') - .parse(process.argv); - -console.log('you ordered a pizza with:'); -if (program.peppers) console.log(' - peppers'); -if (program.pineapple) console.log(' - pineappe'); -if (program.bbq) console.log(' - bbq'); -console.log(' - %s cheese', program.cheese); -``` - - Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. - -## Automated --help - - The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: - -``` - $ ./examples/pizza --help - - Usage: pizza [options] - - Options: - - -V, --version output the version number - -p, --peppers Add peppers - -P, --pineapple Add pineappe - -b, --bbq Add bbq sauce - -c, --cheese Add the specified type of cheese [marble] - -h, --help output usage information - -``` - -## Coercion - -```js -function range(val) { - return val.split('..').map(Number); -} - -function list(val) { - return val.split(','); -} - -program - .version('0.0.1') - .usage('[options] ') - .option('-i, --integer ', 'An integer argument', parseInt) - .option('-f, --float ', 'A float argument', parseFloat) - .option('-r, --range ..', 'A range', range) - .option('-l, --list ', 'A list', list) - .option('-o, --optional [value]', 'An optional value') - .parse(process.argv); - -console.log(' int: %j', program.integer); -console.log(' float: %j', program.float); -console.log(' optional: %j', program.optional); -program.range = program.range || []; -console.log(' range: %j..%j', program.range[0], program.range[1]); -console.log(' list: %j', program.list); -console.log(' args: %j', program.args); -``` - -## Custom help - - You can display arbitrary `-h, --help` information - by listening for "--help". Commander will automatically - exit once you are done so that the remainder of your program - does not execute causing undesired behaviours, for example - in the following executable "stuff" will not output when - `--help` is used. - -```js -#!/usr/bin/env node - -/** - * Module dependencies. - */ - -var program = require('../'); - -function list(val) { - return val.split(',').map(Number); -} - -program - .version('0.0.1') - .option('-f, --foo', 'enable some foo') - .option('-b, --bar', 'enable some bar') - .option('-B, --baz', 'enable some baz'); - -// must be before .parse() since -// node's emit() is immediate - -program.on('--help', function(){ - console.log(' Examples:'); - console.log(''); - console.log(' $ custom-help --help'); - console.log(' $ custom-help -h'); - console.log(''); -}); - -program.parse(process.argv); - -console.log('stuff'); -``` - -yielding the following help output: - -``` - -Usage: custom-help [options] - -Options: - - -h, --help output usage information - -V, --version output the version number - -f, --foo enable some foo - -b, --bar enable some bar - -B, --baz enable some baz - -Examples: - - $ custom-help --help - $ custom-help -h - -``` - -## .prompt(msg, fn) - - Single-line prompt: - -```js -program.prompt('name: ', function(name){ - console.log('hi %s', name); -}); -``` - - Multi-line prompt: - -```js -program.prompt('description:', function(name){ - console.log('hi %s', name); -}); -``` - - Coercion: - -```js -program.prompt('Age: ', Number, function(age){ - console.log('age: %j', age); -}); -``` - -```js -program.prompt('Birthdate: ', Date, function(date){ - console.log('date: %s', date); -}); -``` - -## .password(msg[, mask], fn) - -Prompt for password without echoing: - -```js -program.password('Password: ', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -Prompt for password with mask char "*": - -```js -program.password('Password: ', '*', function(pass){ - console.log('got "%s"', pass); - process.stdin.destroy(); -}); -``` - -## .confirm(msg, fn) - - Confirm with the given `msg`: - -```js -program.confirm('continue? ', function(ok){ - console.log(' got %j', ok); -}); -``` - -## .choose(list, fn) - - Let the user choose from a `list`: - -```js -var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - -console.log('Choose the coolest pet:'); -program.choose(list, function(i){ - console.log('you chose %d "%s"', i, list[i]); -}); -``` - -## Links - - - [API documentation](http://visionmedia.github.com/commander.js/) - - [ascii tables](https://github.com/LearnBoost/cli-table) - - [progress bars](https://github.com/visionmedia/node-progress) - - [more progress bars](https://github.com/substack/node-multimeter) - - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) - -## License - -(The MIT License) - -Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/index.js deleted file mode 100644 index 06ec1e4b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/index.js +++ /dev/null @@ -1,2 +0,0 @@ - -module.exports = require('./lib/commander'); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/lib/commander.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/lib/commander.js deleted file mode 100644 index 5ba87ebb..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/lib/commander.js +++ /dev/null @@ -1,1026 +0,0 @@ - -/*! - * commander - * Copyright(c) 2011 TJ Holowaychuk - * MIT Licensed - */ - -/** - * Module dependencies. - */ - -var EventEmitter = require('events').EventEmitter - , path = require('path') - , tty = require('tty') - , basename = path.basename; - -/** - * Expose the root command. - */ - -exports = module.exports = new Command; - -/** - * Expose `Command`. - */ - -exports.Command = Command; - -/** - * Expose `Option`. - */ - -exports.Option = Option; - -/** - * Initialize a new `Option` with the given `flags` and `description`. - * - * @param {String} flags - * @param {String} description - * @api public - */ - -function Option(flags, description) { - this.flags = flags; - this.required = ~flags.indexOf('<'); - this.optional = ~flags.indexOf('['); - this.bool = !~flags.indexOf('-no-'); - flags = flags.split(/[ ,|]+/); - if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); - this.long = flags.shift(); - this.description = description; -} - -/** - * Return option name. - * - * @return {String} - * @api private - */ - -Option.prototype.name = function(){ - return this.long - .replace('--', '') - .replace('no-', ''); -}; - -/** - * Check if `arg` matches the short or long flag. - * - * @param {String} arg - * @return {Boolean} - * @api private - */ - -Option.prototype.is = function(arg){ - return arg == this.short - || arg == this.long; -}; - -/** - * Initialize a new `Command`. - * - * @param {String} name - * @api public - */ - -function Command(name) { - this.commands = []; - this.options = []; - this.args = []; - this.name = name; -} - -/** - * Inherit from `EventEmitter.prototype`. - */ - -Command.prototype.__proto__ = EventEmitter.prototype; - -/** - * Add command `name`. - * - * The `.action()` callback is invoked when the - * command `name` is specified via __ARGV__, - * and the remaining arguments are applied to the - * function for access. - * - * When the `name` is "*" an un-matched command - * will be passed as the first arg, followed by - * the rest of __ARGV__ remaining. - * - * Examples: - * - * program - * .version('0.0.1') - * .option('-C, --chdir ', 'change the working directory') - * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') - * .option('-T, --no-tests', 'ignore test hook') - * - * program - * .command('setup') - * .description('run remote setup commands') - * .action(function(){ - * console.log('setup'); - * }); - * - * program - * .command('exec ') - * .description('run the given remote command') - * .action(function(cmd){ - * console.log('exec "%s"', cmd); - * }); - * - * program - * .command('*') - * .description('deploy the given env') - * .action(function(env){ - * console.log('deploying "%s"', env); - * }); - * - * program.parse(process.argv); - * - * @param {String} name - * @return {Command} the new command - * @api public - */ - -Command.prototype.command = function(name){ - var args = name.split(/ +/); - var cmd = new Command(args.shift()); - this.commands.push(cmd); - cmd.parseExpectedArgs(args); - cmd.parent = this; - return cmd; -}; - -/** - * Parse expected `args`. - * - * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. - * - * @param {Array} args - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parseExpectedArgs = function(args){ - if (!args.length) return; - var self = this; - args.forEach(function(arg){ - switch (arg[0]) { - case '<': - self.args.push({ required: true, name: arg.slice(1, -1) }); - break; - case '[': - self.args.push({ required: false, name: arg.slice(1, -1) }); - break; - } - }); - return this; -}; - -/** - * Register callback `fn` for the command. - * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function(){ - * // output help here - * }); - * - * @param {Function} fn - * @return {Command} for chaining - * @api public - */ - -Command.prototype.action = function(fn){ - var self = this; - this.parent.on(this.name, function(args, unknown){ - // Parse any so-far unknown options - unknown = unknown || []; - var parsed = self.parseOptions(unknown); - - // Output help if necessary - outputHelpIfNecessary(self, parsed.unknown); - - // If there are still any unknown options, then we simply - // die, unless someone asked for help, in which case we give it - // to them, and then we die. - if (parsed.unknown.length > 0) { - self.unknownOption(parsed.unknown[0]); - } - - self.args.forEach(function(arg, i){ - if (arg.required && null == args[i]) { - self.missingArgument(arg.name); - } - }); - - // Always append ourselves to the end of the arguments, - // to make sure we match the number of arguments the user - // expects - if (self.args.length) { - args[self.args.length] = self; - } else { - args.push(self); - } - - fn.apply(this, args); - }); - return this; -}; - -/** - * Define option with `flags`, `description` and optional - * coercion `fn`. - * - * The `flags` string should contain both the short and long flags, - * separated by comma, a pipe or space. The following are all valid - * all will output this way when `--help` is used. - * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: - * - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); - * - * --pepper - * program.pepper - * // => Boolean - * - * // simple boolean defaulting to false - * program.option('-C, --no-cheese', 'remove cheese'); - * - * program.cheese - * // => true - * - * --no-cheese - * program.cheese - * // => true - * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); - * - * --chdir /tmp - * program.chdir - * // => "/tmp" - * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); - * - * @param {String} flags - * @param {String} description - * @param {Function|Mixed} fn or default - * @param {Mixed} defaultValue - * @return {Command} for chaining - * @api public - */ - -Command.prototype.option = function(flags, description, fn, defaultValue){ - var self = this - , option = new Option(flags, description) - , oname = option.name() - , name = camelcase(oname); - - // default as 3rd arg - if ('function' != typeof fn) defaultValue = fn, fn = null; - - // preassign default value only for --no-*, [optional], or - if (false == option.bool || option.optional || option.required) { - // when --no-* we make sure default is true - if (false == option.bool) defaultValue = true; - // preassign only if we have a default - if (undefined !== defaultValue) self[name] = defaultValue; - } - - // register the option - this.options.push(option); - - // when it's passed assign the value - // and conditionally invoke the callback - this.on(oname, function(val){ - // coercion - if (null != val && fn) val = fn(val); - - // unassigned or bool - if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { - // if no value, bool true, and we have a default, then use it! - if (null == val) { - self[name] = option.bool - ? defaultValue || true - : false; - } else { - self[name] = val; - } - } else if (null !== val) { - // reassign - self[name] = val; - } - }); - - return this; -}; - -/** - * Parse `argv`, settings options and invoking commands when defined. - * - * @param {Array} argv - * @return {Command} for chaining - * @api public - */ - -Command.prototype.parse = function(argv){ - // store raw args - this.rawArgs = argv; - - // guess name - if (!this.name) this.name = basename(argv[1]); - - // process argv - var parsed = this.parseOptions(this.normalize(argv.slice(2))); - this.args = parsed.args; - return this.parseArgs(this.args, parsed.unknown); -}; - -/** - * Normalize `args`, splitting joined short flags. For example - * the arg "-abc" is equivalent to "-a -b -c". - * - * @param {Array} args - * @return {Array} - * @api private - */ - -Command.prototype.normalize = function(args){ - var ret = [] - , arg; - - for (var i = 0, len = args.length; i < len; ++i) { - arg = args[i]; - if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { - arg.slice(1).split('').forEach(function(c){ - ret.push('-' + c); - }); - } else { - ret.push(arg); - } - } - - return ret; -}; - -/** - * Parse command `args`. - * - * When listener(s) are available those - * callbacks are invoked, otherwise the "*" - * event is emitted and those actions are invoked. - * - * @param {Array} args - * @return {Command} for chaining - * @api private - */ - -Command.prototype.parseArgs = function(args, unknown){ - var cmds = this.commands - , len = cmds.length - , name; - - if (args.length) { - name = args[0]; - if (this.listeners(name).length) { - this.emit(args.shift(), args, unknown); - } else { - this.emit('*', args); - } - } else { - outputHelpIfNecessary(this, unknown); - - // If there were no args and we have unknown options, - // then they are extraneous and we need to error. - if (unknown.length > 0) { - this.unknownOption(unknown[0]); - } - } - - return this; -}; - -/** - * Return an option matching `arg` if any. - * - * @param {String} arg - * @return {Option} - * @api private - */ - -Command.prototype.optionFor = function(arg){ - for (var i = 0, len = this.options.length; i < len; ++i) { - if (this.options[i].is(arg)) { - return this.options[i]; - } - } -}; - -/** - * Parse options from `argv` returning `argv` - * void of these options. - * - * @param {Array} argv - * @return {Array} - * @api public - */ - -Command.prototype.parseOptions = function(argv){ - var args = [] - , len = argv.length - , literal - , option - , arg; - - var unknownOptions = []; - - // parse options - for (var i = 0; i < len; ++i) { - arg = argv[i]; - - // literal args after -- - if ('--' == arg) { - literal = true; - continue; - } - - if (literal) { - args.push(arg); - continue; - } - - // find matching Option - option = this.optionFor(arg); - - // option is defined - if (option) { - // requires arg - if (option.required) { - arg = argv[++i]; - if (null == arg) return this.optionMissingArgument(option); - if ('-' == arg[0]) return this.optionMissingArgument(option, arg); - this.emit(option.name(), arg); - // optional arg - } else if (option.optional) { - arg = argv[i+1]; - if (null == arg || '-' == arg[0]) { - arg = null; - } else { - ++i; - } - this.emit(option.name(), arg); - // bool - } else { - this.emit(option.name()); - } - continue; - } - - // looks like an option - if (arg.length > 1 && '-' == arg[0]) { - unknownOptions.push(arg); - - // If the next argument looks like it might be - // an argument for this option, we pass it on. - // If it isn't, then it'll simply be ignored - if (argv[i+1] && '-' != argv[i+1][0]) { - unknownOptions.push(argv[++i]); - } - continue; - } - - // arg - args.push(arg); - } - - return { args: args, unknown: unknownOptions }; -}; - -/** - * Argument `name` is missing. - * - * @param {String} name - * @api private - */ - -Command.prototype.missingArgument = function(name){ - console.error(); - console.error(" error: missing required argument `%s'", name); - console.error(); - process.exit(1); -}; - -/** - * `Option` is missing an argument, but received `flag` or nothing. - * - * @param {String} option - * @param {String} flag - * @api private - */ - -Command.prototype.optionMissingArgument = function(option, flag){ - console.error(); - if (flag) { - console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); - } else { - console.error(" error: option `%s' argument missing", option.flags); - } - console.error(); - process.exit(1); -}; - -/** - * Unknown option `flag`. - * - * @param {String} flag - * @api private - */ - -Command.prototype.unknownOption = function(flag){ - console.error(); - console.error(" error: unknown option `%s'", flag); - console.error(); - process.exit(1); -}; - -/** - * Set the program version to `str`. - * - * This method auto-registers the "-V, --version" flag - * which will print the version number when passed. - * - * @param {String} str - * @param {String} flags - * @return {Command} for chaining - * @api public - */ - -Command.prototype.version = function(str, flags){ - if (0 == arguments.length) return this._version; - this._version = str; - flags = flags || '-V, --version'; - this.option(flags, 'output the version number'); - this.on('version', function(){ - console.log(str); - process.exit(0); - }); - return this; -}; - -/** - * Set the description `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.description = function(str){ - if (0 == arguments.length) return this._description; - this._description = str; - return this; -}; - -/** - * Set / get the command usage `str`. - * - * @param {String} str - * @return {String|Command} - * @api public - */ - -Command.prototype.usage = function(str){ - var args = this.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }); - - var usage = '[options' - + (this.commands.length ? '] [command' : '') - + ']' - + (this.args.length ? ' ' + args : ''); - if (0 == arguments.length) return this._usage || usage; - this._usage = str; - - return this; -}; - -/** - * Return the largest option length. - * - * @return {Number} - * @api private - */ - -Command.prototype.largestOptionLength = function(){ - return this.options.reduce(function(max, option){ - return Math.max(max, option.flags.length); - }, 0); -}; - -/** - * Return help for options. - * - * @return {String} - * @api private - */ - -Command.prototype.optionHelp = function(){ - var width = this.largestOptionLength(); - - // Prepend the help information - return [pad('-h, --help', width) + ' ' + 'output usage information'] - .concat(this.options.map(function(option){ - return pad(option.flags, width) - + ' ' + option.description; - })) - .join('\n'); -}; - -/** - * Return command help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.commandHelp = function(){ - if (!this.commands.length) return ''; - return [ - '' - , ' Commands:' - , '' - , this.commands.map(function(cmd){ - var args = cmd.args.map(function(arg){ - return arg.required - ? '<' + arg.name + '>' - : '[' + arg.name + ']'; - }).join(' '); - - return cmd.name - + (cmd.options.length - ? ' [options]' - : '') + ' ' + args - + (cmd.description() - ? '\n' + cmd.description() - : ''); - }).join('\n\n').replace(/^/gm, ' ') - , '' - ].join('\n'); -}; - -/** - * Return program help documentation. - * - * @return {String} - * @api private - */ - -Command.prototype.helpInformation = function(){ - return [ - '' - , ' Usage: ' + this.name + ' ' + this.usage() - , '' + this.commandHelp() - , ' Options:' - , '' - , '' + this.optionHelp().replace(/^/gm, ' ') - , '' - , '' - ].join('\n'); -}; - -/** - * Prompt for a `Number`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForNumber = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseNumber(val){ - val = Number(val); - if (isNaN(val)) return self.promptSingleLine(str + '(must be a number) ', parseNumber); - fn(val); - }); -}; - -/** - * Prompt for a `Date`. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptForDate = function(str, fn){ - var self = this; - this.promptSingleLine(str, function parseDate(val){ - val = new Date(val); - if (isNaN(val.getTime())) return self.promptSingleLine(str + '(must be a date) ', parseDate); - fn(val); - }); -}; - -/** - * Single-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptSingleLine = function(str, fn){ - if ('function' == typeof arguments[2]) { - return this['promptFor' + (fn.name || fn)](str, arguments[2]); - } - - process.stdout.write(str); - process.stdin.setEncoding('utf8'); - process.stdin.once('data', function(val){ - fn(val.trim()); - }).resume(); -}; - -/** - * Multi-line prompt. - * - * @param {String} str - * @param {Function} fn - * @api private - */ - -Command.prototype.promptMultiLine = function(str, fn){ - var buf = []; - console.log(str); - process.stdin.setEncoding('utf8'); - process.stdin.on('data', function(val){ - if ('\n' == val || '\r\n' == val) { - process.stdin.removeAllListeners('data'); - fn(buf.join('\n')); - } else { - buf.push(val.trimRight()); - } - }).resume(); -}; - -/** - * Prompt `str` and callback `fn(val)` - * - * Commander supports single-line and multi-line prompts. - * To issue a single-line prompt simply add white-space - * to the end of `str`, something like "name: ", whereas - * for a multi-line prompt omit this "description:". - * - * - * Examples: - * - * program.prompt('Username: ', function(name){ - * console.log('hi %s', name); - * }); - * - * program.prompt('Description:', function(desc){ - * console.log('description was "%s"', desc.trim()); - * }); - * - * @param {String|Object} str - * @param {Function} fn - * @api public - */ - -Command.prototype.prompt = function(str, fn){ - var self = this; - - if ('string' == typeof str) { - if (/ $/.test(str)) return this.promptSingleLine.apply(this, arguments); - this.promptMultiLine(str, fn); - } else { - var keys = Object.keys(str) - , obj = {}; - - function next() { - var key = keys.shift() - , label = str[key]; - - if (!key) return fn(obj); - self.prompt(label, function(val){ - obj[key] = val; - next(); - }); - } - - next(); - } -}; - -/** - * Prompt for password with `str`, `mask` char and callback `fn(val)`. - * - * The mask string defaults to '', aka no output is - * written while typing, you may want to use "*" etc. - * - * Examples: - * - * program.password('Password: ', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * program.password('Password: ', '*', function(pass){ - * console.log('got "%s"', pass); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {String} mask - * @param {Function} fn - * @api public - */ - -Command.prototype.password = function(str, mask, fn){ - var self = this - , buf = ''; - - // default mask - if ('function' == typeof mask) { - fn = mask; - mask = ''; - } - - process.stdin.resume(); - tty.setRawMode(true); - process.stdout.write(str); - - // keypress - process.stdin.on('keypress', function(c, key){ - if (key && 'enter' == key.name) { - console.log(); - process.stdin.removeAllListeners('keypress'); - tty.setRawMode(false); - if (!buf.trim().length) return self.password(str, mask, fn); - fn(buf); - return; - } - - if (key && key.ctrl && 'c' == key.name) { - console.log('%s', buf); - process.exit(); - } - - process.stdout.write(mask); - buf += c; - }).resume(); -}; - -/** - * Confirmation prompt with `str` and callback `fn(bool)` - * - * Examples: - * - * program.confirm('continue? ', function(ok){ - * console.log(' got %j', ok); - * process.stdin.destroy(); - * }); - * - * @param {String} str - * @param {Function} fn - * @api public - */ - - -Command.prototype.confirm = function(str, fn, verbose){ - var self = this; - this.prompt(str, function(ok){ - if (!ok.trim()) { - if (!verbose) str += '(yes or no) '; - return self.confirm(str, fn, true); - } - fn(parseBool(ok)); - }); -}; - -/** - * Choice prompt with `list` of items and callback `fn(index, item)` - * - * Examples: - * - * var list = ['tobi', 'loki', 'jane', 'manny', 'luna']; - * - * console.log('Choose the coolest pet:'); - * program.choose(list, function(i){ - * console.log('you chose %d "%s"', i, list[i]); - * process.stdin.destroy(); - * }); - * - * @param {Array} list - * @param {Number|Function} index or fn - * @param {Function} fn - * @api public - */ - -Command.prototype.choose = function(list, index, fn){ - var self = this - , hasDefault = 'number' == typeof index; - - if (!hasDefault) { - fn = index; - index = null; - } - - list.forEach(function(item, i){ - if (hasDefault && i == index) { - console.log('* %d) %s', i + 1, item); - } else { - console.log(' %d) %s', i + 1, item); - } - }); - - function again() { - self.prompt(' : ', function(val){ - val = parseInt(val, 10) - 1; - if (hasDefault && isNaN(val)) val = index; - - if (null == list[val]) { - again(); - } else { - fn(val, list[val]); - } - }); - } - - again(); -}; - -/** - * Camel-case the given `flag` - * - * @param {String} flag - * @return {String} - * @api private - */ - -function camelcase(flag) { - return flag.split('-').reduce(function(str, word){ - return str + word[0].toUpperCase() + word.slice(1); - }); -} - -/** - * Parse a boolean `str`. - * - * @param {String} str - * @return {Boolean} - * @api private - */ - -function parseBool(str) { - return /^y|yes|ok|true$/i.test(str); -} - -/** - * Pad `str` to `width`. - * - * @param {String} str - * @param {Number} width - * @return {String} - * @api private - */ - -function pad(str, width) { - var len = Math.max(0, width - str.length); - return str + Array(len + 1).join(' '); -} - -/** - * Output help information if necessary - * - * @param {Command} command to output help for - * @param {Array} array of options to search for -h or --help - * @api private - */ - -function outputHelpIfNecessary(cmd, options) { - options = options || []; - for (var i = 0; i < options.length; i++) { - if (options[i] == '--help' || options[i] == '-h') { - process.stdout.write(cmd.helpInformation()); - cmd.emit('--help'); - process.exit(0); - } - } -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json deleted file mode 100644 index 9936f7d7..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/commander/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "commander", - "version": "0.6.1", - "description": "the complete solution for node.js command-line programs", - "keywords": [ - "command", - "option", - "parser", - "prompt", - "stdin" - ], - "author": { - "name": "TJ Holowaychuk", - "email": "tj@vision-media.ca" - }, - "repository": { - "type": "git", - "url": "https://github.com/visionmedia/commander.js.git" - }, - "dependencies": {}, - "devDependencies": { - "should": ">= 0.0.1" - }, - "scripts": { - "test": "make test" - }, - "main": "index", - "engines": { - "node": ">= 0.4.x" - }, - "readme": "# Commander.js\n\n The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).\n\n [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js)\n\n## Installation\n\n $ npm install commander\n\n## Option parsing\n\n Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('commander');\n\nprogram\n .version('0.0.1')\n .option('-p, --peppers', 'Add peppers')\n .option('-P, --pineapple', 'Add pineapple')\n .option('-b, --bbq', 'Add bbq sauce')\n .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble')\n .parse(process.argv);\n\nconsole.log('you ordered a pizza with:');\nif (program.peppers) console.log(' - peppers');\nif (program.pineapple) console.log(' - pineappe');\nif (program.bbq) console.log(' - bbq');\nconsole.log(' - %s cheese', program.cheese);\n```\n\n Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as \"--template-engine\" are camel-cased, becoming `program.templateEngine` etc.\n\n## Automated --help\n\n The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free:\n\n``` \n $ ./examples/pizza --help\n\n Usage: pizza [options]\n\n Options:\n\n -V, --version output the version number\n -p, --peppers Add peppers\n -P, --pineapple Add pineappe\n -b, --bbq Add bbq sauce\n -c, --cheese Add the specified type of cheese [marble]\n -h, --help output usage information\n\n```\n\n## Coercion\n\n```js\nfunction range(val) {\n return val.split('..').map(Number);\n}\n\nfunction list(val) {\n return val.split(',');\n}\n\nprogram\n .version('0.0.1')\n .usage('[options] ')\n .option('-i, --integer ', 'An integer argument', parseInt)\n .option('-f, --float ', 'A float argument', parseFloat)\n .option('-r, --range ..', 'A range', range)\n .option('-l, --list ', 'A list', list)\n .option('-o, --optional [value]', 'An optional value')\n .parse(process.argv);\n\nconsole.log(' int: %j', program.integer);\nconsole.log(' float: %j', program.float);\nconsole.log(' optional: %j', program.optional);\nprogram.range = program.range || [];\nconsole.log(' range: %j..%j', program.range[0], program.range[1]);\nconsole.log(' list: %j', program.list);\nconsole.log(' args: %j', program.args);\n```\n\n## Custom help\n\n You can display arbitrary `-h, --help` information\n by listening for \"--help\". Commander will automatically\n exit once you are done so that the remainder of your program\n does not execute causing undesired behaviours, for example\n in the following executable \"stuff\" will not output when\n `--help` is used.\n\n```js\n#!/usr/bin/env node\n\n/**\n * Module dependencies.\n */\n\nvar program = require('../');\n\nfunction list(val) {\n return val.split(',').map(Number);\n}\n\nprogram\n .version('0.0.1')\n .option('-f, --foo', 'enable some foo')\n .option('-b, --bar', 'enable some bar')\n .option('-B, --baz', 'enable some baz');\n\n// must be before .parse() since\n// node's emit() is immediate\n\nprogram.on('--help', function(){\n console.log(' Examples:');\n console.log('');\n console.log(' $ custom-help --help');\n console.log(' $ custom-help -h');\n console.log('');\n});\n\nprogram.parse(process.argv);\n\nconsole.log('stuff');\n```\n\nyielding the following help output:\n\n```\n\nUsage: custom-help [options]\n\nOptions:\n\n -h, --help output usage information\n -V, --version output the version number\n -f, --foo enable some foo\n -b, --bar enable some bar\n -B, --baz enable some baz\n\nExamples:\n\n $ custom-help --help\n $ custom-help -h\n\n```\n\n## .prompt(msg, fn)\n\n Single-line prompt:\n\n```js\nprogram.prompt('name: ', function(name){\n console.log('hi %s', name);\n});\n```\n\n Multi-line prompt:\n\n```js\nprogram.prompt('description:', function(name){\n console.log('hi %s', name);\n});\n```\n\n Coercion:\n\n```js\nprogram.prompt('Age: ', Number, function(age){\n console.log('age: %j', age);\n});\n```\n\n```js\nprogram.prompt('Birthdate: ', Date, function(date){\n console.log('date: %s', date);\n});\n```\n\n## .password(msg[, mask], fn)\n\nPrompt for password without echoing:\n\n```js\nprogram.password('Password: ', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\nPrompt for password with mask char \"*\":\n\n```js\nprogram.password('Password: ', '*', function(pass){\n console.log('got \"%s\"', pass);\n process.stdin.destroy();\n});\n```\n\n## .confirm(msg, fn)\n\n Confirm with the given `msg`:\n\n```js\nprogram.confirm('continue? ', function(ok){\n console.log(' got %j', ok);\n});\n```\n\n## .choose(list, fn)\n\n Let the user choose from a `list`:\n\n```js\nvar list = ['tobi', 'loki', 'jane', 'manny', 'luna'];\n\nconsole.log('Choose the coolest pet:');\nprogram.choose(list, function(i){\n console.log('you chose %d \"%s\"', i, list[i]);\n});\n```\n\n## Links\n\n - [API documentation](http://visionmedia.github.com/commander.js/)\n - [ascii tables](https://github.com/LearnBoost/cli-table)\n - [progress bars](https://github.com/visionmedia/node-progress)\n - [more progress bars](https://github.com/substack/node-multimeter)\n - [examples](https://github.com/visionmedia/commander.js/tree/master/examples)\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/visionmedia/commander.js/issues" - }, - "homepage": "https://github.com/visionmedia/commander.js", - "_id": "commander@0.6.1", - "_from": "commander@~0.6.1" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/.index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/.index.js deleted file mode 100644 index 68da1f34..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/.index.js +++ /dev/null @@ -1 +0,0 @@ -//noop \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/LICENSE b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/LICENSE deleted file mode 100644 index 352c2874..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/LICENSE +++ /dev/null @@ -1,43 +0,0 @@ -Copyright 2013, NAN contributors: - - Rod Vagg - - Benjamin Byholm - - Trevor Norris -(the "Original Author") -All rights reserved. - -MIT +no-false-attribs License - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -Distributions of all or part of the Software intended to be used -by the recipients as they would use the unmodified Software, -containing modifications that substantially alter, remove, or -disable functionality of the Software, outside of the documented -configuration mechanisms provided by the Software, shall be -modified such that the Original Author's bug reporting email -addresses and urls are either replaced with the contact information -of the parties responsible for the changes, or removed entirely. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. - - -Except where noted, this license applies to any and all software -programs and associated documentation files created by the -Original Author, when distributed with the Software. diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/README.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/README.md deleted file mode 100644 index 6ba57f78..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/README.md +++ /dev/null @@ -1,705 +0,0 @@ -Native Abstractions for Node.js -=============================== - -**A header file filled with macro and utility goodness for making addon development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.** - -***Current version: 0.3.2*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for changelog)* - -[![NPM](https://nodei.co/npm/nan.png?downloads=true&stars=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6)](https://nodei.co/npm/nan/) - -Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.11/0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle. - -This project also contains some helper utilities that make addon development a bit more pleasant. - - * **[Usage](#usage)** - * **[Example](#example)** - * **[API](#api)** - - -## Usage - -Simply add **NAN** as a dependency in the *package.json* of your Node addon: - -```js -"dependencies": { - ... - "nan" : "~0.3.1" - ... -} -``` - -Pull in the path to **NAN** in your *binding.gyp* so that you can use `#include "nan.h"` in your *.cpp*: - -```js -"include_dirs" : [ - ... - "` when compiling your addon. - - -## Example - -See **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use. - -For a simpler example, see the **[async pi estimation example](https://github.com/rvagg/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**. - -Compare to the current 0.10 version of this example, found in the [node-addon-examples](https://github.com/rvagg/node-addon-examples/tree/master/9_async_work) repository and also a 0.11 version of the same found [here](https://github.com/kkoopa/node-addon-examples/tree/5c01f58fc993377a567812597e54a83af69686d7/9_async_work). - -Note that there is no embedded version sniffing going on here and also the async work is made much simpler, see below for details on the `NanAsyncWorker` class. - -```c++ -// addon.cc -#include -#include "nan.h" -// ... - -using namespace v8; - -void InitAll(Handle exports) { - exports->Set(NanSymbol("calculateSync"), - FunctionTemplate::New(CalculateSync)->GetFunction()); - - exports->Set(NanSymbol("calculateAsync"), - FunctionTemplate::New(CalculateAsync)->GetFunction()); -} - -NODE_MODULE(addon, InitAll) -``` - -```c++ -// sync.h -#include -#include "nan.h" - -NAN_METHOD(CalculateSync); -``` - -```c++ -// sync.cc -#include -#include "nan.h" -#include "sync.h" -// ... - -using namespace v8; - -// Simple synchronous access to the `Estimate()` function -NAN_METHOD(CalculateSync) { - NanScope(); - - // expect a number as the first argument - int points = args[0]->Uint32Value(); - double est = Estimate(points); - - NanReturnValue(Number::New(est)); -} -``` - -```c++ -// async.cc -#include -#include "nan.h" -#include "async.h" - -// ... - -using namespace v8; - -class PiWorker : public NanAsyncWorker { - public: - PiWorker(NanCallback *callback, int points) - : NanAsyncWorker(callback), points(points) {} - ~PiWorker() {} - - // Executed inside the worker-thread. - // It is not safe to access V8, or V8 data structures - // here, so everything we need for input and output - // should go on `this`. - void Execute () { - estimate = Estimate(points); - } - - // Executed when the async work is complete - // this function will be run inside the main event loop - // so it is safe to use V8 again - void HandleOKCallback () { - NanScope(); - - Local argv[] = { - Local::New(Null()) - , Number::New(estimate) - }; - - callback->Call(2, argv); - }; - - private: - int points; - double estimate; -}; - -// Asynchronous access to the `Estimate()` function -NAN_METHOD(CalculateAsync) { - NanScope(); - - int points = args[0]->Uint32Value(); - NanCallback *callback = new NanCallback(args[1].As()); - - NanAsyncQueueWorker(new PiWorker(callback, points)); - NanReturnUndefined(); -} -``` - - -## API - - * NAN_METHOD - * NAN_GETTER - * NAN_SETTER - * NAN_PROPERTY_GETTER - * NAN_PROPERTY_SETTER - * NAN_PROPERTY_ENUMERATOR - * NAN_PROPERTY_DELETER - * NAN_PROPERTY_QUERY - * NAN_WEAK_CALLBACK - * NanReturnValue - * NanReturnUndefined - * NanReturnNull - * NanReturnEmptyString - * NanScope - * NanLocker - * NanUnlocker - * NanGetInternalFieldPointer - * NanSetInternalFieldPointer - * NanObjectWrapHandle - * NanMakeWeak - * NanSymbol - * NanGetPointerSafe - * NanSetPointerSafe - * NanFromV8String - * NanBooleanOptionValue - * NanUInt32OptionValue - * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int) - * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t) - * NanBufferUse(char *, uint32_t) - * NanNewContextHandle - * NanHasInstance - * NanPersistentToLocal - * NanDispose - * NanAssignPersistent - * NanInitPersistent - * NanCallback - * NanAsyncWorker - * NanAsyncQueueWorker - - -### NAN_METHOD(methodname) - -Use `NAN_METHOD` to define your V8 accessible methods: - -```c++ -// .h: -class Foo : public node::ObjectWrap { - ... - - static NAN_METHOD(Bar); - static NAN_METHOD(Baz); -} - - -// .cc: -NAN_METHOD(Foo::Bar) { - ... -} - -NAN_METHOD(Foo::Baz) { - ... -} -``` - -The reason for this macro is because of the method signature change in 0.11: - -```c++ -// 0.10 and below: -Handle name(const Arguments& args) - -// 0.11 and above -void name(const FunctionCallbackInfo& args) -``` - -The introduction of `FunctionCallbackInfo` brings additional complications: - - -### NAN_GETTER(methodname) - -Use `NAN_GETTER` to declare your V8 accessible getters. You get a `Local` `property` and an appropriately typed `args` object that can act like the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`. - - -### NAN_SETTER(methodname) - -Use `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_SETTER`. - - -### NAN_PROPERTY_GETTER(cbname) -Use `NAN_PROPERTY_GETTER` to declare your V8 accessible property getters. You get a `Local` `property` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`. - - -### NAN_PROPERTY_SETTER(cbname) -Use `NAN_PROPERTY_SETTER` to declare your V8 accessible property setters. Same as `NAN_PROPERTY_GETTER` but you also get a `Local` `value` object to work with. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_SETTER`. - - -### NAN_PROPERTY_ENUMERATOR(cbname) -Use `NAN_PROPERTY_ENUMERATOR` to declare your V8 accessible property enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_PROPERTY_GETTER` call. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`. - - -### NAN_PROPERTY_DELETER(cbname) -Use `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`. - - -### NAN_PROPERTY_QUERY(cbname) -Use `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`. - -You can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`. - - -### NAN_WEAK_CALLBACK(type, cbname) - -Use `NAN_WEAK_CALLBACK` to declare your V8 WeakReference callbacks. There is an object argument accessible through `NAN_WEAK_CALLBACK_OBJECT`. The `type` argument gives the type of the `data` argument, accessible through `NAN_WEAK_CALLBACK_DATA(type)`. - -```c++ -static NAN_WEAK_CALLBACK(BufferReference*, WeakCheck) { - if (NAN_WEAK_CALLBACK_DATA(BufferReference*)->noLongerNeeded_) { - delete NAN_WEAK_CALLBACK_DATA(BufferReference*); - } else { - // Still in use, revive, prevent GC - NanMakeWeak(NAN_WEAK_CALLBACK_OBJECT, NAN_WEAK_CALLBACK_DATA(BufferReference*), &WeakCheck); - } -} - -``` - -### NanReturnValue(Handle<Value>) - -Use `NanReturnValue` when you want to return a value from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Bar) { - ... - - NanReturnValue(String::New("FooBar!")); -} -``` - -No `return` statement required. - - -### NanReturnUndefined() - -Use `NanReturnUndefined` when you don't want to return anything from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnUndefined(); -} -``` - - -### NanReturnNull() - -Use `NanReturnNull` when you want to return `Null` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnNull(); -} -``` - - -### NanReturnEmptyString() - -Use `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method: - -```c++ -NAN_METHOD(Foo::Baz) { - ... - - NanReturnEmptyString(); -} -``` - - -### NanScope() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanScope(); - - NanReturnValue(String::New("FooBar!")); -} -``` - - -### NanLocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### NanUnlocker() - -The introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`: - -```c++ -NAN_METHOD(Foo::Bar) { - NanLocker(); - ... - NanUnlocker(); -} -``` - - -### void * NanGetInternalFieldPointer(Handle<Object>, int) - -Gets a pointer to the internal field with at `index` from a V8 `Object` handle. - -```c++ -Local obj; -... -NanGetInternalFieldPointer(obj, 0); -``` - -### void NanSetInternalFieldPointer(Handle<Object>, int, void *) - -Sets the value of the internal field at `index` on a V8 `Object` handle. - -```c++ -static Persistent dataWrapperCtor; -... -Local wrapper = NanPersistentToLocal(dataWrapperCtor)->NewInstance(); -NanSetInternalFieldPointer(wrapper, 0, this); -``` - - -### Local<Object> NanObjectWrapHandle(Object) - -When you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`: - -```c++ -NanObjectWrapHandle(iterator)->Get(String::NewSymbol("end")) -``` - - -### NanMakeWeak(Persistent<T>, parameter, callback) - -Make a persistent reference weak. - - -### String NanSymbol(char *) - -This isn't strictly about compatibility, it's just an easier way to create string symbol objects (i.e. `String::NewSymbol(x)`), for getting and setting object properties, or names of objects. - -```c++ -bool foo = false; -if (obj->Has(NanSymbol("foo"))) - foo = optionsObj->Get(NanSymbol("foo"))->BooleanValue() -``` - - -### Type NanGetPointerSafe(Type *[, Type]) - -A helper for getting values from optional pointers. If the pointer is `NULL`, the function returns the optional default value, which defaults to `0`. Otherwise, the function returns the value the pointer points to. - -```c++ -char *plugh(uint32_t *optional) { - char res[] = "xyzzy"; - uint32_t param = NanGetPointerSafe(optional, 0x1337); - switch (param) { - ... - } - NanSetPointerSafe(optional, 0xDEADBEEF); -} -``` - - -### bool NanSetPointerSafe(Type *, Type) - -A helper for setting optional argument pointers. If the pointer is `NULL`, the function simply return `false`. Otherwise, the value is assigned to the variable the pointer points to. - -```c++ -const char *plugh(size_t *outputsize) { - char res[] = "xyzzy"; - if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) { - ... - } - - ... -} -``` - - -### char* NanFromV8String(Handle<Value>[, enum Nan::Encoding, size_t *, char *, size_t, int]) - -When you want to convert a V8 `String` to a `char*` use `NanFromV8String`. It is possible to define an encoding that defaults to `Nan::UTF8` as well as a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows optionally setting `String::WriteOptions`, which default to `String::HINT_MANY_WRITES_EXPECTED | String::NO_NULL_TERMINATION`. -Just remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer: - -```c++ -size_t count; -char* name = NanFromV8String(args[0]); -char* decoded = NanFromV8String(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED); -char param_copy[count]; -memcpy(param_copy, decoded, count); -delete[] decoded; -``` - - -### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool]) - -When you have an "options" object that you need to fetch properties from, boolean options can be fetched with this pair. They check first if the object exists (`IsEmpty`), then if the object has the given property (`Has`) then they get and convert/coerce the property to a `bool`. - -The optional last parameter is the *default* value, which is `false` if left off: - -```c++ -// `foo` is false unless the user supplies a truthy value for it -bool foo = NanBooleanOptionValue(optionsObj, NanSymbol("foo")); -// `bar` is true unless the user supplies a falsy value for it -bool bar = NanBooleanOptionValueDefTrue(optionsObj, NanSymbol("bar"), true); -``` - - -### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t) - -Similar to `NanBooleanOptionValue`, use `NanUInt32OptionValue` to fetch an integer option from your options object. Can be any kind of JavaScript `Number` and it will be coerced to an unsigned 32-bit integer. - -Requires all 3 arguments as a default is not optional: - -```c++ -uint32_t count = NanUInt32OptionValue(optionsObj, NanSymbol("count"), 1024); -``` - - -### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int) - -For throwing `Error`, `TypeError` and `RangeError` objects. You should `return` this call: - -```c++ -return NanThrowError("you must supply a callback argument"); -``` - -Can also handle any custom object you may want to throw. If used with the error code argument, it will add the supplied error code to the error object as a property called `code`. - - -### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t) - -The `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation: - -```c++ -NanNewBufferHandle((char*)value.data(), value.size()); -``` - -Can also be used to initialize a `Buffer` with just a `size` argument. - -Can also be supplied with a `NAN_WEAK_CALLBACK` and a hint for the garbage collector, when dealing with weak references. - - -### Local<Object> NanBufferUse(char*, uint32_t) - -`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data. -While it was possible to get around this, it required a shim by passing a -callback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove -needing to use this shim. - -`NanBufferUse` uses the `char*` passed as the backing data, and will free the -memory automatically when the weak callback is called. Keep this in mind, as -careless use can lead to "double free or corruption" and other cryptic failures. - - -### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>) - -Can be used to check the type of an object to determine it is of a particular class you have already defined and have a `Persistent` handle for. - - -### Local<Type> NanPersistentToLocal(Persistent<Type>&) - -Aside from `FunctionCallbackInfo`, the biggest and most painful change to V8 in Node 0.11 is the many restrictions now placed on `Persistent` handles. They are difficult to assign and difficult to fetch the original value out of. - -Use `NanPersistentToLocal` to convert a `Persistent` handle back to a `Local` handle. - -```c++ -Local handle = NanPersistentToLocal(persistentHandle); -``` - - -### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>]) -Creates a new `Local` handle. - -```c++ -Local ftmpl = FunctionTemplate::New(); -Local otmpl = ftmpl->InstanceTemplate(); -Local ctx = NanNewContextHandle(NULL, otmpl); -``` - - -### void NanDispose(Persistent<T> &) - -Use `NanDispose` to dispose a `Persistent` handle. - -```c++ -NanDispose(persistentHandle); -``` - - -### NanAssignPersistent(type, handle, object) - -Use `NanAssignPersistent` to assign a non-`Persistent` handle to a `Persistent` one. You can no longer just declare a `Persistent` handle and assign directly to it later, you have to `Reset` it in Node 0.11, so this makes it easier. - -In general it is now better to place anything you want to protect from V8's garbage collector as properties of a generic `Object` and then assign that to a `Persistent`. This works in older versions of Node also if you use `NanAssignPersistent`: - -```c++ -Persistent persistentHandle; - -... - -Local obj = Object::New(); -obj->Set(NanSymbol("key"), keyHandle); // where keyHandle might be a Local -NanAssignPersistent(Object, persistentHandle, obj) -``` - - -### NanInitPersistent(type, name, object) - -User `NanInitPersistent` to declare and initialize a new `Persistent` with the supplied object. The assignment operator for `Persistent` is no longer public in Node 0.11, so this macro makes it easier to declare and initializing a new `Persistent`. See NanAssignPersistent for more information. - -```c++ -Local obj = Object::New(); -obj->Set(NanSymbol("key"), keyHandle); // where keyHandle might be a Local -NanInitPersistent(Object, persistentHandle, obj); -``` - - -### NanCallback - -Because of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Local` handles is annoyingly tricky. `NanCallback` makes it easier by taking your `Local` handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`. - -```c++ -Local callbackHandle = callback = args[0].As(); -NanCallback *callback = new NanCallback(callbackHandle); -// pass `callback` around and it's safe from GC until you: -delete callback; -``` - -You can execute the callback like so: - -```c++ -// no arguments: -callback->Call(0, NULL); - -// an error argument: -Local argv[] = { - Exception::Error(String::New("fail!")) -}; -callback->Call(1, argv); - -// a success argument: -Local argv[] = { - Local::New(Null()), - String::New("w00t!") -}; -callback->Call(2, argv); -``` - -`NanCallback` also has a `Local GetCallback()` method that you can use to fetch a local handle to the underlying callback function if you need it. - - -### NanAsyncWorker - -`NanAsyncWorker` is an abstract class that you can subclass to have much of the annoying async queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the async work is in progress. - -See a rough outline of the implementation: - -```c++ -class NanAsyncWorker { -public: - NanAsyncWorker (NanCallback *callback); - - // Clean up persistent handles and delete the *callback - virtual ~NanAsyncWorker (); - - // Check the `char *errmsg` property and call HandleOKCallback() - // or HandleErrorCallback depending on whether it has been set or not - virtual void WorkComplete (); - - // You must implement this to do some async work. If there is an - // error then allocate `errmsg` to to a message and the callback will - // be passed that string in an Error object - virtual void Execute (); - -protected: - // Set this if there is an error, otherwise it's NULL - const char *errmsg; - - // Save a V8 object in a Persistent handle to protect it from GC - void SavePersistent(const char *key, Local &obj); - - // Fetch a stored V8 object (don't call from within `Execute()`) - Local GetFromPersistent(const char *key); - - // Default implementation calls the callback function with no arguments. - // Override this to return meaningful data - virtual void HandleOKCallback (); - - // Default implementation calls the callback function with an Error object - // wrapping the `errmsg` string - virtual void HandleErrorCallback (); -}; -``` - - -### NanAsyncQueueWorker(NanAsyncWorker *) - -`NanAsyncQueueWorker` will run a `NanAsyncWorker` asynchronously via libuv. Both the *execute* and *after_work* steps are taken care of for you—most of the logic for this is embedded in `NanAsyncWorker`. - -### Contributors - -NAN is only possible due to the excellent work of the following contributors: - -
    '; -html += '
    Enter Your Password
    '; -html += '
    '; -html += '
    Password:


    '; -html += '
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "clear_login()") + ' ' + large_icon_button('check', 'Login', 'do_effect_login()') + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ENTER_KEY] = 'do_effect_login'; -session.hooks.keys[ESC_KEY] = 'clear_login'; -safe_focus( 'fe_lp_password' ); -show_popup_dialog(450, 225, html); -} -function clear_login() { -hide_popup_dialog(); -Nav.prev(); -} -function do_login() { -if ($('fe_username').value.match(/^\w+$/)) { -session.username = $('fe_username').value; -session.auto_login = $('fe_auto_login').checked; -do_login_prompt_2(); -return; -} -else { -do_openid_login(); -} -} -function do_openid_login() { -if (!$('fe_username').value) return; -session.openid_win = popup_window(''); -if (!session.openid_win) return; -session.open_id = $('fe_username').value; -session.auto_login = $('fe_auto_login') && $('fe_auto_login').checked; -hide_popup_dialog(); -show_progress_dialog(1, "Logging in..."); -session.hooks.before_error = 'close_openid_window'; -session.hooks.after_error = 'do_login_prompt'; -effect_api_send('openid_login', { -OpenID: session.open_id, -Infinite: session.auto_login ? 1 : 0 -}, 'do_openid_login_2'); -} -function close_openid_window() { -if (session.openid_win) { -session.openid_win.close(); -delete session.openid_win; -} -} -function do_openid_login_2(response) { -if (response.CheckURL) { -Debug.trace('openid', "Redirecting popup window to OpenID Check URL: " + response.CheckURL); -show_progress_dialog(1, "Waiting for popup window...", false, ['x', 'Cancel', 'do_login_prompt()']); -session.openid_win.location = response.CheckURL; -session.openid_win.focus(); -} -} -function receive_openid_response(iframe_response) { -var response = deep_copy_object(iframe_response); -Debug.trace('openid', "Received OpenID Response: " + dumper(response)); -hide_popup_dialog(); -if (response.Code) { -close_openid_window(); -return do_error( response.Description ); -} -delete session.hooks.before_error; -delete session.hooks.after_error; -if (response.SessionID) { -session.cookie.set( 'effect_session_id', response.SessionID ); -session.cookie.save(); -} -switch (response.Action) { -case 'popup': -show_progress_dialog(1, "Waiting for popup window...", false, ['x', 'Cancel', 'do_login_prompt()']); -Debug.trace('openid', "Redirecting popup window to OpenID Setup URL: " + response.SetupURL); -session.openid_win.location = response.SetupURL; -session.openid_win.focus(); -break; -case 'login': -close_openid_window(); -do_login_2(response); -break; -case 'register': -if (!response.Info) response.Info = {}; -close_openid_window(); -Debug.trace('openid', 'Original OpenID: ' + response.OpenID_Login); -Debug.trace('openid', 'Clean OpenID: ' + response.OpenID_Unique); -Debug.trace('openid', 'Registration Info: ' + dumper(response.Info)); -session.prereg = response.Info; -session.prereg.open_id_login = response.OpenID_Login; -session.prereg.open_id = response.OpenID_Unique; -if (session.user) { -if (!session.user.OpenIDs) session.user.OpenIDs = {}; -if (!session.user.OpenIDs.OpenID) session.user.OpenIDs.OpenID = []; -var dupe = find_object( session.user.OpenIDs.OpenID, { Unique: session.prereg.open_id } ); -if (dupe) return do_error("That OpenID is already registered and attached to your account. No need to add it again."); -session.user.OpenIDs.OpenID.push({ -Login: session.prereg.open_id_login, -Unique: session.prereg.open_id -}); -setTimeout( function() { -Nav.go('MyAccount', true); -do_message('success', 'Added new OpenID URL to account.'); -}, 1 ); -} -else { -setTimeout( function() { Nav.go('CreateAccount', true); }, 1 ); -} -break; -} -} -function do_effect_login() { -var password = $('fe_lp_password').value; -session.auto_login = $('fe_auto_login').checked; -hide_popup_dialog(); -show_progress_dialog(1, "Logging in..."); -session.hooks.after_error = 'do_login_prompt'; -effect_api_send('user_login', { -Username: session.username, -Password: password, -Infinite: session.auto_login ? 1 : 0 -}, 'do_login_2'); -} -function do_logout() { -effect_api_send('user_logout', {}, 'do_logout_2'); -} -function do_logout_2(response) { -hide_popup_dialog(); -show_default_login_status(); -delete session.hooks.after_error; -delete session.cookie.tree.effect_session_id; -session.cookie.save(); -session.storage = {}; -session.storage_dirty = false; -delete session.user; -delete session.first_login; -var old_username = session.username; -session.username = ''; -if (Nav.inited) { -Nav.go('Main'); -if (old_username) $GR.growl('success', "Logged out of account: " + old_username); -} -else { -Nav.init(); -} -} -function do_login_2(response, tx) { -if (response.FirstLogin) session.first_login = 1; -if (response.User.UserStorage) { -Debug.trace('Recovering site storage blob: session.storage = ' + response.User.UserStorage + ';'); -try { -eval( 'session.storage = ' + response.User.UserStorage + ';' ); -} -catch (e) { -Debug.trace("SITE STORAGE RECOVERY FAILED: " + e); -session.storage = {}; -} -delete response.User.UserStorage; -session.storage_dirty = false; -} -session.user = response.User; -session.username = session.user.Username; -hide_popup_dialog(); -delete session.hooks.after_error; -update_header(); -if (!tx || !tx._from_recover) $GR.growl('success', "Logged in as: " + session.username); -if (session.nav_after_login) { -Nav.go( session.nav_after_login ); -delete session.nav_after_login; -} -else if (Nav.currentAnchor().match(/^Login/)) { -Nav.go('Home'); -} -else { -Nav.refresh(); -} -Nav.init(); -} -function user_storage_mark() { -Debug.trace("Marking user storage as dirty"); -session.storage_dirty = true; -} -function user_storage_idle() { -if (session.storage_dirty && !session.mouseIsDown) { -user_storage_save(); -session.storage_dirty = false; -} -setTimeout( 'user_storage_idle()', 5000 ); -} -function user_storage_save() { -if (session.user) { -Debug.trace("Committing user storage blob"); -effect_api_send('update_user_storage', { Data: serialize(session.storage) }, 'user_storage_save_finish', { _silent: 1 } ); -} -} -function user_storage_save_finish(response, tx) { -} -function show_default_login_status() { -$('d_sidebar_wrapper_recent_games').hide(); -$('d_login_status').innerHTML = '
    ' + -'
    ' + -large_icon_button('key', "Login", '#Home') + '' + spacer(1,1) + '' + -'' + large_icon_button('user_add.png', "Signup", '#CreateAccount') + '
    ' + -'
    '; -$('d_tagline').innerHTML = -'Login' + ' | ' + -'Create Account'; -} -function update_header() { -var html = ''; -html += '
    '; -html += ''; -html += ''; -html += ''; -html += ''+spacer(2,2)+''; -html += session.user.FullName + '
    '; -html += spacer(1,5) + '
    '; -html += 'My Home  |  '; -html += 'Logout'; -html += '
    '; -$('d_login_status').innerHTML = html; -$('d_tagline').innerHTML = -'Welcome '+session.user.FirstName+'' + ' | ' + -'My Home' + ' | ' + -'Logout'; -effect_api_get( 'get_user_games', { limit:5, offset:0 }, 'receive_sidebar_recent_games', { } ); -} -function receive_sidebar_recent_games(response, tx) { -var html = ''; -if (response.Rows && response.Rows.Row) { -var games = always_array( response.Rows.Row ); -for (var idx = 0, len = games.length; idx < len; idx++) { -var game = games[idx]; -html += ''; -} -html += ''; -$('d_sidebar_recent_games').innerHTML = html; -$('d_sidebar_wrapper_recent_games').show(); -} -else { -$('d_sidebar_wrapper_recent_games').hide(); -} -} -function check_privilege(key) { -if (!session.user) return false; -if (session.user.Privileges.admin == 1) return true; -if (!key.toString().match(/^\//)) key = '/' + key; -var value = lookup_path(key, session.user.Privileges); -return( value && (value != 0) ); -} -function is_admin() { -return check_privilege('admin'); -} -function upgrade_flash_error() { -return alert("Sorry, file upload requires Adobe Flash Player 9 or higher."); -} -function cancel_user_image_manager() { -upload_destroy(); -hide_popup_dialog(); -delete session.hooks.keys[DELETE_KEY]; -} -function do_user_image_manager(callback) { -if (callback) session.uim_callback = callback; -else session.uim_callback = null; -session.temp_last_user_img = null; -session.temp_last_user_image_filename = ''; -var html = '
    '; -html += '
    Image Manager
    '; -html += '
    '; -html += ''; -html += '
    '; -html += '
    '; -html += ''; -html += ''; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', 'cancel_user_image_manager()') + ' ' + large_icon_button('bullet_upload.png', 'Upload Files...', 'upload_basic()', 'b_upload_user_image') + ' ' + large_icon_button('check', 'Choose', 'do_choose_user_image()', 'btn_choose_user_image', '', 'disabled') + '
    '; -html += '
    '; -session.hooks.keys[ENTER_KEY] = 'do_choose_user_image'; -session.hooks.keys[ESC_KEY] = 'cancel_user_image_manager'; -session.hooks.keys[DELETE_KEY] = 'do_delete_selected_user_image'; -show_popup_dialog(500, 300, html); -var self = this; -setTimeout( function() { -prep_upload('b_upload_user_image', '/effect/api/upload_user_image', [self, 'do_upload_user_image_2'], ['Image Files', '*.jpg;*.jpe;*.jpeg;*.gif;*.png']); -}, 1 ); -var args = { -limit: 50, -offset: 0, -random: Math.random() -}; -effect_api_get( 'user_images_get', args, 'uim_populate_images', { } ); -} -function do_upload_user_image_2() { -effect_api_mod_touch('user_images_get'); -effect_api_send('user_get', { -Username: session.username -}, [this, 'do_upload_user_image_3']); -} -function do_upload_user_image_3(response) { -if (response.User.LastUploadError) return do_error( "Failed to upload image: " + response.User.LastUploadError ); -do_user_image_manager( session.uim_callback ); -} -function uim_populate_images(response, tx) { -var html = ''; -var base_url = '/effect/api/view/users/' + session.username + '/images'; -if (response.Rows && response.Rows.Row) { -var imgs = always_array( response.Rows.Row ); -for (var idx = 0, len = imgs.length; idx < len; idx++) { -var img = imgs[idx]; -var class_name = ((img.Filename == session.temp_last_user_image_filename) ? 'choose_item_selected' : 'choose_item'); -html += ''; -} -} -else { -html = ''; -} -$('d_user_image_list').innerHTML = html; -} -function do_select_user_image(img, filename) { -if (session.temp_last_user_img) session.temp_last_user_img.className = 'choose_item'; -img.className = 'choose_item_selected'; -$('btn_choose_user_image').removeClass('disabled'); -session.temp_last_user_img = img; -session.temp_last_user_image_filename = filename; -} -function do_delete_selected_user_image() { -if (session.temp_last_user_image_filename) { -effect_api_send('user_image_delete', { Filename: session.temp_last_user_image_filename }, 'do_delete_selected_user_image_finish', {}); -} -} -function do_delete_selected_user_image_finish(response, tx) { -try { $('d_user_image_list').removeChild( session.temp_last_user_img ); } catch(e) {;} -session.temp_last_user_img = null; -session.temp_last_user_image_filename = null; -} -function do_choose_user_image() { -if (!session.temp_last_user_image_filename) return; -if (session.uim_callback) { -fire_callback( session.uim_callback, session.temp_last_user_image_filename ); -} -cancel_user_image_manager(); -} -function user_image_thumbnail(filename, width, height, attribs) { -var username = session.username; -if (filename.match(/^(\w+)\/(.+)$/)) { -username = RegExp.$1; -filename = RegExp.$2; -} -var url = '/effect/api/view/users/' + username + '/images/' + filename.replace(/\.(\w+)$/, '_thumb.jpg'); -return ''; -} -function get_user_display(username, full_name, base_url) { -if (!base_url) base_url = ''; -return icon('user', full_name || username, base_url + '#User/' + username); -} -function get_game_tab_bar(game_id, cur_page_name) { -return tab_bar([ -['#Game/' + game_id, 'Game', 'controller.png'], -['#GameDisplay/' + game_id, 'Display', 'monitor.png'], -['#GameAssets/' + game_id, 'Assets', 'folder_page_white.png'], -['#GameObjects/' + game_id, 'Objects', 'bricks.png'], -['#GameAudio/' + game_id, 'Audio', 'sound.gif'], -['#GameKeys/' + game_id, 'Keyboard', 'keyboard.png'], -['#GameLevels/' + game_id, 'Levels', 'world.png'], -['#GamePublisher/' + game_id, 'Publish', 'cd.png'] -], cur_page_name); -} -function get_user_tab_bar(cur_page_name) { -var tabs = [ -['#Home', 'My Home', 'house.png'] -]; -tabs.push( ['#MyAccount', 'Edit Account', 'user_edit.png'] ); -tabs.push( ['#ArticleEdit', 'Post Article', 'page_white_edit.png'] ); -if (config.ProEnabled) { -tabs.push( ['#UserPayments', 'Payments', 'money.png'] ); -} -tabs.push( ['#UserLog', 'Security Log', 'application_view_detail.png'] ); -return tab_bar(tabs, cur_page_name); -} -function get_admin_tab_bar(cur_page_name) { -var tabs = []; -tabs.push( ['#Admin', 'Admin', 'lock.png'] ); -tabs.push( ['#TicketSearch/bugs', 'Bug Tracker', 'bug.png'] ); -tabs.push( ['#TicketSearch/helpdesk', 'Help Desk', 'telephone.png'] ); -tabs.push( ['#AdminReport', 'Reports', 'chart_pie.png'] ); -return tab_bar(tabs, cur_page_name); -} -function get_string(path, args) { -assert(window.config, "get_string() called before config loaded"); -if (!args) args = {}; -args.config = config; -args.session = session; -args.query = session.query; -var value = lookup_path(path, config.Strings); -return (typeof(value) == 'string') ? substitute(value, args) : value; -} -function normalize_dir_path(path) { -if (!path.match(/^\//)) path = '/' + path; -if (!path.match(/\/$/)) path += '/'; -return path; -} -function textedit_window_save(storage_key, filename, content, callback) { -if (!callback) callback = null; -effect_api_mod_touch('textedit'); -if (storage_key.match(/^\/games\/([a-z0-9][a-z0-9\-]*[a-z0-9])\/assets(.+)$/)) { -var game_id = RegExp.$1; -var path = RegExp.$2; -show_progress_dialog(1, "Saving file..."); -effect_api_send('asset_save_file_contents', { -GameID: game_id, -Path: path, -Filename: filename, -Content: content -}, 'textedit_window_save_finish', { _mode: 'asset', _game_id: game_id, _filename: filename, _callback: callback } ); -} -else { -show_progress_dialog(1, "Saving data..."); -effect_api_send('admin_save_file_contents', { -Path: storage_key, -Filename: filename, -Content: content -}, 'textedit_window_save_finish', { _mode: 'admin', _storage_key: storage_key, _filename: filename, _callback: callback } ); -} -} -function textedit_window_save_finish(response, tx) { -hide_progress_dialog(); -if (tx._mode == 'asset') { -do_message('success', "Saved asset: \""+tx._filename+"\""); -show_glog_widget(); -} -else { -do_message('success', "Saved data: \""+tx._storage_key+'/'+tx._filename+"\""); -} -if (tx._callback) tx._callback(); -} -function do_buy(args) { -$P().hide(); -$('d_page_loading').show(); -effect_api_send('create_order', args, 'do_buy_redirect', { _buy_args: args } ); -} -function do_buy_redirect(response, tx) { -var args = tx._buy_args; -$('fe_gco_title').value = args.Title || ''; -$('fe_gco_desc').value = args.Desc || ''; -$('fe_gco_price').value = args.Price || ''; -$('fe_gco_after').value = args.After || ''; -$('fe_gco_unique_id').value = response.OrderID; -Debug.trace('payment', "Redirecting to Google Checkout"); -setTimeout( function() { $('BB_BuyButtonForm').submit(); }, 1 ); -} -function show_glog_widget(game_id) { -if (!game_id) game_id = session.glog_game_id; -if (!game_id) { -$('glog_widget').hide(); -return; -} -if (game_id != session.glog_game_id) { -$('glog_widget').hide(); -session.glog_game_id = game_id; -update_glog_widget(game_id); -} -else { -$('glog_widget').show(); -setTimeout( function() { update_glog_widget(game_id); }, 500 ); -} -} -function update_glog_widget(game_id) { -effect_api_get('game_get_log', { -id: game_id, -offset: 0, -limit: 1, -rand: Math.random() -}, 'receive_glog_data', { _game_id: game_id }); -} -function receive_glog_data(response, tx) { -var game_id = tx._game_id; -if (response && response.Rows && response.Rows.Row) { -var rows = always_array( response.Rows.Row ); -var row = rows[0]; -var html = ''; -html += '
    '; -html += '
    Latest Game Activity
    '; -html += ''; -html += ''; -html += '
    '; -html += '
    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + get_buddy_icon_display(row.Username, 1, 0) + ''; -html += '
    ' + icon( get_icon_for_glog_type(row.Type), ''+row.Message+'' ) + '
    '; -html += '
    ' + get_relative_date(row.Date, true) + '
    '; -html += '
    '; -$('glog_widget').innerHTML = html; -$('glog_widget').show(); -} -} -function show_glog_post_dialog(game_id) { -hide_popup_dialog(); -delete session.progress; -var html = ''; -html += '
    '; -html += '\n \n \n \n'); - }; - __out.push('\n\n'); - __out.push(require('templates/clients/modules/sub_header').call(this, { - heading: t("Ride Request") - })); - __out.push('\n\n\n
    \n
    \n
    \n
    \n \n \n \n \n
    \n\n
    '; -html += '
    Post Game Log Message
    '; -html += '
    '; -html += ''; -html += '
    Enter your log message here. Plain text only please.
    '; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', 'Post Message', "glog_post('"+game_id+"')") + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_glog_body' ); -show_popup_dialog(500, 175, html); -} -function glog_post(game_id) { -var msg = trim( $('fe_glog_body').value ); -if (msg) { -hide_popup_dialog(); -effect_api_send('game_post_log', { -GameID: game_id, -Message: msg -}, [this, 'glog_post_finish'], { _game_id: game_id }); -} -} -function glog_post_finish(response, tx) { -show_glog_widget( tx._game_id ); -} -function hide_glog_widget() { -$('glog_widget').hide(); -} -function get_icon_for_glog_type(type) { -var icon = 'page_white.png'; -switch (type) { -case 'asset': icon = 'folder_page_white.png'; break; -case 'game': icon = 'controller.png'; break; -case 'member': icon = 'user'; break; -case 'comment': icon = 'comment.png'; break; -case 'level': icon = 'world.png'; break; -case 'sprite': icon = 'cog.png'; break; -case 'tile': icon = 'brick.png'; break; -case 'tileset': icon = 'color_swatch.png'; break; -case 'rev': icon = 'cd.png'; break; -case 'revision': icon = 'cd.png'; break; -case 'font': icon = 'style.png'; break; -case 'key': icon = 'keyboard.png'; break; -case 'audio': icon = 'sound'; break; -case 'payment': icon = 'money.png'; break; -case 'env': icon = 'weather.png'; break; -case 'environment': icon = 'weather.png'; break; -} -return icon; -} -function effect_load_script(url) { -Debug.trace('api', 'Loading script: ' + url); -load_script(url); -} -function effect_api_get_ie(cmd, params, userData) { -if (!session.api_state_ie) session.api_state_ie = {}; -var unique_id = get_unique_id(); -session.api_state_ie[unique_id] = userData; -params.format = 'js'; -params.onafter = 'effect_api_response_ie(' + unique_id + ', response);'; -var url = '/effect/api/' + cmd + composeQueryString(params); -Debug.trace('api', "Sending MSIE HTTP GET: " + url); -load_script(url); -} -function effect_api_response_ie(unique_id, tree) { -Debug.trace('api', "Got response from MSIE HTTP GET"); -var tx = session.api_state_ie[unique_id]; -delete session.api_state_ie[unique_id]; -if (tree.Code == 'session') { -do_logout_2(); -return; -} -if (tree.Code == 'access') { -do_notice("Access Denied", tree.Description, 'do_not_pass_go'); -return; -} -if (tree.Code != 0) { -if (tx._on_error) return fire_callback( tx._on_error, tree, tx ); -return do_error( tree.Description ); -} -if (tree.SessionID) { -if (tree.SessionID == '_DELETE_') { -delete session.cookie.tree.effect_session_id; -} -else { -session.cookie.set( 'effect_session_id', tree.SessionID ); -} -session.cookie.save(); -} -if (tx._api_callback) { -fire_callback( tx._api_callback, tree, tx ); -} -} -function effect_api_get(cmd, params, callback, userData) { -if (!userData) userData = {}; -userData._api_callback = callback; -if (!session.api_mod_cache[cmd] && session.username) session.api_mod_cache[cmd] = hires_time_now(); -if (!params.mod && session.api_mod_cache[cmd]) params.mod = session.api_mod_cache[cmd]; -if (ie) return effect_api_get_ie(cmd, params, userData); -var url = '/effect/api/' + cmd + composeQueryString(params); -Debug.trace('api', "Sending HTTP GET: " + url); -ajax.get( url, 'effect_api_response', userData ); -} -function effect_api_send(cmd, xml, callback, userData) { -if (!userData) userData = {}; -userData._api_callback = callback; -var data = compose_xml('EffectRequest', xml); -Debug.trace('api', "Sending API Command: " + cmd + ": " + data); -ajax.send({ -method: 'POST', -url: '/effect/api/' + cmd, -data: data, -headers: { 'Content-Type': 'text/xml' } -}, 'effect_api_response', userData); -} -function effect_api_response(tx) { -Debug.trace('api', "HTTP " + tx.response.code + ": " + tx.response.data); -if (tx.response.code == 999) { -if (tx.request._auto_retry) { -session.net_error = false; -show_progress_dialog(1, "Trying to reestablish connection..."); -session.net_error = true; -setTimeout( function() { ajax.send(tx.request); }, 1000 ); -return; -} -else return do_error( "HTTP ERROR: " + tx.response.code + ": " + tx.response.data + ' (URL: ' + tx.request.url + ')' ); -} -if (session.net_error) { -hide_progress_dialog(); -session.net_error = false; -} -if (tx.response.code != 200) { -if (tx._silent) return; -else return do_error( "HTTP ERROR: " + tx.response.code + ": " + tx.response.data + ' (URL: ' + tx.request.url + ')' ); -} -var tree = null; -if (!tx._raw) { -var parser = new XML({ -preserveAttributes: true, -text: tx.response.data -}); -if (parser.getLastError()) return do_error("XML PARSE ERROR: " + parser.getLastError()); -tree = parser.getTree(); -if (tree.Code == 'session') { -do_logout_2(); -return; -} -if (tree.Code == 'access') { -do_notice("Access Denied", tree.Description, 'do_not_pass_go'); -return; -} -if (tree.Code != 0) { -if (tx._on_error) return fire_callback( tx._on_error, tree, tx ); -return do_error( tree.Description ); -} -if (tree.SessionID) { -if (tree.SessionID == '_DELETE_') { -delete session.cookie.tree.effect_session_id; -} -else { -session.cookie.set( 'effect_session_id', tree.SessionID ); -} -session.cookie.save(); -} -} -if (tx._api_callback) { -fire_callback( tx._api_callback, tree, tx ); -} -} -function effect_api_mod_touch() { -for (var idx = 0, len = arguments.length; idx < len; idx++) { -session.api_mod_cache[ arguments[idx] ] = hires_time_now(); -} -} -function do_not_pass_go() { -Nav.go('Main'); -} -var Nav = { -loc: '', -old_loc: '', -inited: false, -nodes: [], -init: function() { -if (!this.inited) { -this.inited = true; -this.loc = 'init'; -this.monitor(); -} -}, -monitor: function() { -var parts = window.location.href.split(/\#/); -var anchor = parts[1]; -if (!anchor) anchor = 'Main'; -var full_anchor = '' + anchor; -var sub_anchor = ''; -anchor = anchor.replace(/\%7C/, '|'); -if (anchor.match(/\|(\w+)$/)) { -sub_anchor = RegExp.$1.toLowerCase(); -anchor = anchor.replace(/\|(\w+)$/, ''); -} -if ((anchor != this.loc) && !anchor.match(/^_/)) { -Debug.trace('nav', "Caught navigation anchor: " + full_anchor); -var page_name = ''; -var page_args = null; -if (full_anchor.match(/^\w+\?.+/)) { -parts = full_anchor.split(/\?/); -page_name = parts[0]; -page_args = parseQueryString( parts[1] ); -} -else if (full_anchor.match(/^(\w+)\/(.*)$/)) { -page_name = RegExp.$1; -page_args = RegExp.$2; -} -else { -parts = full_anchor.split(/\//); -page_name = parts[0]; -page_args = parts.slice(1); -} -Debug.trace('nav', "Calling page: " + page_name + ": " + serialize(page_args)); -hide_popup_dialog(); -var result = page_manager.click( page_name, page_args ); -if (result) { -if (window.pageTracker && (this.loc != 'init')) { -setTimeout( function() { pageTracker._trackPageview('/effect/' + anchor); }, 1000 ); -} -this.old_loc = this.loc; -if (this.old_loc == 'init') this.old_loc = 'Main'; -this.loc = anchor; -} -else { -this.go( this.loc ); -} -} -else if (sub_anchor != this.sub_anchor) { -Debug.trace('nav', "Caught sub-anchor: " + sub_anchor); -$P().gosub( sub_anchor ); -} -this.sub_anchor = sub_anchor; -setTimeout( 'Nav.monitor()', 100 ); -}, -go: function(anchor, force) { -anchor = anchor.replace(/^\#/, ''); -if (force) this.loc = 'init'; -window.location.href = '#' + anchor; -}, -prev: function() { -this.go( this.old_loc || 'Main' ); -}, -refresh: function() { -this.loc = 'refresh'; -}, -bar: function() { -var nodes = arguments; -var html = ''; -for (var idx = 0, len = nodes.length; idx < len; idx++) { -var node = nodes[idx]; -if (node) this.nodes[idx] = node; -else node = this.nodes[idx]; -if (node != '_ignore_') { -html += ''; -} -} -html += '
    '; -$('d_nav_bar').innerHTML = html; -}, -title: function(name) { -if (name) document.title = name + ' | EffectGames.com'; -else document.title = 'EffectGames.com'; -}, -currentAnchor: function() { -var parts = window.location.href.split(/\#/); -var anchor = parts[1] || ''; -var sub_anchor = ''; -anchor = anchor.replace(/\%7C/, '|'); -if (anchor.match(/\|(\w+)$/)) { -sub_anchor = RegExp.$1.toLowerCase(); -anchor = anchor.replace(/\|(\w+)$/, ''); -} -return anchor; -} -}; -var Blog = { -edit_caption: '
    *Bold*  |Italic|  {monospace}  [http://link]  Formatting Guide...
    ', -search: function(args) { -if (!args.mode) args.mode = 'and'; -if (!args.offset) args.offset = 0; -if (!args.limit) args.limit = 10; -if (!args.format) args.format = 'xml'; -var query_args = copy_object( args ); -delete query_args.callback; -effect_api_get( 'article_search', query_args, [this, 'search_response'], { _search_args: args } ); -}, -get_article_preview: function(row, args) { -var html = ''; -Debug.trace('blog', 'Row: ' + dumper(row)); -html += '
    '; -var ext_article_url = 'http://' + location.hostname + '/effect/article.psp.html' + row.Path + '/' + row.ArticleID; -var article_url = '#Article' + row.Path + '/' + row.ArticleID; -html += ''; -if (!args.title_only) { -html += '
    '; -html += row.Preview; -html += '  ' + (args.link_title || 'Read Full Story...') + ''; -html += '
    '; -html += ''; -html += '
    '; -var elem_class = args.footer_element_class || 'blog_preview_footer_element'; -if ((session.username == row.Username) || is_admin()) { -html += '
    ' + -icon('page_white_edit.png', "Edit", '#ArticleEdit?path=' + row.Path + '&id=' + row.ArticleID) + '
    '; -} -html += '
    ' + get_user_display(row.Username) + '
    '; -html += '
    ' + icon('calendar', get_short_date_time(row.Published)) + '
    '; -html += '
    ' + icon('talk', row.Comments) + '
    '; -if (0 && row.Tags) html += '
    ' + icon('note.png', make_tag_links(row.Tags, 3)) + '
    '; -html += '
    ' + icon('facebook.png', 'Facebook', "window.open('http://www.facebook.com/sharer.php?u="+encodeURIComponent(ext_article_url)+'&t='+encodeURIComponent(row.Title)+"','sharer','toolbar=0,status=0,width=626,height=436')", "Share on Facebook") + '
    '; -html += '
    ' + icon('twitter.png', 'Twitter', "window.open('http://twitter.com/home?status=Reading%20" + encodeURIComponent(row.Title) + "%3A%20" + encodeURIComponent(ext_article_url)+"')", "Share on Twitter") + '
    '; -html += '
    '; -html += '
    '; -html += '
    '; -} -html += '
    '; -return html; -}, -search_response: function(response, tx) { -var args = tx._search_args; -if (args.callback) return fire_callback(args.callback, response, args); -var div = $(args.target); -assert(div, "Could not find target DIV: " + args.target); -var html = ''; -if (response.Rows && response.Rows.Row) { -var rows = always_array( response.Rows.Row ); -for (var idx = 0, len = rows.length; idx < len; idx++) { -var row = rows[idx]; -html += this.get_article_preview( row, args ); -} -if (args.more && (rows.length == args.limit)) { -html += large_icon_button('page_white_put.png', 'More...', "Blog.more(this, "+encode_object(args)+")") + '
    '; -html += spacer(1,15) + '
    '; -} -if (args.after) html += args.after; -} -else if (response.Code != 0) { -html = 'Search Error: ' . response.Code + ': ' + response.Description; -} -else { -html = args.none_found_msg || 'No articles found.'; -} -div.innerHTML = html; -}, -more: function(div, args) { -args.offset += args.limit; -Debug.trace('blog', "More Args: " + dumper(args)); -div.innerHTML = ''; -effect_api_get( 'article_search', args, [this, 'more_response'], { _search_args: args, _div: div } ); -}, -more_response: function(response, tx) { -var args = tx._search_args; -var button = tx._div; -var html = ''; -if (response.Rows && response.Rows.Row) { -var rows = always_array( response.Rows.Row ); -for (var idx = 0, len = rows.length; idx < len; idx++) { -var row = rows[idx]; -html += this.get_article_preview( row, args ); -} -if (args.more && (rows.length == args.limit)) { -html += large_icon_button('page_white_put.png', 'More...', "Blog.more(this, "+encode_object(args)+")") + '
    '; -html += spacer(1,15) + '
    '; -} -} -else if (response.Code != 0) { -html = 'Search Error: ' . response.Code + ': ' + response.Description; -} -else { -html = args.none_found_msg || 'No more articles found.'; -} -var div = document.createElement('div'); -div.innerHTML = html; -button.parentNode.replaceChild( div, button ); -} -}; -function make_tag_links(csv, max, base_url) { -if (!base_url) base_url = ''; -var tags = csv.split(/\,\s*/); -var append = ''; -if (max && (tags.length > max)) { -tags.length = max; -append = '...'; -} -var html = ''; -for (var idx = 0, len = tags.length; idx < len; idx++) { -html += ''+tags[idx]+''; -if (idx < len - 1) html += ', '; -} -html += append; -return html; -} -function get_url_friendly_title(title) { -title = title.toString().replace(/\W+/g, '_'); -if (title.length > 40) title = title.substring(0, 40); -title = title.replace(/^_+/, ''); -title = title.replace(/_+$/, ''); -return title; -} -function get_full_url(url) { -if (url.match(/^\#/)) { -var parts = window.location.href.split(/\#/); -url = parts[0] + url; -} -return url; -} -var Comments = { -comments_per_page: 10, -get: function(page_id) { -var html = ''; -html += '
    '; -html += '
    Comments'; -html += '
    '; -html += '
    '; -html += '
    '; -setTimeout( function() { Comments.search({ page_id: page_id }); }, 1 ); -return html; -}, -search: function(args) { -if (!args.limit) args.limit = this.comments_per_page; -if (!args.offset) args.offset = 0; -assert(args.page_id, "Comments.search: No page_id specified"); -args.format = 'xml'; -this.last_search = args; -effect_api_get( 'comments_get', args, [this, 'search_response'], { _search_args: args } ); -}, -research: function(offset) { -var args = this.last_search; -if (!args) return; -args.offset = offset; -effect_api_get( 'comments_get', args, [this, 'search_response'], { _search_args: args } ); -}, -search_response: function(response, tx) { -this.comments = []; -var args = tx._search_args; -if (args.callback) return fire_callback(args.callback, response, args); -var html = ''; -html += '
    ' + -large_icon_button( 'comment_edit.png', 'Post Comment...', "Comments.add('"+args.page_id+"')" ) + '
    '; -if (args.page_id.match(/^Article\//)) { -html += '
    ' + icon('feed.png', 'RSS', '/effect/api/comment_feed/' + args.page_id + '.rss', 'Comments RSS Feed') + '
    '; -} -if (response.Items && response.Items.Item && response.List && response.List.length) { -html += ''; -html += '
    '; -var items = this.comments = always_array( response.Items.Item ); -for (var idx = 0, len = items.length; idx < len; idx++) { -var item = items[idx]; -var extra_classes = (args.highlight && (args.highlight == item.ID)) ? ' highlight' : ''; -html += '
    '; -html += '
    '; -if (item.Username) html += ''; -html += '' + item.Name.toString().toUpperCase() + ''; -if (item.Username) html += ''; -html += ', ' + get_short_date_time(item.Date) + '
    '; -html += '
    '; -html += this.get_comment_controls( args.page_id, item ); -html += '
    '; -html += '
    '; -html += '
    ' + item.Comment + '
    '; -html += '
    '; -html += ''; -if (item.LastReply && ((item.LastReply >= time_now() - (86400 * 7)) || (session.username && (session.username == item.Username)))) { -setTimeout( "Comments.show_replies('"+args.page_id+"','"+item.ID+"')", 1 ); -} -} -} -else { -} -$( 'd_comments_' + args.page_id ).innerHTML = html; -}, -get_control: function(icon, code, text, status_text) { -if (!icon.match(/\.\w+$/)) icon += '.gif'; -return '' + code_link(code, text, status_text) + ''; -}, -get_comment_controls: function(page_id, comment) { -var html = ''; -var spacer_txt = '  |  '; -if (session.user) { -html += this.get_control('comment', "Comments.reply('"+page_id+"','"+comment.ID+"')", 'Reply') + spacer_txt; -} -if (comment.Replies) { -if (comment._replies_visible) html += this.get_control('magnify_minus', "Comments.hide_replies('"+page_id+"','"+comment.ID+"')", 'Hide Replies'); -else html += this.get_control('magnify_plus', "Comments.show_replies('"+page_id+"','"+comment.ID+"')", 'Show Replies ('+comment.Replies+')'); -if (session.user) html += spacer_txt; -} -if (session.user) { -html += this.get_control( -'star', -"Comments.like('"+page_id+"','"+comment.ID+"')", -'Like' + (comment.Like ? (' ('+comment.Like+')') : ''), -comment.Like ? (comment.Like + ' ' + ((comment.Like == 1) ? 'person likes this' : 'people like this')) : 'I like this comment' -) + spacer_txt; -if (is_admin()) html += this.get_control('trash', "Comments._delete('"+page_id+"','"+comment.ID+"')", 'Delete') + spacer_txt; -html += this.get_control('warning', "Comments.report('"+page_id+"','"+comment.ID+"')", 'Report Abuse'); -} -return html; -}, -reply: function(page_id, comment_id) { -hide_popup_dialog(); -delete session.progress; -var comment = find_object( this.comments, { ID: comment_id } ); -var html = ''; -html += '
    '; -html += '\n \n \n \n \n \n \n \n \n \n '); - }, this); - __out.push('\n\n
    \n
    '; -html += '
    Reply to Comment by "'+comment.Name+'"
    '; -html += '
    '; -var name = this.get_name(); -html += '

    Posted by: ' + name; -if (!session.user) html += ' → Create Account'; -html += '


    '; -html += ''; -html += Blog.edit_caption; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', 'Post Reply', "Comments.post_reply('"+page_id+"','"+comment_id+"')") + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_comment_body' ); -show_popup_dialog(600, 300, html); -}, -post_reply: function(page_id, comment_id) { -var value = $('fe_comment_body').value; -if (!value) return; -hide_popup_dialog(); -show_progress_dialog(1, "Posting reply..."); -var name = this.get_name(); -effect_api_mod_touch('comment_replies_get'); -effect_api_send('comment_post_reply', { -PageID: page_id, -CommentID: comment_id, -Username: session.username || '', -Name: name, -Comment: value, -PageURL: location.href -}, [this, 'post_reply_finish'], { _page_id: page_id, _comment_id: comment_id } ); -}, -post_reply_finish: function(response, tx) { -hide_popup_dialog(); -var page_id = tx._page_id; -var comment_id = tx._comment_id; -var comment = find_object( this.comments, { ID: comment_id } ); -do_message('success', "Comment reply posted successfully."); -this.show_replies(page_id, comment_id); -if (!comment.Replies) comment.Replies = 1; else comment.Replies++; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -}, -show_replies: function(page_id, comment_id) { -var comment = find_object( this.comments, { ID: comment_id } ); -if (!comment._replies_visible) { -$('d_comment_replies_' + comment_id).show().innerHTML = ''; -} -var args = { page_id: page_id, comment_id: comment_id, offset: 0, limit: 100 }; -effect_api_get( 'comment_replies_get', args, [this, 'receive_replies_response'], { _search_args: args } ); -}, -receive_replies_response: function(response, tx) { -var page_id = tx._search_args.page_id; -var comment_id = tx._search_args.comment_id; -var comment = find_object( this.comments, { ID: comment_id } ); -var html = ''; -var replies = always_array( response.Items.Item ); -for (var idx = 0, len = replies.length; idx < len; idx++) { -var reply = replies[idx]; -html += get_chat_balloon( -(reply.Username == session.username) ? 'blue' : 'grey', -reply.Username, -reply.Comment.replace(/^]*?>(.+)<\/div>$/i, '$1') -); -} -$('d_comment_replies_' + comment_id).innerHTML = html; -if (!comment._replies_visible) { -$('d_comment_replies_' + comment_id).hide(); -animate_div_visibility( 'd_comment_replies_' + comment_id, true ); -} -comment._replies_visible = true; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -}, -hide_replies: function(page_id, comment_id) { -var comment = find_object( this.comments, { ID: comment_id } ); -if (comment._replies_visible) { -animate_div_visibility( 'd_comment_replies_' + comment_id, false ); -comment._replies_visible = false; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -} -}, -like: function(page_id, comment_id) { -effect_api_mod_touch('comments_get'); -effect_api_send('comment_like', { -PageID: page_id, -CommentID: comment_id -}, [this, 'like_finish'], { _page_id: page_id, _comment_id: comment_id, _on_error: [this, 'like_error'] } ); -}, -like_error: function(response, tx) { -if (response.Code == 'comment_already_like') do_message('error', "You already like this comment."); -else do_error( response.Description ); -}, -like_finish: function(resopnse, tx) { -var page_id = tx._page_id; -var comment_id = tx._comment_id; -var comment = find_object( this.comments, { ID: comment_id } ); -do_message('success', "You now like this comment."); -if (!comment.Like) comment.Like = 1; else comment.Like++; -$('d_comment_controls_'+comment_id).innerHTML = this.get_comment_controls( page_id, comment ); -}, -add: function(page_id) { -hide_popup_dialog(); -delete session.progress; -var html = ''; -html += '
    '; -html += '", "" ], - legend: [ 1, "
    ", "
    " ], - thead: [ 1, "
    '; -html += '
    Post New Comment
    '; -html += '
    '; -var name = this.get_name(); -html += '

    Posted by: ' + name; -if (!session.user) html += ' → Create Account'; -html += '


    '; -html += ''; -html += Blog.edit_caption; -html += '
    '; -html += '

    '; -html += ''; -html += ''; -html += ''; -html += '
    ' + large_icon_button('x', 'Cancel', "hide_popup_dialog()") + ' ' + large_icon_button('check', 'Post Comment', "Comments.post('"+page_id+"')") + '
    '; -html += '
    '; -html += ''; -session.hooks.keys[ESC_KEY] = 'hide_popup_dialog'; -safe_focus( 'fe_comment_body' ); -show_popup_dialog(600, 300, html); -}, -report: function(page_id, comment_id) { -if (confirm('Are you sure you want to report this comment to the site administrators as abusive and/or spam?')) { -effect_api_send('comment_report_abuse', { -PageID: page_id, -CommentID: comment_id -}, [this, 'report_finish'], { _page_id: page_id, _comment_id: comment_id } ); -} -}, -report_finish: function(response, tx) { -do_message('success', 'Your abuse report has been received, and will be evaluated by the site administrators.'); -}, -_delete: function(page_id, comment_id) { -if (confirm('Are you sure you want to permanently delete this comment?')) { -effect_api_mod_touch('comments_get'); -effect_api_send('comment_delete', { -PageID: page_id, -CommentID: comment_id -}, [this, 'delete_finish'], { _page_id: page_id, _comment_id: comment_id } ); -} -}, -delete_finish: function(response, tx) { -do_message('success', 'The comment was deleted successfully.'); -var page_id = tx._page_id; -this.search({ page_id: page_id }); -}, -get_name: function() { -var name = '(Anonymous)'; -if (session.user) { -if (get_bool_pref('public_profile')) name = session.user.FullName; -else name = session.username; -} -return name; -}, -post: function(page_id) { -var value = $('fe_comment_body').value; -if (!value) return; -hide_popup_dialog(); -show_progress_dialog(1, "Posting comment..."); -var name = this.get_name(); -effect_api_mod_touch('comments_get'); -effect_api_send('comment_post', { -PageID: page_id, -Username: session.username || '', -Name: name, -Comment: value -}, [this, 'post_finish'], { _page_id: page_id } ); -}, -post_finish: function(response, tx) { -hide_popup_dialog(); -var comment_id = response.CommentID; -var page_id = tx._page_id; -this.search({ page_id: page_id, highlight: comment_id }); -} -}; -Class.create( 'Menu', { -id: '', -menu: null, -__construct: function(id) { -this.id = id; -}, -load: function() { -if (!this.menu) { -this.menu = $(this.id); -assert( !!this.menu, "Could not locate DOM element: " + this.id ); -} -}, -get_value: function() { -this.load(); -return this.menu.options[this.menu.selectedIndex].value; -}, -set_value: function(value, auto_add) { -value = str_value(value); -this.load(); -for (var idx = 0, len = this.menu.options.length; idx < len; idx++) { -if (this.menu.options[idx].value == value) { -this.menu.selectedIndex = idx; -return true; -} -} -if (auto_add) { -this.menu.options[this.menu.options.length] = new Option(value, value); -this.menu.selectedIndex = this.menu.options.length - 1; -return true; -} -return false; -}, -disable: function() { -this.load(); -this.menu.disabled = true; -this.menu.setAttribute( 'disabled', 'disabled' ); -}, -enable: function() { -this.load(); -this.menu.setAttribute( 'disabled', '' ); -this.menu.disabled = false; -}, -populate: function(items, sel_value) { -this.load(); -this.menu.options.length = 0; -for (var idx = 0, len = items.length; idx < len; idx++) { -var item = items[idx]; -var item_name = ''; -var item_value = ''; -if (isa_hash(item)) { -item_name = item.label; -item_value = item.data; -} -else if (isa_array(item)) { -item_name = item[0]; -item_value = item[1]; -} -else { -item_name = item_value = item; -} -this.menu.options[ this.menu.options.length ] = new Option( item_name, item_value ); -if (item_value == sel_value) this.menu.selectedIndex = idx; -} -} -} ); -Class.subclass( Menu, 'MultiMenu', { -__static: { -toggle_type: function(id) { -var menu = $(id); -assert(menu, "Could not find menu in DOM: " + id); -if (menu.disabled) return; -var obj = MenuManager.find(id); -assert(obj, "Could not find menu in MenuManager: " + id); -var div = $( 'd_inner_' + id ); -var ic = $( 'ic_' + id ); -var is_multiple = (ic.src.indexOf('contract') > -1); -obj.multi = !is_multiple; -var multiple_tag = !is_multiple ? -' multiple="multiple" size=5' : ''; -var items = []; -for (var idx = 0; idx < menu.options.length; idx++) { -var option = menu.options[idx]; -array_push( items, { -value: option.value, -text: option.text, -selected: option.selected -}); -} -var html = ''; -html += ''; -div.innerHTML = html; -ic.src = images_uri + '/menu_' + (is_multiple ? 'expand' : 'contract') + '.gif'; -obj.menu = null; -} -}, -attribs: null, -multi: false, -toggle: true, -__construct: function(id, attribs) { -this.id = id; -if (attribs) this.attribs = attribs; -}, -get_html: function(items, selected_csv, attribs) { -if (!items) items = []; -if (!selected_csv) selected_csv = ''; -if (attribs) this.attribs = attribs; -var selected = csv_to_hash(selected_csv); -this.menu = null; -if (num_keys(selected) > 1) this.multi = true; -var html = '
    '; -html += ''; -html += ''; -html += ''; -if (this.toggle) html += ''; -html += '
    ' + spacer(1,1) + '
    '+spacer(1,2)+'
    '; -html += '
    '; -return html; -}, -get_value: function() { -this.load(); -var value = ''; -for (var idx = 0; idx < this.menu.options.length; idx++) { -var option = this.menu.options[idx]; -if (option.selected && option.value.length) { -if (value.length > 0) value += ','; -value += option.value; -} -} -return value; -}, -set_value: function(value, auto_add) { -value = '' + value; -this.load(); -if (!value) { -value = ''; -for (var idx = 0; idx < this.menu.options.length; idx++) { -var option = this.menu.options[idx]; -option.selected = (option.value == value); -} -return; -} -var selected = csv_to_hash(value); -if ((num_keys(selected) > 1) && !this.multi) { -MultiMenu.toggle_type(this.id); -var self = this; -setTimeout( function() { -self.set_value(value, auto_add); -}, 1 ); -return; -} -for (var idx = 0; idx < this.menu.options.length; idx++) { -var option = this.menu.options[idx]; -option.selected = selected[option.value] ? true : false; -} -}, -populate: function(items, value) { -this.load(); -this.menu.options.length = 0; -if (!value) value = ''; -var selected = csv_to_hash(value); -for (var idx = 0, len = items.length; idx < len; idx++) { -var item = items[idx]; -var item_name = ''; -var item_value = ''; -if (isa_hash(item)) { -item_name = item.label; -item_value = item.data; -} -else if (isa_array(item)) { -item_name = item[0]; -item_value = item[1]; -} -else { -item_name = item_value = item; -} -var opt = new Option( item_name, item_value ); -this.menu.options[ this.menu.options.length ] = opt; -opt.selected = selected[item_value] ? true : false; -} -}, -collapse: function() { -if (this.multi) MultiMenu.toggle_type(this.id); -}, -expand: function() { -if (!this.multi) MultiMenu.toggle_type(this.id); -} -} ); -Class.create( 'MenuManager', { -__static: { -menus: {}, -register: function(menu) { -this.menus[ menu.id ] = menu; -return menu; -}, -find: function(id) { -return this.menus[id]; -} -} -} ); -Class.create( 'GrowlManager', { -lifetime: 10, -marginRight: 0, -marginTop: 0, -__construct: function() { -this.growls = []; -}, -growl: function(type, msg) { -if (find_object(this.growls, { type: type, msg: msg })) return; -var div = $(document.createElement('div')); -div.className = 'growl_message ' + type; -div.setOpacity(0.0); -div.innerHTML = '
    ' + msg + '
    ' + spacer(1,5) + '
    '; -$('d_growl_wrapper').insertBefore( div, $('d_growl_top').nextSibling ); -var growl = { id:get_unique_id(), type: type, msg: msg, opacity:0.0, start:hires_time_now(), div:div }; -this.growls.push(growl); -this.handle_resize(); -this.animate(growl); -var self = this; -div.onclick = function() { -delete_object(self.growls, { id: growl.id }); -$('d_growl_wrapper').removeChild( div ); -}; -}, -animate: function(growl) { -if (growl.deleted) return; -var now = hires_time_now(); -var div = growl.div; -if (now - growl.start <= 0.5) { -div.setOpacity( tweenFrame(0.0, 1.0, (now - growl.start) * 2, 'EaseOut', 'Quadratic') ); -} -else if (now - growl.start <= this.lifetime) { -if (!growl._fully_opaque) { -div.setOpacity( 1.0 ); -growl._fully_opaque = true; -} -} -else if (now - growl.start <= this.lifetime + 1.0) { -div.setOpacity( tweenFrame(1.0, 0.0, (now - growl.start) - this.lifetime, 'EaseOut', 'Quadratic') ); -} -else { -delete_object(this.growls, { id: growl.id }); -$('d_growl_wrapper').removeChild( div ); -return; -} -var self = this; -setTimeout( function() { self.animate(growl); }, 33 ); -}, -handle_resize: function() { -var div = $('d_growl_wrapper'); -if (this.growls.length) { -var size = getInnerWindowSize(); -div.style.top = '' + (10 + this.marginTop) + 'px'; -div.style.left = '' + Math.floor((size.width - 310) - this.marginRight) + 'px'; -} -else { -div.style.left = '-2000px'; -} -} -} ); -window.$GR = new GrowlManager(); -if (window.addEventListener) { -window.addEventListener( "resize", function() { -$GR.handle_resize(); -}, false ); -} -else if (window.attachEvent && !ie6) { -window.attachEvent("onresize", function() { -$GR.handle_resize(); -}); -} -Class.create( 'Effect.Page', { -ID: '', -data: null, -active: false, -__construct: function(config) { -if (!config) return; -this.data = {}; -if (!config) config = {}; -for (var key in config) this[key] = config[key]; -this.div = $('page_' + this.ID); -assert(this.div, "Cannot find page div: page_" + this.ID); -}, -onInit: function() { -}, -onActivate: function() { -return true; -}, -onDeactivate: function() { -return true; -}, -show: function() { -this.div.show(); -}, -hide: function() { -this.div.hide(); -}, -gosub: function(anchor) { -} -} ); -Class.require( 'Effect.Page' ); -Class.create( 'Effect.PageManager', { -pages: null, -current_page_id: '', -on_demand: {}, -__construct: function(page_list) { -this.pages = []; -this.page_list = page_list; -for (var idx = 0, len = page_list.length; idx < len; idx++) { -Debug.trace( 'page', "Initializing page: " + page_list[idx].ID ); -if (Effect.Page[ page_list[idx].ID ]) { -var page = new Effect.Page[ page_list[idx].ID ]( page_list[idx] ); -page.onInit(); -this.pages.push(page); -} -else { -Debug.trace( 'page', 'Page ' + page_list[idx].ID + ' will be loaded on-demand' ); -} -} -}, -find: function(id) { -var page = find_object( this.pages, { ID: id } ); -if (!page) Debug.trace('PageManager', "Could not find page: " + id); -return page; -}, -notify_load: function(file, id) { -for (var idx = 0, len = this.page_list.length; idx < len; idx++) { -var page_config = this.page_list[idx]; -if (page_config.File == file) { -Debug.trace( 'page', "Initializing page on-demand: " + page_config.ID ); -var page = new Effect.Page[ page_config.ID ]( page_config ); -page.onInit(); -this.pages.push(page); -} -} -var self = this; -setTimeout( function() { -var result = self.activate(id, self.temp_args); -delete self.temp_args; -$('d_page_loading').hide(); -if (!result) { -$('page_'+id).hide(); -self.current_page_id = ''; -} -}, 1 ); -}, -activate: function(id, args) { -if (!find_object( this.pages, { ID: id } )) { -var page_config = find_object( this.page_list, { ID: id } ); -assert(!!page_config, "Page config not found: " + id ); -Debug.trace('page', "Loading file on-demand: " + page_config.File + " for page: " + id); -var url = '/effect/api/load_page/' + page_config.File + '?onafter=' + escape('page_manager.notify_load(\''+page_config.File+'\',\''+id+'\')'); -if (page_config.Requires) { -var files = page_config.Requires.split(/\,\s*/); -for (var idx = 0, len = files.length; idx < len; idx++) { -var filename = files[idx]; -if (!this.on_demand[filename]) { -Debug.trace('page', "Also loading file: " + filename); -url += '&file=' + filename; -this.on_demand[filename] = 1; -} -} -} -$('d_page_loading').show(); -this.temp_args = args; -load_script( url ); -return true; -} -$('page_'+id).show(); -var page = this.find(id); -page.active = true; -if (!args) args = []; -if (!isa_array(args)) args = [ args ]; -var result = page.onActivate.apply(page, args); -if (typeof(result) == 'boolean') return result; -else return alert("Page " + id + " onActivate did not return a boolean!"); -}, -deactivate: function(id, new_id) { -var page = this.find(id); -var result = page.onDeactivate(new_id); -if (result) { -$('page_'+id).hide(); -page.active = false; -} -return result; -}, -click: function(id, args) { -Debug.trace('page', "Switching pages to: " + id); -var old_id = this.current_page_id; -if (this.current_page_id) { -var result = this.deactivate( this.current_page_id, id ); -if (!result) return false; -} -this.current_page_id = id; -this.old_page_id = old_id; -window.scrollTo( 0, 0 ); -var result = this.activate(id, args); -if (!result) { -$('page_'+id).hide(); -this.current_page_id = ''; -} -return true; -} -} ); -Class.subclass( Effect.Page, "Effect.Page.Main", { -inited: false, -onActivate: function() { -Nav.bar( ['Main', 'EffectGames.com'] ); -Nav.title(''); -$('d_blog_news').innerHTML = loading_image(); -$('d_blog_community').innerHTML = loading_image(); -$('d_blog_featured').innerHTML = loading_image(); -Blog.search({ -stag: 'featured_game', -limit: 4, -full: 1, -callback: [this, 'receive_featured_games'] -}); -effect_api_get( 'get_site_info', { cat: 'pop_pub_games' }, [this, 'receive_pop_pub_games'], { } ); -Blog.search({ -stag: 'front_page', -limit: 5, -target: 'd_blog_news', -more: 1 -}); -Blog.search({ -path: '/community', -limit: 5, -target: 'd_blog_community', -more: 1 -}); -if (!this.inited) { -this.inited = true; -config.Strings.MainSlideshow.Slide = always_array( config.Strings.MainSlideshow.Slide ); -this.slide_idx = 0; -this.num_slides = config.Strings.MainSlideshow.Slide.length; -this.slide_div_num = 0; -this.slide_dir = 1; -this.bk_pos = -340; -this.bk_pos_target = -340; -this.slide_images = []; -for (var idx = 0, len = this.num_slides; idx < len; idx++) { -var url = images_uri + '/' + config.Strings.MainSlideshow.Slide[idx].Photo; -this.slide_images[idx] = new Image(); -this.slide_images[idx].src = png(url, true); -} -} -this.height_target = 470; -this.height_start = $('d_header').offsetHeight; -this.time_start = hires_time_now(); -this.duration = 0.75; -if (!this.timer) this.timer = setTimeout( '$P("Main").animate_mhs()', 33 ); -if (session.user) $('d_blurb_main').hide(); -else { -$('d_blurb_main').innerHTML = get_string('/Main/Blurb'); -$('d_blurb_main').show(); -} -return true; -}, -receive_pop_pub_games: function(response, tx) { -var html = ''; -if (response.Data && response.Data.Games && response.Data.Games.Game) { -var games = always_array( response.Data.Games.Game ); -for (var idx = 0, len = Math.min(games.length, 16); idx < len; idx++) { -var game = games[idx]; -html += '
    ' + -(game.Logo ? -user_image_thumbnail(game.Logo, 80, 60) : -'' -) + '
    ' + ww_fit_box(game.Title, 80, 2, session.em_width, 1) + '
    '; -} -html += '
    '; -} -else { -html += 'No active public games found! Why not create a new one?'; -} -$('d_main_pop_pub_games').innerHTML = html; -}, -receive_featured_games: function(response, tx) { -var html = ''; -if (response.Rows && response.Rows.Row) { -html += ''; -var rows = always_array( response.Rows.Row ); -for (var idx = 0, len = rows.length; idx < len; idx++) { -var row = rows[idx]; -var image_url = row.Params.featured_image; -if (image_url && image_url.match(/^(\w+)\/(\w+\.\w+)$/)) { -image_url = '/effect/api/view/users/' + RegExp.$1 + '/images/' + RegExp.$2; -} -if (idx % 2 == 0) html += ''; -html += ''; -if (idx % 2 == 1) html += ''; -} -if (rows.length % 2 == 1) { -html += ''; -html += ''; -} -html += '
    '; -html += ''; -html += ''; -html += ''; -html += ''; -html += ''; -html += '
    '; -html += ''; -html += '' + spacer(10,1) + ''; -html += ''; -html += ''; -html += '' + spacer(15,1) + '
    '; -html += spacer(1,20); -html += '
    '; -} -$('d_blog_featured').innerHTML = html; -}, -animate_mhs: function() { -var now = hires_time_now(); -if (now - this.time_start >= this.duration) { -$('d_header').style.height = '' + this.height_target + 'px'; -$('d_shadow').style.height = '' + this.height_target + 'px'; -delete this.timer; -} -else { -var height = tweenFrame(this.height_start, this.height_target, (now - this.time_start) / this.duration, 'EaseOut', 'Circular'); -$('d_header').style.height = '' + height + 'px'; -$('d_shadow').style.height = '' + height + 'px'; -this.timer = setTimeout( '$P("Main").animate_mhs()', 33 ); -} -}, -onDeactivate: function() { -$('d_blog_news').innerHTML = ''; -$('d_blog_community').innerHTML = ''; -this.height_target = 75; -this.height_start = $('d_header').offsetHeight; -this.time_start = hires_time_now(); -if (!this.timer) this.timer = setTimeout( '$P("Main").animate_mhs()', 33 ); -return true; -}, -draw_slide: function() { -if (this.slide_timer) return; -var slide = config.Strings.MainSlideshow.Slide[ this.slide_idx ]; -this.old_photo = $('d_header_slideshow_photo_' + this.slide_div_num); -this.old_text = $('d_header_slideshow_text_' + this.slide_div_num); -this.slide_div_num = 1 - this.slide_div_num; -this.new_photo = $('d_header_slideshow_photo_' + this.slide_div_num); -this.new_text = $('d_header_slideshow_text_' + this.slide_div_num); -this.new_photo.style.backgroundImage = 'url('+png(images_uri+'/'+slide.Photo, true)+')'; -this.new_photo.setOpacity(0.0); -var html = ''; -html += slide.Text; -this.slide_width = this.new_text.offsetWidth; -this.new_text.innerHTML = html; -if (this.slide_dir == 1) this.new_text.style.left = '' + this.slide_width + 'px'; -else this.new_text.style.left = '-' + this.slide_width + 'px'; -this.slide_time_start = hires_time_now(); -this.slide_timer = setTimeout( '$P("Main").animate_mhs_slide()', 33 ); -}, -animate_mhs_slide: function() { -var now = hires_time_now(); -if (now - this.slide_time_start >= this.duration) { -this.new_text.style.left = '0px'; -this.old_text.style.left = '-' + this.slide_width + 'px'; -this.new_photo.setOpacity( 1.0 ); -this.old_photo.setOpacity( 0.0 ); -delete this.slide_timer; -this.bk_pos = this.bk_pos_target; -} -else { -var value = tweenFrame(0.0, 1.0, (now - this.slide_time_start) / this.duration, 'EaseOut', 'Circular'); -if (this.slide_dir == 1) { -this.new_text.style.left = '' + Math.floor( this.slide_width - (this.slide_width * value) ) + 'px'; -this.old_text.style.left = '-' + Math.floor( this.slide_width * value ) + 'px'; -} -else { -this.new_text.style.left = '-' + Math.floor( this.slide_width - (this.slide_width * value) ) + 'px'; -this.old_text.style.left = '' + Math.floor( this.slide_width * value ) + 'px'; -} -this.new_photo.setOpacity( value ); -this.old_photo.setOpacity( 1.0 - value ); -var bkp = Math.floor( this.bk_pos + ((this.bk_pos_target - this.bk_pos) * value) ); -$('d_header').style.backgroundPosition = '' + bkp + 'px 0px'; -this.slide_timer = setTimeout( '$P("Main").animate_mhs_slide()', 33 ); -} -}, -prev_slide: function() { -this.bk_pos_target += 200; -this.slide_idx--; -if (this.slide_idx < 0) this.slide_idx += this.num_slides; -this.slide_dir = -1; -this.draw_slide(); -}, -next_slide: function() { -this.bk_pos_target -= 200; -this.slide_idx++; -if (this.slide_idx >= this.num_slides) this.slide_idx -= this.num_slides; -this.slide_dir = 1; -this.draw_slide(); -} -} ); -Class.subclass( Effect.Page, "Effect.Page.PublicGameList", { -onActivate: function() { -Nav.bar( -['Main', 'EffectGames.com'], -['PublicGameList', "All Public Games"] -); -Nav.title( "List of All Public Game Projects" ); -effect_api_get( 'get_site_info', { cat: 'all_pub_games' }, [this, 'receive_all_pub_games'], { } ); -this.div.innerHTML = loading_image(); -return true; -}, -onDeactivate: function() { -this.div.innerHTML = ''; -return true; -}, -receive_all_pub_games: function(response, tx) { -var html = ''; -html += '

    List of All Public Game Projects

    '; -html += '
    This is the complete list of public games currently being built by our users, presented in alphabetical order. Maybe they could use some help! Check out the game project pages and see (requires user account).
    '; -if (response.Data && response.Data.Games && response.Data.Games.Game) { -var games = always_array( response.Data.Games.Game ); -for (var idx = 0, len = games.length; idx < len; idx++) { -var game = games[idx]; -html += '
    ' + -(game.Logo ? -user_image_thumbnail(game.Logo, 80, 60) : -'' -) + '
    ' + ww_fit_box(game.Title, 80, 2, session.em_width, 1) + '
    '; -} -html += '
    '; -} -else { -html += 'No public games found! Why not create a new one?'; -} -this.div.innerHTML = html; -} -} ); -Class.subclass( Effect.Page, "Effect.Page.Search", { -onActivate: function(args) { -if (!args) args = {}; -var search_text = args.q; -var start = args.s || 0; -if (!start) start = 0; -var title = 'Search results for "'+search_text+'"'; -Nav.bar( -['Main', 'EffectGames.com'], -['Search?q=' + escape(search_text), "Search Results"] -); -Nav.title( title ); -this.last_search_text = search_text; -$('d_article_search').innerHTML = loading_image(); -load_script( 'http://www.google.com/uds/GwebSearch?callback=receive_google_search_results&context=0&lstkp=0&rsz=large&hl=en&source=gsc&gss=.com&sig=&q='+escape(search_text)+'%20site%3Ahttp%3A%2F%2Fwww.effectgames.com%2F&key=notsupplied&v=1.0&start='+start+'&nocache=' + (new Date()).getTime() ); -$('h_article_search').innerHTML = title; -return true; -}, -onDeactivate: function(new_page) { -$('fe_search_bar').value = ''; -$('d_article_search').innerHTML = ''; -return true; -} -} ); -function do_search_bar() { -var search_text = $('fe_search_bar').value; -if (search_text.length) { -Nav.go('Search?q=' + escape(search_text)); -} -} -function receive_google_search_results(context, response) { -var html = ''; -html += '
    Powered by
    '; -if (response.results.length) { -for (var idx = 0, len = response.results.length; idx < len; idx++) { -var row = response.results[idx]; -var url = row.unescapedUrl.replace(/^.+article\.psp\.html/, '#Article'); -html += '
    '; -html += ''; -html += '
    ' + row.content + '
    '; -html += '
    '; -} -} -else { -html += 'No results found.'; -} -if (response.cursor.pages) { -html += '
    Page: '; -for (var idx = 0, len = response.cursor.pages.length; idx < len; idx++) { -html += ''; -var page = response.cursor.pages[idx]; -var url = '#Search?q=' + escape($P('Search').last_search_text) + '&s=' + page.start; -if (response.cursor.currentPageIndex != idx) html += ''; -else html += ''; -html += page.label; -if (response.cursor.currentPageIndex != idx) html += ''; -else html += ''; -html += ''; -} -html += '
    '; -} -$('d_article_search').innerHTML = html; -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/index.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/index.js deleted file mode 100644 index 8b164a42..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/index.js +++ /dev/null @@ -1 +0,0 @@ -exports.ZeParser = require('./ZeParser').ZeParser; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json deleted file mode 100644 index 90320447..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/package.json +++ /dev/null @@ -1,27 +0,0 @@ -{ - "author": { - "name": "Peter van der Zee", - "url": "http://qfox.nl/" - }, - "name": "zeparser", - "description": "My JavaScript parser", - "version": "0.0.5", - "homepage": "https://github.com/qfox/ZeParser/", - "repository": { - "type": "git", - "url": "git://github.com/qfox/ZeParser.git" - }, - "main": "./index", - "engines": { - "node": "*" - }, - "dependencies": {}, - "devDependencies": {}, - "readme": "This is a JavaScript parser.\nhttp://github.com/qfox/ZeParser\n(c) Peter van der Zee\nhttp://qfox.nl\n\n\nBenchmark\nhttp://qfox.github.com/ZeParser/benchmark.html\n\nThe Tokenizer is used by the parser. The parser tells the tokenizer whether the next token may be a regular expression or not. Without the parser, the tokenizer will fail if regular expression literals are used in the input.\n\nUsage:\nZeParser.parse(input);\n\nReturns a \"parse tree\" which is a tree of an array of arrays with tokens (regular objects) as leafs. Meta information embedded as properties (of the arrays and the tokens).\n\nZeParser.createParser(input);\n\nReturns a new ZeParser instance which has already parsed the input. Amongst others, the ZeParser instance will have the properties .tree, .wtree and .btree.\n\n.tree is the parse tree mentioned above.\n.wtree (\"white\" tree) is a regular array with all the tokens encountered (including whitespace, line terminators and comments)\n.btree (\"black\" tree) is just like .wtree but without the whitespace, line terminators and comments. This is what the specification would call the \"token stream\".\n\nI'm aware that the naming convention is a bit awkward. It's a tradeoff between short and descriptive. The streams are used quite often in the analysis.\n\nTokens are regular objects with several properties. Amongst them are .tokposw and .tokposw, they correspond with their own position in the .wtree and .btree.\n\nThe parser has two modes for parsing: simple and extended. Simple mode is mainly for just parsing and returning the streams and a simple parse tree. There's not so much meta information here and this mode is mainly built for speed. The other mode has everything required for Zeon to do its job. This mode is toggled by the instance property .ast, which is true by default :)\n\nNon-factory example:\n\nvar input = \"foo\";\nvar tree = []; // this should probably be refactored away some day\nvar tokenizer = new Tokenizer(input); // dito\nvar parser = new ZeParser(input, tokenizer, tree);\nparser.parse(); // returns tree..., should never throw errors\n", - "readmeFilename": "README", - "bugs": { - "url": "https://github.com/qfox/ZeParser/issues" - }, - "_id": "zeparser@0.0.5", - "_from": "zeparser@0.0.5" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-parser.html b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-parser.html deleted file mode 100755 index 1ff5ff43..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-parser.html +++ /dev/null @@ -1,26 +0,0 @@ - - - - Parser Test Suite Page - - - - (c) qfox.nl
    - Parser test suite
    -
    Running...
    - - - - - - - \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-tokenizer.html b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-tokenizer.html deleted file mode 100755 index 0e0d1b1a..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/test-tokenizer.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - Tokenizer Test Suite Page - - - - (c) qfox.nl
    - - - - - - \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/tests.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/tests.js deleted file mode 100644 index 8a4138be..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/node_modules/zeparser/tests.js +++ /dev/null @@ -1,478 +0,0 @@ -// tests for both the tokenizer and parser. Parser test results could be checked tighter. -// api: [input, token-output-count, ?regex-hints, desc] -// regex-hints are for tokenizer, will tell for each token whether it might parse regex or not (parser's job) -var Tests = [ - -["var abc;", 4, "Variable Declaration"], -["var abc = 5;", 8, "Variable Declaration, Assignment"], -["/* */", 1, "Block Comment"], -["/** **/", 1, "JSDoc-style Comment"], -["var f = function(){;};", 13, "Assignment, Function Expression"], -["hi; // moo", 4, "Trailing Line Comment"], -["hi; // moo\n;", 6, "Trailing Line Comment, Linefeed, `;`"], -["var varwithfunction;", 4, "Variable Declaration, Identifier Containing Reserved Words, `;`"], -["a + b;", 6, "Addition/Concatenation"], - -["'a'", 1, "Single-Quoted String"], -["'a';", 2, "Single-Quoted String, `;`"], // Taken from the parser test suite. - -["'a\\n'", 1, "Single-Quoted String With Escaped Linefeed"], -["'a\\n';", 2, "Single-Quoted String With Escaped Linefeed, `;`"], // Taken from the parser test suite. - -["\"a\"", 1, "Double-Quoted String"], -["\"a\";", 2, "Double-Quoted String, `;`"], // Taken from the parser test suite. - -["\"a\\n\"", 1, "Double-Quoted String With Escaped Linefeed"], -["\"a\\n\";", 2, "Double-Quoted String With Escaped Linefeed, `;`"], // Taken from the parser test suite. - -["500", 1, "Integer"], -["500;", 2, "Integer, `;`"], // Taken from the parser test suite. - -["500.", 1, "Double With Trailing Decimal Point"], -["500.;", 2, "Double With Trailing Decimal Point"], // Taken from the parser test suite. - -["500.432", 1, "Double With Decimal Component"], -["500.432;", 2, "Double With Decimal Component, `;`"], // Taken from the parser test suite. - -[".432432", 1, "Number, 0 < Double < 1"], -[".432432;", 2, "Number, 0 < Double < 1, `;`"], // Taken from the parser test suite. - -["(a,b,c)", 7, "Parentheses, Comma-separated identifiers"], -["(a,b,c);", 8, "Parentheses, Comma-separated identifiers, `;`"], // Taken from the parser test suite. - -["[1,2,abc]", 7, "Array literal"], -["[1,2,abc];", 8, "Array literal, `;`"], // Taken from the parser test suite. - -["{a:1,\"b\":2,c:c}", 13, "Object literal"], -["var o = {a:1,\"b\":2,c:c};", 20, "Assignment, Object Literal, `;`"], // Taken from the parser test suite. - -["var x;\nvar y;", 9, "2 Variable Declarations, Multiple lines"], -["var x;\nfunction n(){ }", 13, "Variable, Linefeed, Function Declaration"], -["var x;\nfunction n(abc){ }", 14, "Variable, Linefeed, Function Declaration With One Argument"], -["var x;\nfunction n(abc, def){ }", 17, "Variable, Linefeed, Function Declaration With Multiple Arguments"], -["function n(){ \"hello\"; }", 11, "Function Declaration, Body"], - -["/a/;", 2, [true, false], "RegExp Literal, `;`"], -["/a/b;", 2, [true, true], "RegExp Literal, Flags, `;`"], -["++x;", 3, "Unary Increment, Prefix, `;`"], -[" / /;", 3, [true, true, false], "RegExp, Leading Whitespace, `;`"], -["/ / / / /", 5, [true, false, false, false, true], "RegExp Containing One Space, Space, Division, Space, RegExp Containing One Space"], - -// Taken from the parser test suite. - -["\"var\";", 2, "Keyword String, `;`"], -["\"variable\";", 2, "String Beginning With Keyword, `;`"], -["\"somevariable\";", 2, "String Containing Keyword, `;`"], -["\"somevar\";", 2, "String Ending With Keyword, `;`"], - -["var varwithfunction;", 4, "Keywords should not be matched in identifiers"], - -["var o = {a:1};", 12, "Object Literal With Unquoted Property"], -["var o = {\"b\":2};", 12, "Object Literal With Quoted Property"], -["var o = {c:c};", 12, "Object Literal With Equivalent Property Name and Identifier"], - -["/a/ / /b/;", 6, [true, true, false, false, true, false], "RegExp, Division, RegExp, `;`"], -["a/b/c;", 6, "Triple Division (Identifier / Identifier / Identifier)"], - -["+function(){/regex/;};", 9, [false, false, false, false, false, true, false, false, false], "Unary `+` Operator, Function Expression Containing RegExp and Semicolon, `;`"], - -// Line Terminators. -["\r\n", 1, "CRLF Line Ending = 1 Linefeed"], -["\r", 1, "CR Line Ending = 1 Linefeed"], -["\n", 1, "LF Line Ending = 1 Linefeed"], -["\r\n\n\u2028\u2029\r", 5, "Various Line Terminators"], - -// Whitespace. -["a \t\u000b\u000c\u00a0\uFFFFb", 8, "Whitespace"], - -// Comments. -["//foo!@#^&$1234\nbar;", 4, "Line Comment, Linefeed, Identifier, `;`"], -["/* abcd!@#@$* { } && null*/;", 2, "Single-Line Block Comment, `;`"], -["/*foo\nbar*/;", 2, "Multi-Line Block Comment, `;`"], -["/*x*x*/;", 2, "Block Comment With Asterisks, `;`"], -["/**/;", 2, "Empty Comment, `;`"], - -// Identifiers. -["x;", 2, "Single-Character Identifier, `;`"], -["_x;", 2, "Identifier With Leading `_`, `;`"], -["xyz;", 2, "Identifier With Letters Only, `;`"], -["$x;", 2, "Identifier With Leading `$`, `;`"], -["x5;", 2, "Identifier With Number As Second Character, `;`"], -["x_y;", 2, "Identifier Containing `_`, `;`"], -["x+5;", 4, "Identifier, Binary `+` Operator, Identifier, `;`"], -["xyz123;", 2, "Alphanumeric Identifier, `;`"], -["x1y1z1;", 2, "Alternating Alphanumeric Identifier, `;`"], -["foo\\u00d8bar;", 2, "Identifier With Unicode Escape Sequence (`\\uXXXX`), `;`"], -["f\u00d8\u00d8bar;", 2, "Identifier With Embedded Unicode Character"], - -// Numbers. -["5;", 2, "Integer, `;`"], -["5.5;", 2, "Double, `;`"], -["0;", 2, "Integer Zero, `;`"], -["0.0;", 2, "Double Zero, `;`"], -["0.001;", 2, "0 < Decimalized Double < 1, `;`"], -["1.e2;", 2, "Integer With Decimal and Exponential Component (`e`), `;`"], -["1.e-2;", 2, "Integer With Decimal and Negative Exponential Component, `;`"], -["1.E2;", 2, "Integer With Decimal and Uppercase Exponential Component (`E`), `;`"], -["1.E-2;", 2, "Integer With Decimal and Uppercase Negative Exponential Component, `;`"], -[".5;", 2, "0 < Double < 1, `;`"], -[".5e3;", 2, "(0 < Double < 1) With Exponential Component"], -[".5e-3;", 2, "(0 < Double < 1) With Negative Exponential Component"], -["0.5e3;", 2, "(0 < Decimalized Double < 1) With Exponential Component"], -["55;", 2, "Two-Digit Integer, `;`"], -["123;", 2, "Three-Digit Integer, `;`"], -["55.55;", 2, "Two-Digit Double, `;`"], -["55.55e10;", 2, "Two-Digit Double With Exponential Component, `;`"], -["123.456;", 2, "Three-Digit Double, `;`"], -["1+e;", 4, "Additive Expression, `;`"], -["0x01;", 2, "Hexadecimal `1` With 1 Leading Zero, `;`"], -["0xcafe;", 2, "Hexadecimal `51966`, `;`"], -["0x12345678;", 2, "Hexadecimal `305419896`, `;`"], -["0x1234ABCD;", 2, "Hexadecimal `305441741` With Uppercase Letters, `;`"], -["0x0001;", 2, "Hexadecimal `1` with 3 Leading Zeros, `;`"], - -// Strings. -["\"foo\";", 2, "Multi-Character Double-Quoted String, `;`"], -["\"a\\n\";", 2, "Double-Quoted String Containing Linefeed, `;`"], -["\'foo\';", 2, "Single-Quoted String, `;`"], -["'a\\n';", 2, "Single-Quoted String Containing Linefeed, `;`"], -["\"x\";", 2, "Single-Character Double-Quoted String, `;`"], -["'';", 2, "Empty Single-Quoted String, `;`"], -["\"foo\\tbar\";", 2, "Double-Quoted String With Tab Character, `;`"], -["\"!@#$%^&*()_+{}[]\";", 2, "Double-Quoted String Containing Punctuators, `;`"], -["\"/*test*/\";", 2, "Double-Quoted String Containing Block Comment, `;`"], -["\"//test\";", 2, "Double-Quoted String Containing Line Comment, `;`"], -["\"\\\\\";", 2, "Double-Quoted String Containing Reverse Solidus, `;`"], -["\"\\u0001\";", 2, "Double-Quoted String Containing Numeric Unicode Escape Sequence, `;`"], -["\"\\uFEFF\";", 2, "Double-Quoted String Containing Alphanumeric Unicode Escape Sequence, `;`"], -["\"\\u10002\";", 2, "Double-Quoted String Containing 5-Digit Unicode Escape Sequence, `;`"], -["\"\\x55\";", 2, "Double-Quoted String Containing Hex Escape Sequence, `;`"], -["\"\\x55a\";", 2, "Double-Quoted String Containing Hex Escape Sequence and Additional Character, `;`"], -["\"a\\\\nb\";", 2, "Double-Quoted String Containing Escaped Linefeed, `;`"], -["\";\"", 1, "Double-Quoted String Containing `;`"], -["\"a\\\nb\";", 2, "Double-Quoted String Containing Reverse Solidus and Linefeed, `;`"], -["'\\\\'+ ''", 4, "Single-Quoted String Containing Reverse Solidus, `+`, Empty Single-Quoted String"], - -// `null`, `true`, and `false`. -["null;", 2, "`null`, `;`"], -["true;", 2, "`true`, `;`"], -["false;", 2, "`false`, `;`"], - -// RegExps -["/a/;", 2, [true, true], "Single-Character RegExp, `;`"], -["/abc/;", 2, [true, true], "Multi-Character RegExp, `;`"], -["/abc[a-z]*def/g;", 2, [true, true], "RegExp Containing Character Range and Quantifier, `;`"], -["/\\b/;", 2, [true, true], "RegExp Containing Control Character, `;`"], -["/[a-zA-Z]/;", 2, [true, true], "RegExp Containing Extended Character Range, `;`"], -["/foo(.*)/g;", 2, [true, false], "RegExp Containing Capturing Group and Quantifier, `;`"], - -// Array Literals. -["[];", 3, "Empty Array, `;`"], -["[\b\n\f\r\t\x20];", 9, "Array Containing Whitespace, `;`"], -["[1];", 4, "Array Containing 1 Element, `;`"], -["[1,2];", 6, "Array Containing 2 Elements, `;`"], -["[1,2,,];", 8, "Array Containing 2 Elisions, `;`"], -["[1,2,3];", 8, "Array Containing 3 Elements, `;`"], -["[1,2,3,,,];", 11, "Array Containing 3 Elisions, `;`"], - -// Object Literals. -["({x:5});", 8, "Object Literal Containing 1 Member; `;`"], -["({x:5,y:6});", 12, "Object Literal Containing 2 Members, `;`"], -["({x:5,});", 9, "Object Literal Containing 1 Member and Trailing Comma, `;`"], -["({if:5});", 8, "Object Literal Containing Reserved Word Property Name, `;`"], -["({ get x() {42;} });", 17, "Object Literal Containing Getter, `;`"], -["({ set y(a) {1;} });", 18, "Object Literal Containing Setter, `;`"], - -// Member Expressions. -["o.m;", 4, "Dot Member Accessor, `;`"], -["o['m'];", 5, "Square Bracket Member Accessor, `;`"], -["o['n']['m'];", 8, "Nested Square Bracket Member Accessor, `;`"], -["o.n.m;", 6, "Nested Dot Member Accessor, `;`"], -["o.if;", 4, "Dot Reserved Property Name Accessor, `;`"], - -// Function Calls. -["f();", 4, "Function Call Operator, `;`"], -["f(x);", 5, "Function Call Operator With 1 Argument, `;`"], -["f(x,y);", 7, "Function Call Operator With Multiple Arguments, `;`"], -["o.m();", 6, "Dot Member Accessor, Function Call, `;`"], -["o['m']();", 7, "Square Bracket Member Accessor, Function Call, `;`"], -["o.m(x);", 7, "Dot Member Accessor, Function Call With 1 Argument, `;`"], -["o['m'](x);", 8, "Square Bracket Member Accessor, Function Call With 1 Argument, `;`"], -["o.m(x,y);", 9, "Dot Member Accessor, Function Call With 2 Arguments, `;`"], -["o['m'](x,y);", 10, "Square Bracket Member Accessor, Function Call With 2 Arguments, `;`"], -["f(x)(y);", 8, "Nested Function Call With 1 Argument Each, `;`"], -["f().x;", 6, "Function Call, Dot Member Accessor, `;`"], - -// `eval` Function. -["eval('x');", 5, "`eval` Invocation With 1 Argument, `;`"], -["(eval)('x');", 7, "Direct `eval` Call Example, `;`"], -["(1,eval)('x');", 9, "Indirect `eval` Call Example, `;`"], -["eval(x,y);", 7, "`eval` Invocation With 2 Arguments, `;`"], - -// `new` Operator. -["new f();", 6, "`new` Operator, Function Call, `;`"], -["new o;", 4, "`new` Operator, Identifier, `;`"], -["new o.m;", 6, "`new` Operator, Dot Member Accessor, `;`"], -["new o.m(x);", 9, "`new` Operator, Dot Member Accessor, Function Call With 1 Argument, `;`"], -["new o.m(x,y);", 11, "``new` Operator, Dot Member Accessor, Function Call With 2 Arguments , `;`"], - -// Prefix and Postfix Increment. -["++x;", 3, "Prefix Increment, Identifier, `;`"], -["x++;", 3, "Identifier, Postfix Increment, `;`"], -["--x;", 3, "Prefix Decrement, Identifier, `;`"], -["x--;", 3, "Postfix Decrement, Identifier, `;`"], -["x ++;", 4, "Identifier, Space, Postfix Increment, `;`"], -["x /* comment */ ++;", 6, "Identifier, Block Comment, Postfix Increment, `;`"], -["++ /* comment */ x;", 6, "Prefix Increment, Block Comment, Identifier, `;`"], - -// Unary Operators. -["delete x;", 4, "`delete` Operator, Space, Identifier, `;`"], -["void x;", 4, "`void` Operator, Space, Identifier, `;`"], -["typeof x;", 4, "`typeof` Operator, Space, Identifier, `;`"], -["+x;", 3, "Unary `+` Operator, Identifier, `;`"], -["-x;", 3, "Unary Negation Operator, Identifier, `;`"], -["~x;", 3, "Bitwise NOT Operator, Identifier, `;`"], -["!x;", 3, "Logical NOT Operator, Identifier, `;`"], - -// Comma Operator. -["x, y;", 5, "Comma Operator"], - -// Miscellaneous. -["new Date++;", 5, "`new` Operator, Identifier, Postfix Increment, `;`"], -["+x++;", 4, "Unary `+`, Identifier, Postfix Increment, `;`"], - -// Expressions. -["1 * 2;", 6, "Integer, Multiplication, Integer, `;`"], -["1 / 2;", 6, "Integer, Division, Integer, `;`"], -["1 % 2;", 6, "Integer, Modulus, Integer, `;`"], -["1 + 2;", 6, "Integer, Addition, Integer, `;`"], -["1 - 2;", 6, "Integer, Subtraction, Integer, `;`"], -["1 << 2;", 6, "Integer, Bitwise Left Shift, Integer, `;`"], -["1 >>> 2;", 6, "Integer, Bitwise Zero-fill Right Shift, Integer, `;`"], -["1 >> 2;", 6, "Integer, Bitwise Sign-Propagating Right Shift, Integer, `;`"], -["1 * 2 + 3;", 10, "Order-of-Operations Expression, `;`"], -["(1+2)*3;", 8, "Parenthesized Additive Expression, Multiplication, `;`"], -["1*(2+3);", 8, "Multiplication, Parenthesized Additive Expression, `;`"], -["xy;", 4, "Greater-Than Relational Operator, `;`"], -["x<=y;", 4, "Less-Than-or-Equal-To Relational Operator, `;`"], -["x>=y;", 4, "Greater-Than-or-Equal-To Relational Operator, `;`"], -["x instanceof y;", 6, "`instanceof` Operator, `;`"], -["x in y;", 6, "`in` Operator, `;`"], -["x&y;", 4, "Bitwise AND Operator, `;`"], -["x^y;", 4, "Bitwise XOR Operator, `;`"], -["x|y;", 4, "Bitwise OR Operator, `;`"], -["x+y>>= y;", 6, "Bitwise Zero-Fill Right Shift Assignment, `;`"], -["x <<= y;", 6, "Bitwise Left Shift Assignment, `;`"], -["x += y;", 6, "Additive Assignment, `;`"], -["x -= y;", 6, "Subtractive Assignment, `;`"], -["x *= y;", 6, "Multiplicative Assignment, `;`"], -["x /= y;", 6, "Divisive Assignment, `;`"], -["x %= y;", 6, "Modulus Assignment, `;`"], -["x >>= y;", 6, "Bitwise Sign-Propagating Right Shift Assignment, `;`"], -["x &= y;", 6, "Bitwise AND Assignment, `;`"], -["x ^= y;", 6, "Bitwise XOR Assignment, `;`"], -["x |= y;", 6, "Bitwise OR Assignment, `;`"], - -// Blocks. -["{};", 3, "Empty Block, `;`"], -["{x;};", 5, "Block Containing 1 Identifier, `;`"], -["{x;y;};", 7, "Block Containing 2 Identifiers, `;`"], - -// Variable Declarations. -["var abc;", 4, "Variable Declaration"], -["var x,y;", 6, "Comma-Separated Variable Declarations, `;`"], -["var x=1,y=2;", 10, "Comma-Separated Variable Initializations, `;`"], -["var x,y=2;", 8, "Variable Declaration, Variable Initialization, `;`"], - -// Empty Statements. -[";", 1, "Empty Statement"], -["\n;", 2, "Linefeed, `;`"], - -// Expression Statements. -["x;", 2, "Identifier, `;`"], -["5;", 2, "Integer, `;`"], -["1+2;", 4, "Additive Statement, `;`"], - -// `if...else` Statements. -["if (c) x; else y;", 13, "Space-Delimited `if...else` Statement"], -["if (c) x;", 8, "Space-Delimited `if` Statement, `;`"], -["if (c) {} else {};", 14, "Empty Block-Delimited `if...else` Statement"], -["if (c1) if (c2) s1; else s2;", 19, "Nested `if...else` Statement Without Dangling `else`"], - -// `while` and `do...while` Loops. -["do s; while (e);", 11, "Space-Delimited `do...while` Loop"], -["do { s; } while (e);", 15, "Block-Delimited `do...while` Loop"], -["while (e) s;", 8, "Space-Delimited `while` Loop"], -["while (e) { s; };", 13, "Block-Delimited `while` Loop"], - -// `for` and `for...in` Loops. -["for (;;) ;", 8, "Infinite Space-Delimited `for` Loop"], -["for (;c;x++) x;", 12, "`for` Loop: Empty Initialization Condition; Space-Delimited Body"], -["for (i;i foo(new window[(['Active'].concat('Object').join('X'))])\n```\n\n## License\n\nLicensed under the MIT license.\n\n[socket.io]: http://socket.io/\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/felixge/node-active-x-obfuscator/issues" - }, - "_id": "active-x-obfuscator@0.0.1", - "_from": "active-x-obfuscator@0.0.1" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/test.js deleted file mode 100644 index e8fc807f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/active-x-obfuscator/test.js +++ /dev/null @@ -1,53 +0,0 @@ -var activeXObfuscator = require('./index'); -var assert = require('assert'); - -var OBFUSCATED_ACTIVE_X_OBJECT = activeXObfuscator.OBFUSCATED_ACTIVE_X_OBJECT; -var OBFUSCATED_ACTIVE_X = activeXObfuscator.OBFUSCATED_ACTIVE_X; - -var input = - "foo(new ActiveXObject('Microsoft.XMLHTTP'))"; -var expected = - "foo(new window[" + OBFUSCATED_ACTIVE_X_OBJECT + "]('Microsoft.XMLHTTP'))"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo = 'ActiveXObject';"; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X_OBJECT + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - 'var foo = "ActiveXObject";'; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X_OBJECT + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - 'var foo = o.ActiveXObject;'; -var expected = - "var foo = o[" + OBFUSCATED_ACTIVE_X_OBJECT + "];"; -assert.equal(activeXObfuscator(input), expected); - -var input = - 'var foo = "ActiveX";'; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo = 'ActiveX';"; -var expected = - "var foo = " + OBFUSCATED_ACTIVE_X + ";"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo; // ActiveX is cool"; -var expected = - "var foo; // Ac...eX is cool"; -assert.equal(activeXObfuscator(input), expected); - -var input = - "var foo = 'ActiveX is cool';"; -assert.throws(function() { - activeXObfuscator(input); -}, /Unknown ActiveX occurence/); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/.npmignore deleted file mode 100644 index d97eaa09..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/.npmignore +++ /dev/null @@ -1,4 +0,0 @@ -.DS_Store -.tmp*~ -*.local.* -.pinf-* \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.html b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.html deleted file mode 100644 index 5f37ac0f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.html +++ /dev/null @@ -1,981 +0,0 @@ - - - - -UglifyJS – a JavaScript parser/compressor/beautifier - - - - - - - - - - - - - -
    - -
    - -
    -

    UglifyJS – a JavaScript parser/compressor/beautifier

    - - - - -
    -

    1 UglifyJS — a JavaScript parser/compressor/beautifier

    -
    - - -

    -This package implements a general-purpose JavaScript -parser/compressor/beautifier toolkit. It is developed on NodeJS, but it -should work on any JavaScript platform supporting the CommonJS module system -(and if your platform of choice doesn't support CommonJS, you can easily -implement it, or discard the exports.* lines from UglifyJS sources). -

    -

    -The tokenizer/parser generates an abstract syntax tree from JS code. You -can then traverse the AST to learn more about the code, or do various -manipulations on it. This part is implemented in parse-js.js and it's a -port to JavaScript of the excellent parse-js Common Lisp library from Marijn Haverbeke. -

    -

    -( See cl-uglify-js if you're looking for the Common Lisp version of -UglifyJS. ) -

    -

    -The second part of this package, implemented in process.js, inspects and -manipulates the AST generated by the parser to provide the following: -

    -
      -
    • ability to re-generate JavaScript code from the AST. Optionally - indented—you can use this if you want to “beautify” a program that has - been compressed, so that you can inspect the source. But you can also run - our code generator to print out an AST without any whitespace, so you - achieve compression as well. - -
    • -
    • shorten variable names (usually to single characters). Our mangler will - analyze the code and generate proper variable names, depending on scope - and usage, and is smart enough to deal with globals defined elsewhere, or - with eval() calls or with{} statements. In short, if eval() or - with{} are used in some scope, then all variables in that scope and any - variables in the parent scopes will remain unmangled, and any references - to such variables remain unmangled as well. - -
    • -
    • various small optimizations that may lead to faster code but certainly - lead to smaller code. Where possible, we do the following: - -
        -
      • foo["bar"] ==> foo.bar - -
      • -
      • remove block brackets {} - -
      • -
      • join consecutive var declarations: - var a = 10; var b = 20; ==> var a=10,b=20; - -
      • -
      • resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the - replacement if the result occupies less bytes; for example 1/3 would - translate to 0.333333333333, so in this case we don't replace it. - -
      • -
      • consecutive statements in blocks are merged into a sequence; in many - cases, this leaves blocks with a single statement, so then we can remove - the block brackets. - -
      • -
      • various optimizations for IF statements: - -
          -
        • if (foo) bar(); else baz(); ==> foo?bar():baz(); -
        • -
        • if (!foo) bar(); else baz(); ==> foo?baz():bar(); -
        • -
        • if (foo) bar(); ==> foo&&bar(); -
        • -
        • if (!foo) bar(); ==> foo||bar(); -
        • -
        • if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); -
        • -
        • if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} - -
        • -
        - -
      • -
      • remove some unreachable code and warn about it (code that follows a - return, throw, break or continue statement, except - function/variable declarations). - -
      • -
      • act a limited version of a pre-processor (c.f. the pre-processor of - C/C++) to allow you to safely replace selected global symbols with - specified values. When combined with the optimisations above this can - make UglifyJS operate slightly more like a compilation process, in - that when certain symbols are replaced by constant values, entire code - blocks may be optimised away as unreachable. -
      • -
      - -
    • -
    - - - -
    - -
    -

    1.1 Unsafe transformations

    -
    - - -

    -The following transformations can in theory break code, although they're -probably safe in most practical cases. To enable them you need to pass the ---unsafe flag. -

    - -
    - -
    -

    1.1.1 Calls involving the global Array constructor

    -
    - - -

    -The following transformations occur: -

    - - - -
    new Array(1, 2, 3, 4)  => [1,2,3,4]
    -Array(a, b, c)         => [a,b,c]
    -new Array(5)           => Array(5)
    -new Array(a)           => Array(a)
    -
    - - -

    -These are all safe if the Array name isn't redefined. JavaScript does allow -one to globally redefine Array (and pretty much everything, in fact) but I -personally don't see why would anyone do that. -

    -

    -UglifyJS does handle the case where Array is redefined locally, or even -globally but with a function or var declaration. Therefore, in the -following cases UglifyJS doesn't touch calls or instantiations of Array: -

    - - - -
    // case 1.  globally declared variable
    -  var Array;
    -  new Array(1, 2, 3);
    -  Array(a, b);
    -
    -  // or (can be declared later)
    -  new Array(1, 2, 3);
    -  var Array;
    -
    -  // or (can be a function)
    -  new Array(1, 2, 3);
    -  function Array() { ... }
    -
    -// case 2.  declared in a function
    -  (function(){
    -    a = new Array(1, 2, 3);
    -    b = Array(5, 6);
    -    var Array;
    -  })();
    -
    -  // or
    -  (function(Array){
    -    return Array(5, 6, 7);
    -  })();
    -
    -  // or
    -  (function(){
    -    return new Array(1, 2, 3, 4);
    -    function Array() { ... }
    -  })();
    -
    -  // etc.
    -
    - - -
    - -
    - -
    -

    1.1.2 obj.toString() ==> obj+“”

    -
    - - -
    -
    - -
    - -
    -

    1.2 Install (NPM)

    -
    - - -

    -UglifyJS is now available through NPM — npm install uglify-js should do -the job. -

    -
    - -
    - -
    -

    1.3 Install latest code from GitHub

    -
    - - - - - -
    ## clone the repository
    -mkdir -p /where/you/wanna/put/it
    -cd /where/you/wanna/put/it
    -git clone git://github.com/mishoo/UglifyJS.git
    -
    -## make the module available to Node
    -mkdir -p ~/.node_libraries/
    -cd ~/.node_libraries/
    -ln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js
    -
    -## and if you want the CLI script too:
    -mkdir -p ~/bin
    -cd ~/bin
    -ln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs
    -  # (then add ~/bin to your $PATH if it's not there already)
    -
    - - -
    - -
    - -
    -

    1.4 Usage

    -
    - - -

    -There is a command-line tool that exposes the functionality of this library -for your shell-scripting needs: -

    - - - -
    uglifyjs [ options... ] [ filename ]
    -
    - - -

    -filename should be the last argument and should name the file from which -to read the JavaScript code. If you don't specify it, it will read code -from STDIN. -

    -

    -Supported options: -

    -
      -
    • -b or --beautify — output indented code; when passed, additional - options control the beautifier: - -
        -
      • -i N or --indent N — indentation level (number of spaces) - -
      • -
      • -q or --quote-keys — quote keys in literal objects (by default, - only keys that cannot be identifier names will be quotes). - -
      • -
      - -
    • -
    • --ascii — pass this argument to encode non-ASCII characters as - \uXXXX sequences. By default UglifyJS won't bother to do it and will - output Unicode characters instead. (the output is always encoded in UTF8, - but if you pass this option you'll only get ASCII). - -
    • -
    • -nm or --no-mangle — don't mangle names. - -
    • -
    • -nmf or --no-mangle-functions – in case you want to mangle variable - names, but not touch function names. - -
    • -
    • -ns or --no-squeeze — don't call ast_squeeze() (which does various - optimizations that result in smaller, less readable code). - -
    • -
    • -mt or --mangle-toplevel — mangle names in the toplevel scope too - (by default we don't do this). - -
    • -
    • --no-seqs — when ast_squeeze() is called (thus, unless you pass - --no-squeeze) it will reduce consecutive statements in blocks into a - sequence. For example, "a = 10; b = 20; foo();" will be written as - "a=10,b=20,foo();". In various occasions, this allows us to discard the - block brackets (since the block becomes a single statement). This is ON - by default because it seems safe and saves a few hundred bytes on some - libs that I tested it on, but pass --no-seqs to disable it. - -
    • -
    • --no-dead-code — by default, UglifyJS will remove code that is - obviously unreachable (code that follows a return, throw, break or - continue statement and is not a function/variable declaration). Pass - this option to disable this optimization. - -
    • -
    • -nc or --no-copyright — by default, uglifyjs will keep the initial - comment tokens in the generated code (assumed to be copyright information - etc.). If you pass this it will discard it. - -
    • -
    • -o filename or --output filename — put the result in filename. If - this isn't given, the result goes to standard output (or see next one). - -
    • -
    • --overwrite — if the code is read from a file (not from STDIN) and you - pass --overwrite then the output will be written in the same file. - -
    • -
    • --ast — pass this if you want to get the Abstract Syntax Tree instead - of JavaScript as output. Useful for debugging or learning more about the - internals. - -
    • -
    • -v or --verbose — output some notes on STDERR (for now just how long - each operation takes). - -
    • -
    • -d SYMBOL[=VALUE] or --define SYMBOL[=VALUE] — will replace - all instances of the specified symbol where used as an identifier - (except where symbol has properly declared by a var declaration or - use as function parameter or similar) with the specified value. This - argument may be specified multiple times to define multiple - symbols - if no value is specified the symbol will be replaced with - the value true, or you can specify a numeric value (such as - 1024), a quoted string value (such as ="object"= or - ='https://github.com'), or the name of another symbol or keyword (such as =null or document). - This allows you, for example, to assign meaningful names to key - constant values but discard the symbolic names in the uglified - version for brevity/efficiency, or when used wth care, allows - UglifyJS to operate as a form of conditional compilation - whereby defining appropriate values may, by dint of the constant - folding and dead code removal features above, remove entire - superfluous code blocks (e.g. completely remove instrumentation or - trace code for production use). - Where string values are being defined, the handling of quotes are - likely to be subject to the specifics of your command shell - environment, so you may need to experiment with quoting styles - depending on your platform, or you may find the option - --define-from-module more suitable for use. - -
    • -
    • -define-from-module SOMEMODULE — will load the named module (as - per the NodeJS require() function) and iterate all the exported - properties of the module defining them as symbol names to be defined - (as if by the --define option) per the name of each property - (i.e. without the module name prefix) and given the value of the - property. This is a much easier way to handle and document groups of - symbols to be defined rather than a large number of --define - options. - -
    • -
    • --unsafe — enable other additional optimizations that are known to be - unsafe in some contrived situations, but could still be generally useful. - For now only these: - -
        -
      • foo.toString() ==> foo+"" -
      • -
      • new Array(x,…) ==> [x,…] -
      • -
      • new Array(x) ==> Array(x) - -
      • -
      - -
    • -
    • --max-line-len (default 32K characters) — add a newline after around - 32K characters. I've seen both FF and Chrome croak when all the code was - on a single line of around 670K. Pass –max-line-len 0 to disable this - safety feature. - -
    • -
    • --reserved-names — some libraries rely on certain names to be used, as - pointed out in issue #92 and #81, so this option allow you to exclude such - names from the mangler. For example, to keep names require and $super - intact you'd specify –reserved-names "require,$super". - -
    • -
    • --inline-script – when you want to include the output literally in an - HTML <script> tag you can use this option to prevent </script from - showing up in the output. - -
    • -
    • --lift-vars – when you pass this, UglifyJS will apply the following - transformations (see the notes in API, ast_lift_variables): - -
        -
      • put all var declarations at the start of the scope -
      • -
      • make sure a variable is declared only once -
      • -
      • discard unused function arguments -
      • -
      • discard unused inner (named) functions -
      • -
      • finally, try to merge assignments into that one var declaration, if - possible. -
      • -
      - -
    • -
    - - - -
    - -
    -

    1.4.1 API

    -
    - - -

    -To use the library from JavaScript, you'd do the following (example for -NodeJS): -

    - - - -
    var jsp = require("uglify-js").parser;
    -var pro = require("uglify-js").uglify;
    -
    -var orig_code = "... JS code here";
    -var ast = jsp.parse(orig_code); // parse code and get the initial AST
    -ast = pro.ast_mangle(ast); // get a new AST with mangled names
    -ast = pro.ast_squeeze(ast); // get an AST with compression optimizations
    -var final_code = pro.gen_code(ast); // compressed code here
    -
    - - -

    -The above performs the full compression that is possible right now. As you -can see, there are a sequence of steps which you can apply. For example if -you want compressed output but for some reason you don't want to mangle -variable names, you would simply skip the line that calls -pro.ast_mangle(ast). -

    -

    -Some of these functions take optional arguments. Here's a description: -

    -
      -
    • jsp.parse(code, strict_semicolons) – parses JS code and returns an AST. - strict_semicolons is optional and defaults to false. If you pass - true then the parser will throw an error when it expects a semicolon and - it doesn't find it. For most JS code you don't want that, but it's useful - if you want to strictly sanitize your code. - -
    • -
    • pro.ast_lift_variables(ast) – merge and move var declarations to the - scop of the scope; discard unused function arguments or variables; discard - unused (named) inner functions. It also tries to merge assignments - following the var declaration into it. - -

      - If your code is very hand-optimized concerning var declarations, this - lifting variable declarations might actually increase size. For me it - helps out. On jQuery it adds 865 bytes (243 after gzip). YMMV. Also - note that (since it's not enabled by default) this operation isn't yet - heavily tested (please report if you find issues!). -

      -

      - Note that although it might increase the image size (on jQuery it gains - 865 bytes, 243 after gzip) it's technically more correct: in certain - situations, dead code removal might drop variable declarations, which - would not happen if the variables are lifted in advance. -

      -

      - Here's an example of what it does: -

    • -
    - - - - - -
    function f(a, b, c, d, e) {
    -    var q;
    -    var w;
    -    w = 10;
    -    q = 20;
    -    for (var i = 1; i < 10; ++i) {
    -        var boo = foo(a);
    -    }
    -    for (var i = 0; i < 1; ++i) {
    -        var boo = bar(c);
    -    }
    -    function foo(){ ... }
    -    function bar(){ ... }
    -    function baz(){ ... }
    -}
    -
    -// transforms into ==>
    -
    -function f(a, b, c) {
    -    var i, boo, w = 10, q = 20;
    -    for (i = 1; i < 10; ++i) {
    -        boo = foo(a);
    -    }
    -    for (i = 0; i < 1; ++i) {
    -        boo = bar(c);
    -    }
    -    function foo() { ... }
    -    function bar() { ... }
    -}
    -
    - - -
      -
    • pro.ast_mangle(ast, options) – generates a new AST containing mangled - (compressed) variable and function names. It supports the following - options: - -
        -
      • toplevel – mangle toplevel names (by default we don't touch them). -
      • -
      • except – an array of names to exclude from compression. -
      • -
      • defines – an object with properties named after symbols to - replace (see the --define option for the script) and the values - representing the AST replacement value. - -
      • -
      - -
    • -
    • pro.ast_squeeze(ast, options) – employs further optimizations designed - to reduce the size of the code that gen_code would generate from the - AST. Returns a new AST. options can be a hash; the supported options - are: - -
        -
      • make_seqs (default true) which will cause consecutive statements in a - block to be merged using the "sequence" (comma) operator - -
      • -
      • dead_code (default true) which will remove unreachable code. - -
      • -
      - -
    • -
    • pro.gen_code(ast, options) – generates JS code from the AST. By - default it's minified, but using the options argument you can get nicely - formatted output. options is, well, optional :-) and if you pass it it - must be an object and supports the following properties (below you can see - the default values): - -
        -
      • beautify: false – pass true if you want indented output -
      • -
      • indent_start: 0 (only applies when beautify is true) – initial - indentation in spaces -
      • -
      • indent_level: 4 (only applies when beautify is true) -- - indentation level, in spaces (pass an even number) -
      • -
      • quote_keys: false – if you pass true it will quote all keys in - literal objects -
      • -
      • space_colon: false (only applies when beautify is true) – wether - to put a space before the colon in object literals -
      • -
      • ascii_only: false – pass true if you want to encode non-ASCII - characters as \uXXXX. -
      • -
      • inline_script: false – pass true to escape occurrences of - </script in strings -
      • -
      - -
    • -
    - - -
    - -
    - -
    -

    1.4.2 Beautifier shortcoming – no more comments

    -
    - - -

    -The beautifier can be used as a general purpose indentation tool. It's -useful when you want to make a minified file readable. One limitation, -though, is that it discards all comments, so you don't really want to use it -to reformat your code, unless you don't have, or don't care about, comments. -

    -

    -In fact it's not the beautifier who discards comments — they are dumped at -the parsing stage, when we build the initial AST. Comments don't really -make sense in the AST, and while we could add nodes for them, it would be -inconvenient because we'd have to add special rules to ignore them at all -the processing stages. -

    -
    - -
    - -
    -

    1.4.3 Use as a code pre-processor

    -
    - - -

    -The --define option can be used, particularly when combined with the -constant folding logic, as a form of pre-processor to enable or remove -particular constructions, such as might be used for instrumenting -development code, or to produce variations aimed at a specific -platform. -

    -

    -The code below illustrates the way this can be done, and how the -symbol replacement is performed. -

    - - - -
    CLAUSE1: if (typeof DEVMODE === 'undefined') {
    -    DEVMODE = true;
    -}
    -
    -CLAUSE2: function init() {
    -    if (DEVMODE) {
    -        console.log("init() called");
    -    }
    -    ....
    -    DEVMODE &amp;&amp; console.log("init() complete");
    -}
    -
    -CLAUSE3: function reportDeviceStatus(device) {
    -    var DEVMODE = device.mode, DEVNAME = device.name;
    -    if (DEVMODE === 'open') {
    -        ....
    -    }
    -}
    -
    - - -

    -When the above code is normally executed, the undeclared global -variable DEVMODE will be assigned the value true (see CLAUSE1) -and so the init() function (CLAUSE2) will write messages to the -console log when executed, but in CLAUSE3 a locally declared -variable will mask access to the DEVMODE global symbol. -

    -

    -If the above code is processed by UglifyJS with an argument of ---define DEVMODE=false then UglifyJS will replace DEVMODE with the -boolean constant value false within CLAUSE1 and CLAUSE2, but it -will leave CLAUSE3 as it stands because there DEVMODE resolves to -a validly declared variable. -

    -

    -And more so, the constant-folding features of UglifyJS will recognise -that the if condition of CLAUSE1 is thus always false, and so will -remove the test and body of CLAUSE1 altogether (including the -otherwise slightly problematical statement false = true; which it -will have formed by replacing DEVMODE in the body). Similarly, -within CLAUSE2 both calls to console.log() will be removed -altogether. -

    -

    -In this way you can mimic, to a limited degree, the functionality of -the C/C++ pre-processor to enable or completely remove blocks -depending on how certain symbols are defined - perhaps using UglifyJS -to generate different versions of source aimed at different -environments -

    -

    -It is recommmended (but not made mandatory) that symbols designed for -this purpose are given names consisting of UPPER_CASE_LETTERS to -distinguish them from other (normal) symbols and avoid the sort of -clash that CLAUSE3 above illustrates. -

    -
    -
    - -
    - -
    -

    1.5 Compression – how good is it?

    -
    - - -

    -Here are updated statistics. (I also updated my Google Closure and YUI -installations). -

    -

    -We're still a lot better than YUI in terms of compression, though slightly -slower. We're still a lot faster than Closure, and compression after gzip -is comparable. -

    - - -- - - - - - - - - - -
    FileUglifyJSUglifyJS+gzipClosureClosure+gzipYUIYUI+gzip
    jquery-1.6.2.js91001 (0:01.59)3189690678 (0:07.40)31979101527 (0:01.82)34646
    paper.js142023 (0:01.65)43334134301 (0:07.42)42495173383 (0:01.58)48785
    prototype.js88544 (0:01.09)2668086955 (0:06.97)2632692130 (0:00.79)28624
    thelib-full.js (DynarchLIB)251939 (0:02.55)72535249911 (0:09.05)72696258869 (0:01.94)76584
    - - -
    - -
    - -
    -

    1.6 Bugs?

    -
    - - -

    -Unfortunately, for the time being there is no automated test suite. But I -ran the compressor manually on non-trivial code, and then I tested that the -generated code works as expected. A few hundred times. -

    -

    -DynarchLIB was started in times when there was no good JS minifier. -Therefore I was quite religious about trying to write short code manually, -and as such DL contains a lot of syntactic hacks1 such as “foo == bar ? a -= 10 : b = 20”, though the more readable version would clearly be to use -“if/else”. -

    -

    -Since the parser/compressor runs fine on DL and jQuery, I'm quite confident -that it's solid enough for production use. If you can identify any bugs, -I'd love to hear about them (use the Google Group or email me directly). -

    -
    - -
    - -
    -

    1.7 Links

    -
    - - - - - -
    - -
    - -
    -

    1.8 License

    -
    - - -

    -UglifyJS is released under the BSD license: -

    - - - -
    Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>
    -Based on parse-js (http://marijn.haverbeke.nl/parse-js/).
    -
    -Redistribution and use in source and binary forms, with or without
    -modification, are permitted provided that the following conditions
    -are met:
    -
    -    * Redistributions of source code must retain the above
    -      copyright notice, this list of conditions and the following
    -      disclaimer.
    -
    -    * Redistributions in binary form must reproduce the above
    -      copyright notice, this list of conditions and the following
    -      disclaimer in the documentation and/or other materials
    -      provided with the distribution.
    -
    -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY
    -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    -PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE
    -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
    -OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
    -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
    -TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
    -THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    -SUCH DAMAGE.
    -
    - - -
    -

    Footnotes:

    -
    -

    1 I even reported a few bugs and suggested some fixes in the original - parse-js library, and Marijn pushed fixes literally in minutes. -

    -
    -
    - -
    -
    -
    - -
    -

    Date: 2011-12-09 14:59:08 EET

    -

    Author: Mihai Bazon

    -

    Org version 7.7 with Emacs version 23

    -Validate XHTML 1.0 - -
    - - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.org b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.org deleted file mode 100644 index 4d01fdfd..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/README.org +++ /dev/null @@ -1,574 +0,0 @@ -#+TITLE: UglifyJS -- a JavaScript parser/compressor/beautifier -#+KEYWORDS: javascript, js, parser, compiler, compressor, mangle, minify, minifier -#+DESCRIPTION: a JavaScript parser/compressor/beautifier in JavaScript -#+STYLE: -#+AUTHOR: Mihai Bazon -#+EMAIL: mihai.bazon@gmail.com - -* UglifyJS --- a JavaScript parser/compressor/beautifier - -This package implements a general-purpose JavaScript -parser/compressor/beautifier toolkit. It is developed on [[http://nodejs.org/][NodeJS]], but it -should work on any JavaScript platform supporting the CommonJS module system -(and if your platform of choice doesn't support CommonJS, you can easily -implement it, or discard the =exports.*= lines from UglifyJS sources). - -The tokenizer/parser generates an abstract syntax tree from JS code. You -can then traverse the AST to learn more about the code, or do various -manipulations on it. This part is implemented in [[../lib/parse-js.js][parse-js.js]] and it's a -port to JavaScript of the excellent [[http://marijn.haverbeke.nl/parse-js/][parse-js]] Common Lisp library from [[http://marijn.haverbeke.nl/][Marijn -Haverbeke]]. - -( See [[http://github.com/mishoo/cl-uglify-js][cl-uglify-js]] if you're looking for the Common Lisp version of -UglifyJS. ) - -The second part of this package, implemented in [[../lib/process.js][process.js]], inspects and -manipulates the AST generated by the parser to provide the following: - -- ability to re-generate JavaScript code from the AST. Optionally - indented---you can use this if you want to “beautify” a program that has - been compressed, so that you can inspect the source. But you can also run - our code generator to print out an AST without any whitespace, so you - achieve compression as well. - -- shorten variable names (usually to single characters). Our mangler will - analyze the code and generate proper variable names, depending on scope - and usage, and is smart enough to deal with globals defined elsewhere, or - with =eval()= calls or =with{}= statements. In short, if =eval()= or - =with{}= are used in some scope, then all variables in that scope and any - variables in the parent scopes will remain unmangled, and any references - to such variables remain unmangled as well. - -- various small optimizations that may lead to faster code but certainly - lead to smaller code. Where possible, we do the following: - - - foo["bar"] ==> foo.bar - - - remove block brackets ={}= - - - join consecutive var declarations: - var a = 10; var b = 20; ==> var a=10,b=20; - - - resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the - replacement if the result occupies less bytes; for example 1/3 would - translate to 0.333333333333, so in this case we don't replace it. - - - consecutive statements in blocks are merged into a sequence; in many - cases, this leaves blocks with a single statement, so then we can remove - the block brackets. - - - various optimizations for IF statements: - - - if (foo) bar(); else baz(); ==> foo?bar():baz(); - - if (!foo) bar(); else baz(); ==> foo?baz():bar(); - - if (foo) bar(); ==> foo&&bar(); - - if (!foo) bar(); ==> foo||bar(); - - if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); - - if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} - - - remove some unreachable code and warn about it (code that follows a - =return=, =throw=, =break= or =continue= statement, except - function/variable declarations). - - - act a limited version of a pre-processor (c.f. the pre-processor of - C/C++) to allow you to safely replace selected global symbols with - specified values. When combined with the optimisations above this can - make UglifyJS operate slightly more like a compilation process, in - that when certain symbols are replaced by constant values, entire code - blocks may be optimised away as unreachable. - -** <> - -The following transformations can in theory break code, although they're -probably safe in most practical cases. To enable them you need to pass the -=--unsafe= flag. - -*** Calls involving the global Array constructor - -The following transformations occur: - -#+BEGIN_SRC js -new Array(1, 2, 3, 4) => [1,2,3,4] -Array(a, b, c) => [a,b,c] -new Array(5) => Array(5) -new Array(a) => Array(a) -#+END_SRC - -These are all safe if the Array name isn't redefined. JavaScript does allow -one to globally redefine Array (and pretty much everything, in fact) but I -personally don't see why would anyone do that. - -UglifyJS does handle the case where Array is redefined locally, or even -globally but with a =function= or =var= declaration. Therefore, in the -following cases UglifyJS *doesn't touch* calls or instantiations of Array: - -#+BEGIN_SRC js -// case 1. globally declared variable - var Array; - new Array(1, 2, 3); - Array(a, b); - - // or (can be declared later) - new Array(1, 2, 3); - var Array; - - // or (can be a function) - new Array(1, 2, 3); - function Array() { ... } - -// case 2. declared in a function - (function(){ - a = new Array(1, 2, 3); - b = Array(5, 6); - var Array; - })(); - - // or - (function(Array){ - return Array(5, 6, 7); - })(); - - // or - (function(){ - return new Array(1, 2, 3, 4); - function Array() { ... } - })(); - - // etc. -#+END_SRC - -*** =obj.toString()= ==> =obj+“”= - -** Install (NPM) - -UglifyJS is now available through NPM --- =npm install uglify-js= should do -the job. - -** Install latest code from GitHub - -#+BEGIN_SRC sh -## clone the repository -mkdir -p /where/you/wanna/put/it -cd /where/you/wanna/put/it -git clone git://github.com/mishoo/UglifyJS.git - -## make the module available to Node -mkdir -p ~/.node_libraries/ -cd ~/.node_libraries/ -ln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js - -## and if you want the CLI script too: -mkdir -p ~/bin -cd ~/bin -ln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs - # (then add ~/bin to your $PATH if it's not there already) -#+END_SRC - -** Usage - -There is a command-line tool that exposes the functionality of this library -for your shell-scripting needs: - -#+BEGIN_SRC sh -uglifyjs [ options... ] [ filename ] -#+END_SRC - -=filename= should be the last argument and should name the file from which -to read the JavaScript code. If you don't specify it, it will read code -from STDIN. - -Supported options: - -- =-b= or =--beautify= --- output indented code; when passed, additional - options control the beautifier: - - - =-i N= or =--indent N= --- indentation level (number of spaces) - - - =-q= or =--quote-keys= --- quote keys in literal objects (by default, - only keys that cannot be identifier names will be quotes). - -- =--ascii= --- pass this argument to encode non-ASCII characters as - =\uXXXX= sequences. By default UglifyJS won't bother to do it and will - output Unicode characters instead. (the output is always encoded in UTF8, - but if you pass this option you'll only get ASCII). - -- =-nm= or =--no-mangle= --- don't mangle names. - -- =-nmf= or =--no-mangle-functions= -- in case you want to mangle variable - names, but not touch function names. - -- =-ns= or =--no-squeeze= --- don't call =ast_squeeze()= (which does various - optimizations that result in smaller, less readable code). - -- =-mt= or =--mangle-toplevel= --- mangle names in the toplevel scope too - (by default we don't do this). - -- =--no-seqs= --- when =ast_squeeze()= is called (thus, unless you pass - =--no-squeeze=) it will reduce consecutive statements in blocks into a - sequence. For example, "a = 10; b = 20; foo();" will be written as - "a=10,b=20,foo();". In various occasions, this allows us to discard the - block brackets (since the block becomes a single statement). This is ON - by default because it seems safe and saves a few hundred bytes on some - libs that I tested it on, but pass =--no-seqs= to disable it. - -- =--no-dead-code= --- by default, UglifyJS will remove code that is - obviously unreachable (code that follows a =return=, =throw=, =break= or - =continue= statement and is not a function/variable declaration). Pass - this option to disable this optimization. - -- =-nc= or =--no-copyright= --- by default, =uglifyjs= will keep the initial - comment tokens in the generated code (assumed to be copyright information - etc.). If you pass this it will discard it. - -- =-o filename= or =--output filename= --- put the result in =filename=. If - this isn't given, the result goes to standard output (or see next one). - -- =--overwrite= --- if the code is read from a file (not from STDIN) and you - pass =--overwrite= then the output will be written in the same file. - -- =--ast= --- pass this if you want to get the Abstract Syntax Tree instead - of JavaScript as output. Useful for debugging or learning more about the - internals. - -- =-v= or =--verbose= --- output some notes on STDERR (for now just how long - each operation takes). - -- =-d SYMBOL[=VALUE]= or =--define SYMBOL[=VALUE]= --- will replace - all instances of the specified symbol where used as an identifier - (except where symbol has properly declared by a var declaration or - use as function parameter or similar) with the specified value. This - argument may be specified multiple times to define multiple - symbols - if no value is specified the symbol will be replaced with - the value =true=, or you can specify a numeric value (such as - =1024=), a quoted string value (such as ="object"= or - ='https://github.com'=), or the name of another symbol or keyword - (such as =null= or =document=). - This allows you, for example, to assign meaningful names to key - constant values but discard the symbolic names in the uglified - version for brevity/efficiency, or when used wth care, allows - UglifyJS to operate as a form of *conditional compilation* - whereby defining appropriate values may, by dint of the constant - folding and dead code removal features above, remove entire - superfluous code blocks (e.g. completely remove instrumentation or - trace code for production use). - Where string values are being defined, the handling of quotes are - likely to be subject to the specifics of your command shell - environment, so you may need to experiment with quoting styles - depending on your platform, or you may find the option - =--define-from-module= more suitable for use. - -- =-define-from-module SOMEMODULE= --- will load the named module (as - per the NodeJS =require()= function) and iterate all the exported - properties of the module defining them as symbol names to be defined - (as if by the =--define= option) per the name of each property - (i.e. without the module name prefix) and given the value of the - property. This is a much easier way to handle and document groups of - symbols to be defined rather than a large number of =--define= - options. - -- =--unsafe= --- enable other additional optimizations that are known to be - unsafe in some contrived situations, but could still be generally useful. - For now only these: - - - foo.toString() ==> foo+"" - - new Array(x,...) ==> [x,...] - - new Array(x) ==> Array(x) - -- =--max-line-len= (default 32K characters) --- add a newline after around - 32K characters. I've seen both FF and Chrome croak when all the code was - on a single line of around 670K. Pass --max-line-len 0 to disable this - safety feature. - -- =--reserved-names= --- some libraries rely on certain names to be used, as - pointed out in issue #92 and #81, so this option allow you to exclude such - names from the mangler. For example, to keep names =require= and =$super= - intact you'd specify --reserved-names "require,$super". - -- =--inline-script= -- when you want to include the output literally in an - HTML =\n\n\n\n\n
    \n\n
    \n\n
    \n

    UglifyJS – a JavaScript parser/compressor/beautifier

    \n\n\n\n\n
    \n

    1 UglifyJS — a JavaScript parser/compressor/beautifier

    \n
    \n\n\n

    \nThis package implements a general-purpose JavaScript\nparser/compressor/beautifier toolkit. It is developed on NodeJS, but it\nshould work on any JavaScript platform supporting the CommonJS module system\n(and if your platform of choice doesn't support CommonJS, you can easily\nimplement it, or discard the exports.* lines from UglifyJS sources).\n

    \n

    \nThe tokenizer/parser generates an abstract syntax tree from JS code. You\ncan then traverse the AST to learn more about the code, or do various\nmanipulations on it. This part is implemented in parse-js.js and it's a\nport to JavaScript of the excellent parse-js Common Lisp library from Marijn Haverbeke.\n

    \n

    \n( See cl-uglify-js if you're looking for the Common Lisp version of\nUglifyJS. )\n

    \n

    \nThe second part of this package, implemented in process.js, inspects and\nmanipulates the AST generated by the parser to provide the following:\n

    \n
      \n
    • ability to re-generate JavaScript code from the AST. Optionally\n indented—you can use this if you want to “beautify” a program that has\n been compressed, so that you can inspect the source. But you can also run\n our code generator to print out an AST without any whitespace, so you\n achieve compression as well.\n\n
    • \n
    • shorten variable names (usually to single characters). Our mangler will\n analyze the code and generate proper variable names, depending on scope\n and usage, and is smart enough to deal with globals defined elsewhere, or\n with eval() calls or with{} statements. In short, if eval() or\n with{} are used in some scope, then all variables in that scope and any\n variables in the parent scopes will remain unmangled, and any references\n to such variables remain unmangled as well.\n\n
    • \n
    • various small optimizations that may lead to faster code but certainly\n lead to smaller code. Where possible, we do the following:\n\n
        \n
      • foo[\"bar\"] ==> foo.bar\n\n
      • \n
      • remove block brackets {}\n\n
      • \n
      • join consecutive var declarations:\n var a = 10; var b = 20; ==> var a=10,b=20;\n\n
      • \n
      • resolve simple constant expressions: 1 +2 * 3 ==> 7. We only do the\n replacement if the result occupies less bytes; for example 1/3 would\n translate to 0.333333333333, so in this case we don't replace it.\n\n
      • \n
      • consecutive statements in blocks are merged into a sequence; in many\n cases, this leaves blocks with a single statement, so then we can remove\n the block brackets.\n\n
      • \n
      • various optimizations for IF statements:\n\n
          \n
        • if (foo) bar(); else baz(); ==> foo?bar():baz();\n
        • \n
        • if (!foo) bar(); else baz(); ==> foo?baz():bar();\n
        • \n
        • if (foo) bar(); ==> foo&&bar();\n
        • \n
        • if (!foo) bar(); ==> foo||bar();\n
        • \n
        • if (foo) return bar(); else return baz(); ==> return foo?bar():baz();\n
        • \n
        • if (foo) return bar(); else something(); ==> {if(foo)return bar();something()}\n\n
        • \n
        \n\n
      • \n
      • remove some unreachable code and warn about it (code that follows a\n return, throw, break or continue statement, except\n function/variable declarations).\n\n
      • \n
      • act a limited version of a pre-processor (c.f. the pre-processor of\n C/C++) to allow you to safely replace selected global symbols with\n specified values. When combined with the optimisations above this can\n make UglifyJS operate slightly more like a compilation process, in\n that when certain symbols are replaced by constant values, entire code\n blocks may be optimised away as unreachable.\n
      • \n
      \n\n
    • \n
    \n\n\n\n
    \n\n
    \n

    1.1 Unsafe transformations

    \n
    \n\n\n

    \nThe following transformations can in theory break code, although they're\nprobably safe in most practical cases. To enable them you need to pass the\n--unsafe flag.\n

    \n\n
    \n\n
    \n

    1.1.1 Calls involving the global Array constructor

    \n
    \n\n\n

    \nThe following transformations occur:\n

    \n\n\n\n
    new Array(1, 2, 3, 4)  => [1,2,3,4]\nArray(a, b, c)         => [a,b,c]\nnew Array(5)           => Array(5)\nnew Array(a)           => Array(a)\n
    \n\n\n

    \nThese are all safe if the Array name isn't redefined. JavaScript does allow\none to globally redefine Array (and pretty much everything, in fact) but I\npersonally don't see why would anyone do that.\n

    \n

    \nUglifyJS does handle the case where Array is redefined locally, or even\nglobally but with a function or var declaration. Therefore, in the\nfollowing cases UglifyJS doesn't touch calls or instantiations of Array:\n

    \n\n\n\n
    // case 1.  globally declared variable\n  var Array;\n  new Array(1, 2, 3);\n  Array(a, b);\n\n  // or (can be declared later)\n  new Array(1, 2, 3);\n  var Array;\n\n  // or (can be a function)\n  new Array(1, 2, 3);\n  function Array() { ... }\n\n// case 2.  declared in a function\n  (function(){\n    a = new Array(1, 2, 3);\n    b = Array(5, 6);\n    var Array;\n  })();\n\n  // or\n  (function(Array){\n    return Array(5, 6, 7);\n  })();\n\n  // or\n  (function(){\n    return new Array(1, 2, 3, 4);\n    function Array() { ... }\n  })();\n\n  // etc.\n
    \n\n\n
    \n\n
    \n\n
    \n

    1.1.2 obj.toString() ==> obj+“”

    \n
    \n\n\n
    \n
    \n\n
    \n\n
    \n

    1.2 Install (NPM)

    \n
    \n\n\n

    \nUglifyJS is now available through NPM — npm install uglify-js should do\nthe job.\n

    \n
    \n\n
    \n\n
    \n

    1.3 Install latest code from GitHub

    \n
    \n\n\n\n\n\n
    ## clone the repository\nmkdir -p /where/you/wanna/put/it\ncd /where/you/wanna/put/it\ngit clone git://github.com/mishoo/UglifyJS.git\n\n## make the module available to Node\nmkdir -p ~/.node_libraries/\ncd ~/.node_libraries/\nln -s /where/you/wanna/put/it/UglifyJS/uglify-js.js\n\n## and if you want the CLI script too:\nmkdir -p ~/bin\ncd ~/bin\nln -s /where/you/wanna/put/it/UglifyJS/bin/uglifyjs\n  # (then add ~/bin to your $PATH if it's not there already)\n
    \n\n\n
    \n\n
    \n\n
    \n

    1.4 Usage

    \n
    \n\n\n

    \nThere is a command-line tool that exposes the functionality of this library\nfor your shell-scripting needs:\n

    \n\n\n\n
    uglifyjs [ options... ] [ filename ]\n
    \n\n\n

    \nfilename should be the last argument and should name the file from which\nto read the JavaScript code. If you don't specify it, it will read code\nfrom STDIN.\n

    \n

    \nSupported options:\n

    \n
      \n
    • -b or --beautify — output indented code; when passed, additional\n options control the beautifier:\n\n
        \n
      • -i N or --indent N — indentation level (number of spaces)\n\n
      • \n
      • -q or --quote-keys — quote keys in literal objects (by default,\n only keys that cannot be identifier names will be quotes).\n\n
      • \n
      \n\n
    • \n
    • --ascii — pass this argument to encode non-ASCII characters as\n \\uXXXX sequences. By default UglifyJS won't bother to do it and will\n output Unicode characters instead. (the output is always encoded in UTF8,\n but if you pass this option you'll only get ASCII).\n\n
    • \n
    • -nm or --no-mangle — don't mangle names.\n\n
    • \n
    • -nmf or --no-mangle-functions – in case you want to mangle variable\n names, but not touch function names.\n\n
    • \n
    • -ns or --no-squeeze — don't call ast_squeeze() (which does various\n optimizations that result in smaller, less readable code).\n\n
    • \n
    • -mt or --mangle-toplevel — mangle names in the toplevel scope too\n (by default we don't do this).\n\n
    • \n
    • --no-seqs — when ast_squeeze() is called (thus, unless you pass\n --no-squeeze) it will reduce consecutive statements in blocks into a\n sequence. For example, \"a = 10; b = 20; foo();\" will be written as\n \"a=10,b=20,foo();\". In various occasions, this allows us to discard the\n block brackets (since the block becomes a single statement). This is ON\n by default because it seems safe and saves a few hundred bytes on some\n libs that I tested it on, but pass --no-seqs to disable it.\n\n
    • \n
    • --no-dead-code — by default, UglifyJS will remove code that is\n obviously unreachable (code that follows a return, throw, break or\n continue statement and is not a function/variable declaration). Pass\n this option to disable this optimization.\n\n
    • \n
    • -nc or --no-copyright — by default, uglifyjs will keep the initial\n comment tokens in the generated code (assumed to be copyright information\n etc.). If you pass this it will discard it.\n\n
    • \n
    • -o filename or --output filename — put the result in filename. If\n this isn't given, the result goes to standard output (or see next one).\n\n
    • \n
    • --overwrite — if the code is read from a file (not from STDIN) and you\n pass --overwrite then the output will be written in the same file.\n\n
    • \n
    • --ast — pass this if you want to get the Abstract Syntax Tree instead\n of JavaScript as output. Useful for debugging or learning more about the\n internals.\n\n
    • \n
    • -v or --verbose — output some notes on STDERR (for now just how long\n each operation takes).\n\n
    • \n
    • -d SYMBOL[=VALUE] or --define SYMBOL[=VALUE] — will replace\n all instances of the specified symbol where used as an identifier\n (except where symbol has properly declared by a var declaration or\n use as function parameter or similar) with the specified value. This\n argument may be specified multiple times to define multiple\n symbols - if no value is specified the symbol will be replaced with\n the value true, or you can specify a numeric value (such as\n 1024), a quoted string value (such as =\"object\"= or\n ='https://github.com'), or the name of another symbol or keyword (such as =null or document).\n This allows you, for example, to assign meaningful names to key\n constant values but discard the symbolic names in the uglified\n version for brevity/efficiency, or when used wth care, allows\n UglifyJS to operate as a form of conditional compilation\n whereby defining appropriate values may, by dint of the constant\n folding and dead code removal features above, remove entire\n superfluous code blocks (e.g. completely remove instrumentation or\n trace code for production use).\n Where string values are being defined, the handling of quotes are\n likely to be subject to the specifics of your command shell\n environment, so you may need to experiment with quoting styles\n depending on your platform, or you may find the option\n --define-from-module more suitable for use.\n\n
    • \n
    • -define-from-module SOMEMODULE — will load the named module (as\n per the NodeJS require() function) and iterate all the exported\n properties of the module defining them as symbol names to be defined\n (as if by the --define option) per the name of each property\n (i.e. without the module name prefix) and given the value of the\n property. This is a much easier way to handle and document groups of\n symbols to be defined rather than a large number of --define\n options.\n\n
    • \n
    • --unsafe — enable other additional optimizations that are known to be\n unsafe in some contrived situations, but could still be generally useful.\n For now only these:\n\n
        \n
      • foo.toString() ==> foo+\"\"\n
      • \n
      • new Array(x,…) ==> [x,…]\n
      • \n
      • new Array(x) ==> Array(x)\n\n
      • \n
      \n\n
    • \n
    • --max-line-len (default 32K characters) — add a newline after around\n 32K characters. I've seen both FF and Chrome croak when all the code was\n on a single line of around 670K. Pass –max-line-len 0 to disable this\n safety feature.\n\n
    • \n
    • --reserved-names — some libraries rely on certain names to be used, as\n pointed out in issue #92 and #81, so this option allow you to exclude such\n names from the mangler. For example, to keep names require and $super\n intact you'd specify –reserved-names \"require,$super\".\n\n
    • \n
    • --inline-script – when you want to include the output literally in an\n HTML <script> tag you can use this option to prevent </script from\n showing up in the output.\n\n
    • \n
    • --lift-vars – when you pass this, UglifyJS will apply the following\n transformations (see the notes in API, ast_lift_variables):\n\n
        \n
      • put all var declarations at the start of the scope\n
      • \n
      • make sure a variable is declared only once\n
      • \n
      • discard unused function arguments\n
      • \n
      • discard unused inner (named) functions\n
      • \n
      • finally, try to merge assignments into that one var declaration, if\n possible.\n
      • \n
      \n\n
    • \n
    \n\n\n\n
    \n\n
    \n

    1.4.1 API

    \n
    \n\n\n

    \nTo use the library from JavaScript, you'd do the following (example for\nNodeJS):\n

    \n\n\n\n
    var jsp = require(\"uglify-js\").parser;\nvar pro = require(\"uglify-js\").uglify;\n\nvar orig_code = \"... JS code here\";\nvar ast = jsp.parse(orig_code); // parse code and get the initial AST\nast = pro.ast_mangle(ast); // get a new AST with mangled names\nast = pro.ast_squeeze(ast); // get an AST with compression optimizations\nvar final_code = pro.gen_code(ast); // compressed code here\n
    \n\n\n

    \nThe above performs the full compression that is possible right now. As you\ncan see, there are a sequence of steps which you can apply. For example if\nyou want compressed output but for some reason you don't want to mangle\nvariable names, you would simply skip the line that calls\npro.ast_mangle(ast).\n

    \n

    \nSome of these functions take optional arguments. Here's a description:\n

    \n
      \n
    • jsp.parse(code, strict_semicolons) – parses JS code and returns an AST.\n strict_semicolons is optional and defaults to false. If you pass\n true then the parser will throw an error when it expects a semicolon and\n it doesn't find it. For most JS code you don't want that, but it's useful\n if you want to strictly sanitize your code.\n\n
    • \n
    • pro.ast_lift_variables(ast) – merge and move var declarations to the\n scop of the scope; discard unused function arguments or variables; discard\n unused (named) inner functions. It also tries to merge assignments\n following the var declaration into it.\n\n

      \n If your code is very hand-optimized concerning var declarations, this\n lifting variable declarations might actually increase size. For me it\n helps out. On jQuery it adds 865 bytes (243 after gzip). YMMV. Also\n note that (since it's not enabled by default) this operation isn't yet\n heavily tested (please report if you find issues!).\n

      \n

      \n Note that although it might increase the image size (on jQuery it gains\n 865 bytes, 243 after gzip) it's technically more correct: in certain\n situations, dead code removal might drop variable declarations, which\n would not happen if the variables are lifted in advance.\n

      \n

      \n Here's an example of what it does:\n

    • \n
    \n\n\n\n\n\n
    function f(a, b, c, d, e) {\n    var q;\n    var w;\n    w = 10;\n    q = 20;\n    for (var i = 1; i < 10; ++i) {\n        var boo = foo(a);\n    }\n    for (var i = 0; i < 1; ++i) {\n        var boo = bar(c);\n    }\n    function foo(){ ... }\n    function bar(){ ... }\n    function baz(){ ... }\n}\n\n// transforms into ==>\n\nfunction f(a, b, c) {\n    var i, boo, w = 10, q = 20;\n    for (i = 1; i < 10; ++i) {\n        boo = foo(a);\n    }\n    for (i = 0; i < 1; ++i) {\n        boo = bar(c);\n    }\n    function foo() { ... }\n    function bar() { ... }\n}\n
    \n\n\n
      \n
    • pro.ast_mangle(ast, options) – generates a new AST containing mangled\n (compressed) variable and function names. It supports the following\n options:\n\n
        \n
      • toplevel – mangle toplevel names (by default we don't touch them).\n
      • \n
      • except – an array of names to exclude from compression.\n
      • \n
      • defines – an object with properties named after symbols to\n replace (see the --define option for the script) and the values\n representing the AST replacement value.\n\n
      • \n
      \n\n
    • \n
    • pro.ast_squeeze(ast, options) – employs further optimizations designed\n to reduce the size of the code that gen_code would generate from the\n AST. Returns a new AST. options can be a hash; the supported options\n are:\n\n
        \n
      • make_seqs (default true) which will cause consecutive statements in a\n block to be merged using the \"sequence\" (comma) operator\n\n
      • \n
      • dead_code (default true) which will remove unreachable code.\n\n
      • \n
      \n\n
    • \n
    • pro.gen_code(ast, options) – generates JS code from the AST. By\n default it's minified, but using the options argument you can get nicely\n formatted output. options is, well, optional :-) and if you pass it it\n must be an object and supports the following properties (below you can see\n the default values):\n\n
        \n
      • beautify: false – pass true if you want indented output\n
      • \n
      • indent_start: 0 (only applies when beautify is true) – initial\n indentation in spaces\n
      • \n
      • indent_level: 4 (only applies when beautify is true) --\n indentation level, in spaces (pass an even number)\n
      • \n
      • quote_keys: false – if you pass true it will quote all keys in\n literal objects\n
      • \n
      • space_colon: false (only applies when beautify is true) – wether\n to put a space before the colon in object literals\n
      • \n
      • ascii_only: false – pass true if you want to encode non-ASCII\n characters as \\uXXXX.\n
      • \n
      • inline_script: false – pass true to escape occurrences of\n </script in strings\n
      • \n
      \n\n
    • \n
    \n\n\n
    \n\n
    \n\n
    \n

    1.4.2 Beautifier shortcoming – no more comments

    \n
    \n\n\n

    \nThe beautifier can be used as a general purpose indentation tool. It's\nuseful when you want to make a minified file readable. One limitation,\nthough, is that it discards all comments, so you don't really want to use it\nto reformat your code, unless you don't have, or don't care about, comments.\n

    \n

    \nIn fact it's not the beautifier who discards comments — they are dumped at\nthe parsing stage, when we build the initial AST. Comments don't really\nmake sense in the AST, and while we could add nodes for them, it would be\ninconvenient because we'd have to add special rules to ignore them at all\nthe processing stages.\n

    \n
    \n\n
    \n\n
    \n

    1.4.3 Use as a code pre-processor

    \n
    \n\n\n

    \nThe --define option can be used, particularly when combined with the\nconstant folding logic, as a form of pre-processor to enable or remove\nparticular constructions, such as might be used for instrumenting\ndevelopment code, or to produce variations aimed at a specific\nplatform.\n

    \n

    \nThe code below illustrates the way this can be done, and how the\nsymbol replacement is performed.\n

    \n\n\n\n
    CLAUSE1: if (typeof DEVMODE === 'undefined') {\n    DEVMODE = true;\n}\n\nCLAUSE2: function init() {\n    if (DEVMODE) {\n        console.log(\"init() called\");\n    }\n    ....\n    DEVMODE &amp;&amp; console.log(\"init() complete\");\n}\n\nCLAUSE3: function reportDeviceStatus(device) {\n    var DEVMODE = device.mode, DEVNAME = device.name;\n    if (DEVMODE === 'open') {\n        ....\n    }\n}\n
    \n\n\n

    \nWhen the above code is normally executed, the undeclared global\nvariable DEVMODE will be assigned the value true (see CLAUSE1)\nand so the init() function (CLAUSE2) will write messages to the\nconsole log when executed, but in CLAUSE3 a locally declared\nvariable will mask access to the DEVMODE global symbol.\n

    \n

    \nIf the above code is processed by UglifyJS with an argument of\n--define DEVMODE=false then UglifyJS will replace DEVMODE with the\nboolean constant value false within CLAUSE1 and CLAUSE2, but it\nwill leave CLAUSE3 as it stands because there DEVMODE resolves to\na validly declared variable.\n

    \n

    \nAnd more so, the constant-folding features of UglifyJS will recognise\nthat the if condition of CLAUSE1 is thus always false, and so will\nremove the test and body of CLAUSE1 altogether (including the\notherwise slightly problematical statement false = true; which it\nwill have formed by replacing DEVMODE in the body). Similarly,\nwithin CLAUSE2 both calls to console.log() will be removed\naltogether.\n

    \n

    \nIn this way you can mimic, to a limited degree, the functionality of\nthe C/C++ pre-processor to enable or completely remove blocks\ndepending on how certain symbols are defined - perhaps using UglifyJS\nto generate different versions of source aimed at different\nenvironments\n

    \n

    \nIt is recommmended (but not made mandatory) that symbols designed for\nthis purpose are given names consisting of UPPER_CASE_LETTERS to\ndistinguish them from other (normal) symbols and avoid the sort of\nclash that CLAUSE3 above illustrates.\n

    \n
    \n
    \n\n
    \n\n
    \n

    1.5 Compression – how good is it?

    \n
    \n\n\n

    \nHere are updated statistics. (I also updated my Google Closure and YUI\ninstallations).\n

    \n

    \nWe're still a lot better than YUI in terms of compression, though slightly\nslower. We're still a lot faster than Closure, and compression after gzip\nis comparable.\n

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n
    FileUglifyJSUglifyJS+gzipClosureClosure+gzipYUIYUI+gzip
    jquery-1.6.2.js91001 (0:01.59)3189690678 (0:07.40)31979101527 (0:01.82)34646
    paper.js142023 (0:01.65)43334134301 (0:07.42)42495173383 (0:01.58)48785
    prototype.js88544 (0:01.09)2668086955 (0:06.97)2632692130 (0:00.79)28624
    thelib-full.js (DynarchLIB)251939 (0:02.55)72535249911 (0:09.05)72696258869 (0:01.94)76584
    \n\n\n
    \n\n
    \n\n
    \n

    1.6 Bugs?

    \n
    \n\n\n

    \nUnfortunately, for the time being there is no automated test suite. But I\nran the compressor manually on non-trivial code, and then I tested that the\ngenerated code works as expected. A few hundred times.\n

    \n

    \nDynarchLIB was started in times when there was no good JS minifier.\nTherefore I was quite religious about trying to write short code manually,\nand as such DL contains a lot of syntactic hacks1 such as “foo == bar ? a\n= 10 : b = 20”, though the more readable version would clearly be to use\n“if/else”.\n

    \n

    \nSince the parser/compressor runs fine on DL and jQuery, I'm quite confident\nthat it's solid enough for production use. If you can identify any bugs,\nI'd love to hear about them (use the Google Group or email me directly).\n

    \n
    \n\n
    \n\n
    \n

    1.7 Links

    \n
    \n\n\n\n\n\n
    \n\n
    \n\n
    \n

    1.8 License

    \n
    \n\n\n

    \nUglifyJS is released under the BSD license:\n

    \n\n\n\n
    Copyright 2010 (c) Mihai Bazon <mihai.bazon@gmail.com>\nBased on parse-js (http://marijn.haverbeke.nl/parse-js/).\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions\nare met:\n\n    * Redistributions of source code must retain the above\n      copyright notice, this list of conditions and the following\n      disclaimer.\n\n    * Redistributions in binary form must reproduce the above\n      copyright notice, this list of conditions and the following\n      disclaimer in the documentation and/or other materials\n      provided with the distribution.\n\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY\nEXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\nPURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE\nLIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\nOR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\nPROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\nPROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\nTHEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR\nTORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF\nTHE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\nSUCH DAMAGE.\n
    \n\n\n
    \n

    Footnotes:

    \n
    \n

    1 I even reported a few bugs and suggested some fixes in the original\n parse-js library, and Marijn pushed fixes literally in minutes.\n

    \n
    \n
    \n\n
    \n
    \n
    \n\n
    \n

    Date: 2011-12-09 14:59:08 EET

    \n

    Author: Mihai Bazon

    \n

    Org version 7.7 with Emacs version 23

    \nValidate XHTML 1.0\n\n
    \n\n\n", - "readmeFilename": "README.html", - "bugs": { - "url": "https://github.com/mishoo/UglifyJS/issues" - }, - "homepage": "https://github.com/mishoo/UglifyJS", - "_id": "uglify-js@1.2.5", - "_from": "uglify-js@1.2.5" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json~ b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json~ deleted file mode 100644 index e4cb23d5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/package.json~ +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name" : "uglify-js", - - "description" : "JavaScript parser and compressor/beautifier toolkit", - - "author" : { - "name" : "Mihai Bazon", - "email" : "mihai.bazon@gmail.com", - "url" : "http://mihai.bazon.net/blog" - }, - - "version" : "1.2.3", - - "main" : "./uglify-js.js", - - "bin" : { - "uglifyjs" : "./bin/uglifyjs" - }, - - "repository": { - "type": "git", - "url": "git@github.com:mishoo/UglifyJS.git" - } -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/beautify.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/beautify.js deleted file mode 100755 index f19369e3..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/beautify.js +++ /dev/null @@ -1,28 +0,0 @@ -#! /usr/bin/env node - -global.sys = require("sys"); -var fs = require("fs"); - -var jsp = require("../lib/parse-js"); -var pro = require("../lib/process"); - -var filename = process.argv[2]; -fs.readFile(filename, "utf8", function(err, text){ - try { - var ast = time_it("parse", function(){ return jsp.parse(text); }); - ast = time_it("mangle", function(){ return pro.ast_mangle(ast); }); - ast = time_it("squeeze", function(){ return pro.ast_squeeze(ast); }); - var gen = time_it("generate", function(){ return pro.gen_code(ast, false); }); - sys.puts(gen); - } catch(ex) { - sys.debug(ex.stack); - sys.debug(sys.inspect(ex)); - sys.debug(JSON.stringify(ex)); - } -}); - -function time_it(name, cont) { - var t1 = new Date().getTime(); - try { return cont(); } - finally { sys.debug("// " + name + ": " + ((new Date().getTime() - t1) / 1000).toFixed(3) + " sec."); } -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/testparser.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/testparser.js deleted file mode 100755 index 02c19a9c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/testparser.js +++ /dev/null @@ -1,403 +0,0 @@ -#! /usr/bin/env node - -var parseJS = require("../lib/parse-js"); -var sys = require("sys"); - -// write debug in a very straightforward manner -var debug = function(){ - sys.log(Array.prototype.slice.call(arguments).join(', ')); -}; - -ParserTestSuite(function(i, input, desc){ - try { - parseJS.parse(input); - debug("ok " + i + ": " + desc); - } catch(e){ - debug("FAIL " + i + " " + desc + " (" + e + ")"); - } -}); - -function ParserTestSuite(callback){ - var inps = [ - ["var abc;", "Regular variable statement w/o assignment"], - ["var abc = 5;", "Regular variable statement with assignment"], - ["/* */;", "Multiline comment"], - ['/** **/;', 'Double star multiline comment'], - ["var f = function(){;};", "Function expression in var assignment"], - ['hi; // moo\n;', 'single line comment'], - ['var varwithfunction;', 'Dont match keywords as substrings'], // difference between `var withsomevar` and `"str"` (local search and lits) - ['a + b;', 'addition'], - ["'a';", 'single string literal'], - ["'a\\n';", 'single string literal with escaped return'], - ['"a";', 'double string literal'], - ['"a\\n";', 'double string literal with escaped return'], - ['"var";', 'string is a keyword'], - ['"variable";', 'string starts with a keyword'], - ['"somevariable";', 'string contains a keyword'], - ['"somevar";', 'string ends with a keyword'], - ['500;', 'int literal'], - ['500.;', 'float literal w/o decimals'], - ['500.432;', 'float literal with decimals'], - ['.432432;', 'float literal w/o int'], - ['(a,b,c);', 'parens and comma'], - ['[1,2,abc];', 'array literal'], - ['var o = {a:1};', 'object literal unquoted key'], - ['var o = {"b":2};', 'object literal quoted key'], // opening curly may not be at the start of a statement... - ['var o = {c:c};', 'object literal keyname is identifier'], - ['var o = {a:1,"b":2,c:c};', 'object literal combinations'], - ['var x;\nvar y;', 'two lines'], - ['var x;\nfunction n(){; }', 'function def'], - ['var x;\nfunction n(abc){; }', 'function def with arg'], - ['var x;\nfunction n(abc, def){ ;}', 'function def with args'], - ['function n(){ "hello"; }', 'function def with body'], - ['/a/;', 'regex literal'], - ['/a/b;', 'regex literal with flag'], - ['/a/ / /b/;', 'regex div regex'], - ['a/b/c;', 'triple division looks like regex'], - ['+function(){/regex/;};', 'regex at start of function body'], - // http://code.google.com/p/es-lab/source/browse/trunk/tests/parser/parsertests.js?r=86 - // http://code.google.com/p/es-lab/source/browse/trunk/tests/parser/parsertests.js?r=430 - - // first tests for the lexer, should also parse as program (when you append a semi) - - // comments - ['//foo!@#^&$1234\nbar;', 'single line comment'], - ['/* abcd!@#@$* { } && null*/;', 'single line multi line comment'], - ['/*foo\nbar*/;','multi line comment'], - ['/*x*x*/;','multi line comment with *'], - ['/**/;','empty comment'], - // identifiers - ["x;",'1 identifier'], - ["_x;",'2 identifier'], - ["xyz;",'3 identifier'], - ["$x;",'4 identifier'], - ["x$;",'5 identifier'], - ["_;",'6 identifier'], - ["x5;",'7 identifier'], - ["x_y;",'8 identifier'], - ["x+5;",'9 identifier'], - ["xyz123;",'10 identifier'], - ["x1y1z1;",'11 identifier'], - ["foo\\u00D8bar;",'12 identifier unicode escape'], - //["foo�bar;",'13 identifier unicode embedded (might fail)'], - // numbers - ["5;", '1 number'], - ["5.5;", '2 number'], - ["0;", '3 number'], - ["0.0;", '4 number'], - ["0.001;", '5 number'], - ["1.e2;", '6 number'], - ["1.e-2;", '7 number'], - ["1.E2;", '8 number'], - ["1.E-2;", '9 number'], - [".5;", '10 number'], - [".5e3;", '11 number'], - [".5e-3;", '12 number'], - ["0.5e3;", '13 number'], - ["55;", '14 number'], - ["123;", '15 number'], - ["55.55;", '16 number'], - ["55.55e10;", '17 number'], - ["123.456;", '18 number'], - ["1+e;", '20 number'], - ["0x01;", '22 number'], - ["0XCAFE;", '23 number'], - ["0x12345678;", '24 number'], - ["0x1234ABCD;", '25 number'], - ["0x0001;", '26 number'], - // strings - ["\"foo\";", '1 string'], - ["\'foo\';", '2 string'], - ["\"x\";", '3 string'], - ["\'\';", '4 string'], - ["\"foo\\tbar\";", '5 string'], - ["\"!@#$%^&*()_+{}[]\";", '6 string'], - ["\"/*test*/\";", '7 string'], - ["\"//test\";", '8 string'], - ["\"\\\\\";", '9 string'], - ["\"\\u0001\";", '10 string'], - ["\"\\uFEFF\";", '11 string'], - ["\"\\u10002\";", '12 string'], - ["\"\\x55\";", '13 string'], - ["\"\\x55a\";", '14 string'], - ["\"a\\\\nb\";", '15 string'], - ['";"', '16 string: semi in a string'], - ['"a\\\nb";', '17 string: line terminator escape'], - // literals - ["null;", "null"], - ["true;", "true"], - ["false;", "false"], - // regex - ["/a/;", "1 regex"], - ["/abc/;", "2 regex"], - ["/abc[a-z]*def/g;", "3 regex"], - ["/\\b/;", "4 regex"], - ["/[a-zA-Z]/;", "5 regex"], - - // program tests (for as far as they havent been covered above) - - // regexp - ["/foo(.*)/g;", "another regexp"], - // arrays - ["[];", "1 array"], - ["[ ];", "2 array"], - ["[1];", "3 array"], - ["[1,2];", "4 array"], - ["[1,2,,];", "5 array"], - ["[1,2,3];", "6 array"], - ["[1,2,3,,,];", "7 array"], - // objects - ["{};", "1 object"], - ["({x:5});", "2 object"], - ["({x:5,y:6});", "3 object"], - ["({x:5,});", "4 object"], - ["({if:5});", "5 object"], - ["({ get x() {42;} });", "6 object"], - ["({ set y(a) {1;} });", "7 object"], - // member expression - ["o.m;", "1 member expression"], - ["o['m'];", "2 member expression"], - ["o['n']['m'];", "3 member expression"], - ["o.n.m;", "4 member expression"], - ["o.if;", "5 member expression"], - // call and invoke expressions - ["f();", "1 call/invoke expression"], - ["f(x);", "2 call/invoke expression"], - ["f(x,y);", "3 call/invoke expression"], - ["o.m();", "4 call/invoke expression"], - ["o['m'];", "5 call/invoke expression"], - ["o.m(x);", "6 call/invoke expression"], - ["o['m'](x);", "7 call/invoke expression"], - ["o.m(x,y);", "8 call/invoke expression"], - ["o['m'](x,y);", "9 call/invoke expression"], - ["f(x)(y);", "10 call/invoke expression"], - ["f().x;", "11 call/invoke expression"], - - // eval - ["eval('x');", "1 eval"], - ["(eval)('x');", "2 eval"], - ["(1,eval)('x');", "3 eval"], - ["eval(x,y);", "4 eval"], - // new expression - ["new f();", "1 new expression"], - ["new o;", "2 new expression"], - ["new o.m;", "3 new expression"], - ["new o.m(x);", "4 new expression"], - ["new o.m(x,y);", "5 new expression"], - // prefix/postfix - ["++x;", "1 pre/postfix"], - ["x++;", "2 pre/postfix"], - ["--x;", "3 pre/postfix"], - ["x--;", "4 pre/postfix"], - ["x ++;", "5 pre/postfix"], - ["x /* comment */ ++;", "6 pre/postfix"], - ["++ /* comment */ x;", "7 pre/postfix"], - // unary operators - ["delete x;", "1 unary operator"], - ["void x;", "2 unary operator"], - ["+ x;", "3 unary operator"], - ["-x;", "4 unary operator"], - ["~x;", "5 unary operator"], - ["!x;", "6 unary operator"], - // meh - ["new Date++;", "new date ++"], - ["+x++;", " + x ++"], - // expression expressions - ["1 * 2;", "1 expression expressions"], - ["1 / 2;", "2 expression expressions"], - ["1 % 2;", "3 expression expressions"], - ["1 + 2;", "4 expression expressions"], - ["1 - 2;", "5 expression expressions"], - ["1 << 2;", "6 expression expressions"], - ["1 >>> 2;", "7 expression expressions"], - ["1 >> 2;", "8 expression expressions"], - ["1 * 2 + 3;", "9 expression expressions"], - ["(1+2)*3;", "10 expression expressions"], - ["1*(2+3);", "11 expression expressions"], - ["xy;", "13 expression expressions"], - ["x<=y;", "14 expression expressions"], - ["x>=y;", "15 expression expressions"], - ["x instanceof y;", "16 expression expressions"], - ["x in y;", "17 expression expressions"], - ["x&y;", "18 expression expressions"], - ["x^y;", "19 expression expressions"], - ["x|y;", "20 expression expressions"], - ["x+y>>= y;", "1 assignment"], - ["x <<= y;", "2 assignment"], - ["x = y;", "3 assignment"], - ["x += y;", "4 assignment"], - ["x /= y;", "5 assignment"], - // comma - ["x, y;", "comma"], - // block - ["{};", "1 block"], - ["{x;};", "2 block"], - ["{x;y;};", "3 block"], - // vars - ["var x;", "1 var"], - ["var x,y;", "2 var"], - ["var x=1,y=2;", "3 var"], - ["var x,y=2;", "4 var"], - // empty - [";", "1 empty"], - ["\n;", "2 empty"], - // expression statement - ["x;", "1 expression statement"], - ["5;", "2 expression statement"], - ["1+2;", "3 expression statement"], - // if - ["if (c) x; else y;", "1 if statement"], - ["if (c) x;", "2 if statement"], - ["if (c) {} else {};", "3 if statement"], - ["if (c1) if (c2) s1; else s2;", "4 if statement"], - // while - ["do s; while (e);", "1 while statement"], - ["do { s; } while (e);", "2 while statement"], - ["while (e) s;", "3 while statement"], - ["while (e) { s; };", "4 while statement"], - // for - ["for (;;) ;", "1 for statement"], - ["for (;c;x++) x;", "2 for statement"], - ["for (i;i> 1; -var c = 8 >>> 1; \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue34.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue34.js deleted file mode 100644 index 022f7a31..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue34.js +++ /dev/null @@ -1,3 +0,0 @@ -var a = {}; -a["this"] = 1; -a["that"] = 2; \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue4.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue4.js deleted file mode 100644 index 0b761037..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue4.js +++ /dev/null @@ -1,3 +0,0 @@ -var a = 2e3; -var b = 2e-3; -var c = 2e-5; \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue48.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue48.js deleted file mode 100644 index 031e85b3..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue48.js +++ /dev/null @@ -1 +0,0 @@ -var s, i; s = ''; i = 0; \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue50.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue50.js deleted file mode 100644 index 060f9df8..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue50.js +++ /dev/null @@ -1,9 +0,0 @@ -function bar(a) { - try { - foo(); - } catch(e) { - alert("Exception caught (foo not defined)"); - } - alert(a); // 10 in FF, "[object Error]" in IE -} -bar(10); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue53.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue53.js deleted file mode 100644 index 4f8b32f1..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue53.js +++ /dev/null @@ -1 +0,0 @@ -x = (y, z) diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue54.1.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue54.1.js deleted file mode 100644 index 967052e8..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue54.1.js +++ /dev/null @@ -1,3 +0,0 @@ -foo.toString(); -a.toString(16); -b.toString.call(c); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue68.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue68.js deleted file mode 100644 index 14054d01..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue68.js +++ /dev/null @@ -1,5 +0,0 @@ -function f() { - if (a) return; - g(); - function g(){} -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue69.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue69.js deleted file mode 100644 index d25ecd67..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue69.js +++ /dev/null @@ -1 +0,0 @@ -[(a,b)] diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue9.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue9.js deleted file mode 100644 index 61588614..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/issue9.js +++ /dev/null @@ -1,4 +0,0 @@ -var a = { - a: 1, - b: 2, // <-- trailing comma -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/mangle.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/mangle.js deleted file mode 100644 index c271a26d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/mangle.js +++ /dev/null @@ -1,5 +0,0 @@ -(function() { - var x = function fun(a, fun, b) { - return fun; - }; -}()); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js deleted file mode 100644 index a675b1c5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/null_string.js +++ /dev/null @@ -1 +0,0 @@ -var nullString = "\0" \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/strict-equals.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/strict-equals.js deleted file mode 100644 index b631f4c3..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/strict-equals.js +++ /dev/null @@ -1,3 +0,0 @@ -typeof a === 'string' -b + "" !== c + "" -d < e === f < g diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/var.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/var.js deleted file mode 100644 index 609a35d2..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/var.js +++ /dev/null @@ -1,3 +0,0 @@ -// var declarations after each other should be combined -var a = 1; -var b = 2; \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/whitespace.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/whitespace.js deleted file mode 100644 index 6a15c464..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/whitespace.js +++ /dev/null @@ -1,21 +0,0 @@ -function id(a) { - // Form-Feed - // Vertical Tab - // No-Break Space - ᠎// Mongolian Vowel Separator -  // En quad -  // Em quad -  // En space -  // Em space -  // Three-Per-Em Space -  // Four-Per-Em Space -  // Six-Per-Em Space -  // Figure Space -  // Punctuation Space -  // Thin Space -  // Hair Space -  // Narrow No-Break Space -  // Medium Mathematical Space -  // Ideographic Space - return a; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/with.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/with.js deleted file mode 100644 index de266ed5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/compress/test/with.js +++ /dev/null @@ -1,2 +0,0 @@ -with({}) { -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/scripts.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/scripts.js deleted file mode 100644 index 5d334ff7..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/test/unit/scripts.js +++ /dev/null @@ -1,55 +0,0 @@ -var fs = require('fs'), - uglify = require('../../uglify-js'), - jsp = uglify.parser, - nodeunit = require('nodeunit'), - path = require('path'), - pro = uglify.uglify; - -var Script = process.binding('evals').Script; - -var scriptsPath = __dirname; - -function compress(code) { - var ast = jsp.parse(code); - ast = pro.ast_mangle(ast); - ast = pro.ast_squeeze(ast, { no_warnings: true }); - ast = pro.ast_squeeze_more(ast); - return pro.gen_code(ast); -}; - -var testDir = path.join(scriptsPath, "compress", "test"); -var expectedDir = path.join(scriptsPath, "compress", "expected"); - -function getTester(script) { - return function(test) { - var testPath = path.join(testDir, script); - var expectedPath = path.join(expectedDir, script); - var content = fs.readFileSync(testPath, 'utf-8'); - var outputCompress = compress(content); - - // Check if the noncompressdata is larger or same size as the compressed data - test.ok(content.length >= outputCompress.length); - - // Check that a recompress gives the same result - var outputReCompress = compress(content); - test.equal(outputCompress, outputReCompress); - - // Check if the compressed output is what is expected - var expected = fs.readFileSync(expectedPath, 'utf-8'); - test.equal(outputCompress, expected.replace(/(\r?\n)+$/, "")); - - test.done(); - }; -}; - -var tests = {}; - -var scripts = fs.readdirSync(testDir); -for (var i in scripts) { - var script = scripts[i]; - if (/\.js$/.test(script)) { - tests[script] = getTester(script); - } -} - -module.exports = nodeunit.testCase(tests); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/269.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/269.js deleted file mode 100644 index 256ad1c9..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/269.js +++ /dev/null @@ -1,13 +0,0 @@ -var jsp = require("uglify-js").parser; -var pro = require("uglify-js").uglify; - -var test_code = "var JSON;JSON||(JSON={});"; - -var ast = jsp.parse(test_code, false, false); -var nonembed_token_code = pro.gen_code(ast); -ast = jsp.parse(test_code, false, true); -var embed_token_code = pro.gen_code(ast); - -console.log("original: " + test_code); -console.log("no token: " + nonembed_token_code); -console.log(" token: " + embed_token_code); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js deleted file mode 100644 index 2c6257eb..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/uglify-js/tmp/app.js +++ /dev/null @@ -1,22315 +0,0 @@ -/* Modernizr 2.0.6 (Custom Build) | MIT & BSD - * Build: http://www.modernizr.com/download/#-iepp - */ -;window.Modernizr=function(a,b,c){function w(a,b){return!!~(""+a).indexOf(b)}function v(a,b){return typeof a===b}function u(a,b){return t(prefixes.join(a+";")+(b||""))}function t(a){j.cssText=a}var d="2.0.6",e={},f=b.documentElement,g=b.head||b.getElementsByTagName("head")[0],h="modernizr",i=b.createElement(h),j=i.style,k,l=Object.prototype.toString,m={},n={},o={},p=[],q,r={}.hasOwnProperty,s;!v(r,c)&&!v(r.call,c)?s=function(a,b){return r.call(a,b)}:s=function(a,b){return b in a&&v(a.constructor.prototype[b],c)};for(var x in m)s(m,x)&&(q=x.toLowerCase(),e[q]=m[x](),p.push((e[q]?"":"no-")+q));t(""),i=k=null,a.attachEvent&&function(){var a=b.createElement("div");a.innerHTML="";return a.childNodes.length!==1}()&&function(a,b){function s(a){var b=-1;while(++b to avoid XSS via location.hash (#9521) - quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/, - - // Check if a string has a non-whitespace character in it - rnotwhite = /\S/, - - // Used for trimming whitespace - trimLeft = /^\s+/, - trimRight = /\s+$/, - - // Check for digits - rdigit = /\d/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g, - rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - - // Useragent RegExp - rwebkit = /(webkit)[ \/]([\w.]+)/, - ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/, - rmsie = /(msie) ([\w.]+)/, - rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/, - - // Matches dashed string for camelizing - rdashAlpha = /-([a-z]|[0-9])/ig, - rmsPrefix = /^-ms-/, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return ( letter + "" ).toUpperCase(); - }, - - // Keep a UserAgent string for use with jQuery.browser - userAgent = navigator.userAgent, - - // For matching the engine and version of the browser - browserMatch, - - // The deferred used on DOM ready - readyList, - - // The ready event handler - DOMContentLoaded, - - // Save a reference to some core methods - toString = Object.prototype.toString, - hasOwn = Object.prototype.hasOwnProperty, - push = Array.prototype.push, - slice = Array.prototype.slice, - trim = String.prototype.trim, - indexOf = Array.prototype.indexOf, - - // [[Class]] -> type pairs - class2type = {}; - -jQuery.fn = jQuery.prototype = { - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem, ret, doc; - - // Handle $(""), $(null), or $(undefined) - if ( !selector ) { - return this; - } - - // Handle $(DOMElement) - if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - } - - // The body element only exists once, optimize finding it - if ( selector === "body" && !context && document.body ) { - this.context = document; - this[0] = document.body; - this.selector = selector; - this.length = 1; - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - // Are we dealing with HTML string or an ID? - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = quickExpr.exec( selector ); - } - - // Verify a match, and that no context was specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - doc = (context ? context.ownerDocument || context : document); - - // If a single string is passed in and it's a single tag - // just do a createElement and skip the rest - ret = rsingleTag.exec( selector ); - - if ( ret ) { - if ( jQuery.isPlainObject( context ) ) { - selector = [ document.createElement( ret[1] ) ]; - jQuery.fn.attr.call( selector, context, true ); - - } else { - selector = [ doc.createElement( ret[1] ) ]; - } - - } else { - ret = jQuery.buildFragment( [ match[1] ], [ doc ] ); - selector = (ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment).childNodes; - } - - return jQuery.merge( this, selector ); - - // HANDLE: $("#id") - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return (context || rootjQuery).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if (selector.selector !== undefined) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The current version of jQuery being used - jquery: "1.6.3", - - // The default length of a jQuery object is 0 - length: 0, - - // The number of elements contained in the matched element set - size: function() { - return this.length; - }, - - toArray: function() { - return slice.call( this, 0 ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems, name, selector ) { - // Build a new jQuery matched element set - var ret = this.constructor(); - - if ( jQuery.isArray( elems ) ) { - push.apply( ret, elems ); - - } else { - jQuery.merge( ret, elems ); - } - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - - ret.context = this.context; - - if ( name === "find" ) { - ret.selector = this.selector + (this.selector ? " " : "") + selector; - } else if ( name ) { - ret.selector = this.selector + "." + name + "(" + selector + ")"; - } - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Attach the listeners - jQuery.bindReady(); - - // Add the callback - readyList.done( fn ); - - return this; - }, - - eq: function( i ) { - return i === -1 ? - this.slice( i ) : - this.slice( i, +i + 1 ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ), - "slice", slice.call(arguments).join(",") ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - // Either a released hold or an DOMready/load event and not yet ready - if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready, 1 ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger( "ready" ).unbind( "ready" ); - } - } - }, - - bindReady: function() { - if ( readyList ) { - return; - } - - readyList = jQuery._Deferred(); - - // Catch cases where $(document).ready() is called after the - // browser event has already occurred. - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - return setTimeout( jQuery.ready, 1 ); - } - - // Mozilla, Opera and webkit nightlies currently support this event - if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", jQuery.ready, false ); - - // If IE event model is used - } else if ( document.attachEvent ) { - // ensure firing before onload, - // maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", DOMContentLoaded ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", jQuery.ready ); - - // If IE and not a frame - // continually check to see if the document is ready - var toplevel = false; - - try { - toplevel = window.frameElement == null; - } catch(e) {} - - if ( document.documentElement.doScroll && toplevel ) { - doScrollCheck(); - } - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - // A crude way of determining if an object is a window - isWindow: function( obj ) { - return obj && typeof obj === "object" && "setInterval" in obj; - }, - - isNaN: function( obj ) { - return obj == null || !rdigit.test( obj ) || isNaN( obj ); - }, - - type: function( obj ) { - return obj == null ? - String( obj ) : - class2type[ toString.call(obj) ] || "object"; - }, - - isPlainObject: function( obj ) { - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !hasOwn.call(obj, "constructor") && - !hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - - var key; - for ( key in obj ) {} - - return key === undefined || hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - for ( var name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw msg; - }, - - parseJSON: function( data ) { - if ( typeof data !== "string" || !data ) { - return null; - } - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return (new Function( "return " + data ))(); - - } - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && rnotwhite.test( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toUpperCase() === name.toUpperCase(); - }, - - // args is for internal usage only - each: function( object, callback, args ) { - var name, i = 0, - length = object.length, - isObj = length === undefined || jQuery.isFunction( object ); - - if ( args ) { - if ( isObj ) { - for ( name in object ) { - if ( callback.apply( object[ name ], args ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.apply( object[ i++ ], args ) === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isObj ) { - for ( name in object ) { - if ( callback.call( object[ name ], name, object[ name ] ) === false ) { - break; - } - } - } else { - for ( ; i < length; ) { - if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) { - break; - } - } - } - } - - return object; - }, - - // Use native String.trim function wherever possible - trim: trim ? - function( text ) { - return text == null ? - "" : - trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - text.toString().replace( trimLeft, "" ).replace( trimRight, "" ); - }, - - // results is for internal usage only - makeArray: function( array, results ) { - var ret = results || []; - - if ( array != null ) { - // The window, strings (and functions) also have 'length' - // The extra typeof function check is to prevent crashes - // in Safari 2 (See: #3039) - // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930 - var type = jQuery.type( array ); - - if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) { - push.call( ret, array ); - } else { - jQuery.merge( ret, array ); - } - } - - return ret; - }, - - inArray: function( elem, array ) { - if ( !array ) { - return -1; - } - - if ( indexOf ) { - return indexOf.call( array, elem ); - } - - for ( var i = 0, length = array.length; i < length; i++ ) { - if ( array[ i ] === elem ) { - return i; - } - } - - return -1; - }, - - merge: function( first, second ) { - var i = first.length, - j = 0; - - if ( typeof second.length === "number" ) { - for ( var l = second.length; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var ret = [], retVal; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( var i = 0, length = elems.length; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, key, ret = [], - i = 0, - length = elems.length, - // jquery objects are treated as arrays - isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( key in elems ) { - value = callback( elems[ key ], key, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return ret.concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - if ( typeof context === "string" ) { - var tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - var args = slice.call( arguments, 2 ), - proxy = function() { - return fn.apply( context, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || proxy.guid || jQuery.guid++; - - return proxy; - }, - - // Mutifunctional method to get and set values to a collection - // The value/s can optionally be executed if it's a function - access: function( elems, key, value, exec, fn, pass ) { - var length = elems.length; - - // Setting many attributes - if ( typeof key === "object" ) { - for ( var k in key ) { - jQuery.access( elems, k, key[k], exec, fn, value ); - } - return elems; - } - - // Setting one attribute - if ( value !== undefined ) { - // Optionally, function values get executed if exec is true - exec = !pass && exec && jQuery.isFunction(value); - - for ( var i = 0; i < length; i++ ) { - fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass ); - } - - return elems; - } - - // Getting an attribute - return length ? fn( elems[0], key ) : undefined; - }, - - now: function() { - return (new Date()).getTime(); - }, - - // Use of jQuery.browser is frowned upon. - // More details: http://docs.jquery.com/Utilities/jQuery.browser - uaMatch: function( ua ) { - ua = ua.toLowerCase(); - - var match = rwebkit.exec( ua ) || - ropera.exec( ua ) || - rmsie.exec( ua ) || - ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) || - []; - - return { browser: match[1] || "", version: match[2] || "0" }; - }, - - sub: function() { - function jQuerySub( selector, context ) { - return new jQuerySub.fn.init( selector, context ); - } - jQuery.extend( true, jQuerySub, this ); - jQuerySub.superclass = this; - jQuerySub.fn = jQuerySub.prototype = this(); - jQuerySub.fn.constructor = jQuerySub; - jQuerySub.sub = this.sub; - jQuerySub.fn.init = function init( selector, context ) { - if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) { - context = jQuerySub( context ); - } - - return jQuery.fn.init.call( this, selector, context, rootjQuerySub ); - }; - jQuerySub.fn.init.prototype = jQuerySub.fn; - var rootjQuerySub = jQuerySub(document); - return jQuerySub; - }, - - browser: {} -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -browserMatch = jQuery.uaMatch( userAgent ); -if ( browserMatch.browser ) { - jQuery.browser[ browserMatch.browser ] = true; - jQuery.browser.version = browserMatch.version; -} - -// Deprecated, use jQuery.browser.webkit instead -if ( jQuery.browser.webkit ) { - jQuery.browser.safari = true; -} - -// IE doesn't match non-breaking spaces with \s -if ( rnotwhite.test( "\xA0" ) ) { - trimLeft = /^[\s\xA0]+/; - trimRight = /[\s\xA0]+$/; -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); - -// Cleanup functions for the document ready method -if ( document.addEventListener ) { - DOMContentLoaded = function() { - document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false ); - jQuery.ready(); - }; - -} else if ( document.attachEvent ) { - DOMContentLoaded = function() { - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( document.readyState === "complete" ) { - document.detachEvent( "onreadystatechange", DOMContentLoaded ); - jQuery.ready(); - } - }; -} - -// The DOM ready check for Internet Explorer -function doScrollCheck() { - if ( jQuery.isReady ) { - return; - } - - try { - // If IE is used, use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - document.documentElement.doScroll("left"); - } catch(e) { - setTimeout( doScrollCheck, 1 ); - return; - } - - // and execute any waiting functions - jQuery.ready(); -} - -return jQuery; - -})(); - - -var // Promise methods - promiseMethods = "done fail isResolved isRejected promise then always pipe".split( " " ), - // Static reference to slice - sliceDeferred = [].slice; - -jQuery.extend({ - // Create a simple deferred (one callbacks list) - _Deferred: function() { - var // callbacks list - callbacks = [], - // stored [ context , args ] - fired, - // to avoid firing when already doing so - firing, - // flag to know if the deferred has been cancelled - cancelled, - // the deferred itself - deferred = { - - // done( f1, f2, ...) - done: function() { - if ( !cancelled ) { - var args = arguments, - i, - length, - elem, - type, - _fired; - if ( fired ) { - _fired = fired; - fired = 0; - } - for ( i = 0, length = args.length; i < length; i++ ) { - elem = args[ i ]; - type = jQuery.type( elem ); - if ( type === "array" ) { - deferred.done.apply( deferred, elem ); - } else if ( type === "function" ) { - callbacks.push( elem ); - } - } - if ( _fired ) { - deferred.resolveWith( _fired[ 0 ], _fired[ 1 ] ); - } - } - return this; - }, - - // resolve with given context and args - resolveWith: function( context, args ) { - if ( !cancelled && !fired && !firing ) { - // make sure args are available (#8421) - args = args || []; - firing = 1; - try { - while( callbacks[ 0 ] ) { - callbacks.shift().apply( context, args ); - } - } - finally { - fired = [ context, args ]; - firing = 0; - } - } - return this; - }, - - // resolve with this as context and given arguments - resolve: function() { - deferred.resolveWith( this, arguments ); - return this; - }, - - // Has this deferred been resolved? - isResolved: function() { - return !!( firing || fired ); - }, - - // Cancel - cancel: function() { - cancelled = 1; - callbacks = []; - return this; - } - }; - - return deferred; - }, - - // Full fledged deferred (two callbacks list) - Deferred: function( func ) { - var deferred = jQuery._Deferred(), - failDeferred = jQuery._Deferred(), - promise; - // Add errorDeferred methods, then and promise - jQuery.extend( deferred, { - then: function( doneCallbacks, failCallbacks ) { - deferred.done( doneCallbacks ).fail( failCallbacks ); - return this; - }, - always: function() { - return deferred.done.apply( deferred, arguments ).fail.apply( this, arguments ); - }, - fail: failDeferred.done, - rejectWith: failDeferred.resolveWith, - reject: failDeferred.resolve, - isRejected: failDeferred.isResolved, - pipe: function( fnDone, fnFail ) { - return jQuery.Deferred(function( newDefer ) { - jQuery.each( { - done: [ fnDone, "resolve" ], - fail: [ fnFail, "reject" ] - }, function( handler, data ) { - var fn = data[ 0 ], - action = data[ 1 ], - returned; - if ( jQuery.isFunction( fn ) ) { - deferred[ handler ](function() { - returned = fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise().then( newDefer.resolve, newDefer.reject ); - } else { - newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] ); - } - }); - } else { - deferred[ handler ]( newDefer[ action ] ); - } - }); - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - if ( obj == null ) { - if ( promise ) { - return promise; - } - promise = obj = {}; - } - var i = promiseMethods.length; - while( i-- ) { - obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ]; - } - return obj; - } - }); - // Make sure only one callback list will be used - deferred.done( failDeferred.cancel ).fail( deferred.cancel ); - // Unexpose cancel - delete deferred.cancel; - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - return deferred; - }, - - // Deferred helper - when: function( firstParam ) { - var args = arguments, - i = 0, - length = args.length, - count = length, - deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ? - firstParam : - jQuery.Deferred(); - function resolveFunc( i ) { - return function( value ) { - args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value; - if ( !( --count ) ) { - // Strange bug in FF4: - // Values changed onto the arguments object sometimes end up as undefined values - // outside the $.when method. Cloning the object into a fresh array solves the issue - deferred.resolveWith( deferred, sliceDeferred.call( args, 0 ) ); - } - }; - } - if ( length > 1 ) { - for( ; i < length; i++ ) { - if ( args[ i ] && jQuery.isFunction( args[ i ].promise ) ) { - args[ i ].promise().then( resolveFunc(i), deferred.reject ); - } else { - --count; - } - } - if ( !count ) { - deferred.resolveWith( deferred, args ); - } - } else if ( deferred !== firstParam ) { - deferred.resolveWith( deferred, length ? [ firstParam ] : [] ); - } - return deferred.promise(); - } -}); - - - -jQuery.support = (function() { - - var div = document.createElement( "div" ), - documentElement = document.documentElement, - all, - a, - select, - opt, - input, - marginDiv, - support, - fragment, - body, - testElementParent, - testElement, - testElementStyle, - tds, - events, - eventName, - i, - isSupported; - - // Preliminary tests - div.setAttribute("className", "t"); - div.innerHTML = "
    a"; - - - all = div.getElementsByTagName( "*" ); - a = div.getElementsByTagName( "a" )[ 0 ]; - - // Can't get basic test support - if ( !all || !all.length || !a ) { - return {}; - } - - // First batch of supports tests - select = document.createElement( "select" ); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName( "input" )[ 0 ]; - - support = { - // IE strips leading whitespace when .innerHTML is used - leadingWhitespace: ( div.firstChild.nodeType === 3 ), - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - tbody: !div.getElementsByTagName( "tbody" ).length, - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - htmlSerialize: !!div.getElementsByTagName( "link" ).length, - - // Get the style information from getAttribute - // (IE uses .cssText instead) - style: /top/.test( a.getAttribute("style") ), - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - hrefNormalized: ( a.getAttribute( "href" ) === "/a" ), - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - opacity: /^0.55$/.test( a.style.opacity ), - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - cssFloat: !!a.style.cssFloat, - - // Make sure that if no value is specified for a checkbox - // that it defaults to "on". - // (WebKit defaults to "" instead) - checkOn: ( input.value === "on" ), - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - optSelected: opt.selected, - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - getSetAttribute: div.className !== "t", - - // Will be defined later - submitBubbles: true, - changeBubbles: true, - focusinBubbles: false, - deleteExpando: true, - noCloneEvent: true, - inlineBlockNeedsLayout: false, - shrinkWrapBlocks: false, - reliableMarginRight: true - }; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Test to see if it's possible to delete an expando from an element - // Fails in Internet Explorer - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - if ( !div.addEventListener && div.attachEvent && div.fireEvent ) { - div.attachEvent( "onclick", function() { - // Cloning a node shouldn't copy over any - // bound event handlers (IE does this) - support.noCloneEvent = false; - }); - div.cloneNode( true ).fireEvent( "onclick" ); - } - - // Check if a radio maintains it's value - // after being appended to the DOM - input = document.createElement("input"); - input.value = "t"; - input.setAttribute("type", "radio"); - support.radioValue = input.value === "t"; - - input.setAttribute("checked", "checked"); - div.appendChild( input ); - fragment = document.createDocumentFragment(); - fragment.appendChild( div.firstChild ); - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - div.innerHTML = ""; - - // Figure out if the W3C box model works as expected - div.style.width = div.style.paddingLeft = "1px"; - - body = document.getElementsByTagName( "body" )[ 0 ]; - // We use our own, invisible, body unless the body is already present - // in which case we use a div (#9239) - testElement = document.createElement( body ? "div" : "body" ); - testElementStyle = { - visibility: "hidden", - width: 0, - height: 0, - border: 0, - margin: 0, - background: "none" - }; - if ( body ) { - jQuery.extend( testElementStyle, { - position: "absolute", - left: "-1000px", - top: "-1000px" - }); - } - for ( i in testElementStyle ) { - testElement.style[ i ] = testElementStyle[ i ]; - } - testElement.appendChild( div ); - testElementParent = body || documentElement; - testElementParent.insertBefore( testElement, testElementParent.firstChild ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - support.boxModel = div.offsetWidth === 2; - - if ( "zoom" in div.style ) { - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - // (IE < 8 does this) - div.style.display = "inline"; - div.style.zoom = 1; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 2 ); - - // Check if elements with layout shrink-wrap their children - // (IE 6 does this) - div.style.display = ""; - div.innerHTML = "
    "; - support.shrinkWrapBlocks = ( div.offsetWidth !== 2 ); - } - - div.innerHTML = "
    t
    "; - tds = div.getElementsByTagName( "td" ); - - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - // (only IE 8 fails this test) - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Check if empty table cells still have offsetWidth/Height - // (IE < 8 fail this test) - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - div.innerHTML = ""; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. For more - // info see bug #3333 - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - if ( document.defaultView && document.defaultView.getComputedStyle ) { - marginDiv = document.createElement( "div" ); - marginDiv.style.width = "0"; - marginDiv.style.marginRight = "0"; - div.appendChild( marginDiv ); - support.reliableMarginRight = - ( parseInt( ( document.defaultView.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0; - } - - // Remove the body element we added - testElement.innerHTML = ""; - testElementParent.removeChild( testElement ); - - // Technique from Juriy Zaytsev - // http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/ - // We only care about the case where non-standard event systems - // are used, namely in IE. Short-circuiting here helps us to - // avoid an eval call (in setAttribute) which can cause CSP - // to go haywire. See: https://developer.mozilla.org/en/Security/CSP - if ( div.attachEvent ) { - for( i in { - submit: 1, - change: 1, - focusin: 1 - } ) { - eventName = "on" + i; - isSupported = ( eventName in div ); - if ( !isSupported ) { - div.setAttribute( eventName, "return;" ); - isSupported = ( typeof div[ eventName ] === "function" ); - } - support[ i + "Bubbles" ] = isSupported; - } - } - - // Null connected elements to avoid leaks in IE - testElement = fragment = select = opt = body = marginDiv = div = input = null; - - return support; -})(); - -// Keep track of boxModel -jQuery.boxModel = jQuery.support.boxModel; - - - - -var rbrace = /^(?:\{.*\}|\[.*\])$/, - rmultiDash = /([a-z])([A-Z])/g; - -jQuery.extend({ - cache: {}, - - // Please use with caution - uuid: 0, - - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( jQuery.fn.jquery + Math.random() ).replace( /\D/g, "" ), - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", - "applet": true - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, ret, - internalKey = jQuery.expando, - getByName = typeof name === "string", - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ jQuery.expando ] : elem[ jQuery.expando ] && jQuery.expando; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || (pvt && id && (cache[ id ] && !cache[ id ][ internalKey ]))) && getByName && data === undefined ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - elem[ jQuery.expando ] = id = ++jQuery.uuid; - } else { - id = jQuery.expando; - } - } - - if ( !cache[ id ] ) { - cache[ id ] = {}; - - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ][ internalKey ] = jQuery.extend(cache[ id ][ internalKey ], name); - } else { - cache[ id ] = jQuery.extend(cache[ id ], name); - } - } - - thisCache = cache[ id ]; - - // Internal jQuery data is stored in a separate object inside the object's data - // cache in order to avoid key collisions between internal data and user-defined - // data - if ( pvt ) { - if ( !thisCache[ internalKey ] ) { - thisCache[ internalKey ] = {}; - } - - thisCache = thisCache[ internalKey ]; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // TODO: This is a hack for 1.5 ONLY. It will be removed in 1.6. Users should - // not attempt to inspect the internal events object using jQuery.data, as this - // internal data object is undocumented and subject to change. - if ( name === "events" && !thisCache[name] ) { - return thisCache[ internalKey ] && thisCache[ internalKey ].events; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( getByName ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; - }, - - removeData: function( elem, name, pvt /* Internal Use Only */ ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, - - // Reference to internal data cache key - internalKey = jQuery.expando, - - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - - // See jQuery.data for more information - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ][ internalKey ] : cache[ id ]; - - if ( thisCache ) { - - // Support interoperable removal of hyphenated or camelcased keys - if ( !thisCache[ name ] ) { - name = jQuery.camelCase( name ); - } - - delete thisCache[ name ]; - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( !isEmptyDataObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( pvt ) { - delete cache[ id ][ internalKey ]; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject(cache[ id ]) ) { - return; - } - } - - var internalCache = cache[ id ][ internalKey ]; - - // Browsers that fail expando deletion also refuse to delete expandos on - // the window, but it will allow it on all other JS objects; other browsers - // don't care - // Ensure that `cache` is not a window object #10080 - if ( jQuery.support.deleteExpando || !cache.setInterval ) { - delete cache[ id ]; - } else { - cache[ id ] = null; - } - - // We destroyed the entire user cache at once because it's faster than - // iterating through each key, but we need to continue to persist internal - // data if it existed - if ( internalCache ) { - cache[ id ] = {}; - // TODO: This is a hack for 1.5 ONLY. Avoids exposing jQuery - // metadata on plain JS objects when the object is serialized using - // JSON.stringify - if ( !isNode ) { - cache[ id ].toJSON = jQuery.noop; - } - - cache[ id ][ internalKey ] = internalCache; - - // Otherwise, we need to eliminate the expando on the node to avoid - // false lookups in the cache for entries that no longer exist - } else if ( isNode ) { - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( jQuery.support.deleteExpando ) { - delete elem[ jQuery.expando ]; - } else if ( elem.removeAttribute ) { - elem.removeAttribute( jQuery.expando ); - } else { - elem[ jQuery.expando ] = null; - } - } - }, - - // For internal use only. - _data: function( elem, name, data ) { - return jQuery.data( elem, name, data, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - if ( elem.nodeName ) { - var match = jQuery.noData[ elem.nodeName.toLowerCase() ]; - - if ( match ) { - return !(match === true || elem.getAttribute("classid") !== match); - } - } - - return true; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var data = null; - - if ( typeof key === "undefined" ) { - if ( this.length ) { - data = jQuery.data( this[0] ); - - if ( this[0].nodeType === 1 ) { - var attr = this[0].attributes, name; - for ( var i = 0, l = attr.length; i < l; i++ ) { - name = attr[i].name; - - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.substring(5) ); - - dataAttr( this[0], name, data[ name ] ); - } - } - } - } - - return data; - - } else if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - var parts = key.split("."); - parts[1] = parts[1] ? "." + parts[1] : ""; - - if ( value === undefined ) { - data = this.triggerHandler("getData" + parts[1] + "!", [parts[0]]); - - // Try to fetch any internally stored data first - if ( data === undefined && this.length ) { - data = jQuery.data( this[0], key ); - data = dataAttr( this[0], key, data ); - } - - return data === undefined && parts[1] ? - this.data( parts[0] ) : - data; - - } else { - return this.each(function() { - var $this = jQuery( this ), - args = [ parts[0], value ]; - - $this.triggerHandler( "setData" + parts[1] + "!", args ); - jQuery.data( this, key, value ); - $this.triggerHandler( "changeData" + parts[1] + "!", args ); - }); - } - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - var name = "data-" + key.replace( rmultiDash, "$1-$2" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - !jQuery.isNaN( data ) ? parseFloat( data ) : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// TODO: This is a hack for 1.5 ONLY to allow objects with a single toJSON -// property to be considered empty objects; this property always exists in -// order to make sure JSON.stringify does not expose internal metadata -function isEmptyDataObject( obj ) { - for ( var name in obj ) { - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} - - - - -function handleQueueMarkDefer( elem, type, src ) { - var deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - defer = jQuery.data( elem, deferDataKey, undefined, true ); - if ( defer && - ( src === "queue" || !jQuery.data( elem, queueDataKey, undefined, true ) ) && - ( src === "mark" || !jQuery.data( elem, markDataKey, undefined, true ) ) ) { - // Give room for hard-coded callbacks to fire first - // and eventually mark/queue something else on the element - setTimeout( function() { - if ( !jQuery.data( elem, queueDataKey, undefined, true ) && - !jQuery.data( elem, markDataKey, undefined, true ) ) { - jQuery.removeData( elem, deferDataKey, true ); - defer.resolve(); - } - }, 0 ); - } -} - -jQuery.extend({ - - _mark: function( elem, type ) { - if ( elem ) { - type = (type || "fx") + "mark"; - jQuery.data( elem, type, (jQuery.data(elem,type,undefined,true) || 0) + 1, true ); - } - }, - - _unmark: function( force, elem, type ) { - if ( force !== true ) { - type = elem; - elem = force; - force = false; - } - if ( elem ) { - type = type || "fx"; - var key = type + "mark", - count = force ? 0 : ( (jQuery.data( elem, key, undefined, true) || 1 ) - 1 ); - if ( count ) { - jQuery.data( elem, key, count, true ); - } else { - jQuery.removeData( elem, key, true ); - handleQueueMarkDefer( elem, type, "mark" ); - } - } - }, - - queue: function( elem, type, data ) { - if ( elem ) { - type = (type || "fx") + "queue"; - var q = jQuery.data( elem, type, undefined, true ); - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !q || jQuery.isArray(data) ) { - q = jQuery.data( elem, type, jQuery.makeArray(data), true ); - } else { - q.push( data ); - } - } - return q || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - fn = queue.shift(), - defer; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - } - - if ( fn ) { - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift("inprogress"); - } - - fn.call(elem, function() { - jQuery.dequeue(elem, type); - }); - } - - if ( !queue.length ) { - jQuery.removeData( elem, type + "queue", true ); - handleQueueMarkDefer( elem, type, "queue" ); - } - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - } - - if ( data === undefined ) { - return jQuery.queue( this[0], type ); - } - return this.each(function() { - var queue = jQuery.queue( this, type, data ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[time] || time : time; - type = type || "fx"; - - return this.queue( type, function() { - var elem = this; - setTimeout(function() { - jQuery.dequeue( elem, type ); - }, time ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, object ) { - if ( typeof type !== "string" ) { - object = type; - type = undefined; - } - type = type || "fx"; - var defer = jQuery.Deferred(), - elements = this, - i = elements.length, - count = 1, - deferDataKey = type + "defer", - queueDataKey = type + "queue", - markDataKey = type + "mark", - tmp; - function resolve() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - } - while( i-- ) { - if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) || - ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) || - jQuery.data( elements[ i ], markDataKey, undefined, true ) ) && - jQuery.data( elements[ i ], deferDataKey, jQuery._Deferred(), true ) )) { - count++; - tmp.done( resolve ); - } - } - resolve(); - return defer.promise(); - } -}); - - - - -var rclass = /[\n\t\r]/g, - rspace = /\s+/, - rreturn = /\r/g, - rtype = /^(?:button|input)$/i, - rfocusable = /^(?:button|input|object|select|textarea)$/i, - rclickable = /^a(?:rea)?$/i, - rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i, - nodeHook, boolHook; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.attr ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, name, value, true, jQuery.prop ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classNames, i, l, elem, - setClass, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call(this, j, this.className) ); - }); - } - - if ( value && typeof value === "string" ) { - classNames = value.split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 ) { - if ( !elem.className && classNames.length === 1 ) { - elem.className = value; - - } else { - setClass = " " + elem.className + " "; - - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) { - setClass += classNames[ c ] + " "; - } - } - elem.className = jQuery.trim( setClass ); - } - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classNames, i, l, elem, className, c, cl; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call(this, j, this.className) ); - }); - } - - if ( (value && typeof value === "string") || value === undefined ) { - classNames = (value || "").split( rspace ); - - for ( i = 0, l = this.length; i < l; i++ ) { - elem = this[ i ]; - - if ( elem.nodeType === 1 && elem.className ) { - if ( value ) { - className = (" " + elem.className + " ").replace( rclass, " " ); - for ( c = 0, cl = classNames.length; c < cl; c++ ) { - className = className.replace(" " + classNames[ c ] + " ", " "); - } - elem.className = jQuery.trim( className ); - - } else { - elem.className = ""; - } - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value, - isBool = typeof stateVal === "boolean"; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - state = stateVal, - classNames = value.split( rspace ); - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space seperated list - state = isBool ? state : !self.hasClass( className ); - self[ state ? "addClass" : "removeClass" ]( className ); - } - - } else if ( type === "undefined" || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // toggle whole className - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " "; - for ( var i = 0, l = this.length; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) > -1 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var hooks, ret, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.nodeName.toLowerCase() ] || jQuery.valHooks[ elem.type ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return undefined; - } - - var isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var self = jQuery(this), val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, self.val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.nodeName.toLowerCase() ] || jQuery.valHooks[ this.type ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // attributes.value is undefined in Blackberry 4.7 but - // uses .value. See #6932 - var val = elem.attributes.value; - return !val || val.specified ? elem.value : elem.text; - } - }, - select: { - get: function( elem ) { - var value, - index = elem.selectedIndex, - values = [], - options = elem.options, - one = elem.type === "select-one"; - - // Nothing was selected - if ( index < 0 ) { - return null; - } - - // Loop through all the selected options - for ( var i = one ? index : 0, max = one ? index + 1 : options.length; i < max; i++ ) { - var option = options[ i ]; - - // Don't return options that are disabled or in a disabled optgroup - if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && - (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - // Fixes Bug #2551 -- select.val() broken in IE after form.reset() - if ( one && !values.length && options.length ) { - return jQuery( options[ index ] ).val(); - } - - return values; - }, - - set: function( elem, value ) { - var values = jQuery.makeArray( value ); - - jQuery(elem).find("option").each(function() { - this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; - }); - - if ( !values.length ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attrFn: { - val: true, - css: true, - html: true, - text: true, - data: true, - width: true, - height: true, - offset: true - }, - - attrFix: { - // Always normalize to ensure hook usage - tabindex: "tabIndex" - }, - - attr: function( elem, name, value, pass ) { - var nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return undefined; - } - - if ( pass && name in jQuery.attrFn ) { - return jQuery( elem )[ name ]( value ); - } - - // Fallback to prop when attributes are not supported - if ( !("getAttribute" in elem) ) { - return jQuery.prop( elem, name, value ); - } - - var ret, hooks, - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - // Normalize the name if needed - if ( notxml ) { - name = jQuery.attrFix[ name ] || name; - - hooks = jQuery.attrHooks[ name ]; - - if ( !hooks ) { - // Use boolHook for boolean attributes - if ( rboolean.test( name ) ) { - hooks = boolHook; - - // Use nodeHook if available( IE6/7 ) - } else if ( nodeHook ) { - hooks = nodeHook; - } - } - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - return undefined; - - } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, "" + value ); - return value; - } - - } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - - ret = elem.getAttribute( name ); - - // Non-existent attributes return null, we normalize to undefined - return ret === null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, name ) { - var propName; - if ( elem.nodeType === 1 ) { - name = jQuery.attrFix[ name ] || name; - - jQuery.attr( elem, name, "" ); - elem.removeAttribute( name ); - - // Set corresponding property to false for boolean attributes - if ( rboolean.test( name ) && (propName = jQuery.propFix[ name ] || name) in elem ) { - elem[ propName ] = false; - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - // We can't allow the type property to be changed (since it causes problems in IE) - if ( rtype.test( elem.nodeName ) && elem.parentNode ) { - jQuery.error( "type property can't be changed" ); - } else if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to it's default in case type is set after value - // This is for element creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - }, - // Use the value property for back compat - // Use the nodeHook for button elements in IE6/7 (#1954) - value: { - get: function( elem, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.get( elem, name ); - } - return name in elem ? - elem.value : - null; - }, - set: function( elem, value, name ) { - if ( nodeHook && jQuery.nodeName( elem, "button" ) ) { - return nodeHook.set( elem, value, name ); - } - // Does not return so that setAttribute is also used - elem.value = value; - } - } - }, - - propFix: { - tabindex: "tabIndex", - readonly: "readOnly", - "for": "htmlFor", - "class": "className", - maxlength: "maxLength", - cellspacing: "cellSpacing", - cellpadding: "cellPadding", - rowspan: "rowSpan", - colspan: "colSpan", - usemap: "useMap", - frameborder: "frameBorder", - contenteditable: "contentEditable" - }, - - prop: function( elem, name, value ) { - var nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return undefined; - } - - var ret, hooks, - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - return (elem[ name ] = value); - } - - } else { - if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - return elem[ name ]; - } - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - var attributeNode = elem.getAttributeNode("tabindex"); - - return attributeNode && attributeNode.specified ? - parseInt( attributeNode.value, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - undefined; - } - } - } -}); - -// Add the tabindex propHook to attrHooks for back-compat -jQuery.attrHooks.tabIndex = jQuery.propHooks.tabIndex; - -// Hook for boolean attributes -boolHook = { - get: function( elem, name ) { - // Align boolean attributes with corresponding properties - // Fall back to attribute presence where some booleans are not supported - var attrNode; - return jQuery.prop( elem, name ) === true || ( attrNode = elem.getAttributeNode( name ) ) && attrNode.nodeValue !== false ? - name.toLowerCase() : - undefined; - }, - set: function( elem, value, name ) { - var propName; - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else { - // value is true since we know at this point it's type boolean and not false - // Set boolean attributes to the same name and set the DOM property - propName = jQuery.propFix[ name ] || name; - if ( propName in elem ) { - // Only set the IDL specifically if it already exists on the element - elem[ propName ] = true; - } - - elem.setAttribute( name, name.toLowerCase() ); - } - return name; - } -}; - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !jQuery.support.getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = jQuery.valHooks.button = { - get: function( elem, name ) { - var ret; - ret = elem.getAttributeNode( name ); - // Return undefined if nodeValue is empty string - return ret && ret.nodeValue !== "" ? - ret.nodeValue : - undefined; - }, - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - ret = document.createAttribute( name ); - elem.setAttributeNode( ret ); - } - return (ret.nodeValue = value + ""); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }); - }); -} - - -// Some attributes require a special call on IE -if ( !jQuery.support.hrefNormalized ) { - jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { - get: function( elem ) { - var ret = elem.getAttribute( name, 2 ); - return ret === null ? undefined : ret; - } - }); - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Normalize to lowercase since IE uppercases css property names - return elem.style.cssText.toLowerCase() || undefined; - }, - set: function( elem, value ) { - return (elem.style.cssText = "" + value); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }); -} - -// Radios and checkboxes getter/setter -if ( !jQuery.support.checkOn ) { - jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - get: function( elem ) { - // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - } - }; - }); -} -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return (elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0); - } - } - }); -}); - - - - -var rnamespaces = /\.(.*)$/, - rformElems = /^(?:textarea|input|select)$/i, - rperiod = /\./g, - rspaces = / /g, - rescape = /[^\w\s.|`]/g, - fcleanup = function( nm ) { - return nm.replace(rescape, "\\$&"); - }; - -/* - * A number of helper functions used for managing events. - * Many of the ideas behind this code originated from - * Dean Edwards' addEvent library. - */ -jQuery.event = { - - // Bind an event to an element - // Original by Dean Edwards - add: function( elem, types, handler, data ) { - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } else if ( !handler ) { - // Fixes bug #7229. Fix recommended by jdalton - return; - } - - var handleObjIn, handleObj; - - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - } - - // Make sure that the function being executed has a unique ID - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure - var elemData = jQuery._data( elem ); - - // If no elemData is found then we must be trying to bind to one of the - // banned noData elements - if ( !elemData ) { - return; - } - - var events = elemData.events, - eventHandle = elemData.handle; - - if ( !events ) { - elemData.events = events = {}; - } - - if ( !eventHandle ) { - elemData.handle = eventHandle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== "undefined" && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.handle.apply( eventHandle.elem, arguments ) : - undefined; - }; - } - - // Add elem as a property of the handle function - // This is to prevent a memory leak with non-native events in IE. - eventHandle.elem = elem; - - // Handle multiple events separated by a space - // jQuery(...).bind("mouseover mouseout", fn); - types = types.split(" "); - - var type, i = 0, namespaces; - - while ( (type = types[ i++ ]) ) { - handleObj = handleObjIn ? - jQuery.extend({}, handleObjIn) : - { handler: handler, data: data }; - - // Namespaced event handlers - if ( type.indexOf(".") > -1 ) { - namespaces = type.split("."); - type = namespaces.shift(); - handleObj.namespace = namespaces.slice(0).sort().join("."); - - } else { - namespaces = []; - handleObj.namespace = ""; - } - - handleObj.type = type; - if ( !handleObj.guid ) { - handleObj.guid = handler.guid; - } - - // Get the current list of functions bound to this event - var handlers = events[ type ], - special = jQuery.event.special[ type ] || {}; - - // Init the event handler queue - if ( !handlers ) { - handlers = events[ type ] = []; - - // Check for a special event handler - // Only use addEventListener/attachEvent if the special - // events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add the function to the element's handler list - handlers.push( handleObj ); - - // Keep track of which events have been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - global: {}, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, pos ) { - // don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - if ( handler === false ) { - handler = returnFalse; - } - - var ret, type, fn, j, i = 0, all, namespaces, namespace, special, eventType, handleObj, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ), - events = elemData && elemData.events; - - if ( !elemData || !events ) { - return; - } - - // types is actually an event object here - if ( types && types.type ) { - handler = types.handler; - types = types.type; - } - - // Unbind all events for the element - if ( !types || typeof types === "string" && types.charAt(0) === "." ) { - types = types || ""; - - for ( type in events ) { - jQuery.event.remove( elem, type + types ); - } - - return; - } - - // Handle multiple events separated by a space - // jQuery(...).unbind("mouseover mouseout", fn); - types = types.split(" "); - - while ( (type = types[ i++ ]) ) { - origType = type; - handleObj = null; - all = type.indexOf(".") < 0; - namespaces = []; - - if ( !all ) { - // Namespaced event handlers - namespaces = type.split("."); - type = namespaces.shift(); - - namespace = new RegExp("(^|\\.)" + - jQuery.map( namespaces.slice(0).sort(), fcleanup ).join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - eventType = events[ type ]; - - if ( !eventType ) { - continue; - } - - if ( !handler ) { - for ( j = 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( all || namespace.test( handleObj.namespace ) ) { - jQuery.event.remove( elem, origType, handleObj.handler, j ); - eventType.splice( j--, 1 ); - } - } - - continue; - } - - special = jQuery.event.special[ type ] || {}; - - for ( j = pos || 0; j < eventType.length; j++ ) { - handleObj = eventType[ j ]; - - if ( handler.guid === handleObj.guid ) { - // remove the given handler for the given type - if ( all || namespace.test( handleObj.namespace ) ) { - if ( pos == null ) { - eventType.splice( j--, 1 ); - } - - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - - if ( pos != null ) { - break; - } - } - } - - // remove generic event handler if no more handlers exist - if ( eventType.length === 0 || pos != null && eventType.length === 1 ) { - if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - ret = null; - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - var handle = elemData.handle; - if ( handle ) { - handle.elem = null; - } - - delete elemData.events; - delete elemData.handle; - - if ( jQuery.isEmptyObject( elemData ) ) { - jQuery.removeData( elem, undefined, true ); - } - } - }, - - // Events that are safe to short-circuit if no handlers are attached. - // Native DOM events should not be added, they may have inline handlers. - customEvent: { - "getData": true, - "setData": true, - "changeData": true - }, - - trigger: function( event, data, elem, onlyHandlers ) { - // Event object or event type - var type = event.type || event, - namespaces = [], - exclusive; - - if ( type.indexOf("!") >= 0 ) { - // Exclusive events trigger only for the exact event (no namespaces) - type = type.slice(0, -1); - exclusive = true; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - - if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) { - // No jQuery handlers for this event type, and it can't have inline handlers - return; - } - - // Caller can pass in an Event, Object, or just an event type string - event = typeof event === "object" ? - // jQuery.Event object - event[ jQuery.expando ] ? event : - // Object literal - new jQuery.Event( type, event ) : - // Just the event type (string) - new jQuery.Event( type ); - - event.type = type; - event.exclusive = exclusive; - event.namespace = namespaces.join("."); - event.namespace_re = new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)"); - - // triggerHandler() and global events don't bubble or run the default action - if ( onlyHandlers || !elem ) { - event.preventDefault(); - event.stopPropagation(); - } - - // Handle a global trigger - if ( !elem ) { - // TODO: Stop taunting the data cache; remove global events and always attach to document - jQuery.each( jQuery.cache, function() { - // internalKey variable is just used to make it easier to find - // and potentially change this stuff later; currently it just - // points to jQuery.expando - var internalKey = jQuery.expando, - internalCache = this[ internalKey ]; - if ( internalCache && internalCache.events && internalCache.events[ type ] ) { - jQuery.event.trigger( event, data, internalCache.handle.elem ); - } - }); - return; - } - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // Clean up the event in case it is being reused - event.result = undefined; - event.target = elem; - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data != null ? jQuery.makeArray( data ) : []; - data.unshift( event ); - - var cur = elem, - // IE doesn't like method names with a colon (#3533, #8272) - ontype = type.indexOf(":") < 0 ? "on" + type : ""; - - // Fire event on the current element, then bubble up the DOM tree - do { - var handle = jQuery._data( cur, "handle" ); - - event.currentTarget = cur; - if ( handle ) { - handle.apply( cur, data ); - } - - // Trigger an inline bound script - if ( ontype && jQuery.acceptData( cur ) && cur[ ontype ] && cur[ ontype ].apply( cur, data ) === false ) { - event.result = false; - event.preventDefault(); - } - - // Bubble up to document, then to window - cur = cur.parentNode || cur.ownerDocument || cur === event.target.ownerDocument && window; - } while ( cur && !event.isPropagationStopped() ); - - // If nobody prevented the default action, do it now - if ( !event.isDefaultPrevented() ) { - var old, - special = jQuery.event.special[ type ] || {}; - - if ( (!special._default || special._default.call( elem.ownerDocument, event ) === false) && - !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction)() check here because IE6/7 fails that test. - // IE<9 dies on focus to hidden element (#1486), may want to revisit a try/catch. - try { - if ( ontype && elem[ type ] ) { - // Don't re-trigger an onFOO event when we call its FOO() method - old = elem[ ontype ]; - - if ( old ) { - elem[ ontype ] = null; - } - - jQuery.event.triggered = type; - elem[ type ](); - } - } catch ( ieError ) {} - - if ( old ) { - elem[ ontype ] = old; - } - - jQuery.event.triggered = undefined; - } - } - - return event.result; - }, - - handle: function( event ) { - event = jQuery.event.fix( event || window.event ); - // Snapshot the handlers list since a called handler may add/remove events. - var handlers = ((jQuery._data( this, "events" ) || {})[ event.type ] || []).slice(0), - run_all = !event.exclusive && !event.namespace, - args = Array.prototype.slice.call( arguments, 0 ); - - // Use the fix-ed Event rather than the (read-only) native event - args[0] = event; - event.currentTarget = this; - - for ( var j = 0, l = handlers.length; j < l; j++ ) { - var handleObj = handlers[ j ]; - - // Triggered event must 1) be non-exclusive and have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event. - if ( run_all || event.namespace_re.test( handleObj.namespace ) ) { - // Pass in a reference to the handler function itself - // So that we can later remove it - event.handler = handleObj.handler; - event.data = handleObj.data; - event.handleObj = handleObj; - - var ret = handleObj.handler.apply( this, args ); - - if ( ret !== undefined ) { - event.result = ret; - if ( ret === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - return event.result; - }, - - props: "altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "), - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // store a copy of the original event object - // and "clone" to set read-only properties - var originalEvent = event; - event = jQuery.Event( originalEvent ); - - for ( var i = this.props.length, prop; i; ) { - prop = this.props[ --i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Fix target property, if necessary - if ( !event.target ) { - // Fixes #1925 where srcElement might not be defined either - event.target = event.srcElement || document; - } - - // check if target is a textnode (safari) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && event.fromElement ) { - event.relatedTarget = event.fromElement === event.target ? event.toElement : event.fromElement; - } - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && event.clientX != null ) { - var eventDocument = event.target.ownerDocument || document, - doc = eventDocument.documentElement, - body = eventDocument.body; - - event.pageX = event.clientX + (doc && doc.scrollLeft || body && body.scrollLeft || 0) - (doc && doc.clientLeft || body && body.clientLeft || 0); - event.pageY = event.clientY + (doc && doc.scrollTop || body && body.scrollTop || 0) - (doc && doc.clientTop || body && body.clientTop || 0); - } - - // Add which for key events - if ( event.which == null && (event.charCode != null || event.keyCode != null) ) { - event.which = event.charCode != null ? event.charCode : event.keyCode; - } - - // Add metaKey to non-Mac browsers (use ctrl for PC's and Meta for Macs) - if ( !event.metaKey && event.ctrlKey ) { - event.metaKey = event.ctrlKey; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && event.button !== undefined ) { - event.which = (event.button & 1 ? 1 : ( event.button & 2 ? 3 : ( event.button & 4 ? 2 : 0 ) )); - } - - return event; - }, - - // Deprecated, use jQuery.guid instead - guid: 1E8, - - // Deprecated, use jQuery.proxy instead - proxy: jQuery.proxy, - - special: { - ready: { - // Make sure the ready event is setup - setup: jQuery.bindReady, - teardown: jQuery.noop - }, - - live: { - add: function( handleObj ) { - jQuery.event.add( this, - liveConvert( handleObj.origType, handleObj.selector ), - jQuery.extend({}, handleObj, {handler: liveHandler, guid: handleObj.handler.guid}) ); - }, - - remove: function( handleObj ) { - jQuery.event.remove( this, liveConvert( handleObj.origType, handleObj.selector ), handleObj ); - } - }, - - beforeunload: { - setup: function( data, namespaces, eventHandle ) { - // We only want to do this special case on windows - if ( jQuery.isWindow( this ) ) { - this.onbeforeunload = eventHandle; - } - }, - - teardown: function( namespaces, eventHandle ) { - if ( this.onbeforeunload === eventHandle ) { - this.onbeforeunload = null; - } - } - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - if ( elem.detachEvent ) { - elem.detachEvent( "on" + type, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !this.preventDefault ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = (src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault()) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // timeStamp is buggy for some events on Firefox(#3843) - // So we won't rely on the native value - this.timeStamp = jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -function returnFalse() { - return false; -} -function returnTrue() { - return true; -} - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - preventDefault: function() { - this.isDefaultPrevented = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - - // if preventDefault exists run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // otherwise set the returnValue property of the original event to false (IE) - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - this.isPropagationStopped = returnTrue; - - var e = this.originalEvent; - if ( !e ) { - return; - } - // if stopPropagation exists run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - // otherwise set the cancelBubble property of the original event to true (IE) - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - }, - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse -}; - -// Checks if an event happened on an element within another element -// Used in jQuery.event.special.mouseenter and mouseleave handlers -var withinElement = function( event ) { - - // Check if mouse(over|out) are still within the same parent element - var related = event.relatedTarget, - inside = false, - eventType = event.type; - - event.type = event.data; - - if ( related !== this ) { - - if ( related ) { - inside = jQuery.contains( this, related ); - } - - if ( !inside ) { - - jQuery.event.handle.apply( this, arguments ); - - event.type = eventType; - } - } -}, - -// In case of event delegation, we only need to rename the event.type, -// liveHandler will take care of the rest. -delegate = function( event ) { - event.type = event.data; - jQuery.event.handle.apply( this, arguments ); -}; - -// Create mouseenter and mouseleave events -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - setup: function( data ) { - jQuery.event.add( this, fix, data && data.selector ? delegate : withinElement, orig ); - }, - teardown: function( data ) { - jQuery.event.remove( this, fix, data && data.selector ? delegate : withinElement ); - } - }; -}); - -// submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function( data, namespaces ) { - if ( !jQuery.nodeName( this, "form" ) ) { - jQuery.event.add(this, "click.specialSubmit", function( e ) { - var elem = e.target, - type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( (type === "submit" || type === "image") && jQuery( elem ).closest("form").length ) { - trigger( "submit", this, arguments ); - } - }); - - jQuery.event.add(this, "keypress.specialSubmit", function( e ) { - var elem = e.target, - type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( (type === "text" || type === "password") && jQuery( elem ).closest("form").length && e.keyCode === 13 ) { - trigger( "submit", this, arguments ); - } - }); - - } else { - return false; - } - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialSubmit" ); - } - }; - -} - -// change delegation, happens here so we have bind. -if ( !jQuery.support.changeBubbles ) { - - var changeFilters, - - getVal = function( elem ) { - var type = jQuery.nodeName( elem, "input" ) ? elem.type : "", - val = elem.value; - - if ( type === "radio" || type === "checkbox" ) { - val = elem.checked; - - } else if ( type === "select-multiple" ) { - val = elem.selectedIndex > -1 ? - jQuery.map( elem.options, function( elem ) { - return elem.selected; - }).join("-") : - ""; - - } else if ( jQuery.nodeName( elem, "select" ) ) { - val = elem.selectedIndex; - } - - return val; - }, - - testChange = function testChange( e ) { - var elem = e.target, data, val; - - if ( !rformElems.test( elem.nodeName ) || elem.readOnly ) { - return; - } - - data = jQuery._data( elem, "_change_data" ); - val = getVal(elem); - - // the current data will be also retrieved by beforeactivate - if ( e.type !== "focusout" || elem.type !== "radio" ) { - jQuery._data( elem, "_change_data", val ); - } - - if ( data === undefined || val === data ) { - return; - } - - if ( data != null || val ) { - e.type = "change"; - e.liveFired = undefined; - jQuery.event.trigger( e, arguments[1], elem ); - } - }; - - jQuery.event.special.change = { - filters: { - focusout: testChange, - - beforedeactivate: testChange, - - click: function( e ) { - var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( type === "radio" || type === "checkbox" || jQuery.nodeName( elem, "select" ) ) { - testChange.call( this, e ); - } - }, - - // Change has to be called before submit - // Keydown will be called before keypress, which is used in submit-event delegation - keydown: function( e ) { - var elem = e.target, type = jQuery.nodeName( elem, "input" ) ? elem.type : ""; - - if ( (e.keyCode === 13 && !jQuery.nodeName( elem, "textarea" ) ) || - (e.keyCode === 32 && (type === "checkbox" || type === "radio")) || - type === "select-multiple" ) { - testChange.call( this, e ); - } - }, - - // Beforeactivate happens also before the previous element is blurred - // with this event you can't trigger a change event, but you can store - // information - beforeactivate: function( e ) { - var elem = e.target; - jQuery._data( elem, "_change_data", getVal(elem) ); - } - }, - - setup: function( data, namespaces ) { - if ( this.type === "file" ) { - return false; - } - - for ( var type in changeFilters ) { - jQuery.event.add( this, type + ".specialChange", changeFilters[type] ); - } - - return rformElems.test( this.nodeName ); - }, - - teardown: function( namespaces ) { - jQuery.event.remove( this, ".specialChange" ); - - return rformElems.test( this.nodeName ); - } - }; - - changeFilters = jQuery.event.special.change.filters; - - // Handle when the input is .focus()'d - changeFilters.focus = changeFilters.beforeactivate; -} - -function trigger( type, elem, args ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - // Don't pass args or remember liveFired; they apply to the donor event. - var event = jQuery.extend( {}, args[ 0 ] ); - event.type = type; - event.originalEvent = {}; - event.liveFired = undefined; - jQuery.event.handle.call( elem, event ); - if ( event.isDefaultPrevented() ) { - args[ 0 ].preventDefault(); - } -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - - function handler( donor ) { - // Donor event is always a native one; fix it and switch its type. - // Let focusin/out handler cancel the donor focus/blur event. - var e = jQuery.event.fix( donor ); - e.type = fix; - e.originalEvent = {}; - jQuery.event.trigger( e, null, e.target ); - if ( e.isDefaultPrevented() ) { - donor.preventDefault(); - } - } - }); -} - -jQuery.each(["bind", "one"], function( i, name ) { - jQuery.fn[ name ] = function( type, data, fn ) { - var handler; - - // Handle object literals - if ( typeof type === "object" ) { - for ( var key in type ) { - this[ name ](key, data, type[key], fn); - } - return this; - } - - if ( arguments.length === 2 || data === false ) { - fn = data; - data = undefined; - } - - if ( name === "one" ) { - handler = function( event ) { - jQuery( this ).unbind( event, handler ); - return fn.apply( this, arguments ); - }; - handler.guid = fn.guid || jQuery.guid++; - } else { - handler = fn; - } - - if ( type === "unload" && name !== "one" ) { - this.one( type, data, fn ); - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.add( this[i], type, handler, data ); - } - } - - return this; - }; -}); - -jQuery.fn.extend({ - unbind: function( type, fn ) { - // Handle object literals - if ( typeof type === "object" && !type.preventDefault ) { - for ( var key in type ) { - this.unbind(key, type[key]); - } - - } else { - for ( var i = 0, l = this.length; i < l; i++ ) { - jQuery.event.remove( this[i], type, fn ); - } - } - - return this; - }, - - delegate: function( selector, types, data, fn ) { - return this.live( types, data, fn, selector ); - }, - - undelegate: function( selector, types, fn ) { - if ( arguments.length === 0 ) { - return this.unbind( "live" ); - - } else { - return this.die( types, null, fn, selector ); - } - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - - triggerHandler: function( type, data ) { - if ( this[0] ) { - return jQuery.event.trigger( type, data, this[0], true ); - } - }, - - toggle: function( fn ) { - // Save reference to arguments for access in closure - var args = arguments, - guid = fn.guid || jQuery.guid++, - i = 0, - toggler = function( event ) { - // Figure out which function to execute - var lastToggle = ( jQuery.data( this, "lastToggle" + fn.guid ) || 0 ) % i; - jQuery.data( this, "lastToggle" + fn.guid, lastToggle + 1 ); - - // Make sure that clicks stop - event.preventDefault(); - - // and execute the function - return args[ lastToggle ].apply( this, arguments ) || false; - }; - - // link all the functions, so any of them can unbind this click handler - toggler.guid = guid; - while ( i < args.length ) { - args[ i++ ].guid = guid; - } - - return this.click( toggler ); - }, - - hover: function( fnOver, fnOut ) { - return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); - } -}); - -var liveMap = { - focus: "focusin", - blur: "focusout", - mouseenter: "mouseover", - mouseleave: "mouseout" -}; - -jQuery.each(["live", "die"], function( i, name ) { - jQuery.fn[ name ] = function( types, data, fn, origSelector /* Internal Use Only */ ) { - var type, i = 0, match, namespaces, preType, - selector = origSelector || this.selector, - context = origSelector ? this : jQuery( this.context ); - - if ( typeof types === "object" && !types.preventDefault ) { - for ( var key in types ) { - context[ name ]( key, data, types[key], selector ); - } - - return this; - } - - if ( name === "die" && !types && - origSelector && origSelector.charAt(0) === "." ) { - - context.unbind( origSelector ); - - return this; - } - - if ( data === false || jQuery.isFunction( data ) ) { - fn = data || returnFalse; - data = undefined; - } - - types = (types || "").split(" "); - - while ( (type = types[ i++ ]) != null ) { - match = rnamespaces.exec( type ); - namespaces = ""; - - if ( match ) { - namespaces = match[0]; - type = type.replace( rnamespaces, "" ); - } - - if ( type === "hover" ) { - types.push( "mouseenter" + namespaces, "mouseleave" + namespaces ); - continue; - } - - preType = type; - - if ( liveMap[ type ] ) { - types.push( liveMap[ type ] + namespaces ); - type = type + namespaces; - - } else { - type = (liveMap[ type ] || type) + namespaces; - } - - if ( name === "live" ) { - // bind live handler - for ( var j = 0, l = context.length; j < l; j++ ) { - jQuery.event.add( context[j], "live." + liveConvert( type, selector ), - { data: data, selector: selector, handler: fn, origType: type, origHandler: fn, preType: preType } ); - } - - } else { - // unbind live handler - context.unbind( "live." + liveConvert( type, selector ), fn ); - } - } - - return this; - }; -}); - -function liveHandler( event ) { - var stop, maxLevel, related, match, handleObj, elem, j, i, l, data, close, namespace, ret, - elems = [], - selectors = [], - events = jQuery._data( this, "events" ); - - // Make sure we avoid non-left-click bubbling in Firefox (#3861) and disabled elements in IE (#6911) - if ( event.liveFired === this || !events || !events.live || event.target.disabled || event.button && event.type === "click" ) { - return; - } - - if ( event.namespace ) { - namespace = new RegExp("(^|\\.)" + event.namespace.split(".").join("\\.(?:.*\\.)?") + "(\\.|$)"); - } - - event.liveFired = this; - - var live = events.live.slice(0); - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( handleObj.origType.replace( rnamespaces, "" ) === event.type ) { - selectors.push( handleObj.selector ); - - } else { - live.splice( j--, 1 ); - } - } - - match = jQuery( event.target ).closest( selectors, event.currentTarget ); - - for ( i = 0, l = match.length; i < l; i++ ) { - close = match[i]; - - for ( j = 0; j < live.length; j++ ) { - handleObj = live[j]; - - if ( close.selector === handleObj.selector && (!namespace || namespace.test( handleObj.namespace )) && !close.elem.disabled ) { - elem = close.elem; - related = null; - - // Those two events require additional checking - if ( handleObj.preType === "mouseenter" || handleObj.preType === "mouseleave" ) { - event.type = handleObj.preType; - related = jQuery( event.relatedTarget ).closest( handleObj.selector )[0]; - - // Make sure not to accidentally match a child element with the same selector - if ( related && jQuery.contains( elem, related ) ) { - related = elem; - } - } - - if ( !related || related !== elem ) { - elems.push({ elem: elem, handleObj: handleObj, level: close.level }); - } - } - } - } - - for ( i = 0, l = elems.length; i < l; i++ ) { - match = elems[i]; - - if ( maxLevel && match.level > maxLevel ) { - break; - } - - event.currentTarget = match.elem; - event.data = match.handleObj.data; - event.handleObj = match.handleObj; - - ret = match.handleObj.origHandler.apply( match.elem, arguments ); - - if ( ret === false || event.isPropagationStopped() ) { - maxLevel = match.level; - - if ( ret === false ) { - stop = false; - } - if ( event.isImmediatePropagationStopped() ) { - break; - } - } - } - - return stop; -} - -function liveConvert( type, selector ) { - return (type && type !== "*" ? type + "." : "") + selector.replace(rperiod, "`").replace(rspaces, "&"); -} - -jQuery.each( ("blur focus focusin focusout load resize scroll unload click dblclick " + - "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + - "change select submit keydown keypress keyup error").split(" "), function( i, name ) { - - // Handle event binding - jQuery.fn[ name ] = function( data, fn ) { - if ( fn == null ) { - fn = data; - data = null; - } - - return arguments.length > 0 ? - this.bind( name, data, fn ) : - this.trigger( name ); - }; - - if ( jQuery.attrFn ) { - jQuery.attrFn[ name ] = true; - } -}); - - - -/*! - * Sizzle CSS Selector Engine - * Copyright 2011, The Dojo Foundation - * Released under the MIT, BSD, and GPL Licenses. - * More information: http://sizzlejs.com/ - */ -(function(){ - -var chunker = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g, - done = 0, - toString = Object.prototype.toString, - hasDuplicate = false, - baseHasDuplicate = true, - rBackslash = /\\/g, - rNonWord = /\W/; - -// Here we check if the JavaScript engine is using some sort of -// optimization where it does not always call our comparision -// function. If that is the case, discard the hasDuplicate value. -// Thus far that includes Google Chrome. -[0, 0].sort(function() { - baseHasDuplicate = false; - return 0; -}); - -var Sizzle = function( selector, context, results, seed ) { - results = results || []; - context = context || document; - - var origContext = context; - - if ( context.nodeType !== 1 && context.nodeType !== 9 ) { - return []; - } - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - var m, set, checkSet, extra, ret, cur, pop, i, - prune = true, - contextXML = Sizzle.isXML( context ), - parts = [], - soFar = selector; - - // Reset the position of the chunker regexp (start from head) - do { - chunker.exec( "" ); - m = chunker.exec( soFar ); - - if ( m ) { - soFar = m[3]; - - parts.push( m[1] ); - - if ( m[2] ) { - extra = m[3]; - break; - } - } - } while ( m ); - - if ( parts.length > 1 && origPOS.exec( selector ) ) { - - if ( parts.length === 2 && Expr.relative[ parts[0] ] ) { - set = posProcess( parts[0] + parts[1], context ); - - } else { - set = Expr.relative[ parts[0] ] ? - [ context ] : - Sizzle( parts.shift(), context ); - - while ( parts.length ) { - selector = parts.shift(); - - if ( Expr.relative[ selector ] ) { - selector += parts.shift(); - } - - set = posProcess( selector, set ); - } - } - - } else { - // Take a shortcut and set the context if the root selector is an ID - // (but not if it'll be faster if the inner selector is an ID) - if ( !seed && parts.length > 1 && context.nodeType === 9 && !contextXML && - Expr.match.ID.test(parts[0]) && !Expr.match.ID.test(parts[parts.length - 1]) ) { - - ret = Sizzle.find( parts.shift(), context, contextXML ); - context = ret.expr ? - Sizzle.filter( ret.expr, ret.set )[0] : - ret.set[0]; - } - - if ( context ) { - ret = seed ? - { expr: parts.pop(), set: makeArray(seed) } : - Sizzle.find( parts.pop(), parts.length === 1 && (parts[0] === "~" || parts[0] === "+") && context.parentNode ? context.parentNode : context, contextXML ); - - set = ret.expr ? - Sizzle.filter( ret.expr, ret.set ) : - ret.set; - - if ( parts.length > 0 ) { - checkSet = makeArray( set ); - - } else { - prune = false; - } - - while ( parts.length ) { - cur = parts.pop(); - pop = cur; - - if ( !Expr.relative[ cur ] ) { - cur = ""; - } else { - pop = parts.pop(); - } - - if ( pop == null ) { - pop = context; - } - - Expr.relative[ cur ]( checkSet, pop, contextXML ); - } - - } else { - checkSet = parts = []; - } - } - - if ( !checkSet ) { - checkSet = set; - } - - if ( !checkSet ) { - Sizzle.error( cur || selector ); - } - - if ( toString.call(checkSet) === "[object Array]" ) { - if ( !prune ) { - results.push.apply( results, checkSet ); - - } else if ( context && context.nodeType === 1 ) { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) { - results.push( set[i] ); - } - } - - } else { - for ( i = 0; checkSet[i] != null; i++ ) { - if ( checkSet[i] && checkSet[i].nodeType === 1 ) { - results.push( set[i] ); - } - } - } - - } else { - makeArray( checkSet, results ); - } - - if ( extra ) { - Sizzle( extra, origContext, results, seed ); - Sizzle.uniqueSort( results ); - } - - return results; -}; - -Sizzle.uniqueSort = function( results ) { - if ( sortOrder ) { - hasDuplicate = baseHasDuplicate; - results.sort( sortOrder ); - - if ( hasDuplicate ) { - for ( var i = 1; i < results.length; i++ ) { - if ( results[i] === results[ i - 1 ] ) { - results.splice( i--, 1 ); - } - } - } - } - - return results; -}; - -Sizzle.matches = function( expr, set ) { - return Sizzle( expr, null, null, set ); -}; - -Sizzle.matchesSelector = function( node, expr ) { - return Sizzle( expr, null, null, [node] ).length > 0; -}; - -Sizzle.find = function( expr, context, isXML ) { - var set; - - if ( !expr ) { - return []; - } - - for ( var i = 0, l = Expr.order.length; i < l; i++ ) { - var match, - type = Expr.order[i]; - - if ( (match = Expr.leftMatch[ type ].exec( expr )) ) { - var left = match[1]; - match.splice( 1, 1 ); - - if ( left.substr( left.length - 1 ) !== "\\" ) { - match[1] = (match[1] || "").replace( rBackslash, "" ); - set = Expr.find[ type ]( match, context, isXML ); - - if ( set != null ) { - expr = expr.replace( Expr.match[ type ], "" ); - break; - } - } - } - } - - if ( !set ) { - set = typeof context.getElementsByTagName !== "undefined" ? - context.getElementsByTagName( "*" ) : - []; - } - - return { set: set, expr: expr }; -}; - -Sizzle.filter = function( expr, set, inplace, not ) { - var match, anyFound, - old = expr, - result = [], - curLoop = set, - isXMLFilter = set && set[0] && Sizzle.isXML( set[0] ); - - while ( expr && set.length ) { - for ( var type in Expr.filter ) { - if ( (match = Expr.leftMatch[ type ].exec( expr )) != null && match[2] ) { - var found, item, - filter = Expr.filter[ type ], - left = match[1]; - - anyFound = false; - - match.splice(1,1); - - if ( left.substr( left.length - 1 ) === "\\" ) { - continue; - } - - if ( curLoop === result ) { - result = []; - } - - if ( Expr.preFilter[ type ] ) { - match = Expr.preFilter[ type ]( match, curLoop, inplace, result, not, isXMLFilter ); - - if ( !match ) { - anyFound = found = true; - - } else if ( match === true ) { - continue; - } - } - - if ( match ) { - for ( var i = 0; (item = curLoop[i]) != null; i++ ) { - if ( item ) { - found = filter( item, match, i, curLoop ); - var pass = not ^ !!found; - - if ( inplace && found != null ) { - if ( pass ) { - anyFound = true; - - } else { - curLoop[i] = false; - } - - } else if ( pass ) { - result.push( item ); - anyFound = true; - } - } - } - } - - if ( found !== undefined ) { - if ( !inplace ) { - curLoop = result; - } - - expr = expr.replace( Expr.match[ type ], "" ); - - if ( !anyFound ) { - return []; - } - - break; - } - } - } - - // Improper expression - if ( expr === old ) { - if ( anyFound == null ) { - Sizzle.error( expr ); - - } else { - break; - } - } - - old = expr; - } - - return curLoop; -}; - -Sizzle.error = function( msg ) { - throw "Syntax error, unrecognized expression: " + msg; -}; - -var Expr = Sizzle.selectors = { - order: [ "ID", "NAME", "TAG" ], - - match: { - ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/, - NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/, - ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/, - TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/, - CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/, - POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/, - PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/ - }, - - leftMatch: {}, - - attrMap: { - "class": "className", - "for": "htmlFor" - }, - - attrHandle: { - href: function( elem ) { - return elem.getAttribute( "href" ); - }, - type: function( elem ) { - return elem.getAttribute( "type" ); - } - }, - - relative: { - "+": function(checkSet, part){ - var isPartStr = typeof part === "string", - isTag = isPartStr && !rNonWord.test( part ), - isPartStrNotTag = isPartStr && !isTag; - - if ( isTag ) { - part = part.toLowerCase(); - } - - for ( var i = 0, l = checkSet.length, elem; i < l; i++ ) { - if ( (elem = checkSet[i]) ) { - while ( (elem = elem.previousSibling) && elem.nodeType !== 1 ) {} - - checkSet[i] = isPartStrNotTag || elem && elem.nodeName.toLowerCase() === part ? - elem || false : - elem === part; - } - } - - if ( isPartStrNotTag ) { - Sizzle.filter( part, checkSet, true ); - } - }, - - ">": function( checkSet, part ) { - var elem, - isPartStr = typeof part === "string", - i = 0, - l = checkSet.length; - - if ( isPartStr && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - var parent = elem.parentNode; - checkSet[i] = parent.nodeName.toLowerCase() === part ? parent : false; - } - } - - } else { - for ( ; i < l; i++ ) { - elem = checkSet[i]; - - if ( elem ) { - checkSet[i] = isPartStr ? - elem.parentNode : - elem.parentNode === part; - } - } - - if ( isPartStr ) { - Sizzle.filter( part, checkSet, true ); - } - } - }, - - "": function(checkSet, part, isXML){ - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "parentNode", part, doneName, checkSet, nodeCheck, isXML ); - }, - - "~": function( checkSet, part, isXML ) { - var nodeCheck, - doneName = done++, - checkFn = dirCheck; - - if ( typeof part === "string" && !rNonWord.test( part ) ) { - part = part.toLowerCase(); - nodeCheck = part; - checkFn = dirNodeCheck; - } - - checkFn( "previousSibling", part, doneName, checkSet, nodeCheck, isXML ); - } - }, - - find: { - ID: function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }, - - NAME: function( match, context ) { - if ( typeof context.getElementsByName !== "undefined" ) { - var ret = [], - results = context.getElementsByName( match[1] ); - - for ( var i = 0, l = results.length; i < l; i++ ) { - if ( results[i].getAttribute("name") === match[1] ) { - ret.push( results[i] ); - } - } - - return ret.length === 0 ? null : ret; - } - }, - - TAG: function( match, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( match[1] ); - } - } - }, - preFilter: { - CLASS: function( match, curLoop, inplace, result, not, isXML ) { - match = " " + match[1].replace( rBackslash, "" ) + " "; - - if ( isXML ) { - return match; - } - - for ( var i = 0, elem; (elem = curLoop[i]) != null; i++ ) { - if ( elem ) { - if ( not ^ (elem.className && (" " + elem.className + " ").replace(/[\t\n\r]/g, " ").indexOf(match) >= 0) ) { - if ( !inplace ) { - result.push( elem ); - } - - } else if ( inplace ) { - curLoop[i] = false; - } - } - } - - return false; - }, - - ID: function( match ) { - return match[1].replace( rBackslash, "" ); - }, - - TAG: function( match, curLoop ) { - return match[1].replace( rBackslash, "" ).toLowerCase(); - }, - - CHILD: function( match ) { - if ( match[1] === "nth" ) { - if ( !match[2] ) { - Sizzle.error( match[0] ); - } - - match[2] = match[2].replace(/^\+|\s*/g, ''); - - // parse equations like 'even', 'odd', '5', '2n', '3n+2', '4n-1', '-n+6' - var test = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec( - match[2] === "even" && "2n" || match[2] === "odd" && "2n+1" || - !/\D/.test( match[2] ) && "0n+" + match[2] || match[2]); - - // calculate the numbers (first)n+(last) including if they are negative - match[2] = (test[1] + (test[2] || 1)) - 0; - match[3] = test[3] - 0; - } - else if ( match[2] ) { - Sizzle.error( match[0] ); - } - - // TODO: Move to normal caching system - match[0] = done++; - - return match; - }, - - ATTR: function( match, curLoop, inplace, result, not, isXML ) { - var name = match[1] = match[1].replace( rBackslash, "" ); - - if ( !isXML && Expr.attrMap[name] ) { - match[1] = Expr.attrMap[name]; - } - - // Handle if an un-quoted value was used - match[4] = ( match[4] || match[5] || "" ).replace( rBackslash, "" ); - - if ( match[2] === "~=" ) { - match[4] = " " + match[4] + " "; - } - - return match; - }, - - PSEUDO: function( match, curLoop, inplace, result, not ) { - if ( match[1] === "not" ) { - // If we're dealing with a complex expression, or a simple one - if ( ( chunker.exec(match[3]) || "" ).length > 1 || /^\w/.test(match[3]) ) { - match[3] = Sizzle(match[3], null, null, curLoop); - - } else { - var ret = Sizzle.filter(match[3], curLoop, inplace, true ^ not); - - if ( !inplace ) { - result.push.apply( result, ret ); - } - - return false; - } - - } else if ( Expr.match.POS.test( match[0] ) || Expr.match.CHILD.test( match[0] ) ) { - return true; - } - - return match; - }, - - POS: function( match ) { - match.unshift( true ); - - return match; - } - }, - - filters: { - enabled: function( elem ) { - return elem.disabled === false && elem.type !== "hidden"; - }, - - disabled: function( elem ) { - return elem.disabled === true; - }, - - checked: function( elem ) { - return elem.checked === true; - }, - - selected: function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - parent: function( elem ) { - return !!elem.firstChild; - }, - - empty: function( elem ) { - return !elem.firstChild; - }, - - has: function( elem, i, match ) { - return !!Sizzle( match[3], elem ).length; - }, - - header: function( elem ) { - return (/h\d/i).test( elem.nodeName ); - }, - - text: function( elem ) { - var attr = elem.getAttribute( "type" ), type = elem.type; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null ); - }, - - radio: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type; - }, - - checkbox: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type; - }, - - file: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "file" === elem.type; - }, - - password: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "password" === elem.type; - }, - - submit: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "submit" === elem.type; - }, - - image: function( elem ) { - return elem.nodeName.toLowerCase() === "input" && "image" === elem.type; - }, - - reset: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && "reset" === elem.type; - }, - - button: function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && "button" === elem.type || name === "button"; - }, - - input: function( elem ) { - return (/input|select|textarea|button/i).test( elem.nodeName ); - }, - - focus: function( elem ) { - return elem === elem.ownerDocument.activeElement; - } - }, - setFilters: { - first: function( elem, i ) { - return i === 0; - }, - - last: function( elem, i, match, array ) { - return i === array.length - 1; - }, - - even: function( elem, i ) { - return i % 2 === 0; - }, - - odd: function( elem, i ) { - return i % 2 === 1; - }, - - lt: function( elem, i, match ) { - return i < match[3] - 0; - }, - - gt: function( elem, i, match ) { - return i > match[3] - 0; - }, - - nth: function( elem, i, match ) { - return match[3] - 0 === i; - }, - - eq: function( elem, i, match ) { - return match[3] - 0 === i; - } - }, - filter: { - PSEUDO: function( elem, match, i, array ) { - var name = match[1], - filter = Expr.filters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - - } else if ( name === "contains" ) { - return (elem.textContent || elem.innerText || Sizzle.getText([ elem ]) || "").indexOf(match[3]) >= 0; - - } else if ( name === "not" ) { - var not = match[3]; - - for ( var j = 0, l = not.length; j < l; j++ ) { - if ( not[j] === elem ) { - return false; - } - } - - return true; - - } else { - Sizzle.error( name ); - } - }, - - CHILD: function( elem, match ) { - var type = match[1], - node = elem; - - switch ( type ) { - case "only": - case "first": - while ( (node = node.previousSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - if ( type === "first" ) { - return true; - } - - node = elem; - - case "last": - while ( (node = node.nextSibling) ) { - if ( node.nodeType === 1 ) { - return false; - } - } - - return true; - - case "nth": - var first = match[2], - last = match[3]; - - if ( first === 1 && last === 0 ) { - return true; - } - - var doneName = match[0], - parent = elem.parentNode; - - if ( parent && (parent.sizcache !== doneName || !elem.nodeIndex) ) { - var count = 0; - - for ( node = parent.firstChild; node; node = node.nextSibling ) { - if ( node.nodeType === 1 ) { - node.nodeIndex = ++count; - } - } - - parent.sizcache = doneName; - } - - var diff = elem.nodeIndex - last; - - if ( first === 0 ) { - return diff === 0; - - } else { - return ( diff % first === 0 && diff / first >= 0 ); - } - } - }, - - ID: function( elem, match ) { - return elem.nodeType === 1 && elem.getAttribute("id") === match; - }, - - TAG: function( elem, match ) { - return (match === "*" && elem.nodeType === 1) || elem.nodeName.toLowerCase() === match; - }, - - CLASS: function( elem, match ) { - return (" " + (elem.className || elem.getAttribute("class")) + " ") - .indexOf( match ) > -1; - }, - - ATTR: function( elem, match ) { - var name = match[1], - result = Expr.attrHandle[ name ] ? - Expr.attrHandle[ name ]( elem ) : - elem[ name ] != null ? - elem[ name ] : - elem.getAttribute( name ), - value = result + "", - type = match[2], - check = match[4]; - - return result == null ? - type === "!=" : - type === "=" ? - value === check : - type === "*=" ? - value.indexOf(check) >= 0 : - type === "~=" ? - (" " + value + " ").indexOf(check) >= 0 : - !check ? - value && result !== false : - type === "!=" ? - value !== check : - type === "^=" ? - value.indexOf(check) === 0 : - type === "$=" ? - value.substr(value.length - check.length) === check : - type === "|=" ? - value === check || value.substr(0, check.length + 1) === check + "-" : - false; - }, - - POS: function( elem, match, i, array ) { - var name = match[2], - filter = Expr.setFilters[ name ]; - - if ( filter ) { - return filter( elem, i, match, array ); - } - } - } -}; - -var origPOS = Expr.match.POS, - fescape = function(all, num){ - return "\\" + (num - 0 + 1); - }; - -for ( var type in Expr.match ) { - Expr.match[ type ] = new RegExp( Expr.match[ type ].source + (/(?![^\[]*\])(?![^\(]*\))/.source) ); - Expr.leftMatch[ type ] = new RegExp( /(^(?:.|\r|\n)*?)/.source + Expr.match[ type ].source.replace(/\\(\d+)/g, fescape) ); -} - -var makeArray = function( array, results ) { - array = Array.prototype.slice.call( array, 0 ); - - if ( results ) { - results.push.apply( results, array ); - return results; - } - - return array; -}; - -// Perform a simple check to determine if the browser is capable of -// converting a NodeList to an array using builtin methods. -// Also verifies that the returned array holds DOM nodes -// (which is not the case in the Blackberry browser) -try { - Array.prototype.slice.call( document.documentElement.childNodes, 0 )[0].nodeType; - -// Provide a fallback method if it does not work -} catch( e ) { - makeArray = function( array, results ) { - var i = 0, - ret = results || []; - - if ( toString.call(array) === "[object Array]" ) { - Array.prototype.push.apply( ret, array ); - - } else { - if ( typeof array.length === "number" ) { - for ( var l = array.length; i < l; i++ ) { - ret.push( array[i] ); - } - - } else { - for ( ; array[i]; i++ ) { - ret.push( array[i] ); - } - } - } - - return ret; - }; -} - -var sortOrder, siblingCheck; - -if ( document.documentElement.compareDocumentPosition ) { - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - if ( !a.compareDocumentPosition || !b.compareDocumentPosition ) { - return a.compareDocumentPosition ? -1 : 1; - } - - return a.compareDocumentPosition(b) & 4 ? -1 : 1; - }; - -} else { - sortOrder = function( a, b ) { - // The nodes are identical, we can exit early - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Fallback to using sourceIndex (in IE) if it's available on both nodes - } else if ( a.sourceIndex && b.sourceIndex ) { - return a.sourceIndex - b.sourceIndex; - } - - var al, bl, - ap = [], - bp = [], - aup = a.parentNode, - bup = b.parentNode, - cur = aup; - - // If the nodes are siblings (or identical) we can do a quick check - if ( aup === bup ) { - return siblingCheck( a, b ); - - // If no parents were found then the nodes are disconnected - } else if ( !aup ) { - return -1; - - } else if ( !bup ) { - return 1; - } - - // Otherwise they're somewhere else in the tree so we need - // to build up a full list of the parentNodes for comparison - while ( cur ) { - ap.unshift( cur ); - cur = cur.parentNode; - } - - cur = bup; - - while ( cur ) { - bp.unshift( cur ); - cur = cur.parentNode; - } - - al = ap.length; - bl = bp.length; - - // Start walking down the tree looking for a discrepancy - for ( var i = 0; i < al && i < bl; i++ ) { - if ( ap[i] !== bp[i] ) { - return siblingCheck( ap[i], bp[i] ); - } - } - - // We ended someplace up the tree so do a sibling check - return i === al ? - siblingCheck( a, bp[i], -1 ) : - siblingCheck( ap[i], b, 1 ); - }; - - siblingCheck = function( a, b, ret ) { - if ( a === b ) { - return ret; - } - - var cur = a.nextSibling; - - while ( cur ) { - if ( cur === b ) { - return -1; - } - - cur = cur.nextSibling; - } - - return 1; - }; -} - -// Utility function for retreiving the text value of an array of DOM nodes -Sizzle.getText = function( elems ) { - var ret = "", elem; - - for ( var i = 0; elems[i]; i++ ) { - elem = elems[i]; - - // Get the text from text nodes and CDATA nodes - if ( elem.nodeType === 3 || elem.nodeType === 4 ) { - ret += elem.nodeValue; - - // Traverse everything else, except comment nodes - } else if ( elem.nodeType !== 8 ) { - ret += Sizzle.getText( elem.childNodes ); - } - } - - return ret; -}; - -// Check to see if the browser returns elements by name when -// querying by getElementById (and provide a workaround) -(function(){ - // We're going to inject a fake input element with a specified name - var form = document.createElement("div"), - id = "script" + (new Date()).getTime(), - root = document.documentElement; - - form.innerHTML = ""; - - // Inject it into the root element, check its status, and remove it quickly - root.insertBefore( form, root.firstChild ); - - // The workaround has to do additional checks after a getElementById - // Which slows things down for other browsers (hence the branching) - if ( document.getElementById( id ) ) { - Expr.find.ID = function( match, context, isXML ) { - if ( typeof context.getElementById !== "undefined" && !isXML ) { - var m = context.getElementById(match[1]); - - return m ? - m.id === match[1] || typeof m.getAttributeNode !== "undefined" && m.getAttributeNode("id").nodeValue === match[1] ? - [m] : - undefined : - []; - } - }; - - Expr.filter.ID = function( elem, match ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - - return elem.nodeType === 1 && node && node.nodeValue === match; - }; - } - - root.removeChild( form ); - - // release memory in IE - root = form = null; -})(); - -(function(){ - // Check to see if the browser returns only elements - // when doing getElementsByTagName("*") - - // Create a fake element - var div = document.createElement("div"); - div.appendChild( document.createComment("") ); - - // Make sure no comments are found - if ( div.getElementsByTagName("*").length > 0 ) { - Expr.find.TAG = function( match, context ) { - var results = context.getElementsByTagName( match[1] ); - - // Filter out possible comments - if ( match[1] === "*" ) { - var tmp = []; - - for ( var i = 0; results[i]; i++ ) { - if ( results[i].nodeType === 1 ) { - tmp.push( results[i] ); - } - } - - results = tmp; - } - - return results; - }; - } - - // Check to see if an attribute returns normalized href attributes - div.innerHTML = ""; - - if ( div.firstChild && typeof div.firstChild.getAttribute !== "undefined" && - div.firstChild.getAttribute("href") !== "#" ) { - - Expr.attrHandle.href = function( elem ) { - return elem.getAttribute( "href", 2 ); - }; - } - - // release memory in IE - div = null; -})(); - -if ( document.querySelectorAll ) { - (function(){ - var oldSizzle = Sizzle, - div = document.createElement("div"), - id = "__sizzle__"; - - div.innerHTML = "

    "; - - // Safari can't handle uppercase or unicode characters when - // in quirks mode. - if ( div.querySelectorAll && div.querySelectorAll(".TEST").length === 0 ) { - return; - } - - Sizzle = function( query, context, extra, seed ) { - context = context || document; - - // Only use querySelectorAll on non-XML documents - // (ID selectors don't work in non-HTML documents) - if ( !seed && !Sizzle.isXML(context) ) { - // See if we find a selector to speed up - var match = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec( query ); - - if ( match && (context.nodeType === 1 || context.nodeType === 9) ) { - // Speed-up: Sizzle("TAG") - if ( match[1] ) { - return makeArray( context.getElementsByTagName( query ), extra ); - - // Speed-up: Sizzle(".CLASS") - } else if ( match[2] && Expr.find.CLASS && context.getElementsByClassName ) { - return makeArray( context.getElementsByClassName( match[2] ), extra ); - } - } - - if ( context.nodeType === 9 ) { - // Speed-up: Sizzle("body") - // The body element only exists once, optimize finding it - if ( query === "body" && context.body ) { - return makeArray( [ context.body ], extra ); - - // Speed-up: Sizzle("#ID") - } else if ( match && match[3] ) { - var elem = context.getElementById( match[3] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id === match[3] ) { - return makeArray( [ elem ], extra ); - } - - } else { - return makeArray( [], extra ); - } - } - - try { - return makeArray( context.querySelectorAll(query), extra ); - } catch(qsaError) {} - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - } else if ( context.nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - var oldContext = context, - old = context.getAttribute( "id" ), - nid = old || id, - hasParent = context.parentNode, - relativeHierarchySelector = /^\s*[+~]/.test( query ); - - if ( !old ) { - context.setAttribute( "id", nid ); - } else { - nid = nid.replace( /'/g, "\\$&" ); - } - if ( relativeHierarchySelector && hasParent ) { - context = context.parentNode; - } - - try { - if ( !relativeHierarchySelector || hasParent ) { - return makeArray( context.querySelectorAll( "[id='" + nid + "'] " + query ), extra ); - } - - } catch(pseudoError) { - } finally { - if ( !old ) { - oldContext.removeAttribute( "id" ); - } - } - } - } - - return oldSizzle(query, context, extra, seed); - }; - - for ( var prop in oldSizzle ) { - Sizzle[ prop ] = oldSizzle[ prop ]; - } - - // release memory in IE - div = null; - })(); -} - -(function(){ - var html = document.documentElement, - matches = html.matchesSelector || html.mozMatchesSelector || html.webkitMatchesSelector || html.msMatchesSelector; - - if ( matches ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9 fails this) - var disconnectedMatch = !matches.call( document.createElement( "div" ), "div" ), - pseudoWorks = false; - - try { - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( document.documentElement, "[test!='']:sizzle" ); - - } catch( pseudoError ) { - pseudoWorks = true; - } - - Sizzle.matchesSelector = function( node, expr ) { - // Make sure that attribute selectors are quoted - expr = expr.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']"); - - if ( !Sizzle.isXML( node ) ) { - try { - if ( pseudoWorks || !Expr.match.PSEUDO.test( expr ) && !/!=/.test( expr ) ) { - var ret = matches.call( node, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || !disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9, so check for that - node.document && node.document.nodeType !== 11 ) { - return ret; - } - } - } catch(e) {} - } - - return Sizzle(expr, null, null, [node]).length > 0; - }; - } -})(); - -(function(){ - var div = document.createElement("div"); - - div.innerHTML = "
    "; - - // Opera can't find a second classname (in 9.6) - // Also, make sure that getElementsByClassName actually exists - if ( !div.getElementsByClassName || div.getElementsByClassName("e").length === 0 ) { - return; - } - - // Safari caches class attributes, doesn't catch changes (in 3.2) - div.lastChild.className = "e"; - - if ( div.getElementsByClassName("e").length === 1 ) { - return; - } - - Expr.order.splice(1, 0, "CLASS"); - Expr.find.CLASS = function( match, context, isXML ) { - if ( typeof context.getElementsByClassName !== "undefined" && !isXML ) { - return context.getElementsByClassName(match[1]); - } - }; - - // release memory in IE - div = null; -})(); - -function dirNodeCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 && !isXML ){ - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( elem.nodeName.toLowerCase() === cur ) { - match = elem; - break; - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -function dirCheck( dir, cur, doneName, checkSet, nodeCheck, isXML ) { - for ( var i = 0, l = checkSet.length; i < l; i++ ) { - var elem = checkSet[i]; - - if ( elem ) { - var match = false; - - elem = elem[dir]; - - while ( elem ) { - if ( elem.sizcache === doneName ) { - match = checkSet[elem.sizset]; - break; - } - - if ( elem.nodeType === 1 ) { - if ( !isXML ) { - elem.sizcache = doneName; - elem.sizset = i; - } - - if ( typeof cur !== "string" ) { - if ( elem === cur ) { - match = true; - break; - } - - } else if ( Sizzle.filter( cur, [elem] ).length > 0 ) { - match = elem; - break; - } - } - - elem = elem[dir]; - } - - checkSet[i] = match; - } - } -} - -if ( document.documentElement.contains ) { - Sizzle.contains = function( a, b ) { - return a !== b && (a.contains ? a.contains(b) : true); - }; - -} else if ( document.documentElement.compareDocumentPosition ) { - Sizzle.contains = function( a, b ) { - return !!(a.compareDocumentPosition(b) & 16); - }; - -} else { - Sizzle.contains = function() { - return false; - }; -} - -Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = (elem ? elem.ownerDocument || elem : 0).documentElement; - - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -var posProcess = function( selector, context ) { - var match, - tmpSet = [], - later = "", - root = context.nodeType ? [context] : context; - - // Position selectors must be done after the filter - // And so must :not(positional) so we move all PSEUDOs to the end - while ( (match = Expr.match.PSEUDO.exec( selector )) ) { - later += match[0]; - selector = selector.replace( Expr.match.PSEUDO, "" ); - } - - selector = Expr.relative[selector] ? selector + "*" : selector; - - for ( var i = 0, l = root.length; i < l; i++ ) { - Sizzle( selector, root[i], tmpSet ); - } - - return Sizzle.filter( later, tmpSet ); -}; - -// EXPOSE -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.filters; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})(); - - -var runtil = /Until$/, - rparentsprev = /^(?:parents|prevUntil|prevAll)/, - // Note: This RegExp should be improved, or likely pulled from Sizzle - rmultiselector = /,/, - isSimple = /^.[^:#\[\.,]*$/, - slice = Array.prototype.slice, - POS = jQuery.expr.match.POS, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var self = this, - i, l; - - if ( typeof selector !== "string" ) { - return jQuery( selector ).filter(function() { - for ( i = 0, l = self.length; i < l; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }); - } - - var ret = this.pushStack( "", "find", selector ), - length, n, r; - - for ( i = 0, l = this.length; i < l; i++ ) { - length = ret.length; - jQuery.find( selector, this[i], ret ); - - if ( i > 0 ) { - // Make sure that the results are unique - for ( n = length; n < ret.length; n++ ) { - for ( r = 0; r < length; r++ ) { - if ( ret[r] === ret[n] ) { - ret.splice(n--, 1); - break; - } - } - } - } - } - - return ret; - }, - - has: function( target ) { - var targets = jQuery( target ); - return this.filter(function() { - for ( var i = 0, l = targets.length; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector, false), "not", selector); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector, true), "filter", selector ); - }, - - is: function( selector ) { - return !!selector && ( typeof selector === "string" ? - jQuery.filter( selector, this ).length > 0 : - this.filter( selector ).length > 0 ); - }, - - closest: function( selectors, context ) { - var ret = [], i, l, cur = this[0]; - - // Array - if ( jQuery.isArray( selectors ) ) { - var match, selector, - matches = {}, - level = 1; - - if ( cur && selectors.length ) { - for ( i = 0, l = selectors.length; i < l; i++ ) { - selector = selectors[i]; - - if ( !matches[ selector ] ) { - matches[ selector ] = POS.test( selector ) ? - jQuery( selector, context || this.context ) : - selector; - } - } - - while ( cur && cur.ownerDocument && cur !== context ) { - for ( selector in matches ) { - match = matches[ selector ]; - - if ( match.jquery ? match.index( cur ) > -1 : jQuery( cur ).is( match ) ) { - ret.push({ selector: selector, elem: cur, level: level }); - } - } - - cur = cur.parentNode; - level++; - } - } - - return ret; - } - - // String - var pos = POS.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( i = 0, l = this.length; i < l; i++ ) { - cur = this[i]; - - while ( cur ) { - if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { - ret.push( cur ); - break; - - } else { - cur = cur.parentNode; - if ( !cur || !cur.ownerDocument || cur === context || cur.nodeType === 11 ) { - break; - } - } - } - } - - ret = ret.length > 1 ? jQuery.unique( ret ) : ret; - - return this.pushStack( ret, "closest", selectors ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( isDisconnected( set[0] ) || isDisconnected( all[0] ) ? - all : - jQuery.unique( all ) ); - }, - - andSelf: function() { - return this.add( this.prevObject ); - } -}); - -// A painfully simple check to see if an element is disconnected -// from a document (should be improved, where feasible). -function isDisconnected( node ) { - return !node || !node.parentNode || node.parentNode.nodeType === 11; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return jQuery.nth( elem, 2, "nextSibling" ); - }, - prev: function( elem ) { - return jQuery.nth( elem, 2, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( elem.parentNode.firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.makeArray( elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ), - // The variable 'args' was introduced in - // https://github.com/jquery/jquery/commit/52a0238 - // to work around a bug in Chrome 10 (Dev) and should be removed when the bug is fixed. - // http://code.google.com/p/v8/issues/detail?id=1050 - args = slice.call(arguments); - - if ( !runtil.test( name ) ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; - - if ( (this.length > 1 || rmultiselector.test( selector )) && rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - - return this.pushStack( ret, name, args.join(",") ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 ? - jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : - jQuery.find.matches(expr, elems); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - nth: function( cur, result, dir, elem ) { - result = result || 1; - var num = 0; - - for ( ; cur; cur = cur[dir] ) { - if ( cur.nodeType === 1 && ++num === result ) { - break; - } - } - - return cur; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, keep ) { - - // Can't pass null or undefined to indexOf in Firefox 4 - // Set to 0 to skip string check - qualifier = qualifier || 0; - - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep(elements, function( elem, i ) { - var retVal = !!qualifier.call( elem, i, elem ); - return retVal === keep; - }); - - } else if ( qualifier.nodeType ) { - return jQuery.grep(elements, function( elem, i ) { - return (elem === qualifier) === keep; - }); - - } else if ( typeof qualifier === "string" ) { - var filtered = jQuery.grep(elements, function( elem ) { - return elem.nodeType === 1; - }); - - if ( isSimple.test( qualifier ) ) { - return jQuery.filter(qualifier, filtered, !keep); - } else { - qualifier = jQuery.filter( qualifier, filtered ); - } - } - - return jQuery.grep(elements, function( elem, i ) { - return (jQuery.inArray( elem, qualifier ) >= 0) === keep; - }); -} - - - - -var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g, - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig, - rtagName = /<([\w:]+)/, - rtbody = /
    ", "
    " ], - tr: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - col: [ 2, "", "
    " ], - area: [ 1, "", "" ], - _default: [ 0, "", "" ] - }; - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// IE can't serialize and - - - */ - -(function() { - this.loggly = function(opts) { - this.user_agent = get_agent(); - this.browser_size = get_size(); - log_methods = {'error': 5, 'warn': 4, 'info': 3, 'debug': 2, 'log': 1}; - if (!opts.url) throw new Error("Please include a Loggly HTTP URL."); - if (!opts.level) { - this.level = log_methods['info']; - } else { - this.level = log_methods[opts.level]; - } - this.log = function(data) { - if (log_methods['log'] == this.level) { - opts.data = data; - janky(opts); - } - }; - this.debug = function(data) { - if (log_methods['debug'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - this.info = function(data) { - if (log_methods['info'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - this.warn = function(data) { - if (log_methods['warn'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - this.error = function(data) { - if (log_methods['error'] >= this.level) { - opts.data = data; - janky(opts); - } - }; - }; - this.janky = function(opts) { - janky._form(function(iframe, form) { - form.setAttribute("action", opts.url); - form.setAttribute("method", "post"); - janky._input(iframe, form, opts.data); - form.submit(); - setTimeout(function(){ - document.body.removeChild(iframe); - }, 2000); - }); - }; - this.janky._form = function(cb) { - var iframe = document.createElement("iframe"); - document.body.appendChild(iframe); - iframe.style.display = "none"; - setTimeout(function() { - var form = iframe.contentWindow.document.createElement("form"); - iframe.contentWindow.document.body.appendChild(form); - cb(iframe, form); - }, 0); - }; - this.janky._input = function(iframe, form, data) { - var inp = iframe.contentWindow.document.createElement("input"); - inp.setAttribute("type", "hidden"); - inp.setAttribute("name", "source"); - inp.value = "castor " + data; - form.appendChild(inp); - }; - this.get_agent = function () { - return navigator.appCodeName + navigator.appName + navigator.appVersion; - }; - this.get_size = function () { - var width = 0; var height = 0; - if( typeof( window.innerWidth ) == 'number' ) { - width = window.innerWidth; height = window.innerHeight; - } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { - width = document.documentElement.clientWidth; height = document.documentElement.clientHeight; - } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { - width = document.body.clientWidth; height = document.body.clientHeight; - } - return {'height': height, 'width': width}; - }; -})(); - - -jsworld={};jsworld.formatIsoDateTime=function(a,b){if(typeof a==="undefined")a=new Date;if(typeof b==="undefined")b=false;var c=jsworld.formatIsoDate(a)+" "+jsworld.formatIsoTime(a);if(b){var d=a.getHours()-a.getUTCHours();var e=Math.abs(d);var f=a.getUTCMinutes();var g=a.getMinutes();if(g!=f&&f<30&&d<0)e--;if(g!=f&&f>30&&d>0)e--;var h;if(g!=f)h=":30";else h=":00";var i;if(e<10)i="0"+e+h;else i=""+e+h;if(d<0)i="-"+i;else i="+"+i;c=c+i}return c};jsworld.formatIsoDate=function(a){if(typeof a==="undefined")a=new Date;var b=a.getFullYear();var c=a.getMonth()+1;var d=a.getDate();return b+"-"+jsworld._zeroPad(c,2)+"-"+jsworld._zeroPad(d,2)};jsworld.formatIsoTime=function(a){if(typeof a==="undefined")a=new Date;var b=a.getHours();var c=a.getMinutes();var d=a.getSeconds();return jsworld._zeroPad(b,2)+":"+jsworld._zeroPad(c,2)+":"+jsworld._zeroPad(d,2)};jsworld.parseIsoDateTime=function(a){if(typeof a!="string")throw"Error: The parameter must be a string";var b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)(\d\d)(\d\d)[T ](\d\d)(\d\d)(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d)(\d\d)(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)[T ](\d\d):(\d\d):(\d\d)/);if(b===null)throw"Error: Invalid ISO-8601 date/time string";var c=parseInt(b[1],10);var d=parseInt(b[2],10);var e=parseInt(b[3],10);var f=parseInt(b[4],10);var g=parseInt(b[5],10);var h=parseInt(b[6],10);if(d<1||d>12||e<1||e>31||f<0||f>23||g<0||g>59||h<0||h>59)throw"Error: Invalid ISO-8601 date/time value";var i=new Date(c,d-1,e,f,g,h);if(i.getDate()!=e||i.getMonth()+1!=d)throw"Error: Invalid date";return i};jsworld.parseIsoDate=function(a){if(typeof a!="string")throw"Error: The parameter must be a string";var b=a.match(/^(\d\d\d\d)-(\d\d)-(\d\d)/);if(b===null)b=a.match(/^(\d\d\d\d)(\d\d)(\d\d)/);if(b===null)throw"Error: Invalid ISO-8601 date string";var c=parseInt(b[1],10);var d=parseInt(b[2],10);var e=parseInt(b[3],10);if(d<1||d>12||e<1||e>31)throw"Error: Invalid ISO-8601 date value";var f=new Date(c,d-1,e);if(f.getDate()!=e||f.getMonth()+1!=d)throw"Error: Invalid date";return f};jsworld.parseIsoTime=function(a){if(typeof a!="string")throw"Error: The parameter must be a string";var b=a.match(/^(\d\d):(\d\d):(\d\d)/);if(b===null)b=a.match(/^(\d\d)(\d\d)(\d\d)/);if(b===null)throw"Error: Invalid ISO-8601 date/time string";var c=parseInt(b[1],10);var d=parseInt(b[2],10);var e=parseInt(b[3],10);if(c<0||c>23||d<0||d>59||e<0||e>59)throw"Error: Invalid ISO-8601 time value";return new Date(0,0,0,c,d,e)};jsworld._trim=function(a){var b=" \n\r\t\f \u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000";for(var c=0;c=0;c--){if(b.indexOf(a.charAt(c))===-1){a=a.substring(0,c+1);break}}return b.indexOf(a.charAt(0))===-1?a:""};jsworld._isNumber=function(a){if(typeof a=="number")return true;if(typeof a!="string")return false;var b=a+"";return/^-?(\d+|\d*\.\d+)$/.test(b)};jsworld._isInteger=function(a){if(typeof a!="number"&&typeof a!="string")return false;var b=a+"";return/^-?\d+$/.test(b)};jsworld._isFloat=function(a){if(typeof a!="number"&&typeof a!="string")return false;var b=a+"";return/^-?\.\d+?$/.test(b)};jsworld._hasOption=function(a,b){if(typeof a!="string"||typeof b!="string")return false;if(b.indexOf(a)!=-1)return true;else return false};jsworld._stringReplaceAll=function(a,b,c){var d;if(b.length==1&&c.length==1){d="";for(var e=0;e0){if(d.length>0)g=parseInt(d.shift(),10);if(isNaN(g))throw"Error: Invalid grouping";if(g==-1){e=a.substring(0,f)+e;break}f-=g;if(f<1){e=a.substring(0,f+g)+e;break}e=c+a.substring(f,f+g)+e}return e};jsworld._formatFractionPart=function(a,b){for(var c=0;a.length0)return a;else throw"Empty or no string"};if(a==null||typeof a!="object")throw"Error: Invalid/missing locale properties";if(typeof a.decimal_point!="string")throw"Error: Invalid/missing decimal_point property";this.decimal_point=a.decimal_point;if(typeof a.thousands_sep!="string")throw"Error: Invalid/missing thousands_sep property";this.thousands_sep=a.thousands_sep;if(typeof a.grouping!="string")throw"Error: Invalid/missing grouping property";this.grouping=a.grouping;if(typeof a.int_curr_symbol!="string")throw"Error: Invalid/missing int_curr_symbol property";if(!/[A-Za-z]{3}.?/.test(a.int_curr_symbol))throw"Error: Invalid int_curr_symbol property";this.int_curr_symbol=a.int_curr_symbol;if(typeof a.currency_symbol!="string")throw"Error: Invalid/missing currency_symbol property";this.currency_symbol=a.currency_symbol;if(typeof a.frac_digits!="number"&&a.frac_digits<0)throw"Error: Invalid/missing frac_digits property";this.frac_digits=a.frac_digits;if(a.mon_decimal_point===null||a.mon_decimal_point==""){if(this.frac_digits>0)throw"Error: Undefined mon_decimal_point property";else a.mon_decimal_point=""}if(typeof a.mon_decimal_point!="string")throw"Error: Invalid/missing mon_decimal_point property";this.mon_decimal_point=a.mon_decimal_point;if(typeof a.mon_thousands_sep!="string")throw"Error: Invalid/missing mon_thousands_sep property";this.mon_thousands_sep=a.mon_thousands_sep;if(typeof a.mon_grouping!="string")throw"Error: Invalid/missing mon_grouping property";this.mon_grouping=a.mon_grouping;if(typeof a.positive_sign!="string")throw"Error: Invalid/missing positive_sign property";this.positive_sign=a.positive_sign;if(typeof a.negative_sign!="string")throw"Error: Invalid/missing negative_sign property";this.negative_sign=a.negative_sign;if(a.p_cs_precedes!==0&&a.p_cs_precedes!==1)throw"Error: Invalid/missing p_cs_precedes property, must be 0 or 1";this.p_cs_precedes=a.p_cs_precedes;if(a.n_cs_precedes!==0&&a.n_cs_precedes!==1)throw"Error: Invalid/missing n_cs_precedes, must be 0 or 1";this.n_cs_precedes=a.n_cs_precedes;if(a.p_sep_by_space!==0&&a.p_sep_by_space!==1&&a.p_sep_by_space!==2)throw"Error: Invalid/missing p_sep_by_space property, must be 0, 1 or 2";this.p_sep_by_space=a.p_sep_by_space;if(a.n_sep_by_space!==0&&a.n_sep_by_space!==1&&a.n_sep_by_space!==2)throw"Error: Invalid/missing n_sep_by_space property, must be 0, 1, or 2";this.n_sep_by_space=a.n_sep_by_space;if(a.p_sign_posn!==0&&a.p_sign_posn!==1&&a.p_sign_posn!==2&&a.p_sign_posn!==3&&a.p_sign_posn!==4)throw"Error: Invalid/missing p_sign_posn property, must be 0, 1, 2, 3 or 4";this.p_sign_posn=a.p_sign_posn;if(a.n_sign_posn!==0&&a.n_sign_posn!==1&&a.n_sign_posn!==2&&a.n_sign_posn!==3&&a.n_sign_posn!==4)throw"Error: Invalid/missing n_sign_posn property, must be 0, 1, 2, 3 or 4";this.n_sign_posn=a.n_sign_posn;if(typeof a.int_frac_digits!="number"&&a.int_frac_digits<0)throw"Error: Invalid/missing int_frac_digits property";this.int_frac_digits=a.int_frac_digits;if(a.int_p_cs_precedes!==0&&a.int_p_cs_precedes!==1)throw"Error: Invalid/missing int_p_cs_precedes property, must be 0 or 1";this.int_p_cs_precedes=a.int_p_cs_precedes;if(a.int_n_cs_precedes!==0&&a.int_n_cs_precedes!==1)throw"Error: Invalid/missing int_n_cs_precedes property, must be 0 or 1";this.int_n_cs_precedes=a.int_n_cs_precedes;if(a.int_p_sep_by_space!==0&&a.int_p_sep_by_space!==1&&a.int_p_sep_by_space!==2)throw"Error: Invalid/missing int_p_sep_by_spacev, must be 0, 1 or 2";this.int_p_sep_by_space=a.int_p_sep_by_space;if(a.int_n_sep_by_space!==0&&a.int_n_sep_by_space!==1&&a.int_n_sep_by_space!==2)throw"Error: Invalid/missing int_n_sep_by_space property, must be 0, 1, or 2";this.int_n_sep_by_space=a.int_n_sep_by_space;if(a.int_p_sign_posn!==0&&a.int_p_sign_posn!==1&&a.int_p_sign_posn!==2&&a.int_p_sign_posn!==3&&a.int_p_sign_posn!==4)throw"Error: Invalid/missing int_p_sign_posn property, must be 0, 1, 2, 3 or 4";this.int_p_sign_posn=a.int_p_sign_posn;if(a.int_n_sign_posn!==0&&a.int_n_sign_posn!==1&&a.int_n_sign_posn!==2&&a.int_n_sign_posn!==3&&a.int_n_sign_posn!==4)throw"Error: Invalid/missing int_n_sign_posn property, must be 0, 1, 2, 3 or 4";this.int_n_sign_posn=a.int_n_sign_posn;if(a==null||typeof a!="object")throw"Error: Invalid/missing time locale properties";try{this.abday=this._parseList(a.abday,7)}catch(b){throw"Error: Invalid abday property: "+b}try{this.day=this._parseList(a.day,7)}catch(b){throw"Error: Invalid day property: "+b}try{this.abmon=this._parseList(a.abmon,12)}catch(b){throw"Error: Invalid abmon property: "+b}try{this.mon=this._parseList(a.mon,12)}catch(b){throw"Error: Invalid mon property: "+b}try{this.d_fmt=this._validateFormatString(a.d_fmt)}catch(b){throw"Error: Invalid d_fmt property: "+b}try{this.t_fmt=this._validateFormatString(a.t_fmt)}catch(b){throw"Error: Invalid t_fmt property: "+b}try{this.d_t_fmt=this._validateFormatString(a.d_t_fmt)}catch(b){throw"Error: Invalid d_t_fmt property: "+b}try{var c=this._parseList(a.am_pm,2);this.am=c[0];this.pm=c[1]}catch(b){this.am="";this.pm=""}this.getAbbreviatedWeekdayName=function(a){if(typeof a=="undefined"||a===null)return this.abday;if(!jsworld._isInteger(a)||a<0||a>6)throw"Error: Invalid weekday argument, must be an integer [0..6]";return this.abday[a]};this.getWeekdayName=function(a){if(typeof a=="undefined"||a===null)return this.day;if(!jsworld._isInteger(a)||a<0||a>6)throw"Error: Invalid weekday argument, must be an integer [0..6]";return this.day[a]};this.getAbbreviatedMonthName=function(a){if(typeof a=="undefined"||a===null)return this.abmon;if(!jsworld._isInteger(a)||a<0||a>11)throw"Error: Invalid month argument, must be an integer [0..11]";return this.abmon[a]};this.getMonthName=function(a){if(typeof a=="undefined"||a===null)return this.mon;if(!jsworld._isInteger(a)||a<0||a>11)throw"Error: Invalid month argument, must be an integer [0..11]";return this.mon[a]};this.getDecimalPoint=function(){return this.decimal_point};this.getCurrencySymbol=function(){return this.currency_symbol};this.getIntCurrencySymbol=function(){return this.int_curr_symbol.substring(0,3)};this.currencySymbolPrecedes=function(){if(this.p_cs_precedes==1)return true;else return false};this.intCurrencySymbolPrecedes=function(){if(this.int_p_cs_precedes==1)return true;else return false};this.getMonetaryDecimalPoint=function(){return this.mon_decimal_point};this.getFractionalDigits=function(){return this.frac_digits};this.getIntFractionalDigits=function(){return this.int_frac_digits}};jsworld.NumericFormatter=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.format=function(a,b){if(typeof a=="string")a=jsworld._trim(a);if(!jsworld._isNumber(a))throw"Error: The input is not a number";var c=parseFloat(a,10);var d=jsworld._getPrecision(b);if(d!=-1)c=Math.round(c*Math.pow(10,d))/Math.pow(10,d);var e=jsworld._splitNumber(String(c));var f;if(c===0)f="0";else f=jsworld._hasOption("^",b)?e.integer:jsworld._formatIntegerPart(e.integer,this.lc.grouping,this.lc.thousands_sep);var g=d!=-1?jsworld._formatFractionPart(e.fraction,d):e.fraction;var h=g.length?f+this.lc.decimal_point+g:f;if(jsworld._hasOption("~",b)||c===0){return h}else{if(jsworld._hasOption("+",b)||c<0){if(c>0)return"+"+h;else if(c<0)return"-"+h;else return h}else{return h}}}};jsworld.DateTimeFormatter=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance.";this.lc=a;this.formatDate=function(a){var b=null;if(typeof a=="string"){try{b=jsworld.parseIsoDate(a)}catch(c){b=jsworld.parseIsoDateTime(a)}}else if(a!==null&&typeof a=="object"){b=a}else{throw"Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"}return this._applyFormatting(b,this.lc.d_fmt)};this.formatTime=function(a){var b=null;if(typeof a=="string"){try{b=jsworld.parseIsoTime(a)}catch(c){b=jsworld.parseIsoDateTime(a)}}else if(a!==null&&typeof a=="object"){b=a}else{throw"Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"}return this._applyFormatting(b,this.lc.t_fmt)};this.formatDateTime=function(a){var b=null;if(typeof a=="string"){b=jsworld.parseIsoDateTime(a)}else if(a!==null&&typeof a=="object"){b=a}else{throw"Error: Invalid date argument, must be a Date object or an ISO-8601 date/time string"}return this._applyFormatting(b,this.lc.d_t_fmt)};this._applyFormatting=function(a,b){b=b.replace(/%%/g,"%");b=b.replace(/%a/g,this.lc.abday[a.getDay()]);b=b.replace(/%A/g,this.lc.day[a.getDay()]);b=b.replace(/%b/g,this.lc.abmon[a.getMonth()]);b=b.replace(/%B/g,this.lc.mon[a.getMonth()]);b=b.replace(/%d/g,jsworld._zeroPad(a.getDate(),2));b=b.replace(/%e/g,jsworld._spacePad(a.getDate(),2));b=b.replace(/%F/g,a.getFullYear()+"-"+jsworld._zeroPad(a.getMonth()+1,2)+"-"+jsworld._zeroPad(a.getDate(),2));b=b.replace(/%h/g,this.lc.abmon[a.getMonth()]);b=b.replace(/%H/g,jsworld._zeroPad(a.getHours(),2));b=b.replace(/%I/g,jsworld._zeroPad(this._hours12(a.getHours()),2));b=b.replace(/%k/g,a.getHours());b=b.replace(/%l/g,this._hours12(a.getHours()));b=b.replace(/%m/g,jsworld._zeroPad(a.getMonth()+1,2));b=b.replace(/%n/g,"\n");b=b.replace(/%M/g,jsworld._zeroPad(a.getMinutes(),2));b=b.replace(/%p/g,this._getAmPm(a.getHours()));b=b.replace(/%P/g,this._getAmPm(a.getHours()).toLocaleLowerCase());b=b.replace(/%R/g,jsworld._zeroPad(a.getHours(),2)+":"+jsworld._zeroPad(a.getMinutes(),2));b=b.replace(/%S/g,jsworld._zeroPad(a.getSeconds(),2));b=b.replace(/%T/g,jsworld._zeroPad(a.getHours(),2)+":"+jsworld._zeroPad(a.getMinutes(),2)+":"+jsworld._zeroPad(a.getSeconds(),2));b=b.replace(/%w/g,this.lc.day[a.getDay()]);b=b.replace(/%y/g,(new String(a.getFullYear())).substring(2));b=b.replace(/%Y/g,a.getFullYear());b=b.replace(/%Z/g,"");b=b.replace(/%[a-zA-Z]/g,"");return b};this._hours12=function(a){if(a===0)return 12;else if(a>12)return a-12;else return a};this._getAmPm=function(a){if(a===0||a>12)return this.lc.pm;else return this.lc.am}};jsworld.MonetaryFormatter=function(a,b,c){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.currencyFractionDigits={AFN:0,ALL:0,AMD:0,BHD:3,BIF:0,BYR:0,CLF:0,CLP:0,COP:0,CRC:0,DJF:0,GNF:0,GYD:0,HUF:0,IDR:0,IQD:0,IRR:0,ISK:0,JOD:3,JPY:0,KMF:0,KRW:0,KWD:3,LAK:0,LBP:0,LYD:3,MGA:0,MMK:0,MNT:0,MRO:0,MUR:0,OMR:3,PKR:0,PYG:0,RSD:0,RWF:0,SLL:0,SOS:0,STD:0,SYP:0,TND:3,TWD:0,TZS:0,UGX:0,UZS:0,VND:0,VUV:0,XAF:0,XOF:0,XPF:0,YER:0,ZMK:0};if(typeof b=="string"){this.currencyCode=b.toUpperCase();var d=this.currencyFractionDigits[this.currencyCode];if(typeof d!="number")d=2;this.lc.frac_digits=d;this.lc.int_frac_digits=d}else{this.currencyCode=this.lc.int_curr_symbol.substring(0,3).toUpperCase()}this.intSep=this.lc.int_curr_symbol.charAt(3);if(this.currencyCode==this.lc.int_curr_symbol.substring(0,3)){this.internationalFormatting=false;this.curSym=this.lc.currency_symbol}else{if(typeof c=="string"){this.curSym=c;this.internationalFormatting=false}else{this.internationalFormatting=true}}this.getCurrencySymbol=function(){return this.curSym};this.currencySymbolPrecedes=function(a){if(typeof a=="string"&&a=="i"){if(this.lc.int_p_cs_precedes==1)return true;else return false}else{if(this.internationalFormatting){if(this.lc.int_p_cs_precedes==1)return true;else return false}else{if(this.lc.p_cs_precedes==1)return true;else return false}}};this.getDecimalPoint=function(){return this.lc.mon_decimal_point};this.getFractionalDigits=function(a){if(typeof a=="string"&&a=="i"){return this.lc.int_frac_digits}else{if(this.internationalFormatting)return this.lc.int_frac_digits;else return this.lc.frac_digits}};this.format=function(a,b){var c;if(typeof a=="string"){a=jsworld._trim(a);c=parseFloat(a);if(typeof c!="number"||isNaN(c))throw"Error: Amount string not a number"}else if(typeof a=="number"){c=a}else{throw"Error: Amount not a number"}var d=jsworld._getPrecision(b);if(d==-1){if(this.internationalFormatting||jsworld._hasOption("i",b))d=this.lc.int_frac_digits;else d=this.lc.frac_digits}c=Math.round(c*Math.pow(10,d))/Math.pow(10,d);var e=jsworld._splitNumber(String(c));var f;if(c===0)f="0";else f=jsworld._hasOption("^",b)?e.integer:jsworld._formatIntegerPart(e.integer,this.lc.mon_grouping,this.lc.mon_thousands_sep);var g;if(d==-1){if(this.internationalFormatting||jsworld._hasOption("i",b))g=jsworld._formatFractionPart(e.fraction,this.lc.int_frac_digits);else g=jsworld._formatFractionPart(e.fraction,this.lc.frac_digits)}else{g=jsworld._formatFractionPart(e.fraction,d)}var h;if(this.lc.frac_digits>0||g.length)h=f+this.lc.mon_decimal_point+g;else h=f;if(jsworld._hasOption("~",b)){return h}else{var i=jsworld._hasOption("!",b)?true:false;var j=c<0?"-":"+";if(this.internationalFormatting||jsworld._hasOption("i",b)){if(i)return this._formatAsInternationalCurrencyWithNoSym(j,h);else return this._formatAsInternationalCurrency(j,h)}else{if(i)return this._formatAsLocalCurrencyWithNoSym(j,h);else return this._formatAsLocalCurrency(j,h)}}};this._formatAsLocalCurrency=function(a,b){if(a=="+"){if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return"("+b+this.curSym+")"}else if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return"("+this.curSym+b+")"}else if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return"("+b+" "+this.curSym+")"}else if(this.lc.p_sign_posn===0&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return"("+this.curSym+" "+b+")"}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b+this.curSym}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b+" "+this.curSym}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+" "+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+" "+b+this.curSym}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+this.curSym+b}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.curSym+b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.curSym+" "+b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.curSym+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.curSym+b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign+this.curSym}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign+this.curSym}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+this.curSym+" "+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign+" "+this.curSym}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+this.curSym+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.curSym+this.lc.positive_sign+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.curSym+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.curSym+this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.curSym+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.curSym+" "+this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return"("+b+this.curSym+")"}else if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return"("+this.curSym+b+")"}else if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return"("+b+" "+this.curSym+")"}else if(this.lc.n_sign_posn===0&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return"("+this.curSym+" "+b+")"}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b+this.curSym}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b+" "+this.curSym}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+" "+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+" "+b+this.curSym}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+this.curSym+b}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.curSym+b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.curSym+" "+b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.curSym+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.curSym+b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign+this.curSym}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign+this.curSym}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+this.curSym+" "+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign+" "+this.curSym}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+this.curSym+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.curSym+this.lc.negative_sign+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.curSym+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.curSym+this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.curSym+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.curSym+" "+this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC MONETARY definition"};this._formatAsInternationalCurrency=function(a,b){if(a=="+"){if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return"("+b+this.currencyCode+")"}else if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return"("+this.currencyCode+b+")"}else if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return"("+b+this.intSep+this.currencyCode+")"}else if(this.lc.int_p_sign_posn===0&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return"("+this.currencyCode+this.intSep+b+")"}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b+this.currencyCode}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b+this.intSep+this.currencyCode}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+this.intSep+b+this.currencyCode}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.currencyCode+b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.intSep+b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.currencyCode+b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign+this.currencyCode}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign+this.currencyCode}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign+this.intSep+this.currencyCode}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.currencyCode+this.intSep+this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return"("+b+this.currencyCode+")"}else if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return"("+this.currencyCode+b+")"}else if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return"("+b+this.intSep+this.currencyCode+")"}else if(this.lc.int_n_sign_posn===0&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return"("+this.currencyCode+this.intSep+b+")"}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b+this.currencyCode}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b+this.intSep+this.currencyCode}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+this.intSep+b+this.currencyCode}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.currencyCode+b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.intSep+b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.currencyCode+b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign+this.currencyCode}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign+this.currencyCode}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.currencyCode+this.intSep+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign+this.intSep+this.currencyCode}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+this.currencyCode+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.currencyCode+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.currencyCode+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.currencyCode+this.intSep+this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC MONETARY definition"};this._formatAsLocalCurrencyWithNoSym=function(a,b){if(a=="+"){if(this.lc.p_sign_posn===0){return"("+b+")"}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===1&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===2&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===3&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===0&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===1&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+" "+b}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===0){return b+" "+this.lc.positive_sign}else if(this.lc.p_sign_posn===4&&this.lc.p_sep_by_space===2&&this.lc.p_cs_precedes===1){return this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.n_sign_posn===0){return"("+b+")"}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===1&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===2&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===3&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===0&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===1&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+" "+b}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===0){return b+" "+this.lc.negative_sign}else if(this.lc.n_sign_posn===4&&this.lc.n_sep_by_space===2&&this.lc.n_cs_precedes===1){return this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC MONETARY definition"};this._formatAsInternationalCurrencyWithNoSym=function(a,b){if(a=="+"){if(this.lc.int_p_sign_posn===0){return"("+b+")"}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===1&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===2&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===3&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===0){return b+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===0&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===1&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+this.intSep+b}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===0){return b+this.intSep+this.lc.positive_sign}else if(this.lc.int_p_sign_posn===4&&this.lc.int_p_sep_by_space===2&&this.lc.int_p_cs_precedes===1){return this.lc.positive_sign+b}}else if(a=="-"){if(this.lc.int_n_sign_posn===0){return"("+b+")"}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===1&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===2&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===3&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===0){return b+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===0&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===1&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+this.intSep+b}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===0){return b+this.intSep+this.lc.negative_sign}else if(this.lc.int_n_sign_posn===4&&this.lc.int_n_sep_by_space===2&&this.lc.int_n_cs_precedes===1){return this.lc.negative_sign+b}}throw"Error: Invalid POSIX LC_MONETARY definition"}};jsworld.NumericParser=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.parse=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=jsworld._trim(a);b=jsworld._stringReplaceAll(a,this.lc.thousands_sep,"");b=jsworld._stringReplaceAll(b,this.lc.decimal_point,".");if(jsworld._isNumber(b))return parseFloat(b,10);else throw"Parse error: Invalid number string"}};jsworld.DateTimeParser=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance.";this.lc=a;this.parseTime=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._extractTokens(this.lc.t_fmt,a);var c=false;if(b.hour!==null&&b.minute!==null&&b.second!==null){c=true}else if(b.hourAmPm!==null&&b.am!==null&&b.minute!==null&&b.second!==null){if(b.am){b.hour=parseInt(b.hourAmPm,10)}else{if(b.hourAmPm==12)b.hour=0;else b.hour=parseInt(b.hourAmPm,10)+12}c=true}if(c)return jsworld._zeroPad(b.hour,2)+":"+jsworld._zeroPad(b.minute,2)+":"+jsworld._zeroPad(b.second,2);else throw"Parse error: Invalid/ambiguous time string"};this.parseDate=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._extractTokens(this.lc.d_fmt,a);var c=false;if(b.year!==null&&b.month!==null&&b.day!==null){c=true}if(c)return jsworld._zeroPad(b.year,4)+"-"+jsworld._zeroPad(b.month,2)+"-"+jsworld._zeroPad(b.day,2);else throw"Parse error: Invalid date string"};this.parseDateTime=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._extractTokens(this.lc.d_t_fmt,a);var c=false;var d=false;if(b.hour!==null&&b.minute!==null&&b.second!==null){c=true}else if(b.hourAmPm!==null&&b.am!==null&&b.minute!==null&&b.second!==null){if(b.am){b.hour=parseInt(b.hourAmPm,10)}else{if(b.hourAmPm==12)b.hour=0;else b.hour=parseInt(b.hourAmPm,10)+12}c=true}if(b.year!==null&&b.month!==null&&b.day!==null){d=true}if(d&&c)return jsworld._zeroPad(b.year,4)+"-"+jsworld._zeroPad(b.month,2)+"-"+jsworld._zeroPad(b.day,2)+" "+jsworld._zeroPad(b.hour,2)+":"+jsworld._zeroPad(b.minute,2)+":"+jsworld._zeroPad(b.second,2);else throw"Parse error: Invalid/ambiguous date/time string"};this._extractTokens=function(a,b){var c={year:null,month:null,day:null,hour:null,hourAmPm:null,am:null,minute:null,second:null,weekday:null};while(a.length>0){if(a.charAt(0)=="%"&&a.charAt(1)!=""){var d=a.substring(0,2);if(d=="%%"){b=b.substring(1)}else if(d=="%a"){for(var e=0;e31)throw"Parse error: Unrecognised day of the month (%e)";b=b.substring(f.length)}else if(d=="%F"){if(/^\d\d\d\d/.test(b)){c.year=parseInt(b.substring(0,4),10);b=b.substring(4)}else{throw"Parse error: Unrecognised date (%F)"}if(jsworld._stringStartsWith(b,"-"))b=b.substring(1);else throw"Parse error: Unrecognised date (%F)";if(/^0[1-9]|1[0-2]/.test(b)){c.month=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised date (%F)";if(jsworld._stringStartsWith(b,"-"))b=b.substring(1);else throw"Parse error: Unrecognised date (%F)";if(/^0[1-9]|[1-2][0-9]|3[0-1]/.test(b)){c.day=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised date (%F)"}else if(d=="%H"){if(/^[0-1][0-9]|2[0-3]/.test(b)){c.hour=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised hour (%H)"}else if(d=="%I"){if(/^0[1-9]|1[0-2]/.test(b)){c.hourAmPm=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised hour (%I)"}else if(d=="%k"){var g=b.match(/^(\d{1,2})/);c.hour=parseInt(g,10);if(isNaN(c.hour)||c.hour<0||c.hour>23)throw"Parse error: Unrecognised hour (%k)";b=b.substring(g.length)}else if(d=="%l"){var g=b.match(/^(\d{1,2})/);c.hourAmPm=parseInt(g,10);if(isNaN(c.hourAmPm)||c.hourAmPm<1||c.hourAmPm>12)throw"Parse error: Unrecognised hour (%l)";b=b.substring(g.length)}else if(d=="%m"){if(/^0[1-9]|1[0-2]/.test(b)){c.month=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised month (%m)"}else if(d=="%M"){if(/^[0-5][0-9]/.test(b)){c.minute=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised minute (%M)"}else if(d=="%n"){if(b.charAt(0)=="\n")b=b.substring(1);else throw"Parse error: Unrecognised new line (%n)"}else if(d=="%p"){if(jsworld._stringStartsWith(b,this.lc.am)){c.am=true;b=b.substring(this.lc.am.length)}else if(jsworld._stringStartsWith(b,this.lc.pm)){c.am=false;b=b.substring(this.lc.pm.length)}else throw"Parse error: Unrecognised AM/PM value (%p)"}else if(d=="%P"){if(jsworld._stringStartsWith(b,this.lc.am.toLowerCase())){c.am=true;b=b.substring(this.lc.am.length)}else if(jsworld._stringStartsWith(b,this.lc.pm.toLowerCase())){c.am=false;b=b.substring(this.lc.pm.length)}else throw"Parse error: Unrecognised AM/PM value (%P)"}else if(d=="%R"){if(/^[0-1][0-9]|2[0-3]/.test(b)){c.hour=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%R)";if(jsworld._stringStartsWith(b,":"))b=b.substring(1);else throw"Parse error: Unrecognised time (%R)";if(/^[0-5][0-9]/.test(b)){c.minute=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%R)"}else if(d=="%S"){if(/^[0-5][0-9]/.test(b)){c.second=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised second (%S)"}else if(d=="%T"){if(/^[0-1][0-9]|2[0-3]/.test(b)){c.hour=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%T)";if(jsworld._stringStartsWith(b,":"))b=b.substring(1);else throw"Parse error: Unrecognised time (%T)";if(/^[0-5][0-9]/.test(b)){c.minute=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%T)";if(jsworld._stringStartsWith(b,":"))b=b.substring(1);else throw"Parse error: Unrecognised time (%T)";if(/^[0-5][0-9]/.test(b)){c.second=parseInt(b.substring(0,2),10);b=b.substring(2)}else throw"Parse error: Unrecognised time (%T)"}else if(d=="%w"){if(/^\d/.test(b)){c.weekday=parseInt(b.substring(0,1),10);b=b.substring(1)}else throw"Parse error: Unrecognised weekday number (%w)"}else if(d=="%y"){if(/^\d\d/.test(b)){var h=parseInt(b.substring(0,2),10);if(h>50)c.year=1900+h;else c.year=2e3+h;b=b.substring(2)}else throw"Parse error: Unrecognised year (%y)"}else if(d=="%Y"){if(/^\d\d\d\d/.test(b)){c.year=parseInt(b.substring(0,4),10);b=b.substring(4)}else throw"Parse error: Unrecognised year (%Y)"}else if(d=="%Z"){if(a.length===0)break}a=a.substring(2)}else{if(a.charAt(0)!=b.charAt(0))throw'Parse error: Unexpected symbol "'+b.charAt(0)+'" in date/time string';a=a.substring(1);b=b.substring(1)}}return c}};jsworld.MonetaryParser=function(a){if(typeof a!="object"||a._className!="jsworld.Locale")throw"Constructor error: You must provide a valid jsworld.Locale instance";this.lc=a;this.parse=function(a){if(typeof a!="string")throw"Parse error: Argument must be a string";var b=this._detectCurrencySymbolType(a);var c,d;if(b=="local"){c="local";d=a.replace(this.lc.getCurrencySymbol(),"")}else if(b=="int"){c="int";d=a.replace(this.lc.getIntCurrencySymbol(),"")}else if(b=="none"){c="local";d=a}else throw"Parse error: Internal assert failure";d=jsworld._stringReplaceAll(d,this.lc.mon_thousands_sep,"");d=d.replace(this.lc.mon_decimal_point,".");d=d.replace(/\s*/g,"");d=this._removeLocalNonNegativeSign(d,c);d=this._normaliseNegativeSign(d,c);if(jsworld._isNumber(d))return parseFloat(d,10);else throw"Parse error: Invalid currency amount string"};this._detectCurrencySymbolType=function(a){if(this.lc.getCurrencySymbol().length>this.lc.getIntCurrencySymbol().length){if(a.indexOf(this.lc.getCurrencySymbol())!=-1)return"local";else if(a.indexOf(this.lc.getIntCurrencySymbol())!=-1)return"int";else return"none"}else{if(a.indexOf(this.lc.getIntCurrencySymbol())!=-1)return"int";else if(a.indexOf(this.lc.getCurrencySymbol())!=-1)return"local";else return"none"}};this._removeLocalNonNegativeSign=function(a,b){a=a.replace(this.lc.positive_sign,"");if((b=="local"&&this.lc.p_sign_posn===0||b=="int"&&this.lc.int_p_sign_posn===0)&&/\(\d+\.?\d*\)/.test(a)){a=a.replace("(","");a=a.replace(")","")}return a};this._normaliseNegativeSign=function(a,b){a=a.replace(this.lc.negative_sign,"-");if(b=="local"&&this.lc.n_sign_posn===0||b=="int"&&this.lc.int_n_sign_posn===0){if(/^\(\d+\.?\d*\)$/.test(a)){a=a.replace("(","");a=a.replace(")","");return"-"+a}}if(b=="local"&&this.lc.n_sign_posn==2||b=="int"&&this.lc.int_n_sign_posn==2){if(/^\d+\.?\d*-$/.test(a)){a=a.replace("-","");return"-"+a}}if(b=="local"&&this.lc.n_cs_precedes===0&&this.lc.n_sign_posn==3||b=="local"&&this.lc.n_cs_precedes===0&&this.lc.n_sign_posn==4||b=="int"&&this.lc.int_n_cs_precedes===0&&this.lc.int_n_sign_posn==3||b=="int"&&this.lc.int_n_cs_precedes===0&&this.lc.int_n_sign_posn==4){if(/^\d+\.?\d*-$/.test(a)){a=a.replace("-","");return"-"+a}}return a}} - - -if(typeof POSIX_LC == "undefined") var POSIX_LC = {}; - -POSIX_LC.en_US = { - "decimal_point" : ".", - "thousands_sep" : ",", - "grouping" : "3", - "abday" : ["Sun","Mon","Tue","Wed","Thu","Fri","Sat"], - "day" : ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"], - "abmon" : ["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"], - "mon" : ["January","February","March","April","May","June","July","August","September","October","November","December"], - "d_fmt" : "%m/%e/%y", - "t_fmt" : "%I:%M:%S %p", - "d_t_fmt" : "%B %e, %Y %I:%M:%S %p %Z", - "am_pm" : ["AM","PM"], - "int_curr_symbol" : "USD ", - "currency_symbol" : "\u0024", - "mon_decimal_point" : ".", - "mon_thousands_sep" : ",", - "mon_grouping" : "3", - "positive_sign" : "", - "negative_sign" : "-", - "int_frac_digits" : 2, - "frac_digits" : 2, - "p_cs_precedes" : 1, - "n_cs_precedes" : 1, - "p_sep_by_space" : 0, - "n_sep_by_space" : 0, - "p_sign_posn" : 1, - "n_sign_posn" : 1, - "int_p_cs_precedes" : 1, - "int_n_cs_precedes" : 1, - "int_p_sep_by_space" : 0, - "int_n_sep_by_space" : 0, - "int_p_sign_posn" : 1, - "int_n_sign_posn" : 1 -} - -if(typeof POSIX_LC == "undefined") var POSIX_LC = {}; - -POSIX_LC.fr_FR = { - "decimal_point" : ",", - "thousands_sep" : "\u00a0", - "grouping" : "3", - "abday" : ["dim.","lun.","mar.", - "mer.","jeu.","ven.", - "sam."], - "day" : ["dimanche","lundi","mardi", - "mercredi","jeudi","vendredi", - "samedi"], - "abmon" : ["janv.","f\u00e9vr.","mars", - "avr.","mai","juin", - "juil.","ao\u00fbt","sept.", - "oct.","nov.","d\u00e9c."], - "mon" : ["janvier","f\u00e9vrier","mars", - "avril","mai","juin", - "juillet","ao\u00fbt","septembre", - "octobre","novembre","d\u00e9cembre"], - "d_fmt" : "%d/%m/%y", - "t_fmt" : "%H:%M:%S", - "d_t_fmt" : "%e %B %Y %H:%M:%S %Z", - "am_pm" : ["AM","PM"], - "int_curr_symbol" : "EUR ", - "currency_symbol" : "\u20ac", - "mon_decimal_point" : ",", - "mon_thousands_sep" : "\u00a0", - "mon_grouping" : "3", - "positive_sign" : "", - "negative_sign" : "-", - "int_frac_digits" : 2, - "frac_digits" : 2, - "p_cs_precedes" : 0, - "n_cs_precedes" : 0, - "p_sep_by_space" : 1, - "n_sep_by_space" : 1, - "p_sign_posn" : 1, - "n_sign_posn" : 1, - "int_p_cs_precedes" : 0, - "int_n_cs_precedes" : 0, - "int_p_sep_by_space" : 1, - "int_n_sep_by_space" : 1, - "int_p_sign_posn" : 1, - "int_n_sign_posn" : 1 -}; - -/** https://github.com/csnover/js-iso8601 */(function(n,f){var u=n.parse,c=[1,4,5,6,7,10,11];n.parse=function(t){var i,o,a=0;if(o=/^(\d{4}|[+\-]\d{6})(?:-(\d{2})(?:-(\d{2}))?)?(?:T(\d{2}):(\d{2})(?::(\d{2})(?:\.(\d{3}))?)?(?:(Z)|([+\-])(\d{2})(?::(\d{2}))?)?)?$/.exec(t)){for(var v=0,r;r=c[v];++v)o[r]=+o[r]||0;o[2]=(+o[2]||1)-1,o[3]=+o[3]||1,o[8]!=="Z"&&o[9]!==f&&(a=o[10]*60+o[11],o[9]==="+"&&(a=0-a)),i=n.UTC(o[1],o[2],o[3],o[4],o[5]+a,o[6],o[7])}else i=u?u(t):NaN;return i}})(Date) - -/*! - * geo-location-javascript v0.4.3 - * http://code.google.com/p/geo-location-javascript/ - * - * Copyright (c) 2009 Stan Wiechers - * Licensed under the MIT licenses. - * - * Revision: $Rev: 68 $: - * Author: $Author: whoisstan $: - * Date: $Date: 2010-02-15 13:42:19 +0100 (Mon, 15 Feb 2010) $: - */ -var geo_position_js=function() { - - var pub = {}; - var provider=null; - - pub.getCurrentPosition = function(successCallback,errorCallback,options) - { - provider.getCurrentPosition(successCallback, errorCallback,options); - } - - pub.init = function() - { - try - { - if (typeof(geo_position_js_simulator)!="undefined") - { - provider=geo_position_js_simulator; - } - else if (typeof(bondi)!="undefined" && typeof(bondi.geolocation)!="undefined") - { - provider=bondi.geolocation; - } - else if (typeof(navigator.geolocation)!="undefined") - { - provider=navigator.geolocation; - pub.getCurrentPosition = function(successCallback, errorCallback, options) - { - function _successCallback(p) - { - //for mozilla geode,it returns the coordinates slightly differently - if(typeof(p.latitude)!="undefined") - { - successCallback({timestamp:p.timestamp, coords: {latitude:p.latitude,longitude:p.longitude}}); - } - else - { - successCallback(p); - } - } - provider.getCurrentPosition(_successCallback,errorCallback,options); - } - } - else if(typeof(window.google)!="undefined" && typeof(google.gears)!="undefined") - { - provider=google.gears.factory.create('beta.geolocation'); - } - else if ( typeof(Mojo) !="undefined" && typeof(Mojo.Service.Request)!="Mojo.Service.Request") - { - provider=true; - pub.getCurrentPosition = function(successCallback, errorCallback, options) - { - - parameters={}; - if(options) - { - //http://developer.palm.com/index.php?option=com_content&view=article&id=1673#GPS-getCurrentPosition - if (options.enableHighAccuracy && options.enableHighAccuracy==true) - { - parameters.accuracy=1; - } - if (options.maximumAge) - { - parameters.maximumAge=options.maximumAge; - } - if (options.responseTime) - { - if(options.responseTime<5) - { - parameters.responseTime=1; - } - else if (options.responseTime<20) - { - parameters.responseTime=2; - } - else - { - parameters.timeout=3; - } - } - } - - - r=new Mojo.Service.Request('palm://com.palm.location', { - method:"getCurrentPosition", - parameters:parameters, - onSuccess: function(p){successCallback({timestamp:p.timestamp, coords: {latitude:p.latitude, longitude:p.longitude,heading:p.heading}});}, - onFailure: function(e){ - if (e.errorCode==1) - { - errorCallback({code:3,message:"Timeout"}); - } - else if (e.errorCode==2) - { - errorCallback({code:2,message:"Position Unavailable"}); - } - else - { - errorCallback({code:0,message:"Unknown Error: webOS-code"+errorCode}); - } - } - }); - } - - } - else if (typeof(device)!="undefined" && typeof(device.getServiceObject)!="undefined") - { - provider=device.getServiceObject("Service.Location", "ILocation"); - - //override default method implementation - pub.getCurrentPosition = function(successCallback, errorCallback, options) - { - function callback(transId, eventCode, result) { - if (eventCode == 4) - { - errorCallback({message:"Position unavailable", code:2}); - } - else - { - //no timestamp of location given? - successCallback({timestamp:null, coords: {latitude:result.ReturnValue.Latitude, longitude:result.ReturnValue.Longitude, altitude:result.ReturnValue.Altitude,heading:result.ReturnValue.Heading}}); - } - } - //location criteria - var criteria = new Object(); - criteria.LocationInformationClass = "BasicLocationInformation"; - //make the call - provider.ILocation.GetLocation(criteria,callback); - } - } - } - catch (e){ - alert("error="+e); - if(typeof(console)!="undefined") - { - console.log(e); - } - return false; - } - return provider!=null; - } - - - return pub; -}(); -// Couldn't get unminified version to work , go here for docs => https://github.com/iamnoah/writeCapture -(function(E,a){var j=a.document;function A(Q){var Z=j.createElement("div");j.body.insertBefore(Z,null);E.replaceWith(Z,'\n
    \n
    \n
    \n \n\n
    \n
    \n \n
    \n

    '); - __out.push(__sanitize(t('Invite Link'))); - __out.push(' '); - __out.push(__sanitize(USER.referral_url)); - __out.push('

    \n\n \n\n
    \n\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/login": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - __out.push('
    \n\t

    '); - __out.push(__sanitize(t('Sign In'))); - __out.push('

    \n\t
    \n\t\t
    \n\n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\n\t\t\t
    \n\n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\t\t\t
    \n\t\t\t\t\n\t\t\t
    \n\n\t\t\t
    \n\n
    \n\n

    '); - __out.push(__sanitize(t('Forgot Password?'))); - __out.push('

    \n\n\t\t
    \n\t
    \n
    \n\n
    \n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/modules/credit_card": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var printCard; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - if (this.cards === "new") { - __out.push('\n
    \n
    \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n \n \n
    \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n \n
    \n
    \n
    \n \n
    \n
    \n
    \n'); - } else { - __out.push('\n '); - printCard = __bind(function(card, index) { - var exp, style; - __out.push('\n
    \n '); - style = "background-position:-173px"; - __out.push('\n '); - if (card.get("card_type") === "Visa") { - style = "background-position:0px"; - } - __out.push('\n '); - if (card.get("card_type") === "MasterCard") { - style = "background-position:-42px"; - } - __out.push('\n '); - if (card.get("card_type") === "American Express") { - style = "background-position:-130px"; - } - __out.push('\n '); - if (card.get("card_type") === "Discover Card") { - style = "background-position:-85px"; - } - __out.push('\n
    \n
    \n ****'); - __out.push(__sanitize(card.get("card_number"))); - __out.push('\n \n '); - if (card.get("card_expiration")) { - __out.push('\n '); - __out.push(__sanitize(t('Expiry'))); - __out.push('\n '); - exp = card.get('card_expiration').split('-'); - __out.push('\n '); - __out.push(__sanitize("" + exp[0] + "-" + exp[1])); - __out.push('\n '); - } - __out.push('\n \n \n \n '); - if (card.get("default")) { - __out.push('\n ('); - __out.push(__sanitize(t('default card'))); - __out.push(')\n '); - } - __out.push('\n '); - if (this.cards.length > 1 && !card.get("default")) { - __out.push('\n '); - __out.push(__sanitize(t('make default'))); - __out.push('\n '); - } - __out.push('\n \n '); - __out.push(__sanitize(t('Edit'))); - __out.push('\n \n '); - if (this.cards.length > 1) { - __out.push('\n '); - __out.push(__sanitize(t('Delete'))); - __out.push('\n '); - } - __out.push('\n
    \n '); - _.each(this.cards.models, printCard); - __out.push('\n
    \n
    \n\n'); - } - __out.push('\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/modules/sub_header": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - __out.push('
    \n
    '); - __out.push(__sanitize(this.heading)); - __out.push('
    \n
    \n '); - if (window.USER.first_name) { - __out.push('\n '); - __out.push(__sanitize(t('Hello Greeting', { - name: USER.first_name - }))); - __out.push('\n '); - } - __out.push('\n
    \n
    \n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/promotions": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var promo, _i, _len, _ref; - __out.push(require('templates/clients/modules/sub_header').call(this, { - heading: t("Promotions") - })); - __out.push('\n\n
    \n
    \n
    \n \n \n
    \n
    \n \n \n\n \n
    \n '); - if (this.promos.length > 0) { - __out.push('\n
    \n

    '); - __out.push(__sanitize(t('Your Available Promotions'))); - __out.push('

    \n \n \n\n \n \n \n \n \n \n \n \n '); - _ref = this.promos; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - promo = _ref[_i]; - __out.push('\n \n \n \n \n \n \n '); - } - __out.push('\n \n
    '); - __out.push(__sanitize(t('Code'))); - __out.push(''); - __out.push(__sanitize(t('Details'))); - __out.push(''); - __out.push(__sanitize(t('Starts'))); - __out.push(''); - __out.push(__sanitize(t('Expires'))); - __out.push('
    '); - __out.push(__sanitize(promo.code)); - __out.push(''); - __out.push(__sanitize(promo.description)); - __out.push(''); - __out.push(__sanitize(app.helpers.formatDate(promo.starts_at, true, "America/Los_Angeles"))); - __out.push(''); - __out.push(__sanitize(app.helpers.formatDate(promo.ends_at, true, "America/Los_Angeles"))); - __out.push('
    \n
    \n '); - } else { - __out.push('\n\n

    '); - __out.push(__sanitize(t('No Active Promotions'))); - __out.push('

    \n '); - } - __out.push('\n\n
    \n
    \n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/clients/request": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - var showFavoriteLocation; - showFavoriteLocation = function(location, index) { - var alphabet; - __out.push('\n '); - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - __out.push('\n
    \n '); - __out.push(__sanitize(location.nickname)); - return __out.push('\n
    \n \n \n \n \n \n \n \n \n \n \n \n \n \n
    \n

    '); - __out.push(__sanitize(t('Driver Name:'))); - __out.push('

    \n

    \n
    \n

    '); - __out.push(__sanitize(t('Driver #:'))); - __out.push('

    \n

    \n
    \n

    '); - __out.push(__sanitize(t('Pickup Address:'))); - __out.push('

    \n

    \n
    \n ');
-      __out.push(__sanitize(t('Add to Favorite Locations')));
-      __out.push('\n
    \n
    \n

    \n '); - __out.push(__sanitize(t('Nickname:'))); - __out.push('\n \n \n \n \n
    \n
    \n
    \n
    \n

    '); - __out.push(__sanitize(t('Your last trip'))); - __out.push('

    \n
    \n \n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n ');
-      __out.push(__sanitize(t('Star')));
-      __out.push('\n \n \n
    \n \n
    \n \n
    \n \n
    \n \n\n
    \n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "templates/shared/menu": function(exports, require, module) {module.exports = function(__obj) { - if (!__obj) __obj = {}; - var __out = [], __capture = function(callback) { - var out = __out, result; - __out = []; - callback.call(this); - result = __out.join(''); - __out = out; - return __safe(result); - }, __sanitize = function(value) { - if (value && value.ecoSafe) { - return value; - } else if (typeof value !== 'undefined' && value != null) { - return __escape(value); - } else { - return ''; - } - }, __safe, __objSafe = __obj.safe, __escape = __obj.escape; - __safe = __obj.safe = function(value) { - if (value && value.ecoSafe) { - return value; - } else { - if (!(typeof value !== 'undefined' && value != null)) value = ''; - var result = new String(value); - result.ecoSafe = true; - return result; - } - }; - if (!__escape) { - __escape = __obj.escape = function(value) { - return ('' + value) - .replace(/&/g, '&') - .replace(//g, '>') - .replace(/"/g, '"'); - }; - } - (function() { - (function() { - __out.push('\n'); - }).call(this); - - }).call(__obj); - __obj.safe = __objSafe, __obj.escape = __escape; - return __out.join(''); -}}, "translations/en": function(exports, require, module) {(function() { - exports.translations = { - "Uber": "Uber", - "Sign Up": "Sign Up", - "Ride Request": "Ride Request", - "Invite Friends": "Invite Friends", - "Promotions": "Promotions", - "Billing": "Billing", - "Settings": "Settings", - "Forgot Password?": "Forgot Password?", - "Password Recovery": "Password Recovery", - "Login": "Login", - "Trip Detail": "Trip Detail", - "Password Reset": "Password Reset", - "Confirm Email": "Confirm Email", - "Request Ride": "Request Ride", - "Credit Card Number": "Credit Card Number", - "month": "month", - "01-Jan": "01-Jan", - "02-Feb": "02-Feb", - "03-Mar": "03-Mar", - "04-Apr": "04-Apr", - "05-May": "05-May", - "06-Jun": "06-Jun", - "07-Jul": "07-Jul", - "08-Aug": "08-Aug", - "09-Sep": "09-Sep", - "10-Oct": "10-Oct", - "11-Nov": "11-Nov", - "12-Dec": "12-Dec", - "year": "year", - "CVV": "CVV", - "Category": "Category", - "personal": "personal", - "business": "business", - "Default Credit Card": "Default Credit Card", - "Add Credit Card": "Add Credit Card", - "Expiry": "Expiry", - "default card": "default card", - "make default": "make default", - "Edit": "Edit", - "Delete": "Delete", - "Expiry Month": "Expiry Month", - "Expiry Year": "Expiry Year", - "Unable to Verify Card": "Unable to verify card at this time. Please try again later.", - "Credit Card Update Succeeded": "Your card has been successfully updated!", - "Credit Card Update Failed": "We couldn't save your changes. Please try again in a few minutes.", - "Credit Card Delete Succeeded": "Your card has been deleted!", - "Credit Card Delete Failed": "We were unable to delete your card. Please try again later.", - "Credit Card Update Category Succeeded": "Successfully changed card category!", - "Credit Card Update Category Failed": "We couldn't change your card category. Please try again in a few minutes.", - "Credit Card Update Default Succeeded": "Successfully changed default card!", - "Credit Card Update Default Failed": "We couldn't change your default card. Please try again in a few minutes.", - "Hello Greeting": "Hello, <%= name %>", - "Card Ending in": "Card Ending in", - "Trip Map": "Trip Map", - "Amount": "Amount: <%= amount %>", - "Last Attempt to Bill": "Last Attempt to Bill: <%= date %>", - "Charge": "Charge", - "Uber Credit Balance Note": "Your account has an UberCredit balance of <%= amount %>. When billing for trips, we'll deplete your UberCredit balance before applying charges to your credit card.", - "Please Add Credit Card": "Please add a credit card to bill your outstanding charges.", - "Credit Cards": "Credit Cards", - "add a new credit card": "add a new credit card", - "Account Balance": "Account Balance", - "Arrears": "Arrears", - "Billing Succeeded": "Your card was successfully billed.", - "Confirm Email Succeeded": "Successfully confirmed email token, redirecting to log in page...", - "Confirm Email Failed": "Unable to confirm email. Please contact support@uber.com if this problem persists.", - "Email Already Confirmed": "Your email address has already been confirmed, redirecting to log in page...", - "Credit Card Added": "Credit Card Added", - "No Credit Card": "No Credit Card", - "Mobile Number Confirmed": "Mobile Number Confirmed", - "No Confirmed Mobile": "No Confirmed Mobile", - "E-mail Address Confirmed": "E-mail Address Confirmed", - "No Confirmed E-mail": "No Confirmed E-mail", - 'Reply to sign up text': 'Reply "GO" to the text message you received at sign up.', - "Resend text message": "Resend text message", - "Click sign up link": "Click the link in the email you received at sign up.", - "Resend email": "Resend email", - "Add a credit card to ride": "Add a credit card and you'll be ready to ride Uber.", - "Your Most Recent Trip": "Your Most Recent Trip", - "details": "details", - "Your Trip History ": "Your Trip History ", - "Status": "Status", - "Here's how it works:": "Here's how it works:", - "Show all trips": "Show all trips", - "Set your location:": "Set your location:", - "App search for address": "iPhone/Android app: fix the pin or search for an address", - "SMS text address": "SMS: text your address to UBRCAB (827222)", - "Confirm pickup request": "Confirm your pickup request", - "Uber sends ETA": "Uber will send you an ETA (usually within 5-10 minutes)", - "Car arrives": "When your car is arriving, Uber will inform you again.", - "Ride to destination": "Hop in the car and tell the driver your destination.", - "Thank your driver": "That’s it! Please thank your driver but remember that your tip is included and no cash is necessary.", - "Trip started here": "Trip started here", - "Trip ended here": "Trip ended here", - "Sending Email": "Sending email...", - "Resend Email Succeeded": "We just sent the email. Please click on the confirmation link you recieve.", - "Resend Email Failed": "There was an error sending the email. Please contact support if the problem persists.", - "Resend Text Succeeded": 'We just sent the text message. Please reply "GO" to the message you recieve. It may take a few minutes for the message to reach you phone.', - "Resend Text Failed": "There was an error sending the text message. Please contact support if the problem persists.", - "Password Reset Error": "There was an error processing your password reset request.", - "New Password": "New Password", - "Forgot Password": "Forgot Password", - "Forgot Password Error": "Your email address could not be found. Please make sure to use the same email address you used when you signed up.", - "Forgot Password Success": "Please check your email for a link to reset your password.", - "Forgot Password Enter Email": 'Enter your email address and Uber will send you a link to reset your password. If you remember your password, you can sign in here.', - "Invite friends": "Invite friends", - "Give $ Get $": "Give $10, Get $10", - "Give $ Get $ Description": "Every friend you invite to Uber gets $10 of Uber credit. After someone you’ve invited takes his/her first ride, you get $10 of Uber credits too!", - "What are you waiting for?": "So, what are you waiting for? Invite away!", - "Tweet": "Tweet", - "Invite Link": "Email or IM this link to your friends:", - "Email Address": "Email Address", - "Reset Password": "Reset Password", - "Enter Promotion Code": "If you have a promotion code, enter it here:", - "Your Active Promotions": "Your Active Promotions", - "Code": "Code", - "Details": "Details", - "Trips Remaining": "Trips Remaining", - "Expires": "Expires", - "No Active Promotions": "There are no active promotions on your account.", - "Your Available Promotions": "Your Available Promotions", - "Where do you want us to pick you up?": "Where do you want us to pick you up?", - "Address to search": "Address to search", - "Search": "Search", - "Driver Name:": "Driver Name:", - "Driver #:": "Driver #:", - "Pickup Address:": "Pickup Address:", - "Add to Favorite Locations": "Add to Favorite Locations", - "Star": "Star", - "Nickname:": "Nickname:", - "Add": "Add", - "Your last trip": "Your last trip", - "Please rate your driver:": "Please rate your driver:", - "Comments: (optional)": "Comments: (optional)", - "Rate Trip": "Rate Trip", - "Pickup time:": "Pickup time:", - "Miles:": "Miles:", - "Trip time:": "Trip time:", - "Fare:": "Fare:", - "Favorite Locations": "Favorite Locations", - "Search Results": "Search Results", - "You have no favorite locations saved.": "You have no favorite locations saved.", - "Loading...": "Loading...", - "Request Pickup": "Request Pickup", - "Cancel Pickup": "Cancel Pickup", - "Requesting Closest Driver": "Requesting the closest driver to pick you up...", - "En Route": "You are currently en route...", - "Rate Last Trip": "Please rate your trip to make another request", - "Rate Before Submitting": "Please rate your trip before submitting the form", - "Address too short": "Address too short", - "or did you mean": "or did you mean", - "Search Address Failed": "Unable to find the given address. Please enter another address close to your location.", - "Sending pickup request...": "Sending pickup request...", - "Cancel Request Prompt": "Are you sure you want to cancel your request?", - "Cancel Request Arrived Prompt": 'Are you sure you want to cancel your request? Your driver has arrived so there is a $10 cancellation fee. It may help to call your driver now', - "Favorite Location Nickname Length Error": "Nickname has to be atleast 3 characters", - "Favorite Location Save Succeeded": "Location Saved!", - "Favorite Location Save Failed": "Unable to save your location. Please try again later.", - "Favorite Location Title": "Favorite Location <%= id %>", - "Search Location Title": "Search Location <%= id %>", - "ETA Message": "ETA: Around <%= minutes %> Minutes", - "Nearest Cab Message": "The closest driver is approximately <%= minutes %> minute(s) away", - "Arrival ETA Message": "Your Uber will arrive in about <%= minutes %> minute(s)", - "Arriving Now Message": "Your Uber is arriving now...", - "Rating Driver Failed": "Unable to contact server. Please try again later or email support if this issue persists.", - "Account Information": "Account Information", - "Mobile Phone Information": "Mobile Phone Information", - "settings": "settings", - "Information": "Information", - "Picture": "Picture", - "Change password": "Change password", - "Your current Picture": "Your current Picture", - "Your Favorite Locations": "Your Favorite Locations", - "You have no favorite locations saved.": "You have no favorite locations saved.", - "Purpose of Mobile": "We send text messages to your mobile phone to tell you when your driver is arriving. You can also request trips using text messages.", - "Country": "Country", - "Mobile Number": "Mobile Number", - "Submit": "Submit", - "Favorite Location": "Favorite Location", - "No Approximate Address": "Could not find an approximate address", - "Address:": "Address:", - "Information Update Succeeded": "Your information has been updated!", - "Information Update Failed": "We couldn't update your information. Please try again in few minutes or contact support if the problem persists.", - "Location Delete Succeeded": "Location deleted!", - "Location Delete Failed": "We were unable to delete your favorite location. Please try again later or contact support of the issue persists.", - "Location Edit Succeeded": "Changes Saved!", - "Location Edit Failed": "We couldn't save your changes. Please try again in a few minutes.", - "Picture Update Succeeded": "Your picture has been updated!", - "Picture Update Failed": "We couldn't change your picture. Please try again in a few minutes.", - "Personal Information": "Personal Information", - "Mobile Phone Number": "Mobile Phone Number", - "Payment Information": "Payment Information", - "Purpose of Credit Card": "We keep your credit card on file so that your trip go as fast as possible. You will not be charged until you take a trip.", - "Your card will not be charged until you take a trip.": "Your card will not be charged until you take a trip.", - "Credit Card Number": "Credit Card Number", - "Expiration Date": "Expiration Date", - "Promotion Code": "Promotion Code", - "Enter Promo Here": "If you have a code for a promotion, invitation or group deal, you can enter it here.", - "Promotion Code Input Label": "Promotion, Invite or Groupon Code (optional)", - "Terms and Conditions": "Terms and Conditions", - "HELP": "HELP", - "STOP": "STOP", - "Legal Information": "Legal Information", - "Sign Up Agreement": "By signing up, I agree to the Uber <%= terms_link %> and <%= privacy_link %> and understand that Uber is a request tool, not a transportation carrier.", - "Sign Up Agreement Error": "You must agree to the Uber Terms and Conditions and Privacy Policy to continue.", - "Message and Data Rates Disclosure": "Message and Data Rates May Apply. Reply <%= help_string %> to 827-222 for help. Reply <%= stop_string %> to 827-222 to stop texts. For additional assistance, visit support.uber.com or call (866) 576-1039. Supported Carriers: AT&T, Sprint, Verizon, and T-Mobile.", - "I Agree": "I agree to the Terms & Conditions and Privacy Policy", - "Security Code": "Security Code", - "Type of Card": "Type of Card", - "Personal": "Personal", - "Business": "Business", - "Code": "Code", - "Zip or Postal Code": "Zip or Postal Code", - "Your Trip": "Your Trip", - "Trip Info": "Trip Info", - "Request a fare review": "Request a fare review", - "Fare Review Submitted": "Your fare review has been submitted. We'll get back to you soon about your request. Sorry for any inconvenience this may have caused!", - "Fair Price Consideration": "We're committed to delivering Uber service at a fair price. Before requesting a fare review, please consider:", - "Your Fare Calculation": "Your Fare Calculation", - "Charges": "Charges", - "Discounts": "Discounts", - "Total Charge": "Total Charge", - "Uber pricing information": "Uber pricing information", - "Uber Pricing Information Message": "<%= learn_link %> is published on our website.", - "GPS Point Capture Disclosure": "Due to a finite number of GPS point captures, corners on your trip map may appear cut off or rounded. These minor inaccuracies result in a shorter measured distance, which always results in a cheaper trip.", - "Fare Review Note": "Please elaborate on why this trip requires a fare review. Your comments below will help us better establish the correct price for your trip:", - "Fare Review Error": "There was an error submitting the review. Please ensure that you have a message.", - "Sign In": "Sign In" - }; -}).call(this); -}, "translations/fr": function(exports, require, module) {(function() { - exports.translations = { - "Uber": "Uber", - "Sign Up": "Inscription", - "Ride Request": "Passer une Commande", - "Invite Friends": "Inviter vos Amis", - "Promotions": "Promotions", - "Billing": "Paiement", - "Settings": "Paramètres", - "Forgot Password?": "Mot de passe oublié ?", - "Password Recovery": "Récupération du mot de passe", - "Login": "Connexion", - "Trip Detail": "Détail de la Course", - "Password Reset": "Réinitialisation du mot de passe", - "Confirm Email": "Confirmation de l’e-mail", - "Request Ride": "Passer une Commande", - "Credit Card Number": "Numéro de Carte de Crédit", - "month": "mois", - "01-Jan": "01-Jan", - "02-Feb": "02-Fév", - "03-Mar": "03-Mar", - "04-Apr": "04-Avr", - "05-May": "05-Mai", - "06-Jun": "06-Juin", - "07-Jul": "07-Jui", - "08-Aug": "08-Aoû", - "09-Sep": "09-Sep", - "10-Oct": "10-Oct", - "11-Nov": "11-Nov", - "12-Dec": "12-Déc", - "year": "année", - "CVV": "Code de Sécurité", - "Category": "Type", - "personal": "personnel", - "business": "entreprise", - "Default Credit Card": "Carte par Défaut", - "Add Credit Card": "Ajouter une Carte", - "Expiry": "Expire", - "default card": "carte par défaut", - "make default": "choisir par défaut", - "Edit": "Modifier", - "Delete": "Supprimer", - "Expiry Month": "Mois d’Expiration", - "Expiry Year": "Année d’Expiration", - "Unable to Verify Card": "Impossible de vérifier la carte pour le moment. Merci de réessayer un peu plus tard.", - "Credit Card Update Succeeded": "Votre carte a été mise à jour avec succès !", - "Credit Card Update Failed": "Nous ne pouvons enregistrer vos changements. Merci de réessayer dans quelques minutes.", - "Credit Card Delete Succeeded": "Votre carte a été supprimée !", - "Credit Card Delete Failed": "Nous n’avons pas été en mesure de supprimer votre carte. Merci de réessayer plus tard.", - "Credit Card Update Category Succeeded": "Changement de catégorie de carte réussi !", - "Credit Card Update Category Failed": "Nous ne pouvons pas changer la catégorie de votre carte. Merci de réessayer dans quelques minutes.", - "Credit Card Update Default Succeeded": "Carte par défaut changée avec succès !", - "Credit Card Update Default Failed": "Nous ne pouvons pas changer votre carte par défaut. Merci de réessayer dans quelques minutes.", - "Hello Greeting": "Bonjour, <%= name %>", - "Card Ending in": "La carte expire dans", - "Trip Map": "Carte des Courses", - "Amount": "Montant: <%= amount %>", - "Last Attempt to Bill": "Dernière tentative de prélèvement : <%= date %>", - "Charge": "Débit", - "Uber Credit Balance Note": "Votre compte a un solde de <%= amount %> UberCredits. Lorsque nous facturons des courses, nous réduirons votre solde d’UberCredits avant de prélever votre carte de crédit.", - "Please Add Credit Card": "Merci d’ajouter une carte de crédit pour que nous puissions vous facturer.", - "Credit Cards": "Cartes de crédit", - "add a new credit card": "Ajouter une nouvelle carte de crédit", - "Account Balance": "Solde du compte", - "Arrears": "Arriérés", - "Billing Succeeded": "Votre carte a été correctement débitée.", - "Confirm Email Succeeded": "L’adresse e-mail a bien été validée, vous êtes redirigé vers le tableau de bord...", - "Confirm Email Failed": "Impossible de confirmer l’adresse e-mail. Merci de contacter support@uber.com si le problème persiste.", - "Credit Card Added": "Carte de crédit ajoutée", - "No Credit Card": "Pas de carte de crédit", - "Mobile Number Confirmed": "Numéro de téléphone confirmé", - "No Confirmed Mobile": "Pas de numéro de téléphone confirmé", - "E-mail Address Confirmed": "Adresse e-mail confirmée", - "No Confirmed E-mail": "Pas d’adresse e-mail confirmée", - 'Reply to sign up text': 'Répondre "GO" au SMS que vous avez reçu à l’inscription.', - "Resend text message": "Renvoyer le SMS", - "Click sign up link": "Cliquez sur le lien contenu dans l’e-mail reçu à l’inscription.", - "Resend email": "Renvoyer l’e-mail", - "Add a credit card to ride": "Ajouter une carte de crédit et vous serez prêt à voyager avec Uber.", - "Your Most Recent Trip": "Votre course la plus récente", - "details": "détails", - "Your Trip History": "Historique de votre trajet", - "Status": "Statut", - "Here's how it works:": "Voici comment ça marche :", - "Show all trips": "Montrer toutes les courses", - "Set your location:": "Définir votre position :", - "App search for address": "Application iPhone/Android : positionner la punaise ou rechercher une adresse", - "SMS text address": "SMS : envoyez votre adresse à UBRCAB (827222)", - "Confirm pickup request": "Validez la commande", - "Uber sends ETA": "Uber envoie un temps d’attente estimé (habituellement entre 5 et 10 minutes)", - "Car arrives": "Lorsque votre voiture arrive, Uber vous en informera encore..", - "Ride to destination": "Montez dans la voiture et donnez votre destination au chauffeur.", - "Thank your driver": "C’est tout ! Remerciez le chauffeur mais souvenez-vous que les pourboires sont compris et qu’il n’est pas nécessaire d’avoir du liquide sur soi.", - "Trip started here": "La course a commencé ici.", - "Trip ended here": "La course s’est terminée ici.", - "Sending Email": "Envoi de l’e-mail...", - "Resend Email Succeeded": "Nous venons d’envoyer l’e-mail. Merci de cliquer sur le lien de confirmation que vous avez reçu.", - "Resend Email Failed": "Il y a eu un problème lors de l’envoi de l’email. Merci de contacter le support si le problème persiste.", - "Resend Text Succeeded": 'Nous venons d’envoyer le SMS. Merci de répondre "GO" au message que vous avez reçu. Il se peut que cela prenne quelques minutes pour que le message arrive sur votre téléphone.', - "Resend Text Failed": "Il y a eu un problème lors de l’envoi du SMS. Merci de contacter le support si le problème persiste.", - "Password Reset Error": "Il y a eu une error lors de la réinitialisation de votre mot de passe.", - "New Password:": "Nouveau mot de passe:", - "Forgot Password Error": "Votre nom d’utilisateur / adresse email ne peut être trouvé. Merci d’utiliser la même qu’à l’inscription.", - "Forgot Password Success": "Merci de consulter votre boîte mail pour suivre la demande de ‘réinitialisation de mot de passe.", - "Forgot Password Enter Email": "Merci de saisir votre adresse email et nous vous enverrons un lien vous permettant de réinitialiser votre mot de passe :", - "Invite friends": "Inviter vos amis", - "Give $ Get $": "Donnez $10, Recevez $10", - "Give $ Get $ Description": "Chaque ami que vous invitez à Uber recevra $10 de crédits Uber. Dès lors qu’une personne que vous aurez invité aura utilisé Uber pour la première, vous recevrez $10 de crédits Uber également !", - "What are you waiting for?": "N’attendez plus ! Lancez les invitations !", - "Tweet": "Tweeter", - "Invite Link": "Envoyez ce lien par email ou messagerie instantanée à vos amis :", - "Enter Promotion Code": "Si vous avez un code promo, saisissez-le ici:", - "Your Active Promotions": "Vos Codes Promos Actifs", - "Code": "Code", - "Details": "Détails", - "Trips Remaining": "Courses restantes", - "Expires": "Expire", - "No Active Promotions": "Vous n’avez pas de code promo actif.", - "Your Available Promotions": "Votres Promos Disponibles", - "Where do you want us to pick you up?": "Où souhaitez-vous que nous vous prenions en charge ?", - "Address to search": "Adresse à rechercher", - "Search": "Chercher", - "Driver Name:": "Nom du chauffeur:", - "Driver #:": "# Chauffeur:", - "Pickup Address:": "Lieu de prise en charge:", - "Add to Favorite Locations": "Ajoutez aux Lieux Favoris", - "Star": "Étoiles", - "Nickname:": "Pseudo", - "Add": "Ajouter", - "Your last trip": "Votre dernière course", - "Please rate your driver:": "Merci de noter votre chauffeur :", - "Comments: (optional)": "Commentaires: (optionnel)", - "Rate Trip": "Notez votre course", - "Pickup time:": "Heure de Prise en Charge :", - "Miles:": "Kilomètres :", - "Trip time:": "Temps de course :", - "Fare:": "Tarif :", - "Favorite Locations": "Lieux Favoris", - "Search Results": "Résultats", - "You have no favorite locations saved.": "Vous n’avez pas de lieux de prise en charge favoris.", - "Loading...": "Chargement...", - "Request Pickup": "Commander ici", - "Cancel Pickup": "Annuler", - "Requesting Closest Driver": "Nous demandons au chauffeur le plus proche de vous prendre en charge...", - "En Route": "Vous êtes actuellement en route...", - "Rate Last Trip": "Merci de noter votre précédent trajet pour faire une autre course.", - "Rate Before Submitting": "Merci de noter votre trajet avant de le valider.", - "Address too short": "L’adresse est trop courte", - "or did you mean": "ou vouliez-vous dire", - "Search Address Failed": "Impossible de trouver l’adresse spécifiée. Merci de saisir une autre adresse proche de l’endroit où vous vous trouvez.", - "Sending pickup request...": "Envoi de la demande de prise en charge...", - "Cancel Request Prompt": "Voulez-vous vraiment annuler votre demande ?", - "Cancel Request Arrived Prompt": 'Voulez-vous vraiment annuler votre demande ? Votre chauffeur est arrivé, vous serez donc facturé de $10 de frais d’annulation. Il pourrait être utile que vous appeliez votre chauffeur maintenant.', - "Favorite Location Nickname Length Error": "Le pseudo doit faire au moins 3 caractères de long", - "Favorite Location Save Succeeded": "Adresse enregistrée !", - "Favorite Location Save Failed": "Impossible d’enregistrer votre adresse. Merci de réessayer ultérieurement.", - "Favorite Location Title": "Adresse favorie <%= id %>", - "Search Location Title": "Recherche d’adresse <%= id %>", - "ETA Message": "Temps d’attente estimé: environ <%= minutes %> minutes", - "Nearest Cab Message": "Le chauffeur le plus proche sera là dans <%= minutes %> minute(s)", - "Arrival ETA Message": "Votre chauffeur arrivera dans <%= minutes %> minute(s)", - "Arriving Now Message": "Votre chauffeur est en approche...", - "Rating Driver Failed": "Impossible de contacter le serveur. Merci de réessayer ultérieurement ou de contacter le support si le problème persiste.", - "settings": "Paramètres", - "Information": "Information", - "Picture": "Photo", - "Change password": "Modifier votre mot de passe", - "Your current Picture": "Votre photo", - "Your Favorite Locations": "Vos lieux favoris", - "You have no favorite locations saved.": "Vous n’avez pas de lieu favori", - "Account Information": "Informations Personnelles", - "Mobile Phone Information": "Informations de Mobile", - "Change Your Password": "Changez votre mot de passe.", - "Country": "Pays", - "Language": "Langue", - "Favorite Location": "Lieu favori", - "No Approximate Address": "Impossible de trouver une adresse même approximative", - "Address:": "Adresse :", - "Information Update Succeeded": "Vos informations ont été mises à jour !", - "Information Update Failed": "Nous n’avons pas pu mettre à jour vos informations. Merci de réessayer dans quelques instants ou de contacter le support si le problème persiste.", - "Location Delete Succeeded": "Adresse supprimée !", - "Location Delete Failed": "Nous n’avons pas pu supprimée votre adresse favorie. Merci de réessayer plus tard ou de contacter le support si le problème persiste.", - "Location Edit Succeeded": "Modifications sauvegardées !", - "Location Edit Failed": "Nous n’avons pas pu sauvegarder vos modifications. Merci de réessayer dans quelques minutes.", - "Picture Update Succeeded": "Votre photo a été mise à jour !", - "Picture Update Failed": "Nous n’avons pas pu mettre à jour votre photo. Merci de réessayer dans quelques instants.", - "Personal Information": "Informations Personnelles", - "Mobile Phone Number": "Numéro de Téléphone Portable", - "Payment Information": "Informations de Facturation", - "Your card will not be charged until you take a trip.": "Votre carte ne sera pas débitée avant votre premier trajet.", - "Card Number": "Numéro de Carte", - "Promotion Code Input Label": "Code promo, code d’invitation ou “deal” acheté en ligne (optionnel)", - "Terms and Conditions": "Conditions Générales", - "HELP": "HELP", - "STOP": "STOP", - "Sign Up Agreement": "En souscrivant, j’accepte les <%= terms_link %> et <%= privacy_link %> et comprends qu’Uber est un outil de commande de chauffeur, et non un transporteur.", - "Sign Up Agreement Error": "Vous devez accepter les Conditions Générales d’utilisation d’Uber Terms and Conditions et la Politique de Confidentialité pour continuer.", - "Message and Data Rates Disclosure": "Les frais d’envoi de SMS et de consommation de données peuvent s’appliquer. Répondez <%= help_string %> au 827-222 pour obtenir de l’aide. Répondez <%= stop_string %> au 827-222 pour ne plus recevoir de SMS. Pour plus d’aide, visitez support.uber.com ou appelez le (866) 576-1039. Opérateurs supportés: AT&T, Sprint, Verizon, T-Mobile, Orange, SFR et Bouygues Telecom.", - "Zip/Postal Code": "Code Postal", - "Expiration Date": "Date D'expiration", - "Security Code": "Code de Sécurité", - "Type of Card": "Type", - "Personal": "Personnel", - "Business": "Entreprise", - "Promotion Code": "Code Promo", - "Legal Information": "Mentions Légales", - "I Agree": "J'accepte.", - "Your Trip": "Votre Course", - "Trip Info": "Informations de la Course", - "Request a fare review": "Demander un contrôle du tarif", - "Fare Review Submitted": "Votre demande de contrôle du tarif a été soumis. Nous reviendrons vers vous rapidement concernant cette demande. Nous nous excusons pour les dérangements éventuellement occasionnés !", - "Fair Price Consideration": "Nous nous engageons à proposer Uber à un tarif juste. Avant de demander un contrôle du tarif, merci de prendre en compte :", - "Your Fare Calculation": "Calcul du Prix", - "Charges": "Coûts", - "Discounts": "Réductions", - "Total Charge": "Coût total", - "Uber pricing information": "Information sur les prix d’Uber", - "Uber Pricing Information Message": "<%= learn_link %> est disponible sur notre site web.", - "GPS Point Capture Disclosure": "A cause d’un nombre limité de coordonnées GPS sauvegardées, les angles de votre trajet sur la carte peuvent apparaître coupés ou arrondis. Ces légères incohérences débouchent sur des distances mesurées plus courtes, ce qui implique toujours un prix du trajet moins élevé.", - "Fare Review Note": "Merci de nous expliquer pourquoi le tarif de cette course nécessite d’être contrôlé. Vos commentaires ci-dessous nous aideront à établir un prix plus juste si nécessaire :", - "Fare Review Error": "Il y a eu une erreur lors de l’envoi de la demande. Assurez-vous d’avoir bien ajouté une description à votre demande." - }; -}).call(this); -}, "views/clients/billing": function(exports, require, module) {(function() { - var clientsBillingTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsBillingTemplate = require('templates/clients/billing'); - exports.ClientsBillingView = (function() { - __extends(ClientsBillingView, UberView); - function ClientsBillingView() { - ClientsBillingView.__super__.constructor.apply(this, arguments); - } - ClientsBillingView.prototype.id = 'billing_view'; - ClientsBillingView.prototype.className = 'view_container'; - ClientsBillingView.prototype.events = { - 'click a#add_card': 'addCard', - 'click .charge_arrear': 'chargeArrear' - }; - ClientsBillingView.prototype.render = function() { - this.RefreshUserInfo(__bind(function() { - var cards, newForm; - this.HideSpinner(); - $(this.el).html(clientsBillingTemplate()); - if (USER.payment_gateway.payment_profiles.length === 0) { - newForm = new app.views.clients.modules.creditcard; - $(this.el).find("#add_card_wrapper").html(newForm.render(0).el); - } else { - cards = new app.views.clients.modules.creditcard; - $("#cards").html(cards.render("all").el); - } - return this.delegateEvents(); - }, this)); - return this; - }; - ClientsBillingView.prototype.addCard = function(e) { - var newCard; - e.preventDefault(); - newCard = new app.views.clients.modules.creditcard; - $('#cards').append(newCard.render("new").el); - return $("a#add_card").hide(); - }; - ClientsBillingView.prototype.chargeArrear = function(e) { - var $el, arrearId, attrs, cardId, options, tryCharge; - e.preventDefault(); - $(".error_message").text(""); - $el = $(e.currentTarget); - arrearId = $el.attr('id'); - cardId = $el.parent().find('#card_to_charge').val(); - this.ShowSpinner('submit'); - tryCharge = new app.models.clientbills({ - id: arrearId - }); - attrs = { - payment_profile_id: cardId, - dataType: 'json' - }; - options = { - success: __bind(function(data, textStatus, jqXHR) { - $el.parent().find(".success_message").text(t("Billing Succeeded")); - $el.hide(); - return $el.parent().find('#card_to_charge').hide(); - }, this), - error: __bind(function(jqXHR, status, errorThrown) { - return $el.parent().find(".error_message").text(JSON.parse(status.responseText).error); - }, this), - complete: __bind(function() { - return this.HideSpinner(); - }, this) - }; - return tryCharge.save(attrs, options); - }; - return ClientsBillingView; - })(); -}).call(this); -}, "views/clients/confirm_email": function(exports, require, module) {(function() { - var clientsConfirmEmailTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsConfirmEmailTemplate = require('templates/clients/confirm_email'); - exports.ClientsConfirmEmailView = (function() { - __extends(ClientsConfirmEmailView, UberView); - function ClientsConfirmEmailView() { - ClientsConfirmEmailView.__super__.constructor.apply(this, arguments); - } - ClientsConfirmEmailView.prototype.id = 'confirm_email_view'; - ClientsConfirmEmailView.prototype.className = 'view_container'; - ClientsConfirmEmailView.prototype.render = function(token) { - var attrs; - $(this.el).html(clientsConfirmEmailTemplate()); - attrs = { - data: { - email_token: token - }, - success: __bind(function(data, textStatus, jqXHR) { - var show_dashboard; - this.HideSpinner(); - show_dashboard = function() { - return app.routers.clients.navigate('!/dashboard', true); - }; - if (data.status === 'OK') { - $('.success_message').show(); - return _.delay(show_dashboard, 3000); - } else if (data.status === 'ALREADY_COMFIRMED') { - $('.already_confirmed_message').show(); - return _.delay(show_dashboard, 3000); - } else { - return $('.error_message').show(); - } - }, this), - error: __bind(function(e) { - this.HideSpinner(); - return $('.error_message').show(); - }, this), - complete: function(status) { - return $('#attempt_text').hide(); - }, - dataType: 'json', - type: 'PUT', - url: "" + API + "/users/self" - }; - $.ajax(attrs); - this.ShowSpinner('submit'); - return this; - }; - return ClientsConfirmEmailView; - })(); -}).call(this); -}, "views/clients/dashboard": function(exports, require, module) {(function() { - var clientsDashboardTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsDashboardTemplate = require('templates/clients/dashboard'); - exports.ClientsDashboardView = (function() { - var displayFirstTrip; - __extends(ClientsDashboardView, UberView); - function ClientsDashboardView() { - this.showAllTrips = __bind(this.showAllTrips, this); - this.render = __bind(this.render, this); - ClientsDashboardView.__super__.constructor.apply(this, arguments); - } - ClientsDashboardView.prototype.id = 'dashboard_view'; - ClientsDashboardView.prototype.className = 'view_container'; - ClientsDashboardView.prototype.events = { - 'click a.confirmation': 'confirmationClick', - 'click #resend_email': 'resendEmail', - 'click #resend_mobile': 'resendMobile', - 'click #show_all_trips': 'showAllTrips' - }; - ClientsDashboardView.prototype.render = function() { - var displayPage, downloadTrips; - this.HideSpinner(); - displayPage = __bind(function() { - $(this.el).html(clientsDashboardTemplate()); - this.confirmationsSetup(); - return this.RequireMaps(__bind(function() { - if (USER.trips.models[0]) { - if (!USER.trips.models[0].get("points")) { - return USER.trips.models[0].fetch({ - data: { - relationships: 'points' - }, - success: __bind(function() { - this.CacheData("USERtrips", USER.trips); - return displayFirstTrip(); - }, this) - }); - } else { - return displayFirstTrip(); - } - } - }, this)); - }, this); - downloadTrips = __bind(function() { - return this.DownloadUserTrips(displayPage, false, 10); - }, this); - this.RefreshUserInfo(downloadTrips); - return this; - }; - displayFirstTrip = __bind(function() { - var bounds, endPos, map, myOptions, path, polyline, startPos; - myOptions = { - zoom: 12, - mapTypeId: google.maps.MapTypeId.ROADMAP, - zoomControl: false, - rotateControl: false, - panControl: false, - mapTypeControl: false, - scrollwheel: false - }; - if (USER.trips.length === 10) { - $("#show_all_trips").show(); - } - if (USER.trips.length > 0) { - map = new google.maps.Map(document.getElementById("trip_details_map"), myOptions); - bounds = new google.maps.LatLngBounds(); - path = []; - _.each(USER.trips.models[0].get('points'), __bind(function(point) { - path.push(new google.maps.LatLng(point.lat, point.lng)); - return bounds.extend(_.last(path)); - }, this)); - map.fitBounds(bounds); - startPos = new google.maps.Marker({ - position: _.first(path), - map: map, - title: t('Trip started here'), - icon: 'https://uber-static.s3.amazonaws.com/marker_start.png' - }); - endPos = new google.maps.Marker({ - position: _.last(path), - map: map, - title: t('Trip ended here'), - icon: 'https://uber-static.s3.amazonaws.com/marker_end.png' - }); - polyline = new google.maps.Polyline({ - path: path, - strokeColor: '#003F87', - strokeOpacity: 1, - strokeWeight: 5 - }); - return polyline.setMap(map); - } - }, ClientsDashboardView); - ClientsDashboardView.prototype.confirmationsSetup = function() { - var blink, cardForm, element, _ref, _ref2, _ref3, _ref4, _ref5; - blink = function(element) { - var opacity; - opacity = 0.5; - if (element.css('opacity') === "0.5") { - opacity = 1.0; - } - return element.fadeTo(2000, opacity, function() { - return blink(element); - }); - }; - if (((_ref = window.USER) != null ? (_ref2 = _ref.payment_gateway) != null ? (_ref3 = _ref2.payment_profiles) != null ? _ref3.length : void 0 : void 0 : void 0) === 0) { - element = $('#confirmed_credit_card'); - cardForm = new app.views.clients.modules.creditcard; - $('#card.info').append(cardForm.render().el); - blink(element); - } - if (((_ref4 = window.USER) != null ? _ref4.confirm_email : void 0) === false) { - element = $('#confirmed_email'); - blink(element); - } - if ((((_ref5 = window.USER) != null ? _ref5.confirm_mobile : void 0) != null) === false) { - element = $('#confirmed_mobile'); - return blink(element); - } - }; - ClientsDashboardView.prototype.confirmationClick = function(e) { - e.preventDefault(); - $('.info').hide(); - $('#more_info').show(); - switch (e.currentTarget.id) { - case "card": - return $('#card.info').slideToggle(); - case "mobile": - return $('#mobile.info').slideToggle(); - case "email": - return $('#email.info').slideToggle(); - } - }; - ClientsDashboardView.prototype.resendEmail = function(e) { - var $el; - e.preventDefault(); - $el = $(e.currentTarget); - $el.removeAttr('href').prop({ - disabled: true - }); - $el.html(t("Sending Email")); - return $.ajax({ - type: 'GET', - url: API + '/users/request_confirm_email', - data: { - token: USER.token - }, - dataType: 'json', - success: __bind(function(data, textStatus, jqXHR) { - return $el.html(t("Resend Email Succeeded")); - }, this), - error: __bind(function(jqXHR, textStatus, errorThrown) { - return $el.html(t("Resend Email Failed")); - }, this) - }); - }; - ClientsDashboardView.prototype.resendMobile = function(e) { - var $el; - e.preventDefault(); - $el = $(e.currentTarget); - $el.removeAttr('href').prop({ - disabled: true - }); - $el.html("Sending message..."); - return $.ajax({ - type: 'GET', - url: API + '/users/request_confirm_mobile', - data: { - token: USER.token - }, - dataType: 'json', - success: __bind(function(data, textStatus, jqXHR) { - return $el.html(t("Resend Text Succeeded")); - }, this), - error: __bind(function(jqXHR, textStatus, errorThrown) { - return $el.html(t("Resend Text Failed")); - }, this) - }); - }; - ClientsDashboardView.prototype.showAllTrips = function(e) { - e.preventDefault(); - $(e.currentTarget).hide(); - return this.DownloadUserTrips(this.render, true, 1000); - }; - return ClientsDashboardView; - }).call(this); -}).call(this); -}, "views/clients/forgot_password": function(exports, require, module) {(function() { - var clientsForgotPasswordTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - clientsForgotPasswordTemplate = require('templates/clients/forgot_password'); - exports.ClientsForgotPasswordView = (function() { - __extends(ClientsForgotPasswordView, UberView); - function ClientsForgotPasswordView() { - ClientsForgotPasswordView.__super__.constructor.apply(this, arguments); - } - ClientsForgotPasswordView.prototype.id = 'forgotpassword_view'; - ClientsForgotPasswordView.prototype.className = 'view_container modal_view_container'; - ClientsForgotPasswordView.prototype.events = { - "submit #password_reset": "passwordReset", - "click #password_reset_submit": "passwordReset", - "submit #forgot_password": "forgotPassword", - "click #forgot_password_submit": "forgotPassword" - }; - ClientsForgotPasswordView.prototype.render = function(token) { - this.HideSpinner(); - $(this.el).html(clientsForgotPasswordTemplate({ - token: token - })); - this.delegateEvents(); - return this; - }; - ClientsForgotPasswordView.prototype.forgotPassword = function(e) { - var attrs; - e.preventDefault(); - $('.success_message').hide(); - $(".error_message").hide(); - attrs = { - data: { - login: $("#login").val() - }, - success: __bind(function(data, textStatus, jqXHR) { - this.HideSpinner(); - $('.success_message').show(); - return $("#forgot_password").hide(); - }, this), - error: __bind(function(e) { - this.HideSpinner(); - return $('.error_message').show(); - }, this), - dataType: 'json', - type: 'PUT', - url: "" + API + "/users/forgot_password" - }; - $.ajax(attrs); - return this.ShowSpinner('submit'); - }; - ClientsForgotPasswordView.prototype.passwordReset = function(e) { - var attrs; - e.preventDefault(); - attrs = { - data: { - email_token: $("#token").val(), - password: $("#password").val() - }, - success: __bind(function(data, textStatus, jqXHR) { - this.HideSpinner(); - $.cookie('token', data.token); - amplify.store('USERjson', data); - app.refreshMenu(); - return location.hash = '!/dashboard'; - }, this), - error: __bind(function(e) { - this.HideSpinner(); - return $('#error_reset').show(); - }, this), - dataType: 'json', - type: 'PUT', - url: "" + API + "/users/self" - }; - $.ajax(attrs); - return this.ShowSpinner('submit'); - }; - return ClientsForgotPasswordView; - })(); -}).call(this); -}, "views/clients/invite": function(exports, require, module) {(function() { - var clientsInviteTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsInviteTemplate = require('templates/clients/invite'); - exports.ClientsInviteView = (function() { - __extends(ClientsInviteView, UberView); - function ClientsInviteView() { - ClientsInviteView.__super__.constructor.apply(this, arguments); - } - ClientsInviteView.prototype.id = 'invite_view'; - ClientsInviteView.prototype.className = 'view_container'; - ClientsInviteView.prototype.render = function() { - this.ReadUserInfo(); - this.HideSpinner(); - $(this.el).html(clientsInviteTemplate()); - console.log(screen); - return this; - }; - return ClientsInviteView; - })(); -}).call(this); -}, "views/clients/login": function(exports, require, module) {(function() { - var clientsLoginTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsLoginTemplate = require('templates/clients/login'); - exports.ClientsLoginView = (function() { - __extends(ClientsLoginView, UberView); - function ClientsLoginView() { - ClientsLoginView.__super__.constructor.apply(this, arguments); - } - ClientsLoginView.prototype.id = 'login_view'; - ClientsLoginView.prototype.className = 'view_container modal_view_container'; - ClientsLoginView.prototype.events = { - 'submit form': 'authenticate', - 'click button': 'authenticate' - }; - ClientsLoginView.prototype.initialize = function() { - _.bindAll(this, 'render'); - return this.render(); - }; - ClientsLoginView.prototype.render = function() { - this.HideSpinner(); - $(this.el).html(clientsLoginTemplate()); - this.delegateEvents(); - return this.place(); - }; - ClientsLoginView.prototype.authenticate = function(e) { - e.preventDefault(); - return $.ajax({ - type: 'POST', - url: API + '/auth/web_login/client', - data: { - login: $("#login").val(), - password: $("#password").val() - }, - dataType: 'json', - success: function(data, textStatus, jqXHR) { - $.cookie('user', JSON.stringify(data)); - $.cookie('token', data.token); - amplify.store('USERjson', data); - $('header').html(app.views.shared.menu.render().el); - return app.routers.clients.navigate('!/dashboard', true); - }, - error: function(jqXHR, textStatus, errorThrown) { - $.cookie('user', null); - $.cookie('token', null); - if (jqXHR.status === 403) { - $.cookie('redirected_user', JSON.stringify(JSON.parse(jqXHR.responseText).error_obj), { - domain: '.uber.com' - }); - window.location = 'http://partners.uber.com/'; - } - return $('.error_message').html(JSON.parse(jqXHR.responseText).error).hide().fadeIn(); - } - }); - }; - return ClientsLoginView; - })(); -}).call(this); -}, "views/clients/modules/credit_card": function(exports, require, module) {(function() { - var creditCardTemplate; - var __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }, __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }; - creditCardTemplate = require('templates/clients/modules/credit_card'); - exports.CreditCardView = (function() { - __extends(CreditCardView, UberView); - function CreditCardView() { - CreditCardView.__super__.constructor.apply(this, arguments); - } - CreditCardView.prototype.id = 'creditcard_view'; - CreditCardView.prototype.className = 'module_container'; - CreditCardView.prototype.events = { - 'submit #credit_card_form': 'processNewCard', - 'click #new_card': 'processNewCard', - 'change #card_number': 'showCardType', - 'click .edit_card_show': 'showEditCard', - 'click .edit_card': 'editCard', - 'click .delete_card': 'deleteCard', - 'click .make_default': 'makeDefault', - 'change .use_case': 'saveUseCase' - }; - CreditCardView.prototype.initialize = function() { - return app.collections.paymentprofiles.bind("refresh", __bind(function() { - return this.RefreshUserInfo(__bind(function() { - this.render("all"); - return this.HideSpinner(); - }, this)); - }, this)); - }; - CreditCardView.prototype.render = function(cards) { - if (cards == null) { - cards = "new"; - } - if (cards === "all") { - app.collections.paymentprofiles.reset(USER.payment_gateway.payment_profiles); - cards = app.collections.paymentprofiles; - } - $(this.el).html(creditCardTemplate({ - cards: cards - })); - return this; - }; - CreditCardView.prototype.processNewCard = function(e) { - var $el, attrs, model, options; - e.preventDefault(); - this.ClearGlobalStatus(); - $el = $("#credit_card_form"); - $el.find('.error_message').html(""); - attrs = { - card_number: $el.find('#card_number').val(), - card_code: $el.find('#card_code').val(), - card_expiration_month: $el.find('#card_expiration_month').val(), - card_expiration_year: $el.find('#card_expiration_year').val(), - use_case: $el.find('#use_case').val(), - "default": $el.find('#default_check').prop("checked") - }; - options = { - statusCode: { - 200: __bind(function(e) { - this.HideSpinner(); - $('#cc_form_wrapper').hide(); - app.collections.paymentprofiles.trigger("refresh"); - $(this.el).remove(); - $("a#add_card").show(); - return $('section').html(app.views.clients.billing.render().el); - }, this), - 406: __bind(function(e) { - var error, errors, _i, _len, _ref, _results; - this.HideSpinner(); - errors = JSON.parse(e.responseText); - _ref = _.keys(errors); - _results = []; - for (_i = 0, _len = _ref.length; _i < _len; _i++) { - error = _ref[_i]; - _results.push(error === "top_of_form" ? $("#top_of_form").html(errors[error]) : $("#credit_card_form").find("#" + error).parent().find(".error_message").html(errors[error])); - } - return _results; - }, this), - 420: __bind(function(e) { - this.HideSpinner(); - return $("#top_of_form").html(t("Unable to Verify Card")); - }, this) - } - }; - this.ShowSpinner("submit"); - model = new app.models.paymentprofile; - model.save(attrs, options); - return app.collections.paymentprofiles.add(model); - }; - CreditCardView.prototype.showCardType = function(e) { - var $el, reAmerica, reDiscover, reMaster, reVisa, validCard; - reVisa = /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/; - reMaster = /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/; - reAmerica = /^6011-?\d{4}-?\d{4}-?\d{4}$/; - reDiscover = /^3[4,7]\d{13}$/; - $el = $("#card_logos"); - validCard = false; - if (e.currentTarget.value.match(reVisa)) { - validCard = true; - } else if (e.currentTarget.value.match(reMaster)) { - $el.css('background-position', "-60px"); - validCard = true; - } else if (e.currentTarget.value.match(reAmerica)) { - $el.css('background-position', "-120px"); - validCard = true; - } else if (e.currentTarget.value.match(reDiscover)) { - $el.css('background-position', "-180px"); - validCard = true; - } - if (validCard) { - $el.css('width', "60px"); - return $el.css('margin-left', "180px"); - } else { - $el.css('width', "250px"); - return $el.css('margin-left', "80px"); - } - }; - CreditCardView.prototype.showEditCard = function(e) { - var $el, id; - e.preventDefault(); - $el = $(e.currentTarget); - if ($el.html() === t("Edit")) { - id = $el.html(t("Cancel")).parents("tr").attr("id").substring(1); - return $("#e" + id).show(); - } else { - id = $el.html(t("Edit")).parents("tr").attr("id").substring(1); - return $("#e" + id).hide(); - } - }; - CreditCardView.prototype.editCard = function(e) { - var $el, attrs, id, options; - e.preventDefault(); - this.ClearGlobalStatus(); - $el = $(e.currentTarget).parents("td"); - id = $el.parents("tr").attr("id").substring(1); - $el.attr('disabled', 'disabled'); - this.ShowSpinner('submit'); - attrs = { - card_expiration_month: $el.find('#card_expiration_month').val(), - card_expiration_year: $el.find('#card_expiration_year').val(), - card_code: $el.find('#card_code').val() - }; - options = { - success: __bind(function(response) { - this.HideSpinner(); - this.ShowSuccess(t("Credit Card Update Succeeded")); - $("#e" + id).hide(); - $("#d" + id).find(".edit_card_show").html(t("Edit")); - return app.collections.paymentprofiles.trigger("refresh"); - }, this), - error: __bind(function(e) { - this.HideSpinner(); - this.ShowError(t("Credit Card Update Failed")); - return $el.removeAttr('disabled'); - }, this) - }; - app.collections.paymentprofiles.models[id].set(attrs); - return app.collections.paymentprofiles.models[id].save({}, options); - }; - CreditCardView.prototype.deleteCard = function(e) { - var $el, id, options; - e.preventDefault(); - $el = $(e.currentTarget).parents("td"); - id = $el.parents("tr").attr("id").substring(1); - this.ClearGlobalStatus(); - this.ShowSpinner('submit'); - options = { - success: __bind(function(response) { - this.ShowSuccess(t("Credit Card Delete Succeeded")); - $("form").hide(); - app.collections.paymentprofiles.trigger("refresh"); - return $('section').html(app.views.clients.billing.render().el); - }, this), - error: __bind(function(xhr, e) { - this.HideSpinner(); - return this.ShowError(t("Credit Card Delete Failed")); - }, this) - }; - return app.collections.paymentprofiles.models[id].destroy(options); - }; - CreditCardView.prototype.saveUseCase = function(e) { - var $el, attrs, id, options, use_case; - this.ClearGlobalStatus(); - $el = $(e.currentTarget); - use_case = $el.val(); - id = $el.parents("tr").attr("id").substring(1); - attrs = { - use_case: use_case - }; - options = { - success: __bind(function(response) { - return this.ShowSuccess(t("Credit Card Update Category Succeeded")); - }, this), - error: __bind(function(e) { - return this.ShowError(t("Credit Card Update Category Failed")); - }, this) - }; - app.collections.paymentprofiles.models[id].set(attrs); - return app.collections.paymentprofiles.models[id].save({}, options); - }; - CreditCardView.prototype.makeDefault = function(e) { - var $el, attrs, id, options; - e.preventDefault(); - this.ClearGlobalStatus(); - $el = $(e.currentTarget).parents("td"); - id = $el.parents("tr").attr("id").substring(1); - attrs = { - "default": true - }; - options = { - success: __bind(function(response) { - this.ShowSuccess(t("Credit Card Update Default Succeeded")); - return app.collections.paymentprofiles.trigger("refresh"); - }, this), - error: __bind(function(e) { - return this.ShowError(t("Credit Card Update Default Failed")); - }, this) - }; - app.collections.paymentprofiles.models[id].set(attrs); - return app.collections.paymentprofiles.models[id].save({}, options); - }; - return CreditCardView; - })(); -}).call(this); -}, "views/clients/promotions": function(exports, require, module) {(function() { - var clientsPromotionsTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsPromotionsTemplate = require('templates/clients/promotions'); - exports.ClientsPromotionsView = (function() { - __extends(ClientsPromotionsView, UberView); - function ClientsPromotionsView() { - this.render = __bind(this.render, this); - ClientsPromotionsView.__super__.constructor.apply(this, arguments); - } - ClientsPromotionsView.prototype.id = 'promotions_view'; - ClientsPromotionsView.prototype.className = 'view_container'; - ClientsPromotionsView.prototype.events = { - 'submit form': 'submitPromo', - 'click button': 'submitPromo' - }; - ClientsPromotionsView.prototype.initialize = function() { - if (this.model) { - return this.RefreshUserInfo(this.render); - } - }; - ClientsPromotionsView.prototype.render = function() { - var renderTemplate; - this.ReadUserInfo(); - renderTemplate = __bind(function() { - $(this.el).html(clientsPromotionsTemplate({ - promos: window.USER.unexpired_client_promotions || [] - })); - return this.HideSpinner(); - }, this); - this.DownloadUserPromotions(renderTemplate); - return this; - }; - ClientsPromotionsView.prototype.submitPromo = function(e) { - var attrs, model, options, refreshTable; - e.preventDefault(); - this.ClearGlobalStatus(); - refreshTable = __bind(function() { - $('section').html(this.render().el); - return this.HideSpinner(); - }, this); - attrs = { - code: $('#code').val() - }; - options = { - success: __bind(function(response) { - this.HideSpinner(); - if (response.get('first_name')) { - return this.ShowSuccess("Your promotion has been applied in the form of an account credit. Click here to check your balance."); - } else { - this.ShowSuccess("Your promotion has successfully been applied"); - return this.RefreshUserInfo(this.render, true); - } - }, this), - statusCode: { - 400: __bind(function(e) { - this.ShowError(JSON.parse(e.responseText).error); - return this.HideSpinner(); - }, this) - } - }; - this.ShowSpinner("submit"); - model = new app.models.promotions; - return model.save(attrs, options); - }; - return ClientsPromotionsView; - })(); -}).call(this); -}, "views/clients/request": function(exports, require, module) {(function() { - var clientsRequestTemplate; - var __bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, __hasProp = Object.prototype.hasOwnProperty, __extends = function(child, parent) { - for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } - function ctor() { this.constructor = child; } - ctor.prototype = parent.prototype; - child.prototype = new ctor; - child.__super__ = parent.prototype; - return child; - }; - clientsRequestTemplate = require('templates/clients/request'); - exports.ClientsRequestView = (function() { - __extends(ClientsRequestView, UberView); - function ClientsRequestView() { - this.AjaxCall = __bind(this.AjaxCall, this); - this.AskDispatch = __bind(this.AskDispatch, this); - this.removeMarkers = __bind(this.removeMarkers, this); - this.displaySearchLoc = __bind(this.displaySearchLoc, this); - this.displayFavLoc = __bind(this.displayFavLoc, this); - this.showFavLoc = __bind(this.showFavLoc, this); - this.addToFavLoc = __bind(this.addToFavLoc, this); - this.removeCabs = __bind(this.removeCabs, this); - this.requestRide = __bind(this.requestRide, this); - this.rateTrip = __bind(this.rateTrip, this); - this.locationChange = __bind(this.locationChange, this); - this.panToLocation = __bind(this.panToLocation, this); - this.clickLocation = __bind(this.clickLocation, this); - this.searchLocation = __bind(this.searchLocation, this); - this.mouseoutLocation = __bind(this.mouseoutLocation, this); - this.mouseoverLocation = __bind(this.mouseoverLocation, this); - this.fetchTripDetails = __bind(this.fetchTripDetails, this); - this.submitRating = __bind(this.submitRating, this); - this.setStatus = __bind(this.setStatus, this); - this.initialize = __bind(this.initialize, this); - ClientsRequestView.__super__.constructor.apply(this, arguments); - } - ClientsRequestView.prototype.id = 'request_view'; - ClientsRequestView.prototype.className = 'view_container'; - ClientsRequestView.prototype.pollInterval = 2 * 1000; - ClientsRequestView.prototype.events = { - "submit #search_form": "searchAddress", - "click .locations_link": "locationLinkHandle", - "mouseover .location_row": "mouseoverLocation", - "mouseout .location_row": "mouseoutLocation", - "click .location_row": "clickLocation", - "click #search_location": "searchLocation", - "click #pickupHandle": "pickupHandle", - "click .stars": "rateTrip", - "submit #rating_form": "submitRating", - "click #addToFavButton": "showFavLoc", - "click #favLocNickname": "selectInputText", - "submit #favLoc_form": "addToFavLoc" - }; - ClientsRequestView.prototype.status = ""; - ClientsRequestView.prototype.pickupMarker = "https://uber-static.s3.amazonaws.com/pickup_marker.png"; - ClientsRequestView.prototype.cabMarker = "https://uber-static.s3.amazonaws.com/cab_marker.png"; - ClientsRequestView.prototype.initialize = function() { - var displayCabs; - displayCabs = __bind(function() { - return this.AskDispatch("NearestCab"); - }, this); - this.showCabs = _.throttle(displayCabs, this.pollInterval); - return this.numSearchToDisplay = 1; - }; - ClientsRequestView.prototype.setStatus = function(status) { - var autocomplete; - if (this.status === status) { - return; - } - try { - google.maps.event.trigger(this.map, 'resize'); - } catch (_e) {} - switch (status) { - case "init": - this.AskDispatch("StatusClient"); - this.status = "init"; - return this.ShowSpinner("load"); - case "ready": - this.HideSpinner(); - $(".panel").hide(); - $("#top_bar").fadeIn(); - $("#location_panel").fadeIn(); - $("#location_panel_control").fadeIn(); - $("#pickupHandle").attr("class", "button_green").fadeIn().find("span").html(t("Request Pickup")); - this.pickup_icon.setDraggable(true); - this.map.panTo(this.pickup_icon.getPosition()); - this.showCabs(); - try { - this.pickup_icon.setMap(this.map); - this.displayFavLoc(); - autocomplete = new google.maps.places.Autocomplete(document.getElementById('address'), { - types: ['geocode'] - }); - autocomplete.bindTo('bounds', this.map); - } catch (_e) {} - return this.status = "ready"; - case "searching": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#status_message").html(t("Requesting Closest Driver")); - $("#pickupHandle").attr("class", "button_red").fadeIn().find("span").html(t("Cancel Pickup")); - this.pickup_icon.setDraggable(false); - this.pickup_icon.setMap(this.map); - return this.status = "searching"; - case "waiting": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#pickupHandle").attr("class", "button_red").fadeIn().find("span").html(t("Cancel Pickup")); - $("#waiting_riding").fadeIn(); - this.pickup_icon.setDraggable(false); - this.pickup_icon.setMap(this.map); - return this.status = "waiting"; - case "arriving": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#pickupHandle").attr("class", "button_red").fadeIn().find("span").html(t("Cancel Pickup")); - $("#waiting_riding").fadeIn(); - this.pickup_icon.setDraggable(false); - this.pickup_icon.setMap(this.map); - return this.status = "arriving"; - case "riding": - this.HideSpinner(); - this.removeMarkers(); - $(".panel").hide(); - $("#top_bar").fadeOut(); - $("#pickupHandle").fadeIn().attr("class", "button_red").find("span").html(t("Cancel Pickup")); - $("#waiting_riding").fadeIn(); - this.pickup_icon.setDraggable(false); - this.status = "riding"; - return $("#status_message").html(t("En Route")); - case "rate": - this.HideSpinner(); - $(".panel").hide(); - $("#pickupHandle").fadeOut(); - $("#trip_completed_panel").fadeIn(); - $('#status_message').html(t("Rate Last Trip")); - return this.status = "rate"; - } - }; - ClientsRequestView.prototype.render = function() { - this.ReadUserInfo(); - this.HideSpinner(); - this.ShowSpinner("load"); - $(this.el).html(clientsRequestTemplate()); - this.cabs = []; - this.RequireMaps(__bind(function() { - var center, myOptions, streetViewPano; - center = new google.maps.LatLng(37.7749295, -122.4194155); - this.markers = []; - this.pickup_icon = new google.maps.Marker({ - position: center, - draggable: true, - clickable: true, - icon: this.pickupMarker - }); - this.geocoder = new google.maps.Geocoder(); - myOptions = { - zoom: 12, - center: center, - mapTypeId: google.maps.MapTypeId.ROADMAP, - rotateControl: false, - rotateControl: false, - panControl: false - }; - this.map = new google.maps.Map($(this.el).find("#map_wrapper_right")[0], myOptions); - if (this.status === "ready") { - this.pickup_icon.setMap(this.map); - } - if (geo_position_js.init()) { - geo_position_js.getCurrentPosition(__bind(function(data) { - var location; - location = new google.maps.LatLng(data.coords.latitude, data.coords.longitude); - this.pickup_icon.setPosition(location); - this.map.panTo(location); - return this.map.setZoom(16); - }, this)); - } - this.setStatus("init"); - streetViewPano = this.map.getStreetView(); - google.maps.event.addListener(streetViewPano, 'visible_changed', __bind(function() { - if (streetViewPano.getVisible()) { - this.pickupMarker = "https://uber-static.s3.amazonaws.com/pickup_marker_large.png"; - this.cabMarker = "https://uber-static.s3.amazonaws.com/cab_marker_large.png"; - } else { - this.pickupMarker = "https://uber-static.s3.amazonaws.com/pickup_marker.png"; - this.cabMarker = "https://uber-static.s3.amazonaws.com/cab_marker.png"; - } - this.pickup_icon.setIcon(this.pickupMarker); - return _.each(this.cabs, __bind(function(cab) { - return cab.setIcon(this.cabMarker); - }, this)); - }, this)); - if (this.status === "ready") { - return this.displayFavLoc(); - } - }, this)); - return this; - }; - ClientsRequestView.prototype.submitRating = function(e) { - var $el, message, rating; - e.preventDefault(); - $el = $(e.currentTarget); - rating = 0; - _(5).times(function(num) { - if ($el.find(".stars#" + (num + 1)).attr("src") === "/web/img/star_active.png") { - return rating = num + 1; - } - }); - if (rating === 0) { - $("#status_message").html("").html(t("Rate Before Submitting")); - } else { - this.ShowSpinner("submit"); - this.AskDispatch("RatingDriver", { - rating: rating - }); - } - message = $el.find("#comments").val().toString(); - if (message.length > 5) { - return this.AskDispatch("Feedback", { - message: message - }); - } - }; - ClientsRequestView.prototype.fetchTripDetails = function(id) { - var trip; - trip = new app.models.trip({ - id: id - }); - return trip.fetch({ - data: { - relationships: 'points,driver,city' - }, - dataType: 'json', - success: __bind(function() { - var bounds, endPos, path, polyline, startPos; - bounds = new google.maps.LatLngBounds(); - path = []; - _.each(trip.get('points'), __bind(function(point) { - path.push(new google.maps.LatLng(point.lat, point.lng)); - return bounds.extend(_.last(path)); - }, this)); - startPos = new google.maps.Marker({ - position: _.first(path), - map: this.map, - title: t("Trip started here"), - icon: 'https://uber-static.s3.amazonaws.com/carstart.png' - }); - endPos = new google.maps.Marker({ - position: _.last(path), - map: this.map, - title: t("Trip ended here"), - icon: 'https://uber-static.s3.amazonaws.com/carstop.png' - }); - polyline = new google.maps.Polyline({ - path: path, - strokeColor: '#003F87', - strokeOpacity: 1, - strokeWeight: 5 - }); - polyline.setMap(this.map); - this.map.fitBounds(bounds); - $("#tripTime").html(app.helpers.parseDateTime(trip.get('pickup_local_time'), trip.get('city.timezone'))); - $("#tripDist").html(app.helpers.RoundNumber(trip.get('distance'), 2)); - $("#tripDur").html(app.helpers.FormatSeconds(trip.get('duration'))); - return $("#tripFare").html(app.helpers.FormatCurrency(trip.get('fare'))); - }, this) - }); - }; - ClientsRequestView.prototype.searchAddress = function(e) { - var $locationsDiv, address, alphabet, bounds, showResults; - alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - try { - e.preventDefault(); - } catch (_e) {} - $('.error_message').html(""); - $locationsDiv = $("
    "); - address = $('#address').val(); - bounds = new google.maps.LatLngBounds(); - if (address.length < 5) { - $('#status_message').html(t("Address too short")).fadeIn(); - return false; - } - showResults = __bind(function(address, index) { - var first_cell, row, second_cell; - if (index < this.numSearchToDisplay) { - first_cell = "
    " + address.formatted_address + "
    " + (t('or did you mean')) + "
    " + address.formatted_address + "
    - - - -
    Rod VaggGitHub/rvaggTwitter/@rvagg
    Benjamin ByholmGitHub/kkoopa
    Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
    - -Licence & copyright ------------------------ - -Copyright (c) 2013 Rod Vagg & NAN contributors (listed above). - -Native Abstractions for Node.js is licensed under an MIT +no-false-attribs license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h deleted file mode 100644 index b3eb02db..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/nan.h +++ /dev/null @@ -1,884 +0,0 @@ -/********************************************************************************** - * NAN - Native Abstractions for Node.js - * - * Copyright (c) 2013 NAN contributors: - * - Rod Vagg - * - Benjamin Byholm - * - Trevor Norris - * - * MIT +no-false-attribs License - * - * Version 0.3.2 (current Node unstable: 0.11.6, Node stable: 0.10.17) - * - * ChangeLog: - * * 0.3.2 Aug 30 2013 - * - Fix missing scope declaration in GetFromPersistent() and SaveToPersistent - * in NanAsyncWorker - * - * * 0.3.1 Aug 20 2013 - * - fix "not all control paths return a value" compile warning on some platforms - * - * * 0.3.0 Aug 19 2013 - * - Made NAN work with NPM - * - Lots of fixes to NanFromV8String, pulling in features from new Node core - * - Changed node::encoding to Nan::Encoding in NanFromV8String to unify the API - * - Added optional error number argument for NanThrowError() - * - Added NanInitPersistent() - * - Added NanReturnNull() and NanReturnEmptyString() - * - Added NanLocker and NanUnlocker - * - Added missing scopes - * - Made sure to clear disposed Persistent handles - * - Changed NanAsyncWorker to allocate error messages on the heap - * - Changed NanThrowError(Local) to NanThrowError(Handle) - * - Fixed leak in NanAsyncWorker when errmsg is used - * - * * 0.2.2 Aug 5 2013 - * - Fixed usage of undefined variable with node::BASE64 in NanFromV8String() - * - * * 0.2.1 Aug 5 2013 - * - Fixed 0.8 breakage, node::BUFFER encoding type not available in 0.8 for - * NanFromV8String() - * - * * 0.2.0 Aug 5 2013 - * - Added NAN_PROPERTY_GETTER, NAN_PROPERTY_SETTER, NAN_PROPERTY_ENUMERATOR, - * NAN_PROPERTY_DELETER, NAN_PROPERTY_QUERY - * - Extracted _NAN_METHOD_ARGS, _NAN_GETTER_ARGS, _NAN_SETTER_ARGS, - * _NAN_PROPERTY_GETTER_ARGS, _NAN_PROPERTY_SETTER_ARGS, - * _NAN_PROPERTY_ENUMERATOR_ARGS, _NAN_PROPERTY_DELETER_ARGS, - * _NAN_PROPERTY_QUERY_ARGS - * - Added NanGetInternalFieldPointer, NanSetInternalFieldPointer - * - Added NAN_WEAK_CALLBACK, NAN_WEAK_CALLBACK_OBJECT, - * NAN_WEAK_CALLBACK_DATA, NanMakeWeak - * - Renamed THROW_ERROR to _NAN_THROW_ERROR - * - Added NanNewBufferHandle(char*, size_t, node::smalloc::FreeCallback, void*) - * - Added NanBufferUse(char*, uint32_t) - * - Added NanNewContextHandle(v8::ExtensionConfiguration*, - * v8::Handle, v8::Handle) - * - Fixed broken NanCallback#GetFunction() - * - Added optional encoding and size arguments to NanFromV8String() - * - Added NanGetPointerSafe() and NanSetPointerSafe() - * - Added initial test suite (to be expanded) - * - Allow NanUInt32OptionValue to convert any Number object - * - * * 0.1.0 Jul 21 2013 - * - Added `NAN_GETTER`, `NAN_SETTER` - * - Added `NanThrowError` with single Local argument - * - Added `NanNewBufferHandle` with single uint32_t argument - * - Added `NanHasInstance(Persistent&, Handle)` - * - Added `Local NanCallback#GetFunction()` - * - Added `NanCallback#Call(int, Local[])` - * - Deprecated `NanCallback#Run(int, Local[])` in favour of Call - * - * See https://github.com/rvagg/nan for the latest update to this file - **********************************************************************************/ - -#ifndef NAN_H -#define NAN_H - -#include -#include -#include - -// some generic helpers - -template static inline bool NanSetPointerSafe(T *var, T val) { - if (var) { - *var = val; - return true; - } else { - return false; - } -} - -template static inline T NanGetPointerSafe( - T *var, - T fallback = reinterpret_cast(0)) { - if (var) { - return *var; - } else { - return fallback; - } -} - -#define NanSymbol(value) v8::String::NewSymbol(value) - -static inline bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt, bool def) { - - if (def) { - return optionsObj.IsEmpty() - || !optionsObj->Has(opt) - || optionsObj->Get(opt)->BooleanValue(); - } else { - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->BooleanValue(); - } -} - -static inline bool NanBooleanOptionValue( - v8::Local optionsObj - , v8::Handle opt) { - return NanBooleanOptionValue(optionsObj, opt, false); -} - -static inline uint32_t NanUInt32OptionValue( - v8::Local optionsObj - , v8::Handle opt - , uint32_t def) { - - return !optionsObj.IsEmpty() - && optionsObj->Has(opt) - && optionsObj->Get(opt)->IsNumber() - ? optionsObj->Get(opt)->Uint32Value() - : def; -} - -#if (NODE_MODULE_VERSION > 0x000B) -// Node 0.11+ (0.11.3 and below won't compile with these) - -static v8::Isolate* nan_isolate = v8::Isolate::GetCurrent(); - -# define _NAN_METHOD_ARGS const v8::FunctionCallbackInfo& args -# define NAN_METHOD(name) void name(_NAN_METHOD_ARGS) -# define _NAN_GETTER_ARGS const v8::PropertyCallbackInfo& args -# define NAN_GETTER(name) \ - void name(v8::Local property, _NAN_GETTER_ARGS) -# define _NAN_SETTER_ARGS const v8::PropertyCallbackInfo& args -# define NAN_SETTER(name) \ - void name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -# define _NAN_PROPERTY_GETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_GETTER(name) \ - void name(v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -# define _NAN_PROPERTY_SETTER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_SETTER(name) \ - void name(v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -# define _NAN_PROPERTY_ENUMERATOR_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_ENUMERATOR(name) \ - void name(_NAN_PROPERTY_ENUMERATOR_ARGS) -# define _NAN_PROPERTY_DELETER_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_DELETER(name) \ - void name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -# define _NAN_PROPERTY_QUERY_ARGS \ - const v8::PropertyCallbackInfo& args -# define NAN_PROPERTY_QUERY(name) \ - void name(v8::Local property, _NAN_PROPERTY_QUERY_ARGS) -# define NanGetInternalFieldPointer(object, index) \ - object->GetAlignedPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetAlignedPointerInInternalField(index, value) - -# define NAN_WEAK_CALLBACK(type, name) \ - void name( \ - v8::Isolate* isolate, \ - v8::Persistent* object, \ - type data) -# define NAN_WEAK_CALLBACK_OBJECT (*object) -# define NAN_WEAK_CALLBACK_DATA(type) ((type) data) - -# define NanScope() v8::HandleScope scope(nan_isolate) -# define NanLocker() v8::Locker locker(nan_isolate) -# define NanUnlocker() v8::Unlocker unlocker(nan_isolate) -# define NanReturnValue(value) return args.GetReturnValue().Set(value) -# define NanReturnUndefined() return -# define NanReturnNull() return args.GetReturnValue().SetNull() -# define NanReturnEmptyString() return args.GetReturnValue().SetEmptyString() -# define NanAssignPersistent(type, handle, obj) handle.Reset(nan_isolate, obj) -# define NanInitPersistent(type, name, obj) \ - v8::Persistent name(nan_isolate, obj) -# define NanObjectWrapHandle(obj) obj->handle() -# define NanMakeWeak(handle, parameter, callback) \ - handle.MakeWeak(nan_isolate, parameter, callback) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - v8::ThrowException(fun(v8::String::New(errmsg))); \ - } while (0); - - inline static void NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - inline static void NanThrowError(v8::Handle error) { - NanScope(); - v8::ThrowException(error); - } - - inline static void NanThrowError(const char *msg, const int errorNumber) { - v8::Local err = v8::Exception::Error(v8::String::New(msg)); - v8::Local obj = err.As(); - obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber)); - NanThrowError(err); - } - - inline static void NanThrowTypeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - inline static void NanThrowRangeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template static inline void NanDispose(v8::Persistent &handle) { - handle.Dispose(nan_isolate); - handle.Clear(); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, - size_t length, - node::smalloc::FreeCallback callback, - void *hint) { - return node::Buffer::New(data, length, callback, hint); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, uint32_t size) { - return node::Buffer::New(data, size); - } - - static inline v8::Local NanNewBufferHandle (uint32_t size) { - return node::Buffer::New(size); - } - - static inline v8::Local NanBufferUse(char* data, uint32_t size) { - return node::Buffer::Use(data, size); - } - - template - inline v8::Local NanPersistentToLocal( - const v8::Persistent& persistent) { - if (persistent.IsWeak()) { - return v8::Local::New(nan_isolate, persistent); - } else { - return *reinterpret_cast*>( - const_cast*>(&persistent)); - } - } - - inline bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value) { - return NanPersistentToLocal(function_template)->HasInstance(value); - } - - static inline v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL, - v8::Handle tmpl = v8::Handle(), - v8::Handle obj = v8::Handle()) { - return v8::Local::New(nan_isolate, v8::Context::New( - nan_isolate, extensions, tmpl, obj)); - } - -#else -// Node 0.8 and 0.10 - -# define _NAN_METHOD_ARGS const v8::Arguments& args -# define NAN_METHOD(name) v8::Handle name(_NAN_METHOD_ARGS) -# define _NAN_GETTER_ARGS const v8::AccessorInfo &args -# define NAN_GETTER(name) \ - v8::Handle name(v8::Local property, _NAN_GETTER_ARGS) -# define _NAN_SETTER_ARGS const v8::AccessorInfo &args -# define NAN_SETTER(name) \ - void name( \ - v8::Local property \ - , v8::Local value \ - , _NAN_SETTER_ARGS) -# define _NAN_PROPERTY_GETTER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_GETTER(name) \ - v8::Handle name(v8::Local property \ - , _NAN_PROPERTY_GETTER_ARGS) -# define _NAN_PROPERTY_SETTER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_SETTER(name) \ - v8::Handle name(v8::Local property \ - , v8::Local value \ - , _NAN_PROPERTY_SETTER_ARGS) -# define _NAN_PROPERTY_ENUMERATOR_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_ENUMERATOR(name) \ - v8::Handle name(_NAN_PROPERTY_ENUMERATOR_ARGS) -# define _NAN_PROPERTY_DELETER_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_DELETER(name) \ - v8::Handle name( \ - v8::Local property \ - , _NAN_PROPERTY_DELETER_ARGS) -# define _NAN_PROPERTY_QUERY_ARGS const v8::AccessorInfo& args -# define NAN_PROPERTY_QUERY(name) \ - v8::Handle name( \ - v8::Local property \ - , _NAN_PROPERTY_QUERY_ARGS) - -# define NanGetInternalFieldPointer(object, index) \ - object->GetPointerFromInternalField(index) -# define NanSetInternalFieldPointer(object, index, value) \ - object->SetPointerInInternalField(index, value) -# define NAN_WEAK_CALLBACK(type, name) void name( \ - v8::Persistent object, \ - void *data) -# define NAN_WEAK_CALLBACK_OBJECT object -# define NAN_WEAK_CALLBACK_DATA(type) ((type) data) - -# define NanScope() v8::HandleScope scope -# define NanLocker() v8::Locker locker -# define NanUnlocker() v8::Unlocker unlocker -# define NanReturnValue(value) return scope.Close(value) -# define NanReturnUndefined() return v8::Undefined() -# define NanReturnNull() return v8::Null() -# define NanReturnEmptyString() return v8::String::Empty() -# define NanInitPersistent(type, name, obj) \ - v8::Persistent name = v8::Persistent::New(obj) -# define NanAssignPersistent(type, handle, obj) \ - handle = v8::Persistent::New(obj) -# define NanObjectWrapHandle(obj) obj->handle_ -# define NanMakeWeak(handle, parameters, callback) \ - handle.MakeWeak(parameters, callback) - -# define _NAN_THROW_ERROR(fun, errmsg) \ - do { \ - NanScope(); \ - return v8::ThrowException(fun(v8::String::New(errmsg))); \ - } while (0); - - inline static v8::Handle NanThrowError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::Error, errmsg); - } - - inline static v8::Handle NanThrowError( - v8::Handle error) { - NanScope(); - return v8::ThrowException(error); - } - - inline static v8::Handle NanThrowError( - const char *msg, - const int errorNumber) { - v8::Local err = v8::Exception::Error(v8::String::New(msg)); - v8::Local obj = err.As(); - obj->Set(v8::String::New("code"), v8::Int32::New(errorNumber)); - return NanThrowError(err); - } - - inline static v8::Handle NanThrowTypeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::TypeError, errmsg); - } - - inline static v8::Handle NanThrowRangeError(const char* errmsg) { - _NAN_THROW_ERROR(v8::Exception::RangeError, errmsg); - } - - template static inline void NanDispose(v8::Persistent &handle) { - handle.Dispose(); - handle.Clear(); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, - size_t length, - node::Buffer::free_callback callback, - void *hint) { - return v8::Local::New( - node::Buffer::New(data, length, callback, hint)->handle_); - } - - static inline v8::Local NanNewBufferHandle ( - char *data, uint32_t size) { - return v8::Local::New(node::Buffer::New(data, size)->handle_); - } - - static inline v8::Local NanNewBufferHandle (uint32_t size) { - return v8::Local::New(node::Buffer::New(size)->handle_); - } - - static inline void FreeData(char *data, void *hint) { - delete[] data; - } - - static inline v8::Local NanBufferUse(char* data, uint32_t size) { - return v8::Local::New( - node::Buffer::New(data, size, FreeData, NULL)->handle_); - } - - template - inline v8::Local NanPersistentToLocal( - const v8::Persistent& persistent) { - if (persistent.IsWeak()) { - return v8::Local::New(persistent); - } else { - return *reinterpret_cast*>( - const_cast*>(&persistent)); - } - } - - inline bool NanHasInstance( - v8::Persistent& function_template - , v8::Handle value) { - return function_template->HasInstance(value); - } - - static inline v8::Local NanNewContextHandle( - v8::ExtensionConfiguration* extensions = NULL - , v8::Handle tmpl = - v8::Handle() - , v8::Handle obj = v8::Handle() - ) { - v8::Persistent ctx = - v8::Context::New(extensions, tmpl, obj); - v8::Local lctx = v8::Local::New(ctx); - ctx.Dispose(); - return lctx; - } - -#endif // node version - -class NanCallback { - public: - NanCallback(const v8::Local &fn) { - NanScope(); - v8::Local obj = v8::Object::New(); - obj->Set(NanSymbol("callback"), fn); - NanAssignPersistent(v8::Object, handle, obj); - } - - ~NanCallback() { - if (handle.IsEmpty()) return; - handle.Dispose(); - handle.Clear(); - } - - inline v8::Local GetFunction () { - return NanPersistentToLocal(handle)->Get(NanSymbol("callback")) - .As(); - } - - // deprecated - void Run(int argc, v8::Local argv[]) { - Call(argc, argv); - } - - void Call(int argc, v8::Local argv[]) { - NanScope(); - - v8::Local callback = NanPersistentToLocal(handle)-> - Get(NanSymbol("callback")).As(); - v8::TryCatch try_catch; - callback->Call(v8::Context::GetCurrent()->Global(), argc, argv); - if (try_catch.HasCaught()) { - node::FatalException(try_catch); - } - } - - private: - v8::Persistent handle; -}; - -/* abstract */ class NanAsyncWorker { -public: - NanAsyncWorker (NanCallback *callback) : callback(callback) { - request.data = this; - errmsg = NULL; - } - - virtual ~NanAsyncWorker () { - NanScope(); - - if (!persistentHandle.IsEmpty()) - NanDispose(persistentHandle); - if (callback) - delete callback; - if (errmsg) - delete errmsg; - } - - virtual void WorkComplete () { - NanScope(); - - if (errmsg == NULL) - HandleOKCallback(); - else - HandleErrorCallback(); - delete callback; - callback = NULL; - } - - virtual void Execute () =0; - - uv_work_t request; - -protected: - v8::Persistent persistentHandle; - NanCallback *callback; - const char *errmsg; - - void SavePersistent(const char *key, v8::Local &obj) { - NanScope(); - - v8::Local handle = NanPersistentToLocal(persistentHandle); - handle->Set(NanSymbol(key), obj); - } - - v8::Local GetFromPersistent(const char *key) { - NanScope(); - - v8::Local handle = NanPersistentToLocal(persistentHandle); - return handle->Get(NanSymbol(key)).As(); - } - - virtual void HandleOKCallback () { - NanScope(); - - callback->Call(0, NULL); - }; - - virtual void HandleErrorCallback () { - NanScope(); - - v8::Local argv[] = { - v8::Exception::Error(v8::String::New(errmsg)) - }; - callback->Call(1, argv); - } -}; - -inline void NanAsyncExecute (uv_work_t* req) { - NanAsyncWorker *worker = static_cast(req->data); - worker->Execute(); -} - -inline void NanAsyncExecuteComplete (uv_work_t* req) { - NanAsyncWorker* worker = static_cast(req->data); - worker->WorkComplete(); - delete worker; -} - -inline void NanAsyncQueueWorker (NanAsyncWorker* worker) { - uv_queue_work( - uv_default_loop() - , &worker->request - , NanAsyncExecute - , (uv_after_work_cb)NanAsyncExecuteComplete - ); -} - -//// Base 64 //// - -#define _nan_base64_encoded_size(size) ((size + 2 - ((size + 2) % 3)) / 3 * 4) - - -// Doesn't check for padding at the end. Can be 1-2 bytes over. -static inline size_t _nan_base64_decoded_size_fast(size_t size) { - size_t remainder = size % 4; - - size = (size / 4) * 3; - if (remainder) { - if (size == 0 && remainder == 1) { - // special case: 1-byte input cannot be decoded - size = 0; - } else { - // non-padded input, add 1 or 2 extra bytes - size += 1 + (remainder == 3); - } - } - - return size; -} - -template -static size_t _nan_base64_decoded_size(const TypeName* src, size_t size) { - if (size == 0) - return 0; - - if (src[size - 1] == '=') - size--; - if (size > 0 && src[size - 1] == '=') - size--; - - return _nan_base64_decoded_size_fast(size); -} - - -// supports regular and URL-safe base64 -static const int _nan_unbase64_table[] = - { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -2, -1, -1, -2, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -2, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, 62, -1, 63, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, - -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, 63, - -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, - 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 - }; - -#define _nan_unbase64(x) _nan_unbase64_table[(uint8_t)(x)] - - -template -static size_t _nan_base64_decode(char* buf, - size_t len, - const TypeName* src, - const size_t srcLen) { - char a, b, c, d; - char* dst = buf; - char* dstEnd = buf + len; - const TypeName* srcEnd = src + srcLen; - - while (src < srcEnd && dst < dstEnd) { - int remaining = srcEnd - src; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining == 0 || *src == '=') break; - a = _nan_unbase64(*src++); - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 1 || *src == '=') break; - b = _nan_unbase64(*src++); - - *dst++ = (a << 2) | ((b & 0x30) >> 4); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 2 || *src == '=') break; - c = _nan_unbase64(*src++); - - *dst++ = ((b & 0x0F) << 4) | ((c & 0x3C) >> 2); - if (dst == dstEnd) break; - - while (_nan_unbase64(*src) < 0 && src < srcEnd) src++, remaining--; - if (remaining <= 3 || *src == '=') break; - d = _nan_unbase64(*src++); - - *dst++ = ((c & 0x03) << 6) | (d & 0x3F); - } - - return dst - buf; -} - -//// HEX //// - -template -unsigned _nan_hex2bin(TypeName c) { - if (c >= '0' && c <= '9') return c - '0'; - if (c >= 'A' && c <= 'F') return 10 + (c - 'A'); - if (c >= 'a' && c <= 'f') return 10 + (c - 'a'); - return static_cast(-1); -} - - -template -static size_t _nan_hex_decode(char* buf, - size_t len, - const TypeName* src, - const size_t srcLen) { - size_t i; - for (i = 0; i < len && i * 2 + 1 < srcLen; ++i) { - unsigned a = _nan_hex2bin(src[i * 2 + 0]); - unsigned b = _nan_hex2bin(src[i * 2 + 1]); - if (!~a || !~b) return i; - buf[i] = a * 16 + b; - } - - return i; -} - -static bool _NanGetExternalParts( - v8::Handle val - , const char** data - , size_t* len) { - - if (node::Buffer::HasInstance(val)) { - *data = node::Buffer::Data(val.As()); - *len = node::Buffer::Length(val.As()); - return true; - - } - - assert(val->IsString()); - v8::Local str = v8::Local::New(val.As()); - - if (str->IsExternalAscii()) { - const v8::String::ExternalAsciiStringResource* ext; - ext = str->GetExternalAsciiStringResource(); - *data = ext->data(); - *len = ext->length(); - return true; - - } else if (str->IsExternal()) { - const v8::String::ExternalStringResource* ext; - ext = str->GetExternalStringResource(); - *data = reinterpret_cast(ext->data()); - *len = ext->length(); - return true; - } - - return false; -} - -namespace Nan { - enum Encoding {ASCII, UTF8, BASE64, UCS2, BINARY, HEX, BUFFER}; -} - -static inline char* NanFromV8String( - v8::Handle from - , enum Nan::Encoding encoding = Nan::UTF8 - , size_t *datalen = NULL - , char *buf = NULL - , size_t buflen = 0 - , int flags = v8::String::NO_NULL_TERMINATION - | v8::String::HINT_MANY_WRITES_EXPECTED) { - - NanScope(); - - size_t sz_; - size_t term_len = !(flags & v8::String::NO_NULL_TERMINATION); - char *data = NULL; - size_t len; - bool is_extern = _NanGetExternalParts( - from - , const_cast(&data) - , &len); - - if (is_extern && !term_len) { - NanSetPointerSafe(datalen, len); - return data; - } - - v8::Local toStr = from->ToString(); - - char *to = buf; - - v8::String::AsciiValue value(toStr); - switch(encoding) { - case Nan::ASCII: -#if NODE_MODULE_VERSION < 0x0C - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteAscii(to, 0, sz_ + term_len, flags)); - return to; -#endif - case Nan::BINARY: - case Nan::BUFFER: - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } -#if NODE_MODULE_VERSION < 0x0C - // TODO(isaacs): THIS IS AWFUL!!! - // AGREE(kkoopa) - { - uint16_t* twobytebuf = new uint16_t[sz_ + term_len]; - - size_t len = toStr->Write(twobytebuf, 0, sz_ + term_len, flags); - - for (size_t i = 0; i < sz_ + term_len && i < len + term_len; i++) { - unsigned char *b = reinterpret_cast(&twobytebuf[i]); - to[i] = *b; - } - - NanSetPointerSafe(datalen, len); - - delete[] twobytebuf; - return to; - } -#else - NanSetPointerSafe( - datalen, - toStr->WriteOneByte( - reinterpret_cast(to) - , 0 - , sz_ + term_len - , flags)); - return to; -#endif - case Nan::UTF8: - sz_ = toStr->Utf8Length(); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len && "too small buffer"); - } - NanSetPointerSafe( - datalen - , toStr->WriteUtf8(to, sz_ + term_len, NULL, flags) - term_len); - return to; - case Nan::BASE64: - sz_ = _nan_base64_decoded_size(*value, toStr->Length()); - if (to == NULL) { - to = new char[sz_ + term_len]; - } else { - assert(buflen >= sz_ + term_len); - } - NanSetPointerSafe( - datalen - , _nan_base64_decode(to, sz_, *value, value.length())); - if (term_len) { - to[sz_] = '\0'; - } - return to; - case Nan::UCS2: - { - sz_ = toStr->Length(); - if (to == NULL) { - to = new char[(sz_ + term_len) * 2]; - } else { - assert(buflen >= (sz_ + term_len) * 2 && "too small buffer"); - } - - int bc = 2 * toStr->Write( - reinterpret_cast(to) - , 0 - , sz_ + term_len - , flags); - NanSetPointerSafe(datalen, bc); - return to; - } - case Nan::HEX: - sz_ = toStr->Length(); - assert(!(sz_ & 1) && "bad hex data"); - if (to == NULL) { - to = new char[sz_ / 2 + term_len]; - } else { - assert(buflen >= sz_ / 2 + term_len && "too small buffer"); - } - - NanSetPointerSafe( - datalen - , _nan_hex_decode(to, sz_ / 2, *value, value.length())); - if (term_len) { - to[sz_ / 2] = '\0'; - } - return to; - default: - assert(0 && "unknown encoding"); - } - return to; -} - -#endif diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json deleted file mode 100644 index 34ba61a9..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/nan/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "nan", - "version": "0.3.2", - "description": "Native Abstractions for Node.js: C++ header for Node 0.8->0.12 compatibility", - "main": ".index.js", - "repository": { - "type": "git", - "url": "git://github.com/rvagg/nan.git" - }, - "contributors": [ - { - "name": "Rod Vagg", - "email": "r@va.gg", - "url": "https://github.com/rvagg" - }, - { - "name": "Benjamin Byholm", - "email": "bbyholm@abo.fi", - "url": "https://github.com/kkoopa/" - }, - { - "name": "Trevor Norris", - "email": "trev.norris@gmail.com", - "url": "https://github.com/trevnorris" - } - ], - "license": "MIT", - "readme": "Native Abstractions for Node.js\n===============================\n\n**A header file filled with macro and utility goodness for making addon development for Node.js easier across versions 0.8, 0.10 and 0.11, and eventually 0.12.**\n\n***Current version: 0.3.2*** *(See [nan.h](https://github.com/rvagg/nan/blob/master/nan.h) for changelog)*\n\n[![NPM](https://nodei.co/npm/nan.png?downloads=true&stars=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6)](https://nodei.co/npm/nan/)\n\nThanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.11/0.12, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle.\n\nThis project also contains some helper utilities that make addon development a bit more pleasant.\n\n * **[Usage](#usage)**\n * **[Example](#example)**\n * **[API](#api)**\n\n\n## Usage\n\nSimply add **NAN** as a dependency in the *package.json* of your Node addon:\n\n```js\n\"dependencies\": {\n ...\n \"nan\" : \"~0.3.1\"\n ...\n}\n```\n\nPull in the path to **NAN** in your *binding.gyp* so that you can use `#include \"nan.h\"` in your *.cpp*:\n\n```js\n\"include_dirs\" : [\n ...\n \"` when compiling your addon.\n\n\n## Example\n\nSee **[LevelDOWN](https://github.com/rvagg/node-leveldown/pull/48)** for a full example of **NAN** in use.\n\nFor a simpler example, see the **[async pi estimation example](https://github.com/rvagg/nan/tree/master/examples/async_pi_estimate)** in the examples directory for full code and an explanation of what this Monte Carlo Pi estimation example does. Below are just some parts of the full example that illustrate the use of **NAN**.\n\nCompare to the current 0.10 version of this example, found in the [node-addon-examples](https://github.com/rvagg/node-addon-examples/tree/master/9_async_work) repository and also a 0.11 version of the same found [here](https://github.com/kkoopa/node-addon-examples/tree/5c01f58fc993377a567812597e54a83af69686d7/9_async_work).\n\nNote that there is no embedded version sniffing going on here and also the async work is made much simpler, see below for details on the `NanAsyncWorker` class.\n\n```c++\n// addon.cc\n#include \n#include \"nan.h\"\n// ...\n\nusing namespace v8;\n\nvoid InitAll(Handle exports) {\n exports->Set(NanSymbol(\"calculateSync\"),\n FunctionTemplate::New(CalculateSync)->GetFunction());\n\n exports->Set(NanSymbol(\"calculateAsync\"),\n FunctionTemplate::New(CalculateAsync)->GetFunction());\n}\n\nNODE_MODULE(addon, InitAll)\n```\n\n```c++\n// sync.h\n#include \n#include \"nan.h\"\n\nNAN_METHOD(CalculateSync);\n```\n\n```c++\n// sync.cc\n#include \n#include \"nan.h\"\n#include \"sync.h\"\n// ...\n\nusing namespace v8;\n\n// Simple synchronous access to the `Estimate()` function\nNAN_METHOD(CalculateSync) {\n NanScope();\n\n // expect a number as the first argument\n int points = args[0]->Uint32Value();\n double est = Estimate(points);\n\n NanReturnValue(Number::New(est));\n}\n```\n\n```c++\n// async.cc\n#include \n#include \"nan.h\"\n#include \"async.h\"\n\n// ...\n\nusing namespace v8;\n\nclass PiWorker : public NanAsyncWorker {\n public:\n PiWorker(NanCallback *callback, int points)\n : NanAsyncWorker(callback), points(points) {}\n ~PiWorker() {}\n\n // Executed inside the worker-thread.\n // It is not safe to access V8, or V8 data structures\n // here, so everything we need for input and output\n // should go on `this`.\n void Execute () {\n estimate = Estimate(points);\n }\n\n // Executed when the async work is complete\n // this function will be run inside the main event loop\n // so it is safe to use V8 again\n void HandleOKCallback () {\n NanScope();\n\n Local argv[] = {\n Local::New(Null())\n , Number::New(estimate)\n };\n\n callback->Call(2, argv);\n };\n\n private:\n int points;\n double estimate;\n};\n\n// Asynchronous access to the `Estimate()` function\nNAN_METHOD(CalculateAsync) {\n NanScope();\n\n int points = args[0]->Uint32Value();\n NanCallback *callback = new NanCallback(args[1].As());\n\n NanAsyncQueueWorker(new PiWorker(callback, points));\n NanReturnUndefined();\n}\n```\n\n\n## API\n\n * NAN_METHOD\n * NAN_GETTER\n * NAN_SETTER\n * NAN_PROPERTY_GETTER\n * NAN_PROPERTY_SETTER\n * NAN_PROPERTY_ENUMERATOR\n * NAN_PROPERTY_DELETER\n * NAN_PROPERTY_QUERY\n * NAN_WEAK_CALLBACK\n * NanReturnValue\n * NanReturnUndefined\n * NanReturnNull\n * NanReturnEmptyString\n * NanScope\n * NanLocker\n * NanUnlocker\n * NanGetInternalFieldPointer\n * NanSetInternalFieldPointer\n * NanObjectWrapHandle\n * NanMakeWeak\n * NanSymbol\n * NanGetPointerSafe\n * NanSetPointerSafe\n * NanFromV8String\n * NanBooleanOptionValue\n * NanUInt32OptionValue\n * NanThrowError, NanThrowTypeError, NanThrowRangeError, NanThrowError(Handle), NanThrowError(Handle, int)\n * NanNewBufferHandle(char *, size_t, FreeCallback, void *), NanNewBufferHandle(char *, uint32_t), NanNewBufferHandle(uint32_t)\n * NanBufferUse(char *, uint32_t)\n * NanNewContextHandle\n * NanHasInstance\n * NanPersistentToLocal\n * NanDispose\n * NanAssignPersistent\n * NanInitPersistent\n * NanCallback\n * NanAsyncWorker\n * NanAsyncQueueWorker\n\n\n### NAN_METHOD(methodname)\n\nUse `NAN_METHOD` to define your V8 accessible methods:\n\n```c++\n// .h:\nclass Foo : public node::ObjectWrap {\n ...\n\n static NAN_METHOD(Bar);\n static NAN_METHOD(Baz);\n}\n\n\n// .cc:\nNAN_METHOD(Foo::Bar) {\n ...\n}\n\nNAN_METHOD(Foo::Baz) {\n ...\n}\n```\n\nThe reason for this macro is because of the method signature change in 0.11:\n\n```c++\n// 0.10 and below:\nHandle name(const Arguments& args)\n\n// 0.11 and above\nvoid name(const FunctionCallbackInfo& args)\n```\n\nThe introduction of `FunctionCallbackInfo` brings additional complications:\n\n\n### NAN_GETTER(methodname)\n\nUse `NAN_GETTER` to declare your V8 accessible getters. You get a `Local` `property` and an appropriately typed `args` object that can act like the `args` argument to a `NAN_METHOD` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_GETTER`.\n\n\n### NAN_SETTER(methodname)\n\nUse `NAN_SETTER` to declare your V8 accessible setters. Same as `NAN_GETTER` but you also get a `Local` `value` object to work with.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_SETTER`.\n\n\n### NAN_PROPERTY_GETTER(cbname)\nUse `NAN_PROPERTY_GETTER` to declare your V8 accessible property getters. You get a `Local` `property` and an appropriately typed `args` object that can act similar to the `args` argument to a `NAN_METHOD` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_GETTER`.\n\n\n### NAN_PROPERTY_SETTER(cbname)\nUse `NAN_PROPERTY_SETTER` to declare your V8 accessible property setters. Same as `NAN_PROPERTY_GETTER` but you also get a `Local` `value` object to work with.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_SETTER`.\n\n\n### NAN_PROPERTY_ENUMERATOR(cbname)\nUse `NAN_PROPERTY_ENUMERATOR` to declare your V8 accessible property enumerators. You get an appropriately typed `args` object like the `args` argument to a `NAN_PROPERTY_GETTER` call.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_ENUMERATOR`.\n\n\n### NAN_PROPERTY_DELETER(cbname)\nUse `NAN_PROPERTY_DELETER` to declare your V8 accessible property deleters. Same as `NAN_PROPERTY_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_DELETER`.\n\n\n### NAN_PROPERTY_QUERY(cbname)\nUse `NAN_PROPERTY_QUERY` to declare your V8 accessible property queries. Same as `NAN_PROPERTY_GETTER`.\n\nYou can use `NanReturnNull()`, `NanReturnEmptyString()`, `NanReturnUndefined()` and `NanReturnValue()` in a `NAN_PROPERTY_QUERY`.\n\n\n### NAN_WEAK_CALLBACK(type, cbname)\n\nUse `NAN_WEAK_CALLBACK` to declare your V8 WeakReference callbacks. There is an object argument accessible through `NAN_WEAK_CALLBACK_OBJECT`. The `type` argument gives the type of the `data` argument, accessible through `NAN_WEAK_CALLBACK_DATA(type)`.\n\n```c++\nstatic NAN_WEAK_CALLBACK(BufferReference*, WeakCheck) {\n if (NAN_WEAK_CALLBACK_DATA(BufferReference*)->noLongerNeeded_) {\n delete NAN_WEAK_CALLBACK_DATA(BufferReference*);\n } else {\n // Still in use, revive, prevent GC\n NanMakeWeak(NAN_WEAK_CALLBACK_OBJECT, NAN_WEAK_CALLBACK_DATA(BufferReference*), &WeakCheck);\n }\n}\n\n```\n\n### NanReturnValue(Handle<Value>)\n\nUse `NanReturnValue` when you want to return a value from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n ...\n\n NanReturnValue(String::New(\"FooBar!\"));\n}\n```\n\nNo `return` statement required.\n\n\n### NanReturnUndefined()\n\nUse `NanReturnUndefined` when you don't want to return anything from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnUndefined();\n}\n```\n\n\n### NanReturnNull()\n\nUse `NanReturnNull` when you want to return `Null` from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnNull();\n}\n```\n\n\n### NanReturnEmptyString()\n\nUse `NanReturnEmptyString` when you want to return an empty `String` from your V8 accessible method:\n\n```c++\nNAN_METHOD(Foo::Baz) {\n ...\n\n NanReturnEmptyString();\n}\n```\n\n\n### NanScope()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanScope()` necessary, use it in place of `HandleScope scope`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanScope();\n\n NanReturnValue(String::New(\"FooBar!\"));\n}\n```\n\n\n### NanLocker()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanLocker()` necessary, use it in place of `Locker locker`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanLocker();\n ...\n NanUnlocker();\n}\n```\n\n\n### NanUnlocker()\n\nThe introduction of `isolate` references for many V8 calls in Node 0.11 makes `NanUnlocker()` necessary, use it in place of `Unlocker unlocker`:\n\n```c++\nNAN_METHOD(Foo::Bar) {\n NanLocker();\n ...\n NanUnlocker();\n}\n```\n\n\n### void * NanGetInternalFieldPointer(Handle<Object>, int)\n\nGets a pointer to the internal field with at `index` from a V8 `Object` handle.\n\n```c++\nLocal obj;\n...\nNanGetInternalFieldPointer(obj, 0);\n```\n\n### void NanSetInternalFieldPointer(Handle<Object>, int, void *)\n\nSets the value of the internal field at `index` on a V8 `Object` handle.\n\n```c++\nstatic Persistent dataWrapperCtor;\n...\nLocal wrapper = NanPersistentToLocal(dataWrapperCtor)->NewInstance();\nNanSetInternalFieldPointer(wrapper, 0, this);\n```\n\n\n### Local<Object> NanObjectWrapHandle(Object)\n\nWhen you want to fetch the V8 object handle from a native object you've wrapped with Node's `ObjectWrap`, you should use `NanObjectWrapHandle`:\n\n```c++\nNanObjectWrapHandle(iterator)->Get(String::NewSymbol(\"end\"))\n```\n\n\n### NanMakeWeak(Persistent<T>, parameter, callback)\n\nMake a persistent reference weak.\n\n\n### String NanSymbol(char *)\n\nThis isn't strictly about compatibility, it's just an easier way to create string symbol objects (i.e. `String::NewSymbol(x)`), for getting and setting object properties, or names of objects.\n\n```c++\nbool foo = false;\nif (obj->Has(NanSymbol(\"foo\")))\n foo = optionsObj->Get(NanSymbol(\"foo\"))->BooleanValue()\n```\n\n\n### Type NanGetPointerSafe(Type *[, Type])\n\nA helper for getting values from optional pointers. If the pointer is `NULL`, the function returns the optional default value, which defaults to `0`. Otherwise, the function returns the value the pointer points to.\n\n```c++\nchar *plugh(uint32_t *optional) {\n char res[] = \"xyzzy\";\n uint32_t param = NanGetPointerSafe(optional, 0x1337);\n switch (param) {\n ...\n }\n NanSetPointerSafe(optional, 0xDEADBEEF);\n} \n```\n\n\n### bool NanSetPointerSafe(Type *, Type)\n\nA helper for setting optional argument pointers. If the pointer is `NULL`, the function simply return `false`. Otherwise, the value is assigned to the variable the pointer points to.\n\n```c++\nconst char *plugh(size_t *outputsize) {\n char res[] = \"xyzzy\";\n if !(NanSetPointerSafe(outputsize, strlen(res) + 1)) {\n ...\n }\n\n ...\n}\n```\n\n\n### char* NanFromV8String(Handle<Value>[, enum Nan::Encoding, size_t *, char *, size_t, int])\n\nWhen you want to convert a V8 `String` to a `char*` use `NanFromV8String`. It is possible to define an encoding that defaults to `Nan::UTF8` as well as a pointer to a variable that will be assigned the number of bytes in the returned string. It is also possible to supply a buffer and its length to the function in order not to have a new buffer allocated. The final argument allows optionally setting `String::WriteOptions`, which default to `String::HINT_MANY_WRITES_EXPECTED | String::NO_NULL_TERMINATION`.\nJust remember that you'll end up with an object that you'll need to `delete[]` at some point unless you supply your own buffer:\n\n```c++\nsize_t count;\nchar* name = NanFromV8String(args[0]);\nchar* decoded = NanFromV8String(args[1], Nan::BASE64, &count, NULL, 0, String::HINT_MANY_WRITES_EXPECTED);\nchar param_copy[count];\nmemcpy(param_copy, decoded, count);\ndelete[] decoded;\n```\n\n\n### bool NanBooleanOptionValue(Handle<Value>, Handle<String>[, bool])\n\nWhen you have an \"options\" object that you need to fetch properties from, boolean options can be fetched with this pair. They check first if the object exists (`IsEmpty`), then if the object has the given property (`Has`) then they get and convert/coerce the property to a `bool`.\n\nThe optional last parameter is the *default* value, which is `false` if left off:\n\n```c++\n// `foo` is false unless the user supplies a truthy value for it\nbool foo = NanBooleanOptionValue(optionsObj, NanSymbol(\"foo\"));\n// `bar` is true unless the user supplies a falsy value for it\nbool bar = NanBooleanOptionValueDefTrue(optionsObj, NanSymbol(\"bar\"), true);\n```\n\n\n### uint32_t NanUInt32OptionValue(Handle<Value>, Handle<String>, uint32_t)\n\nSimilar to `NanBooleanOptionValue`, use `NanUInt32OptionValue` to fetch an integer option from your options object. Can be any kind of JavaScript `Number` and it will be coerced to an unsigned 32-bit integer.\n\nRequires all 3 arguments as a default is not optional:\n\n```c++\nuint32_t count = NanUInt32OptionValue(optionsObj, NanSymbol(\"count\"), 1024);\n```\n\n\n### NanThrowError(message), NanThrowTypeError(message), NanThrowRangeError(message), NanThrowError(Local<Value>), NanThrowError(Local<Value>, int)\n\nFor throwing `Error`, `TypeError` and `RangeError` objects. You should `return` this call:\n\n```c++\nreturn NanThrowError(\"you must supply a callback argument\");\n```\n\nCan also handle any custom object you may want to throw. If used with the error code argument, it will add the supplied error code to the error object as a property called `code`.\n\n\n### Local<Object> NanNewBufferHandle(char *, uint32_t), Local<Object> NanNewBufferHandle(uint32_t)\n\nThe `Buffer` API has changed a little in Node 0.11, this helper provides consistent access to `Buffer` creation:\n\n```c++\nNanNewBufferHandle((char*)value.data(), value.size());\n```\n\nCan also be used to initialize a `Buffer` with just a `size` argument.\n\nCan also be supplied with a `NAN_WEAK_CALLBACK` and a hint for the garbage collector, when dealing with weak references.\n\n\n### Local<Object> NanBufferUse(char*, uint32_t)\n\n`Buffer::New(char*, uint32_t)` prior to 0.11 would make a copy of the data.\nWhile it was possible to get around this, it required a shim by passing a\ncallback. So the new API `Buffer::Use(char*, uint32_t)` was introduced to remove\nneeding to use this shim.\n\n`NanBufferUse` uses the `char*` passed as the backing data, and will free the\nmemory automatically when the weak callback is called. Keep this in mind, as\ncareless use can lead to \"double free or corruption\" and other cryptic failures.\n\n\n### bool NanHasInstance(Persistent<FunctionTemplate>&, Handle<Value>)\n\nCan be used to check the type of an object to determine it is of a particular class you have already defined and have a `Persistent` handle for.\n\n\n### Local<Type> NanPersistentToLocal(Persistent<Type>&)\n\nAside from `FunctionCallbackInfo`, the biggest and most painful change to V8 in Node 0.11 is the many restrictions now placed on `Persistent` handles. They are difficult to assign and difficult to fetch the original value out of.\n\nUse `NanPersistentToLocal` to convert a `Persistent` handle back to a `Local` handle.\n\n```c++\nLocal handle = NanPersistentToLocal(persistentHandle);\n```\n\n\n### Local<Context> NanNewContextHandle([ExtensionConfiguration*, Handle<ObjectTemplate>, Handle<Value>])\nCreates a new `Local` handle.\n\n```c++\nLocal ftmpl = FunctionTemplate::New();\nLocal otmpl = ftmpl->InstanceTemplate();\nLocal ctx = NanNewContextHandle(NULL, otmpl);\n```\n\n\n### void NanDispose(Persistent<T> &)\n\nUse `NanDispose` to dispose a `Persistent` handle.\n\n```c++\nNanDispose(persistentHandle);\n```\n\n\n### NanAssignPersistent(type, handle, object)\n\nUse `NanAssignPersistent` to assign a non-`Persistent` handle to a `Persistent` one. You can no longer just declare a `Persistent` handle and assign directly to it later, you have to `Reset` it in Node 0.11, so this makes it easier.\n\nIn general it is now better to place anything you want to protect from V8's garbage collector as properties of a generic `Object` and then assign that to a `Persistent`. This works in older versions of Node also if you use `NanAssignPersistent`:\n\n```c++\nPersistent persistentHandle;\n\n...\n\nLocal obj = Object::New();\nobj->Set(NanSymbol(\"key\"), keyHandle); // where keyHandle might be a Local\nNanAssignPersistent(Object, persistentHandle, obj)\n```\n\n\n### NanInitPersistent(type, name, object)\n\nUser `NanInitPersistent` to declare and initialize a new `Persistent` with the supplied object. The assignment operator for `Persistent` is no longer public in Node 0.11, so this macro makes it easier to declare and initializing a new `Persistent`. See NanAssignPersistent for more information.\n\n```c++\nLocal obj = Object::New();\nobj->Set(NanSymbol(\"key\"), keyHandle); // where keyHandle might be a Local\nNanInitPersistent(Object, persistentHandle, obj);\n```\n\n\n### NanCallback\n\nBecause of the difficulties imposed by the changes to `Persistent` handles in V8 in Node 0.11, creating `Persistent` versions of your `Local` handles is annoyingly tricky. `NanCallback` makes it easier by taking your `Local` handle, making it persistent until the `NanCallback` is deleted and even providing a handy `Call()` method to fetch and execute the callback `Function`.\n\n```c++\nLocal callbackHandle = callback = args[0].As();\nNanCallback *callback = new NanCallback(callbackHandle);\n// pass `callback` around and it's safe from GC until you:\ndelete callback;\n```\n\nYou can execute the callback like so:\n\n```c++\n// no arguments:\ncallback->Call(0, NULL);\n\n// an error argument:\nLocal argv[] = {\n Exception::Error(String::New(\"fail!\"))\n};\ncallback->Call(1, argv);\n\n// a success argument:\nLocal argv[] = {\n Local::New(Null()),\n String::New(\"w00t!\")\n};\ncallback->Call(2, argv);\n```\n\n`NanCallback` also has a `Local GetCallback()` method that you can use to fetch a local handle to the underlying callback function if you need it.\n\n\n### NanAsyncWorker\n\n`NanAsyncWorker` is an abstract class that you can subclass to have much of the annoying async queuing and handling taken care of for you. It can even store arbitrary V8 objects for you and have them persist while the async work is in progress.\n\nSee a rough outline of the implementation:\n\n```c++\nclass NanAsyncWorker {\npublic:\n NanAsyncWorker (NanCallback *callback);\n\n // Clean up persistent handles and delete the *callback\n virtual ~NanAsyncWorker ();\n\n // Check the `char *errmsg` property and call HandleOKCallback()\n // or HandleErrorCallback depending on whether it has been set or not\n virtual void WorkComplete ();\n\n // You must implement this to do some async work. If there is an\n // error then allocate `errmsg` to to a message and the callback will\n // be passed that string in an Error object\n virtual void Execute ();\n\nprotected:\n // Set this if there is an error, otherwise it's NULL\n const char *errmsg;\n\n // Save a V8 object in a Persistent handle to protect it from GC\n void SavePersistent(const char *key, Local &obj);\n\n // Fetch a stored V8 object (don't call from within `Execute()`)\n Local GetFromPersistent(const char *key);\n\n // Default implementation calls the callback function with no arguments.\n // Override this to return meaningful data\n virtual void HandleOKCallback ();\n\n // Default implementation calls the callback function with an Error object\n // wrapping the `errmsg` string\n virtual void HandleErrorCallback ();\n};\n```\n\n\n### NanAsyncQueueWorker(NanAsyncWorker *)\n\n`NanAsyncQueueWorker` will run a `NanAsyncWorker` asynchronously via libuv. Both the *execute* and *after_work* steps are taken care of for you—most of the logic for this is embedded in `NanAsyncWorker`.\n\n### Contributors\n\nNAN is only possible due to the excellent work of the following contributors:\n\n\n\n\n\n
    Rod VaggGitHub/rvaggTwitter/@rvagg
    Benjamin ByholmGitHub/kkoopa
    Trevor NorrisGitHub/trevnorrisTwitter/@trevnorris
    \n\nLicence & copyright\n-----------------------\n\nCopyright (c) 2013 Rod Vagg & NAN contributors (listed above).\n\nNative Abstractions for Node.js is licensed under an MIT +no-false-attribs license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/rvagg/nan/issues" - }, - "homepage": "https://github.com/rvagg/nan", - "_id": "nan@0.3.2", - "_from": "nan@~0.3.0" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/.npmignore deleted file mode 100644 index 6bfffbb7..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build/ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/Makefile b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/Makefile deleted file mode 100644 index 7496b6fc..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -ALL_TESTS = $(shell find test/ -name '*.test.js') - -run-tests: - @./node_modules/.bin/mocha \ - -t 2000 \ - $(TESTFLAGS) \ - $(TESTS) - -test: - @$(MAKE) NODE_PATH=lib TESTS="$(ALL_TESTS)" run-tests - -.PHONY: test diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/README.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/README.md deleted file mode 100644 index 4b39a2a7..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# options.js # - -A very light-weight in-code option parsers for node.js. - -## License ## - -(The MIT License) - -Copyright (c) 2012 Einar Otto Stangvik <einaros@gmail.com> - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/lib/options.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/lib/options.js deleted file mode 100644 index 4fc45e90..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/lib/options.js +++ /dev/null @@ -1,86 +0,0 @@ -/*! - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -var fs = require('fs'); - -function Options(defaults) { - var internalValues = {}; - var values = this.value = {}; - Object.keys(defaults).forEach(function(key) { - internalValues[key] = defaults[key]; - Object.defineProperty(values, key, { - get: function() { return internalValues[key]; }, - configurable: false, - enumerable: true - }); - }); - this.reset = function() { - Object.keys(defaults).forEach(function(key) { - internalValues[key] = defaults[key]; - }); - return this; - }; - this.merge = function(options, required) { - options = options || {}; - if (Object.prototype.toString.call(required) === '[object Array]') { - var missing = []; - for (var i = 0, l = required.length; i < l; ++i) { - var key = required[i]; - if (!(key in options)) { - missing.push(key); - } - } - if (missing.length > 0) { - if (missing.length > 1) { - throw new Error('options ' + - missing.slice(0, missing.length - 1).join(', ') + ' and ' + - missing[missing.length - 1] + ' must be defined'); - } - else throw new Error('option ' + missing[0] + ' must be defined'); - } - } - Object.keys(options).forEach(function(key) { - if (key in internalValues) { - internalValues[key] = options[key]; - } - }); - return this; - }; - this.copy = function(keys) { - var obj = {}; - Object.keys(defaults).forEach(function(key) { - if (keys.indexOf(key) !== -1) { - obj[key] = values[key]; - } - }); - return obj; - }; - this.read = function(filename, cb) { - if (typeof cb == 'function') { - var self = this; - fs.readFile(filename, function(error, data) { - if (error) return cb(error); - var conf = JSON.parse(data); - self.merge(conf); - cb(); - }); - } - else { - var conf = JSON.parse(fs.readFileSync(filename)); - this.merge(conf); - } - return this; - }; - this.isDefined = function(key) { - return typeof values[key] != 'undefined'; - }; - this.isDefinedAndNonNull = function(key) { - return typeof values[key] != 'undefined' && values[key] !== null; - }; - Object.freeze(values); - Object.freeze(this); -} - -module.exports = Options; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json deleted file mode 100644 index cbdc5c21..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/package.json +++ /dev/null @@ -1,33 +0,0 @@ -{ - "author": { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com", - "url": "http://2x.io" - }, - "name": "options", - "description": "A very light-weight in-code option parsers for node.js.", - "version": "0.0.5", - "repository": { - "type": "git", - "url": "git://github.com/einaros/options.js.git" - }, - "main": "lib/options", - "scripts": { - "test": "make test" - }, - "engines": { - "node": ">=0.4.0" - }, - "dependencies": {}, - "devDependencies": { - "mocha": "latest" - }, - "readme": "# options.js #\n\nA very light-weight in-code option parsers for node.js.\n\n## License ##\n\n(The MIT License)\n\nCopyright (c) 2012 Einar Otto Stangvik <einaros@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/einaros/options.js/issues" - }, - "homepage": "https://github.com/einaros/options.js", - "_id": "options@0.0.5", - "_from": "options@>=0.0.5" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/fixtures/test.conf b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/fixtures/test.conf deleted file mode 100644 index 6e624441..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/fixtures/test.conf +++ /dev/null @@ -1,4 +0,0 @@ -{ - "a": "foobar", - "b": false -} \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/options.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/options.test.js deleted file mode 100644 index 6a1d9f5b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/options/test/options.test.js +++ /dev/null @@ -1,140 +0,0 @@ -var Options = require('options') - , assert = require('assert'); - -describe('Options', function() { - describe('#ctor', function() { - it('initializes options', function() { - var option = new Options({a: true, b: false}); - assert.strictEqual(true, option.value.a); - assert.strictEqual(false, option.value.b); - }); - }); - - describe('#merge', function() { - it('merges options from another object', function() { - var option = new Options({a: true, b: false}); - option.merge({b: true}); - assert.strictEqual(true, option.value.a); - assert.strictEqual(true, option.value.b); - }); - it('does nothing when arguments are undefined', function() { - var option = new Options({a: true, b: false}); - option.merge(undefined); - assert.strictEqual(true, option.value.a); - assert.strictEqual(false, option.value.b); - }); - it('cannot set values that werent already there', function() { - var option = new Options({a: true, b: false}); - option.merge({c: true}); - assert.strictEqual('undefined', typeof option.value.c); - }); - it('can require certain options to be defined', function() { - var option = new Options({a: true, b: false, c: 3}); - var caughtException = false; - try { - option.merge({}, ['a', 'b', 'c']); - } - catch (e) { - caughtException = e.toString() == 'Error: options a, b and c must be defined'; - } - assert.strictEqual(true, caughtException); - }); - it('can require certain options to be defined, when options are undefined', function() { - var option = new Options({a: true, b: false, c: 3}); - var caughtException = false; - try { - option.merge(undefined, ['a', 'b', 'c']); - } - catch (e) { - caughtException = e.toString() == 'Error: options a, b and c must be defined'; - } - assert.strictEqual(true, caughtException); - }); - it('returns "this"', function() { - var option = new Options({a: true, b: false, c: 3}); - assert.strictEqual(option, option.merge()); - }); - }); - - describe('#copy', function() { - it('returns a new object with the indicated options', function() { - var option = new Options({a: true, b: false, c: 3}); - option.merge({c: 4}); - var obj = option.copy(['a', 'c']); - assert.strictEqual(true, obj.a); - assert.strictEqual(4, obj.c); - assert.strictEqual('undefined', typeof obj.b); - }); - }); - - describe('#value', function() { - it('can be enumerated', function() { - var option = new Options({a: true, b: false}); - assert.strictEqual(2, Object.keys(option.value).length); - }); - it('can not be used to set values', function() { - var option = new Options({a: true, b: false}); - option.value.b = true; - assert.strictEqual(false, option.value.b); - }); - it('can not be used to add values', function() { - var option = new Options({a: true, b: false}); - option.value.c = 3; - assert.strictEqual('undefined', typeof option.value.c); - }); - }); - - describe('#isDefined', function() { - it('returns true if the named value is defined', function() { - var option = new Options({a: undefined}); - assert.strictEqual(false, option.isDefined('a')); - option.merge({a: false}); - assert.strictEqual(true, option.isDefined('a')); - }); - }); - - describe('#isDefinedAndNonNull', function() { - it('returns true if the named value is defined and non-null', function() { - var option = new Options({a: undefined}); - assert.strictEqual(false, option.isDefinedAndNonNull('a')); - option.merge({a: null}); - assert.strictEqual(false, option.isDefinedAndNonNull('a')); - option.merge({a: 2}); - assert.strictEqual(true, option.isDefinedAndNonNull('a')); - }); - }); - - describe('#read', function() { - it('reads and merges config from a file', function() { - var option = new Options({a: true, b: true}); - option.read(__dirname + '/fixtures/test.conf'); - assert.strictEqual('foobar', option.value.a); - assert.strictEqual(false, option.value.b); - }); - - it('asynchronously reads and merges config from a file when a callback is passed', function(done) { - var option = new Options({a: true, b: true}); - option.read(__dirname + '/fixtures/test.conf', function(error) { - assert.strictEqual('foobar', option.value.a); - assert.strictEqual(false, option.value.b); - done(); - }); - }); - }); - - describe('#reset', function() { - it('resets options to defaults', function() { - var option = new Options({a: true, b: false}); - option.merge({b: true}); - assert.strictEqual(true, option.value.b); - option.reset(); - assert.strictEqual(false, option.value.b); - }); - }); - - it('is immutable', function() { - var option = new Options({a: true, b: false}); - option.foo = 2; - assert.strictEqual('undefined', typeof option.foo); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/.npmignore b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/.npmignore deleted file mode 100644 index 6bfffbb7..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -npm-debug.log -node_modules -.*.swp -.lock-* -build/ diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/README.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/README.md deleted file mode 100644 index 55eb3c11..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# tinycolor # - -This is a no-fuzz, barebone, zero muppetry color module for node.js. \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/example.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/example.js deleted file mode 100644 index f7540468..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/example.js +++ /dev/null @@ -1,3 +0,0 @@ -require('./tinycolor'); -console.log('this should be red and have an underline!'.grey.underline); -console.log('this should have a blue background!'.bgBlue); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json deleted file mode 100644 index c9a34e93..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/package.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "author": { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com", - "url": "http://2x.io" - }, - "name": "tinycolor", - "description": "a to-the-point color module for node", - "version": "0.0.1", - "repository": { - "type": "git", - "url": "git://github.com/einaros/tinycolor.git" - }, - "engines": { - "node": ">=0.4.0" - }, - "dependencies": {}, - "devDependencies": {}, - "main": "tinycolor", - "readme": "# tinycolor #\n\nThis is a no-fuzz, barebone, zero muppetry color module for node.js.", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/einaros/tinycolor/issues" - }, - "homepage": "https://github.com/einaros/tinycolor", - "_id": "tinycolor@0.0.1", - "_from": "tinycolor@0.x" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js deleted file mode 100644 index 36e552c4..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/node_modules/tinycolor/tinycolor.js +++ /dev/null @@ -1,31 +0,0 @@ -var styles = { - 'bold': ['\033[1m', '\033[22m'], - 'italic': ['\033[3m', '\033[23m'], - 'underline': ['\033[4m', '\033[24m'], - 'inverse': ['\033[7m', '\033[27m'], - 'black': ['\033[30m', '\033[39m'], - 'red': ['\033[31m', '\033[39m'], - 'green': ['\033[32m', '\033[39m'], - 'yellow': ['\033[33m', '\033[39m'], - 'blue': ['\033[34m', '\033[39m'], - 'magenta': ['\033[35m', '\033[39m'], - 'cyan': ['\033[36m', '\033[39m'], - 'white': ['\033[37m', '\033[39m'], - 'default': ['\033[39m', '\033[39m'], - 'grey': ['\033[90m', '\033[39m'], - 'bgBlack': ['\033[40m', '\033[49m'], - 'bgRed': ['\033[41m', '\033[49m'], - 'bgGreen': ['\033[42m', '\033[49m'], - 'bgYellow': ['\033[43m', '\033[49m'], - 'bgBlue': ['\033[44m', '\033[49m'], - 'bgMagenta': ['\033[45m', '\033[49m'], - 'bgCyan': ['\033[46m', '\033[49m'], - 'bgWhite': ['\033[47m', '\033[49m'], - 'bgDefault': ['\033[49m', '\033[49m'] -} -Object.keys(styles).forEach(function(style) { - Object.defineProperty(String.prototype, style, { - get: function() { return styles[style][0] + this + styles[style][1]; }, - enumerable: false - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json deleted file mode 100644 index 71f2d880..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "author": { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com", - "url": "http://2x.io" - }, - "name": "ws", - "description": "simple to use, blazing fast and thoroughly tested websocket client, server and console for node.js, up-to-date against RFC-6455", - "version": "0.4.31", - "keywords": [ - "Hixie", - "HyBi", - "Push", - "RFC-6455", - "WebSocket", - "WebSockets", - "real-time" - ], - "repository": { - "type": "git", - "url": "git://github.com/einaros/ws.git" - }, - "bin": { - "wscat": "./bin/wscat" - }, - "scripts": { - "test": "make test", - "install": "(node-gyp rebuild 2> builderror.log) || (exit 0)" - }, - "engines": { - "node": ">=0.4.0" - }, - "dependencies": { - "commander": "~0.6.1", - "nan": "~0.3.0", - "tinycolor": "0.x", - "options": ">=0.0.5" - }, - "devDependencies": { - "mocha": "1.12.0", - "should": "1.2.x", - "expect.js": "0.2.x", - "benchmark": "0.3.x", - "ansi": "latest" - }, - "browser": "./lib/browser.js", - "component": { - "scripts": { - "ws/index.js": "./lib/browser.js" - } - }, - "gypfile": true, - "readme": "[![Build Status](https://secure.travis-ci.org/einaros/ws.png)](http://travis-ci.org/einaros/ws)\n\n# ws: a node.js websocket library #\n\n`ws` is a simple to use websocket implementation, up-to-date against RFC-6455, and [probably the fastest WebSocket library for node.js](http://web.archive.org/web/20130314230536/http://hobbycoding.posterous.com/the-fastest-websocket-module-for-nodejs).\n\nPasses the quite extensive Autobahn test suite. See http://einaros.github.com/ws for the full reports.\n\nComes with a command line utility, `wscat`, which can either act as a server (--listen), or client (--connect); Use it to debug simple websocket services.\n\n## Protocol support ##\n\n* **Hixie draft 76** (Old and deprecated, but still in use by Safari and Opera. Added to ws version 0.4.2, but server only. Can be disabled by setting the `disableHixie` option to true.)\n* **HyBi drafts 07-12** (Use the option `protocolVersion: 8`, or argument `-p 8` for wscat)\n* **HyBi drafts 13-17** (Current default, alternatively option `protocolVersion: 13`, or argument `-p 13` for wscat)\n\n_See the echo.websocket.org example below for how to use the `protocolVersion` option._\n\n## Usage ##\n\n### Installing ###\n\n`npm install ws`\n\n### Sending and receiving text data ###\n\n```js\nvar WebSocket = require('ws');\nvar ws = new WebSocket('ws://www.host.com/path');\nws.on('open', function() {\n ws.send('something');\n});\nws.on('message', function(data, flags) {\n // flags.binary will be set if a binary data is received\n // flags.masked will be set if the data was masked\n});\n```\n\n### Sending binary data ###\n\n```js\nvar WebSocket = require('ws');\nvar ws = new WebSocket('ws://www.host.com/path');\nws.on('open', function() {\n var array = new Float32Array(5);\n for (var i = 0; i < array.length; ++i) array[i] = i / 2;\n ws.send(array, {binary: true, mask: true});\n});\n```\n\nSetting `mask`, as done for the send options above, will cause the data to be masked according to the websocket protocol. The same option applies for text data.\n\n### Server example ###\n\n```js\nvar WebSocketServer = require('ws').Server\n , wss = new WebSocketServer({port: 8080});\nwss.on('connection', function(ws) {\n ws.on('message', function(message) {\n console.log('received: %s', message);\n });\n ws.send('something');\n});\n```\n\n### Server sending broadcast data ###\n\n```js\nvar WebSocketServer = require('ws').Server\n , wss = new WebSocketServer({port: 8080});\n \nwss.broadcast = function(data) {\n\tfor(var i in this.clients)\n\t\tthis.clients[i].send(data);\n};\n```\n\n### Error handling best practices ###\n\n```js\n// If the WebSocket is closed before the following send is attempted\nws.send('something');\n\n// Errors (both immediate and async write errors) can be detected in an optional callback.\n// The callback is also the only way of being notified that data has actually been sent.\nws.send('something', function(error) {\n // if error is null, the send has been completed,\n // otherwise the error object will indicate what failed.\n});\n\n// Immediate errors can also be handled with try/catch-blocks, but **note**\n// that since sends are inherently asynchronous, socket write failures will *not*\n// be captured when this technique is used.\ntry {\n ws.send('something');\n}\ncatch (e) {\n // handle error\n}\n```\n\n### echo.websocket.org demo ###\n\n```js\nvar WebSocket = require('ws');\nvar ws = new WebSocket('ws://echo.websocket.org/', {protocolVersion: 8, origin: 'http://websocket.org'});\nws.on('open', function() {\n console.log('connected');\n ws.send(Date.now().toString(), {mask: true});\n});\nws.on('close', function() {\n console.log('disconnected');\n});\nws.on('message', function(data, flags) {\n console.log('Roundtrip time: ' + (Date.now() - parseInt(data)) + 'ms', flags);\n setTimeout(function() {\n ws.send(Date.now().toString(), {mask: true});\n }, 500);\n});\n```\n\n### wscat against echo.websocket.org ###\n\n $ npm install -g ws\n $ wscat -c ws://echo.websocket.org -p 8\n connected (press CTRL+C to quit)\n > hi there\n < hi there\n > are you a happy parrot?\n < are you a happy parrot?\n\n### Other examples ###\n\nFor a full example with a browser client communicating with a ws server, see the examples folder.\n\nNote that the usage together with Express 3.0 is quite different from Express 2.x. The difference is expressed in the two different serverstats-examples.\n\nOtherwise, see the test cases.\n\n### Running the tests ###\n\n`make test`\n\n## API Docs ##\n\nSee the doc/ directory for Node.js-like docs for the ws classes.\n\n## License ##\n\n(The MIT License)\n\nCopyright (c) 2011 Einar Otto Stangvik <einaros@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/einaros/ws/issues" - }, - "homepage": "https://github.com/einaros/ws", - "_id": "ws@0.4.31", - "_from": "ws@0.4.x" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/bufferutil.cc b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/bufferutil.cc deleted file mode 100644 index f06777f4..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/bufferutil.cc +++ /dev/null @@ -1,117 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "nan.h" - -using namespace v8; -using namespace node; - -class BufferUtil : public ObjectWrap -{ -public: - - static void Initialize(v8::Handle target) - { - NanScope(); - Local t = FunctionTemplate::New(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_METHOD(t, "unmask", BufferUtil::Unmask); - NODE_SET_METHOD(t, "mask", BufferUtil::Mask); - NODE_SET_METHOD(t, "merge", BufferUtil::Merge); - target->Set(String::NewSymbol("BufferUtil"), t->GetFunction()); - } - -protected: - - static NAN_METHOD(New) - { - NanScope(); - BufferUtil* bufferUtil = new BufferUtil(); - bufferUtil->Wrap(args.This()); - NanReturnValue(args.This()); - } - - static NAN_METHOD(Merge) - { - NanScope(); - Local bufferObj = args[0]->ToObject(); - char* buffer = Buffer::Data(bufferObj); - Local array = Local::Cast(args[1]); - unsigned int arrayLength = array->Length(); - size_t offset = 0; - unsigned int i; - for (i = 0; i < arrayLength; ++i) { - Local src = array->Get(i)->ToObject(); - size_t length = Buffer::Length(src); - memcpy(buffer + offset, Buffer::Data(src), length); - offset += length; - } - NanReturnValue(True()); - } - - static NAN_METHOD(Unmask) - { - NanScope(); - Local buffer_obj = args[0]->ToObject(); - size_t length = Buffer::Length(buffer_obj); - Local mask_obj = args[1]->ToObject(); - unsigned int *mask = (unsigned int*)Buffer::Data(mask_obj); - unsigned int* from = (unsigned int*)Buffer::Data(buffer_obj); - size_t len32 = length / 4; - unsigned int i; - for (i = 0; i < len32; ++i) *(from + i) ^= *mask; - from += i; - switch (length % 4) { - case 3: *((unsigned char*)from+2) = *((unsigned char*)from+2) ^ ((unsigned char*)mask)[2]; - case 2: *((unsigned char*)from+1) = *((unsigned char*)from+1) ^ ((unsigned char*)mask)[1]; - case 1: *((unsigned char*)from ) = *((unsigned char*)from ) ^ ((unsigned char*)mask)[0]; - case 0:; - } - NanReturnValue(True()); - } - - static NAN_METHOD(Mask) - { - NanScope(); - Local buffer_obj = args[0]->ToObject(); - Local mask_obj = args[1]->ToObject(); - unsigned int *mask = (unsigned int*)Buffer::Data(mask_obj); - Local output_obj = args[2]->ToObject(); - unsigned int dataOffset = args[3]->Int32Value(); - unsigned int length = args[4]->Int32Value(); - unsigned int* to = (unsigned int*)(Buffer::Data(output_obj) + dataOffset); - unsigned int* from = (unsigned int*)Buffer::Data(buffer_obj); - unsigned int len32 = length / 4; - unsigned int i; - for (i = 0; i < len32; ++i) *(to + i) = *(from + i) ^ *mask; - to += i; - from += i; - switch (length % 4) { - case 3: *((unsigned char*)to+2) = *((unsigned char*)from+2) ^ *((unsigned char*)mask+2); - case 2: *((unsigned char*)to+1) = *((unsigned char*)from+1) ^ *((unsigned char*)mask+1); - case 1: *((unsigned char*)to ) = *((unsigned char*)from ) ^ *((unsigned char*)mask); - case 0:; - } - NanReturnValue(True()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - BufferUtil::Initialize(target); -} - -NODE_MODULE(bufferutil, init) - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/validation.cc b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/validation.cc deleted file mode 100644 index 528eda1f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/src/validation.cc +++ /dev/null @@ -1,145 +0,0 @@ -/*! - * ws: a node.js websocket client - * Copyright(c) 2011 Einar Otto Stangvik - * MIT Licensed - */ - -#include -#include -#include -#include -#include -#include -#include -#include "nan.h" - -using namespace v8; -using namespace node; - -#define UNI_SUR_HIGH_START (uint32_t) 0xD800 -#define UNI_SUR_LOW_END (uint32_t) 0xDFFF -#define UNI_REPLACEMENT_CHAR (uint32_t) 0x0000FFFD -#define UNI_MAX_LEGAL_UTF32 (uint32_t) 0x0010FFFF - -static const uint8_t trailingBytesForUTF8[256] = { - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, - 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 3,3,3,3,3,3,3,3,4,4,4,4,5,5,5,5 -}; - -static const uint32_t offsetsFromUTF8[6] = { - 0x00000000, 0x00003080, 0x000E2080, - 0x03C82080, 0xFA082080, 0x82082080 -}; - -static int isLegalUTF8(const uint8_t *source, const int length) -{ - uint8_t a; - const uint8_t *srcptr = source+length; - switch (length) { - default: return 0; - /* Everything else falls through when "true"... */ - /* RFC3629 makes 5 & 6 bytes UTF-8 illegal - case 6: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 5: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; */ - case 4: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 3: if ((a = (*--srcptr)) < 0x80 || a > 0xBF) return 0; - case 2: if ((a = (*--srcptr)) > 0xBF) return 0; - switch (*source) { - /* no fall-through in this inner switch */ - case 0xE0: if (a < 0xA0) return 0; break; - case 0xED: if (a > 0x9F) return 0; break; - case 0xF0: if (a < 0x90) return 0; break; - case 0xF4: if (a > 0x8F) return 0; break; - default: if (a < 0x80) return 0; - } - - case 1: if (*source >= 0x80 && *source < 0xC2) return 0; - } - if (*source > 0xF4) return 0; - return 1; -} - -int is_valid_utf8 (size_t len, char *value) -{ - /* is the string valid UTF-8? */ - for (unsigned int i = 0; i < len; i++) { - uint32_t ch = 0; - uint8_t extrabytes = trailingBytesForUTF8[(uint8_t) value[i]]; - - if (extrabytes + i >= len) - return 0; - - if (isLegalUTF8 ((uint8_t *) (value + i), extrabytes + 1) == 0) return 0; - - switch (extrabytes) { - case 5 : ch += (uint8_t) value[i++]; ch <<= 6; - case 4 : ch += (uint8_t) value[i++]; ch <<= 6; - case 3 : ch += (uint8_t) value[i++]; ch <<= 6; - case 2 : ch += (uint8_t) value[i++]; ch <<= 6; - case 1 : ch += (uint8_t) value[i++]; ch <<= 6; - case 0 : ch += (uint8_t) value[i]; - } - - ch -= offsetsFromUTF8[extrabytes]; - - if (ch <= UNI_MAX_LEGAL_UTF32) { - if (ch >= UNI_SUR_HIGH_START && ch <= UNI_SUR_LOW_END) - return 0; - } else { - return 0; - } - } - - return 1; -} - -class Validation : public ObjectWrap -{ -public: - - static void Initialize(v8::Handle target) - { - HandleScope scope; - Local t = FunctionTemplate::New(New); - t->InstanceTemplate()->SetInternalFieldCount(1); - NODE_SET_METHOD(t, "isValidUTF8", Validation::IsValidUTF8); - target->Set(String::NewSymbol("Validation"), t->GetFunction()); - } - -protected: - - static NAN_METHOD(New) - { - NanScope(); - Validation* validation = new Validation(); - validation->Wrap(args.This()); - NanReturnValue(args.This()); - } - - static NAN_METHOD(IsValidUTF8) - { - NanScope(); - if (!Buffer::HasInstance(args[0])) { - return NanThrowTypeError("First argument needs to be a buffer"); - } - Local buffer_obj = args[0]->ToObject(); - char *buffer_data = Buffer::Data(buffer_obj); - size_t buffer_length = Buffer::Length(buffer_obj); - NanReturnValue(is_valid_utf8(buffer_length, buffer_data) == 1 ? True() : False()); - } -}; - -extern "C" void init (Handle target) -{ - NanScope(); - Validation::Initialize(target); -} - -NODE_MODULE(validation, init) - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/BufferPool.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/BufferPool.test.js deleted file mode 100644 index 1ee7ff0f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/BufferPool.test.js +++ /dev/null @@ -1,63 +0,0 @@ -var BufferPool = require('../lib/BufferPool'); -require('should'); - -describe('BufferPool', function() { - describe('#ctor', function() { - it('allocates pool', function() { - var db = new BufferPool(1000); - db.size.should.eql(1000); - }); - }); - describe('#get', function() { - it('grows the pool if necessary', function() { - var db = new BufferPool(1000); - var buf = db.get(2000); - db.size.should.be.above(1000); - db.used.should.eql(2000); - buf.length.should.eql(2000); - }); - it('grows the pool after the first call, if necessary', function() { - var db = new BufferPool(1000); - var buf = db.get(1000); - db.used.should.eql(1000); - db.size.should.eql(1000); - buf.length.should.eql(1000); - var buf2 = db.get(1000); - db.used.should.eql(2000); - db.size.should.be.above(1000); - buf2.length.should.eql(1000); - }); - it('grows the pool according to the growStrategy if necessary', function() { - var db = new BufferPool(1000, function(db, length) { - return db.size + 2345; - }); - var buf = db.get(2000); - db.size.should.eql(3345); - buf.length.should.eql(2000); - }); - it('doesnt grow the pool if theres enough room available', function() { - var db = new BufferPool(1000); - var buf = db.get(1000); - db.size.should.eql(1000); - buf.length.should.eql(1000); - }); - }); - describe('#reset', function() { - it('shinks the pool', function() { - var db = new BufferPool(1000); - var buf = db.get(2000); - db.reset(true); - db.size.should.eql(1000); - }); - it('shrinks the pool according to the shrinkStrategy', function() { - var db = new BufferPool(1000, function(db, length) { - return db.used + length; - }, function(db) { - return 0; - }); - var buf = db.get(2000); - db.reset(true); - db.size.should.eql(0); - }); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.hixie.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.hixie.test.js deleted file mode 100644 index 043d3bc4..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.hixie.test.js +++ /dev/null @@ -1,158 +0,0 @@ -var assert = require('assert') - , expect = require('expect.js') - , Receiver = require('../lib/Receiver.hixie'); -require('./hybi-common'); - -describe('Receiver', function() { - it('can parse text message', function() { - var p = new Receiver(); - var packet = '00 48 65 6c 6c 6f ff'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('Hello', data); - }; - - p.add(getBufferFromHexString(packet)); - expect(gotData).to.equal(true); - }); - - it('can parse multiple text messages', function() { - var p = new Receiver(); - var packet = '00 48 65 6c 6c 6f ff 00 48 65 6c 6c 6f ff'; - - var gotData = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - - p.add(getBufferFromHexString(packet)); - expect(gotData).to.equal(true); - for (var i = 0; i < 2; ++i) { - expect(messages[i]).to.equal('Hello'); - } - }); - - it('can parse empty message', function() { - var p = new Receiver(); - var packet = '00 ff'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('', data); - }; - - p.add(getBufferFromHexString(packet)); - expect(gotData).to.equal(true); - }); - - it('can parse text messages delivered over multiple frames', function() { - var p = new Receiver(); - var packets = [ - '00 48', - '65 6c 6c', - '6f ff 00 48', - '65', - '6c 6c 6f', - 'ff' - ]; - - var gotData = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - - for (var i = 0; i < packets.length; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotData).to.equal(true); - for (var i = 0; i < 2; ++i) { - expect(messages[i]).to.equal('Hello'); - } - }); - - it('emits an error if a payload doesnt start with 0x00', function() { - var p = new Receiver(); - var packets = [ - '00 6c ff', - '00 6c ff ff', - 'ff 00 6c ff 00 6c ff', - '00', - '6c 6c 6f', - 'ff' - ]; - - var gotData = false; - var gotError = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - p.onerror = function(reason, code) { - gotError = code == true; - }; - - for (var i = 0; i < packets.length && !gotError; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotError).to.equal(true); - expect(messages[0]).to.equal('l'); - expect(messages[1]).to.equal('l'); - expect(messages.length).to.equal(2); - }); - - it('can parse close messages', function() { - var p = new Receiver(); - var packets = [ - 'ff 00' - ]; - - var gotClose = false; - var gotError = false; - p.onclose = function() { - gotClose = true; - }; - p.onerror = function(reason, code) { - gotError = code == true; - }; - - for (var i = 0; i < packets.length && !gotError; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotClose).to.equal(true); - expect(gotError).to.equal(false); - }); - - it('can parse binary messages delivered over multiple frames', function() { - var p = new Receiver(); - var packets = [ - '80 05 48', - '65 6c 6c', - '6f 80 80 05 48', - '65', - '6c 6c 6f' - ]; - - var gotData = false; - var messages = []; - p.ontext = function(data) { - gotData = true; - messages.push(data); - }; - - for (var i = 0; i < packets.length; ++i) { - p.add(getBufferFromHexString(packets[i])); - } - expect(gotData).to.equal(true); - for (var i = 0; i < 2; ++i) { - expect(messages[i]).to.equal('Hello'); - } - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.test.js deleted file mode 100644 index b0b5c0a4..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Receiver.test.js +++ /dev/null @@ -1,255 +0,0 @@ -var assert = require('assert') - , Receiver = require('../lib/Receiver'); -require('should'); -require('./hybi-common'); - -describe('Receiver', function() { - it('can parse unmasked text message', function() { - var p = new Receiver(); - var packet = '81 05 48 65 6c 6c 6f'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('Hello', data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse close message', function() { - var p = new Receiver(); - var packet = '88 00'; - - var gotClose = false; - p.onclose = function(data) { - gotClose = true; - }; - - p.add(getBufferFromHexString(packet)); - gotClose.should.be.ok; - }); - it('can parse masked text message', function() { - var p = new Receiver(); - var packet = '81 93 34 83 a8 68 01 b9 92 52 4f a1 c6 09 59 e6 8a 52 16 e6 cb 00 5b a1 d5'; - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal('5:::{"name":"echo"}', data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a masked text message longer than 125 bytes', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - var packet = '81 FE ' + pack(4, message.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a really long masked text message', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 64*1024; ++i) message += (i % 5).toString(); - var packet = '81 FF ' + pack(16, message.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a fragmented masked text message of 300 bytes', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - var msgpiece1 = message.substr(0, 150); - var msgpiece2 = message.substr(150); - var packet1 = '01 FE ' + pack(4, msgpiece1.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece1, '34 83 a8 68')); - var packet2 = '80 FE ' + pack(4, msgpiece2.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece2, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet1)); - p.add(getBufferFromHexString(packet2)); - gotData.should.be.ok; - }); - it('can parse a ping message', function() { - var p = new Receiver(); - var message = 'Hello'; - var packet = '89 ' + getHybiLengthAsHexString(message.length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotPing = false; - p.onping = function(data) { - gotPing = true; - assert.equal(message, data); - }; - - p.add(getBufferFromHexString(packet)); - gotPing.should.be.ok; - }); - it('can parse a ping with no data', function() { - var p = new Receiver(); - var packet = '89 00'; - - var gotPing = false; - p.onping = function(data) { - gotPing = true; - }; - - p.add(getBufferFromHexString(packet)); - gotPing.should.be.ok; - }); - it('can parse a fragmented masked text message of 300 bytes with a ping in the middle', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - - var msgpiece1 = message.substr(0, 150); - var packet1 = '01 FE ' + pack(4, msgpiece1.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece1, '34 83 a8 68')); - - var pingMessage = 'Hello'; - var pingPacket = '89 ' + getHybiLengthAsHexString(pingMessage.length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(pingMessage, '34 83 a8 68')); - - var msgpiece2 = message.substr(150); - var packet2 = '80 FE ' + pack(4, msgpiece2.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece2, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - var gotPing = false; - p.onping = function(data) { - gotPing = true; - assert.equal(pingMessage, data); - }; - - p.add(getBufferFromHexString(packet1)); - p.add(getBufferFromHexString(pingPacket)); - p.add(getBufferFromHexString(packet2)); - gotData.should.be.ok; - gotPing.should.be.ok; - }); - it('can parse a fragmented masked text message of 300 bytes with a ping in the middle, which is delievered over sevaral tcp packets', function() { - var p = new Receiver(); - var message = 'A'; - for (var i = 0; i < 300; ++i) message += (i % 5).toString(); - - var msgpiece1 = message.substr(0, 150); - var packet1 = '01 FE ' + pack(4, msgpiece1.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece1, '34 83 a8 68')); - - var pingMessage = 'Hello'; - var pingPacket = '89 ' + getHybiLengthAsHexString(pingMessage.length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(pingMessage, '34 83 a8 68')); - - var msgpiece2 = message.substr(150); - var packet2 = '80 FE ' + pack(4, msgpiece2.length) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(msgpiece2, '34 83 a8 68')); - - var gotData = false; - p.ontext = function(data) { - gotData = true; - assert.equal(message, data); - }; - var gotPing = false; - p.onping = function(data) { - gotPing = true; - assert.equal(pingMessage, data); - }; - - var buffers = []; - buffers = buffers.concat(splitBuffer(getBufferFromHexString(packet1))); - buffers = buffers.concat(splitBuffer(getBufferFromHexString(pingPacket))); - buffers = buffers.concat(splitBuffer(getBufferFromHexString(packet2))); - for (var i = 0; i < buffers.length; ++i) { - p.add(buffers[i]); - } - gotData.should.be.ok; - gotPing.should.be.ok; - }); - it('can parse a 100 byte long masked binary message', function() { - var p = new Receiver(); - var length = 100; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a 256 byte long masked binary message', function() { - var p = new Receiver(); - var length = 256; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a 200kb long masked binary message', function() { - var p = new Receiver(); - var length = 200 * 1024; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, true) + ' 34 83 a8 68 ' + getHexStringFromBuffer(mask(message, '34 83 a8 68')); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); - it('can parse a 200kb long unmasked binary message', function() { - var p = new Receiver(); - var length = 200 * 1024; - var message = new Buffer(length); - for (var i = 0; i < length; ++i) message[i] = i % 256; - var originalMessage = getHexStringFromBuffer(message); - var packet = '82 ' + getHybiLengthAsHexString(length, false) + ' ' + getHexStringFromBuffer(message); - - var gotData = false; - p.onbinary = function(data) { - gotData = true; - assert.equal(originalMessage, getHexStringFromBuffer(data)); - }; - - p.add(getBufferFromHexString(packet)); - gotData.should.be.ok; - }); -}); - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.hixie.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.hixie.test.js deleted file mode 100644 index 783f8922..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.hixie.test.js +++ /dev/null @@ -1,134 +0,0 @@ -var assert = require('assert') - , Sender = require('../lib/Sender.hixie'); -require('should'); -require('./hybi-common'); - -describe('Sender', function() { - describe('#send', function() { - it('frames and sends a text message', function(done) { - var message = 'Hello world'; - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(message, {}, function() { - received.toString('utf8').should.eql('\u0000' + message + '\ufffd'); - done(); - }); - }); - - it('frames and sends an empty message', function(done) { - var socket = { - write: function(data, encoding, cb) { - done(); - } - }; - var sender = new Sender(socket, {}); - sender.send('', {}, function() {}); - }); - - it('frames and sends a buffer', function(done) { - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(new Buffer('foobar'), {}, function() { - received.toString('utf8').should.eql('\u0000foobar\ufffd'); - done(); - }); - }); - - it('frames and sends a binary message', function(done) { - var message = 'Hello world'; - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(message, {binary: true}, function() { - received.toString('hex').should.eql( - // 0x80 0x0b H e l l o w o r l d - '800b48656c6c6f20776f726c64'); - done(); - }); - }); -/* - it('throws an exception for binary data', function(done) { - var socket = { - write: function(data, encoding, cb) { - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.on('error', function() { - done(); - }); - sender.send(new Buffer(100), {binary: true}, function() {}); - }); -*/ - it('can fauxe stream data', function(done) { - var received = []; - var socket = { - write: function(data, encoding, cb) { - received.push(data); - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(new Buffer('foobar'), { fin: false }, function() {}); - sender.send('bazbar', { fin: false }, function() {}); - sender.send(new Buffer('end'), { fin: true }, function() { - received[0].toString('utf8').should.eql('\u0000foobar'); - received[1].toString('utf8').should.eql('bazbar'); - received[2].toString('utf8').should.eql('end\ufffd'); - done(); - }); - }); - }); - - describe('#close', function() { - it('sends a hixie close frame', function(done) { - var received; - var socket = { - write: function(data, encoding, cb) { - received = data; - process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.close(null, null, null, function() { - received.toString('utf8').should.eql('\ufffd\u0000'); - done(); - }); - }); - - it('sends a message end marker if fauxe streaming has started, before hixie close frame', function(done) { - var received = []; - var socket = { - write: function(data, encoding, cb) { - received.push(data); - if (cb) process.nextTick(cb); - } - }; - var sender = new Sender(socket, {}); - sender.send(new Buffer('foobar'), { fin: false }, function() {}); - sender.close(null, null, null, function() { - received[0].toString('utf8').should.eql('\u0000foobar'); - received[1].toString('utf8').should.eql('\ufffd'); - received[2].toString('utf8').should.eql('\ufffd\u0000'); - done(); - }); - }); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.test.js deleted file mode 100644 index 43b4864d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Sender.test.js +++ /dev/null @@ -1,24 +0,0 @@ -var Sender = require('../lib/Sender'); -require('should'); - -describe('Sender', function() { - describe('#frameAndSend', function() { - it('does not modify a masked binary buffer', function() { - var sender = new Sender({ write: function() {} }); - var buf = new Buffer([1, 2, 3, 4, 5]); - sender.frameAndSend(2, buf, true, true); - buf[0].should.eql(1); - buf[1].should.eql(2); - buf[2].should.eql(3); - buf[3].should.eql(4); - buf[4].should.eql(5); - }); - - it('does not modify a masked text buffer', function() { - var sender = new Sender({ write: function() {} }); - var text = 'hi there'; - sender.frameAndSend(1, text, true, true); - text.should.eql('hi there'); - }); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Validation.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Validation.test.js deleted file mode 100644 index 37c33993..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/Validation.test.js +++ /dev/null @@ -1,23 +0,0 @@ -var Validation = require('../lib/Validation').Validation; -require('should'); - -describe('Validation', function() { - describe('isValidUTF8', function() { - it('should return true for a valid utf8 string', function() { - var validBuffer = new Buffer('Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque gravida mattis rhoncus. Donec iaculis, metus quis varius accumsan, erat mauris condimentum diam, et egestas erat enim ut ligula. Praesent sollicitudin tellus eget dolor euismod euismod. Nullam ac augue nec neque varius luctus. Curabitur elit mi, consequat ultricies adipiscing mollis, scelerisque in erat. Phasellus facilisis fermentum ullamcorper. Nulla et sem eu arcu pharetra pellentesque. Praesent consectetur tempor justo, vel iaculis dui ullamcorper sit amet. Integer tristique viverra ullamcorper. Vivamus laoreet, nulla eget suscipit eleifend, lacus lectus feugiat libero, non fermentum erat nisi at risus. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pulvinar dignissim tellus, eu dignissim lorem vulputate quis. Morbi ut pulvinar augue.'); - Validation.isValidUTF8(validBuffer).should.be.ok; - }); - it('should return false for an erroneous string', function() { - var invalidBuffer = new Buffer([0xce, 0xba, 0xe1, 0xbd, 0xb9, 0xcf, 0x83, 0xce, 0xbc, 0xce, 0xb5, 0xed, 0xa0, 0x80, 0x65, 0x64, 0x69, 0x74, 0x65, 0x64]); - Validation.isValidUTF8(invalidBuffer).should.not.be.ok; - }); - it('should return true for valid cases from the autobahn test suite', function() { - Validation.isValidUTF8(new Buffer('\xf0\x90\x80\x80')).should.be.ok; - Validation.isValidUTF8(new Buffer([0xf0, 0x90, 0x80, 0x80])).should.be.ok; - }); - it('should return false for erroneous autobahn strings', function() { - Validation.isValidUTF8(new Buffer([0xce, 0xba, 0xe1, 0xbd])).should.not.be.ok; - }); - }); -}); - diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.integration.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.integration.js deleted file mode 100644 index 5d4f426f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.integration.js +++ /dev/null @@ -1,44 +0,0 @@ -var assert = require('assert') - , WebSocket = require('../') - , server = require('./testserver'); - -var port = 20000; - -function getArrayBuffer(buf) { - var l = buf.length; - var arrayBuf = new ArrayBuffer(l); - var uint8View = new Uint8Array(arrayBuf); - - for (var i = 0; i < l; i++) { - uint8View[i] = buf[i]; - } - return uint8View.buffer; -} - -function areArraysEqual(x, y) { - if (x.length != y.length) return false; - for (var i = 0, l = x.length; i < l; ++i) { - if (x[i] !== y[i]) return false; - } - return true; -} - -describe('WebSocket', function() { - it('communicates successfully with echo service', function(done) { - var ws = new WebSocket('ws://echo.websocket.org/', {protocolVersion: 13, origin: 'http://websocket.org'}); - var str = Date.now().toString(); - var dataReceived = false; - ws.on('open', function() { - ws.send(str, {mask: true}); - }); - ws.on('close', function() { - assert.equal(true, dataReceived); - done(); - }); - ws.on('message', function(data, flags) { - assert.equal(str, data); - ws.terminate(); - dataReceived = true; - }); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js deleted file mode 100644 index 91336b93..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocket.test.js +++ /dev/null @@ -1,1724 +0,0 @@ -var assert = require('assert') - , https = require('https') - , http = require('http') - , should = require('should') - , WebSocket = require('../') - , WebSocketServer = require('../').Server - , fs = require('fs') - , server = require('./testserver') - , crypto = require('crypto'); - -var port = 20000; - -function getArrayBuffer(buf) { - var l = buf.length; - var arrayBuf = new ArrayBuffer(l); - var uint8View = new Uint8Array(arrayBuf); - for (var i = 0; i < l; i++) { - uint8View[i] = buf[i]; - } - return uint8View.buffer; -} - - -function areArraysEqual(x, y) { - if (x.length != y.length) return false; - for (var i = 0, l = x.length; i < l; ++i) { - if (x[i] !== y[i]) return false; - } - return true; -} - -describe('WebSocket', function() { - describe('#ctor', function() { - it('throws exception for invalid url', function(done) { - try { - var ws = new WebSocket('echo.websocket.org'); - } - catch (e) { - done(); - } - }); - }); - - describe('options', function() { - it('should accept an `agent` option', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var agent = { - addRequest: function() { - wss.close(); - done(); - } - }; - var ws = new WebSocket('ws://localhost:' + port, { agent: agent }); - }); - }); - // GH-227 - it('should accept the `options` object as the 3rd argument', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var agent = { - addRequest: function() { - wss.close(); - done(); - } - }; - var ws = new WebSocket('ws://localhost:' + port, [], { agent: agent }); - }); - }); - }); - - describe('properties', function() { - it('#bytesReceived exposes number of bytes received', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('message', function() { - ws.bytesReceived.should.eql(8); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - ws.send('foobar'); - }); - }); - - it('#url exposes the server url', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - assert.equal(url, ws.url); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('#protocolVersion exposes the protocol version', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - assert.equal(13, ws.protocolVersion); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - describe('#bufferedAmount', function() { - it('defaults to zero', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - assert.equal(0, ws.bufferedAmount); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('defaults to zero upon "open"', function(done) { - server.createServer(++port, function(srv) { - var url = 'ws://localhost:' + port; - var ws = new WebSocket(url); - ws.onopen = function() { - assert.equal(0, ws.bufferedAmount); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }; - }); - }); - - it('stress kernel write buffer', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(ws) { - while (true) { - if (ws.bufferedAmount > 0) break; - ws.send((new Array(10000)).join('hello')); - } - ws.terminate(); - ws.on('close', function() { - wss.close(); - done(); - }); - }); - }); - }); - - describe('Custom headers', function() { - it('request has an authorization header', function (done) { - var auth = 'test:testpass'; - var srv = http.createServer(function (req, res) {}); - var wss = new WebSocketServer({server: srv}); - srv.listen(++port); - var ws = new WebSocket('ws://' + auth + '@localhost:' + port); - srv.on('upgrade', function (req, socket, head) { - assert(req.headers.authorization, 'auth header exists'); - assert.equal(req.headers.authorization, 'Basic ' + new Buffer(auth).toString('base64')); - ws.terminate(); - ws.on('close', function () { - srv.close(); - wss.close(); - done(); - }); - }); - }); - - it('accepts custom headers', function (done) { - var srv = http.createServer(function (req, res) {}); - var wss = new WebSocketServer({server: srv}); - srv.listen(++port); - - var ws = new WebSocket('ws://localhost:' + port, { - headers: { - 'Cookie': 'foo=bar' - } - }); - - srv.on('upgrade', function (req, socket, head) { - assert(req.headers.cookie, 'auth header exists'); - assert.equal(req.headers.cookie, 'foo=bar'); - - ws.terminate(); - ws.on('close', function () { - srv.close(); - wss.close(); - done(); - }); - }); - }); - }); - - describe('#readyState', function() { - it('defaults to connecting', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - assert.equal(WebSocket.CONNECTING, ws.readyState); - ws.terminate(); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('set to open once connection is established', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - assert.equal(WebSocket.OPEN, ws.readyState); - srv.close(); - done(); - }); - }); - }); - - it('set to closed once connection is closed', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.close(1001); - ws.on('close', function() { - assert.equal(WebSocket.CLOSED, ws.readyState); - srv.close(); - done(); - }); - }); - }); - - it('set to closed once connection is terminated', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.terminate(); - ws.on('close', function() { - assert.equal(WebSocket.CLOSED, ws.readyState); - srv.close(); - done(); - }); - }); - }); - }); - - /* - * Ready state constants - */ - - var readyStates = { - CONNECTING: 0, - OPEN: 1, - CLOSING: 2, - CLOSED: 3 - }; - - /* - * Ready state constant tests - */ - - Object.keys(readyStates).forEach(function(state) { - describe('.' + state, function() { - it('is enumerable property of class', function() { - var propertyDescripter = Object.getOwnPropertyDescriptor(WebSocket, state) - assert.equal(readyStates[state], propertyDescripter.value); - assert.equal(true, propertyDescripter.enumerable); - }); - }); - }); - - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - Object.keys(readyStates).forEach(function(state) { - describe('.' + state, function() { - it('is property of instance', function() { - assert.equal(readyStates[state], ws[state]); - }); - }); - }); - }); - }); - - describe('events', function() { - it('emits a ping event', function(done) { - var wss = new WebSocketServer({port: ++port}); - wss.on('connection', function(client) { - client.ping(); - }); - var ws = new WebSocket('ws://localhost:' + port); - ws.on('ping', function() { - ws.terminate(); - wss.close(); - done(); - }); - }); - - it('emits a pong event', function(done) { - var wss = new WebSocketServer({port: ++port}); - wss.on('connection', function(client) { - client.pong(); - }); - var ws = new WebSocket('ws://localhost:' + port); - ws.on('pong', function() { - ws.terminate(); - wss.close(); - done(); - }); - }); - }); - - describe('connection establishing', function() { - it('can disconnect before connection is established', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.terminate(); - ws.on('open', function() { - assert.fail('connect shouldnt be raised here'); - }); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('can close before connection is established', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.close(1001); - ws.on('open', function() { - assert.fail('connect shouldnt be raised here'); - }); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('invalid server key is denied', function(done) { - server.createServer(++port, server.handlers.invalidKey, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() { - srv.close(); - done(); - }); - }); - }); - - it('close event is raised when server closes connection', function(done) { - server.createServer(++port, server.handlers.closeAfterConnect, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('close', function() { - srv.close(); - done(); - }); - }); - }); - - it('error is emitted if server aborts connection', function(done) { - server.createServer(++port, server.handlers.return401, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - assert.fail('connect shouldnt be raised here'); - }); - ws.on('error', function() { - srv.close(); - done(); - }); - }); - }); - }); - - describe('#pause and #resume', function() { - it('pauses the underlying stream', function(done) { - // this test is sort-of racecondition'y, since an unlikely slow connection - // to localhost can cause the test to succeed even when the stream pausing - // isn't working as intended. that is an extremely unlikely scenario, though - // and an acceptable risk for the test. - var client; - var serverClient; - var openCount = 0; - function onOpen() { - if (++openCount == 2) { - var paused = true; - serverClient.on('message', function() { - paused.should.not.be.ok; - wss.close(); - done(); - }); - serverClient.pause(); - setTimeout(function() { - paused = false; - serverClient.resume(); - }, 200); - client.send('foo'); - } - } - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - serverClient = ws; - serverClient.on('open', onOpen); - }); - wss.on('connection', function(ws) { - client = ws; - onOpen(); - }); - }); - }); - - describe('#ping', function() { - it('before connect should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - try { - ws.ping(); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - - it('before connect can silently fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.ping('', {}, true); - srv.close(); - ws.terminate(); - done(); - }); - }); - - it('without message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.ping(); - }); - srv.on('ping', function(message) { - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.ping('hi'); - }); - srv.on('ping', function(message) { - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.ping('hi', {mask: true}); - }); - srv.on('ping', function(message, flags) { - assert.ok(flags.masked); - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - describe('#pong', function() { - it('before connect should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - try { - ws.pong(); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - - it('before connect can silently fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.pong('', {}, true); - srv.close(); - ws.terminate(); - done(); - }); - }); - - it('without message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.pong(); - }); - srv.on('pong', function(message) { - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.pong('hi'); - }); - srv.on('pong', function(message) { - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.pong('hi', {mask: true}); - }); - srv.on('pong', function(message, flags) { - assert.ok(flags.masked); - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - describe('#send', function() { - it('very long binary data can be sent and received (with echoing server)', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5 * 1024 * 1024); - for (var i = 0; i < array.length; ++i) array[i] = i / 5; - ws.on('open', function() { - ws.send(array, {binary: true}); - }); - ws.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(message)))); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('can send and receive text data', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi'); - }); - ws.on('message', function(message, flags) { - assert.equal('hi', message); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('send and receive binary data as an array', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(6); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - var partial = array.subarray(2, 5); - ws.on('open', function() { - ws.send(partial, {binary: true}); - }); - ws.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(partial, new Float32Array(getArrayBuffer(message)))); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('binary data can be sent and received as buffer', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var buf = new Buffer('foobar'); - ws.on('open', function() { - ws.send(buf, {binary: true}); - }); - ws.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(buf, message)); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('ArrayBuffer is auto-detected without binary flag', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.on('open', function() { - ws.send(array.buffer); - }); - ws.onmessage = function (event) { - assert.ok(event.type = 'Binary'); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(event.data)))); - ws.terminate(); - srv.close(); - done(); - }; - }); - }); - - it('Buffer is auto-detected without binary flag', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var buf = new Buffer('foobar'); - ws.on('open', function() { - ws.send(buf); - }); - ws.onmessage = function (event) { - assert.ok(event.type = 'Binary'); - assert.ok(areArraysEqual(event.data, buf)); - ws.terminate(); - srv.close(); - done(); - }; - }); - }); - - it('before connect should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - try { - ws.send('hi'); - } - catch (e) { - ws.terminate(); - srv.close(); - done(); - } - }); - }); - - it('before connect should pass error through callback, if present', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.send('hi', function(error) { - assert.ok(error instanceof Error); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('without data should be successful', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send(); - }); - srv.on('message', function(message, flags) { - assert.equal('', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('calls optional callback when flushed', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi', function() { - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - it('with unencoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi'); - }); - srv.on('message', function(message, flags) { - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.send('hi', {mask: true}); - }); - srv.on('message', function(message, flags) { - assert.ok(flags.masked); - assert.equal('hi', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with unencoded binary message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.on('open', function() { - ws.send(array, {binary: true}); - }); - srv.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(message)))); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded binary message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var array = new Float32Array(5); - for (var i = 0; i < array.length; ++i) array[i] = i / 2; - ws.on('open', function() { - ws.send(array, {mask: true, binary: true}); - }); - srv.on('message', function(message, flags) { - assert.ok(flags.binary); - assert.ok(flags.masked); - assert.ok(areArraysEqual(array, new Float32Array(getArrayBuffer(message)))); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with binary stream will send fragmented data', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var callbackFired = false; - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.bufferSize = 100; - ws.send(fileStream, {binary: true}, function(error) { - assert.equal(null, error); - callbackFired = true; - }); - }); - srv.on('message', function(data, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile'), data)); - ws.terminate(); - }); - ws.on('close', function() { - assert.ok(callbackFired); - srv.close(); - done(); - }); - }); - }); - - it('with text stream will send fragmented data', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var callbackFired = false; - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream, {binary: false}, function(error) { - assert.equal(null, error); - callbackFired = true; - }); - }); - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - ws.terminate(); - }); - ws.on('close', function() { - assert.ok(callbackFired); - srv.close(); - done(); - }); - }); - }); - - it('will cause intermittent send to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.send('foobar'); - ws.send('baz'); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - } - else { - assert.ok(!flags.binary); - assert.equal('baz', data); - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent stream to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) send('foo'); - else send('bar', true); - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent ping to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.ping('foobar'); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('ping', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent pong to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.pong('foobar'); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('pong', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent close to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream); - ws.close(1000, 'foobar'); - }); - ws.on('close', function() { - srv.close(); - ws.terminate(); - done(); - }); - ws.on('error', function() { /* That's quite alright -- a send was attempted after close */ }); - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.ok(areArraysEqual(fs.readFileSync('test/fixtures/textfile', 'utf8'), data)); - }); - srv.on('close', function(code, data) { - assert.equal(1000, code); - assert.equal('foobar', data); - }); - }); - }); - }); - - describe('#stream', function() { - it('very long binary data can be streamed', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var buffer = new Buffer(10 * 1024); - for (var i = 0; i < buffer.length; ++i) buffer[i] = i % 0xff; - ws.on('open', function() { - var i = 0; - var blockSize = 800; - var bufLen = buffer.length; - ws.stream({binary: true}, function(error, send) { - assert.ok(!error); - var start = i * blockSize; - var toSend = Math.min(blockSize, bufLen - (i * blockSize)); - var end = start + toSend; - var isFinal = toSend < blockSize; - send(buffer.slice(start, end), isFinal); - i += 1; - }); - }); - srv.on('message', function(data, flags) { - assert.ok(flags.binary); - assert.ok(areArraysEqual(buffer, data)); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('before connect should pass error through callback', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('error', function() {}); - ws.stream(function(error) { - assert.ok(error instanceof Error); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('without callback should fail', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - try { - ws.stream(); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent send to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - ws.send('foobar'); - ws.send('baz'); - } - else { - send(payload.substr(5, 5), true); - } - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.equal(payload, data); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - } - else { - assert.ok(!flags.binary); - assert.equal('baz', data); - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent stream to be delayed in order', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - var i2 = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i2 == 1) send('foo'); - else send('bar', true); - }); - ws.send('baz'); - } - else send(payload.substr(5, 5), true); - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - ++receivedIndex; - if (receivedIndex == 1) { - assert.ok(!flags.binary); - assert.equal(payload, data); - } - else if (receivedIndex == 2) { - assert.ok(!flags.binary); - assert.equal('foobar', data); - } - else if (receivedIndex == 3){ - assert.ok(!flags.binary); - assert.equal('baz', data); - setTimeout(function() { - srv.close(); - ws.terminate(); - done(); - }, 1000); - } - else throw new Error('more messages than we actually sent just arrived'); - }); - }); - }); - - it('will cause intermittent ping to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - ws.ping('foobar'); - } - else { - send(payload.substr(5, 5), true); - } - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.equal(payload, data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('ping', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent pong to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - assert.ok(!error); - if (++i == 1) { - send(payload.substr(0, 5)); - ws.pong('foobar'); - } - else { - send(payload.substr(5, 5), true); - } - }); - }); - var receivedIndex = 0; - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.equal(payload, data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - srv.on('pong', function(data) { - assert.equal('foobar', data); - if (++receivedIndex == 2) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('will cause intermittent close to be delivered', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var payload = 'HelloWorld'; - var errorGiven = false; - ws.on('open', function() { - var i = 0; - ws.stream(function(error, send) { - if (++i == 1) { - send(payload.substr(0, 5)); - ws.close(1000, 'foobar'); - } - else if(i == 2) { - send(payload.substr(5, 5), true); - } - else if (i == 3) { - assert.ok(error); - errorGiven = true; - } - }); - }); - ws.on('close', function() { - assert.ok(errorGiven); - srv.close(); - ws.terminate(); - done(); - }); - srv.on('message', function(data, flags) { - assert.ok(!flags.binary); - assert.equal(payload, data); - }); - srv.on('close', function(code, data) { - assert.equal(1000, code); - assert.equal('foobar', data); - }); - }); - }); - }); - - describe('#close', function() { - it('will raise error callback, if any, if called during send stream', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var errorGiven = false; - ws.on('open', function() { - var fileStream = fs.createReadStream('test/fixtures/textfile'); - fileStream.setEncoding('utf8'); - fileStream.bufferSize = 100; - ws.send(fileStream, function(error) { - errorGiven = error != null; - }); - ws.close(1000, 'foobar'); - }); - ws.on('close', function() { - setTimeout(function() { - assert.ok(errorGiven); - srv.close(); - ws.terminate(); - done(); - }, 1000); - }); - }); - }); - - it('without invalid first argument throws exception', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - try { - ws.close('error'); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('without reserved error code 1004 throws exception', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - try { - ws.close(1004); - } - catch (e) { - srv.close(); - ws.terminate(); - done(); - } - }); - }); - }); - - it('without message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.close(1000); - }); - srv.on('close', function(code, message, flags) { - assert.equal('', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.close(1000, 'some reason'); - }); - srv.on('close', function(code, message, flags) { - assert.ok(flags.masked); - assert.equal('some reason', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('with encoded message is successfully transmitted to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('open', function() { - ws.close(1000, 'some reason', {mask: true}); - }); - srv.on('close', function(code, message, flags) { - assert.ok(flags.masked); - assert.equal('some reason', message); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - - it('ends connection to the server', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var connectedOnce = false; - ws.on('open', function() { - connectedOnce = true; - ws.close(1000, 'some reason', {mask: true}); - }); - ws.on('close', function() { - assert.ok(connectedOnce); - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - describe('W3C API emulation', function() { - it('should not throw errors when getting and setting', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var listener = function () {}; - - ws.onmessage = listener; - ws.onerror = listener; - ws.onclose = listener; - ws.onopen = listener; - - assert.ok(ws.onopen === listener); - assert.ok(ws.onmessage === listener); - assert.ok(ws.onclose === listener); - assert.ok(ws.onerror === listener); - - srv.close(); - ws.terminate(); - done(); - }); - }); - - it('should work the same as the EventEmitter api', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - var listener = function() {}; - var message = 0; - var close = 0; - var open = 0; - - ws.onmessage = function(messageEvent) { - assert.ok(!!messageEvent.data); - ++message; - ws.close(); - }; - - ws.onopen = function() { - ++open; - } - - ws.onclose = function() { - ++close; - } - - ws.on('open', function() { - ws.send('foo'); - }); - - ws.on('close', function() { - process.nextTick(function() { - assert.ok(message === 1); - assert.ok(open === 1); - assert.ok(close === 1); - - srv.close(); - ws.terminate(); - done(); - }); - }); - }); - }); - - it('should receive text data wrapped in a MessageEvent when using addEventListener', function(done) { - server.createServer(++port, function(srv) { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('open', function() { - ws.send('hi'); - }); - ws.addEventListener('message', function(messageEvent) { - assert.equal('hi', messageEvent.data); - ws.terminate(); - srv.close(); - done(); - }); - }); - }); - - it('should receive valid CloseEvent when server closes with code 1000', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('close', function(closeEvent) { - assert.equal(true, closeEvent.wasClean); - assert.equal(1000, closeEvent.code); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('connection', function(client) { - client.close(1000); - }); - }); - - it('should receive valid CloseEvent when server closes with code 1001', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('close', function(closeEvent) { - assert.equal(false, closeEvent.wasClean); - assert.equal(1001, closeEvent.code); - assert.equal('some daft reason', closeEvent.reason); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('connection', function(client) { - client.close(1001, 'some daft reason'); - }); - }); - - it('should have target set on Events', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.addEventListener('open', function(openEvent) { - assert.equal(ws, openEvent.target); - }); - ws.addEventListener('message', function(messageEvent) { - assert.equal(ws, messageEvent.target); - wss.close(); - }); - ws.addEventListener('close', function(closeEvent) { - assert.equal(ws, closeEvent.target); - ws.emit('error', new Error('forced')); - }); - ws.addEventListener('error', function(errorEvent) { - assert.equal(errorEvent.message, 'forced'); - assert.equal(ws, errorEvent.target); - ws.terminate(); - done(); - }); - }); - wss.on('connection', function(client) { - client.send('hi') - }); - }); - }); - - describe('ssl', function() { - it('can connect to secure websocket server', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - - it('can connect to secure websocket server with client side certificate', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem'), - ca: [fs.readFileSync('test/fixtures/ca1-cert.pem')], - requestCert: true - }; - var clientOptions = { - key: fs.readFileSync('test/fixtures/agent1-key.pem'), - cert: fs.readFileSync('test/fixtures/agent1-cert.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var success = false; - var wss = new WebSocketServer({ - server: app, - verifyClient: function(info) { - success = !!info.req.client.authorized; - return true; - } - }); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port, clientOptions); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - success.should.be.ok; - done(); - }); - }); - - it('cannot connect to secure websocket server via ws://', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('ws://localhost:' + port, { rejectUnauthorized :false }); - ws.on('error', function() { - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - }); - - it('can send and receive text data', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - ws.on('open', function() { - ws.send('foobar'); - }); - }); - wss.on('connection', function(ws) { - ws.on('message', function(message, flags) { - message.should.eql('foobar'); - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - }); - - it('can send and receive very long binary data', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - } - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - crypto.randomBytes(5 * 1024 * 1024, function(ex, buf) { - if (ex) throw ex; - var wss = new WebSocketServer({server: app}); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - ws.on('open', function() { - ws.send(buf, {binary: true}); - }); - ws.on('message', function(message, flags) { - flags.binary.should.be.ok; - areArraysEqual(buf, message).should.be.ok; - app.close(); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - ws.on('message', function(message, flags) { - ws.send(message, {binary: true}); - }); - }); - }); - }); - }); - - describe('protocol support discovery', function() { - describe('#supports', function() { - describe('#binary', function() { - it('returns true for hybi transport', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - assert.equal(true, client.supports.binary); - wss.close(); - done(); - }); - }); - - it('returns false for hixie transport', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(client) { - assert.equal(false, client.supports.binary); - wss.close(); - done(); - }); - }); - }); - }); - }); - - describe('host and origin headers', function() { - it('includes the host header with port number', function(done) { - var srv = http.createServer(); - srv.listen(++port, function(){ - srv.on('upgrade', function(req, socket, upgradeHeade) { - assert.equal('localhost:' + port, req.headers['host']); - srv.close(); - done(); - }); - var ws = new WebSocket('ws://localhost:' + port); - }); - }); - - it('includes the origin header with port number', function(done) { - var srv = http.createServer(); - srv.listen(++port, function() { - srv.on('upgrade', function(req, socket, upgradeHeade) { - assert.equal('localhost:' + port, req.headers['origin']); - srv.close(); - done(); - }); - var ws = new WebSocket('ws://localhost:' + port); - }); - }); - }); - -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocketServer.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocketServer.test.js deleted file mode 100644 index c21fd97f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/WebSocketServer.test.js +++ /dev/null @@ -1,1103 +0,0 @@ -var http = require('http') - , https = require('https') - , WebSocket = require('../') - , WebSocketServer = WebSocket.Server - , fs = require('fs') - , should = require('should'); - -var port = 8000; - -function getArrayBuffer(buf) { - var l = buf.length; - var arrayBuf = new ArrayBuffer(l); - for (var i = 0; i < l; ++i) { - arrayBuf[i] = buf[i]; - } - return arrayBuf; -} - -function areArraysEqual(x, y) { - if (x.length != y.length) return false; - for (var i = 0, l = x.length; i < l; ++i) { - if (x[i] !== y[i]) return false; - } - return true; -} - -describe('WebSocketServer', function() { - describe('#ctor', function() { - it('throws an error if no option object is passed', function() { - var gotException = false; - try { - var wss = new WebSocketServer(); - } - catch (e) { - gotException = true; - } - gotException.should.be.ok; - }); - - it('throws an error if no port or server is specified', function() { - var gotException = false; - try { - var wss = new WebSocketServer({}); - } - catch (e) { - gotException = true; - } - gotException.should.be.ok; - }); - - it('does not throw an error if no port or server is specified, when the noServer option is true', function() { - var gotException = false; - try { - var wss = new WebSocketServer({noServer: true}); - } - catch (e) { - gotException = true; - } - gotException.should.eql(false); - }); - - it('emits an error if http server bind fails', function(done) { - var wss = new WebSocketServer({port: 1}); - wss.on('error', function() { done(); }); - }); - - it('starts a server on a given port', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - wss.close(); - done(); - }); - }); - - it('uses a precreated http server', function (done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws://localhost:' + port); - - wss.on('connection', function(client) { - wss.close(); - srv.close(); - done(); - }); - }); - }); - - it('uses a precreated http server listening on unix socket', function (done) { - var srv = http.createServer(); - var sockPath = '/tmp/ws_socket_'+new Date().getTime()+'.'+Math.floor(Math.random() * 1000); - srv.listen(sockPath, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws+unix://'+sockPath); - - wss.on('connection', function(client) { - wss.close(); - srv.close(); - done(); - }); - }); - }); - - it('emits path specific connection event', function (done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws://localhost:' + port+'/endpointName'); - - wss.on('connection/endpointName', function(client) { - wss.close(); - srv.close(); - done(); - }); - }); - }); - - it('can have two different instances listening on the same http server with two different paths', function(done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss1 = new WebSocketServer({server: srv, path: '/wss1'}) - , wss2 = new WebSocketServer({server: srv, path: '/wss2'}); - var doneCount = 0; - wss1.on('connection', function(client) { - wss1.close(); - if (++doneCount == 2) { - srv.close(); - done(); - } - }); - wss2.on('connection', function(client) { - wss2.close(); - if (++doneCount == 2) { - srv.close(); - done(); - } - }); - var ws1 = new WebSocket('ws://localhost:' + port + '/wss1'); - var ws2 = new WebSocket('ws://localhost:' + port + '/wss2?foo=1'); - }); - }); - - it('cannot have two different instances listening on the same http server with the same path', function(done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss1 = new WebSocketServer({server: srv, path: '/wss1'}); - try { - var wss2 = new WebSocketServer({server: srv, path: '/wss1'}); - } - catch (e) { - wss1.close(); - srv.close(); - done(); - } - }); - }); - }); - - describe('#close', function() { - it('will close all clients', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('close', function() { - if (++closes == 2) done(); - }); - }); - var closes = 0; - wss.on('connection', function(client) { - client.on('close', function() { - if (++closes == 2) done(); - }); - wss.close(); - }); - }); - - it('does not close a precreated server', function(done) { - var srv = http.createServer(); - var realClose = srv.close; - srv.close = function() { - should.fail('must not close pre-created server'); - } - srv.listen(++port, function () { - var wss = new WebSocketServer({server: srv}); - var ws = new WebSocket('ws://localhost:' + port); - wss.on('connection', function(client) { - wss.close(); - srv.close = realClose; - srv.close(); - done(); - }); - }); - }); - - it('cleans up websocket data on a precreated server', function(done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss1 = new WebSocketServer({server: srv, path: '/wss1'}) - , wss2 = new WebSocketServer({server: srv, path: '/wss2'}); - (typeof srv._webSocketPaths).should.eql('object'); - Object.keys(srv._webSocketPaths).length.should.eql(2); - wss1.close(); - Object.keys(srv._webSocketPaths).length.should.eql(1); - wss2.close(); - (typeof srv._webSocketPaths).should.eql('undefined'); - srv.close(); - done(); - }); - }); - }); - - describe('#clients', function() { - it('returns a list of connected clients', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - wss.clients.length.should.eql(0); - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - wss.clients.length.should.eql(1); - wss.close(); - done(); - }); - }); - - it('can be disabled', function(done) { - var wss = new WebSocketServer({port: ++port, clientTracking: false}, function() { - wss.clients.length.should.eql(0); - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - wss.clients.length.should.eql(0); - wss.close(); - done(); - }); - }); - - it('is updated when client terminates the connection', function(done) { - var ws; - var wss = new WebSocketServer({port: ++port}, function() { - ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - client.on('close', function() { - wss.clients.length.should.eql(0); - wss.close(); - done(); - }); - ws.terminate(); - }); - }); - - it('is updated when client closes the connection', function(done) { - var ws; - var wss = new WebSocketServer({port: ++port}, function() { - ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(client) { - client.on('close', function() { - wss.clients.length.should.eql(0); - wss.close(); - done(); - }); - ws.close(); - }); - }); - }); - - describe('#options', function() { - it('exposes options passed to constructor', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - wss.options.port.should.eql(port); - wss.close(); - done(); - }); - }); - }); - - describe('#handleUpgrade', function() { - it('can be used for a pre-existing server', function (done) { - var srv = http.createServer(); - srv.listen(++port, function () { - var wss = new WebSocketServer({noServer: true}); - srv.on('upgrade', function(req, socket, upgradeHead) { - wss.handleUpgrade(req, socket, upgradeHead, function(client) { - client.send('hello'); - }); - }); - var ws = new WebSocket('ws://localhost:' + port); - ws.on('message', function(message) { - message.should.eql('hello'); - wss.close(); - srv.close(); - done(); - }); - }); - }); - }); - - describe('hybi mode', function() { - describe('connection establishing', function() { - it('does not accept connections with no sec-websocket-key', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('does not accept connections with no sec-websocket-version', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('does not accept connections with invalid sec-websocket-version', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 12 - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be denied', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 8, - 'Sec-WebSocket-Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets client origin', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.origin.should.eql('http://foobarbaz.com'); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobarbaz.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets original request', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.req.headers['sec-websocket-key'].should.eql('dGhlIHNhbXBsZSBub25jZQ=='); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobarbaz.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('verifyClient has secure:true for ssl connections', function(done) { - var options = { - key: fs.readFileSync('test/fixtures/key.pem'), - cert: fs.readFileSync('test/fixtures/certificate.pem') - }; - var app = https.createServer(options, function (req, res) { - res.writeHead(200); - res.end(); - }); - var success = false; - var wss = new WebSocketServer({ - server: app, - verifyClient: function(info) { - success = info.secure === true; - return true; - } - }); - app.listen(++port, function() { - var ws = new WebSocket('wss://localhost:' + port); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - success.should.be.ok; - done(); - }); - }); - - it('verifyClient has secure:false for non-ssl connections', function(done) { - var app = http.createServer(function (req, res) { - res.writeHead(200); - res.end(); - }); - var success = false; - var wss = new WebSocketServer({ - server: app, - verifyClient: function(info) { - success = info.secure === false; - return true; - } - }); - app.listen(++port, function() { - var ws = new WebSocket('ws://localhost:' + port); - }); - wss.on('connection', function(ws) { - app.close(); - ws.terminate(); - wss.close(); - success.should.be.ok; - done(); - }); - }); - - it('client can be denied asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - process.nextTick(function() { - cb(false); - }); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 8, - 'Sec-WebSocket-Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - process.nextTick(function() { - cb(true); - }); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('handles messages passed along with the upgrade request (upgrade head)', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.write(new Buffer([0x81, 0x05, 0x48, 0x65, 0x6c, 0x6c, 0x6f], 'binary')); - req.end(); - }); - wss.on('connection', function(ws) { - ws.on('message', function(data) { - data.should.eql('Hello'); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('selects the first protocol by default', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - ws.protocol.should.eql('prot1'); - wss.close(); - done(); - }); - }); - }); - - it('selects the last protocol via protocol handler', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(true, ps[ps.length-1]); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - ws.protocol.should.eql('prot2'); - wss.close(); - done(); - }); - }); - }); - - it('client detects invalid server protocol', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(true, 'prot3'); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - done(new Error('connection must not be established')); - }); - ws.on('error', function() { - done(); - }); - }); - }); - - it('client detects no server protocol', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(true); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - done(new Error('connection must not be established')); - }); - ws.on('error', function() { - done(); - }); - }); - }); - - it('client refuses server protocols', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - cb(false); }}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'prot1, prot2'}); - ws.on('open', function(client) { - done(new Error('connection must not be established')); - }); - ws.on('error', function() { - done(); - }); - }); - }); - - it('server detects invalid protocol handler', function(done) { - var wss = new WebSocketServer({port: ++port, handleProtocols: function(ps, cb) { - // not calling callback is an error and shouldn't timeout - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'websocket', - 'Sec-WebSocket-Key': 'dGhlIHNhbXBsZSBub25jZQ==', - 'Sec-WebSocket-Version': 13, - 'Sec-WebSocket-Origin': 'http://foobar.com' - } - }; - options.port = port; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(501); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - }); - - describe('messaging', function() { - it('can send and receive data', function(done) { - var data = new Array(65*1024); - for (var i = 0; i < data.length; ++i) { - data[i] = String.fromCharCode(65 + ~~(25 * Math.random())); - } - data = data.join(''); - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port); - ws.on('message', function(message, flags) { - ws.send(message); - }); - }); - wss.on('connection', function(client) { - client.on('message', function(message) { - message.should.eql(data); - wss.close(); - done(); - }); - client.send(data); - }); - }); - }); - }); - - describe('hixie mode', function() { - it('can be disabled', function(done) { - var wss = new WebSocketServer({port: ++port, disableHixie: true}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - describe('connection establishing', function() { - it('does not accept connections with no sec-websocket-key1', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('does not accept connections with no sec-websocket-key2', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(400); - wss.close(); - done(); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('accepts connections with valid handshake', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('client can be denied', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(ws) { - ws.terminate(); - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets client origin', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.origin.should.eql('http://foobarbaz.com'); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('verifyClient gets original request', function(done) { - var verifyClientCalled = false; - var wss = new WebSocketServer({port: ++port, verifyClient: function(info) { - info.req.headers['sec-websocket-key1'].should.eql('3e6b263 4 17 80'); - verifyClientCalled = true; - return false; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - verifyClientCalled.should.be.ok; - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - - it('client can be denied asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - cb(false); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - req.on('response', function(res) { - res.statusCode.should.eql(401); - process.nextTick(function() { - wss.close(); - done(); - }); - }); - }); - wss.on('connection', function(ws) { - done(new Error('connection must not be established')); - }); - wss.on('error', function() {}); - }); - - it('client can be accepted asynchronously', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o, cb) { - cb(true); - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Origin': 'http://foobarbaz.com', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.end(); - }); - wss.on('connection', function(ws) { - wss.close(); - done(); - }); - wss.on('error', function() {}); - }); - - it('handles messages passed along with the upgrade request (upgrade head)', function(done) { - var wss = new WebSocketServer({port: ++port, verifyClient: function(o) { - return true; - }}, function() { - var options = { - port: port, - host: '127.0.0.1', - headers: { - 'Connection': 'Upgrade', - 'Upgrade': 'WebSocket', - 'Sec-WebSocket-Key1': '3e6b263 4 17 80', - 'Sec-WebSocket-Key2': '17 9 G`ZD9 2 2b 7X 3 /r90', - 'Origin': 'http://foobar.com' - } - }; - var req = http.request(options); - req.write('WjN}|M(6'); - req.write(new Buffer([0x00, 0x48, 0x65, 0x6c, 0x6c, 0x6f, 0xff], 'binary')); - req.end(); - }); - wss.on('connection', function(ws) { - ws.on('message', function(data) { - data.should.eql('Hello'); - ws.terminate(); - wss.close(); - done(); - }); - }); - wss.on('error', function() {}); - }); - }); - }); - - describe('client properties', function() { - it('protocol is exposed', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocol: 'hi'}); - }); - wss.on('connection', function(client) { - client.protocol.should.eql('hi'); - wss.close(); - done(); - }); - }); - - it('protocolVersion is exposed', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocolVersion: 8}); - }); - wss.on('connection', function(client) { - client.protocolVersion.should.eql(8); - wss.close(); - done(); - }); - }); - - it('upgradeReq is the original request object', function(done) { - var wss = new WebSocketServer({port: ++port}, function() { - var ws = new WebSocket('ws://localhost:' + port, {protocolVersion: 8}); - }); - wss.on('connection', function(client) { - client.upgradeReq.httpVersion.should.eql('1.1'); - wss.close(); - done(); - }); - }); - }); - -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn-server.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn-server.js deleted file mode 100644 index 36fe0c24..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn-server.js +++ /dev/null @@ -1,29 +0,0 @@ -var WebSocketServer = require('../').Server; - -process.on('uncaughtException', function(err) { - console.log('Caught exception: ', err, err.stack); -}); - -process.on('SIGINT', function () { - try { - console.log('Updating reports and shutting down'); - var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws'); - ws.on('close', function() { - process.exit(); - }); - } - catch(e) { - process.exit(); - } -}); - -var wss = new WebSocketServer({port: 8181}); -wss.on('connection', function(ws) { - console.log('new connection'); - ws.on('message', function(data, flags) { - ws.send(flags.buffer, {binary: flags.binary === true}); - }); - ws.on('error', function() { - console.log('error', arguments); - }); -}); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn.js deleted file mode 100644 index 048cc904..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/autobahn.js +++ /dev/null @@ -1,52 +0,0 @@ -var WebSocket = require('../'); -var currentTest = 1; -var lastTest = -1; -var testCount = null; - -process.on('uncaughtException', function(err) { - console.log('Caught exception: ', err, err.stack); -}); - -process.on('SIGINT', function () { - try { - console.log('Updating reports and shutting down'); - var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws'); - ws.on('close', function() { - process.exit(); - }); - } - catch(e) { - process.exit(); - } -}); - -function nextTest() { - if (currentTest > testCount || (lastTest != -1 && currentTest > lastTest)) { - console.log('Updating reports and shutting down'); - var ws = new WebSocket('ws://localhost:9001/updateReports?agent=ws'); - ws.on('close', function() { - process.exit(); - }); - return; - }; - console.log('Running test case ' + currentTest + '/' + testCount); - var ws = new WebSocket('ws://localhost:9001/runCase?case=' + currentTest + '&agent=ws'); - ws.on('message', function(data, flags) { - ws.send(flags.buffer, {binary: flags.binary === true, mask: true}); - }); - ws.on('close', function(data) { - currentTest += 1; - process.nextTick(nextTest); - }); - ws.on('error', function(e) {}); -} - -var ws = new WebSocket('ws://localhost:9001/getCaseCount'); -ws.on('message', function(data, flags) { - testCount = parseInt(data); -}); -ws.on('close', function() { - if (testCount > 0) { - nextTest(); - } -}); \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-cert.pem b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-cert.pem deleted file mode 100644 index cccb9fb4..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-cert.pem +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICbjCCAdcCCQCVvok5oeLpqzANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA -dGlueWNsb3Vkcy5vcmcwHhcNMTMwMzA4MDAzMDIyWhcNNDAwNzIzMDAzMDIyWjB9 -MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK -EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDzANBgNVBAMTBmFnZW50MTEgMB4G -CSqGSIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQAD -gY0AMIGJAoGBAL6GwKosYb0Yc3Qo0OtQVlCJ4208Idw11ij+t2W5sfYbCil5tyQo -jnhGM1CJhEXynQpXXwjKJuIeTQCkeUibTyFKa0bs8+li2FiGoKYbb4G81ovnqkmE -2iDVb8Gw3rrM4zeZ0ZdFnjMsAZac8h6+C4sB/pS9BiMOo6qTl15RQlcJAgMBAAEw -DQYJKoZIhvcNAQEFBQADgYEAOtmLo8DwTPnI4wfQbQ3hWlTS/9itww6IsxH2ODt9 -ggB7wi7N3uAdIWRZ54ke0NEAO5CW1xNTwsWcxQbiHrDOqX1vfVCjIenI76jVEEap -/Ay53ydHNBKdsKkib61Me14Mu0bA3lUul57VXwmH4NUEFB3w973Q60PschUhOEXj -7DY= ------END CERTIFICATE----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-key.pem b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-key.pem deleted file mode 100644 index cbd5f0c2..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/agent1-key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC+hsCqLGG9GHN0KNDrUFZQieNtPCHcNdYo/rdlubH2Gwopebck -KI54RjNQiYRF8p0KV18IyibiHk0ApHlIm08hSmtG7PPpYthYhqCmG2+BvNaL56pJ -hNog1W/BsN66zOM3mdGXRZ4zLAGWnPIevguLAf6UvQYjDqOqk5deUUJXCQIDAQAB -AoGANu/CBA+SCyVOvRK70u4yRTzNMAUjukxnuSBhH1rg/pajYnwvG6T6F6IeT72n -P0gKkh3JUE6B0bds+p9yPUZTFUXghxjcF33wlIY44H6gFE4K5WutsFJ9c450wtuu -8rXZTsIg7lAXWjTFVmdtOEPetcGlO2Hpi1O7ZzkzHgB2w9ECQQDksCCYx78or1zY -ZSokm8jmpIjG3VLKdvI9HAoJRN40ldnwFoigrFa1AHwsFtWNe8bKyVRPDoLDUjpB -dkPWgweVAkEA1UfgqguQ2KIkbtp9nDBionu3QaajksrRHwIa8vdfRfLxszfHk2fh -NGY3dkRZF8HUAbzYLrd9poVhCBAEjWekpQJASOM6AHfpnXYHCZF01SYx6hEW5wsz -kARJQODm8f1ZNTlttO/5q/xBxn7ZFNRSTD3fJlL05B2j380ddC/Vf1FT4QJAP1BC -GliqnBSuGhZUWYxni3KMeTm9rzL0F29pjpzutHYlWB2D6ndY/FQnvL0XcZ0Bka58 -womIDGnl3x3aLBwLXQJBAJv6h5CHbXHx7VyDJAcNfppAqZGcEaiVg8yf2F33iWy2 -FLthhJucx7df7SO2aw5h06bRDRAhb9br0R9/3mLr7RE= ------END RSA PRIVATE KEY----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-cert.pem b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-cert.pem deleted file mode 100644 index 1d0c0d68..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-cert.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICazCCAdQCCQC9/g69HtxXRzANBgkqhkiG9w0BAQUFADB6MQswCQYDVQQGEwJV -UzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQKEwZKb3llbnQxEDAO -BgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqGSIb3DQEJARYRcnlA -dGlueWNsb3Vkcy5vcmcwHhcNMTMwMzA4MDAzMDIyWhcNNDAwNzIzMDAzMDIyWjB6 -MQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExCzAJBgNVBAcTAlNGMQ8wDQYDVQQK -EwZKb3llbnQxEDAOBgNVBAsTB05vZGUuanMxDDAKBgNVBAMTA2NhMTEgMB4GCSqG -SIb3DQEJARYRcnlAdGlueWNsb3Vkcy5vcmcwgZ8wDQYJKoZIhvcNAQEBBQADgY0A -MIGJAoGBAKxr1mARUcv7zaqx5y4AxJPK6c1jdbSg7StcL4vg8klaPAlfNO6o+/Cl -w5CdQD3ukaVUwUOJ4T/+b3Xf7785XcWBC33GdjVQkfbHATJYcka7j7JDw3qev5Jk -1rAbRw48hF6rYlSGcx1mccAjoLoa3I8jgxCNAYHIjUQXgdmU893rAgMBAAEwDQYJ -KoZIhvcNAQEFBQADgYEAis05yxjCtJRuv8uX/DK6TX/j9C9Lzp1rKDNFTaTZ0iRw -KCw1EcNx4OXSj9gNblW4PWxpDvygrt1AmH9h2cb8K859NSHa9JOBFw6MA5C2A4Sj -NQfNATqUl4T6cdORlcDEZwHtT8b6D4A6Er31G/eJF4Sen0TUFpjdjd+l9RBjHlo= ------END CERTIFICATE----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem deleted file mode 100644 index df149508..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/ca1-key.pem +++ /dev/null @@ -1,17 +0,0 @@ ------BEGIN ENCRYPTED PRIVATE KEY----- -MIICxjBABgkqhkiG9w0BBQ0wMzAbBgkqhkiG9w0BBQwwDgQIFeWxJE1BrRECAggA -MBQGCCqGSIb3DQMHBAgu9PlMSQ+BOASCAoDEZN2tX0xWo/N+Jg+PrvCrFDk3P+3x -5xG/PEDjtMCAWPBEwbnaYHDzYmhNcAmxzGqEHGMDiWYs46LbO560VS3uMvFbEWPo -KYYVb13vkxl2poXdonCb5cHZA5GUYzTIVVJFptl4LHwBczHoMHtA4FqAhKlYvlWw -EOrdLB8XcwMmGPFabbbGxno0+EWWM27uNjlogfoxj35mQqSW4rOlhZ460XjOB1Zx -LjXMuZeONojkGYQRG5EUMchBoctQpCOM6cAi9r1B9BvtFCBpDV1c1zEZBzTEUd8o -kLn6tjLmY+QpTdylFjEWc7U3ppLY/pkoTBv4r85a2sEMWqkhSJboLaTboWzDJcU3 -Ke61pMpovt/3yCUd3TKgwduVwwQtDVTlBe0p66aN9QVj3CrFy/bKAGO3vxlli24H -aIjZf+OVoBY21ESlW3jLvNlBf7Ezf///2E7j4SCDLyZSFMTpFoAG/jDRyvi+wTKX -Kh485Bptnip6DCSuoH4u2SkOqwz3gJS/6s02YKe4m311QT4Pzne5/FwOFaS/HhQg -Xvyh2/d00OgJ0Y0PYQsHILPRgTUCKUXvj1O58opn3fxSacsPxIXwj6Z4FYAjUTaV -2B85k1lpant/JJEilDqMjqzx4pHZ/Z3Uto1lSM1JZs9SNL/0UR+6F0TXZTULVU9V -w8jYzz4sPr7LEyrrTbzmjQgnQFVbhAN/eKgRZK/SpLjxpmBV5MfpbPKsPUZqT4UC -4nXa8a/NYUQ9e+QKK8enq9E599c2W442W7Z1uFRZTWReMx/lF8wwA6G8zOPG0bdj -d+T5Gegzd5mvRiXMBklCo8RLxOOvgxun1n3PY4a63aH6mqBhdfhiLp5j ------END ENCRYPTED PRIVATE KEY----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/certificate.pem b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/certificate.pem deleted file mode 100644 index 0efc2ef5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/certificate.pem +++ /dev/null @@ -1,13 +0,0 @@ ------BEGIN CERTIFICATE----- -MIICATCCAWoCCQDPufXH86n2QzANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJu -bzETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0 -cyBQdHkgTHRkMB4XDTEyMDEwMTE0NDQwMFoXDTIwMDMxOTE0NDQwMFowRTELMAkG -A1UEBhMCbm8xEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0 -IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAtrQ7 -+r//2iV/B6F+4boH0XqFn7alcV9lpjvAmwRXNKnxAoa0f97AjYPGNLKrjpkNXXhB -JROIdbRbZnCNeC5fzX1a+JCo7KStzBXuGSZr27TtFmcV4H+9gIRIcNHtZmJLnxbJ -sIhkGR8yVYdmJZe4eT5ldk1zoB1adgPF1hZhCBMCAwEAATANBgkqhkiG9w0BAQUF -AAOBgQCeWBEHYJ4mCB5McwSSUox0T+/mJ4W48L/ZUE4LtRhHasU9hiW92xZkTa7E -QLcoJKQiWfiLX2ysAro0NX4+V8iqLziMqvswnPzz5nezaOLE/9U/QvH3l8qqNkXu -rNbsW1h/IO6FV8avWFYVFoutUwOaZ809k7iMh2F2JMgXQ5EymQ== ------END CERTIFICATE----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/key.pem b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/key.pem deleted file mode 100644 index 176fe320..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/key.pem +++ /dev/null @@ -1,15 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIICXAIBAAKBgQC2tDv6v//aJX8HoX7hugfReoWftqVxX2WmO8CbBFc0qfEChrR/ -3sCNg8Y0squOmQ1deEElE4h1tFtmcI14Ll/NfVr4kKjspK3MFe4ZJmvbtO0WZxXg -f72AhEhw0e1mYkufFsmwiGQZHzJVh2Yll7h5PmV2TXOgHVp2A8XWFmEIEwIDAQAB -AoGAAlVY8sHi/aE+9xT77twWX3mGHV0SzdjfDnly40fx6S1Gc7bOtVdd9DC7pk6l -3ENeJVR02IlgU8iC5lMHq4JEHPE272jtPrLlrpWLTGmHEqoVFv9AITPqUDLhB9Kk -Hjl7h8NYBKbr2JHKICr3DIPKOT+RnXVb1PD4EORbJ3ooYmkCQQDfknUnVxPgxUGs -ouABw1WJIOVgcCY/IFt4Ihf6VWTsxBgzTJKxn3HtgvE0oqTH7V480XoH0QxHhjLq -DrgobWU9AkEA0TRJ8/ouXGnFEPAXjWr9GdPQRZ1Use2MrFjneH2+Sxc0CmYtwwqL -Kr5kS6mqJrxprJeluSjBd+3/ElxURrEXjwJAUvmlN1OPEhXDmRHd92mKnlkyKEeX -OkiFCiIFKih1S5Y/sRJTQ0781nyJjtJqO7UyC3pnQu1oFEePL+UEniRztQJAMfav -AtnpYKDSM+1jcp7uu9BemYGtzKDTTAYfoiNF42EzSJiGrWJDQn4eLgPjY0T0aAf/ -yGz3Z9ErbhMm/Ysl+QJBAL4kBxRT8gM4ByJw4sdOvSeCCANFq8fhbgm8pGWlCPb5 -JGmX3/GHFM8x2tbWMGpyZP1DLtiNEFz7eCGktWK5rqE= ------END RSA PRIVATE KEY----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/request.pem b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/request.pem deleted file mode 100644 index 51bc7f62..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/request.pem +++ /dev/null @@ -1,11 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIBhDCB7gIBADBFMQswCQYDVQQGEwJubzETMBEGA1UECAwKU29tZS1TdGF0ZTEh -MB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMIGfMA0GCSqGSIb3DQEB -AQUAA4GNADCBiQKBgQC2tDv6v//aJX8HoX7hugfReoWftqVxX2WmO8CbBFc0qfEC -hrR/3sCNg8Y0squOmQ1deEElE4h1tFtmcI14Ll/NfVr4kKjspK3MFe4ZJmvbtO0W -ZxXgf72AhEhw0e1mYkufFsmwiGQZHzJVh2Yll7h5PmV2TXOgHVp2A8XWFmEIEwID -AQABoAAwDQYJKoZIhvcNAQEFBQADgYEAjsUXEARgfxZNkMjuUcudgU2w4JXS0gGI -JQ0U1LmU0vMDSKwqndMlvCbKzEgPbJnGJDI8D4MeINCJHa5Ceyb8c+jaJYUcCabl -lQW5Psn3+eWp8ncKlIycDRj1Qk615XuXtV0fhkrgQM2ZCm9LaQ1O1Gd/CzLihLjF -W0MmgMKMMRk= ------END CERTIFICATE REQUEST----- diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/textfile b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/textfile deleted file mode 100644 index a10483b0..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/fixtures/textfile +++ /dev/null @@ -1,9 +0,0 @@ -Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam egestas, massa at aliquam luctus, sapien erat viverra elit, nec pulvinar turpis eros sagittis urna. Pellentesque imperdiet tempor varius. Pellentesque blandit, ipsum in imperdiet venenatis, mi elit faucibus odio, id condimentum ante enim sed lectus. Aliquam et odio non odio pellentesque pulvinar. Vestibulum a erat dolor. Integer pretium risus sit amet nisl volutpat nec venenatis magna egestas. Ut bibendum felis eu tellus laoreet eleifend. Nam pulvinar auctor tortor, eu iaculis leo vestibulum quis. In euismod risus ac purus vehicula et fermentum ligula consectetur. Vivamus condimentum tempus lacinia. - -Curabitur sodales condimentum urna id dictum. Sed quis justo sit amet quam ultrices tincidunt vel laoreet nulla. Nullam quis ipsum sed nisi mollis bibendum at sit amet nisi. Donec laoreet consequat velit sit amet mollis. Nam sed sapien a massa iaculis dapibus. Sed dui nunc, ultricies et pellentesque ullamcorper, aliquet vitae ligula. Integer eu velit in neque iaculis venenatis. Ut rhoncus cursus est, ac dignissim leo vehicula a. Nulla ullamcorper vulputate mauris id blandit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Quisque eleifend, nisi a tempor sollicitudin, odio massa pretium urna, quis congue sapien elit at tortor. Curabitur ipsum orci, vehicula non commodo molestie, laoreet id enim. Pellentesque convallis ultrices congue. Pellentesque nec iaculis lorem. In sagittis pharetra ipsum eget sodales. - -Fusce id nulla odio. Nunc nibh justo, placerat vel tincidunt sed, ornare et enim. Nulla vel urna vel ante commodo bibendum in vitae metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Duis erat nunc, semper eget sagittis sit amet, ullamcorper eget lacus. Donec hendrerit ipsum vitae eros vestibulum eu gravida neque tincidunt. Ut molestie lacinia nulla. Donec mattis odio at magna egestas at pellentesque eros accumsan. Praesent interdum sem sit amet nibh commodo dignissim. Duis laoreet, enim ultricies fringilla suscipit, enim libero cursus nulla, sollicitudin adipiscing erat velit ut dui. Nulla eleifend mauris at velit fringilla a molestie lorem venenatis. - -Donec sit amet scelerisque metus. Cras ac felis a nulla venenatis vulputate. Duis porttitor eros ac neque rhoncus eget aliquet neque egestas. Quisque sed nunc est, vitae dapibus quam. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; In vehicula, est vitae posuere ultricies, diam purus pretium sapien, nec rhoncus dolor nisl eget arcu. Aliquam et nisi vitae risus tincidunt auctor. In vehicula, erat a cursus adipiscing, lorem orci congue est, nec ultricies elit dui in nunc. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Lorem ipsum dolor sit amet, consectetur adipiscing elit. - -Duis congue tempus elit sit amet auctor. Duis dignissim, risus ut sollicitudin ultricies, dolor ligula gravida odio, nec congue orci purus ut ligula. Fusce pretium dictum lectus at volutpat. Sed non auctor mauris. Etiam placerat vestibulum massa id blandit. Quisque consequat lacus ut nulla euismod facilisis. Sed aliquet ipsum nec mi imperdiet viverra. Pellentesque ullamcorper, lectus nec varius gravida, odio justo cursus risus, eu sagittis metus arcu quis felis. Phasellus consectetur vehicula libero, at condimentum orci euismod vel. Nunc purus tortor, suscipit nec fringilla nec, vulputate et nibh. Nam porta vehicula neque. Praesent porttitor, sapien eu auctor euismod, arcu quam elementum urna, sed hendrerit magna augue sed quam. \ No newline at end of file diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/hybi-common.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/hybi-common.js deleted file mode 100644 index 006f9c69..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/hybi-common.js +++ /dev/null @@ -1,99 +0,0 @@ -/** - * Returns a Buffer from a "ff 00 ff"-type hex string. - */ - -getBufferFromHexString = function(byteStr) { - var bytes = byteStr.split(' '); - var buf = new Buffer(bytes.length); - for (var i = 0; i < bytes.length; ++i) { - buf[i] = parseInt(bytes[i], 16); - } - return buf; -} - -/** - * Returns a hex string from a Buffer. - */ - -getHexStringFromBuffer = function(data) { - var s = ''; - for (var i = 0; i < data.length; ++i) { - s += padl(data[i].toString(16), 2, '0') + ' '; - } - return s.trim(); -} - -/** - * Splits a buffer in two parts. - */ - -splitBuffer = function(buffer) { - var b1 = new Buffer(Math.ceil(buffer.length / 2)); - buffer.copy(b1, 0, 0, b1.length); - var b2 = new Buffer(Math.floor(buffer.length / 2)); - buffer.copy(b2, 0, b1.length, b1.length + b2.length); - return [b1, b2]; -} - -/** - * Performs hybi07+ type masking on a hex string or buffer. - */ - -mask = function(buf, maskString) { - if (typeof buf == 'string') buf = new Buffer(buf); - var mask = getBufferFromHexString(maskString || '34 83 a8 68'); - for (var i = 0; i < buf.length; ++i) { - buf[i] ^= mask[i % 4]; - } - return buf; -} - -/** - * Returns a hex string representing the length of a message - */ - -getHybiLengthAsHexString = function(len, masked) { - if (len < 126) { - var buf = new Buffer(1); - buf[0] = (masked ? 0x80 : 0) | len; - } - else if (len < 65536) { - var buf = new Buffer(3); - buf[0] = (masked ? 0x80 : 0) | 126; - getBufferFromHexString(pack(4, len)).copy(buf, 1); - } - else { - var buf = new Buffer(9); - buf[0] = (masked ? 0x80 : 0) | 127; - getBufferFromHexString(pack(16, len)).copy(buf, 1); - } - return getHexStringFromBuffer(buf); -} - -/** - * Unpacks a Buffer into a number. - */ - -unpack = function(buffer) { - var n = 0; - for (var i = 0; i < buffer.length; ++i) { - n = (i == 0) ? buffer[i] : (n * 256) + buffer[i]; - } - return n; -} - -/** - * Returns a hex string, representing a specific byte count 'length', from a number. - */ - -pack = function(length, number) { - return padl(number.toString(16), length, '0').replace(/([0-9a-f][0-9a-f])/gi, '$1 ').trim(); -} - -/** - * Left pads the string 's' to a total length of 'n' with char 'c'. - */ - -padl = function(s, n, c) { - return new Array(1 + n - s.length).join(c) + s; -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/testserver.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/testserver.js deleted file mode 100644 index 3e7a9667..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws/test/testserver.js +++ /dev/null @@ -1,180 +0,0 @@ -var http = require('http') - , util = require('util') - , crypto = require('crypto') - , events = require('events') - , Sender = require('../lib/Sender') - , Receiver = require('../lib/Receiver'); - -module.exports = { - handlers: { - valid: validServer, - invalidKey: invalidRequestHandler, - closeAfterConnect: closeAfterConnectHandler, - return401: return401 - }, - createServer: function(port, handler, cb) { - if (handler && !cb) { - cb = handler; - handler = null; - } - var webServer = http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/plain'}); - res.end('okay'); - }); - var srv = new Server(webServer); - webServer.on('upgrade', function(req, socket) { - webServer._socket = socket; - (handler || validServer)(srv, req, socket); - }); - webServer.listen(port, '127.0.0.1', function() { cb(srv); }); - } -}; - -/** - * Test strategies - */ - -function validServer(server, req, socket) { - if (typeof req.headers.upgrade === 'undefined' || - req.headers.upgrade.toLowerCase() !== 'websocket') { - throw new Error('invalid headers'); - return; - } - - if (!req.headers['sec-websocket-key']) { - socket.end(); - throw new Error('websocket key is missing'); - } - - // calc key - var key = req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.setTimeout(0); - socket.setNoDelay(true); - - var sender = new Sender(socket); - var receiver = new Receiver(); - receiver.ontext = function (message, flags) { - server.emit('message', message, flags); - sender.send(message); - }; - receiver.onbinary = function (message, flags) { - flags = flags || {}; - flags.binary = true; - server.emit('message', message, flags); - sender.send(message, {binary: true}); - }; - receiver.onping = function (message, flags) { - flags = flags || {}; - server.emit('ping', message, flags); - }; - receiver.onpong = function (message, flags) { - flags = flags || {}; - server.emit('pong', message, flags); - }; - receiver.onclose = function (code, message, flags) { - flags = flags || {}; - server.emit('close', code, message, flags); - }; - socket.on('data', function (data) { - receiver.add(data); - }); - socket.on('end', function() { - socket.end(); - }); -} - -function invalidRequestHandler(server, req, socket) { - if (typeof req.headers.upgrade === 'undefined' || - req.headers.upgrade.toLowerCase() !== 'websocket') { - throw new Error('invalid headers'); - return; - } - - if (!req.headers['sec-websocket-key']) { - socket.end(); - throw new Error('websocket key is missing'); - } - - // calc key - var key = req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "bogus"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.end(); -} - -function closeAfterConnectHandler(server, req, socket) { - if (typeof req.headers.upgrade === 'undefined' || - req.headers.upgrade.toLowerCase() !== 'websocket') { - throw new Error('invalid headers'); - return; - } - - if (!req.headers['sec-websocket-key']) { - socket.end(); - throw new Error('websocket key is missing'); - } - - // calc key - var key = req.headers['sec-websocket-key']; - var shasum = crypto.createHash('sha1'); - shasum.update(key + "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"); - key = shasum.digest('base64'); - - var headers = [ - 'HTTP/1.1 101 Switching Protocols' - , 'Upgrade: websocket' - , 'Connection: Upgrade' - , 'Sec-WebSocket-Accept: ' + key - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.end(); -} - - -function return401(server, req, socket) { - var headers = [ - 'HTTP/1.1 401 Unauthorized' - , 'Content-type: text/html' - ]; - - socket.write(headers.concat('', '').join('\r\n')); - socket.end(); -} - -/** - * Server object, which will do the actual emitting - */ - -function Server(webServer) { - this.webServer = webServer; -} - -util.inherits(Server, events.EventEmitter); - -Server.prototype.close = function() { - this.webServer.close(); - if (this._socket) this._socket.end(); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/README.md b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/README.md deleted file mode 100644 index 22aab8bd..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# node-XMLHttpRequest # - -node-XMLHttpRequest is a wrapper for the built-in http client to emulate the -browser XMLHttpRequest object. - -This can be used with JS designed for browsers to improve reuse of code and -allow the use of existing libraries. - -Note: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/). - -## Usage ## - -Here's how to include the module in your project and use as the browser-based -XHR object. - - var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; - var xhr = new XMLHttpRequest(); - -Note: use the lowercase string "xmlhttprequest" in your require(). On -case-sensitive systems (eg Linux) using uppercase letters won't work. - -## Versions ## - -Prior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to -the standard major.minor.bugfix. 1.x shouldn't necessarily be considered -stable just because it's above 0.x. - -Since the XMLHttpRequest API is stable this library's API is stable as -well. Major version numbers indicate significant core code changes. -Minor versions indicate minor core code changes or better conformity to -the W3C spec. - -## Supports ## - -* Async and synchronous requests -* GET, POST, PUT, and DELETE requests -* All spec methods (open, send, abort, getRequestHeader, - getAllRequestHeaders, event methods) -* Requests to all domains - -## Known Issues / Missing Features ## - -For a list of open issues or to report your own visit the [github issues -page](https://github.com/driverdan/node-XMLHttpRequest/issues). - -* Local file access may have unexpected results for non-UTF8 files -* Synchronous requests don't set headers properly -* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!). -* Some events are missing, such as abort -* getRequestHeader is case-sensitive -* Cookies aren't persisted between requests -* Missing XML support -* Missing basic auth diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/autotest.watchr b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/autotest.watchr deleted file mode 100644 index 5324db6c..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/autotest.watchr +++ /dev/null @@ -1,8 +0,0 @@ -def run_all_tests - puts `clear` - puts `node tests/test-constants.js` - puts `node tests/test-headers.js` - puts `node tests/test-request.js` -end -watch('.*.js') { run_all_tests } -run_all_tests diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/example/demo.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/example/demo.js deleted file mode 100644 index 4f333de9..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/example/demo.js +++ /dev/null @@ -1,16 +0,0 @@ -var sys = require('util'); -var XMLHttpRequest = require("xmlhttprequest").XMLHttpRequest; - -var xhr = new XMLHttpRequest(); - -xhr.onreadystatechange = function() { - sys.puts("State: " + this.readyState); - - if (this.readyState == 4) { - sys.puts("Complete.\nBody length: " + this.responseText.length); - sys.puts("Body:\n" + this.responseText); - } -}; - -xhr.open("GET", "http://driverdan.com"); -xhr.send(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/lib/XMLHttpRequest.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/lib/XMLHttpRequest.js deleted file mode 100644 index 214a2e3b..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/lib/XMLHttpRequest.js +++ /dev/null @@ -1,548 +0,0 @@ -/** - * Wrapper for built-in http.js to emulate the browser XMLHttpRequest object. - * - * This can be used with JS designed for browsers to improve reuse of code and - * allow the use of existing libraries. - * - * Usage: include("XMLHttpRequest.js") and use XMLHttpRequest per W3C specs. - * - * @author Dan DeFelippi - * @contributor David Ellis - * @license MIT - */ - -var Url = require("url") - , spawn = require("child_process").spawn - , fs = require('fs'); - -exports.XMLHttpRequest = function() { - /** - * Private variables - */ - var self = this; - var http = require('http'); - var https = require('https'); - - // Holds http.js objects - var client; - var request; - var response; - - // Request settings - var settings = {}; - - // Set some default headers - var defaultHeaders = { - "User-Agent": "node-XMLHttpRequest", - "Accept": "*/*", - }; - - var headers = defaultHeaders; - - // These headers are not user setable. - // The following are allowed but banned in the spec: - // * user-agent - var forbiddenRequestHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "content-transfer-encoding", - "cookie", - "cookie2", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "via" - ]; - - // These request methods are not allowed - var forbiddenRequestMethods = [ - "TRACE", - "TRACK", - "CONNECT" - ]; - - // Send flag - var sendFlag = false; - // Error flag, used when errors occur or abort is called - var errorFlag = false; - - // Event listeners - var listeners = {}; - - /** - * Constants - */ - - this.UNSENT = 0; - this.OPENED = 1; - this.HEADERS_RECEIVED = 2; - this.LOADING = 3; - this.DONE = 4; - - /** - * Public vars - */ - - // Current state - this.readyState = this.UNSENT; - - // default ready state change handler in case one is not set or is set late - this.onreadystatechange = null; - - // Result & response - this.responseText = ""; - this.responseXML = ""; - this.status = null; - this.statusText = null; - - /** - * Private methods - */ - - /** - * Check if the specified header is allowed. - * - * @param string header Header to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpHeader = function(header) { - return (header && forbiddenRequestHeaders.indexOf(header.toLowerCase()) === -1); - }; - - /** - * Check if the specified method is allowed. - * - * @param string method Request method to validate - * @return boolean False if not allowed, otherwise true - */ - var isAllowedHttpMethod = function(method) { - return (method && forbiddenRequestMethods.indexOf(method) === -1); - }; - - /** - * Public methods - */ - - /** - * Open the connection. Currently supports local server requests. - * - * @param string method Connection method (eg GET, POST) - * @param string url URL for the connection. - * @param boolean async Asynchronous connection. Default is true. - * @param string user Username for basic authentication (optional) - * @param string password Password for basic authentication (optional) - */ - this.open = function(method, url, async, user, password) { - this.abort(); - errorFlag = false; - - // Check for valid request method - if (!isAllowedHttpMethod(method)) { - throw "SecurityError: Request method not allowed"; - return; - } - - settings = { - "method": method, - "url": url.toString(), - "async": (typeof async !== "boolean" ? true : async), - "user": user || null, - "password": password || null - }; - - setState(this.OPENED); - }; - - /** - * Sets a header for the request. - * - * @param string header Header name - * @param string value Header value - */ - this.setRequestHeader = function(header, value) { - if (this.readyState != this.OPENED) { - throw "INVALID_STATE_ERR: setRequestHeader can only be called when state is OPEN"; - } - if (!isAllowedHttpHeader(header)) { - console.warn('Refused to set unsafe header "' + header + '"'); - return; - } - if (sendFlag) { - throw "INVALID_STATE_ERR: send flag is true"; - } - headers[header] = value; - }; - - /** - * Gets a header from the server response. - * - * @param string header Name of header to get. - * @return string Text of the header or null if it doesn't exist. - */ - this.getResponseHeader = function(header) { - if (typeof header === "string" - && this.readyState > this.OPENED - && response.headers[header.toLowerCase()] - && !errorFlag - ) { - return response.headers[header.toLowerCase()]; - } - - return null; - }; - - /** - * Gets all the response headers. - * - * @return string A string with all response headers separated by CR+LF - */ - this.getAllResponseHeaders = function() { - if (this.readyState < this.HEADERS_RECEIVED || errorFlag) { - return ""; - } - var result = ""; - - for (var i in response.headers) { - // Cookie headers are excluded - if (i !== "set-cookie" && i !== "set-cookie2") { - result += i + ": " + response.headers[i] + "\r\n"; - } - } - return result.substr(0, result.length - 2); - }; - - /** - * Gets a request header - * - * @param string name Name of header to get - * @return string Returns the request header or empty string if not set - */ - this.getRequestHeader = function(name) { - // @TODO Make this case insensitive - if (typeof name === "string" && headers[name]) { - return headers[name]; - } - - return ""; - } - - /** - * Sends the request to the server. - * - * @param string data Optional data to send as request body. - */ - this.send = function(data) { - if (this.readyState != this.OPENED) { - throw "INVALID_STATE_ERR: connection must be opened before send() is called"; - } - - if (sendFlag) { - throw "INVALID_STATE_ERR: send has already been called"; - } - - var ssl = false, local = false; - var url = Url.parse(settings.url); - - // Determine the server - switch (url.protocol) { - case 'https:': - ssl = true; - // SSL & non-SSL both need host, no break here. - case 'http:': - var host = url.hostname; - break; - - case 'file:': - local = true; - break; - - case undefined: - case '': - var host = "localhost"; - break; - - default: - throw "Protocol not supported."; - } - - // Load files off the local filesystem (file://) - if (local) { - if (settings.method !== "GET") { - throw "XMLHttpRequest: Only GET method is supported"; - } - - if (settings.async) { - fs.readFile(url.pathname, 'utf8', function(error, data) { - if (error) { - self.handleError(error); - } else { - self.status = 200; - self.responseText = data; - setState(self.DONE); - } - }); - } else { - try { - this.responseText = fs.readFileSync(url.pathname, 'utf8'); - this.status = 200; - setState(self.DONE); - } catch(e) { - this.handleError(e); - } - } - - return; - } - - // Default to port 80. If accessing localhost on another port be sure - // to use http://localhost:port/path - var port = url.port || (ssl ? 443 : 80); - // Add query string if one is used - var uri = url.pathname + (url.search ? url.search : ''); - - // Set the Host header or the server may reject the request - headers["Host"] = host; - if (!((ssl && port === 443) || port === 80)) { - headers["Host"] += ':' + url.port; - } - - // Set Basic Auth if necessary - if (settings.user) { - if (typeof settings.password == "undefined") { - settings.password = ""; - } - var authBuf = new Buffer(settings.user + ":" + settings.password); - headers["Authorization"] = "Basic " + authBuf.toString("base64"); - } - - // Set content length header - if (settings.method === "GET" || settings.method === "HEAD") { - data = null; - } else if (data) { - headers["Content-Length"] = Buffer.byteLength(data); - - if (!headers["Content-Type"]) { - headers["Content-Type"] = "text/plain;charset=UTF-8"; - } - } else if (settings.method === "POST") { - // For a post with no data set Content-Length: 0. - // This is required by buggy servers that don't meet the specs. - headers["Content-Length"] = 0; - } - - var options = { - host: host, - port: port, - path: uri, - method: settings.method, - headers: headers - }; - - // Reset error flag - errorFlag = false; - - // Handle async requests - if (settings.async) { - // Use the proper protocol - var doRequest = ssl ? https.request : http.request; - - // Request is being sent, set send flag - sendFlag = true; - - // As per spec, this is called here for historical reasons. - self.dispatchEvent("readystatechange"); - - // Create the request - request = doRequest(options, function(resp) { - response = resp; - response.setEncoding("utf8"); - - setState(self.HEADERS_RECEIVED); - self.status = response.statusCode; - - response.on('data', function(chunk) { - // Make sure there's some data - if (chunk) { - self.responseText += chunk; - } - // Don't emit state changes if the connection has been aborted. - if (sendFlag) { - setState(self.LOADING); - } - }); - - response.on('end', function() { - if (sendFlag) { - // Discard the 'end' event if the connection has been aborted - setState(self.DONE); - sendFlag = false; - } - }); - - response.on('error', function(error) { - self.handleError(error); - }); - }).on('error', function(error) { - self.handleError(error); - }); - - // Node 0.4 and later won't accept empty data. Make sure it's needed. - if (data) { - request.write(data); - } - - request.end(); - - self.dispatchEvent("loadstart"); - } else { // Synchronous - // Create a temporary file for communication with the other Node process - var syncFile = ".node-xmlhttprequest-sync-" + process.pid; - fs.writeFileSync(syncFile, "", "utf8"); - // The async request the other Node process executes - var execString = "var http = require('http'), https = require('https'), fs = require('fs');" - + "var doRequest = http" + (ssl ? "s" : "") + ".request;" - + "var options = " + JSON.stringify(options) + ";" - + "var responseText = '';" - + "var req = doRequest(options, function(response) {" - + "response.setEncoding('utf8');" - + "response.on('data', function(chunk) {" - + "responseText += chunk;" - + "});" - + "response.on('end', function() {" - + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-STATUS:' + response.statusCode + ',' + responseText, 'utf8');" - + "});" - + "response.on('error', function(error) {" - + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');" - + "});" - + "}).on('error', function(error) {" - + "fs.writeFileSync('" + syncFile + "', 'NODE-XMLHTTPREQUEST-ERROR:' + JSON.stringify(error), 'utf8');" - + "});" - + (data ? "req.write('" + data.replace(/'/g, "\\'") + "');":"") - + "req.end();"; - // Start the other Node Process, executing this string - syncProc = spawn(process.argv[0], ["-e", execString]); - while((self.responseText = fs.readFileSync(syncFile, 'utf8')) == "") { - // Wait while the file is empty - } - // Kill the child process once the file has data - syncProc.stdin.end(); - // Remove the temporary file - fs.unlinkSync(syncFile); - if (self.responseText.match(/^NODE-XMLHTTPREQUEST-ERROR:/)) { - // If the file returned an error, handle it - var errorObj = self.responseText.replace(/^NODE-XMLHTTPREQUEST-ERROR:/, ""); - self.handleError(errorObj); - } else { - // If the file returned okay, parse its data and move to the DONE state - self.status = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:([0-9]*),.*/, "$1"); - self.responseText = self.responseText.replace(/^NODE-XMLHTTPREQUEST-STATUS:[0-9]*,(.*)/, "$1"); - setState(self.DONE); - } - } - }; - - /** - * Called when an error is encountered to deal with it. - */ - this.handleError = function(error) { - this.status = 503; - this.statusText = error; - this.responseText = error.stack; - errorFlag = true; - setState(this.DONE); - }; - - /** - * Aborts a request. - */ - this.abort = function() { - if (request) { - request.abort(); - request = null; - } - - headers = defaultHeaders; - this.responseText = ""; - this.responseXML = ""; - - errorFlag = true; - - if (this.readyState !== this.UNSENT - && (this.readyState !== this.OPENED || sendFlag) - && this.readyState !== this.DONE) { - sendFlag = false; - setState(this.DONE); - } - this.readyState = this.UNSENT; - }; - - /** - * Adds an event listener. Preferred method of binding to events. - */ - this.addEventListener = function(event, callback) { - if (!(event in listeners)) { - listeners[event] = []; - } - // Currently allows duplicate callbacks. Should it? - listeners[event].push(callback); - }; - - /** - * Remove an event callback that has already been bound. - * Only works on the matching funciton, cannot be a copy. - */ - this.removeEventListener = function(event, callback) { - if (event in listeners) { - // Filter will return a new array with the callback removed - listeners[event] = listeners[event].filter(function(ev) { - return ev !== callback; - }); - } - }; - - /** - * Dispatch any events, including both "on" methods and events attached using addEventListener. - */ - this.dispatchEvent = function(event) { - if (typeof self["on" + event] === "function") { - self["on" + event](); - } - if (event in listeners) { - for (var i = 0, len = listeners[event].length; i < len; i++) { - listeners[event][i].call(self); - } - } - }; - - /** - * Changes readyState and calls onreadystatechange. - * - * @param int state New state - */ - var setState = function(state) { - if (self.readyState !== state) { - self.readyState = state; - - if (settings.async || self.readyState < self.OPENED || self.readyState === self.DONE) { - self.dispatchEvent("readystatechange"); - } - - if (self.readyState === self.DONE && !errorFlag) { - self.dispatchEvent("load"); - // @TODO figure out InspectorInstrumentation::didLoadXHR(cookie) - self.dispatchEvent("loadend"); - } - } - }; -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json deleted file mode 100644 index e1f4bf34..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "xmlhttprequest", - "description": "XMLHttpRequest for Node", - "version": "1.4.2", - "author": { - "name": "Dan DeFelippi", - "url": "http://driverdan.com" - }, - "keywords": [ - "xhr", - "ajax" - ], - "licenses": [ - { - "type": "MIT", - "url": "http://creativecommons.org/licenses/MIT/" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/driverdan/node-XMLHttpRequest.git" - }, - "bugs": { - "url": "http://github.com/driverdan/node-XMLHttpRequest/issues" - }, - "engines": { - "node": ">=0.4.0" - }, - "directories": { - "lib": "./lib", - "example": "./example" - }, - "main": "./lib/XMLHttpRequest.js", - "readme": "# node-XMLHttpRequest #\n\nnode-XMLHttpRequest is a wrapper for the built-in http client to emulate the\nbrowser XMLHttpRequest object.\n\nThis can be used with JS designed for browsers to improve reuse of code and\nallow the use of existing libraries.\n\nNote: This library currently conforms to [XMLHttpRequest 1](http://www.w3.org/TR/XMLHttpRequest/). Version 2.0 will target [XMLHttpRequest Level 2](http://www.w3.org/TR/XMLHttpRequest2/).\n\n## Usage ##\n\nHere's how to include the module in your project and use as the browser-based\nXHR object.\n\n\tvar XMLHttpRequest = require(\"xmlhttprequest\").XMLHttpRequest;\n\tvar xhr = new XMLHttpRequest();\n\nNote: use the lowercase string \"xmlhttprequest\" in your require(). On\ncase-sensitive systems (eg Linux) using uppercase letters won't work.\n\n## Versions ##\n\nPrior to 1.4.0 version numbers were arbitrary. From 1.4.0 on they conform to\nthe standard major.minor.bugfix. 1.x shouldn't necessarily be considered\nstable just because it's above 0.x.\n\nSince the XMLHttpRequest API is stable this library's API is stable as\nwell. Major version numbers indicate significant core code changes.\nMinor versions indicate minor core code changes or better conformity to\nthe W3C spec.\n\n## Supports ##\n\n* Async and synchronous requests\n* GET, POST, PUT, and DELETE requests\n* All spec methods (open, send, abort, getRequestHeader,\n getAllRequestHeaders, event methods)\n* Requests to all domains\n\n## Known Issues / Missing Features ##\n\nFor a list of open issues or to report your own visit the [github issues\npage](https://github.com/driverdan/node-XMLHttpRequest/issues).\n\n* Local file access may have unexpected results for non-UTF8 files\n* Synchronous requests don't set headers properly\n* Synchronous requests freeze node while waiting for response (But that's what you want, right? Stick with async!).\n* Some events are missing, such as abort\n* getRequestHeader is case-sensitive\n* Cookies aren't persisted between requests\n* Missing XML support\n* Missing basic auth\n", - "readmeFilename": "README.md", - "homepage": "https://github.com/driverdan/node-XMLHttpRequest", - "_id": "xmlhttprequest@1.4.2", - "_from": "xmlhttprequest@1.4.2" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-constants.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-constants.js deleted file mode 100644 index 372e46cc..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-constants.js +++ /dev/null @@ -1,13 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr = new XMLHttpRequest(); - -// Test constant values -assert.equal(0, xhr.UNSENT); -assert.equal(1, xhr.OPENED); -assert.equal(2, xhr.HEADERS_RECEIVED); -assert.equal(3, xhr.LOADING); -assert.equal(4, xhr.DONE); - -sys.puts("done"); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-events.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-events.js deleted file mode 100644 index c72f001d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-events.js +++ /dev/null @@ -1,50 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , http = require("http") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr; - -// Test server -var server = http.createServer(function (req, res) { - var body = (req.method != "HEAD" ? "Hello World" : ""); - - res.writeHead(200, { - "Content-Type": "text/plain", - "Content-Length": Buffer.byteLength(body) - }); - // HEAD has no body - if (req.method != "HEAD") { - res.write(body); - } - res.end(); - assert.equal(onreadystatechange, true); - assert.equal(readystatechange, true); - assert.equal(removed, true); - sys.puts("done"); - this.close(); -}).listen(8000); - -xhr = new XMLHttpRequest(); - -// Track event calls -var onreadystatechange = false; -var readystatechange = false; -var removed = true; -var removedEvent = function() { - removed = false; -}; - -xhr.onreadystatechange = function() { - onreadystatechange = true; -}; - -xhr.addEventListener("readystatechange", function() { - readystatechange = true; -}); - -// This isn't perfect, won't guarantee it was added in the first place -xhr.addEventListener("readystatechange", removedEvent); -xhr.removeEventListener("readystatechange", removedEvent); - -xhr.open("GET", "http://localhost:8000"); -xhr.send(); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js deleted file mode 100644 index f1edd71f..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-exceptions.js +++ /dev/null @@ -1,62 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr = new XMLHttpRequest(); - -// Test request methods that aren't allowed -try { - xhr.open("TRACK", "http://localhost:8000/"); - console.log("ERROR: TRACK should have thrown exception"); -} catch(e) {} -try { - xhr.open("TRACE", "http://localhost:8000/"); - console.log("ERROR: TRACE should have thrown exception"); -} catch(e) {} -try { - xhr.open("CONNECT", "http://localhost:8000/"); - console.log("ERROR: CONNECT should have thrown exception"); -} catch(e) {} -// Test valid request method -try { - xhr.open("GET", "http://localhost:8000/"); -} catch(e) { - console.log("ERROR: Invalid exception for GET", e); -} - -// Test forbidden headers -var forbiddenRequestHeaders = [ - "accept-charset", - "accept-encoding", - "access-control-request-headers", - "access-control-request-method", - "connection", - "content-length", - "content-transfer-encoding", - "cookie", - "cookie2", - "date", - "expect", - "host", - "keep-alive", - "origin", - "referer", - "te", - "trailer", - "transfer-encoding", - "upgrade", - "user-agent", - "via" -]; - -for (var i in forbiddenRequestHeaders) { - try { - xhr.setRequestHeader(forbiddenRequestHeaders[i], "Test"); - console.log("ERROR: " + forbiddenRequestHeaders[i] + " should have thrown exception"); - } catch(e) { - } -} - -// Try valid header -xhr.setRequestHeader("X-Foobar", "Test"); - -console.log("Done"); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-headers.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-headers.js deleted file mode 100644 index 2ecb045d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-headers.js +++ /dev/null @@ -1,61 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr = new XMLHttpRequest() - , http = require("http"); - -// Test server -var server = http.createServer(function (req, res) { - // Test setRequestHeader - assert.equal("Foobar", req.headers["x-test"]); - - var body = "Hello World"; - res.writeHead(200, { - "Content-Type": "text/plain", - "Content-Length": Buffer.byteLength(body), - // Set cookie headers to see if they're correctly suppressed - // Actual values don't matter - "Set-Cookie": "foo=bar", - "Set-Cookie2": "bar=baz", - "Connection": "close" - }); - res.write("Hello World"); - res.end(); - - this.close(); -}).listen(8000); - -xhr.onreadystatechange = function() { - if (this.readyState == 4) { - // Test getAllResponseHeaders() - var headers = "content-type: text/plain\r\ncontent-length: 11\r\nconnection: close"; - assert.equal(headers, this.getAllResponseHeaders()); - - // Test case insensitivity - assert.equal('text/plain', this.getResponseHeader('Content-Type')); - assert.equal('text/plain', this.getResponseHeader('Content-type')); - assert.equal('text/plain', this.getResponseHeader('content-Type')); - assert.equal('text/plain', this.getResponseHeader('content-type')); - - // Test aborted getAllResponseHeaders - this.abort(); - assert.equal("", this.getAllResponseHeaders()); - assert.equal(null, this.getResponseHeader("Connection")); - - sys.puts("done"); - } -}; - -assert.equal(null, xhr.getResponseHeader("Content-Type")); -try { - xhr.open("GET", "http://localhost:8000/"); - // Valid header - xhr.setRequestHeader("X-Test", "Foobar"); - // Invalid header - xhr.setRequestHeader("Content-Length", 0); - // Test getRequestHeader - assert.equal("Foobar", xhr.getRequestHeader("X-Test")); - xhr.send(); -} catch(e) { - console.log("ERROR: Exception raised", e); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js deleted file mode 100644 index fa1b1bed..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-methods.js +++ /dev/null @@ -1,62 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , http = require("http") - , xhr; - -// Test server -var server = http.createServer(function (req, res) { - // Check request method and URL - assert.equal(methods[curMethod], req.method); - assert.equal("/" + methods[curMethod], req.url); - - var body = (req.method != "HEAD" ? "Hello World" : ""); - - res.writeHead(200, { - "Content-Type": "text/plain", - "Content-Length": Buffer.byteLength(body) - }); - // HEAD has no body - if (req.method != "HEAD") { - res.write(body); - } - res.end(); - - if (curMethod == methods.length - 1) { - this.close(); - sys.puts("done"); - } -}).listen(8000); - -// Test standard methods -var methods = ["GET", "POST", "HEAD", "PUT", "DELETE"]; -var curMethod = 0; - -function start(method) { - // Reset each time - xhr = new XMLHttpRequest(); - - xhr.onreadystatechange = function() { - if (this.readyState == 4) { - if (method == "HEAD") { - assert.equal("", this.responseText); - } else { - assert.equal("Hello World", this.responseText); - } - - curMethod++; - - if (curMethod < methods.length) { - sys.puts("Testing " + methods[curMethod]); - start(methods[curMethod]); - } - } - }; - - var url = "http://localhost:8000/" + method; - xhr.open(method, url); - xhr.send(); -} - -sys.puts("Testing " + methods[curMethod]); -start(methods[curMethod]); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js deleted file mode 100644 index cd4e1745..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/test-request-protocols.js +++ /dev/null @@ -1,34 +0,0 @@ -var sys = require("util") - , assert = require("assert") - , XMLHttpRequest = require("../lib/XMLHttpRequest").XMLHttpRequest - , xhr; - -xhr = new XMLHttpRequest(); - -xhr.onreadystatechange = function() { - if (this.readyState == 4) { - assert.equal("Hello World", this.responseText); - this.close(); - runSync(); - } -}; - -// Async -var url = "file://" + __dirname + "/testdata.txt"; -xhr.open("GET", url); -xhr.send(); - -// Sync -var runSync = function() { - xhr = new XMLHttpRequest(); - - xhr.onreadystatechange = function() { - if (this.readyState == 4) { - assert.equal("Hello World", this.responseText); - this.close(); - sys.puts("done"); - } - }; - xhr.open("GET", url, false); - xhr.send(); -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/testdata.txt b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/testdata.txt deleted file mode 100644 index 557db03d..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/node_modules/xmlhttprequest/tests/testdata.txt +++ /dev/null @@ -1 +0,0 @@ -Hello World diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/package.json b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/package.json deleted file mode 100644 index 569ad0b8..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/package.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "socket.io-client", - "description": "Socket.IO client for the browser and node.js", - "version": "0.9.16", - "main": "./lib/io.js", - "browserify": "./dist/socket.io.js", - "homepage": "http://socket.io", - "keywords": [ - "websocket", - "socket", - "realtime", - "socket.io", - "comet", - "ajax" - ], - "author": { - "name": "Guillermo Rauch", - "email": "guillermo@learnboost.com" - }, - "contributors": [ - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - }, - { - "name": "Arnout Kazemier", - "email": "info@3rd-eden.com" - }, - { - "name": "Vladimir Dronnikov", - "email": "dronnikov@gmail.com" - }, - { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/LearnBoost/socket.io-client.git" - }, - "dependencies": { - "uglify-js": "1.2.5", - "ws": "0.4.x", - "xmlhttprequest": "1.4.2", - "active-x-obfuscator": "0.0.1" - }, - "devDependencies": { - "expresso": "*", - "express": "2.5.x", - "jade": "*", - "stylus": "*", - "socket.io": "0.9.16", - "socket.io-client": "0.9.16", - "should": "*" - }, - "engines": { - "node": ">= 0.4.0" - }, - "readme": "socket.io\n=========\n\n#### Sockets for the rest of us\n\nThe `socket.io` client is basically a simple HTTP Socket interface implementation.\nIt looks similar to WebSocket while providing additional features and\nleveraging other transports when WebSocket is not supported by the user's\nbrowser.\n\n```js\nvar socket = io.connect('http://domain.com');\nsocket.on('connect', function () {\n // socket connected\n});\nsocket.on('custom event', function () {\n // server emitted a custom event\n});\nsocket.on('disconnect', function () {\n // socket disconnected\n});\nsocket.send('hi there');\n```\n\n### Recipes\n\n#### Utilizing namespaces (ie: multiple sockets)\n\nIf you want to namespace all the messages and events emitted to a particular\nendpoint, simply specify it as part of the `connect` uri:\n\n```js\nvar chat = io.connect('http://localhost/chat');\nchat.on('connect', function () {\n // chat socket connected\n});\n\nvar news = io.connect('/news'); // io.connect auto-detects host\nnews.on('connect', function () {\n // news socket connected\n});\n```\n\n#### Emitting custom events\n\nTo ease with the creation of applications, you can emit custom events outside\nof the global `message` event.\n\n```js\nvar socket = io.connect();\nsocket.emit('server custom event', { my: 'data' });\n```\n\n#### Forcing disconnection\n\n```js\nvar socket = io.connect();\nsocket.on('connect', function () {\n socket.disconnect();\n});\n```\n\n### Documentation \n\n#### io#connect\n\n```js\nio.connect(uri, [options]);\n```\n\n##### Options:\n\n- *resource*\n\n socket.io\n\n The resource is what allows the `socket.io` server to identify incoming connections by `socket.io` clients. In other words, any HTTP server can implement socket.io and still serve other normal, non-realtime HTTP requests.\n\n- *transports*\n\n```js\n['websocket', 'flashsocket', 'htmlfile', 'xhr-multipart', 'xhr-polling', 'jsonp-polling']\n```\n\n A list of the transports to attempt to utilize (in order of preference).\n\n- *'connect timeout'*\n\n```js\n5000\n```\n\n The amount of milliseconds a transport has to create a connection before we consider it timed out.\n \n- *'try multiple transports'*\n\n```js\ntrue\n```\n\n A boolean indicating if we should try other transports when the connectTimeout occurs.\n \n- *reconnect*\n\n```js\ntrue\n```\n\n A boolean indicating if we should automatically reconnect if a connection is disconnected. \n \n- *'reconnection delay'*\n\n```js\n500\n```\n\n The amount of milliseconds before we try to connect to the server again. We are using a exponential back off algorithm for the following reconnections, on each reconnect attempt this value will get multiplied (500 > 1000 > 2000 > 4000 > 8000).\n \n\n- *'max reconnection attempts'*\n\n```js\n10\n```\n\n The amount of attempts should we make using the current transport to connect to the server? After this we will do one final attempt, and re-try with all enabled transport methods before we give up.\n\n##### Properties:\n\n- *options*\n\n The passed in options combined with the defaults.\n\n- *connected*\n\n Whether the socket is connected or not.\n \n- *connecting*\n\n Whether the socket is connecting or not.\n\n- *reconnecting*\n\n Whether we are reconnecting or not.\n \n- *transport* \n\n The transport instance.\n\n##### Methods:\n \n- *connect(λ)*\n\n Establishes a connection. If λ is supplied as argument, it will be called once the connection is established.\n \n- *send(message)*\n \n A string of data to send.\n \n- *disconnect*\n\n Closes the connection.\n \n- *on(event, λ)*\n\n Adds a listener for the event *event*.\n\n- *once(event, λ)*\n\n Adds a one time listener for the event *event*. The listener is removed after the first time the event is fired.\n \n- *removeListener(event, λ)*\n\n Removes the listener λ for the event *event*.\n \n##### Events:\n\n- *connect*\n\n Fired when the connection is established and the handshake successful.\n \n- *connecting(transport_type)*\n\n Fired when a connection is attempted, passing the transport name.\n \n- *connect_failed*\n\n Fired when the connection timeout occurs after the last connection attempt.\n This only fires if the `connectTimeout` option is set.\n If the `tryTransportsOnConnectTimeout` option is set, this only fires once all\n possible transports have been tried.\n \n- *message(message)*\n \n Fired when a message arrives from the server\n\n- *close*\n\n Fired when the connection is closed. Be careful with using this event, as some transports will fire it even under temporary, expected disconnections (such as XHR-Polling).\n \n- *disconnect*\n\n Fired when the connection is considered disconnected.\n \n- *reconnect(transport_type,reconnectionAttempts)*\n\n Fired when the connection has been re-established. This only fires if the `reconnect` option is set.\n\n- *reconnecting(reconnectionDelay,reconnectionAttempts)*\n\n Fired when a reconnection is attempted, passing the next delay for the next reconnection.\n\n- *reconnect_failed*\n\n Fired when all reconnection attempts have failed and we where unsuccessful in reconnecting to the server. \n\n### Contributors\n\nGuillermo Rauch <guillermo@learnboost.com>\n\nArnout Kazemier <info@3rd-eden.com>\n\n### License \n\n(The MIT License)\n\nCopyright (c) 2010 LearnBoost <dev@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/LearnBoost/socket.io-client/issues" - }, - "_id": "socket.io-client@0.9.16", - "_from": "socket.io-client@0.9.16" -} diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/events.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/events.test.js deleted file mode 100644 index 365c4223..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/events.test.js +++ /dev/null @@ -1,120 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - module.exports = { - - 'add listeners': function () { - var event = new io.EventEmitter - , calls = 0; - - event.on('test', function (a, b) { - ++calls; - a.should().eql('a'); - b.should().eql('b'); - }); - - event.emit('test', 'a', 'b'); - calls.should().eql(1); - event.on.should().eql(event.addListener); - }, - - 'remove listener': function () { - var event = new io.EventEmitter; - function empty () { } - - event.on('test', empty); - event.on('test:more', empty); - event.removeAllListeners('test'); - - event.listeners('test').should().eql([]); - event.listeners('test:more').should().eql([empty]); - }, - - 'remove all listeners with no arguments': function () { - var event = new io.EventEmitter; - function empty () { } - - event.on('test', empty); - event.on('test:more', empty); - event.removeAllListeners(); - - event.listeners('test').should().eql([]); - event.listeners('test:more').should().eql([]); - }, - - 'remove listeners functions': function () { - var event = new io.EventEmitter - , calls = 0; - - function one () { ++calls } - function two () { ++calls } - function three () { ++calls } - - event.on('one', one); - event.removeListener('one', one); - event.listeners('one').should().eql([]); - - event.on('two', two); - event.removeListener('two', one); - event.listeners('two').should().eql([two]); - - event.on('three', three); - event.on('three', two); - event.removeListener('three', three); - event.listeners('three').should().eql([two]); - }, - - 'number of arguments': function () { - var event = new io.EventEmitter - , number = []; - - event.on('test', function () { - number.push(arguments.length); - }); - - event.emit('test'); - event.emit('test', null); - event.emit('test', null, null); - event.emit('test', null, null, null); - event.emit('test', null, null, null, null); - event.emit('test', null, null, null, null, null); - - [0, 1, 2, 3, 4, 5].should().eql(number); - }, - - 'once': function () { - var event = new io.EventEmitter - , calls = 0; - - event.once('test', function (a, b) { - ++calls; - }); - - event.emit('test', 'a', 'b'); - event.emit('test', 'a', 'b'); - event.emit('test', 'a', 'b'); - - function removed () { - should().fail('not removed'); - }; - - event.once('test:removed', removed); - event.removeListener('test:removed', removed); - event.emit('test:removed'); - - calls.should().eql(1); - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should || !should.fail ? require('should') : should -); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js deleted file mode 100644 index d9f0b09e..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/io.test.js +++ /dev/null @@ -1,31 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - module.exports = { - - 'client version number': function () { - io.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/); - }, - - 'socket.io protocol version': function () { - io.protocol.should().be.a('number'); - io.protocol.toString().should().match(/^\d+$/); - }, - - 'socket.io available transports': function () { - (io.transports.length > 0).should().be_true; - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should') : should -); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js deleted file mode 100644 index fa8d46ed..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.common.js +++ /dev/null @@ -1,102 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -var vm = require('vm') - , should = require('should'); - -/** - * Generates evn variables for the vm so we can `emulate` a browser. - * @returns {Object} evn variables - */ - -exports.env = function env () { - var details = { - location: { - port: 8080 - , host: 'www.example.org' - , hostname: 'www.example.org' - , href: 'http://www.example.org/example/' - , pathname: '/example/' - , protocol: 'http:' - , search: '' - , hash: '' - } - , console: { - log: function(){}, - info: function(){}, - warn: function(){}, - error: function(){} - } - , navigator: { - userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_7) AppleWebKit' - + '/534.27 (KHTML, like Gecko) Chrome/12.0.716.0 Safari/534.27' - , appName: 'socket.io' - , platform: process.platform - , appVersion: process.version - , } - , name: 'socket.io' - , innerWidth: 1024 - , innerHeight: 768 - , length: 1 - , outerWidth: 1024 - , outerHeight: 768 - , pageXOffset: 0 - , pageYOffset: 0 - , screenX: 0 - , screenY: 0 - , screenLeft: 0 - , screenTop: 0 - , scrollX: 0 - , scrollY: 0 - , scrollTop: 0 - , scrollLeft: 0 - , screen: { - width: 0 - , height: 0 - } - }; - - // circular references - details.window = details.self = details.contentWindow = details; - - // callable methods - details.Image = details.scrollTo = details.scrollBy = details.scroll = - details.resizeTo = details.resizeBy = details.prompt = details.print = - details.open = details.moveTo = details.moveBy = details.focus = - details.createPopup = details.confirm = details.close = details.blur = - details.alert = details.clearTimeout = details.clearInterval = - details.setInterval = details.setTimeout = details.XMLHttpRequest = - details.getComputedStyle = details.trigger = details.dispatchEvent = - details.removeEventListener = details.addEventListener = function(){}; - - // frames - details.frames = [details]; - - // document - details.document = details; - details.document.domain = details.location.href; - - return details; -}; - -/** - * Executes a script in a browser like env and returns - * the result - * - * @param {String} contents The script content - * @returns {Object} The evaluated script. - */ - -exports.execute = function execute (contents) { - var env = exports.env() - , script = vm.createScript(contents); - - // run the script with `browser like` globals - script.runInNewContext(env); - - return env; -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.test.js deleted file mode 100644 index 989e2bc5..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/node/builder.test.js +++ /dev/null @@ -1,131 +0,0 @@ -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -/** - * Test dependencies. - */ - -var builder = require('../../bin/builder') - , common = require('./builder.common') - , should = require('should'); - -/** - * Tests. - */ - -module.exports = { - - 'version number': function () { - builder.version.should().match(/([0-9]+)\.([0-9]+)\.([0-9]+)/); - builder.version.should().equal(require('../../lib/io').version); - }, - - 'production build LOC': function () { - builder(function (err, result) { - should.strictEqual(err, null) - - var lines = result.split('\n'); - lines.length.should().be.below(5); - lines[0].should().match(/production/gi); - Buffer.byteLength(result).should().be.below(43000); - }); - }, - - 'development build LOC': function () { - builder({ minify: false }, function (err, result) { - should.strictEqual(err, null) - - var lines = result.split('\n'); - lines.length.should().be.above(5); - lines[0].should().match(/development/gi); - Buffer.byteLength(result).should().be.above(35000); - }); - }, - - 'default builds': function () { - builder(function (err, result) { - should.strictEqual(err, null); - - var io = common.execute(result).io - , transports = Object.keys(io.Transport) - , defaults = Object.keys(builder.transports); - - /* XHR transport is private, but still available */ - transports.length.should().be.equal(defaults.length + 1); - - defaults.forEach(function (transport) { - transports.indexOf(transport).should().be.above(-1); - }) - }); - }, - - 'custom build': function () { - builder(['websocket'], function (err, result) { - should.strictEqual(err, null); - - var io = common.execute(result).io - , transports = Object.keys(io.Transport); - - transports.should().have.length(1); - transports[0].should().eql('websocket'); - }); - }, - - 'custom code': function () { - var custom = 'var hello = "world";'; - builder({ custom: [custom], minify: false }, function (err, result) { - should.strictEqual(err, null); - - result.should().include.string(custom); - }); - }, - - 'node if': function () { - var custom = '// if node \nvar hello = "world";\n' - + '// end node\nvar pew = "pew";'; - - builder({ custom: [custom], minify: false }, function (err, result) { - should.strictEqual(err, null); - - result.should().not.include.string(custom); - result.should().not.include.string('// if node'); - result.should().not.include.string('// end node'); - result.should().not.include.string('"world"'); - - result.should().include.string('var pew = "pew"'); - }); - }, - - 'preserve the encoding during minification': function () { - builder(function (err, result) { - should.strictEqual(err, null); - - result.should().match(/(\\ufffd)/g); - }) - }, - - 'globals': function () { - builder(function (err, result) { - should.strictEqual(err, null); - - var io = common.execute(result) - , env = common.env() - , allowed = ['io', 'swfobject', 'WEB_SOCKET_DISABLE_AUTO_INITIALIZATION']; - - Array.prototype.push.apply(allowed, Object.keys(env)); - - Object.keys(io).forEach(function (global) { - var index = allowed.indexOf(global); - - // the global is not allowed! - if (!~index) { - throw new Error('Global leak: ' + global); - } - }); - }) - } - -}; diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/parser.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/parser.test.js deleted file mode 100644 index 0022afb2..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/parser.test.js +++ /dev/null @@ -1,360 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - var parser = io.parser; - - module.exports = { - - 'decoding error packet': function () { - parser.decodePacket('7:::').should().eql({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '' - }); - }, - - 'decoding error packet with reason': function () { - parser.decodePacket('7:::0').should().eql({ - type: 'error' - , reason: 'transport not supported' - , advice: '' - , endpoint: '' - }); - }, - - 'decoding error packet with reason and advice': function () { - parser.decodePacket('7:::2+0').should().eql({ - type: 'error' - , reason: 'unauthorized' - , advice: 'reconnect' - , endpoint: '' - }); - }, - - 'decoding error packet with endpoint': function () { - parser.decodePacket('7::/woot').should().eql({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '/woot' - }); - }, - - 'decoding ack packet': function () { - parser.decodePacket('6:::140').should().eql({ - type: 'ack' - , ackId: '140' - , endpoint: '' - , args: [] - }); - }, - - 'decoding ack packet with args': function () { - parser.decodePacket('6:::12+["woot","wa"]').should().eql({ - type: 'ack' - , ackId: '12' - , endpoint: '' - , args: ['woot', 'wa'] - }); - }, - - 'decoding ack packet with bad json': function () { - var thrown = false; - - try { - parser.decodePacket('6:::1+{"++]').should().eql({ - type: 'ack' - , ackId: '1' - , endpoint: '' - , args: [] - }); - } catch (e) { - thrown = true; - } - - thrown.should().be_false; - }, - - 'decoding json packet': function () { - parser.decodePacket('4:::"2"').should().eql({ - type: 'json' - , endpoint: '' - , data: '2' - }); - }, - - 'decoding json packet with message id and ack data': function () { - parser.decodePacket('4:1+::{"a":"b"}').should().eql({ - type: 'json' - , id: 1 - , ack: 'data' - , endpoint: '' - , data: { a: 'b' } - }); - }, - - 'decoding an event packet': function () { - parser.decodePacket('5:::{"name":"woot"}').should().eql({ - type: 'event' - , name: 'woot' - , endpoint: '' - , args: [] - }); - }, - - 'decoding an event packet with message id and ack': function () { - parser.decodePacket('5:1+::{"name":"tobi"}').should().eql({ - type: 'event' - , id: 1 - , ack: 'data' - , endpoint: '' - , name: 'tobi' - , args: [] - }); - }, - - 'decoding an event packet with data': function () { - parser.decodePacket('5:::{"name":"edwald","args":[{"a": "b"},2,"3"]}') - .should().eql({ - type: 'event' - , name: 'edwald' - , endpoint: '' - , args: [{a: 'b'}, 2, '3'] - }); - }, - - 'decoding a message packet': function () { - parser.decodePacket('3:::woot').should().eql({ - type: 'message' - , endpoint: '' - , data: 'woot' - }); - }, - - 'decoding a message packet with id and endpoint': function () { - parser.decodePacket('3:5:/tobi').should().eql({ - type: 'message' - , id: 5 - , ack: true - , endpoint: '/tobi' - , data: '' - }); - }, - - 'decoding a heartbeat packet': function () { - parser.decodePacket('2:::').should().eql({ - type: 'heartbeat' - , endpoint: '' - }); - }, - - 'decoding a connection packet': function () { - parser.decodePacket('1::/tobi').should().eql({ - type: 'connect' - , endpoint: '/tobi' - , qs: '' - }); - }, - - 'decoding a connection packet with query string': function () { - parser.decodePacket('1::/test:?test=1').should().eql({ - type: 'connect' - , endpoint: '/test' - , qs: '?test=1' - }); - }, - - 'decoding a disconnection packet': function () { - parser.decodePacket('0::/woot').should().eql({ - type: 'disconnect' - , endpoint: '/woot' - }); - }, - - 'encoding error packet': function () { - parser.encodePacket({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '' - }).should().eql('7::'); - }, - - 'encoding error packet with reason': function () { - parser.encodePacket({ - type: 'error' - , reason: 'transport not supported' - , advice: '' - , endpoint: '' - }).should().eql('7:::0'); - }, - - 'encoding error packet with reason and advice': function () { - parser.encodePacket({ - type: 'error' - , reason: 'unauthorized' - , advice: 'reconnect' - , endpoint: '' - }).should().eql('7:::2+0'); - }, - - 'encoding error packet with endpoint': function () { - parser.encodePacket({ - type: 'error' - , reason: '' - , advice: '' - , endpoint: '/woot' - }).should().eql('7::/woot'); - }, - - 'encoding ack packet': function () { - parser.encodePacket({ - type: 'ack' - , ackId: '140' - , endpoint: '' - , args: [] - }).should().eql('6:::140'); - }, - - 'encoding ack packet with args': function () { - parser.encodePacket({ - type: 'ack' - , ackId: '12' - , endpoint: '' - , args: ['woot', 'wa'] - }).should().eql('6:::12+["woot","wa"]'); - }, - - 'encoding json packet': function () { - parser.encodePacket({ - type: 'json' - , endpoint: '' - , data: '2' - }).should().eql('4:::"2"'); - }, - - 'encoding json packet with message id and ack data': function () { - parser.encodePacket({ - type: 'json' - , id: 1 - , ack: 'data' - , endpoint: '' - , data: { a: 'b' } - }).should().eql('4:1+::{"a":"b"}'); - }, - - 'encoding an event packet': function () { - parser.encodePacket({ - type: 'event' - , name: 'woot' - , endpoint: '' - , args: [] - }).should().eql('5:::{"name":"woot"}'); - }, - - 'encoding an event packet with message id and ack': function () { - parser.encodePacket({ - type: 'event' - , id: 1 - , ack: 'data' - , endpoint: '' - , name: 'tobi' - , args: [] - }).should().eql('5:1+::{"name":"tobi"}'); - }, - - 'encoding an event packet with data': function () { - parser.encodePacket({ - type: 'event' - , name: 'edwald' - , endpoint: '' - , args: [{a: 'b'}, 2, '3'] - }).should().eql('5:::{"name":"edwald","args":[{"a":"b"},2,"3"]}'); - }, - - 'encoding a message packet': function () { - parser.encodePacket({ - type: 'message' - , endpoint: '' - , data: 'woot' - }).should().eql('3:::woot'); - }, - - 'encoding a message packet with id and endpoint': function () { - parser.encodePacket({ - type: 'message' - , id: 5 - , ack: true - , endpoint: '/tobi' - , data: '' - }).should().eql('3:5:/tobi'); - }, - - 'encoding a heartbeat packet': function () { - parser.encodePacket({ - type: 'heartbeat' - , endpoint: '' - }).should().eql('2::'); - }, - - 'encoding a connection packet': function () { - parser.encodePacket({ - type: 'connect' - , endpoint: '/tobi' - , qs: '' - }).should().eql('1::/tobi'); - }, - - 'encoding a connection packet with query string': function () { - parser.encodePacket({ - type: 'connect' - , endpoint: '/test' - , qs: '?test=1' - }).should().eql('1::/test:?test=1'); - }, - - 'encoding a disconnection packet': function () { - parser.encodePacket({ - type: 'disconnect' - , endpoint: '/woot' - }).should().eql('0::/woot'); - }, - - 'test decoding a payload': function () { - parser.decodePayload('\ufffd5\ufffd3:::5\ufffd7\ufffd3:::53d' - + '\ufffd3\ufffd0::').should().eql([ - { type: 'message', data: '5', endpoint: '' } - , { type: 'message', data: '53d', endpoint: '' } - , { type: 'disconnect', endpoint: '' } - ]); - }, - - 'test encoding a payload': function () { - parser.encodePayload([ - parser.encodePacket({ type: 'message', data: '5', endpoint: '' }) - , parser.encodePacket({ type: 'message', data: '53d', endpoint: '' }) - ]).should().eql('\ufffd5\ufffd3:::5\ufffd7\ufffd3:::53d') - }, - - 'test decoding newline': function () { - parser.decodePacket('3:::\n').should().eql({ - type: 'message' - , endpoint: '' - , data: '\n' - }); - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should') : should -); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/socket.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/socket.test.js deleted file mode 100644 index eae49564..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/socket.test.js +++ /dev/null @@ -1,422 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - if ('object' == typeof global) { - return module.exports = { '': function () {} }; - } - - module.exports = { - - 'test connecting the socket and disconnecting': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.disconnect(); - next(); - }); - }, - - 'test receiving messages': function (next) { - var socket = create() - , connected = false - , messages = 0; - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - connected = true; - }); - - socket.on('message', function (i) { - String(++messages).should().equal(i); - }); - - socket.on('disconnect', function (reason) { - connected.should().be_true; - messages.should().equal(3); - reason.should().eql('booted'); - next(); - }); - }, - - 'test sending messages': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.send('echo'); - - socket.on('message', function (msg) { - msg.should().equal('echo'); - socket.disconnect(); - next(); - }); - }); - }, - - 'test manual buffer flushing': function (next) { - var socket = create(); - - socket.socket.options['manualFlush'] = true; - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.socket.connected = false; - socket.send('buffered'); - socket.socket.onConnect(); - socket.socket.flushBuffer(); - - socket.on('message', function (msg) { - msg.should().equal('buffered'); - socket.disconnect(); - next(); - }); - }); - }, - - 'test automatic buffer flushing': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.socket.connected = false; - socket.send('buffered'); - socket.socket.onConnect(); - - socket.on('message', function (msg) { - msg.should().equal('buffered'); - socket.disconnect(); - next(); - }); - }); - }, - - 'test acks sent from client': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.on('message', function (msg) { - if ('tobi 2' == msg) { - socket.disconnect(); - next(); - } - }); - }); - }, - - 'test acks sent from server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.send('ooo', function () { - socket.disconnect(); - next(); - }); - }); - }, - - 'test connecting to namespaces': function (next) { - var io = create() - , socket = io.socket - , namespaces = 2 - , connect = 0; - - function finish () { - socket.of('').disconnect(); - connect.should().equal(3); - next(); - } - - socket.on('connect', function(){ - connect++; - }); - - socket.of('/woot').on('connect', function () { - connect++; - }).on('message', function (msg) { - msg.should().equal('connected to woot'); - --namespaces || finish(); - }).on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.of('/chat').on('connect', function () { - connect++; - }).on('message', function (msg) { - msg.should().equal('connected to chat'); - --namespaces || finish(); - }).on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - }, - - 'test disconnecting from namespaces': function (next) { - var socket = create().socket - , namespaces = 2 - , disconnections = 0; - - function finish () { - socket.of('').disconnect(); - next(); - }; - - socket.of('/a').on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.of('/a').on('connect', function () { - socket.of('/a').disconnect(); - }); - - socket.of('/a').on('disconnect', function () { - --namespaces || finish(); - }); - - socket.of('/b').on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.of('/b').on('connect', function () { - socket.of('/b').disconnect(); - }); - - socket.of('/b').on('disconnect', function () { - --namespaces || finish(); - }); - }, - - 'test authorizing for namespaces': function (next) { - var socket = create().socket - - function finish () { - socket.of('').disconnect(); - next(); - }; - - socket.of('/a') - .on('connect_failed', function (msg) { - next(); - }) - .on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - }, - - 'test sending json from server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('message', function (msg) { - msg.should().eql(3141592); - socket.disconnect(); - next(); - }); - }, - - 'test sending json from client': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.json.send([1, 2, 3]); - socket.on('message', function (msg) { - msg.should().equal('echo'); - socket.disconnect(); - next(); - }); - }, - - 'test emitting an event from server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('woot', function () { - socket.disconnect(); - next(); - }); - }, - - 'test emitting an event to server': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.emit('woot'); - socket.on('echo', function () { - socket.disconnect(); - next(); - }) - }, - - 'test emitting multiple events at once to the server': function (next) { - var socket = create(); - - socket.on('connect', function () { - socket.emit('print', 'foo'); - socket.emit('print', 'bar'); - }); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test emitting an event from server and sending back data': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('woot', function (a, fn) { - a.should().eql(1); - fn('test'); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }); - }, - - 'test emitting an event to server and sending back data': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.emit('tobi', 1, 2, function (a) { - a.should().eql({ hello: 'world' }); - socket.disconnect(); - next(); - }); - }, - - 'test encoding a payload': function (next) { - var socket = create('/woot'); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('connect', function () { - socket.socket.setBuffer(true); - socket.send('ñ'); - socket.send('ñ'); - socket.send('ñ'); - socket.send('ñ'); - socket.socket.setBuffer(false); - }); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test sending query strings to the server': function (next) { - var socket = create('?foo=bar'); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.on('message', function (data) { - data.query.foo.should().eql('bar'); - - socket.disconnect(); - next(); - }); - }, - - 'test sending newline': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.send('\n'); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test sending unicode': function (next) { - var socket = create(); - - socket.on('error', function (msg) { - throw new Error(msg || 'Received an error'); - }); - - socket.json.send({ test: "☃" }); - - socket.on('done', function () { - socket.disconnect(); - next(); - }); - }, - - 'test webworker connection': function (next) { - if (!window.Worker) { - return next(); - } - - var worker = new Worker('/test/worker.js'); - worker.postMessage(uri()); - worker.onmessage = function (ev) { - if ('done!' == ev.data) return next(); - throw new Error('Unexpected message: ' + ev.data); - } - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should-browser') : should -); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/util.test.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/util.test.js deleted file mode 100644 index 30db5a63..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/util.test.js +++ /dev/null @@ -1,156 +0,0 @@ - -/*! - * socket.io-node - * Copyright(c) 2011 LearnBoost - * MIT Licensed - */ - -(function (module, io, should) { - - module.exports = { - - 'parse uri': function () { - var http = io.util.parseUri('http://google.com') - , https = io.util.parseUri('https://www.google.com:80') - , query = io.util.parseUri('google.com:8080/foo/bar?foo=bar'); - - http.protocol.should().eql('http'); - http.port.should().eql(''); - http.host.should().eql('google.com'); - https.protocol.should().eql('https'); - https.port.should().eql('80'); - https.host.should().eql('www.google.com'); - query.port.should().eql('8080'); - query.query.should().eql('foo=bar'); - query.path.should().eql('/foo/bar'); - query.relative.should().eql('/foo/bar?foo=bar'); - }, - - 'unique uri': function () { - var protocol = io.util.parseUri('http://google.com') - , noprotocol = io.util.parseUri('google.com') - , https = io.util.parseUri('https://google.com') - , path = io.util.parseUri('https://google.com/google.com/com/?foo=bar'); - - if ('object' == typeof window) { - io.util.uniqueUri(protocol).should().eql('http://google.com:3000'); - io.util.uniqueUri(noprotocol).should().eql('http://google.com:3000'); - } else { - io.util.uniqueUri(protocol).should().eql('http://google.com:80'); - io.util.uniqueUri(noprotocol).should().eql('http://google.com:80'); - } - - io.util.uniqueUri(https).should().eql('https://google.com:443'); - io.util.uniqueUri(path).should().eql('https://google.com:443'); - }, - - 'chunk query string': function () { - io.util.chunkQuery('foo=bar').should().be.a('object'); - io.util.chunkQuery('foo=bar').foo.should().eql('bar'); - }, - - 'merge query strings': function () { - var base = io.util.query('foo=bar', 'foo=baz') - , add = io.util.query('foo=bar', 'bar=foo') - - base.should().eql('?foo=baz'); - add.should().eql('?foo=bar&bar=foo'); - - io.util.query('','').should().eql(''); - io.util.query('foo=bar', '').should().eql('?foo=bar'); - io.util.query('', 'foo=bar').should().eql('?foo=bar'); - }, - - 'request': function () { - var type = typeof io.util.request(); - type.should().eql('object'); - }, - - 'is array': function () { - io.util.isArray([]).should().be_true; - io.util.isArray({}).should().be_false; - io.util.isArray('str').should().be_false; - io.util.isArray(new Date).should().be_false; - io.util.isArray(true).should().be_false; - io.util.isArray(arguments).should().be_false; - }, - - 'merge, deep merge': function () { - var start = { - foo: 'bar' - , bar: 'baz' - } - , duplicate = { - foo: 'foo' - , bar: 'bar' - } - , extra = { - ping: 'pong' - } - , deep = { - level1:{ - foo: 'bar' - , level2: { - foo: 'bar' - , level3:{ - foo: 'bar' - , rescursive: deep - } - } - } - } - // same structure, but changed names - , deeper = { - foo: 'bar' - , level1:{ - foo: 'baz' - , level2: { - foo: 'foo' - , level3:{ - foo: 'pewpew' - , rescursive: deep - } - } - } - }; - - io.util.merge(start, duplicate); - - start.foo.should().eql('foo'); - start.bar.should().eql('bar'); - - io.util.merge(start, extra); - start.ping.should().eql('pong'); - start.foo.should().eql('foo'); - - io.util.merge(deep, deeper); - - deep.foo.should().eql('bar'); - deep.level1.foo.should().eql('baz'); - deep.level1.level2.foo.should().eql('foo'); - deep.level1.level2.level3.foo.should().eql('pewpew'); - }, - - 'defer': function (next) { - var now = +new Date; - - io.util.defer(function () { - ((new Date - now) >= ( io.util.webkit ? 100 : 0 )).should().be_true(); - next(); - }) - }, - - 'indexOf': function () { - var data = ['socket', 2, 3, 4, 'socket', 5, 6, 7, 'io']; - io.util.indexOf(data, 'socket', 1).should().eql(4); - io.util.indexOf(data, 'socket').should().eql(0); - io.util.indexOf(data, 'waffles').should().eql(-1); - } - - }; - -})( - 'undefined' == typeof module ? module = {} : module - , 'undefined' == typeof io ? require('socket.io-client') : io - , 'undefined' == typeof should ? require('should') : should -); diff --git a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/worker.js b/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/worker.js deleted file mode 100644 index c5426326..00000000 --- a/node_modules/karma/node_modules/socket.io/node_modules/socket.io-client/test/worker.js +++ /dev/null @@ -1,20 +0,0 @@ -importScripts('/socket.io/socket.io.js'); - -self.onmessage = function (ev) { - var url = ev.data - , socket = io.connect(url); - - socket.on('done', function () { - self.postMessage('done!'); - }); - - socket.on('connect_failed', function () { - self.postMessage('connect failed'); - }); - - socket.on('error', function () { - self.postMessage('error'); - }); - - socket.send('woot'); -} diff --git a/node_modules/karma/node_modules/socket.io/package.json b/node_modules/karma/node_modules/socket.io/package.json deleted file mode 100644 index 17428b02..00000000 --- a/node_modules/karma/node_modules/socket.io/package.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "socket.io", - "version": "0.9.16", - "description": "Real-time apps made cross-browser & easy with a WebSocket-like API", - "homepage": "http://socket.io", - "keywords": [ - "websocket", - "socket", - "realtime", - "socket.io", - "comet", - "ajax" - ], - "author": { - "name": "Guillermo Rauch", - "email": "guillermo@learnboost.com" - }, - "contributors": [ - { - "name": "Guillermo Rauch", - "email": "rauchg@gmail.com" - }, - { - "name": "Arnout Kazemier", - "email": "info@3rd-eden.com" - }, - { - "name": "Vladimir Dronnikov", - "email": "dronnikov@gmail.com" - }, - { - "name": "Einar Otto Stangvik", - "email": "einaros@gmail.com" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/LearnBoost/socket.io.git" - }, - "dependencies": { - "socket.io-client": "0.9.16", - "policyfile": "0.0.4", - "base64id": "0.1.0", - "redis": "0.7.3" - }, - "devDependencies": { - "expresso": "0.9.2", - "should": "*", - "benchmark": "0.2.2", - "microtime": "0.1.3-1", - "colors": "0.5.1" - }, - "optionalDependencies": { - "redis": "0.7.3" - }, - "main": "index", - "engines": { - "node": ">= 0.4.0" - }, - "scripts": { - "test": "make test" - }, - "readme": "# Socket.IO\n\nSocket.IO is a Node.JS project that makes WebSockets and realtime possible in\nall browsers. It also enhances WebSockets by providing built-in multiplexing,\nhorizontal scalability, automatic JSON encoding/decoding, and more.\n\n## How to Install\n\n```bash\nnpm install socket.io\n```\n\n## How to use\n\nFirst, require `socket.io`:\n\n```js\nvar io = require('socket.io');\n```\n\nNext, attach it to a HTTP/HTTPS server. If you're using the fantastic `express`\nweb framework:\n\n#### Express 3.x\n\n```js\nvar app = express()\n , server = require('http').createServer(app)\n , io = io.listen(server);\n\nserver.listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.emit('news', { hello: 'world' });\n socket.on('my other event', function (data) {\n console.log(data);\n });\n});\n```\n\n#### Express 2.x\n\n```js\nvar app = express.createServer()\n , io = io.listen(app);\n\napp.listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.emit('news', { hello: 'world' });\n socket.on('my other event', function (data) {\n console.log(data);\n });\n});\n```\n\nFinally, load it from the client side code:\n\n```html\n\n\n```\n\nFor more thorough examples, look at the `examples/` directory.\n\n## Short recipes\n\n### Sending and receiving events.\n\nSocket.IO allows you to emit and receive custom events.\nBesides `connect`, `message` and `disconnect`, you can emit custom events:\n\n```js\n// note, io.listen() will create a http server for you\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n io.sockets.emit('this', { will: 'be received by everyone' });\n\n socket.on('private message', function (from, msg) {\n console.log('I received a private message by ', from, ' saying ', msg);\n });\n\n socket.on('disconnect', function () {\n io.sockets.emit('user disconnected');\n });\n});\n```\n\n### Storing data associated to a client\n\nSometimes it's necessary to store data associated with a client that's\nnecessary for the duration of the session.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.on('set nickname', function (name) {\n socket.set('nickname', name, function () { socket.emit('ready'); });\n });\n\n socket.on('msg', function () {\n socket.get('nickname', function (err, name) {\n console.log('Chat message by ', name);\n });\n });\n});\n```\n\n#### Client side\n\n```html\n\n```\n\n### Restricting yourself to a namespace\n\nIf you have control over all the messages and events emitted for a particular\napplication, using the default `/` namespace works.\n\nIf you want to leverage 3rd-party code, or produce code to share with others,\nsocket.io provides a way of namespacing a `socket`.\n\nThis has the benefit of `multiplexing` a single connection. Instead of\nsocket.io using two `WebSocket` connections, it'll use one.\n\nThe following example defines a socket that listens on '/chat' and one for\n'/news':\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nvar chat = io\n .of('/chat')\n .on('connection', function (socket) {\n socket.emit('a message', { that: 'only', '/chat': 'will get' });\n chat.emit('a message', { everyone: 'in', '/chat': 'will get' });\n });\n\nvar news = io\n .of('/news');\n .on('connection', function (socket) {\n socket.emit('item', { news: 'item' });\n });\n```\n\n#### Client side:\n\n```html\n\n```\n\n### Sending volatile messages.\n\nSometimes certain messages can be dropped. Let's say you have an app that\nshows realtime tweets for the keyword `bieber`. \n\nIf a certain client is not ready to receive messages (because of network slowness\nor other issues, or because he's connected through long polling and is in the\nmiddle of a request-response cycle), if he doesn't receive ALL the tweets related\nto bieber your application won't suffer.\n\nIn that case, you might want to send those messages as volatile messages.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n var tweets = setInterval(function () {\n getBieberTweet(function (tweet) {\n socket.volatile.emit('bieber tweet', tweet);\n });\n }, 100);\n\n socket.on('disconnect', function () {\n clearInterval(tweets);\n });\n});\n```\n\n#### Client side\n\nIn the client side, messages are received the same way whether they're volatile\nor not.\n\n### Getting acknowledgements\n\nSometimes, you might want to get a callback when the client confirmed the message\nreception.\n\nTo do this, simply pass a function as the last parameter of `.send` or `.emit`.\nWhat's more, when you use `.emit`, the acknowledgement is done by you, which\nmeans you can also pass data along:\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.on('ferret', function (name, fn) {\n fn('woot');\n });\n});\n```\n\n#### Client side\n\n```html\n\n```\n\n### Broadcasting messages\n\nTo broadcast, simply add a `broadcast` flag to `emit` and `send` method calls.\nBroadcasting means sending a message to everyone else except for the socket\nthat starts it.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.broadcast.emit('user connected');\n socket.broadcast.json.send({ a: 'message' });\n});\n```\n\n### Rooms\n\nSometimes you want to put certain sockets in the same room, so that it's easy\nto broadcast to all of them together.\n\nThink of this as built-in channels for sockets. Sockets `join` and `leave`\nrooms in each socket.\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.join('justin bieber fans');\n socket.broadcast.to('justin bieber fans').emit('new fan');\n io.sockets.in('rammstein fans').emit('new non-fan');\n});\n```\n\n### Using it just as a cross-browser WebSocket\n\nIf you just want the WebSocket semantics, you can do that too.\nSimply leverage `send` and listen on the `message` event:\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.sockets.on('connection', function (socket) {\n socket.on('message', function () { });\n socket.on('disconnect', function () { });\n});\n```\n\n#### Client side\n\n```html\n\n```\n\n### Changing configuration\n\nConfiguration in socket.io is TJ-style:\n\n#### Server side\n\n```js\nvar io = require('socket.io').listen(80);\n\nio.configure(function () {\n io.set('transports', ['websocket', 'flashsocket', 'xhr-polling']);\n});\n\nio.configure('development', function () {\n io.set('transports', ['websocket', 'xhr-polling']);\n io.enable('log');\n});\n```\n\n## License \n\n(The MIT License)\n\nCopyright (c) 2011 Guillermo Rauch <guillermo@learnboost.com>\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n'Software'), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n", - "readmeFilename": "Readme.md", - "bugs": { - "url": "https://github.com/LearnBoost/socket.io/issues" - }, - "_id": "socket.io@0.9.16", - "_from": "socket.io@~0.9.13" -} diff --git a/node_modules/karma/node_modules/useragent/.npmignore b/node_modules/karma/node_modules/useragent/.npmignore deleted file mode 100644 index ad02c133..00000000 --- a/node_modules/karma/node_modules/useragent/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -tests -benchmark -node_modules diff --git a/node_modules/karma/node_modules/useragent/.travis.yml b/node_modules/karma/node_modules/useragent/.travis.yml deleted file mode 100644 index 6875969f..00000000 --- a/node_modules/karma/node_modules/useragent/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: node_js -node_js: - - 0.7 - - 0.8 diff --git a/node_modules/karma/node_modules/useragent/CHANGELOG.md b/node_modules/karma/node_modules/useragent/CHANGELOG.md deleted file mode 100644 index 9262b3c7..00000000 --- a/node_modules/karma/node_modules/useragent/CHANGELOG.md +++ /dev/null @@ -1,63 +0,0 @@ -## Version 2.0 -* __v2.0.0__ *breaking* - - Added support for Operating System version parsing - - Added support for Device parsing - - Introduced deferred OnDemand parsing for Operating and Devices - - The `Agent#toJSON` method now returns an object instread of JSON string. Use - `JSON.stringify(agent)` instead. - - Removed the fromAgent method - - semver is removed from the dependencies, if you use the useragent/features - you should add it to your own dependencies. - -* __v2.0.1__ - - Fixed broken reference to the update module. - - Updated with some new parsers. - -* __v2.0.2__ - - Use LRU-cache for the lookups so it doesn't create a memory "leak" #22 - - Updated with some new parsers. - -* __v2.0.3__ - - Updated regexp library with new parsers as Opera's latest browser which runs - WebKit was detected as Chrome Mobile. - -* __v2.0.4__ - - Added support for IE11 and PhantomJS. In addition to that when you run the - updater without the correct dependencies it will just output an error - instead of throwing an error. - -* __v2.0.5__ - - Upgraded the regular expressions to support Opera Next - -* __v2.0.6__ - - Only write the parse file when there isn't an error. #30 - - Output an error in the console when we fail to compile new parsers #30 - -## Version 1.0 -* __v1.1.0__ - - Removed the postupdate hook, it was causing to much issues #9 - -* __v1.0.6__ - - Updated the agent parser, JHint issues and leaking globals. - -* __v1.0.5__ - - Potential fix for #11 where it doesn't install the stuff in windows this also - brings a fresh update of the agents.js. - -* __v1.0.3__ - - Rewritten the `is` method so it doesn't display IE as true for firefox, chrome - etc fixes #10 and #7. - -* __v1.0.3__ - - A fix for bug #6, updated the semver dependency for browserify support. - -* __v1.0.2__ - - Don't throw errors when .parse is called without a useragent string. It now - defaults to a empty Agent instance. - -* __v1.0.1__ - - Added support for cURL, Wget and thunderbird using a custom useragent - definition file. - -* __v1.0.0__ *breaking* - - Complete rewrite of the API and major performance improvements. diff --git a/node_modules/karma/node_modules/useragent/CREDITS b/node_modules/karma/node_modules/useragent/CREDITS deleted file mode 100644 index b5641547..00000000 --- a/node_modules/karma/node_modules/useragent/CREDITS +++ /dev/null @@ -1,16 +0,0 @@ -The regex library that the useragent parser uses if from; code.google.com/p/ua-parser/ -which is released under Apache license: - -# Copyright 2009 Google Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -#     http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. diff --git a/node_modules/karma/node_modules/useragent/LICENSE b/node_modules/karma/node_modules/useragent/LICENSE deleted file mode 100644 index a4d6a95f..00000000 --- a/node_modules/karma/node_modules/useragent/LICENSE +++ /dev/null @@ -1,19 +0,0 @@ -# MIT LICENSED Copyright (c) 2013 Arnout Kazemier (http://3rd-Eden.com) -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to deal -# in the Software without restriction, including without limitation the rights -# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -# copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -# THE SOFTWARE. diff --git a/node_modules/karma/node_modules/useragent/README.md b/node_modules/karma/node_modules/useragent/README.md deleted file mode 100644 index 52ba4792..00000000 --- a/node_modules/karma/node_modules/useragent/README.md +++ /dev/null @@ -1,393 +0,0 @@ -# useragent - high performance user agent parser for Node.js - -Useragent originated as port of [browserscope.org][browserscope]'s user agent -parser project also known as ua-parser. Useragent allows you to parse user agent -string with high accuracy by using hand tuned dedicated regular expressions for -browser matching. This database is needed to ensure that every browser is -correctly parsed as every browser vendor implements it's own user agent schema. -This is why regular user agent parsers have major issues because they will -most likely parse out the wrong browser name or confuse the render engine version -with the actual version of the browser. - ---- - -### Build status [![BuildStatus](https://secure.travis-ci.org/3rd-Eden/useragent.png?branch=master)](http://travis-ci.org/3rd-Eden/useragent) - ---- - -### High performance - -The module has been developed with a benchmark driven approach. It has a -pre-compiled library that contains all the Regular Expressions and uses deferred -or on demand parsing for Operating System and device information. All this -engineering effort has been worth it as [this benchmark shows][benchmark]: - -``` -Starting the benchmark, parsing 62 useragent strings per run - -Executed benchmark against node module: "useragent" -Count (61), Cycles (5), Elapsed (5.559), Hz (1141.3739447904327) - -Executed benchmark against node module: "useragent_parser" -Count (29), Cycles (3), Elapsed (5.448), Hz (545.6817291171243) - -Executed benchmark against node module: "useragent-parser" -Count (16), Cycles (4), Elapsed (5.48), Hz (304.5373431830105) - -Executed benchmark against node module: "ua-parser" -Count (54), Cycles (3), Elapsed (5.512), Hz (1018.7561434659247) - -Module: "useragent" is the user agent fastest parser. -``` - ---- - -### Installation - -Installation is done using the Node Package Manager (NPM). If you don't have -NPM installed on your system you can download it from -[npmjs.org][npm] - -``` -npm install useragent --save -``` - -The `--save` flag tells NPM to automatically add it to your `package.json` file. - ---- - -### API - - -Include the `useragent` parser in you node.js application: - -```js -var useragent = require('useragent'); -``` - -The `useragent` library allows you do use the automatically installed RegExp -library or you can fetch it live from the remote servers. So if you are -paranoid and always want your RegExp library to be up to date to match with -agent the widest range of `useragent` strings you can do: - -```js -var useragent = require('useragent'); -useragent(true); -``` - -This will async load the database from the server and compile it to a proper -JavaScript supported format. If it fails to compile or load it from the remote -location it will just fall back silently to the shipped version. If you want to -use this feature you need to add `yamlparser` and `request` to your package.json - -``` -npm install yamlparser --save -npm install request --save -``` - -#### useragent.parse(useragent string[, js useragent]); - -This is the actual user agent parser, this is where all the magic is happening. -The function accepts 2 arguments, both should be a `string`. The first argument -should the user agent string that is known on the server from the -`req.headers.useragent` header. The other argument is optional and should be -the user agent string that you see in the browser, this can be send from the -browser using a xhr request or something like this. This allows you detect if -the user is browsing the web using the `Chrome Frame` extension. - -The parser returns a Agent instance, this allows you to output user agent -information in different predefined formats. See the Agent section for more -information. - -```js -var agent = useragent.parse(req.headers['user-agent']); - -// example for parsing both the useragent header and a optional js useragent -var agent2 = useragent.parse(req.headers['user-agent'], req.query.jsuseragent); -``` - -The parse method returns a `Agent` instance which contains all details about the -user agent. See the Agent section of the API documentation for the available -methods. - -#### useragent.lookup(useragent string[, js useragent]); - -This provides the same functionality as above, but it caches the user agent -string and it's parsed result in memory to provide faster lookups in the -future. This can be handy if you expect to parse a lot of user agent strings. - -It uses the same arguments as the `useragent.parse` method and returns exactly -the same result, but it's just cached. - -```js -var agent = useragent.lookup(req.headers['user-agent']); -``` - -And this is a serious performance improvement as shown in this benchmark: - -``` -Executed benchmark against method: "useragent.parse" -Count (49), Cycles (3), Elapsed (5.534), Hz (947.6844321931629) - -Executed benchmark against method: "useragent.lookup" -Count (11758), Cycles (3), Elapsed (5.395), Hz (229352.03831239208) -``` - -#### useragent.fromJSON(obj); - -Transforms the JSON representation of a `Agent` instance back in to a working -`Agent` instance - -```js -var agent = useragent.parse(req.headers['user-agent']) - , another = useragent.fromJSON(JSON.stringify(agent)); - -console.log(agent == another); -``` - -#### useragent.is(useragent string).browsername; - -This api provides you with a quick and dirty browser lookup. The underlying -code is usually found on client side scripts so it's not the same quality as -our `useragent.parse` method but it might be needed for legacy reasons. - -`useragent.is` returns a object with potential matched browser names - -```js -useragent.is(req.headers['user-agent']).firefox // true -useragent.is(req.headers['user-agent']).safari // false -var ua = useragent.is(req.headers['user-agent']) - -// the object -{ - version: '3' - webkit: false - opera: false - ie: false - chrome: false - safari: false - mobile_safari: false - firefox: true -} -``` - ---- - -### Agents, OperatingSystem and Device instances - -Most of the methods mentioned above return a Agent instance. The Agent exposes -the parsed out information from the user agent strings. This allows us to -extend the agent with more methods that do not necessarily need to be in the -core agent instance, allowing us to expose a plugin interface for third party -developers and at the same time create a uniform interface for all versioning. - -The Agent has the following property - -- `family` The browser family, or browser name, it defaults to Other. -- `major` The major version number of the family, it defaults to 0. -- `minor` The minor version number of the family, it defaults to 0. -- `patch` The patch version number of the family, it defaults to 0. - -In addition to the properties mentioned above, it also has 2 special properties, -which are: - -- `os` OperatingSystem instance -- `device` Device instance - -When you access those 2 properties the agent will do on demand parsing of the -Operating System or/and Device information. - -The OperatingSystem has the same properties as the Agent, for the Device we -don't have any versioning information available, so only the `family` property is -set there. If we cannot find the family, they will default to `Other`. - -The following methods are available: - -#### Agent.toAgent(); - -Returns the family and version number concatinated in a nice human readable -string. - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.toAgent(); // 'Chrome 15.0.874' -``` - -#### Agent.toString(); - -Returns the results of the `Agent.toAgent()` but also adds the parsed operating -system to the string in a human readable format. - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.toString(); // 'Chrome 15.0.874 / Mac OS X 10.8.1' - -// as it's a to string method you can also concat it with another string -'your useragent is ' + agent; -// 'your useragent is Chrome 15.0.874 / Mac OS X 10.8.1' -``` -#### Agent.toVersion(); - -Returns the version of the browser in a human readable string. - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.toVersion(); // '15.0.874' -``` - -#### Agent.toJSON(); - -Generates a JSON representation of the Agent. By using the `toJSON` method we -automatically allow it to be stringified when supplying as to the -`JSON.stringify` method. - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.toJSON(); // returns an object - -JSON.stringify(agent); -``` - -#### OperatingSystem.toString(); - -Generates a stringified version of operating system; - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.os.toString(); // 'Mac OSX 10.8.1' -``` - -#### OperatingSystem.toVersion(); - -Generates a stringified version of operating system's version; - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.os.toVersion(); // '10.8.1' -``` - -#### OperatingSystem.toJSON(); - -Generates a JSON representation of the OperatingSystem. By using the `toJSON` -method we automatically allow it to be stringified when supplying as to the -`JSON.stringify` method. - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.os.toJSON(); // returns an object - -JSON.stringify(agent.os); -``` - -#### Device.toString(); - -Generates a stringified version of device; - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.device.toString(); // 'Asus A100' -``` - -#### Device.toVersion(); - -Generates a stringified version of device's version; - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.device.toVersion(); // '' , no version found but could also be '0.0.0' -``` - -#### Device.toJSON(); - -Generates a JSON representation of the Device. By using the `toJSON` method we -automatically allow it to be stringified when supplying as to the -`JSON.stringify` method. - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.device.toJSON(); // returns an object - -JSON.stringify(agent.device); -``` - -### Adding more features to the useragent - -As I wanted to keep the core of the user agent parser as clean and fast as -possible I decided to move some of the initially planned features to a new -`plugin` file. - -These extensions to the Agent prototype can be loaded by requiring the -`useragent/features` file: - -```js -var useragent = require('useragent'); -require('useragent/features'); -``` - -The initial release introduces 1 new method, satisfies, which allows you to see -if the version number of the browser satisfies a certain range. It uses the -semver library to do all the range calculations but here is a small summary of -the supported range styles: - -* `>1.2.3` Greater than a specific version. -* `<1.2.3` Less than. -* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`. -* `~1.2.3` := `>=1.2.3 <1.3.0`. -* `~1.2` := `>=1.2.0 <2.0.0`. -* `~1` := `>=1.0.0 <2.0.0`. -* `1.2.x` := `>=1.2.0 <1.3.0`. -* `1.x` := `>=1.0.0 <2.0.0`. - -As it requires the `semver` module to function you need to install it -seperately: - -``` -npm install semver --save -``` - -#### Agent.satisfies('range style here'); - -Check if the agent matches the supplied range. - -```js -var agent = useragent.parse(req.headers['user-agent']); -agent.satisfies('15.x || >=19.5.0 || 25.0.0 - 17.2.3'); // true -agent.satisfies('>16.12.0'); // false -``` ---- - -### Migrations - -For small changes between version please review the [changelog][changelog]. - -#### Upgrading from 1.10 to 2.0.0 - -- `useragent.fromAgent` has been removed. -- `agent.toJSON` now returns an Object, use `JSON.stringify(agent)` for the old - behaviour. -- `agent.os` is now an `OperatingSystem` instance with version numbers. If you - still a string only representation do `agent.os.toString()`. -- `semver` has been removed from the dependencies, so if you are using the - `require('useragent/features')` you need to add it to your own dependencies - -#### Upgrading from 0.1.2 to 1.0.0 - -- `useragent.browser(ua)` has been renamed to `useragent.is(ua)`. -- `useragent.parser(ua, jsua)` has been renamed to `useragent.parse(ua, jsua)`. -- `result.pretty()` has been renamed to `result.toAgent()`. -- `result.V1` has been renamed to `result.major`. -- `result.V2` has been renamed to `result.minor`. -- `result.V3` has been renamed to `result.patch`. -- `result.prettyOS()` has been removed. -- `result.match` has been removed. - ---- - -### License - -MIT - -[browserscope]: http://www.browserscope.org/ -[benchmark]: /3rd-Eden/useragent/blob/master/benchmark/run.js -[changelog]: /3rd-Eden/useragent/blob/master/CHANGELOG.md -[npm]: http://npmjs.org diff --git a/node_modules/karma/node_modules/useragent/bin/testfiles.js b/node_modules/karma/node_modules/useragent/bin/testfiles.js deleted file mode 100755 index f01a6d7a..00000000 --- a/node_modules/karma/node_modules/useragent/bin/testfiles.js +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env node - -var request = require('request') - , path = require('path') - , fs = require('fs'); - -var files = { - 'pgts.yaml': 'https://raw.github.com/tobie/ua-parser/master/test_resources/pgts_browser_list.yaml' - , 'testcases.yaml': 'https://raw.github.com/tobie/ua-parser/master/test_resources/test_user_agent_parser.yaml' - , 'firefoxes.yaml': 'https://raw.github.com/tobie/ua-parser/master/test_resources/firefox_user_agent_strings.yaml' -}; - -/** - * Update the fixtures - */ - -Object.keys(files).forEach(function (key) { - request(files[key], function response (err, res, data) { - if (err || res.statusCode !== 200) return console.error('failed to update'); - - console.log('downloaded', files[key]); - fs.writeFileSync(path.join(__dirname, '..', 'tests', 'fixtures', key), data); - }); -}); diff --git a/node_modules/karma/node_modules/useragent/bin/update.js b/node_modules/karma/node_modules/useragent/bin/update.js deleted file mode 100755 index 28c25014..00000000 --- a/node_modules/karma/node_modules/useragent/bin/update.js +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env node - -'use strict'; - -/** - * Update our definition file. - */ -require('../lib/update').update(function updating(err, data) { - if (err) { - console.error('Update unsuccessfull due to reasons'); - console.log(err.message); - console.log(err.stack); - - return; - } - console.log('Successfully fetched and generated new parsers from the internets.'); -}); diff --git a/node_modules/karma/node_modules/useragent/features/index.js b/node_modules/karma/node_modules/useragent/features/index.js deleted file mode 100644 index 5dab04aa..00000000 --- a/node_modules/karma/node_modules/useragent/features/index.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; - -/** - * Plugin dependencies - */ -var Agent = require('../').Agent - , semver = require('semver'); - -/** - * Checks if the user agent's version can be satisfied agents the give - * ranged argument. This uses the semver libraries range construction. - * - * @param {String} ranged The range the version has to satisfie - * @returns {Boolean} - * @api public - */ -Agent.prototype.satisfies = function satisfies (range) { - return semver.satisfies(this.major + '.' + this.minor + '.' + this.patch, range); -}; diff --git a/node_modules/karma/node_modules/useragent/index.js b/node_modules/karma/node_modules/useragent/index.js deleted file mode 100644 index f239a36e..00000000 --- a/node_modules/karma/node_modules/useragent/index.js +++ /dev/null @@ -1,598 +0,0 @@ -'use strict'; - -/** - * This is where all the magic comes from, specially crafted for `useragent`. - */ -var regexps = require('./lib/regexps'); - -/** - * Reduce references by storing the lookups. - */ -// OperatingSystem parsers: -var osparsers = regexps.os - , osparserslength = osparsers.length; - -// UserAgent parsers: -var agentparsers = regexps.browser - , agentparserslength = agentparsers.length; - -// Device parsers: -var deviceparsers = regexps.device - , deviceparserslength = deviceparsers.length; - -/** - * The representation of a parsed user agent. - * - * @constructor - * @param {String} family The name of the browser - * @param {String} major Major version of the browser - * @param {String} minor Minor version of the browser - * @param {String} patch Patch version of the browser - * @param {String} source The actual user agent string - * @api public - */ -function Agent(family, major, minor, patch, source) { - this.family = family || 'Other'; - this.major = major || '0'; - this.minor = minor || '0'; - this.patch = patch || '0'; - this.source = source || ''; -} - -/** - * OnDemand parsing of the Operating System. - * - * @type {OperatingSystem} - * @api public - */ -Object.defineProperty(Agent.prototype, 'os', { - get: function lazyparse() { - var userAgent = this.source - , length = osparserslength - , parsers = osparsers - , i = 0 - , parser - , res; - - for (; i < length; i++) { - if (res = parsers[i][0].exec(userAgent)) { - parser = parsers[i]; - - if (parser[1]) res[1] = parser[1].replace('$1', res[1]); - break; - } - } - - return Object.defineProperty(this, 'os', { - value: !parser || !res - ? new OperatingSystem() - : new OperatingSystem( - res[1] - , parser[2] || res[2] - , parser[3] || res[3] - , parser[4] || res[4] - ) - }).os; - }, - - /** - * Bypass the OnDemand parsing and set an OperatingSystem instance. - * - * @param {OperatingSystem} os - * @api public - */ - set: function set(os) { - if (!(os instanceof OperatingSystem)) return false; - - return Object.defineProperty(this, 'os', { - value: os - }).os; - } -}); - -/** - * OnDemand parsing of the Device type. - * - * @type {Device} - * @api public - */ -Object.defineProperty(Agent.prototype, 'device', { - get: function lazyparse() { - var userAgent = this.source - , length = deviceparserslength - , parsers = deviceparsers - , i = 0 - , parser - , res; - - for (; i < length; i++) { - if (res = parsers[i][0].exec(userAgent)) { - parser = parsers[i]; - - if (parser[1]) res[1] = parser[1].replace('$1', res[1]); - break; - } - } - - return Object.defineProperty(this, 'device', { - value: !parser || !res - ? new Device() - : new Device( - res[1] - , parser[2] || res[2] - , parser[3] || res[3] - , parser[4] || res[4] - ) - }).device; - }, - - /** - * Bypass the OnDemand parsing and set an Device instance. - * - * @param {Device} device - * @api public - */ - set: function set(device) { - if (!(device instanceof Device)) return false; - - return Object.defineProperty(this, 'device', { - value: device - }).device; - } -}); -/*** Generates a string output of the parsed user agent. - * - * @returns {String} - * @api public - */ -Agent.prototype.toAgent = function toAgent() { - var output = this.family - , version = this.toVersion(); - - if (version) output += ' '+ version; - return output; -}; - -/** - * Generates a string output of the parser user agent and operating system. - * - * @returns {String} "UserAgent 0.0.0 / OS" - * @api public - */ -Agent.prototype.toString = function toString() { - var agent = this.toAgent() - , os = this.os !== 'Other' ? this.os : false; - - return agent + (os ? ' / ' + os : ''); -}; - -/** - * Outputs a compiled veersion number of the user agent. - * - * @returns {String} - * @api public - */ -Agent.prototype.toVersion = function toVersion() { - var version = ''; - - if (this.major) { - version += this.major; - - if (this.minor) { - version += '.' + this.minor; - - // Special case here, the patch can also be Alpha, Beta etc so we need - // to check if it's a string or not. - if (this.patch) { - version += (isNaN(+this.patch) ? ' ' : '.') + this.patch; - } - } - } - - return version; -}; - -/** - * Outputs a JSON string of the Agent. - * - * @returns {String} - * @api public - */ -Agent.prototype.toJSON = function toJSON() { - return { - family: this.family - , major: this.major - , minor: this.minor - , patch: this.patch - , device: this.device - , os: this.os - }; -}; - -/** - * The representation of a parsed Operating System. - * - * @constructor - * @param {String} family The name of the os - * @param {String} major Major version of the os - * @param {String} minor Minor version of the os - * @param {String} patch Patch version of the os - * @api public - */ -function OperatingSystem(family, major, minor, patch) { - this.family = family || 'Other'; - this.major = major || ''; - this.minor = minor || ''; - this.patch = patch || ''; -} - -/** - * Generates a stringified version of the Operating System. - * - * @returns {String} "Operating System 0.0.0" - * @api public - */ -OperatingSystem.prototype.toString = function toString() { - var output = this.family - , version = this.toVersion(); - - if (version) output += ' '+ version; - return output; -}; - -/** - * Generates the version of the Operating System. - * - * @returns {String} - * @api public - */ -OperatingSystem.prototype.toVersion = function toVersion() { - var version = ''; - - if (this.major) { - version += this.major; - - if (this.minor) { - version += '.' + this.minor; - - // Special case here, the patch can also be Alpha, Beta etc so we need - // to check if it's a string or not. - if (this.patch) { - version += (isNaN(+this.patch) ? ' ' : '.') + this.patch; - } - } - } - - return version; -}; - -/** - * Outputs a JSON string of the OS, values are defaulted to undefined so they - * are not outputed in the stringify. - * - * @returns {String} - * @api public - */ -OperatingSystem.prototype.toJSON = function toJSON(){ - return { - family: this.family - , major: this.major || undefined - , minor: this.minor || undefined - , patch: this.patch || undefined - }; -}; - -/** - * The representation of a parsed Device. - * - * @constructor - * @param {String} family The name of the os - * @api public - */ -function Device(family, major, minor, patch) { - this.family = family || 'Other'; - this.major = major || ''; - this.minor = minor || ''; - this.patch = patch || ''; -} - -/** - * Generates a stringified version of the Device. - * - * @returns {String} "Device 0.0.0" - * @api public - */ -Device.prototype.toString = function toString() { - var output = this.family - , version = this.toVersion(); - - if (version) output += ' '+ version; - return output; -}; - -/** - * Generates the version of the Device. - * - * @returns {String} - * @api public - */ -Device.prototype.toVersion = function toVersion() { - var version = ''; - - if (this.major) { - version += this.major; - - if (this.minor) { - version += '.' + this.minor; - - // Special case here, the patch can also be Alpha, Beta etc so we need - // to check if it's a string or not. - if (this.patch) { - version += (isNaN(+this.patch) ? ' ' : '.') + this.patch; - } - } - } - - return version; -}; - -/** - * Get string representation. - * - * @returns {String} - * @api public - */ -Device.prototype.toString = function toString() { - var output = this.family - , version = this.toVersion(); - - if (version) output += ' '+ version; - return output; -}; - -/** - * Outputs a JSON string of the Device, values are defaulted to undefined so they - * are not outputed in the stringify. - * - * @returns {String} - * @api public - */ -Device.prototype.toJSON = function toJSON() { - return { - family: this.family - , major: this.major || undefined - , minor: this.minor || undefined - , patch: this.patch || undefined - }; -}; - -/** - * Small nifty thick that allows us to download a fresh set regexs from t3h - * Int3rNetz when we want to. We will be using the compiled version by default - * but users can opt-in for updates. - * - * @param {Boolean} refresh Refresh the dataset from the remote - * @api public - */ -module.exports = function updater() { - try { - require('./lib/update').update(function updating(err, results) { - if (err) { - console.log('[useragent] Failed to update the parsed due to an error:'); - console.log('[useragent] '+ (err.message ? err.message : err)); - return; - } - - regexps = results; - - // OperatingSystem parsers: - osparsers = regexps.os; - osparserslength = osparsers.length; - - // UserAgent parsers: - agentparsers = regexps.browser; - agentparserslength = agentparsers.length; - - // Device parsers: - deviceparsers = regexps.device; - deviceparserslength = deviceparsers.length; - }); - } catch (e) { - console.error('[useragent] If you want to use automatic updating, please add:'); - console.error('[useragent] - request (npm install request --save)'); - console.error('[useragent] - yamlparser (npm install yamlparser --save)'); - console.error('[useragent] To your own package.json'); - } -}; - -// Override the exports with our newly set module.exports -exports = module.exports; - -/** - * Nao that we have setup all the different classes and configured it we can - * actually start assembling and exposing everything. - */ -exports.Device = Device; -exports.OperatingSystem = OperatingSystem; -exports.Agent = Agent; - -/** - * Parses the user agent string with the generated parsers from the - * ua-parser project on google code. - * - * @param {String} userAgent The user agent string - * @param {String} jsAgent Optional UA from js to detect chrome frame - * @returns {Agent} - * @api public - */ -exports.parse = function parse(userAgent, jsAgent) { - if (!userAgent) return new Agent(); - - var length = agentparserslength - , parsers = agentparsers - , i = 0 - , parser - , res; - - for (; i < length; i++) { - if (res = parsers[i][0].exec(userAgent)) { - parser = parsers[i]; - - if (parser[1]) res[1] = parser[1].replace('$1', res[1]); - if (!jsAgent) return new Agent( - res[1] - , parser[2] || res[2] - , parser[3] || res[3] - , parser[4] || res[4] - , userAgent - ); - - break; - } - } - - // Return early if we didn't find an match, but might still be able to parse - // the os and device, so make sure we supply it with the source - if (!parser || !res) return new Agent('', '', '', '', userAgent); - - // Detect Chrome Frame, but make sure it's enabled! So we need to check for - // the Chrome/ so we know that it's actually using Chrome under the hood. - if (jsAgent && ~jsAgent.indexOf('Chrome/') && ~userAgent.indexOf('chromeframe')) { - res[1] = 'Chrome Frame (IE '+ res[1] +'.'+ res[2] +')'; - - // Run the JavaScripted userAgent string through the parser again so we can - // update the version numbers; - parser = parse(jsAgent); - parser[2] = parser.major; - parser[3] = parser.minor; - parser[4] = parser.patch; - } - - return new Agent( - res[1] - , parser[2] || res[2] - , parser[3] || res[3] - , parser[4] || res[4] - , userAgent - ); -}; - -/** - * If you are doing a lot of lookups you might want to cache the results of the - * parsed user agent string instead, in memory. - * - * @TODO We probably want to create 2 dictionary's here 1 for the Agent - * instances and one for the userAgent instance mapping so we can re-use simular - * Agent instance and lower our memory consumption. - * - * @param {String} userAgent The user agent string - * @param {String} jsAgent Optional UA from js to detect chrome frame - * @api public - */ -var LRU = require('lru-cache')(5000); -exports.lookup = function lookup(userAgent, jsAgent) { - var key = (userAgent || '')+(jsAgent || '') - , cached = LRU.get(key); - - if (cached) return cached; - LRU.set(key, (cached = exports.parse(userAgent, jsAgent))); - - return cached; -}; - -/** - * Does a more inaccurate but more common check for useragents identification. - * The version detection is from the jQuery.com library and is licensed under - * MIT. - * - * @param {String} useragent The user agent - * @returns {Object} matches - * @api public - */ -exports.is = function is(useragent) { - var ua = (useragent || '').toLowerCase() - , details = { - chrome: false - , firefox: false - , ie: false - , mobile_safari: false - , mozilla: false - , opera: false - , safari: false - , webkit: false - , version: (ua.match(exports.is.versionRE) || [0, "0"])[1] - }; - - if (~ua.indexOf('webkit')) { - details.webkit = true; - - if (~ua.indexOf('chrome')) { - details.chrome = true; - } else if (~ua.indexOf('safari')) { - details.safari = true; - - if (~ua.indexOf('mobile') && ~ua.indexOf('apple')) { - details.mobile_safari = true; - } - } - } else if (~ua.indexOf('opera')) { - details.opera = true; - } else if (~ua.indexOf('mozilla') && !~ua.indexOf('compatible')) { - details.mozilla = true; - - if (~ua.indexOf('firefox')) details.firefox = true; - } else if (~ua.indexOf('msie')) { - details.ie = true; - } - - return details; -}; - -/** - * Parses out the version numbers. - * - * @type {RegExp} - * @api private - */ -exports.is.versionRE = /.+(?:rv|it|ra|ie)[\/: ]([\d.]+)/; - -/** - * Transform a JSON object back to a valid userAgent string - * - * @param {Object} details - * @returns {Agent} - */ -exports.fromJSON = function fromJSON(details) { - if (typeof details === 'string') details = JSON.parse(details); - - var agent = new Agent(details.family, details.major, details.minor, details.patch) - , os = details.os; - - // The device family was added in v2.0 - if ('device' in details) { - agent.device = new Device(details.device.family); - } else { - agent.device = new Device(); - } - - if ('os' in details && os) { - // In v1.1.0 we only parsed out the Operating System name, not the full - // version which we added in v2.0. To provide backwards compatible we should - // we should set the details.os as family - if (typeof os === 'string') { - agent.os = new OperatingSystem(os); - } else { - agent.os = new OperatingSystem(os.family, os.major, os.minor, os.patch); - } - } - - return agent; -}; - -/** - * Library version. - * - * @type {String} - * @api public - */ -exports.version = require('./package.json').version; diff --git a/node_modules/karma/node_modules/useragent/lib/regexps.js b/node_modules/karma/node_modules/useragent/lib/regexps.js deleted file mode 100644 index fb271d4c..00000000 --- a/node_modules/karma/node_modules/useragent/lib/regexps.js +++ /dev/null @@ -1,2270 +0,0 @@ -var parser; - -exports.browser = Object.create(null); - -parser = Object.create(null); -parser[0] = new RegExp("(SeaMonkey|Camino)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[0] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Pale[Mm]oon)/(\\d+)\\.(\\d+)\\.?(\\d+)?"); -parser[1] = "Pale Moon (Firefox Variant)"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[1] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Fennec)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)"); -parser[1] = "Firefox Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[2] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Fennec)/(\\d+)\\.(\\d+)(pre)"); -parser[1] = "Firefox Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[3] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Fennec)/(\\d+)\\.(\\d+)"); -parser[1] = "Firefox Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[4] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Mobile.*(Firefox)/(\\d+)\\.(\\d+)"); -parser[1] = "Firefox Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[5] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?)"); -parser[1] = "Firefox ($1)"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[6] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)/(\\d+)\\.(\\d+)(a\\d+[a-z]*)"); -parser[1] = "Firefox Alpha"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[7] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)/(\\d+)\\.(\\d+)(b\\d+[a-z]*)"); -parser[1] = "Firefox Beta"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[8] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(a\\d+[a-z]*)"); -parser[1] = "Firefox Alpha"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[9] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)-(?:\\d+\\.\\d+)?/(\\d+)\\.(\\d+)(b\\d+[a-z]*)"); -parser[1] = "Firefox Beta"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[10] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Namoroka|Shiretoko|Minefield)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?"); -parser[1] = "Firefox ($1)"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[11] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox).*Tablet browser (\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "MicroB"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[12] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(MozillaDeveloperPreview)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[13] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Flock)/(\\d+)\\.(\\d+)(b\\d+?)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[14] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(RockMelt)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[15] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Navigator)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Netscape"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[16] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Navigator)/(\\d+)\\.(\\d+)([ab]\\d+)"); -parser[1] = "Netscape"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[17] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Netscape6)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Netscape"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[18] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(MyIBrow)/(\\d+)\\.(\\d+)"); -parser[1] = "My Internet Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[19] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Opera Tablet).*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[20] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Opera)/.+Opera Mobi.+Version/(\\d+)\\.(\\d+)"); -parser[1] = "Opera Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[21] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Opera Mobi"); -parser[1] = "Opera Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[22] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Opera Mini)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[23] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Opera Mini)/att/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[24] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Opera)/9.80.*Version/(\\d+)\\.(\\d+)(?:\\.(\\d+))?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[25] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(?:Mobile Safari).*(OPR)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Opera Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[26] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(?:Chrome).*(OPR)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Opera"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[27] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(hpw|web)OS/(\\d+)\\.(\\d+)(?:\\.(\\d+))?"); -parser[1] = "webOS Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[28] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(luakit)"); -parser[1] = "LuaKit"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[29] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Snowshoe)/(\\d+)\\.(\\d+).(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[30] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Lightning)/(\\d+)\\.(\\d+)([ab]?\\d+[a-z]*)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[31] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+(?:pre)?) \\(Swiftfox\\)"); -parser[1] = "Swiftfox"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[32] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)/(\\d+)\\.(\\d+)([ab]\\d+[a-z]*)? \\(Swiftfox\\)"); -parser[1] = "Swiftfox"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[33] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(rekonq)/(\\d+)\\.(\\d+)\\.?(\\d+)? Safari"); -parser[1] = "Rekonq"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[34] = parser; -parser = Object.create(null); -parser[0] = new RegExp("rekonq"); -parser[1] = "Rekonq"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[35] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(conkeror|Conkeror)/(\\d+)\\.(\\d+)\\.?(\\d+)?"); -parser[1] = "Conkeror"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[36] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(konqueror)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Konqueror"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[37] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(WeTab)-Browser"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[38] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Comodo_Dragon)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Comodo Dragon"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[39] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(YottaaMonitor|BrowserMob|HttpMonitor|YandexBot|Slurp|BingPreview|PagePeeker|ThumbShotsBot|WebThumb|URL2PNG|ZooShot|GomezA|Catchpoint bot|Willow Internet Crawler|Google SketchUp|Read%20Later)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[40] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Symphony) (\\d+).(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[41] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Minimo)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[42] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(CrMo)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Chrome Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[43] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(CriOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Chrome Mobile iOS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[44] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+) Mobile"); -parser[1] = "Chrome Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[45] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(chromeframe)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Chrome Frame"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[46] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(UCBrowser)[ /](\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "UC Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[47] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(UC Browser)[ /](\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[48] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(UC Browser|UCBrowser|UCWEB)(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "UC Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[49] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(SLP Browser)/(\\d+)\\.(\\d+)"); -parser[1] = "Tizen Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[50] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(SE 2\\.X) MetaSr (\\d+)\\.(\\d+)"); -parser[1] = "Sogou Explorer"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[51] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(baidubrowser)[/\\s](\\d+)"); -parser[1] = "Baidu Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[52] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(FlyFlow)/(\\d+)\\.(\\d+)"); -parser[1] = "Baidu Explorer"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[53] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Pingdom.com_bot_version_)(\\d+)\\.(\\d+)"); -parser[1] = "PingdomBot"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[54] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(facebookexternalhit)/(\\d+)\\.(\\d+)"); -parser[1] = "FacebookBot"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[55] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Twitterbot)/(\\d+)\\.(\\d+)"); -parser[1] = "TwitterBot"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[56] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Rackspace Monitoring)/(\\d+)\\.(\\d+)"); -parser[1] = "RackspaceBot"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[57] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PyAMF)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[58] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(YaBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Yandex Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[59] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Chrome)/(\\d+)\\.(\\d+)\\.(\\d+).* MRCHROME"); -parser[1] = "Mail.ru Chromium Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[60] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(AOL) (\\d+)\\.(\\d+); AOLBuild (\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[61] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(AdobeAIR|FireWeb|Jasmine|ANTGalio|Midori|Fresco|Lobo|PaleMoon|Maxthon|Lynx|OmniWeb|Dillo|Camino|Demeter|Fluid|Fennec|Epiphany|Shiira|Sunrise|Flock|Netscape|Lunascape|WebPilot|Vodafone|NetFront|Netfront|Konqueror|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|Opera Mini|iCab|NetNewsWire|ThunderBrowse|Iris|UP\\.Browser|Bunjalloo|Google Earth|Raven for Mac|Openwave)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[62] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Chromium|Chrome)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[63] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Bolt|Jasmine|IceCat|Skyfire|Midori|Maxthon|Lynx|Arora|IBrowse|Dillo|Camino|Shiira|Fennec|Phoenix|Chrome|Flock|Netscape|Lunascape|Epiphany|WebPilot|Opera Mini|Opera|Vodafone|NetFront|Netfront|Konqueror|Googlebot|SeaMonkey|Kazehakase|Vienna|Iceape|Iceweasel|IceWeasel|Iron|K-Meleon|Sleipnir|Galeon|GranParadiso|iCab|NetNewsWire|Space Bison|Stainless|Orca|Dolfin|BOLT|Minimo|Tizen Browser|Polaris|Abrowser|Planetweb|ICE Browser)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[64] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Chromium|Chrome)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[65] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iRider|Crazy Browser|SkipStone|iCab|Lunascape|Sleipnir|Maemo Browser) (\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[66] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iCab|Lunascape|Opera|Android|Jasmine|Polaris) (\\d+)\\.(\\d+)\\.?(\\d+)?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[67] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Kindle)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[68] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Donut"); -parser[1] = 0; -parser[2] = "1"; -parser[3] = "2"; -parser[4] = 0; -exports.browser[69] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Eclair"); -parser[1] = 0; -parser[2] = "2"; -parser[3] = "1"; -parser[4] = 0; -exports.browser[70] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Froyo"); -parser[1] = 0; -parser[2] = "2"; -parser[3] = "2"; -parser[4] = 0; -exports.browser[71] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Gingerbread"); -parser[1] = 0; -parser[2] = "2"; -parser[3] = "3"; -parser[4] = 0; -exports.browser[72] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Honeycomb"); -parser[1] = 0; -parser[2] = "3"; -parser[3] = 0; -parser[4] = 0; -exports.browser[73] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(IEMobile)[ /](\\d+)\\.(\\d+)"); -parser[1] = "IE Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[74] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(MSIE) (\\d+)\\.(\\d+).*XBLWP7"); -parser[1] = "IE Large Screen"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[75] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[76] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Firefox)/(\\d+)\\.(\\d+)(pre|[ab]\\d+[a-z]*)?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[77] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Obigo)InternetBrowser"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[78] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Obigo)\\-Browser"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[79] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Obigo|OBIGO)[^\\d]*(\\d+)(?:.(\\d+))?"); -parser[1] = "Obigo"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[80] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(MAXTHON|Maxthon) (\\d+)\\.(\\d+)"); -parser[1] = "Maxthon"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[81] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Maxthon|MyIE2|Uzbl|Shiira)"); -parser[1] = 0; -parser[2] = "0"; -parser[3] = 0; -parser[4] = 0; -exports.browser[82] = parser; -parser = Object.create(null); -parser[0] = new RegExp("PLAYSTATION 3.+WebKit"); -parser[1] = "NetFront NX"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[83] = parser; -parser = Object.create(null); -parser[0] = new RegExp("PLAYSTATION 3"); -parser[1] = "NetFront"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[84] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PlayStation Portable)"); -parser[1] = "NetFront"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[85] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PlayStation Vita)"); -parser[1] = "NetFront NX"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[86] = parser; -parser = Object.create(null); -parser[0] = new RegExp("AppleWebKit.+ (NX)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "NetFront NX"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[87] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Nintendo 3DS)"); -parser[1] = "NetFront NX"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[88] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(BrowseX) \\((\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[89] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(NCSA_Mosaic)/(\\d+)\\.(\\d+)"); -parser[1] = "NCSA Mosaic"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[90] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(POLARIS)/(\\d+)\\.(\\d+)"); -parser[1] = "Polaris"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[91] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Embider)/(\\d+)\\.(\\d+)"); -parser[1] = "Polaris"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[92] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(BonEcho)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Bon Echo"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[93] = parser; -parser = Object.create(null); -parser[0] = new RegExp("M?QQBrowser"); -parser[1] = "QQ Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[94] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPod).+Version/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[95] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPod).*Version/(\\d+)\\.(\\d+)"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[96] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPhone).*Version/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[97] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPhone).*Version/(\\d+)\\.(\\d+)"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[98] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPad).*Version/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[99] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPad).*Version/(\\d+)\\.(\\d+)"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[100] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPod|iPhone|iPad);.*CPU.*OS (\\d+)(?:_\\d+)?_(\\d+).*Mobile"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[101] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPod|iPhone|iPad)"); -parser[1] = "Mobile Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[102] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(AvantGo) (\\d+).(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[103] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(OneBrowser)/(\\d+).(\\d+)"); -parser[1] = "ONE Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[104] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Avant)"); -parser[1] = 0; -parser[2] = "1"; -parser[3] = 0; -parser[4] = 0; -exports.browser[105] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(QtCarBrowser)"); -parser[1] = 0; -parser[2] = "1"; -parser[3] = 0; -parser[4] = 0; -exports.browser[106] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iBrowser/Mini)(\\d+).(\\d+)"); -parser[1] = "iBrowser Mini"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[107] = parser; -parser = Object.create(null); -parser[0] = new RegExp("^(Nokia)"); -parser[1] = "Nokia Services (WAP) Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[108] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)\\.(\\d+)"); -parser[1] = "Nokia Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[109] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+).(\\d+)"); -parser[1] = "Nokia Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[110] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(NokiaBrowser)/(\\d+)\\.(\\d+)"); -parser[1] = "Nokia Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[111] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(BrowserNG)/(\\d+)\\.(\\d+).(\\d+)"); -parser[1] = "Nokia Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[112] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Series60)/5\\.0"); -parser[1] = "Nokia Browser"; -parser[2] = "7"; -parser[3] = "0"; -parser[4] = 0; -exports.browser[113] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Series60)/(\\d+)\\.(\\d+)"); -parser[1] = "Nokia OSS Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[114] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(S40OviBrowser)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Ovi Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[115] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Nokia)[EN]?(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[116] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(BB10);"); -parser[1] = "BlackBerry WebKit"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[117] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PlayBook).+RIM Tablet OS (\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "BlackBerry WebKit"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[118] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Black[bB]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "BlackBerry WebKit"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[119] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Black[bB]erry)\\s?(\\d+)"); -parser[1] = "BlackBerry"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[120] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(OmniWeb)/v(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[121] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Blazer)/(\\d+)\\.(\\d+)"); -parser[1] = "Palm Blazer"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[122] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Pre)/(\\d+)\\.(\\d+)"); -parser[1] = "Palm Pre"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[123] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(ELinks)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[124] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(ELinks) \\((\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[125] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Links) \\((\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[126] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(QtWeb) Internet Browser/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[127] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?"); -parser[1] = "Amazon Silk"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[128] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PhantomJS)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[129] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(AppleWebKit)/(\\d+)\\.?(\\d+)?\\+ .* Safari"); -parser[1] = "WebKit Nightly"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[130] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Version)/(\\d+)\\.(\\d+)(?:\\.(\\d+))?.*Safari/"); -parser[1] = "Safari"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[131] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Safari)/\\d+"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[132] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(OLPC)/Update(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[133] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(OLPC)/Update()\\.(\\d+)"); -parser[1] = 0; -parser[2] = "0"; -parser[3] = 0; -parser[4] = 0; -exports.browser[134] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(SEMC\\-Browser)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[135] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Teleca)"); -parser[1] = "Teleca Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[136] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Phantom)/V(\\d+)\\.(\\d+)"); -parser[1] = "Phantom Browser"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[137] = parser; -parser = Object.create(null); -parser[0] = new RegExp("([MS]?IE) (\\d+)\\.(\\d+)"); -parser[1] = "IE"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[138] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Trident(.*)rv.(\\d+)\\.(\\d+)"); -parser[1] = "IE"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[139] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(python-requests)/(\\d+)\\.(\\d+)"); -parser[1] = "Python Requests"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[140] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Thunderbird)/(\\d+)\\.(\\d+)\\.?(\\d+)?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[141] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Wget)/(\\d+)\\.(\\d+)\\.?([ab]?\\d+[a-z]*)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[142] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(curl)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "cURL"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.browser[143] = parser; - -exports.browser.length = 144; - -exports.device = Object.create(null); - -parser = Object.create(null); -parser[0] = new RegExp("HTC ([A-Z][a-z0-9]+) Build"); -parser[1] = "HTC $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[0] = parser; -parser = Object.create(null); -parser[0] = new RegExp("HTC ([A-Z][a-z0-9 ]+) \\d+\\.\\d+\\.\\d+\\.\\d+"); -parser[1] = "HTC $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[1] = parser; -parser = Object.create(null); -parser[0] = new RegExp("HTC_Touch_([A-Za-z0-9]+)"); -parser[1] = "HTC Touch ($1)"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[2] = parser; -parser = Object.create(null); -parser[0] = new RegExp("USCCHTC(\\d+)"); -parser[1] = "HTC $1 (US Cellular)"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[3] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Sprint APA(9292)"); -parser[1] = "HTC $1 (Sprint)"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[4] = parser; -parser = Object.create(null); -parser[0] = new RegExp("HTC ([A-Za-z0-9]+ [A-Z])"); -parser[1] = "HTC $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[5] = parser; -parser = Object.create(null); -parser[0] = new RegExp("HTC[-_/\\s]([A-Za-z0-9]+)"); -parser[1] = "HTC $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[6] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(ADR[A-Za-z0-9]+)"); -parser[1] = "HTC $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[7] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(HTC)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[8] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(QtCarBrowser)"); -parser[1] = "Tesla Model S"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[9] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(SamsungSGHi560)"); -parser[1] = "Samsung SGHi560"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[10] = parser; -parser = Object.create(null); -parser[0] = new RegExp("SonyEricsson([A-Za-z0-9]+)/"); -parser[1] = "Ericsson $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[11] = parser; -parser = Object.create(null); -parser[0] = new RegExp("PLAYSTATION 3"); -parser[1] = "PlayStation 3"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[12] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PlayStation Portable)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[13] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PlayStation Vita)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[14] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(KFOT Build)"); -parser[1] = "Kindle Fire"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[15] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(KFTT Build)"); -parser[1] = "Kindle Fire HD"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[16] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(KFJWI Build)"); -parser[1] = "Kindle Fire HD 8.9\" WiFi"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[17] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(KFJWA Build)"); -parser[1] = "Kindle Fire HD 8.9\" 4G"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[18] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Kindle Fire)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[19] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Kindle)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[20] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Silk)/(\\d+)\\.(\\d+)(?:\\.([0-9\\-]+))?"); -parser[1] = "Kindle Fire"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[21] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Android[\\- ][\\d]+\\.[\\d]+; [A-Za-z]{2}\\-[A-Za-z]{2}; WOWMobile (.+) Build"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[22] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\-update1; [A-Za-z]{2}\\-[A-Za-z]{2}; (.+) Build"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[23] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; [A-Za-z]{2}\\-[A-Za-z]{2}; (.+) Build"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[24] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+;[A-Za-z]{2}\\-[A-Za-z]{2};(.+) Build"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[25] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Android[\\- ][\\d]+\\.[\\d]+; [A-Za-z]{2}\\-[A-Za-z]{2}; (.+) Build"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[26] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Android[\\- ][\\d]+\\.[\\d]+\\.[\\d]+; (.+) Build"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[27] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Android[\\- ][\\d]+\\.[\\d]+; (.+) Build"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[28] = parser; -parser = Object.create(null); -parser[0] = new RegExp("NokiaN([0-9]+)"); -parser[1] = "Nokia N$1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[29] = parser; -parser = Object.create(null); -parser[0] = new RegExp("NOKIA([A-Za-z0-9\\v-]+)"); -parser[1] = "Nokia $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[30] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Nokia([A-Za-z0-9\\v-]+)"); -parser[1] = "Nokia $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[31] = parser; -parser = Object.create(null); -parser[0] = new RegExp("NOKIA ([A-Za-z0-9\\-]+)"); -parser[1] = "Nokia $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[32] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Nokia ([A-Za-z0-9\\-]+)"); -parser[1] = "Nokia $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[33] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Lumia ([A-Za-z0-9\\-]+)"); -parser[1] = "Lumia $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[34] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Symbian"); -parser[1] = "Nokia"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[35] = parser; -parser = Object.create(null); -parser[0] = new RegExp("BB10; ([A-Za-z0-9\\- ]+)\\)"); -parser[1] = "BlackBerry $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[36] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(PlayBook).+RIM Tablet OS"); -parser[1] = "BlackBerry Playbook"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[37] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Black[Bb]erry ([0-9]+);"); -parser[1] = "BlackBerry $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[38] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Black[Bb]erry([0-9]+)"); -parser[1] = "BlackBerry $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[39] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Black[Bb]erry;"); -parser[1] = "BlackBerry"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[40] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Pre)/(\\d+)\\.(\\d+)"); -parser[1] = "Palm Pre"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[41] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Pixi)/(\\d+)\\.(\\d+)"); -parser[1] = "Palm Pixi"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[42] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Touch[Pp]ad)/(\\d+)\\.(\\d+)"); -parser[1] = "HP TouchPad"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[43] = parser; -parser = Object.create(null); -parser[0] = new RegExp("HPiPAQ([A-Za-z0-9]+)/(\\d+).(\\d+)"); -parser[1] = "HP iPAQ $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[44] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Palm([A-Za-z0-9]+)"); -parser[1] = "Palm $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[45] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Treo([A-Za-z0-9]+)"); -parser[1] = "Palm Treo $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[46] = parser; -parser = Object.create(null); -parser[0] = new RegExp("webOS.*(P160UNA)/(\\d+).(\\d+)"); -parser[1] = "HP Veer"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[47] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(AppleTV)"); -parser[1] = "AppleTV"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[48] = parser; -parser = Object.create(null); -parser[0] = new RegExp("AdsBot-Google-Mobile"); -parser[1] = "Spider"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[49] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Googlebot-Mobile/(\\d+).(\\d+)"); -parser[1] = "Spider"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[50] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPad) Simulator;"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[51] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPad);"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[52] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPod) touch;"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[53] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPod);"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[54] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPhone) Simulator;"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[55] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPhone);"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[56] = parser; -parser = Object.create(null); -parser[0] = new RegExp("acer_([A-Za-z0-9]+)_"); -parser[1] = "Acer $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[57] = parser; -parser = Object.create(null); -parser[0] = new RegExp("acer_([A-Za-z0-9]+)_"); -parser[1] = "Acer $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[58] = parser; -parser = Object.create(null); -parser[0] = new RegExp("ALCATEL-([A-Za-z0-9]+)"); -parser[1] = "Alcatel $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[59] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Alcatel-([A-Za-z0-9]+)"); -parser[1] = "Alcatel $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[60] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Amoi\\-([A-Za-z0-9]+)"); -parser[1] = "Amoi $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[61] = parser; -parser = Object.create(null); -parser[0] = new RegExp("AMOI\\-([A-Za-z0-9]+)"); -parser[1] = "Amoi $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[62] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Asus\\-([A-Za-z0-9]+)"); -parser[1] = "Asus $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[63] = parser; -parser = Object.create(null); -parser[0] = new RegExp("ASUS\\-([A-Za-z0-9]+)"); -parser[1] = "Asus $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[64] = parser; -parser = Object.create(null); -parser[0] = new RegExp("BIRD\\-([A-Za-z0-9]+)"); -parser[1] = "Bird $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[65] = parser; -parser = Object.create(null); -parser[0] = new RegExp("BIRD\\.([A-Za-z0-9]+)"); -parser[1] = "Bird $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[66] = parser; -parser = Object.create(null); -parser[0] = new RegExp("BIRD ([A-Za-z0-9]+)"); -parser[1] = "Bird $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[67] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Dell ([A-Za-z0-9]+)"); -parser[1] = "Dell $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[68] = parser; -parser = Object.create(null); -parser[0] = new RegExp("DoCoMo/2\\.0 ([A-Za-z0-9]+)"); -parser[1] = "DoCoMo $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[69] = parser; -parser = Object.create(null); -parser[0] = new RegExp("([A-Za-z0-9]+)_W\\;FOMA"); -parser[1] = "DoCoMo $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[70] = parser; -parser = Object.create(null); -parser[0] = new RegExp("([A-Za-z0-9]+)\\;FOMA"); -parser[1] = "DoCoMo $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[71] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Huawei([A-Za-z0-9]+)"); -parser[1] = "Huawei $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[72] = parser; -parser = Object.create(null); -parser[0] = new RegExp("HUAWEI-([A-Za-z0-9]+)"); -parser[1] = "Huawei $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[73] = parser; -parser = Object.create(null); -parser[0] = new RegExp("vodafone([A-Za-z0-9]+)"); -parser[1] = "Huawei Vodafone $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[74] = parser; -parser = Object.create(null); -parser[0] = new RegExp("i\\-mate ([A-Za-z0-9]+)"); -parser[1] = "i-mate $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[75] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Kyocera\\-([A-Za-z0-9]+)"); -parser[1] = "Kyocera $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[76] = parser; -parser = Object.create(null); -parser[0] = new RegExp("KWC\\-([A-Za-z0-9]+)"); -parser[1] = "Kyocera $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[77] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Lenovo\\-([A-Za-z0-9]+)"); -parser[1] = "Lenovo $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[78] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Lenovo_([A-Za-z0-9]+)"); -parser[1] = "Lenovo $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[79] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LG/([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[80] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LG-LG([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[81] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LGE-LG([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[82] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LGE VX([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[83] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LG ([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[84] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LGE LG\\-AX([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[85] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LG\\-([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[86] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LGE\\-([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[87] = parser; -parser = Object.create(null); -parser[0] = new RegExp("LG([A-Za-z0-9]+)"); -parser[1] = "LG $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[88] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(KIN)\\.One (\\d+)\\.(\\d+)"); -parser[1] = "Microsoft $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[89] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(KIN)\\.Two (\\d+)\\.(\\d+)"); -parser[1] = "Microsoft $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[90] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Motorola)\\-([A-Za-z0-9]+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[91] = parser; -parser = Object.create(null); -parser[0] = new RegExp("MOTO\\-([A-Za-z0-9]+)"); -parser[1] = "Motorola $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[92] = parser; -parser = Object.create(null); -parser[0] = new RegExp("MOT\\-([A-Za-z0-9]+)"); -parser[1] = "Motorola $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[93] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Nintendo WiiU)"); -parser[1] = "Nintendo Wii U"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[94] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Nintendo (DS|3DS|DSi|Wii);"); -parser[1] = "Nintendo $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[95] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Pantech([A-Za-z0-9]+)"); -parser[1] = "Pantech $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[96] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Philips([A-Za-z0-9]+)"); -parser[1] = "Philips $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[97] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Philips ([A-Za-z0-9]+)"); -parser[1] = "Philips $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[98] = parser; -parser = Object.create(null); -parser[0] = new RegExp("SAMSUNG-([A-Za-z0-9\\-]+)"); -parser[1] = "Samsung $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[99] = parser; -parser = Object.create(null); -parser[0] = new RegExp("SAMSUNG\\; ([A-Za-z0-9\\-]+)"); -parser[1] = "Samsung $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[100] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Dreamcast"); -parser[1] = "Sega Dreamcast"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[101] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Softbank/1\\.0/([A-Za-z0-9]+)"); -parser[1] = "Softbank $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[102] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Softbank/2\\.0/([A-Za-z0-9]+)"); -parser[1] = "Softbank $1"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[103] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(WebTV)/(\\d+).(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[104] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(hiptop|avantgo|plucker|xiino|blazer|elaine|up.browser|up.link|mmp|smartphone|midp|wap|vodafone|o2|pocket|mobile|pda)"); -parser[1] = "Generic Smartphone"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[105] = parser; -parser = Object.create(null); -parser[0] = new RegExp("^(1207|3gso|4thp|501i|502i|503i|504i|505i|506i|6310|6590|770s|802s|a wa|acer|acs\\-|airn|alav|asus|attw|au\\-m|aur |aus |abac|acoo|aiko|alco|alca|amoi|anex|anny|anyw|aptu|arch|argo|bell|bird|bw\\-n|bw\\-u|beck|benq|bilb|blac|c55/|cdm\\-|chtm|capi|comp|cond|craw|dall|dbte|dc\\-s|dica|ds\\-d|ds12|dait|devi|dmob|doco|dopo|el49|erk0|esl8|ez40|ez60|ez70|ezos|ezze|elai|emul|eric|ezwa|fake|fly\\-|fly_|g\\-mo|g1 u|g560|gf\\-5|grun|gene|go.w|good|grad|hcit|hd\\-m|hd\\-p|hd\\-t|hei\\-|hp i|hpip|hs\\-c|htc |htc\\-|htca|htcg)"); -parser[1] = "Generic Feature Phone"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[106] = parser; -parser = Object.create(null); -parser[0] = new RegExp("^(htcp|htcs|htct|htc_|haie|hita|huaw|hutc|i\\-20|i\\-go|i\\-ma|i230|iac|iac\\-|iac/|ig01|im1k|inno|iris|jata|java|kddi|kgt|kgt/|kpt |kwc\\-|klon|lexi|lg g|lg\\-a|lg\\-b|lg\\-c|lg\\-d|lg\\-f|lg\\-g|lg\\-k|lg\\-l|lg\\-m|lg\\-o|lg\\-p|lg\\-s|lg\\-t|lg\\-u|lg\\-w|lg/k|lg/l|lg/u|lg50|lg54|lge\\-|lge/|lynx|leno|m1\\-w|m3ga|m50/|maui|mc01|mc21|mcca|medi|meri|mio8|mioa|mo01|mo02|mode|modo|mot |mot\\-|mt50|mtp1|mtv |mate|maxo|merc|mits|mobi|motv|mozz|n100|n101|n102|n202|n203|n300|n302|n500|n502|n505|n700|n701|n710|nec\\-|nem\\-|newg|neon)"); -parser[1] = "Generic Feature Phone"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[107] = parser; -parser = Object.create(null); -parser[0] = new RegExp("^(netf|noki|nzph|o2 x|o2\\-x|opwv|owg1|opti|oran|ot\\-s|p800|pand|pg\\-1|pg\\-2|pg\\-3|pg\\-6|pg\\-8|pg\\-c|pg13|phil|pn\\-2|pt\\-g|palm|pana|pire|pock|pose|psio|qa\\-a|qc\\-2|qc\\-3|qc\\-5|qc\\-7|qc07|qc12|qc21|qc32|qc60|qci\\-|qwap|qtek|r380|r600|raks|rim9|rove|s55/|sage|sams|sc01|sch\\-|scp\\-|sdk/|se47|sec\\-|sec0|sec1|semc|sgh\\-|shar|sie\\-|sk\\-0|sl45|slid|smb3|smt5|sp01|sph\\-|spv |spv\\-|sy01|samm|sany|sava|scoo|send|siem|smar|smit|soft|sony|t\\-mo|t218|t250|t600|t610|t618|tcl\\-|tdg\\-|telm|tim\\-|ts70|tsm\\-|tsm3|tsm5|tx\\-9|tagt)"); -parser[1] = "Generic Feature Phone"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[108] = parser; -parser = Object.create(null); -parser[0] = new RegExp("^(talk|teli|topl|tosh|up.b|upg1|utst|v400|v750|veri|vk\\-v|vk40|vk50|vk52|vk53|vm40|vx98|virg|vite|voda|vulc|w3c |w3c\\-|wapj|wapp|wapu|wapm|wig |wapi|wapr|wapv|wapy|wapa|waps|wapt|winc|winw|wonu|x700|xda2|xdag|yas\\-|your|zte\\-|zeto|aste|audi|avan|blaz|brew|brvw|bumb|ccwa|cell|cldc|cmd\\-|dang|eml2|fetc|hipt|http|ibro|idea|ikom|ipaq|jbro|jemu|jigs|keji|kyoc|kyok|libw|m\\-cr|midp|mmef|moto|mwbp|mywa|newt|nok6|o2im|pant|pdxg|play|pluc|port|prox|rozo|sama|seri|smal|symb|treo|upsi|vx52|vx53|vx60|vx61|vx70|vx80|vx81|vx83|vx85|wap\\-|webc|whit|wmlb|xda\\-|xda_)"); -parser[1] = "Generic Feature Phone"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[109] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(bot|borg|google(^tv)|yahoo|slurp|msnbot|msrbot|openbot|archiver|netresearch|lycos|scooter|altavista|teoma|gigabot|baiduspider|blitzbot|oegp|charlotte|furlbot|http%20client|polybot|htdig|ichiro|mogimogi|larbin|pompos|scrubby|searchsight|seekbot|semanticdiscovery|silk|snappy|speedy|spider|voila|vortex|voyager|zao|zeal|fast\\-webcrawler|converacrawler|dataparksearch|findlinks|crawler)"); -parser[1] = "Spider"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.device[110] = parser; - -exports.device.length = 111; - -exports.os = Object.create(null); - -parser = Object.create(null); -parser[0] = new RegExp("(Android) (\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[0] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android)\\-(\\d+)\\.(\\d+)(?:[.\\-]([a-z0-9]+))?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[1] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Donut"); -parser[1] = 0; -parser[2] = "1"; -parser[3] = "2"; -parser[4] = 0; -exports.os[2] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Eclair"); -parser[1] = 0; -parser[2] = "2"; -parser[3] = "1"; -parser[4] = 0; -exports.os[3] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Froyo"); -parser[1] = 0; -parser[2] = "2"; -parser[3] = "2"; -parser[4] = 0; -exports.os[4] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Gingerbread"); -parser[1] = 0; -parser[2] = "2"; -parser[3] = "3"; -parser[4] = 0; -exports.os[5] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Android) Honeycomb"); -parser[1] = 0; -parser[2] = "3"; -parser[3] = 0; -parser[4] = 0; -exports.os[6] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Silk-Accelerated=[a-z]{4,5})"); -parser[1] = "Android"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[7] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows (?:NT 5\\.2|NT 5\\.1))"); -parser[1] = "Windows XP"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[8] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(XBLWP7)"); -parser[1] = "Windows Phone"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[9] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows NT 6\\.1)"); -parser[1] = "Windows 7"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[10] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows NT 6\\.0)"); -parser[1] = "Windows Vista"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[11] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Win 9x 4\\.90)"); -parser[1] = "Windows Me"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[12] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows 98|Windows XP|Windows ME|Windows 95|Windows CE|Windows 7|Windows NT 4\\.0|Windows Vista|Windows 2000|Windows 3.1)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[13] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows NT 6\\.2; ARM;)"); -parser[1] = "Windows RT"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[14] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows NT 6\\.2)"); -parser[1] = "Windows 8"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[15] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows NT 5\\.0)"); -parser[1] = "Windows 2000"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[16] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows Phone) (\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[17] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows Phone) OS (\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[18] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows ?Mobile)"); -parser[1] = "Windows Mobile"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[19] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(WinNT4.0)"); -parser[1] = "Windows NT 4.0"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[20] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Win98)"); -parser[1] = "Windows 98"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[21] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Tizen)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[22] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Mac OS X) (\\d+)[_.](\\d+)(?:[_.](\\d+))?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[23] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Mac_PowerPC"); -parser[1] = "Mac OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[24] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(?:PPC|Intel) (Mac OS X)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[25] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(CPU OS|iPhone OS) (\\d+)_(\\d+)(?:_(\\d+))?"); -parser[1] = "iOS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[26] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPhone|iPad|iPod); Opera"); -parser[1] = "iOS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[27] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(iPhone|iPad|iPod).*Mac OS X.*Version/(\\d+)\\.(\\d+)"); -parser[1] = "iOS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[28] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(AppleTV)/(\\d+)\\.(\\d+)"); -parser[1] = "ATV OS X"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[29] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(CrOS) [a-z0-9_]+ (\\d+)\\.(\\d+)(?:\\.(\\d+))?"); -parser[1] = "Chrome OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[30] = parser; -parser = Object.create(null); -parser[0] = new RegExp("([Dd]ebian)"); -parser[1] = "Debian"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[31] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Linux Mint)(?:/(\\d+))?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[32] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Mandriva)(?: Linux)?/(?:[\\d.-]+m[a-z]{2}(\\d+).(\\d))?"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[33] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Symbian[Oo][Ss])/(\\d+)\\.(\\d+)"); -parser[1] = "Symbian OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[34] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Symbian/3).+NokiaBrowser/7\\.3"); -parser[1] = "Symbian^3 Anna"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[35] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Symbian/3).+NokiaBrowser/7\\.4"); -parser[1] = "Symbian^3 Belle"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[36] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Symbian/3)"); -parser[1] = "Symbian^3"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[37] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Series 60|SymbOS|S60)"); -parser[1] = "Symbian OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[38] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(MeeGo)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[39] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Symbian [Oo][Ss]"); -parser[1] = "Symbian OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[40] = parser; -parser = Object.create(null); -parser[0] = new RegExp("Series40;"); -parser[1] = "Nokia Series 40"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[41] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(BB10);.+Version/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "BlackBerry OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[42] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Black[Bb]erry)[0-9a-z]+/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?"); -parser[1] = "BlackBerry OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[43] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Black[Bb]erry).+Version/(\\d+)\\.(\\d+)\\.(\\d+)(?:\\.(\\d+))?"); -parser[1] = "BlackBerry OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[44] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(RIM Tablet OS) (\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "BlackBerry Tablet OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[45] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Play[Bb]ook)"); -parser[1] = "BlackBerry Tablet OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[46] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Black[Bb]erry)"); -parser[1] = "BlackBerry OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[47] = parser; -parser = Object.create(null); -parser[0] = new RegExp("\\(Mobile;.+Firefox/\\d+\\.\\d+"); -parser[1] = "Firefox OS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[48] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(BREW)[ /](\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[49] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(BREW);"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[50] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Brew MP|BMP)[ /](\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = "Brew MP"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[51] = parser; -parser = Object.create(null); -parser[0] = new RegExp("BMP;"); -parser[1] = "Brew MP"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[52] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(GoogleTV) (\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[53] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(GoogleTV)/[\\da-z]+"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[54] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(WebTV)/(\\d+).(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[55] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(hpw|web)OS/(\\d+)\\.(\\d+)(?:\\.(\\d+))?"); -parser[1] = "webOS"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[56] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(VRE);"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[57] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Fedora|Red Hat|PCLinuxOS)/(\\d+)\\.(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[58] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Red Hat|Puppy|PCLinuxOS)/(\\d+)\\.(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[59] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Ubuntu|Kindle|Bada|Lubuntu|BackTrack|Red Hat|Slackware)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[60] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Windows|OpenBSD|FreeBSD|NetBSD|Android|WeTab)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[61] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Ubuntu|Kubuntu|Arch Linux|CentOS|Slackware|Gentoo|openSUSE|SUSE|Red Hat|Fedora|PCLinuxOS|Gentoo|Mageia)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[62] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Linux)/(\\d+)\\.(\\d+)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[63] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Linux|BSD)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[64] = parser; -parser = Object.create(null); -parser[0] = new RegExp("SunOS"); -parser[1] = "Solaris"; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[65] = parser; -parser = Object.create(null); -parser[0] = new RegExp("(Red Hat)"); -parser[1] = 0; -parser[2] = 0; -parser[3] = 0; -parser[4] = 0; -exports.os[66] = parser; - -exports.os.length = 67; \ No newline at end of file diff --git a/node_modules/karma/node_modules/useragent/lib/update.js b/node_modules/karma/node_modules/useragent/lib/update.js deleted file mode 100644 index eb05092f..00000000 --- a/node_modules/karma/node_modules/useragent/lib/update.js +++ /dev/null @@ -1,202 +0,0 @@ -'use strict'; - -/** - * Build in Native modules. - */ -var path = require('path') - , fs = require('fs') - , vm = require('vm'); - -/** - * Third party modules. - */ -var request = require('request') - , yaml = require('yamlparser'); - -exports.update = function update(callback) { - // Fetch the remote resource as that is frequently updated - request(exports.remote, function downloading(err, res, remote) { - if (err) return callback(err); - if (res.statusCode !== 200) return callback(new Error('Invalid statusCode returned')); - - // Also get some local additions that are missing from the source - fs.readFile(exports.local, 'utf8', function reading(err, local) { - if (err) return callback(err); - - // Parse the contents - exports.parse([ remote, local ], function parsing(err, results, source) { - callback(err, results); - - if (source && !err) { - fs.writeFile(exports.output, source, function idk(err) { - if (err) { - console.error('Failed to save the generated file due to reasons', err); - } - }); - } - }); - }); - }); -}; - -exports.parse = function parse(sources, callback) { - var results = {}; - - var data = sources.reduce(function parser(memo, data) { - // Try to repair some of the odd structures that are in the yaml files - // before parsing it so we generate a uniform structure: - - // Normalize the Operating system versions: - data = data.replace(/os_v([1-3])_replacement/gim, function replace(match, version) { - return 'v'+ version +'_replacement'; - }); - - // Make sure that we are able to parse the yaml string - try { data = yaml.eval(data); } - catch (e) { - callback(e); - callback = null; - return memo; - } - - // merge the data with the memo; - Object.keys(data).forEach(function (key) { - var results = data[key]; - memo[key] = memo[key] || []; - - for (var i = 0, l = results.length; i < l; i++) { - memo[key].push(results[i]); - } - }); - - return memo; - }, {}); - - [ - { - resource: 'user_agent_parsers' - , replacement: 'family_replacement' - , name: 'browser' - } - , { - resource: 'device_parsers' - , replacement: 'device_replacement' - , name: 'device' - } - , { - resource: 'os_parsers' - , replacement: 'os_replacement' - , name: 'os' - } - ].forEach(function parsing(details) { - results[details.resource] = results[details.resource] || []; - - var resources = data[details.resource] - , name = details.resource.replace('_parsers', '') - , resource - , parser; - - for (var i = 0, l = resources.length; i < l; i++) { - resource = resources[i]; - - // We need to JSON stringify the data to properly add slashes escape other - // kinds of crap in the RegularExpression. If we don't do thing we get - // some illegal token warnings. - parser = 'parser = Object.create(null);\n'; - parser += 'parser[0] = new RegExp('+ JSON.stringify(resource.regex) + ');\n'; - - // Check if we have replacement for the parsed family name - if (resource[details.replacement]) { - parser += 'parser[1] = "'+ resource[details.replacement].replace('"', '\\"') +'";'; - } else { - parser += 'parser[1] = 0;'; - } - - parser += '\n'; - - if (resource.v1_replacement) { - parser += 'parser[2] = "'+ resource.v1_replacement.replace('"', '\\"') +'";'; - } else { - parser += 'parser[2] = 0;'; - } - - parser += '\n'; - - if (resource.v2_replacement) { - parser += 'parser[3] = "'+ resource.v2_replacement.replace('"', '\\"') +'";'; - } else { - parser += 'parser[3] = 0;'; - } - - parser += '\n'; - - if (resource.v3_replacement) { - parser += 'parser[4] = "'+ resource.v3_replacement.replace('"', '\\"') +'";'; - } else { - parser += 'parser[4] = 0;'; - } - - parser += '\n'; - parser += 'exports.'+ details.name +'['+ i +'] = parser;'; - results[details.resource].push(parser); - } - }); - - // Generate a correct format - exports.generate(results, callback); -}; - -exports.generate = function generate(results, callback) { - var regexps = [ - 'var parser;' - , 'exports.browser = Object.create(null);' - , results.user_agent_parsers.join('\n') - , 'exports.browser.length = '+ results.user_agent_parsers.length +';' - - , 'exports.device = Object.create(null);' - , results.device_parsers.join('\n') - , 'exports.device.length = '+ results.device_parsers.length +';' - - , 'exports.os = Object.create(null);' - , results.os_parsers.join('\n') - , 'exports.os.length = '+ results.os_parsers.length +';' - ].join('\n\n'); - - // Now that we have generated the structure for the RegExps export file we - // need to validate that we created a JavaScript compatible file, if we would - // write the file without checking it's content we could be breaking the - // module. - var sandbox = { - exports: {} // Emulate a module context, so everything is attached here - }; - - // Crossing our fingers that it worked - try { vm.runInNewContext(regexps, sandbox, 'validating.vm'); } - catch (e) { return callback(e, null, regexps); } - - callback(undefined, sandbox.exports, regexps); -}; - -/** - * The location of the ua-parser regexes yaml file. - * - * @type {String} - * @api private - */ -exports.remote = 'https://raw.github.com/tobie/ua-parser/master/regexes.yaml'; - -/** - * The location of our local regexes yaml file. - * - * @type {String} - * @api private - */ -exports.local = path.resolve(__dirname, '..', 'static', 'user_agent.after.yaml'); - -/** - * The the output location for the generated regexps file - * - * @type {String} - * @api private - */ -exports.output = path.resolve(__dirname, '..', 'lib', 'regexps.js'); diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/.npmignore b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/.npmignore deleted file mode 100644 index 07e6e472..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/.npmignore +++ /dev/null @@ -1 +0,0 @@ -/node_modules diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/AUTHORS b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/AUTHORS deleted file mode 100644 index 016d7fbe..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -# Authors, sorted by whether or not they are me -Isaac Z. Schlueter -Carlos Brito Lage -Marko Mikulicic -Trent Mick -Kevin O'Hara -Marco Rogers -Jesse Dailey diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/LICENSE b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/LICENSE deleted file mode 100644 index 05a40109..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -Copyright 2009, 2010, 2011 Isaac Z. Schlueter. -All rights reserved. - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/README.md b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/README.md deleted file mode 100644 index 9aeb3164..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/README.md +++ /dev/null @@ -1,88 +0,0 @@ -# lru cache - -A cache object that deletes the least-recently-used items. - -## Usage: - -```javascript -var LRU = require("lru-cache") - , options = { max: 500 - , length: function (n) { return n * 2 } - , dispose: function (key, n) { n.close() } - , maxAge: 1000 * 60 * 60 } - , cache = LRU(options) - , otherCache = LRU(50) // sets just the max size - -cache.set("key", "value") -cache.get("key") // "value" - -cache.reset() // empty the cache -``` - -If you put more stuff in it, then items will fall out. - -If you try to put an oversized thing in it, then it'll fall out right -away. - -## Options - -* `max` The maximum size of the cache, checked by applying the length - function to all values in the cache. Not setting this is kind of - silly, since that's the whole purpose of this lib, but it defaults - to `Infinity`. -* `maxAge` Maximum age in ms. Items are not pro-actively pruned out - as they age, but if you try to get an item that is too old, it'll - drop it and return undefined instead of giving it to you. -* `length` Function that is used to calculate the length of stored - items. If you're storing strings or buffers, then you probably want - to do something like `function(n){return n.length}`. The default is - `function(n){return 1}`, which is fine if you want to store `n` - like-sized things. -* `dispose` Function that is called on items when they are dropped - from the cache. This can be handy if you want to close file - descriptors or do other cleanup tasks when items are no longer - accessible. Called with `key, value`. It's called *before* - actually removing the item from the internal cache, so if you want - to immediately put it back in, you'll have to do that in a - `nextTick` or `setTimeout` callback or it won't do anything. -* `stale` By default, if you set a `maxAge`, it'll only actually pull - stale items out of the cache when you `get(key)`. (That is, it's - not pre-emptively doing a `setTimeout` or anything.) If you set - `stale:true`, it'll return the stale value before deleting it. If - you don't set this, then it'll return `undefined` when you try to - get a stale entry, as if it had already been deleted. - -## API - -* `set(key, value)` -* `get(key) => value` - - Both of these will update the "recently used"-ness of the key. - They do what you think. - -* `del(key)` - - Deletes a key out of the cache. - -* `reset()` - - Clear the cache entirely, throwing away all values. - -* `has(key)` - - Check if a key is in the cache, without updating the recent-ness - or deleting it for being stale. - -* `forEach(function(value,key,cache), [thisp])` - - Just like `Array.prototype.forEach`. Iterates over all the keys - in the cache, in order of recent-ness. (Ie, more recently used - items are iterated over first.) - -* `keys()` - - Return an array of the keys in the cache. - -* `values()` - - Return an array of the values in the cache. diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/lib/lru-cache.js b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/lib/lru-cache.js deleted file mode 100644 index 4ae51ac3..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/lib/lru-cache.js +++ /dev/null @@ -1,242 +0,0 @@ -;(function () { // closure for web browsers - -if (typeof module === 'object' && module.exports) { - module.exports = LRUCache -} else { - // just set the global for non-node platforms. - this.LRUCache = LRUCache -} - -function hOP (obj, key) { - return Object.prototype.hasOwnProperty.call(obj, key) -} - -function naiveLength () { return 1 } - -function LRUCache (options) { - if (!(this instanceof LRUCache)) { - return new LRUCache(options) - } - - var max - if (typeof options === 'number') { - max = options - options = { max: max } - } - - if (!options) options = {} - - max = options.max - - var lengthCalculator = options.length || naiveLength - - if (typeof lengthCalculator !== "function") { - lengthCalculator = naiveLength - } - - if (!max || !(typeof max === "number") || max <= 0 ) { - // a little bit silly. maybe this should throw? - max = Infinity - } - - var allowStale = options.stale || false - - var maxAge = options.maxAge || null - - var dispose = options.dispose - - var cache = Object.create(null) // hash of items by key - , lruList = Object.create(null) // list of items in order of use recency - , mru = 0 // most recently used - , lru = 0 // least recently used - , length = 0 // number of items in the list - , itemCount = 0 - - - // resize the cache when the max changes. - Object.defineProperty(this, "max", - { set : function (mL) { - if (!mL || !(typeof mL === "number") || mL <= 0 ) mL = Infinity - max = mL - // if it gets above double max, trim right away. - // otherwise, do it whenever it's convenient. - if (length > max) trim() - } - , get : function () { return max } - , enumerable : true - }) - - // resize the cache when the lengthCalculator changes. - Object.defineProperty(this, "lengthCalculator", - { set : function (lC) { - if (typeof lC !== "function") { - lengthCalculator = naiveLength - length = itemCount - for (var key in cache) { - cache[key].length = 1 - } - } else { - lengthCalculator = lC - length = 0 - for (var key in cache) { - cache[key].length = lengthCalculator(cache[key].value) - length += cache[key].length - } - } - - if (length > max) trim() - } - , get : function () { return lengthCalculator } - , enumerable : true - }) - - Object.defineProperty(this, "length", - { get : function () { return length } - , enumerable : true - }) - - - Object.defineProperty(this, "itemCount", - { get : function () { return itemCount } - , enumerable : true - }) - - this.forEach = function (fn, thisp) { - thisp = thisp || this - var i = 0; - for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) { - i++ - var hit = lruList[k] - fn.call(thisp, hit.value, hit.key, this) - } - } - - this.keys = function () { - var keys = new Array(itemCount) - var i = 0 - for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) { - var hit = lruList[k] - keys[i++] = hit.key - } - return keys - } - - this.values = function () { - var values = new Array(itemCount) - var i = 0 - for (var k = mru - 1; k >= 0 && i < itemCount; k--) if (lruList[k]) { - var hit = lruList[k] - values[i++] = hit.value - } - return values - } - - this.reset = function () { - if (dispose) { - for (var k in cache) { - dispose(k, cache[k].value) - } - } - cache = {} - lruList = {} - lru = 0 - mru = 0 - length = 0 - itemCount = 0 - } - - // Provided for debugging/dev purposes only. No promises whatsoever that - // this API stays stable. - this.dump = function () { - return cache - } - - this.dumpLru = function () { - return lruList - } - - this.set = function (key, value) { - if (hOP(cache, key)) { - // dispose of the old one before overwriting - if (dispose) dispose(key, cache[key].value) - if (maxAge) cache[key].now = Date.now() - cache[key].value = value - this.get(key) - return true - } - - var len = lengthCalculator(value) - var age = maxAge ? Date.now() : 0 - var hit = new Entry(key, value, mru++, len, age) - - // oversized objects fall out of cache automatically. - if (hit.length > max) { - if (dispose) dispose(key, value) - return false - } - - length += hit.length - lruList[hit.lu] = cache[key] = hit - itemCount ++ - - if (length > max) trim() - return true - } - - this.has = function (key) { - if (!hOP(cache, key)) return false - var hit = cache[key] - if (maxAge && (Date.now() - hit.now > maxAge)) { - return false - } - return true - } - - this.get = function (key) { - if (!hOP(cache, key)) return - var hit = cache[key] - if (maxAge && (Date.now() - hit.now > maxAge)) { - this.del(key) - return allowStale ? hit.value : undefined - } - shiftLU(hit) - hit.lu = mru ++ - lruList[hit.lu] = hit - return hit.value - } - - this.del = function (key) { - del(cache[key]) - } - - function trim () { - while (lru < mru && length > max) - del(lruList[lru]) - } - - function shiftLU(hit) { - delete lruList[ hit.lu ] - while (lru < mru && !lruList[lru]) lru ++ - } - - function del(hit) { - if (hit) { - if (dispose) dispose(hit.key, hit.value) - length -= hit.length - itemCount -- - delete cache[ hit.key ] - shiftLU(hit) - } - } -} - -// classy, since V8 prefers predictable objects. -function Entry (key, value, mru, len, age) { - this.key = key - this.value = value - this.lu = mru - this.length = len - this.now = age -} - -})() diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/package.json b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/package.json deleted file mode 100644 index 229a2045..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/package.json +++ /dev/null @@ -1,63 +0,0 @@ -{ - "name": "lru-cache", - "description": "A cache object that deletes the least-recently-used items.", - "version": "2.2.4", - "author": { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - "scripts": { - "test": "tap test --gc" - }, - "main": "lib/lru-cache.js", - "repository": { - "type": "git", - "url": "git://github.com/isaacs/node-lru-cache.git" - }, - "devDependencies": { - "tap": "", - "weak": "" - }, - "license": { - "type": "MIT", - "url": "http://github.com/isaacs/node-lru-cache/raw/master/LICENSE" - }, - "contributors": [ - { - "name": "Isaac Z. Schlueter", - "email": "i@izs.me" - }, - { - "name": "Carlos Brito Lage", - "email": "carlos@carloslage.net" - }, - { - "name": "Marko Mikulicic", - "email": "marko.mikulicic@isti.cnr.it" - }, - { - "name": "Trent Mick", - "email": "trentm@gmail.com" - }, - { - "name": "Kevin O'Hara", - "email": "kevinohara80@gmail.com" - }, - { - "name": "Marco Rogers", - "email": "marco.rogers@gmail.com" - }, - { - "name": "Jesse Dailey", - "email": "jesse.dailey@gmail.com" - } - ], - "readme": "# lru cache\n\nA cache object that deletes the least-recently-used items.\n\n## Usage:\n\n```javascript\nvar LRU = require(\"lru-cache\")\n , options = { max: 500\n , length: function (n) { return n * 2 }\n , dispose: function (key, n) { n.close() }\n , maxAge: 1000 * 60 * 60 }\n , cache = LRU(options)\n , otherCache = LRU(50) // sets just the max size\n\ncache.set(\"key\", \"value\")\ncache.get(\"key\") // \"value\"\n\ncache.reset() // empty the cache\n```\n\nIf you put more stuff in it, then items will fall out.\n\nIf you try to put an oversized thing in it, then it'll fall out right\naway.\n\n## Options\n\n* `max` The maximum size of the cache, checked by applying the length\n function to all values in the cache. Not setting this is kind of\n silly, since that's the whole purpose of this lib, but it defaults\n to `Infinity`.\n* `maxAge` Maximum age in ms. Items are not pro-actively pruned out\n as they age, but if you try to get an item that is too old, it'll\n drop it and return undefined instead of giving it to you.\n* `length` Function that is used to calculate the length of stored\n items. If you're storing strings or buffers, then you probably want\n to do something like `function(n){return n.length}`. The default is\n `function(n){return 1}`, which is fine if you want to store `n`\n like-sized things.\n* `dispose` Function that is called on items when they are dropped\n from the cache. This can be handy if you want to close file\n descriptors or do other cleanup tasks when items are no longer\n accessible. Called with `key, value`. It's called *before*\n actually removing the item from the internal cache, so if you want\n to immediately put it back in, you'll have to do that in a\n `nextTick` or `setTimeout` callback or it won't do anything.\n* `stale` By default, if you set a `maxAge`, it'll only actually pull\n stale items out of the cache when you `get(key)`. (That is, it's\n not pre-emptively doing a `setTimeout` or anything.) If you set\n `stale:true`, it'll return the stale value before deleting it. If\n you don't set this, then it'll return `undefined` when you try to\n get a stale entry, as if it had already been deleted.\n\n## API\n\n* `set(key, value)`\n* `get(key) => value`\n\n Both of these will update the \"recently used\"-ness of the key.\n They do what you think.\n\n* `del(key)`\n\n Deletes a key out of the cache.\n\n* `reset()`\n\n Clear the cache entirely, throwing away all values.\n\n* `has(key)`\n\n Check if a key is in the cache, without updating the recent-ness\n or deleting it for being stale.\n\n* `forEach(function(value,key,cache), [thisp])`\n\n Just like `Array.prototype.forEach`. Iterates over all the keys\n in the cache, in order of recent-ness. (Ie, more recently used\n items are iterated over first.)\n\n* `keys()`\n\n Return an array of the keys in the cache.\n\n* `values()`\n\n Return an array of the values in the cache.\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/isaacs/node-lru-cache/issues" - }, - "homepage": "https://github.com/isaacs/node-lru-cache", - "_id": "lru-cache@2.2.4", - "_from": "lru-cache@2.2.x" -} diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/s.js b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/s.js deleted file mode 100644 index c2a9e548..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/s.js +++ /dev/null @@ -1,25 +0,0 @@ -var LRU = require('lru-cache'); - -var max = +process.argv[2] || 10240; -var more = 1024; - -var cache = LRU({ - max: max, maxAge: 86400e3 -}); - -// fill cache -for (var i = 0; i < max; ++i) { - cache.set(i, {}); -} - -var start = process.hrtime(); - -// adding more items -for ( ; i < max+more; ++i) { - cache.set(i, {}); -} - -var end = process.hrtime(start); -var msecs = end[0] * 1E3 + end[1] / 1E6; - -console.log('adding %d items took %d ms', more, msecs.toPrecision(5)); diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/basic.js b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/basic.js deleted file mode 100644 index 55d52633..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/basic.js +++ /dev/null @@ -1,317 +0,0 @@ -var test = require("tap").test - , LRU = require("../") - -test("basic", function (t) { - var cache = new LRU({max: 10}) - cache.set("key", "value") - t.equal(cache.get("key"), "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.length, 1) - t.equal(cache.max, 10) - t.end() -}) - -test("least recently set", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), "B") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.set("b", "B") - cache.get("a") - cache.set("c", "C") - t.equal(cache.get("c"), "C") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), "A") - t.end() -}) - -test("del", function (t) { - var cache = new LRU(2) - cache.set("a", "A") - cache.del("a") - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("max", function (t) { - var cache = new LRU(3) - - // test changing the max, verify that the LRU items get dropped. - cache.max = 100 - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - - // now remove the max restriction, and try again. - cache.max = "hello" - for (var i = 0; i < 100; i ++) cache.set(i, i) - t.equal(cache.length, 100) - for (var i = 0; i < 100; i ++) { - t.equal(cache.get(i), i) - } - // should trigger an immediate resize - cache.max = 3 - t.equal(cache.length, 3) - for (var i = 0; i < 97; i ++) { - t.equal(cache.get(i), undefined) - } - for (var i = 98; i < 100; i ++) { - t.equal(cache.get(i), i) - } - t.end() -}) - -test("reset", function (t) { - var cache = new LRU(10) - cache.set("a", "A") - cache.set("b", "B") - cache.reset() - t.equal(cache.length, 0) - t.equal(cache.max, 10) - t.equal(cache.get("a"), undefined) - t.equal(cache.get("b"), undefined) - t.end() -}) - - -// Note: `.dump()` is a debugging tool only. No guarantees are made -// about the format/layout of the response. -test("dump", function (t) { - var cache = new LRU(10) - var d = cache.dump(); - t.equal(Object.keys(d).length, 0, "nothing in dump for empty cache") - cache.set("a", "A") - var d = cache.dump() // { a: { key: "a", value: "A", lu: 0 } } - t.ok(d.a) - t.equal(d.a.key, "a") - t.equal(d.a.value, "A") - t.equal(d.a.lu, 0) - - cache.set("b", "B") - cache.get("b") - d = cache.dump() - t.ok(d.b) - t.equal(d.b.key, "b") - t.equal(d.b.value, "B") - t.equal(d.b.lu, 2) - - t.end() -}) - - -test("basic with weighed length", function (t) { - var cache = new LRU({ - max: 100, - length: function (item) { return item.size } - }) - cache.set("key", {val: "value", size: 50}) - t.equal(cache.get("key").val, "value") - t.equal(cache.get("nada"), undefined) - t.equal(cache.lengthCalculator(cache.get("key")), 50) - t.equal(cache.length, 50) - t.equal(cache.max, 100) - t.end() -}) - - -test("weighed length item too large", function (t) { - var cache = new LRU({ - max: 10, - length: function (item) { return item.size } - }) - t.equal(cache.max, 10) - - // should fall out immediately - cache.set("key", {val: "value", size: 50}) - - t.equal(cache.length, 0) - t.equal(cache.get("key"), undefined) - t.end() -}) - -test("least recently set with weighed length", function (t) { - var cache = new LRU({ - max:8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.set("d", "DDDD") - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("c"), "CCC") - t.equal(cache.get("b"), undefined) - t.equal(cache.get("a"), undefined) - t.end() -}) - -test("lru recently gotten with weighed length", function (t) { - var cache = new LRU({ - max: 8, - length: function (item) { return item.length } - }) - cache.set("a", "A") - cache.set("b", "BB") - cache.set("c", "CCC") - cache.get("a") - cache.get("b") - cache.set("d", "DDDD") - t.equal(cache.get("c"), undefined) - t.equal(cache.get("d"), "DDDD") - t.equal(cache.get("b"), "BB") - t.equal(cache.get("a"), "A") - t.end() -}) - -test("set returns proper booleans", function(t) { - var cache = new LRU({ - max: 5, - length: function (item) { return item.length } - }) - - t.equal(cache.set("a", "A"), true) - - // should return false for max exceeded - t.equal(cache.set("b", "donuts"), false) - - t.equal(cache.set("b", "B"), true) - t.equal(cache.set("c", "CCCC"), true) - t.end() -}) - -test("drop the old items", function(t) { - var cache = new LRU({ - max: 5, - maxAge: 50 - }) - - cache.set("a", "A") - - setTimeout(function () { - cache.set("b", "b") - t.equal(cache.get("a"), "A") - }, 25) - - setTimeout(function () { - cache.set("c", "C") - // timed out - t.notOk(cache.get("a")) - }, 60) - - setTimeout(function () { - t.notOk(cache.get("b")) - t.equal(cache.get("c"), "C") - }, 90) - - setTimeout(function () { - t.notOk(cache.get("c")) - t.end() - }, 155) -}) - -test("disposal function", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - dispose: function (k, n) { - disposed = n - } - }) - - cache.set(1, 1) - cache.set(2, 2) - t.equal(disposed, 1) - cache.set(3, 3) - t.equal(disposed, 2) - cache.reset() - t.equal(disposed, 3) - t.end() -}) - -test("disposal function on too big of item", function(t) { - var disposed = false - var cache = new LRU({ - max: 1, - length: function (k) { - return k.length - }, - dispose: function (k, n) { - disposed = n - } - }) - var obj = [ 1, 2 ] - - t.equal(disposed, false) - cache.set("obj", obj) - t.equal(disposed, obj) - t.end() -}) - -test("has()", function(t) { - var cache = new LRU({ - max: 1, - maxAge: 10 - }) - - cache.set('foo', 'bar') - t.equal(cache.has('foo'), true) - cache.set('blu', 'baz') - t.equal(cache.has('foo'), false) - t.equal(cache.has('blu'), true) - setTimeout(function() { - t.equal(cache.has('blu'), false) - t.end() - }, 15) -}) - -test("stale", function(t) { - var cache = new LRU({ - maxAge: 10, - stale: true - }) - - cache.set('foo', 'bar') - t.equal(cache.get('foo'), 'bar') - t.equal(cache.has('foo'), true) - setTimeout(function() { - t.equal(cache.has('foo'), false) - t.equal(cache.get('foo'), 'bar') - t.equal(cache.get('foo'), undefined) - t.end() - }, 15) -}) - -test("lru update via set", function(t) { - var cache = LRU({ max: 2 }); - - cache.set('foo', 1); - cache.set('bar', 2); - cache.del('bar'); - cache.set('baz', 3); - cache.set('qux', 4); - - t.equal(cache.get('foo'), undefined) - t.equal(cache.get('bar'), undefined) - t.equal(cache.get('baz'), 3) - t.equal(cache.get('qux'), 4) - t.end() -}) diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/foreach.js b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/foreach.js deleted file mode 100644 index eefb80d9..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/foreach.js +++ /dev/null @@ -1,52 +0,0 @@ -var test = require('tap').test -var LRU = require('../') - -test('forEach', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - var i = 9 - l.forEach(function (val, key, cache) { - t.equal(cache, l) - t.equal(key, i.toString()) - t.equal(val, i.toString(2)) - i -= 1 - }) - - // get in order of most recently used - l.get(6) - l.get(8) - - var order = [ 8, 6, 9, 7, 5 ] - var i = 0 - - l.forEach(function (val, key, cache) { - var j = order[i ++] - t.equal(cache, l) - t.equal(key, j.toString()) - t.equal(val, j.toString(2)) - }) - - t.end() -}) - -test('keys() and values()', function (t) { - var l = new LRU(5) - for (var i = 0; i < 10; i ++) { - l.set(i.toString(), i.toString(2)) - } - - t.similar(l.keys(), ['9', '8', '7', '6', '5']) - t.similar(l.values(), ['1001', '1000', '111', '110', '101']) - - // get in order of most recently used - l.get(6) - l.get(8) - - t.similar(l.keys(), ['8', '6', '9', '7', '5']) - t.similar(l.values(), ['1000', '110', '1001', '111', '101']) - - t.end() -}) diff --git a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/memory-leak.js b/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/memory-leak.js deleted file mode 100644 index 7af45b02..00000000 --- a/node_modules/karma/node_modules/useragent/node_modules/lru-cache/test/memory-leak.js +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env node --expose_gc - -var weak = require('weak'); -var test = require('tap').test -var LRU = require('../') -var l = new LRU({ max: 10 }) -var refs = 0 -function X() { - refs ++ - weak(this, deref) -} - -function deref() { - refs -- -} - -test('no leaks', function (t) { - // fill up the cache - for (var i = 0; i < 100; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var start = process.memoryUsage() - - // capture the memory - var startRefs = refs - - // do it again, but more - for (var i = 0; i < 10000; i++) { - l.set(i, new X); - // throw some gets in there, too. - if (i % 2 === 0) - l.get(i / 2) - } - - gc() - - var end = process.memoryUsage() - t.equal(refs, startRefs, 'no leaky refs') - - console.error('start: %j\n' + - 'end: %j', start, end); - t.pass(); - t.end(); -}) diff --git a/node_modules/karma/node_modules/useragent/package.json b/node_modules/karma/node_modules/useragent/package.json deleted file mode 100644 index 9bdd8ecf..00000000 --- a/node_modules/karma/node_modules/useragent/package.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "useragent", - "version": "2.0.7", - "description": "Fastest, most accurate & effecient user agent string parser, uses Browserscope's research for parsing", - "author": { - "name": "Arnout Kazemier" - }, - "main": "./index.js", - "keywords": [ - "agent", - "browser", - "browserscope", - "os", - "parse", - "parser", - "ua", - "ua-parse", - "ua-parser", - "user agent", - "user", - "user-agent", - "useragent", - "version" - ], - "maintainers": [ - { - "name": "Arnout Kazemier", - "email": "info@3rd-Eden.com", - "url": "http://www.3rd-Eden.com" - } - ], - "license": { - "type": "MIT", - "url": "https://github.com/3rd-Eden/useragent/blob/master/LICENSE" - }, - "repository": { - "type": "git", - "url": "http://github.com/3rd-Eden/useragent.git" - }, - "devDependencies": { - "should": "*", - "mocha": "*", - "long-stack-traces": "0.1.x", - "yamlparser": "0.0.x", - "request": "2.9.x", - "semver": "1.0.x", - "pre-commit": "0.0.x" - }, - "pre-commit": [ - "test", - "update" - ], - "scripts": { - "test": "mocha $(find test -name '*.test.js')", - "qa": "mocha --ui exports $(find test -name '*.qa.js')", - "update": "node ./bin/update.js" - }, - "dependencies": { - "lru-cache": "2.2.x" - }, - "readme": "# useragent - high performance user agent parser for Node.js\n\nUseragent originated as port of [browserscope.org][browserscope]'s user agent\nparser project also known as ua-parser. Useragent allows you to parse user agent\nstring with high accuracy by using hand tuned dedicated regular expressions for\nbrowser matching. This database is needed to ensure that every browser is\ncorrectly parsed as every browser vendor implements it's own user agent schema.\nThis is why regular user agent parsers have major issues because they will\nmost likely parse out the wrong browser name or confuse the render engine version\nwith the actual version of the browser.\n\n---\n\n### Build status [![BuildStatus](https://secure.travis-ci.org/3rd-Eden/useragent.png?branch=master)](http://travis-ci.org/3rd-Eden/useragent)\n\n---\n\n### High performance\n\nThe module has been developed with a benchmark driven approach. It has a\npre-compiled library that contains all the Regular Expressions and uses deferred\nor on demand parsing for Operating System and device information. All this\nengineering effort has been worth it as [this benchmark shows][benchmark]:\n\n```\nStarting the benchmark, parsing 62 useragent strings per run\n\nExecuted benchmark against node module: \"useragent\"\nCount (61), Cycles (5), Elapsed (5.559), Hz (1141.3739447904327)\n\nExecuted benchmark against node module: \"useragent_parser\"\nCount (29), Cycles (3), Elapsed (5.448), Hz (545.6817291171243)\n\nExecuted benchmark against node module: \"useragent-parser\"\nCount (16), Cycles (4), Elapsed (5.48), Hz (304.5373431830105)\n\nExecuted benchmark against node module: \"ua-parser\"\nCount (54), Cycles (3), Elapsed (5.512), Hz (1018.7561434659247)\n\nModule: \"useragent\" is the user agent fastest parser.\n```\n\n---\n\n### Installation\n\nInstallation is done using the Node Package Manager (NPM). If you don't have\nNPM installed on your system you can download it from\n[npmjs.org][npm]\n\n```\nnpm install useragent --save\n```\n\nThe `--save` flag tells NPM to automatically add it to your `package.json` file.\n\n---\n\n### API\n\n\nInclude the `useragent` parser in you node.js application:\n\n```js\nvar useragent = require('useragent');\n```\n\nThe `useragent` library allows you do use the automatically installed RegExp\nlibrary or you can fetch it live from the remote servers. So if you are\nparanoid and always want your RegExp library to be up to date to match with\nagent the widest range of `useragent` strings you can do:\n\n```js\nvar useragent = require('useragent');\nuseragent(true);\n```\n\nThis will async load the database from the server and compile it to a proper\nJavaScript supported format. If it fails to compile or load it from the remote\nlocation it will just fall back silently to the shipped version. If you want to\nuse this feature you need to add `yamlparser` and `request` to your package.json\n\n```\nnpm install yamlparser --save\nnpm install request --save\n```\n\n#### useragent.parse(useragent string[, js useragent]);\n\nThis is the actual user agent parser, this is where all the magic is happening.\nThe function accepts 2 arguments, both should be a `string`. The first argument\nshould the user agent string that is known on the server from the\n`req.headers.useragent` header. The other argument is optional and should be\nthe user agent string that you see in the browser, this can be send from the\nbrowser using a xhr request or something like this. This allows you detect if\nthe user is browsing the web using the `Chrome Frame` extension.\n\nThe parser returns a Agent instance, this allows you to output user agent\ninformation in different predefined formats. See the Agent section for more\ninformation.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\n\n// example for parsing both the useragent header and a optional js useragent\nvar agent2 = useragent.parse(req.headers['user-agent'], req.query.jsuseragent);\n```\n\nThe parse method returns a `Agent` instance which contains all details about the\nuser agent. See the Agent section of the API documentation for the available\nmethods.\n\n#### useragent.lookup(useragent string[, js useragent]);\n\nThis provides the same functionality as above, but it caches the user agent\nstring and it's parsed result in memory to provide faster lookups in the\nfuture. This can be handy if you expect to parse a lot of user agent strings.\n\nIt uses the same arguments as the `useragent.parse` method and returns exactly\nthe same result, but it's just cached.\n\n```js\nvar agent = useragent.lookup(req.headers['user-agent']);\n```\n\nAnd this is a serious performance improvement as shown in this benchmark:\n\n```\nExecuted benchmark against method: \"useragent.parse\"\nCount (49), Cycles (3), Elapsed (5.534), Hz (947.6844321931629)\n\nExecuted benchmark against method: \"useragent.lookup\"\nCount (11758), Cycles (3), Elapsed (5.395), Hz (229352.03831239208)\n```\n\n#### useragent.fromJSON(obj);\n\nTransforms the JSON representation of a `Agent` instance back in to a working\n`Agent` instance\n\n```js\nvar agent = useragent.parse(req.headers['user-agent'])\n , another = useragent.fromJSON(JSON.stringify(agent));\n\nconsole.log(agent == another);\n```\n\n#### useragent.is(useragent string).browsername;\n\nThis api provides you with a quick and dirty browser lookup. The underlying\ncode is usually found on client side scripts so it's not the same quality as\nour `useragent.parse` method but it might be needed for legacy reasons.\n\n`useragent.is` returns a object with potential matched browser names\n\n```js\nuseragent.is(req.headers['user-agent']).firefox // true\nuseragent.is(req.headers['user-agent']).safari // false\nvar ua = useragent.is(req.headers['user-agent'])\n\n// the object\n{\n version: '3'\n webkit: false\n opera: false\n ie: false\n chrome: false\n safari: false\n mobile_safari: false\n firefox: true\n}\n```\n\n---\n\n### Agents, OperatingSystem and Device instances\n\nMost of the methods mentioned above return a Agent instance. The Agent exposes\nthe parsed out information from the user agent strings. This allows us to\nextend the agent with more methods that do not necessarily need to be in the\ncore agent instance, allowing us to expose a plugin interface for third party\ndevelopers and at the same time create a uniform interface for all versioning.\n\nThe Agent has the following property\n\n- `family` The browser family, or browser name, it defaults to Other.\n- `major` The major version number of the family, it defaults to 0.\n- `minor` The minor version number of the family, it defaults to 0.\n- `patch` The patch version number of the family, it defaults to 0.\n\nIn addition to the properties mentioned above, it also has 2 special properties,\nwhich are:\n\n- `os` OperatingSystem instance\n- `device` Device instance\n\nWhen you access those 2 properties the agent will do on demand parsing of the\nOperating System or/and Device information.\n\nThe OperatingSystem has the same properties as the Agent, for the Device we\ndon't have any versioning information available, so only the `family` property is\nset there. If we cannot find the family, they will default to `Other`.\n\nThe following methods are available:\n\n#### Agent.toAgent();\n\nReturns the family and version number concatinated in a nice human readable\nstring.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.toAgent(); // 'Chrome 15.0.874'\n```\n\n#### Agent.toString();\n\nReturns the results of the `Agent.toAgent()` but also adds the parsed operating\nsystem to the string in a human readable format.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.toString(); // 'Chrome 15.0.874 / Mac OS X 10.8.1'\n\n// as it's a to string method you can also concat it with another string\n'your useragent is ' + agent;\n// 'your useragent is Chrome 15.0.874 / Mac OS X 10.8.1'\n```\n#### Agent.toVersion();\n\nReturns the version of the browser in a human readable string.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.toVersion(); // '15.0.874'\n```\n\n#### Agent.toJSON();\n\nGenerates a JSON representation of the Agent. By using the `toJSON` method we\nautomatically allow it to be stringified when supplying as to the\n`JSON.stringify` method.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.toJSON(); // returns an object\n\nJSON.stringify(agent);\n```\n\n#### OperatingSystem.toString();\n\nGenerates a stringified version of operating system;\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.os.toString(); // 'Mac OSX 10.8.1'\n```\n\n#### OperatingSystem.toVersion();\n\nGenerates a stringified version of operating system's version;\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.os.toVersion(); // '10.8.1'\n```\n\n#### OperatingSystem.toJSON();\n\nGenerates a JSON representation of the OperatingSystem. By using the `toJSON`\nmethod we automatically allow it to be stringified when supplying as to the\n`JSON.stringify` method.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.os.toJSON(); // returns an object\n\nJSON.stringify(agent.os);\n```\n\n#### Device.toString();\n\nGenerates a stringified version of device;\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.device.toString(); // 'Asus A100'\n```\n\n#### Device.toVersion();\n\nGenerates a stringified version of device's version;\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.device.toVersion(); // '' , no version found but could also be '0.0.0'\n```\n\n#### Device.toJSON();\n\nGenerates a JSON representation of the Device. By using the `toJSON` method we\nautomatically allow it to be stringified when supplying as to the\n`JSON.stringify` method.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.device.toJSON(); // returns an object\n\nJSON.stringify(agent.device);\n```\n\n### Adding more features to the useragent\n\nAs I wanted to keep the core of the user agent parser as clean and fast as\npossible I decided to move some of the initially planned features to a new\n`plugin` file.\n\nThese extensions to the Agent prototype can be loaded by requiring the\n`useragent/features` file:\n\n```js\nvar useragent = require('useragent');\nrequire('useragent/features');\n```\n\nThe initial release introduces 1 new method, satisfies, which allows you to see\nif the version number of the browser satisfies a certain range. It uses the\nsemver library to do all the range calculations but here is a small summary of\nthe supported range styles:\n\n* `>1.2.3` Greater than a specific version.\n* `<1.2.3` Less than.\n* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`.\n* `~1.2.3` := `>=1.2.3 <1.3.0`.\n* `~1.2` := `>=1.2.0 <2.0.0`.\n* `~1` := `>=1.0.0 <2.0.0`.\n* `1.2.x` := `>=1.2.0 <1.3.0`.\n* `1.x` := `>=1.0.0 <2.0.0`.\n\nAs it requires the `semver` module to function you need to install it\nseperately:\n\n```\nnpm install semver --save\n```\n\n#### Agent.satisfies('range style here');\n\nCheck if the agent matches the supplied range.\n\n```js\nvar agent = useragent.parse(req.headers['user-agent']);\nagent.satisfies('15.x || >=19.5.0 || 25.0.0 - 17.2.3'); // true\nagent.satisfies('>16.12.0'); // false\n```\n---\n\n### Migrations\n\nFor small changes between version please review the [changelog][changelog].\n\n#### Upgrading from 1.10 to 2.0.0\n\n- `useragent.fromAgent` has been removed.\n- `agent.toJSON` now returns an Object, use `JSON.stringify(agent)` for the old\n behaviour.\n- `agent.os` is now an `OperatingSystem` instance with version numbers. If you\n still a string only representation do `agent.os.toString()`.\n- `semver` has been removed from the dependencies, so if you are using the\n `require('useragent/features')` you need to add it to your own dependencies\n\n#### Upgrading from 0.1.2 to 1.0.0\n\n- `useragent.browser(ua)` has been renamed to `useragent.is(ua)`.\n- `useragent.parser(ua, jsua)` has been renamed to `useragent.parse(ua, jsua)`.\n- `result.pretty()` has been renamed to `result.toAgent()`.\n- `result.V1` has been renamed to `result.major`.\n- `result.V2` has been renamed to `result.minor`.\n- `result.V3` has been renamed to `result.patch`.\n- `result.prettyOS()` has been removed.\n- `result.match` has been removed.\n\n---\n\n### License\n\nMIT\n\n[browserscope]: http://www.browserscope.org/\n[benchmark]: /3rd-Eden/useragent/blob/master/benchmark/run.js\n[changelog]: /3rd-Eden/useragent/blob/master/CHANGELOG.md\n[npm]: http://npmjs.org\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/3rd-Eden/useragent/issues" - }, - "homepage": "https://github.com/3rd-Eden/useragent", - "_id": "useragent@2.0.7", - "_from": "useragent@~2.0.4" -} diff --git a/node_modules/karma/node_modules/useragent/static/user_agent.after.yaml b/node_modules/karma/node_modules/useragent/static/user_agent.after.yaml deleted file mode 100644 index 66b0b0b7..00000000 --- a/node_modules/karma/node_modules/useragent/static/user_agent.after.yaml +++ /dev/null @@ -1,14 +0,0 @@ -user_agent_parsers: - # browsers - - regex: '(Thunderbird)/(\d+)\.(\d+)\.?(\d+)?' - - # command line tools - - regex: '(Wget)/(\d+)\.(\d+)\.?([ab]?\d+[a-z]*)' - - - regex: '(curl)/(\d+)\.(\d+)\.(\d+)' - family_replacement: 'cURL' - -os_parsers: - - regex: '(Red Hat)' - -device_parsers: diff --git a/node_modules/karma/node_modules/useragent/test/features.test.js b/node_modules/karma/node_modules/useragent/test/features.test.js deleted file mode 100644 index a6c3ee3a..00000000 --- a/node_modules/karma/node_modules/useragent/test/features.test.js +++ /dev/null @@ -1,16 +0,0 @@ -describe('useragent/features', function () { - 'use strict'; - - var useragent = require('../') - , features = require('../features') - , ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.24 Safari/535.2"; - - describe('#satisfies', function () { - it('should satisfy that range selector', function () { - var agent = useragent.parse(ua); - - agent.satisfies('15.x || >=19.5.0 || 25.0.0 - 17.2.3').should.be_true; - agent.satisfies('>16.12.0').should.be_false; - }); - }); -}); diff --git a/node_modules/karma/node_modules/useragent/test/fixtures/firefoxes.yaml b/node_modules/karma/node_modules/useragent/test/fixtures/firefoxes.yaml deleted file mode 100644 index 8c0d50b7..00000000 --- a/node_modules/karma/node_modules/useragent/test/fixtures/firefoxes.yaml +++ /dev/null @@ -1,1386 +0,0 @@ -# http://people.mozilla.com/~dwitte/ua.txt -# -# The following are some example User Agent strings for various versions of -# Firefox and other Gecko-based browsers. Many of these have been modified by -# extensions, external applications, distributions, and users. The version number -# for Firefox 5.0 (and the corresponding Gecko version) is tentative. See -# https://developer.mozilla.org/En/Gecko_User_Agent_String_Reference for more -# details. Credit to http://useragentstring.com/ for providing some of these -# strings. - -test_cases: - # Firefox 4.0 (prerelease) - - user_agent_string: Mozilla/5.0 (Windows NT 6.0; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - # Firefox 4.0.1 - - user_agent_string: Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (WindowsCE 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 - family: 'Firefox' - major: '4' - minor: '0' - patch: '1' - - # Firefox 4.0 (prerelease) - - user_agent_string: Mozilla/5.0 (Windows NT 6.0; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; rv:2.0b6pre) Gecko/20100903 Firefox/4.0b6pre Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: b6pre - - # Firefox 5.0 (version number tentative -- not yet released) - - user_agent_string: Mozilla/5.0 (Windows NT 5.2; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (WindowsCE 6.0; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux x86_64; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.1.1) Gecko/ Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - # Firefox 3.6 - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100804 Gentoo Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 SUSE/3.6.8-0.1.1 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.2.8) Gecko/20100722 Ubuntu/10.04 (lucid) Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; ru; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.8) Gecko/20100727 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.9.2.8) Gecko/20100725 Gentoo Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; FreeBSD i386; de-CH; rv:1.9.2.8) Gecko/20100729 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; pt-BR; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; he; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C) - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; de; rv:1.9.2.3) Gecko/20121221 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100722 BTRS86393 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0C) - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-TW; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 ( .NET CLR 3.5.30729; .NET4.0E) - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; ro; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en; rv:1.9.2.8) Gecko/20100805 Firefox/3.6.8 - family: 'Firefox' - major: '3' - minor: '6' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.7) Gecko/20100723 Fedora/3.6.7-1.fc13 Firefox/3.6.7 - family: 'Firefox' - major: '3' - minor: '6' - patch: '7' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.7) Gecko/20100726 CentOS/3.6-3.el5.centos Firefox/3.6.7 - family: 'Firefox' - major: '3' - minor: '6' - patch: '7' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; hu; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '7' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '7' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6 GTB7.0 - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.6) Gecko/20100628 Ubuntu/10.04 (lucid) Firefox/3.6.6 - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; pt-PT; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; nl; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.9.2.6) Gecko/20100625 Firefox/3.6.6 ( .NET CLR 3.5.30729; .NET4.0E) - family: 'Firefox' - major: '3' - minor: '6' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.4) Gecko/20100614 Ubuntu/10.04 (lucid) Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.4) Gecko/20100625 Gentoo Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.4) Gecko/20100513 Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; ja; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs; rv:1.9.2.4) Gecko/20100513 Firefox/3.6.4 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.9.2.4) Gecko/20100513 Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.2.4) Gecko/20100513 Firefox/3.6.4 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; fr; rv:1.9.2.4) Gecko/20100523 Firefox/3.6.4 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.4) Gecko/20100527 Firefox/3.6.4 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.4) Gecko/20100527 Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.4) Gecko/20100523 Firefox/3.6.4 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.4) Gecko/20100513 Firefox/3.6.4 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-CA; rv:1.9.2.4) Gecko/20100523 Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 GTB7.0 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.4) Gecko/20100513 Firefox/3.6.4 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.4) Gecko/20100503 Firefox/3.6.4 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; ko; rv:1.9.2.4) Gecko/20100523 Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; cs; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4 GTB7.0 - family: 'Firefox' - major: '3' - minor: '6' - patch: '4' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.2.3) Gecko/20100403 Fedora/3.6.3-4.fc13 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.3) Gecko/20100403 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; de; rv:1.9.2.3) Gecko/20100401 SUSE/3.6.3-1.1 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; ko-KR; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.3) Gecko/20100404 Ubuntu/10.04 (lucid) Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.3) Gecko/20100423 Ubuntu/10.04 (lucid) Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; es-ES; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; nl; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; zh-CN; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; hu; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-ES; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.1 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-ES; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 GTB7.0 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; es-ES; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; cs; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; ca; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; sv-SE; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; pl; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; nl; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.9.2.3) Gecko/20100403 Firefox/3.6.3 - family: 'Firefox' - major: '3' - minor: '6' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.7; en-US; rv:1.9.2.2) Gecko/20100316 Firefox/3.6.2 - family: 'Firefox' - major: '3' - minor: '6' - patch: '2' - - # Firefox 3.5 - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; it; rv:1.9.1.9) Gecko/20100402 Ubuntu/9.10 (karmic) Firefox/3.5.9 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; it; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-2.fc12 Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.1.9) Gecko/20100317 SUSE/3.5.9-0.1.1 Firefox/3.5.9 GTB7.0 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; es-CL; rv:1.9.1.9) Gecko/20100402 Ubuntu/9.10 (karmic) Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ; rv:1.9.1.9) Gecko/20100317 SUSE/3.5.9-0.1.1 Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; nl; rv:1.9.1.9) Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.9.1.9) Gecko/20100330 Fedora/3.5.9-1.fc12 Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.9) Gecko/20100317 SUSE/3.5.9-0.1 Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100401 Ubuntu/9.10 (karmic) Firefox/3.5.9 GTB7.1 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100315 Ubuntu/9.10 (karmic) Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4) Gecko/20091028 Ubuntu/9.10 (karmic) Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; tr; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 GTB7.1 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; hu; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; fr; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; et; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; nl; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; es-ES; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 GTB5 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 GTB7.0 (.NET CLR 3.0.30618) - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; ca; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 GTB7.0 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '9' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.1.8) Gecko/20100216 Fedora/3.5.8-1.fc12 Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.9.1.8) Gecko/20100216 Fedora/3.5.8-1.fc11 Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100318 Gentoo Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.8) Gecko/20100216 Fedora/3.5.8-1.fc12 Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.9.1.8) Gecko/20100216 Fedora/3.5.8-1.fc12 Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.8) Gecko/20100214 Ubuntu/9.10 (karmic) Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; FreeBSD i386; ja-JP; rv:1.9.1.8) Gecko/20100305 Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; sl; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729) FirePHP/0.4 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 GTB6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 GTB7.0 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '8' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2) Gecko/20100305 Gentoo Firefox/3.5.7 - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; cs-CZ; rv:1.9.1.7) Gecko/20100106 Ubuntu/9.10 (karmic) Firefox/3.5.7 - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.7) Gecko/20091222 SUSE/3.5.7-1.1.1 Firefox/3.5.7 - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; ja; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 GTB6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 (.NET CLR 3.0.04506.648) - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; fa; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7 - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.7) Gecko/20091221 MRA 5.5 (build 02842) Firefox/3.5.7 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '7' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.6) Gecko/20100117 Gentoo Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.9.1.6) Gecko/20091216 Fedora/3.5.6-1.fc11 Firefox/3.5.6 GTB6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.9.1.6) Gecko/20091201 SUSE/3.5.6-1.1.1 Firefox/3.5.6 GTB6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.6) Gecko/20100118 Gentoo Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 GTB6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 GTB7.0 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.6) Gecko/20091201 SUSE/3.5.6-1.1.1 Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.9.1.6) Gecko/20100107 Fedora/3.5.6-1.fc12 Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; ca; rv:1.9.1.6) Gecko/20091215 Ubuntu/9.10 (karmic) Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; it; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 ( .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; id; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.6) Gecko/20091201 MRA 5.4 (build 02647) Firefox/3.5.6 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 MRA 5.5 (build 02842) Firefox/3.5.6 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 MRA 5.5 (build 02842) Firefox/3.5.6 - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 GTB6 (.NET CLR 3.5.30729) FBSMTWB - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729) FBSMTWB - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729) - family: 'Firefox' - major: '3' - minor: '5' - patch: '6' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; sv-SE; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 - family: 'Firefox' - major: '3' - minor: '5' - patch: '3' - - # Firefox on the next Gecko major release (preliminary) - - user_agent_string: Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (WindowsCE 6.0; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.0.1) Gecko Firefox/5.0.1 - family: 'Firefox' - major: '5' - minor: '0' - patch: '1' - -# # Fennec 2.0.1 (not yet released) -# - user_agent_string: Mozilla/5.0 (Android; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1 -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: '1' -# - user_agent_string: Mozilla/5.0 (Maemo; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1 -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: '1' -# - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1 -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: '1' -# - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1 -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: '1' -# - user_agent_string: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Fennec/2.0.1 -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: '1' -# -# # Fennec 2.0 (prerelease) -# - user_agent_string: Mozilla/5.0 (Android; Linux armv7l; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre Fennec/2.0b1pre -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: 'a1pre' -# - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.0b6pre) Gecko/20100907 Firefox/4.0b6pre Fennec/2.0b1pre -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: 'a1pre' -# - user_agent_string: Mozilla/5.0 (Windows NT 5.1; rv:2.0b6pre) Gecko/20100902 Firefox/4.0b6pre Fennec/2.0b1pre -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: 'a1pre' -# - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.0b4pre) Gecko/20100818 Firefox/4.0b4pre Fennec/2.0a1pre -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: 'a1pre' -# - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.0b4pre) Gecko/20100812 Firefox/4.0b4pre Fennec/2.0a1pre -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: 'a1pre' -# - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.0b3pre) Gecko/20100730 Firefox/4.0b3pre Fennec/2.0a1pre -# family: 'Fennec' -# major: '2' -# minor: '0' -# patch: 'a1pre' - - # Camino 2.2 (not yet released) - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.4; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Camino/2.2.1 - family: 'Camino' - major: '2' - minor: '2' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Camino/2.2.1 - family: 'Camino' - major: '2' - minor: '2' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Camino/2.2.1 - family: 'Camino' - major: '2' - minor: '2' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; PPC Mac OS X 10.4; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Camino/2.2.1 - family: 'Camino' - major: '2' - minor: '2' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; PPC Mac OS X 10.5; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 Camino/2.2.1 - family: 'Camino' - major: '2' - minor: '2' - patch: '1' - - # Camino 2.0 - - user_agent_string: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en; rv:1.9.0.19) Gecko/2010051911 Camino/2.0.3 (like Firefox/3.0.19) - family: 'Camino' - major: '2' - minor: '0' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; nl; rv:1.9.0.19) Gecko/2010051911 Camino/2.0.3 (MultiLang) (like Firefox/3.0.19) - family: 'Camino' - major: '2' - minor: '0' - patch: '3' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en; rv:1.9.0.18) Gecko/2010021619 Camino/2.0.2 (like Firefox/3.0.18) - family: 'Camino' - major: '2' - minor: '0' - patch: '2' - - # Camino 1.6 - - user_agent_string: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; it; rv:1.8.1.21) Gecko/20090327 Camino/1.6.7 (MultiLang) (like Firefox/2.0.0.21pre) - family: 'Camino' - major: '1' - minor: '6' - patch: '7' - - user_agent_string: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.21) Gecko/20090327 Camino/1.6.7 (like Firefox/2.0.0.21pre) - family: 'Camino' - major: '1' - minor: '6' - patch: '7' - - # Camino 1.5 - - user_agent_string: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.12) Gecko/20080206 Camino/1.5.5 - family: 'Camino' - major: '1' - minor: '5' - patch: '5' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X Mach-O; en; rv:1.8.1.12) Gecko/20080206 Camino/1.5.5 - family: 'Camino' - major: '1' - minor: '5' - patch: '5' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.11) Gecko/20071128 Camino/1.5.4 - family: 'Camino' - major: '1' - minor: '5' - patch: '4' - - user_agent_string: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en; rv:1.8.1.6) Gecko/20070809 Camino/1.5.1 - family: 'Camino' - major: '1' - minor: '5' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.6) Gecko/20070809 Camino/1.5.1 - family: 'Camino' - major: '1' - minor: '5' - patch: '1' -# -# # Thunderbird 3.1 -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; sv-SE; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 ThunderBrowse/3.3.2 -# family: 'Thunderbird' -# major: '3' -# minor: '1' -# patch: '2' -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.2.8) Gecko/20100802 Thunderbird/3.1.2 -# family: 'Thunderbird' -# major: '3' -# minor: '1' -# patch: '2' -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.9.2.7) Gecko/20100713 Lightning/1.0b2 Thunderbird/3.1.1 ThunderBrowse/3.3.1 -# family: 'Thunderbird' -# major: '3' -# minor: '1' -# patch: '1' -# -# # Thunderbird 3.0 -# - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Thunderbird/3.0.5 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '5' -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.10) Gecko/20100512 Lightning/1.0b1 Thunderbird/3.0.5 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '5' -# - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '4' -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 Thunderbird/3.0.4 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '4' -# - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '4' -# - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; pl; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '4' -# - user_agent_string: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '4' -# - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100408 Thunderbird/3.0.3 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '3' -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 ThunderBrowse/3.2.8.1 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '1' -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-CA; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 ThunderBrowse/3.2.8.1 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '1' -# - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1 ThunderBrowse/3.2.8.1 -# family: 'Thunderbird' -# major: '3' -# minor: '0' -# patch: '1' - - # SeaMonkey 2.1.1 (not yet released) - - user_agent_string: Mozilla/5.0 (Windows NT 5.2; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (WindowsCE 6.0; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.5; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - user_agent_string: Mozilla/5.0 (X11; Linux armv7l; rv:2.0.1) Gecko/20100101 Firefox/4.0.1 SeaMonkey/2.1.1 - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: '1' - - # SeaMonkey 2.1 (prerelease) - - user_agent_string: Mozilla/5.0 (Windows; Windows NT 5.2; rv:2.0b3pre) Gecko/20100803 SeaMonkey/2.1a3pre - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: 'a3pre' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.3a4pre) Gecko/20100404 SeaMonkey/2.1a1pre - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: 'a1pre' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-CA; rv:1.9.3a3pre) Gecko/20100312 SeaMonkey/2.1a1pre - family: 'SeaMonkey' - major: '2' - minor: '1' - patch: 'a1pre' - - # SeaMonkey 2.0 - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100721 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/2.0.6-2.1 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux ia64; de; rv:1.9.1.11) Gecko/20100820 Lightning/1.0b2pre SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100722 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 9.0; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100722 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1.11) Gecko/20100701 SeaMonkey/2.0.6 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-CA; rv:1.9.1.11pre) Gecko/20100630 SeaMonkey/2.0.6pre - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6pre' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-CA; rv:1.9.1.11pre) Gecko/20100629 SeaMonkey/2.0.6pre - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6pre' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11pre) Gecko/20100515 SeaMonkey/2.0.6pre - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6pre' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.11pre) Gecko/20100508 SeaMonkey/2.0.6pre - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '6pre' - - user_agent_string: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.10) Gecko/20100504 Lightning/1.0b1 Mnenhy/0.8.2 SeaMonkey/2.0.5 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '5' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; ru; rv:1.9.1.10) Gecko/20100504 Lightning/1.0b1 SeaMonkey/2.0.5 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '5' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.10) Gecko/20100504 Lightning/1.0b1 SeaMonkey/2.0.5 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '5' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.1.9) Gecko/20100428 Lightning/1.0b1 SeaMonkey/2.0.4 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '4' - - user_agent_string: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100317 SUSE/2.0.4-3.2 Lightning/1.0b1 SeaMonkey/2.0.4 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Lightning/1.0b1 SeaMonkey/2.0.4 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '4' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 6.0; de; rv:1.9.1.8) Gecko/20100205 SeaMonkey/2.0.3 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '3' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.1.7) Gecko/20100104 SeaMonkey/2.0.2 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '2' - - user_agent_string: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.7) Gecko/20100104 SeaMonkey/2.0.2 - family: 'SeaMonkey' - major: '2' - minor: '0' - patch: '2' diff --git a/node_modules/karma/node_modules/useragent/test/fixtures/pgts.yaml b/node_modules/karma/node_modules/useragent/test/fixtures/pgts.yaml deleted file mode 100644 index 2210b824..00000000 --- a/node_modules/karma/node_modules/useragent/test/fixtures/pgts.yaml +++ /dev/null @@ -1,62356 +0,0 @@ -test_cases: - - user_agent_string: "abot/0.1 (abot; http://www.abot.com; abot@abot.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Ace Explorer" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ACS-NF/3.0 NEC-c616/001.00" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ACS-NF/3.0 NEC-e616/001.01 (www.proxomitron.de)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ActiveBookmark 1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; AI)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AIM" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AIM/30 (Mozilla 1.24b; Windows; I; 32-bit)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "aipbot/1.0 (aipbot; http://www.aipbot.com; aipbot@aipbot.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Alizee iPod 2005 (Beta; Mac OS X)" - family: "Mobile Safari" - major: - minor: - patch: - - user_agent_string: "alpha 06" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.5 (compatible; alpha/06; AmigaOS 1337)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ALPHA/06_(Win98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "amaya/8.3 libwww/5.4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AmigaOS AmigaVoyager" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Arexx (AmigaVoyager/2.95; AmigaOS/MC680x0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Voyager; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.6 (compatible; AmigaVoyager; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AmigaVoyager/2.95 (compatible; MC680x0; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01 (compatible; AmigaVoyager/2.95; AmigaOS/MC680x0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AmigaVoyager/3.3.122 (AmigaOS/PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AmigaVoyager/3.4.4 (MorphOS/PPC native)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Amiga Voyager" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; AnsearchBot/1.0; +http://www.ansearch.com.au/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; ANTFresco 1.20; RISC OS 3.11)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.04 (compatible; ANTFresco/2.13; RISC OS 4.02)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.04 (compatible; NCBrowser/2.35 (1.45.2.1); ANTFresco/2.17; RISC OS-NC 5.13 Laz1UK1802)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; ANTFresco 2.20; RISC OS 3.11)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AOLserver-Tcl/3.5.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AOL 8.0 (compatible; AOL 8.0; DOS; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AOL/8.0 (Lindows 2003)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "aolbrowser/1.1 InterCon-Web-Library/1.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ArachnetAgent 2.3/4.78 (TuringOS; Turing Machine; 0.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Arexx ( ; ; AmigaOS 3.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Arexx (AmigaVoyager/2.95; AmigaOS/MC680x0; Mod-X by Pe)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Arexx (compatible; AmigaVoyager/2.95; AmigaOS" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Arexx (compatible; AmigaVoyager/2.95; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ARexx (compatible; ARexx; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Arexx (compatible; MSIE 6.0; AmigaOS5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Arexx (compatible; MSIE 6.0; AmigaOS5.0) IBrowse 4.0" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; ARexx; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; ARexx; AmigaOS; Avant Browser [avantbrowser.com]; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; arexx)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "ArtfaceBot (compatible; MSIE 6.0; Mozilla/4.0; Windows NT 5.1;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; Ask Jeeves/Teoma; +http://sp.ask.com/docs/about/tech_crawling.html)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Astra/1.0 (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Astra/2.0 (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Atari/2600b (compatible; 2port; Wood Grain)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Atari/2600 (GalaxianOS; U; en-US) cartridge/$29.95" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Auto-Proxy Downloader" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Advanced Browser (http://www.avantbrowser.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Avant Browser (http://www.avantbrowser.com)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Avant Browser [avantbrowser.com])" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com])" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; .NET CLR 1.0.3705)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com])" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; .NET CLR 1.0.3705)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Avant Browser/1.2.789rel1 (http://www.avantbrowser.com)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Avantgo 5.5" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; AvantGo 5.2; FreeBSD)" - family: "AvantGo" - major: '5' - minor: '2' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; AvantGo 6.0; FreeBSD)" - family: "AvantGo" - major: '6' - minor: '0' - patch: - - user_agent_string: "Amiga" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AmigaOS" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Amiga OS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Aweb/2.3 (AmigaOS 3.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Amiga-AWeb/3.4APL" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; AWEB 3.4 SE; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Amiga-AWeb/3.4.167SE" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Amiga-AWeb/3.5.05 beta" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; BecomeBot/2.2.1; MSIE 6.0 compatible; +http://www.become.com/webmasters.html)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "BlackBerry7730/3.7.1 UP.Link/5.1.2.5" - family: "Blackberry" - major: '7730' - minor: - patch: - - user_agent_string: "UPG1 UP/4.0 (compatible; Blazer 1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Bobby/3.3 RPT-HTTPClient/0.3-3E" - family: "Other" - major: - minor: - patch: - - user_agent_string: "boitho.com-dc/0.70 ( http://www.boitho.com/dcbot.html )" - family: "Other" - major: - minor: - patch: - - user_agent_string: "boitho.com-dc/0.71 ( http://www.boitho.com/dcbot.html )" - family: "Other" - major: - minor: - patch: - - user_agent_string: "$BotName/$BotVersion [en] (UNIX; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Brain/1.0 [de] (Human RAW 1.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Browsers Part 4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Buscaplus Robi/1.0 (http://www.buscaplus.com/robi/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "BuyGet/1.0 Agent-Admin/webmaster@kfda.go.kr" - family: "Other" - major: - minor: - patch: - - user_agent_string: "CacheBot/0.445 (compatible, http://www.cachebot.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "CDM-8900" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Cerberian Drtrs Version-3.2-Build-1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.0; Update a; AK; Windows 95) via proxy gateway CERN-HTTPD/3.0 libwww/2.17" - family: "IE" - major: '3' - minor: '0' - patch: - - user_agent_string: "cfetch/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "CFNetwork/1.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonP900/R101 Profile/MIDP-2.0 Configuration/CLDC-1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonP900/R102 Profile/MIDP-2.0 Configuration/CLDC-1.0 Rev/MR4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonP910i/R3A SEMC-Browser/Symbian/3.0 Profile/MIDP-2.0 Configuration/CLDC-1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT610/R101 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT610/R201 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT610/R201 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.1 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT610/R401 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT610/R401 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.3 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonZ600/R401 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonK700i/R2AA SEMC-Browser/4.0.2 Profile/MIDP-2.0 Configuration/CLDC-1.1 (Google WAP Proxy/1.0)" - family: "SEMC-Browser" - major: '4' - minor: '0' - patch: - - user_agent_string: "SonyEricssonK700i/R2AE SEMC-Browser/4.0.3 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Link/6.2.3.15.0 (Google WAP Proxy/1.0)" - family: "SEMC-Browser" - major: '4' - minor: '0' - patch: - - user_agent_string: "Clushbot/3.31-BinaryFury (+http://www.clush.com/bot.html)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 1.0; Commodore64)" - family: "IE" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 2.0; Commodore64)" - family: "IE" - major: '2' - minor: '0' - patch: - - user_agent_string: "Contiki/1.0 (Commodore 64; http://dunkels.com/adam/contiki/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ConveraMultiMediaCrawler/0.1 (+http://www.authoritativeweb.com/crawl)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "CosmixCrawler/0.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "crawler (ISSpider-3.0; http://www.yoururlgoeshere.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Crawler0.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.0 (compatible; Crazy Browser 1.0.1; FreeBSD 3.2-RELEASE i386)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Crazy Browser 1.0.5; .NET CLR 1.0.3705)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FREE; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MyIE2; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; APCMAG; NetCaptor 6.5.0B7; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; 3305; Versatel.de ISDN 0404; Crazy Browser 1.0.5; onlineTV; www.cdesign.de)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; Crazy Browser 1.0.5; Tyco Electronics 01/2003)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {4CBEAFB3-10C9-497A-B016-7FEBFBD707E9}; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; brip1; RainBird 1.01/HT; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Crazy Browser 1.0.5; FDM)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Crazy Browser 1.0.5; .NET CLR 1.0.3705)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Crazy Browser 1.0.5; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Crazy Browser 1.0.5; iRider 2.20.0018)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusNetDSL6; Crazy Browser 1.0.5; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Crazy Browser 1.0.5; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A5020528-0A08-4436-8CD1-D02C46132E5A}; SV1; Crazy Browser 1.0.5; CustomExchangeBrowser; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=vBB1c.00; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5; Alexa Toolbar)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5; .NET CLR 1.0.3705)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5; (R1 1.1); .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5; (R1 1.5))" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 1.0.5; SV1; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; FunWebProducts; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GoogleBot; Crazy Browser 1.0.5; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; SV1; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Katiesoft 7; Crazy Browser 1.0.5; .NET CLR 1.0.3705)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Crazy Browser 1.0.5; Alexa Toolbar)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Socantel; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5; .NET CLR 1.0.3705)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5; .NET CLR 1.1.4322; FDM)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 1.0.5; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iebar; Crazy Browser 1.0.5)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Texas Instruments; MyIE2; Crazy Browser 1.0.5; .NET CLR 1.0.3705)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.ASPSimply.com; Crazy Browser 1.0.5; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Crazy Browser 1.0.5; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "Crazy Browser" - major: '1' - minor: '0' - patch: '5' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Crazy Browser 2.0.0 Beta 1)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; YPC 3.0.1; yie6; Crazy Browser 2.0.0 Beta 1)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 2.0.0 Beta 1)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crazy Browser 2.0.0 Beta 1; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 2.0.0 Beta 1)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 2.0.0 Beta 1; .NET CLR 1.0.3705)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 2.0.0 Beta 1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Crazy Browser 2.0.0 Beta 1; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts-MyTotalSearch; Maxthon; Crazy Browser 2.0.0 Beta 1)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; Deepnet Explorer 1.3.2; Crazy Browser 2.0.0 Beta 1; .NET CLR 1.1.4322)" - family: "Crazy Browser" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "curl/7.10.2 (powerpc-apple-darwin7.0) libcurl/7.10.2 OpenSSL/0.9.7b zlib/1.1.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.1.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.10.6 (i386-redhat-linux-gnu) libcurl/7.10.6 OpenSSL/0.9.7a ipv6 zlib/1.2.0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.11.2 (i686-pc-linux-gnu) libcurl/7.10.2 OpenSSL/0.9.6i ipv6 zlib/1.1.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.12.0 (i686-pc-linux-gnu) libcurl/7.12.0 OpenSSL/0.9.7e ipv6 zlib/1.2.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.7.2 (powerpc-apple-darwin6.0) libcurl 7.7.2 (OpenSSL 0.9.6b)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.7.3 (i686-pc-linux-gnu) libcurl 7.7.3 (OpenSSL 0.9.6)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.7.3 (win32) libcurl 7.7.3 (OpenSSL 0.9.6)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.9.3 (powerpc-ibm-aix4.3.3.0) libcurl 7.9.3 (OpenSSL 0.9.6m)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.9.5 (i386-redhat-linux-gnu) libcurl 7.9.5 (OpenSSL 0.9.6b) (ipv6 enabled)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "curl/7.9.8 (i386-redhat-linux-gnu) libcurl 7.9.8 (OpenSSL 0.9.7a) (ipv6 enabled)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "DA 5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "DA 5.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "daemon (AmigaOS; alpha/06; AmigaOS mod-x)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "DataFountains/DMOZ Downloader" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; DB Browse 4.3; DB OS 6.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "deepak-USC/ISI" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Deepnet Explorer" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Deepnet Explorer 1.0.1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Dillo/0.6.4" - family: "Dillo" - major: '0' - minor: '6' - patch: '4' - - user_agent_string: "Dillo/0.7.3" - family: "Dillo" - major: '0' - minor: '7' - patch: '3' - - user_agent_string: "Dillo/0.8.0" - family: "Dillo" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Dillo/0.8.0-pre" - family: "Dillo" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Dillo/0.8.1" - family: "Dillo" - major: '0' - minor: '8' - patch: '1' - - user_agent_string: "Dillo/0.8.2" - family: "Dillo" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Dillo/0.8.2-pre" - family: "Dillo" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Dillo/0.8.3" - family: "Dillo" - major: '0' - minor: '8' - patch: '3' - - user_agent_string: "Dillo/0.8.3-rc2" - family: "Dillo" - major: '0' - minor: '8' - patch: '3' - - user_agent_string: "Dillo/0.8.4" - family: "Dillo" - major: '0' - minor: '8' - patch: '4' - - user_agent_string: "Dillo/0.8.5-pre" - family: "Dillo" - major: '0' - minor: '8' - patch: '5' - - user_agent_string: "Dillo/27951.4" - family: "Dillo" - major: '27951' - minor: '4' - patch: - - user_agent_string: "dloader(NaverRobot)/1.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; DLW 2.0; Win32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "DoCoMo/1.0/D503iS/c10" - family: "Other" - major: - minor: - patch: - - user_agent_string: "DoCoMo/1.0/P502i/c10 (Google CHTML Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "DoCoMo/2.0 F900i(c100;TB;W22H12),gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "DoCoMo/2.0 N900i(c100;TB;W24H12)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Doris/1.10 [en] (Symbian)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Doris/1.17 [en] (Symbian)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Download.exe(1.1) (+http://www.sql-und-xml.de/freeware-tools/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Download Master" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Download Ninja 7.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "EasyDL/3.04 http://keywen.com/Encyclopedia/Bot" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks (0.10rc1; Linux 2.6.9-gentoo-r10 i686; 80x25)" - family: "Links" - major: '0' - minor: '10' - patch: - - user_agent_string: "ELinks (0.4.2; cygwin; 700)" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.4.2; Linux; )" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.4pre18; Linux 2.2.22 i686; 80x25)" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.4pre5; Linux 2.2.20-compact i586; 80x30)" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.4pre5; Linux 2.2.20 i586; 138x44)" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.4pre5; Linux 2.4.23 i686; 114x27)" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.4pre5; Linux 2.4.24 i686; 132x34)" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.4pre5; Linux 2.6.0 i686; 176x66)" - family: "Links" - major: '0' - minor: '4' - patch: - - user_agent_string: "ELinks (0.9.3)" - family: "Links" - major: '0' - minor: '9' - patch: - - user_agent_string: "ELinks (0.9.CVS; Linux 2.6.5 i686; 169x55)" - family: "Links" - major: '0' - minor: '9' - patch: - - user_agent_string: "ELinks/0.9.CVS (textmode; Linux 2.4.18-1-386 i686; 80x25-3)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.1 (textmode; FreeBSD 4.10-PRERELEASE i386; 132x43)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.1 (textmode; FreeBSD 4.10-STABLE i386; 132x43)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.1 (textmode; Linux 2.4.26 i686; 128x48)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.1 (textmode; Linux 2.6.3-7mdksmp i686; 80x25)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.1 (textmode; Linux 2.6.6 i686; 128x54)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.1 (textmode; Linux; 80x24)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.1 (textmode; Linux; 80x25)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.2rc2 (textmode; Linux 2.4.26-lck1 i486; 80x25)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.2rc4 (textmode; Linux 2.4.20-8 i686; 105x46)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.2rc7 (textmode; Linux 2.4.29-1 i686; 190x75)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.2 (textmode; Linux; 157x52)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.3 (textmode; Linux 2.6.10 i686; 80x25)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.3 (textmode; Linux 2.6.7-20050106 i686; 80x34)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.3 (textmode; Linux 2.6.8-1-386 i686; 160x64)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.3 (textmode; Linux 2.6.8.1 i686; 118x82)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ELinks/0.9.3 (textmode; Linux 2.6.8-mdp04 i686; 80x25)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Enigma Browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "EricssonT68/R101 (;; ;; ;; Smartphone; SDA/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Explorer /5.02 (Windows 95; U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Explorer /5.02 (Windows 95; U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; FastWeb; Windows NT 5.1; OMEGA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "FavOrg" - family: "Other" - major: - minor: - patch: - - user_agent_string: "FDM 1.x" - family: "Other" - major: - minor: - patch: - - user_agent_string: "FindAnISP.com_ISP_Finder_v99a" - family: "Other" - major: - minor: - patch: - - user_agent_string: "findlinks/0.901e (+http://wortschatz.uni-leipzig.de/findlinks/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Firefox/1.0 (Windows; U; Win98; en-US; Localization; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Firefox/1.0.1 (Windows NT 5.1; U; pl-PL)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "FireFox (X11; Linux i686; pl-PL); slackware; FireFox;" - family: "Other" - major: - minor: - patch: - - user_agent_string: "FlashGet" - family: "Other" - major: - minor: - patch: - - user_agent_string: "FOOZWAK (zeep; 47.3; CheeseMatic 9.1; T312461; iOpus-I-M; BucketChunk 4.1; Shronk; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "FreshDownload/4.40" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Funky Little Browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Galeon (IE4 compatible; Galeon; Windows XP)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Galeon (PPC; U; Windows NT 5.1; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Galeon; Windows NT 5.1;)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (IE4 compatible; Galeon; Windows NT 5.1;)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (IE4 compatible; Galeon; Windows XP)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 Galeon 1.2.5 (X11; Linux i686; U;) Gecko/0-pie MSIE 6.0" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-IE; rv:1.6) Gecko Galeon" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 Galeon/1.0.2 (X11; Linux i686; U)" - family: "Galeon" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U)" - family: "Galeon" - major: '1' - minor: '0' - patch: '3' - - user_agent_string: "Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U;) Gecko/20020214" - family: "Galeon" - major: '1' - minor: '0' - patch: '3' - - user_agent_string: "Mozilla/5.0 Galeon/1.0.3 (X11; Linux i686; U;) Gecko/20020325" - family: "Galeon" - major: '1' - minor: '0' - patch: '3' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U)" - family: "Galeon" - major: '1' - minor: '2' - patch: '0' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020408" - family: "Galeon" - major: '1' - minor: '2' - patch: '0' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/0" - family: "Galeon" - major: '1' - minor: '2' - patch: '11' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030417" - family: "Galeon" - major: '1' - minor: '2' - patch: '11' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030703" - family: "Galeon" - major: '1' - minor: '2' - patch: '11' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030708" - family: "Galeon" - major: '1' - minor: '2' - patch: '11' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030716" - family: "Galeon" - major: '1' - minor: '2' - patch: '11' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.11 (X11; Linux i686; U;) Gecko/20030822" - family: "Galeon" - major: '1' - minor: '2' - patch: '11' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.13 (X11; Linux i686; U;) Gecko/20040308" - family: "Galeon" - major: '1' - minor: '2' - patch: '13' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.13 (X11; Linux i686; U;) Gecko/20041004" - family: "Galeon" - major: '1' - minor: '2' - patch: '13' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.5 (X11; Linux i586; U;) Gecko/20020605" - family: "Galeon" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U)" - family: "Galeon" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/0" - family: "Galeon" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020605" - family: "Galeon" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020623 Debian/1.2.5-0.woody.1" - family: "Galeon" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.5 (X11; Linux i686; U;) Gecko/20020809" - family: "Galeon" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020827" - family: "Galeon" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20020830" - family: "Galeon" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.6 (X11; Linux i686; U;) Gecko/20021105" - family: "Galeon" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021203" - family: "Galeon" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20021226 Debian/1.2.7-6" - family: "Galeon" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030131" - family: "Galeon" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030401" - family: "Galeon" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.7 (X11; Linux i686; U;) Gecko/20030622" - family: "Galeon" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.7 (X11; Linux ppc; U;) Gecko/20030130" - family: "Galeon" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.8 (X11; Linux i686; U;) Gecko/20030317" - family: "Galeon" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 Galeon/1.2.8 (X11; Linux i686; U;) Gecko/20030328" - family: "Galeon" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 Galeon/1.3.10" - family: "Galeon" - major: '1' - minor: '3' - patch: '10' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Galeon/1.3.10 (Debian package 1.3.10-3)" - family: "Galeon" - major: '1' - minor: '3' - patch: '10' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Galeon/1.3.11a (Debian package 1.3.11a-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '11' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Galeon/1.3.11a (Debian package 1.3.11a-2)" - family: "Galeon" - major: '1' - minor: '3' - patch: '11' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040814 Galeon/1.3.11a" - family: "Galeon" - major: '1' - minor: '3' - patch: '11' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6) Gecko/20040115 Galeon/1.3.12" - family: "Galeon" - major: '1' - minor: '3' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20031015 Galeon/1.3.12" - family: "Galeon" - major: '1' - minor: '3' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 Galeon/1.3.12" - family: "Galeon" - major: '1' - minor: '3' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040308 Galeon/1.3.12" - family: "Galeon" - major: '1' - minor: '3' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040331 Galeon/1.3.12" - family: "Galeon" - major: '1' - minor: '3' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; hu; rv:1.6) Gecko/20040229 Galeon/1.3.12" - family: "Galeon" - major: '1' - minor: '3' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; PL; rv:1.6) Gecko/20040115 Galeon/1.3.12" - family: "Galeon" - major: '1' - minor: '3' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031115 Galeon/1.3.13" - family: "Galeon" - major: '1' - minor: '3' - patch: '13' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 Galeon/1.3.13" - family: "Galeon" - major: '1' - minor: '3' - patch: '13' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Galeon/1.3.13 (Debian package 1.3.13-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '13' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Galeon/1.3.13 (Debian package 1.3.13-2)" - family: "Galeon" - major: '1' - minor: '3' - patch: '13' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040130 Galeon/1.3.13" - family: "Galeon" - major: '1' - minor: '3' - patch: '13' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040305 Galeon/1.3.13" - family: "Galeon" - major: '1' - minor: '3' - patch: '13' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Galeon/1.3.13 (Debian package 1.3.13-2)" - family: "Galeon" - major: '1' - minor: '3' - patch: '13' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040402 Galeon/1.3.14" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040426 Galeon/1.3.14" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040501 Galeon/1.3.14" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040928 Galeon/1.3.14 (Debian package 1.3.14a-0jds4)" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20040107 Galeon/1.3.14" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Galeon/1.3.14 (Debian package 1.3.14a-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 Galeon/1.3.14" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040309 Galeon/1.3.14" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Galeon/1.3.14" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Galeon/1.3.14 (Debian package 1.3.14a-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Galeon/1.3.14 (Debian package 1.3.14acvs20040504-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040528 Galeon/1.3.14 (Debian package 1.3.14acvs20040520-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '14' - - user_agent_string: "Mozilla/5.0 (compatible; Galeon/1.3.15; Atari 2600)" - family: "Galeon" - major: '1' - minor: '3' - patch: '15' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Galeon/1.3.15 (Debian package 1.3.15-2)" - family: "Galeon" - major: '1' - minor: '3' - patch: '15' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Galeon/1.3.15" - family: "Galeon" - major: '1' - minor: '3' - patch: '15' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040528 Galeon/1.3.15 (Debian package 1.3.15-2)" - family: "Galeon" - major: '1' - minor: '3' - patch: '15' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Galeon/1.3.15" - family: "Galeon" - major: '1' - minor: '3' - patch: '15' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040624 Galeon/1.3.15" - family: "Galeon" - major: '1' - minor: '3' - patch: '15' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040624 Galeon/1.3.15 (Debian package 1.3.15-3)" - family: "Galeon" - major: '1' - minor: '3' - patch: '15' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040710 Galeon/1.3.16" - family: "Galeon" - major: '1' - minor: '3' - patch: '16' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Galeon/1.3.16" - family: "Galeon" - major: '1' - minor: '3' - patch: '16' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040726 Galeon/1.3.16 (Debian package 1.3.16-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '16' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040802 Galeon/1.3.16 (Debian package 1.3.16-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '16' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040805 Galeon/1.3.16 (Debian package 1.3.16-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '16' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810 Galeon/1.3.16 (Debian package 1.3.16-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '16' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040724 Galeon/1.3.16" - family: "Galeon" - major: '1' - minor: '3' - patch: '16' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040824 Galeon/1.3.17" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040805 Galeon/1.3.17 (Debian package 1.3.17-2.0.1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 Galeon/1.3.17" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 Galeon/1.3.17" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040818 Galeon/1.3.17" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Galeon/1.3.17 (Debian package 1.3.17-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040906 Galeon/1.3.17" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040921 Galeon/1.3.17" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Galeon/1.3.17 (Debian package 1.3.17-2)" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040808 Galeon/1.3.17" - family: "Galeon" - major: '1' - minor: '3' - patch: '17' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041130 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041221 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041224 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.3) Gecko/20041007 Galeon/1.3.18 (Debian package 1.3.18-1.1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041228 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040916 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040928 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Galeon/1.3.18 (Debian package 1.3.18-1.1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041223 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Galeon/1.3.18" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Galeon/1.3.18 (Debian package 1.3.18-2)" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.3) Gecko/20041007 Galeon/1.3.18 (Debian package 1.3.18-1.1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '18' - - user_agent_string: "Mozilla/5.0 (This is not Lynx/Please do not arrest user; X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041027 Galeon/1.3.19" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041224 Galeon/1.3.19" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 Galeon/1.3.19" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041027 Galeon/1.3.19" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Galeon/1.3.19 (Debian package 1.3.19-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Galeon/1.3.19 (Debian package 1.3.19-3)" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Galeon/1.3.19 (Debian package 1.3.19-4)" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050106 Galeon/1.3.19 (Debian package 1.3.19-1ubuntu1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050216 Galeon/1.3.19" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 Galeon/1.3.19" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041230 Galeon/1.3.19" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050106 Galeon/1.3.19 (Debian package 1.3.19-3)" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041221 Galeon/1.3.19.99" - family: "Galeon" - major: '1' - minor: '3' - patch: '19' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Galeon/1.3.20 (Debian package 1.3.20-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '20' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050106 Galeon/1.3.20 (Debian package 1.3.20-1ubuntu4)" - family: "Galeon" - major: '1' - minor: '3' - patch: '20' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Galeon/1.3.20 (Debian package 1.3.20-1)" - family: "Galeon" - major: '1' - minor: '3' - patch: '20' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586) Gecko/20030311 Galeon/1.3.3" - family: "Galeon" - major: '1' - minor: '3' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20030311 Galeon/1.3.3" - family: "Galeon" - major: '1' - minor: '3' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20030428 Galeon/1.3.3" - family: "Galeon" - major: '1' - minor: '3' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386) Gecko/0 Galeon/1.3.4" - family: "Galeon" - major: '1' - minor: '3' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586) Gecko/20030807 Galeon/1.3.5" - family: "Galeon" - major: '1' - minor: '3' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20030530 Galeon/1.3.5" - family: "Galeon" - major: '1' - minor: '3' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20030807 Galeon/1.3.5" - family: "Galeon" - major: '1' - minor: '3' - patch: '5' - - user_agent_string: "Galeon/1.3.7 (IE4 compatible; Galeon; Windows XP) Galeon/1.3.7 Debian/1.3.7.20030803-1" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Galeon/1.3.7 (IE4 compatible; I; Mac_PowerPC)" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Galeon/1.3.7 (IE4 compatible; I; Windows XP) Galeon/1.3.7 Debian/1.3.7.20030803-1" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386) Gecko/0 Galeon/1.3.7" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20030610 Galeon/1.3.7" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20030630 Galeon/1.3.7" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20040107 Galeon/1.3.7" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20040319 Galeon/1.3.7" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20040323 Galeon/1.3.7" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20040428 Galeon/1.3.7" - family: "Galeon" - major: '1' - minor: '3' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4) Gecko/20030630 Galeon/1.3.8" - family: "Galeon" - major: '1' - minor: '3' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.4) Gecko/20030630 Galeon/1.3.8" - family: "Galeon" - major: '1' - minor: '3' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 Galeon/1.3.8" - family: "Galeon" - major: '1' - minor: '3' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4) Gecko/20030630 Galeon/1.3.8" - family: "Galeon" - major: '1' - minor: '3' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.4) Gecko/20030630 Galeon/1.3.8" - family: "Galeon" - major: '1' - minor: '3' - patch: '8' - - user_agent_string: "Galeon/1.3.9 Mozilla/1.4 HTML/4.01 XHTML/1.0 CSS/2.1" - family: "Galeon" - major: '1' - minor: '3' - patch: '9' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030915 Galeon/1.3.9" - family: "Galeon" - major: '1' - minor: '3' - patch: '9' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031015 Galeon/1.3.9" - family: "Galeon" - major: '1' - minor: '3' - patch: '9' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.4) Gecko/20030930 Galeon/1.3.9" - family: "Galeon" - major: '1' - minor: '3' - patch: '9' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20030311 Galeon/1.3.3,gzip(gfe) (via translate.google.com)" - family: "Galeon" - major: '1' - minor: '3' - patch: '3' - - user_agent_string: "GetRight/5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "GetRight/5.0.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "GetRight/5.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Go-Ahead-Got-It/1.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "googlebot/2.1 (+http://www.googlebot.com/bot.html" - family: "Other" - major: - minor: - patch: - - user_agent_string: "googlebot/2.1; +http://www.google.com/bot.html" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Googlebot (+http://www.google.com/bot.html)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Googlebot/2.1 (compatible; MSIE; Windows)" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Googlebot/2.1 (+http://www.googlebot.com/bot.html) (compatible; MSIE 6.0; )" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Googlebot/2.1+(+http://www.google.com/bot.html)" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.0 (MobilePhone SCP-5500/US/1.0) NetFront/3.0 MMP/2.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" - family: "NetFront" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (MobilePhone SCP-5500/US/1.0) NetFront/3.0 MMP/2.0 FAKE (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" - family: "NetFront" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.)" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "GoogleBot/2.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Googlebot-Image/1.0 (+http://www.googlebot.com/bot.html" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; grub-client-2.6.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Grubclient-2.2-internal-beta)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Grubclient; windows; SV1; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "grub crawler" - family: "Other" - major: - minor: - patch: - - user_agent_string: "grub crawler(http://www.grub.org)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "gsa-crawler (Enterprise; GID-01742;gsatesting@rediffmail.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Happy-Browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "HLoader" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Homerweb" - family: "Other" - major: - minor: - patch: - - user_agent_string: "HooWWWer/2.1.0 (+http://cosco.hiit.fi/search/hoowwwer/ | mailto:crawler-infohiit.fi)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Hop 0.7 (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Hozilla/9.0 (Macintosh; U; PC Mac OS X; en-us) SnappleWebKit/69 (KHTML, like your mom) Safari/69" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (Win95; I; HTTPClient 1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Hyperlink/2.5e (Commodore 64)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ia_archiver-web.archive.org" - family: "Other" - major: - minor: - patch: - - user_agent_string: "alpha/06 (compatible; IBrowse; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "IBrowse (AmigaOS; alpha/06; AmigaOS mod-x)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "IBrowse(compatible; alpha/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "IBrowse (compatible; alpha/06; AmigaOS/PPC; SV1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "IBrowse/1.12demo (AmigaOS 3.0)" - family: "IBrowse" - major: '1' - minor: '12' - patch: - - user_agent_string: "IBrowse/2.2 (Windows V45)" - family: "IBrowse" - major: '2' - minor: '2' - patch: - - user_agent_string: "IBrowse/2.2 (Windows V50)" - family: "IBrowse" - major: '2' - minor: '2' - patch: - - user_agent_string: "IBrowse/2.3 (AmigaOS 3.0)" - family: "IBrowse" - major: '2' - minor: '3' - patch: - - user_agent_string: "IBrowse/2.3 (AmigaOS 3.1)" - family: "IBrowse" - major: '2' - minor: '3' - patch: - - user_agent_string: "IBrowse/2.3 (AmigaOS 3.9)" - family: "IBrowse" - major: '2' - minor: '3' - patch: - - user_agent_string: "IBrowse/2.3 (AmigaOS 3.9))" - family: "IBrowse" - major: '2' - minor: '3' - patch: - - user_agent_string: "IBrowse/2.3 (AmigaOS 4.0)" - family: "IBrowse" - major: '2' - minor: '3' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; IBrowse 2.3; AmigaOS4.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AmigaOS4.0) IBrowse 2.3" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; IBrowse 3.0; AmigaOS4.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "iCab" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 (compatible; iCab 2.9.1; Macintosh; U; PPC; Mac OS X)" - family: "iCab" - major: '2' - minor: '9' - patch: '1' - - user_agent_string: "iCab/2.9.5 (Macintosh; U; PPC; Mac OS X)" - family: "iCab" - major: '2' - minor: '9' - patch: '5' - - user_agent_string: "Mozilla/4.5 (compatible; iCab 2.9.6; Macintosh; U; PPC)" - family: "iCab" - major: '2' - minor: '9' - patch: '6' - - user_agent_string: "Mozilla/4.5 (compatible; iCab 2.9.7; Macintosh; U; PPC)" - family: "iCab" - major: '2' - minor: '9' - patch: '7' - - user_agent_string: "Mozilla/4.5 (compatible; iCab 2.9.7; Macintosh; U; PPC; Mac OS X)" - family: "iCab" - major: '2' - minor: '9' - patch: '7' - - user_agent_string: "iCab/2.9.8 (Macintosh; U; PPC)" - family: "iCab" - major: '2' - minor: '9' - patch: '8' - - user_agent_string: "iCab/2.9.8 (Macintosh; U; PPC; Mac OS X)" - family: "iCab" - major: '2' - minor: '9' - patch: '8' - - user_agent_string: "Mozilla/4/5 (compatible; iCab 2.9.8; Macintosh; U; 68K" - family: "iCab" - major: '2' - minor: '9' - patch: '8' - - user_agent_string: "Mozilla/4.5 (compatible; iCab 2.9.8; Macintosh; U; PPC)" - family: "iCab" - major: '2' - minor: '9' - patch: '8' - - user_agent_string: "Mozilla/4.5 (compatible; iCab 2.9.8; Macintosh; U; PPC; Mac OS X)" - family: "iCab" - major: '2' - minor: '9' - patch: '8' - - user_agent_string: "Mozilla/5.0 (compatible; iCab 2.9.8; Macintosh; U, PPC; Mac OS X)" - family: "iCab" - major: '2' - minor: '9' - patch: '8' - - user_agent_string: "iCab/3.0 (Macintosh; U; PPC; Mac OS X)" - family: "iCab" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; iCab 3.0; Macintosh; U; PPC; Mac OS X)" - family: "iCab" - major: '3' - minor: '0' - patch: - - user_agent_string: "ICE Browser/5.05 (Java 1.4.1; Windows 2000 5.0 x86)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ICEBrowser 5.31" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ICE Browser/v5_4_3 (Java 1.4.2_01; Windows XP 5.1 x86)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ICE Browser/v5_4_3_1 (Java 1.4.2_01; Windows XP 5.1 x86)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "IEAutoDiscovery" - family: "Other" - major: - minor: - patch: - - user_agent_string: "IE test" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Internet Explorer 5x" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Internet Explorer 5.x" - family: "Other" - major: - minor: - patch: - - user_agent_string: "IQSearch" - family: "Other" - major: - minor: - patch: - - user_agent_string: "itunes" - family: "Other" - major: - minor: - patch: - - user_agent_string: "iTunes/4.2 (Macintosh; U; PPC Mac OS X 10.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "iTunes/4.7 (Macintosh; U; PPC Mac OS X 10.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient/2.0final" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient/2.0.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient/2.0rc1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient/2.0rc2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient/3.0-beta1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient/3.0-rc1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Jakarta Commons-HttpClient/2.0.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java(TM) 2 Runtime Environment, Standard Edition" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java1.1.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java1.3.1_03" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java1.4.0_02" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.1_01" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.1_02" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.1_04" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.1_05" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.2_01" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.2_03" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.2_04" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.2_05" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.4.2_06" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.5.0_01" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Java/1.5.0-beta2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "jBrowser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "JoBo/1.4beta (http://www.matuschek.net/jobo.html)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "JoeDog/1.00 [en] (X11; I; Siege 2.59)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Kittiecentral.com; HTTP)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Kittiecentral.com; HTTPConnect)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Kittiecentral.com; Index-Client)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Klondike/1.50 (WSP Win32) (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "KnowItAll(knowitall@cs.washington.edu)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Konqueror" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror; FreeBSD; http://www.cartedaffaire.net/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Konqueror/1.1.2" - family: "Konqueror" - major: '1' - minor: '1' - patch: '2' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.0.1; X11); Supports MD5-Digest; Supports gzip encoding" - family: "Konqueror" - major: '2' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.1.1; X11)" - family: "Konqueror" - major: '2' - minor: '1' - patch: '1' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.1.2; X11)" - family: "Konqueror" - major: '2' - minor: '1' - patch: '2' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2-11; Linux)" - family: "Konqueror" - major: '2' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2.1)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2.1; Linux)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2.2)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2.2-2; Linux)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2.2; FreeBSD)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2.2; Linux)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/2.2.2; Linux 2.4.14-xfs; X11; i686)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '2' - - user_agent_string: "Konqueror 3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux)" - family: "Konqueror" - major: '3' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0.0; FreeBSD)" - family: "Konqueror" - major: '3' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0.0; Linux)" - family: "Konqueror" - major: '3' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0; Darwin)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc1; i686 Linux; 20020101)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc4; i686 Linux; 20020313)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3; FreeBSD)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3; Linux)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3; Linux; X11)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0; i686 Linux; 20021215)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0.0-10; Linux 2.4.18-3smp)" - family: "Konqueror" - major: '3' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0.1 (CVS >= 20020327); Linux) Linspire (Lindows, Inc.)" - family: "Konqueror" - major: '3' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; CYGWIN_NT-5.1)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; de)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; de, DE, de_DE@euro)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; FreeBSD)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; i686 Linux; 20020802)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; i686 Linux; 20021111)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.20-4GB-athlon; X11; i686)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.20-4GB; X11)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.20; X11; i686)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.20-xfs; X11)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.21-20.0.1.ELsmp; X11; i686; , en_US, en, de)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.21-243-athlon)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-10mdk; X11; i686; en_GB, en_NZ, en)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-10mdk; X11; i686; fr, fr_FR)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-1.2115.nptl)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-4GB-athlon; X11; i686)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-aes; X11; i686)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.22-xfs; X11)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux 2.4.24-xfs; X11)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux; de, DE, de_DE@euro)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux; en_US, en)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux; i686)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux; X11; de, DE, de_DE@euro)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux; X11; en_GB)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux; X11; i686; , en_US, en)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; Linux; X11; i686; uk, uk_UA)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; OpenBSD)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1; SunOS)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1.3; OpenBSD 3.4)" - family: "Konqueror" - major: '3' - minor: '1' - patch: '3' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Darwin) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; , en_GB, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; en_US, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; FreeBSD 4.9-STABLE; X11; i386; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; FreeBSD) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2) KHTML/3.2.3 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.22) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.23-0; X11; i686) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.24-xfs; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.25-klg; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.26; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.27; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.3-15mdksmp; i686) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.3-7mdk) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.3-7mdk; X11; i686; en_US, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.4-52-default; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.4; i686) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.5) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.5; X11; i686; en_US, es, fr, it, en_US.UTF-8, en)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.5; X11; i686; en_US, es, fr, it, en_US.UTF-8, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.5; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.7-rc3-love2; X11; i686) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.7; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.8.1-10mdk) KHTML/3.2.3 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.8.1-12mdksmp) KHTML/3.2.3 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.6.8.1; X11; i686; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; de, de_DE@euro) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; en_GB, en_GB.UTF-8, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; en_GB, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; en_US, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; en_US, zh_TW, en_US.UTF-8, zh_TW.UTF-8, zh) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; i686; en_US, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; i686) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux) KHTML/3.2.3 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; ) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko) WebWasher 3.3" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; , en_US, en) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; es, es_ES, es_ES.UTF8) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; i686) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; ) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; Linux; X11; ru, en_US, ru_RU, ru_RU.KOI8-R, KOI8-R) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; NetBSD) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; OpenBSD) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2; x86_64; en_US) KHTML/3.2.3 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2.; Linux 2.4.20-gentoo-r2; X11; i" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2.2; Linux) (KHTML, like Gecko) - www.amorosi4u.de.vu" - family: "Konqueror" - major: '3' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2.3; FreeBSD 4.10-STABLE; X11; i386; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.2.3; OpenBSD 3.6)" - family: "Konqueror" - major: '3' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; FreeBSD 5.3-RELEASE-p2; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; FreeBSD) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.4.21-243-smp4G) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; konqueror/3.3; linux 2.4.21-243-smp4G) (KHTML, like Geko)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.4.24; X11; i686; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.4.27; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.10-1-386; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.10-1-686-smp) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.10-1-686; X11; i686; zh_TW) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.10-1-k7; X11; i686; en_US) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.10-gentoo-r2-ljr; X11; x86_64; en_US) KHTML/3.3.91 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.10; X11; i686; en_US) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.10; X11; i686) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.11.2; X11; i686; cs, en_US) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.7) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.7; X11; i686; fr, it, es, ru, de, en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.8.1-24mdk; X11; i686; sl) KHTML/3.3.92 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.8-1-686; X11; i686; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.8-2-686-smp) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.9-10.1.aur.4; X11; pl) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux 2.6.9; X11) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; de, en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; de) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux) KHTML/3.3.91 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux) KHTML/3.3.92 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; ppc) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; X11; i686; en_US) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; X11; i686; es, en_US) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; X11; i686) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; X11; x86_64; de) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; Linux; x86_64) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; pl, en_US) KHTML/3.3.2 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; pl) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.3; X11; de) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.4; FreeBSD) KHTML/3.4.0 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '4' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.4; Linux 2.6.11-rc4; X11; en_US) KHTML/3.4.0 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '4' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.4; Linux; en_US) KHTML/3.4.0 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '4' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)" - family: "Konqueror" - major: '3' - minor: '4' - patch: - - user_agent_string: "Mozilla/6.0 (compatible; Konqueror/4.2; i686 FreeBSD 6.4; 20060308)" - family: "Konqueror" - major: '4' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc1; i686 Linux; 20020126)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc1; i686 Linux; 20020202)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc1; i686 Linux; 20020224)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc3; i686 Linux; 20020703)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc3; i686 Linux; 20020911)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc3; i686 Linux; 20021022)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.0-rc4; i686 Linux; 20020719)" - family: "Konqueror" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1-rc3; i686 Linux; 20020510)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1-rc4; i686 Linux; 20020710)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Konqueror/3.1-rc5; i686 Linux; 20020609)" - family: "Konqueror" - major: '3' - minor: '1' - patch: - - user_agent_string: "Kurzor/1.0 (Kurzor; http://adcenter.hu/docs/en/bot.html; cursor@easymail.hu)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Lament/7.8 (compatible; Netscape 5.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "larbin_2.6.3 (larbin-2.6.3@unspecified.mail)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "larbin_2.6.3 larbin-2.6.3@unspecified.mail" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LB-Crawler/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LG/U8110/v2.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "fetch libfetch/2.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "libwww-perl/5.79" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT306/R101 [Html2Wml/0.4.11 libwww-perl/5.79]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "testJapanequeDelicious/0.1 libwww-perl/5.803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "W3C-checklink/4.1 [4.14] libwww-perl/5.803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; Linkman)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Links" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Links (030709; Linux 2.6.7-bootsplash i686; fb)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LINKS Mozilla/2.0 (compatible; MSIE 10.0)" - family: "IE" - major: '10' - minor: '0' - patch: - - user_agent_string: "Links (0.92; Linux 2.2.14-5.0 i586)" - family: "Links" - major: '0' - minor: '92' - patch: - - user_agent_string: "Links (0.96; Linux 2.4.9-e.38.1RS i686)" - family: "Links" - major: '0' - minor: '96' - patch: - - user_agent_string: "Links (0.96; Unix)" - family: "Links" - major: '0' - minor: '96' - patch: - - user_agent_string: "Links (0.97pre3; Linux 2.4.18-6mdk i586)" - family: "Links" - major: '0' - minor: '97' - patch: - - user_agent_string: "Links (0.98; Darwin 7.6.0 Power Macintosh; 90x50)" - family: "Links" - major: '0' - minor: '98' - patch: - - user_agent_string: "Links/0.98 (fdafsd; Unix; 80x25)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Links (0.98; Linux 2.2.25 i586; 100x37)" - family: "Links" - major: '0' - minor: '98' - patch: - - user_agent_string: "Links (0.98; Linux 2.4.20 i686; 80x34)" - family: "Links" - major: '0' - minor: '98' - patch: - - user_agent_string: "Links (0.98; Linux 2.4.25-20040331b i686; 80x50)" - family: "Links" - major: '0' - minor: '98' - patch: - - user_agent_string: "Links (0.98; Unix)" - family: "Links" - major: '0' - minor: '98' - patch: - - user_agent_string: "Links (0.98; Unix; 100x37)" - family: "Links" - major: '0' - minor: '98' - patch: - - user_agent_string: "Links (0.99; Linux 2.6.8.1-4-386 i686; 198x66)" - family: "Links" - major: '0' - minor: '99' - patch: - - user_agent_string: "Links (0.99pre14; CYGWIN_NT-5.1 1.5.10(0.116/4/2) i686; 111x39)" - family: "Links" - major: '0' - minor: '99' - patch: - - user_agent_string: "Links (0.99pre8; Unix; 80x25)" - family: "Links" - major: '0' - minor: '99' - patch: - - user_agent_string: "Links (1.00pre10; Darwin 5.5 Power Macintosh; 80x24)" - family: "Links" - major: '1' - minor: '00' - patch: - - user_agent_string: "Links (1.00pre12; Linux 2.6.10-grsec i686; 139x54) (Debian pkg 0.99+1.00pre12-1)" - family: "Links" - major: '1' - minor: '00' - patch: - - user_agent_string: "Links (1.00pre12; Linux 2.6.2 i586; 80x24) (Debian pkg 0.99+1.00pre12-1)" - family: "Links" - major: '1' - minor: '00' - patch: - - user_agent_string: "Links (1.00pre3; SunOS 5.9 i86pc; 80x24)" - family: "Links" - major: '1' - minor: '00' - patch: - - user_agent_string: "Links (2.0; FreeBSD 4.7-RELEASE i386; 80x24)" - family: "Links" - major: '2' - minor: '0' - patch: - - user_agent_string: "Links 2.0 (http://gossamer-threads.com/scripts/links/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Links (2.0pre1; Linux 2.4.24-grsec i686; 80x25)" - family: "Links" - major: '2' - minor: '0' - patch: - - user_agent_string: "Links (2.0pre6; Linux 2.2.16 i686; x)" - family: "Links" - major: '2' - minor: '0' - patch: - - user_agent_string: "Links (2.1pre11; FreeBSD 4.9-RELEASE i386; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; FreeBSD 5.2.1-RELEASE i386; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.4.20-20.7asp i686; 80x24)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.4.22-10mdk i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.4.24 i686; 87x32)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.4.25-gentoo-r2 i686; 100x37)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.4.25-gentoo-r2 i686; 160x64)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.4.26-gentoo-r6 i686; 122x43)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.6.5-gentoo i686; 122x40)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.6.6-rc1 i686; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.6.7-gentoo-r14 i686; fb)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre11; Linux 2.6.7-ide4 i586; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre12; Linux 2.2.19-7.0.16smp i686; 128x47)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre13; Linux 2.4.7-10 i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre13; Linux 2.6.3-4mdk i686; 100x37)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; FreeBSD 4.9-RELEASE i386; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; FreeBSD 5.1-RELEASE i386; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; FreeBSD 5.2.1-RELEASE i386; 80x50)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; Linux 2.4.26-bsd21h i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; Linux 2.6.4-52-default i686; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; Linux 2.6.4-54.5-default i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; Linux 2.6.5-7.104-default i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; Linux 2.6.5 i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; OpenBSD 3.4 i386)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre14; OpenBSD 3.6 i386)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; CYGWIN_NT-5.0 1.3.1(0.38/3/2) i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; FreeBSD 4.10-RELEASE i386; 131x85)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; FreeBSD 4.10-RELEASE i386; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; FreeBSD 5.2-CURRENT i386; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; FreeBSD 5.3-RELEASE i386; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; FreeBSD 5.3-RELEASE i386; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; FreeBSD 5.3-RELEASE-p5 i386; 78x28)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; FreeBSD 5.3-STABLE i386; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.2.14-5.0 i586; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.2.16 i586; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.4.18-27.7.x i586; svgalib)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.4.22-1.2115.nptl i686; braille)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.4.26 i586; 128x48)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.4.26 i686; 128x48)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.4.26 i686; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.4.27 i586; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.10-gentoo-r4 i686; 141x52)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.10-gentoo-r4n i686; fb)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.10-gentoo-r5 i686; 100x38)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.10-gentoo-r6 i686; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.6tlahuizcalpacuhtli i486; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.9-gentoo-r1-g4 ppc; 160x53)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.9-gentoo-r1 i686; 128x48)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.9-gentoo-r1 x86_64; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; Linux 2.6.9 i686; 128x48)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; NetBSD 2.99.11 amd64; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre15; OpenBSD 3.6 i386; x)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre16; Linux 2.6.9-buz i686; 128x47)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre17; FreeBSD 5.4-PRERELEASE i386; 80x60)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre17; Linux 2.4.18-rmk7-pxa3-embedix armv5tel; 73x33)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre7; Linux 2.6.9 i686; 80x25)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre9; Linux 2.4.25 i686; fb)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "Links (2.1pre; Linux)" - family: "Links" - major: '2' - minor: '1' - patch: - - user_agent_string: "LinkSweeper/1.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Linspire Internet Suite" - family: "Other" - major: - minor: - patch: - - user_agent_string: "lmspider (lmspider@scansoft.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Lotus-Notes/5.0; Windows-NT)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Lotus-Notes/6.0; Windows-NT)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH/3.02a (http://www.learntohack.nil)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH browser 3.02a" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH Browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH Browser 3.02" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH Browser/3.02a" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH Browser 3.02a (compatible; mozilla ; Windows NT 5.1; SV1; http://www.learntohack.nil; .NET CLR 1.1.4322; http://www.learntohack.nil)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH Browser 3.02a (compatible; MSIE 6.0; Windows NT 5.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "LTH Browser 3.02a (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://www.learntohack.nil; .NET CLR 1.1.4322; http://www.learntohack.nil)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "LTH Browser 3.02a (http://www.learntohack.nil)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH Browser/3.02a (http://www.learntohack.nil)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LTH Browser/3.02 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "lwp-request/2.06" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LWP::Simple/5.50" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LWP::Simple/5.68" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LWP::Simple/5.76" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LWP::Simple/5.79" - family: "Other" - major: - minor: - patch: - - user_agent_string: "LWP::Simple/5.800" - family: "Other" - major: - minor: - patch: - - user_agent_string: "lwp-trivial/1.34" - family: "Other" - major: - minor: - patch: - - user_agent_string: "lwp-trivial/1.38" - family: "Other" - major: - minor: - patch: - - user_agent_string: "lwp-trivial/1.40" - family: "Other" - major: - minor: - patch: - - user_agent_string: "lwp-trivial/1.41" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Lynx (compatible; MSIE 6.0; )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Lynx (SunOS 10)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Lynx/1.025 (CP/Build 16-bit)" - family: "Lynx" - major: '1' - minor: '025' - patch: - - user_agent_string: "Lynx/2.2 libwww/2.14" - family: "Lynx" - major: '2' - minor: '2' - patch: - - user_agent_string: "Lynx/2.6 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '6' - patch: - - user_agent_string: "Lynx/2.7.1ac-0.102+intl+csuite libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '7' - patch: '1' - - user_agent_string: "Lynx/2.7.1 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '7' - patch: '1' - - user_agent_string: "Lynx/2.7.2 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '7' - patch: '2' - - user_agent_string: "Lynx/2.8 (incompatible; NCSA HALOS; HAL9000" - family: "Lynx" - major: '2' - minor: '8' - patch: - - user_agent_string: "Lynx/2.8rel.2 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: - - user_agent_string: "Lynx/2.8.1rel.2 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '1' - - user_agent_string: "Lynx/2.8.2rel.1 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '2' - - user_agent_string: "Lynx/2.8.3dev.18 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.3dev.6 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.3dev.8 libwww-FM/2.14FM" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.3dev.9 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.3rel.1 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.3rel.1 libwww-FM/2.14FM" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.3rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.4" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.3rel.1 libwww-FM/2.14 SSL-MM/1.4 OpenSSL/0.9.6" - family: "Lynx" - major: '2' - minor: '8' - patch: '3' - - user_agent_string: "Lynx/2.8.4rel.1" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 Dillo/0.7.3 pl (X11; Linux)" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/0.8.6" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6a" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6c" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6e" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6g" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7a" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7b" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7c" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.4rel.1-mirabilos libwww-FM/2.14FM SSL-MM/1.4.1 OpenSSL/0.9.6c" - family: "Lynx" - major: '2' - minor: '8' - patch: '4' - - user_agent_string: "Lynx/2.8.5dev.12 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7a" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.16 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.16 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7a" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6a" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.7 libwww-FM/2.14 SSL-MM/1.4.1" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.7 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6b" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.7 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.7 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7a" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.8 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.6g" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5dev.9 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7-beta3" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5rel.1 libwww-FM/2.14" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/0.8.12" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 GNUTLS/1.0.16" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7c" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5rel.1 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7d" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.5rel.2 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7d" - family: "Lynx" - major: '2' - minor: '8' - patch: '5' - - user_agent_string: "Lynx/2.8.6dev.11 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7d" - family: "Lynx" - major: '2' - minor: '8' - patch: '6' - - user_agent_string: "Lynx/2.8.6dev.6 libwww-FM/2.14 SSL-MM/1.4.1 OpenSSL/0.9.7d" - family: "Lynx" - major: '2' - minor: '8' - patch: '6' - - user_agent_string: "LynX 0.01 beta" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MacNetwork/1.0 (Macintosh)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Metager2 (http://metager2.de/site/webmaster.php)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MicroSux 6.6.6 (fucked up v9.1) 2 bit" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Minstrel-Browse/1.0 (http://www.minstrel.org.uk/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Missigua Locator 1.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MnoGoSearch/3.2.31" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mosaic for Amiga/1.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.0 (compatible; NCSA Mosaic; Atari 800-ST)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mosaic/0.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA_Mosaic/1.0 (X11; FreeBSD 1.2.0 i286) via proxy gateway CERN-HTTPD/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA_Mosaic/2.0 (compatible; MSIE 6.0;Windows XP),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "NCSA_Mosaic/2.0 (Windows 3.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA_Mosaic/2.0 (Windows NT 5.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mosaic/2.1 (Amiga ARexx)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mosaic/2.1 (compatible; MSIE; Amiga ARexx; SV1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA_Mosaic/2.7b5 (X11;Linux 2.0.13 i386) libwww/2.12 modified" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA Mosaic/2.7b5 (X11;Linux 2.6.7 i686) libwww/2.12 modified" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA_Mosaic/2.7b5 (X11;Linux 2.6.7 i686) libwww/2.12 modified" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA Mosaic/2-7-6 (X11;OpenVMS V7.2 VAX)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Mosaic/2.8; Windows NT 5.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA_Mosaic/2.8 (X11; FreeBSD 5.2.1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA Mosaic/3.0.0 (Windows x86)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AIR_Mosaic(16bit)(demo)/v3.09.05.08" - family: "Other" - major: - minor: - patch: - - user_agent_string: "mMosaic/3.6.6 (X11;SunOS 5.8 sun4m)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MOT-V551/08.17.0FR MIB/2.2.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MovableType/3.0D" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozdex/0.06-dev (Mozdex; http://www.mozdex.com/bot.html; spider@mozdex.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "mozilla (compatible; MSIE 3.0; Mac_PowerPC)" - family: "IE" - major: '3' - minor: '0' - patch: - - user_agent_string: "alpha/06" - family: "Other" - major: - minor: - patch: - - user_agent_string: "alpha/06 (AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "alpha/06 (compatible; alpha/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ALPHA/06 (compatible; ALPHA/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ALPHA/06 (compatible; Win98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AmigaOS 3.4 S.E.K-Tron" - family: "Other" - major: - minor: - patch: - - user_agent_string: "AmigaOS 5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/0.001 (uncompatible; TuringOS; Turing Machine; 0.001; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/0.02 [fu] (Dos62; Panzer PzKpfw Mk VI; SK Yep, its official I'm a nazi, or an asshat whichever.)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/0.1 [es] (Windows NT 5.1; U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.000 (AOS; U; en) Gecko/20050301" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.0 (Macintosh; 68K; U; en)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.1N (X11; I; SunOS 5.4 sun4m)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.4.1 (windows; U; NT4.0; en-us) Gecko/25250101" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.6 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040812 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla 1.7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla 1.7.2 (FreeBSD 5.2.1) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla 1.75 on Linux: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/2.01 (Win16; I) via HTTP/1.0 deep.space.star-travel.org/" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/2.0 (compatible ; MSIE 3.02; Windows CE; PPC; 240x320)" - family: "IE" - major: '3' - minor: '02' - patch: - - user_agent_string: "Mozilla/24.4 (X11; I; Linux 2.4 i686; U) [en-ES]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01-C-MACOS8 (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01SGoldC-SGI (X11; I; IRIX 6.3 IP32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01 (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.04Gold (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.04 (Win16; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.04 (Win16; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.04 (X11; I; SunOS 5.5.1 sun4u) via HTTP/1.0 depraved-midget.onlinescanner.com/" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (DreamKey/2.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 [en] (AWV2.20f)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (Liberate DTV 1.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (Planetweb/2.100 JS SSL US; Dreamcast US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (Windows 98;U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (Windows 98; Win 9x 4.90)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (x86 [en] Windows NT 5.1; Sun)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.x (I-Opener 1.1; Netpliance)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (0000000000; 0000 000; 0000000 00 000)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (0000000000; 0000 0000; 00000000000)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.00 [en] (Compatible; RISC OS 4.39; MSIE 5.01; Windows 98; Oregano 1.10)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (6; probably not the latest!; Windows 2005; H010818)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (AmigaOS 3.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (combatible; MSIE 6.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; alpha 06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; alpha/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; ALPHA/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; AmigaOS; Chimera)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; GoogleToolbar 2.0.113-big; Windows XP 5.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; ICS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; IE-Favorites-Check-0.5)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Mozilla 4; Linux; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0b1; X11; I; Linux 2.4.18 i686)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)Gecko/20020604" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (Compatible; MSIE 5.5; Windows NT 4.0; QXW03002)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (Compatible; MSIE 5.5; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 ( compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AmigaOs)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla /4.0 (compatible; MSIE 6.0; i686 Linux)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; NetBSD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (Compatible; MSIE 6.0; SunOS 5.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (Compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 7.1; Windows NT 7.1; Blueberry Bulid 2473)" - family: "IE" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.0 (Compatible; Windows_NT 5.0; MSIE 6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (exemplo; msiex; amiga)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (fantomBrowser)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 ( http://www.brismee.com/ ; mailto:guy.brismee@advalvas.be ; NSA/666.666.666 ; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 ( http://www.brismee.com/ ; mailto:guy.brismee@laposte.net ; NSA/666.666.666 ; SV1; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (JemmaTheTourist;http://www.activtourist.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 look-alike" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (Macintosh; U; PPC Mac OS X; en)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (MobilePhone SCP-5500/US/1.0) NetFront/3.0 MMP/2.0" - family: "NetFront" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (Mozilla/4.0; 6.0; MSIE 6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (MSIE/6.0; compatible; Win98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (MSIE 6.0; Windows NT 5.1; .NET CLR 1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (PDA; SL-C860/1.0,OpenPDA/Qtopia/1.3.2) NetFront/3.0" - family: "NetFront" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (PDA; Windows CE/1.0.0) NetFront/3.0" - family: "NetFront" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (PDA; Windows CE/1.0.1) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.0 (); ; ; ()" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (SKIZZLE! Distributed Internet Spider v1.0 - www.SKIZZLE.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (SmartPhone; Symbian OS/0.9.1) NetFront/3.0" - family: "NetFront" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (stat 0.12) (statbot@gmail.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (SunOS 5.8)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (Windows NT 4.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (Windows XP 5.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20040803 Debian-1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla 4.75 [en] (X11; I; Linux 2.2.25 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla 4.8 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla 5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (000000000; 0; 000 000 00 0 000000; 00000; 00000000) 00000000000000 0000000000" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (000000000; 0; 000 000 00 0; 00000) 000000000000000 0000000 0000 000000 0000000000" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (000000000; 0; 000 000 00 0; 00) 0000000000000000000 0000000 0000 000000 0000000000000" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (000000000; 0; 000 000 00 0; 00000) 0000000000000000000 0000000 0000 000000 0000000000000" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (000000000; 0; 000 000 00 0 000000; 00000; 00000000) 00000000000000 00000000000 000000000000000000" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (000000000; 0; 000 000 00 0; 00000) 0000000000000000000 0000000 0000 000000 0000000000000,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.001 (Macintosh; N; PPC; ja) Gecko/25250101 MegaCorpBrowser/1.0 (MegaCorp, Inc.)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.001 (windows; U; NT4.0; en-us) Gecko/25250101" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0adfasdf" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (ALL YOUR BASE ARE BELONG TO US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (AmigaOS 3.5, Amiga, 0wnx0r3d by eric) Gecko/20020604" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (AmigaOS; sektron)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Atari; U; Atari 800; en-US) Gecko/20040206 Galaxian/2.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (BeOS; U; BeOS BePC; en-CA; rv:1.5b) Gecko/20050308 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; 0.8) Gecko/20010208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.4) Gecko/20030701" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (CIA Secure OS; U; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Clustered-Search-Bot/1.0; support@clush.com; http://www.clush.com/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Mozilla/4.0; MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Gecko/20050105 Debian/1.7.5-1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; X11; Linux i686; Konqueror/3.2) (KHTML, like Gecko) Gentoo/2004" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (DeadPeopleTasteLikeChicken.biz)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [de] (OS/2; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows NT 5.1; U; en-US;)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows; U; en-US; rv:1.4)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows; U; Win98; en-US; rv.0.9.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows; U; WinNT5.1; en-GB; rv:1.4)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows XP; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (FreeBSD; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2" - family: "K-Meleon" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Google-Gbrowser/0.0.9a; Windows NT 5.1; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Hector)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 IE" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (incompatible; MSIE 6.9; Secret OS 3.2; FIB;)" - family: "IE" - major: '6' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Java 1.4.1_05; Windows XP 5.1 x86; en) ICEbrowser/v6_0_0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Java 1.4.2_02; Windows XP 5.1 x86; en) ICEbrowser/v6_0_0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Java 1.4.2_05; Windows XP 5.1 x86; en) ICEbrowser/v5_2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (kombpartilb; Verhsun; Plasdfjoi; SV1; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Linux i386; en-US) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-EN; rv:0.9.4)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC;) Gecko DEVONtech" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; Incompatible my ass! What if I don't want your jerky, elitist, ugly-assed CSS crap? Screw you!)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.6 (KHTML, like Gecko) NetNewsWire/2.0b10" - family: "NetNewsWire" - major: '2' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.6 (KHTML, like Gecko) NetNewsWire/2.0b22" - family: "NetNewsWire" - major: '2' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0+(Macintosh;+U;+PPC+Mac+OS+X;+en)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/103u (KHTML, like Gecko) safari/100" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko, Safari) Shiira/0.9.1" - family: "Shiira" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko, Safari) Shiira/0.9.2" - family: "Shiira" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko, Safari) Shiira/0.9.2.2" - family: "Shiira" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.4 (KHTML, like Gecko, Safari) Shiira/0.9.2.2" - family: "Shiira" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko, Safari) Shiira/0.9.3" - family: "Shiira" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit (KHTML, like Gecko) AIQtech" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit (KHTML, like Gecko) DEVONtech" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/124 (KHTML, like Gecko) safari/125.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.2 (KHTML, like Gecko, Safari) Shiira/0.9.2.2" - family: "Shiira" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.22" - family: "OmniWeb" - major: '563' - minor: '22' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.29" - family: "OmniWeb" - major: '563' - minor: '29' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.33" - family: "OmniWeb" - major: '563' - minor: '33' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/125.4 (KHTML, like Gecko, Safari) OmniWeb/v563.34" - family: "OmniWeb" - major: '563' - minor: '34' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v496" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v549" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.43" - family: "OmniWeb" - major: '558' - minor: '43' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.46" - family: "OmniWeb" - major: '558' - minor: '46' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/85 (KHTML, like Gecko) OmniWeb/v558.48" - family: "OmniWeb" - major: '558' - minor: '48' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020909 Chimera/0.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20030917 Camino/0.7" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/125.6 (KHTML, like Gecko, Safari) Shiira/0.9.3" - family: "Shiira" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; da-DK; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.2b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-DE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050331 Camino/0.8.3" - family: "Camino" - major: '0' - minor: '8' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040714" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041114 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041121 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041201 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20050103 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20050111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050224 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050317 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050401 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050115 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050127 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050130 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050131 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050203 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050217 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr-FR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O) Gecko Camino" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; it-IT; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; zh-tw) AppleWebKit/125.5.6 (KHTML, like Gecko, Safari) Shiira/0.9.3" - family: "Shiira" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (MSIE 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (MSIE 6.0) Gecko/20011018" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla 5.0 (MSIE 6.0 Win 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (NetBSD 1.6.2; U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (NetWare; U; NetWare 6.0.04; en-PL) ICEbrowser/5.4.3 NovellViewPort/3.4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (No data found)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (not MSIE5.5; X11; U; HP-UX 9000/785; en-US; rv:1.1) Gecko/20020828" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 3; en-US; rv:1.6) Gecko/20040117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7.5) Gecko/20041220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8a2) Gecko/20040719" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4; da-DK; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (ROIL FF/1.0; Windows NT 5.1 64-bit)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (RSS Reader Panel)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Sage)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (tTh @ Cette) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (U; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Unknown; 32-bit)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (U; PPC; en) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Version: 1251 Type:4565)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Version: 245 Type:180)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Version: 3247 Type:3276)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Version: 4445 Type:1763)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (VMS; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows 3.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U; en-CA) Gecko/20041107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U; rv:1.7.5) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1,de-DE)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win3.1; en-US; rv:1.0.0) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-AT; 0.7) Gecko/20010109" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0; CMCE) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2b) Gecko/20021016" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.8.0.1c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041220 K-Meleon/9.0" - family: "K-Meleon" - major: '9' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040707 MSIE/7.66" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a3) Gecko/20040817" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050317 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050329 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:7.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; es-ES; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; hu; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pl-PL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pl-PL; rv:1.7.6) Gecko/20050319" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; PL; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pt-BR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; sv-SE; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; sv-SE; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-AT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20041220 K-Meleon/0.9" - family: "K-Meleon" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8a6) Gecko/20050111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; fr-FR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; PL; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; pt-BR; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; Bush knew, failed to act.)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041108 STFU/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.6) Gecko/20050321 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; el-GR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041110 FireFox/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; 0.7) Gecko/20010109" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; Like Navigator 6.2) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20020923 Phoenix/0.1" - family: "Phoenix" - major: '0' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20020929 Phoenix/0.2" - family: "Phoenix" - major: '0' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030823 Mozilla Firebird/0.6.1+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031016" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803 Mnenhy/0.6.0.104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 Mnenhy/0.6.0.101" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.0.0e" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.1.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.4) Gecko/20041002" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.4) Gecko/20041010 FireFox/0.9b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.4) Gecko/20041010 K-Meleon/0.9b" - family: "K-Meleon" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Plasmahuman/1.0 (Firefox 1.0 Get it. Now.)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.2d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041220 K-Meleon/0.9" - family: "K-Meleon" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050218" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040621" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a4) Gecko/20040927" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041122,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041122 MultiZilla/1.7.0.0o" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050109" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050110" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050111 Mnenhy/0.7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050221" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050314 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050323 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050330 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050120" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050211" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050216" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-AR; rv:1.7.5) Gecko/20041108 Clab_Browser_1.0_www.cristalab.com/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-AR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-AR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.7.6) Gecko/20050303 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fi-FI; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.0.0) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8a6+) Gecko/20050111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8b+) Gecko/20050117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7.6) Gecko/20050311 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; nl-NL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; nl-NL; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.2) Gecko/20040803 Mnenhy/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; PL; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.4) Gecko/20040926" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; tr-TR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-TW; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ca-AD; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.6) Gecko/20050318 Firefox/1.0.2 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.6) Gecko/20050330 Firefox/1.0.2 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; da-DK; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; da-DK; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.5) Gecko/20041108 Firefox/LukasHetzi" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8a3) Gecko/20040817" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041107 Junglelemming/4.3.7.1 (Wesma Pictures)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041122 Muuuh/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.6) Gecko/20050223" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.6) Gecko/20050321 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-CA; rv:1.8b2) Gecko/20050312 Firefox/1.0+ (tinderbox beast)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.0.1) Gecko/20020823" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.0.2) Gecko/20021120" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050321 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040709" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 Mnenhy/0.6.0.104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.0.0d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 Sylera/2.1.20" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firechicken/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firematt/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Hypnotoad/1.0 (Firefox/1.0)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 IE/6.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Junglelemming/1.0 (Wesma Pictures)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Microsoft/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Mozilla/4.0/MSIE 6.0" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Mozilla/5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 MSIE/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107-RB Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.1c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.1j" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.8.0.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041219 Sylera/2.1.21" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041220 K-Meleon/0.9" - family: "K-Meleon" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041222 MOOX (M3)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050308 Firefox/0.9.6" - family: "Firefox" - major: '0' - minor: '9' - patch: '6' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 (All your Firefox/1.0.1 are belong to Firesomething)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firelemur/1.0.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 CompeGPS/1.0.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Hypnotoad/1.0.1 (Firefox/1.0.1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Supergecko/1.0.1 (IE6)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1 (MOOX M1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US, rv:1.7.6) Gecko/20050308 Firefox/1.0.1 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050312 Firefox/1.0.1 (stipe)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050314 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050315 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050317 Seastarfish/1.0.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050319" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050323" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050324 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 FairFox/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Unknow/x" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040927" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041123 K-Meleon/0.9" - family: "K-Meleon" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041217 Mozilla Sunbird/0.2RC1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20040101" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050107 MultiZilla/1.7.0.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050112" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050226" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050228 Firefox/1.0+ (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050307 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050313 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050315 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050319 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050320 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050321 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050330 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050401" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050128 Mnenhy/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050131 Firefox/1.0+ (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050201" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050202 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050205" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217 MultiZilla/1.7.0.2d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:) Gecko/20040309" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;) Unchaos/Crawler" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.7.5) Gecko/20041210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; eu-ES; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; eu-ES; rv:1.7.3) Gecko/20040910,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; eu-ES; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; eu-ES; rv:1.7.6) Gecko/20050225 Firefox/1.0.1,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Mozilla/4.0/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Mozilla /4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 2000)/1.0" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041109 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.0o" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.8)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; he-IL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; hr-HR; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; hu-HU; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.3.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7.6) Gecko/20050311 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ko-KR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.6) Gecko/20050321 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; PL; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; PL; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; PL; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.0.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.0.2) Gecko/20040823" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 xb0x/0.10.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sl-SI; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; tr-TR; rv:1.7.6) Gecko/20050321 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; uk-UA; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; cs-CZ; rv:1.7.6) Gecko/20050318 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041217 WebWasher 3.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041220 K-Meleon/0.9" - family: "K-Meleon" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8b2) Gecko/20050307 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; fr-FR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; hu-HU; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; pl-PL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; ru-RU; rv:1.7.4) Gecko/20040926" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; ru-RU; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; tr-TR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-CN; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-DE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows, U, WinNT4.0, en-US, rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; es-ES; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; es-ES; rv:1.7.6) Gecko/20050303 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; fi-FI; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; Windows 98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; ; Windows NT 5.1; rv:1.7.5) Gecko/20041107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux; en-US) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; DragonFly i386; en-US; rv:1.7.5) Gecko/20041112 Foobar/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; de-DE; rv:1.7.6) Gecko/20050322 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-GB; rv:1.7.5) Gecko/20041228" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030702" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030723" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031008 Epiphany/1.0" - family: "Epiphany" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031017" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5a) Gecko/20030926 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031203" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031207 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040128" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040829" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041201 Epiphany/1.4.6" - family: "Epiphany" - major: '1' - minor: '4' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041204 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041219" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041221 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050103" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050108" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050112" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050118" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050124" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050305" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050306" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.6) Gecko/20050315 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7a) Gecko/20040311" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040701 Epiphany/1.2.8" - family: "Epiphany" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20050314 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8a5) Gecko/20041214" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i686; en-US; rv:1.8a5) Gecko/20041106" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.6) Gecko/20040304" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.6) Gecko/20040816" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.6) Gecko/20040831" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/800; en-US; rv:1.4) Gecko/20030730" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; IRIX64 IP28; en-US; rv:1.7.5) Gecko/R-A-C Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; IRIX64 IP30; en-US; rv:1.7.5) Gecko/R-A-C Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; IRIX64 IP35; en-US; rv:1.7.5) Gecko/20041230" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux 2.4.2-2 i686; en-US; 0.7) Gecko/20010316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux 2.4.2 i686, en) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux 2.6.11.4-gentoo-xD i686; pl-PL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux 2.6.3-FTSOJ i686; en-US; rv:1.6)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux 2.6.4 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux; fr-FR; rv:1.6) Gecko/20040207 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.2) Gecko/20030708" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041209 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu4-warty99)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041219 Firefox/1.0 (Debian package 1.0+dfsg.1-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.6) Gecko/20050325 Firefox/1.0.2 (Debian package 1.0.2-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; it-IT; rv:1.4.1) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; da-DK; rv:1.7.5) Gecko/20041221" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686, de)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4.2) Gecko/20040921" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6; 009f52b638a35a83ea5212109fc44eed;) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040115 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.2) Gecko/20040906" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.3) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20041218" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20041220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20041221" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20041231" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20050125" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8a5) Gecko/20041121" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8a5) Gecko/20041122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8a6) Gecko/20050111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.8b2) Gecko/20050317" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.2) Gecko/20040906" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.6) Gecko/20050301 Firefox/1.0.1 (Debian package 1.0.1-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; el-GR; rv:1.7.5) Gecko/20041209 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu4-warty99)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.5) Gecko/20050312 Epiphany/1.4.8" - family: "Epiphany" - major: '1' - minor: '4' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.6) Gecko/20050315 Firefox/1.0 (Ubuntu package 1.0.1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.6) Gecko/20050325 Firefox/1.0.2 (Debian package 1.0.2-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030401 Debian/1.0.2-2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030821" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1; aggregator:Rojo; http://rojo.com/) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030721 wamcom.org" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031218" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040412" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040805" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20041004" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20041010" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20050104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030522 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030702" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20040206" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030903 Firebird/0.6.1+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031030 MultiZilla/1.5.0.3l" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031125" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031222" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040625" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040914 Epiphany/1.2.5" - family: "Epiphany" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20050202 Linspire/1.6-5.1.0.50.linspire2.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20041029" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 MultiZilla/1.6.0.0e" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040806" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040901" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040917" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040918 Epiphany/1.4.6" - family: "Epiphany" - major: '1' - minor: '4' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040919 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040920" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040921" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040924 Debian/1.7.3-2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040924 Epiphany/1.4.4 (Ubuntu)" - family: "Epiphany" - major: '1' - minor: '4' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040929" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040930" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041001 Epiphany/1.2.9" - family: "Epiphany" - major: '1' - minor: '2' - patch: '9' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Epiphany/1.4.5" - family: "Epiphany" - major: '1' - minor: '4' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Epiphany/1.4.6" - family: "Epiphany" - major: '1' - minor: '4' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041019 MultiZilla/1.7.0.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041023" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041105" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041202 Debian/1.7.3.x.1-39" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20050112" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5;) Gecko/20020604 OLYMPIAKOS SFP" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 firefox/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 IE/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Microsoft/IE6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 MSIE/5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.1" - family: "Firefox" - major: '1' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox (MSIE 6.0)/1.0" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Mozilla/1.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041118 Mozilla/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 Mnenhy/0.6.0.104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 Mnenhy/0.7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 msie" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.7.0.2d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220 MultiZilla/1.7.0.1f" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041222" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041223" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041224" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041226" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041226 Epiphany/1.4.7" - family: "Epiphany" - major: '1' - minor: '4' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041227" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041228 Epiphany/1.4.6" - family: "Epiphany" - major: '1' - minor: '4' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041229" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041229 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041231" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.4-6 StumbleUpon/1.87" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Epiphany/1.4.7" - family: "Epiphany" - major: '1' - minor: '4' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Epiphany/1.4.7 (Debian package 1.4.7-3)" - family: "Epiphany" - major: '1' - minor: '4' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 MultiZilla/1.7.0.1j" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050108" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050110 Spica/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050114 Microsoft/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050120" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050211 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050218" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050219 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050221 msie/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050223 Firefox/1.0 (Debian package 1.0.x.2-15)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050309" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 HypnoToad/1.0.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050304 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050306 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050309 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050311 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050311 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050312 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050314 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050315 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050317 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050318 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050321 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Debian/1.7.6-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Epiphany/1.4.8 (Debian package 1.4.8-2)" - family: "Epiphany" - major: '1' - minor: '4' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050324 Firefox/1.0 (Ubuntu package 1.0.2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050325 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050325 Firefox/1.0.2 (Debian package 1.0.2-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050328 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050401 Firefox/1.0.2 (Debian package 1.0.2-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 Epiphany/1.2.6" - family: "Epiphany" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040903 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040907 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040909 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20041027 NaverBot/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040729" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040817" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041121" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041124" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20050107 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20050111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b2) Gecko/20050227" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050314" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; SkipStone 0.8.4) Gecko/20020722" - family: "SkipStone" - major: '0' - minor: '8' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.5) Gecko/20031107 Debian/1.5-3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1 StumbleUpon/1.999" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.6) Gecko/20050303 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.6) Gecko/20050312 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4.2) Gecko/20040308" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20041020" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.4.3) Gecko/20041004" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050221 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.6) Gecko/20050315 Firefox/1.0 (Ubuntu package 1.0.1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686) Gecko/20041107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.7.5) Gecko/20041119 Firefox/1.0 (Debian package 1.0-3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.7.6) Gecko/20050325 Firefox/1.0.2 (Debian package 1.0.2-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.4.3) Gecko/20041004" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.3) Gecko/20040922" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.3) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ko-KR; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.6) Gecko/20040122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.5) Gecko/20050102" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.5) Gecko/20050111 Fedora/1.7.5-3.0.3.kde" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.6) Gecko/20050303 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.6) Gecko/20050322 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; PL; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; PL; rv:1.5) Gecko/20031020" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; PL; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.7.3) Gecko/20040930" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Superholio/0.10.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041113 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20050329 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.6) Gecko/20050315 Firefox/1.0 (Ubuntu package 1.0.1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; tr-TR; rv:1.7.2) Gecko/20040804 Epiphany/1.2.8" - family: "Epiphany" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i?86; en-US; rv:1.6) Gecko/20040116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.3) Gecko/20041207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050105 Debian/1.7.5-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050221 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.6) Gecko/20050325 Firefox/1.0.2 (Debian package 1.0.2-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux sparc; en-US; rv:1.5) Gecko/20041129" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; ca-AD; rv:1.7.5) Gecko/20050210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20041020" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050101" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050201" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050310" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050305" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; nl-NL; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.3) Gecko/20050117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.5) Gecko/20041205 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.5) Gecko/20040102 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1" - family: "Camino" - major: '0' - minor: '8' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.2.1) Gecko/20030228" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040830 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20050110" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20050312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.7.6) Gecko/20050312 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; OpenVMS AlphaServer_ES40; en-US; rv:1.4) Gecko/20041126 FireFox/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.4) Gecko/20030903" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.4) Gecko/20040126" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.4) Gecko/20040414" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.3) Gecko/20040919" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20041221" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2) Gecko/20021211" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20041214" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.3) Gecko/20040914" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20050105" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.6) Gecko/20050301 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.6) Gecko/20050313 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040629" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20041221" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.7.5) Gecko/2004" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; System/V-POSIX alpha; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; UNICOS/mk 21164a(EV5.6) Cray T3E; en-US; huelk) Gecko/20040413 SynLabs/0.6.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X) Gecko/20021016" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.5 (compatible; alpha/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.666 [en] (X11; U; FreeBSD 4.5-STABLE i386)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.01 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 (BEOS; U ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (6.0; comtemptible)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 [en] (Atari 2600; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 [en] (Win32; Escape 5.03; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 [en] (Win32; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 [en] (X11; Linux 2.4.26 Sparc64) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 [en] (X11; Linux 2.6.10 Sparc 64) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 (Linux; Escape/5.0; acentic client)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.1 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.1 [ja] (X11; I; Linux 2.2.13-33cmc1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.2 [en] (BeOS; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.2 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.00; msie" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.02 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.0 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.1 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.2 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7 [en] (Debian Sarge; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/9.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/9.0 (Atari2600; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/9.2 (Windows; U; Windows 3.11; en-US; rv:4.9.3) Gecko/20050213 Firefox/4.2" - family: "Firefox" - major: '4' - minor: '2' - patch: - - user_agent_string: "Mozilla/9.876 (alpha/06)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (compatible; X11; I; Linux 2.0.32 i586)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla Epinard" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla FireFox (compatible)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (FreeBSD 5.3-CURRENT)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (IE4 Compatible; I; Mac_PowerPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (IE5 Compatible; I; Mac_PowerPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla(IE Compatible)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (larbin2.6.3@unspecified.mail)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla Windows" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (X11; E; Linux )" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (X11; I; Linux 2.0.32 i286)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (X11; I; Linux 2.0.32 i586)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SEKTron alpha/06; AmigaOS" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 [en] (X11; U; Linux 2.6.4; en-US; rv:0.9.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:0.9.2) Gecko/2001" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010628" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2.1) Gecko/20010901" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010914" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20010923" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux sparc64; en-US; rv:0.9.4) Gecko/20011029" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4.2) Gecko/20021112 CS 2000 7.0/7.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.5) Gecko/20011018" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en US; rv:0.9.6+)Gecko/20011122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6+) Gecko/20011122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:0.9.8) Gecko/20020204" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:0.9.8) Gecko/20020204" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (U; en-US; rv:0.9.9) Gecko/20020311" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020408" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020412 Debian/0.9.9-6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020501" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.9) Gecko/20020513" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0rc1) Gecko/20020417" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc3) Gecko/20020523" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0rc2) Gecko/20020510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0rc3) Gecko/20020524" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.0) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.0) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.0) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.0) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.0) Gecko/20020530" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.0) Gecko/20020605" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0+) Gecko/20020518" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020529" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020604" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0; hi, Mom) Gecko/20020604" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.0.0) Gecko/20020529" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.0.0) Gecko/20020622 Debian/1.0.0-0.woody.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.0) Gecko/20020611" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020730 AOL/7.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020909" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20021023 Chimera/0.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021219 Chimera/0.6+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.1) Gecko/20020830" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.0.1) Gecko/20020903" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020809" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020828" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020830" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020903" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021103" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021105" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20021216" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021216" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021216" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030708" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030716" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20031013" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1a) Gecko/20020611" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020721" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20021005" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20030102" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.1) Gecko/20030104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1a) Gecko/20020610" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.1) Gecko/20020927" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/1.10 [en] (Compatible; RISC OS 4.37; Oregano 1.10)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Symbian OS/1.1.0)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2a) Gecko/20020910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2) Gecko/20021126" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2) Gecko/20021204" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021202" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2) Gecko/20021207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.2) Gecko/20021205" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-GB; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; nl-NL; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.2.1) Gecko/20030324" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20021204" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1; aggregator:NewsMonster; http://www.newsmonster.org/) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021204" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20021213 Debian/1.2.1-2.bunk" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030124" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030327" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030502 Debian/1.2.1-9woody3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.2.1) Gecko/20030225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.2.1) Gecko/20021125" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.2.1) Gecko/20030228" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; ru-RU; rv:1.2.1) Gecko/20030721" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.2.1) Gecko/20030711" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.2.1) Gecko/20030711" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 (X11; U; Linux 2.6.13 i686; en-US; rv:1.2.9) Gecko/20050612 MSIE (Debian FAST Browser) v15.23 - All rights reserved - Unix -
    Error Processing table...
    Line 43
    " - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.3) Gecko/20030616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3a) Gecko/20021212" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3b) Gecko/20030210" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3; MultiZilla v1.4.0.3J) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021212" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3b; MultiZilla v1.3.1 (a)) Gecko/20030210" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3b) Gecko/20030323" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.3) Gecko/20030321" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.3) Gecko/20030313" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030210" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030408" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030623" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030708 Debian/1.3-4.lindows43" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.3b) Gecko/20030317" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.3) Gecko/20030317" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3a) Gecko/20021211" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.3) Gecko/20030314" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.3.1) Gecko/20030721 wamcom.org" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.3.1) Gecko/20030723 wamcom.org" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.3.1) Gecko/20030425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.3.1) Gecko/20030425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.3.1) Gecko/20030425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; el-gr; rv:1.3.1) Gecko/20030425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1) Gecko/20030425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030524" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030525" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20040413" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20040528" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030428" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3.1) Gecko/20030517" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.3.1) Gecko/20030428" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030507" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030529" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-us; rv:1.4)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4a) Gecko/20030401" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030507" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030529" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030612" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624/7.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4a) Gecko/20030401" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030709" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030715" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030730" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20040127" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20040324" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.4) Gecko/20030730" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ca; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; da-DK; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4) Gecko/20030821" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4a) Gecko/20030401" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030507" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030529" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030617" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030704" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030714 Debian/1.4-2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030716" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030728" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030730" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030805" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030807" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030818" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030908 Debian/1.4-4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030915" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030922" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031110" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031112" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031119 Debian/1.4.0.x.1-20" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031211" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20031212" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20040107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20040116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Larbin/2.6.3 (larbin@unspecified.mail)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Larbin/2.6.3 larbin@unspecified.mail" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.4) Gecko/20031111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; gl-ES; rv:1.4) Gecko/20030703" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.4) Gecko/20030630" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.4) Gecko/20030922" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.4) Gecko/20030908" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenVMS AlphaServer_ES40; en-US; rv:1.4) Gecko/20030826 SWB/V1.4 (HP)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.4b) Gecko/20030523" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.4) Gecko/20040214" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.4) Gecko/20040510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20030701" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20031128" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4) Gecko/20040414" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-0; en-US; rv:1.4.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4.1) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (MacOSX; U; MacOSX; en-US; rv:1.4.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.4.1) Gecko/20031014" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4.1) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4.1) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4.1; MultiZilla v1.5.0.2j) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4.1) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.4.1) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031008" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031008 Debian/1.4-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 MSIE" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20040312 Debian/1.4.1-0jds1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20040406" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.1) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.1) Gecko/20031114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.1) Gecko/20040406" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.4.1) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.4.1) Gecko/20031114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.4.1) Gecko/20031114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.4.1) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.4.1) Gecko/20031114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.4.1) Gecko/20031209" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.4.1) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4.1) Gecko/20031114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4.1) Gecko/20031125" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4.2) Gecko/20040220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.4.2) Gecko/20040301" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040301" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040308" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040323" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040326" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040330" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040428" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040921" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.4.2) Gecko/20040308" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.4.2) Gecko/20040308" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4.2) Gecko/20040220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.4.3) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040924" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.3) Gecko/20040930" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.4.3) Gecko/20040930" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.5b) Gecko/20030904" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.1" - family: "K-Meleon" - major: '0' - minor: '8' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2" - family: "K-Meleon" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; es-ES; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; es-ES; rv:1.5) Gecko/20031007, Mozilla/5.0 (Windows; U; Win98; es-ES; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; PL; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.5b) Gecko/20030827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; fr-FR; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030718" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030916" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20030925" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5 ) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2" - family: "K-Meleon" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; PL; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.5) Gecko/20031006" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.5b) Gecko/20030827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.5b) Gecko/20030827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030916" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20030925" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.5) Gecko/20031006" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2" - family: "K-Meleon" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; rv:1.5a; FreeBSD)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5a) Gecko/20030712" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5b) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031028" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20040102" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20040105" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20040110" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20040921" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.5) Gecko/20031027" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5) Gecko/20031015" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.5) Gecko/20031031" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.5) Gecko/20031107 Debian/1.5-3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030718" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030827" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030831" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030917" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031009" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031016" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031024" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031031" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Debian/1.5-3 StumbleUpon/1.906" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031111 Debian/1.5-2.backports.org.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031115 Debian/1.5-3.he-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031202" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031211 Debian/1.5-2.0.0.lindows0.0.43.45+0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031224" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031231" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20040225 Debian/1.5-2.0.0.lindows0.0.65.45+0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20040414" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.5) Gecko/20031007 Debian/1.6-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.5) Gecko/20031007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5a) Gecko/20030723" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5) Gecko/20031016" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5) Gecko/20031222" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5.1) Gecko/20031120" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5.1) Gecko/20031207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6b) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113 Relativity" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040206 MSIE/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6; lwpc5440) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; et-EE; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; hu; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pl-PL; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-AT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6b) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; nl-NL; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.6b) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031105" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 MSIE/5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Poweranemone/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Powergoat/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Powerpig/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.6+) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; nb-NO; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; PL; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.6) Gecko/20040407" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-TW; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ar; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.6b) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20020430" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031030" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 |sncwebguy|" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040119 MyIE2" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 GoogleBot/1.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 KPTX3/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Mozilla/5.0 StumbleUpon/1.904" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 msie/6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 MSIE/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Spacedonkey/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Telnet/4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6; RattBrowser) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.6) Gecko/20040113,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; PL; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; fr-FR; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; pt-BR; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; DragonFly i386; en-US; rv:1.6) Gecko/20040518" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6a) Gecko/20031207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6a) Gecko/20040525" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040120" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040308" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040313" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040319" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040324" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040412" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040414" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040512" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; ru-RU; rv:1.6) Gecko/20040406" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.6) Gecko/20040122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040413" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040413 Debian/1.6-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040527" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040530 Debian/1.6-6.backports.org.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6) Gecko/20040216 Debian/1.6.x.1-10" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-IE; rv:1.6) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-IE; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20031029" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20031103" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031208" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6b) Gecko/20031210" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Fucking cocksmoker" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040112" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040119" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-0.backports.org.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian/1.6-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040122 Debian Sarge" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040123" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040127" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040130" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040203" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040204" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 dufus/42" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-us; rv:1.6) Gecko/20040207 firefox/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 InterBank 4.32" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040211" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040215 MSIE/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040216 Debian/1.6.x.1-10" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040218" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040223" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040224" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040229" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040303" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040306" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040307" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040308" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040310" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Debian/1.6-3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040314" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040318" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040321" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040324" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040325" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040326" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040329" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040330" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040401 Debian/1.6-4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040402 Debian/1.6-3.backports.org.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040403" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040411" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040422" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040423" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040425" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040426 Debian/1.4-4 StumbleUpon/1.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040429" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040430" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040505" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506 Powerstarfish/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040507" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040518" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040528 Debian/1.6-7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040530 Debian/1.6-6.backports.org.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6 kni-rat-sam 20041007) Gecko/20040510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6; Using IIS? Visit www.glowingplate.com/iis ) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040123 Debian/1.6-1.he-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040413 Debian/1.6-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040528 Debian/1.6-7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-CA; rv:1.6) Gecko/20040207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6b) Gecko/20031210" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040122 Debian/1.6-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040126" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040207 AnyBrowser /1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040413 Debian/1.6-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.6) Gecko/20040429" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.6) Gecko/20040510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; nl-NL; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.6) Gecko/20040124" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; PL; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; PL; rv:1.6) Gecko/20040122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.6) Gecko/20040528 Debian/1.6-7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.6) Gecko/20040331" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.6) Gecko/20040413 Debian/1.6-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.6) Gecko/20040115" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.6) Gecko/20040122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.6) Gecko/20040510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux powerpc; en-US; rv:1.6) Gecko/20040207 FireFox/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.6) Gecko/20040414 Debian/1.6-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; eo-EO; rv:1.6) Gecko/20040414 Debian/1.6-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040113" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040510" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.6) Gecko/20040405" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.6) Gecko/20040408" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040314" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040324" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040820" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040902" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.6) Gecko/20040117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6a) Gecko/20031125" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040211 Lightningyak/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; es-ES; rv:1.6) Gecko/20040116" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (BMan; U; BManOS; bg-BG; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (en-AU; rv:1.7)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; de-AT; rv:1.7a) Gecko/20040225" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7a) Gecko/20040219" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040421 netscape7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040219" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040320" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040321" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040323" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040401" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040404" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefrog/0.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 FireFox/0.9.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 MSIE/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040730 Googlebot/2.1/2.1" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7b+) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; hu-HU; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; nl-NL; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; da-DK; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040123" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040219" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040328" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040403" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040408" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040410" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040412" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040520 K-Meleon/0.8" - family: "K-Meleon" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Moonsnake/0.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Powersnake/0.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Powerwhale/0.8" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Pussyfag/0.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Spacebunny/0.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 WebWasher 3.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Moonlizard/0.9.1 (:w00t: to the world and the world :w00t:s back!)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)/0.9.1" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firepig/0.9.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Lightningspider/0.9.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Telnet/4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Ungawa/0.9.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Waterphoenix/0.9.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Webpony/0.8 ( polymorph)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Superlizard/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Superraccoon/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 XboxStore.com" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7a) Gecko/20031129" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-AT; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; Slackware; Linux i686; en-US; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; AIX 0006FADF4C00; en-US; rv:1.7b) Gecko/20040318" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040422" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7b) Gecko/20040429" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040612" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; ja-JP; rv:1.7) Gecko/20040705" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; de-AT; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7) Gecko/20040619" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7) Gecko/20040724" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7) Gecko/20040803 Nevermind/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-CA; rv:1.7) Gecko/20040704" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-EU; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-EU; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-EU; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-UK; rv:1.7a) Gecko/20040105" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040218" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040312" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040322" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040405" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040408" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040514" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040612" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Lightningoyster/0.9 (Mozilla/4.0 (compatible; MSIE 6.0; WinNT; ATHMWWW1.1;))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040617" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040619" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040622" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040624 Debian/1.7-2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Microsoft/IE" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Mozilla/4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040702" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040703" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040704 Debian/1.7-4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040724" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040725" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040728" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040729" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Lightningslimemold/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040805 Googlebot/2.1" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040808 Powertiger/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040809" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040828 Seagoat/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7rc1) Gecko/20040527" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7) Gecko/20040617" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; PL; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7) Gecko/20040616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7) Gecko/20040627" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Mac OS; en-US; rv:1.7) Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OSF1 alpha; en-US; rv:1.7) Gecko/20040708" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7b) Gecko/20040319" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7c) Gecko/" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040517" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040610" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040618" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040623" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040920" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.2 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) )" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707 Mnenhy/0.6.0.104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fi-FI; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 WebWasher 3.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.1) Gecko/20040707" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD 5.2.1 i686; en-US; rv:1.7.1+) Gecko/20020518" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040724" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.1) Gecko/20040726" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040715" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040715 Debian/1.7.1-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040726 Debian/1.7.1-4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040730" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.1) Gecko/20040802 Debian/1.7.1-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; Athlon64; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; PL; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040815" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040816" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2;) Gecko/20020604 OLYMPIAKOS SFP" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040726" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040808" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040808 Debian/1.7.2-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040809" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040809 Debian/1.7.2-0woody1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810 Debian" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810 Debian/1.7.2-2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040815" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040816" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040819" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040819 Debian/1.7.2-3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.4-3 StumbleUpon/1.79" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Debian/1.7.2-4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040825" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040906" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.2) Gecko/20040818" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; nl-NL; rv:1.7.2) Gecko/20040804" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.2) Gecko/20040829" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.2) Gecko/20040906" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.2) Gecko/20040823" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; de-AT; rv:1.7.2) Gecko/20040906" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.2) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.2) Gecko/20040813" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.2) Gecko/20040809" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.2) Gecko/20040810" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.2) Gecko/20040826" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.3) Gecko/20040910,gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 IE/0.10" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 WebWasher 3.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; hu; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.3) Gecko/20040910" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 WaterDog/0.10.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041111" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041207" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.3) Gecko/20040922" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.3) Gecko/20040914" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.3) Gecko/20040919" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.3) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040914" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040916" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040918" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040919" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 Debian/1.7.3-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040925" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040926" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041006" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041006 Debian/1.7.3-4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041013" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041026" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041027" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041101" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041108" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.3) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20040913" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5 StumbleUpon/1.999" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; it-IT; rv:1.7.3) Gecko/20041007 Debian/1.7.3-5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.3) Gecko/20040921" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.3) Gecko/20041022" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Slackware GNU/Linux i686; pl-PL; rv:1.7.3) Gecko/20040913 --==MOZILLA RULLEZ ;)==--" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.3) Gecko/20040919" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.7.4) Gecko/20040926" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JP; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U; rv:1.7.5) Gecko/20041107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Refrozen.com/2.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; it-IT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 MSIE/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.7.5) Gecko/20041210 MSIE/5.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; da-DK; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 google/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 IE/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 MSIE/1.0 (ax)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 TheBlacksheepbrowser/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 Mnenhy/0.6.0.104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; de-AT; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; ; Win98; en; rv:1.7.5) Gecko/20041107" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041220" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.5) Gecko/20041213" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Windows" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041221" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041228 Fedora/1.7.5-2.home" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.7.5) Gecko/20041108 MSIE/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7rc1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a4) Gecko/20040927" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040511" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8a4) Gecko/20040930 Mnenhy/0.6.0.104" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a) Gecko/20040425 `The Suite'" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040521" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040714" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a3) Gecko/20040817" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040420" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.8a2+) Gecko/20040524" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.8a2) Gecko/20040714" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8a2) Gecko/20040714" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.8a4) Gecko/20040927" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040607" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040704" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040713" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040714" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040812" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040817" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040923" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041201" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041217" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040417" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040419" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040420" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040423" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040427" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040502" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040511" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8a2) Gecko/20040715" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; IRIX64 IP30; en-US; rv:1.8)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a1) Gecko/20040520" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040627" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040714" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040808" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a4) Gecko/20040927" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041117" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041122" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041123" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040424" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040502" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8a3) Gecko/20040822" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8a4) Gecko/20040929" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X; MSIE Incompatible; SyNiX; es-AR; rv:1.8a2/s) Gecko/20040814" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/2.02" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 (compatible; MSIE 6.0; X11; U; Linux i686; en-US; rv:2.5 P)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/3.0 (Compatible;Viking/1.8)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01Gold (Macintosh; I; 68K)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01Gold (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-GB; rv:1.0.2) Gecko/20020924 AOL/7.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20020924 AOL/7.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20030306 Camino/0.7" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5b) Gecko/20030917 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6a) Gecko/20031021 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6b) Gecko/20031205 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7a) Gecko/20040105 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7a) Gecko/20040110 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040403 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040404 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040405 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040416 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040425 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040428 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040511 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040518 Camino/0.7+" - family: "Camino" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040623 Camino/0.8" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040602 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040607 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040610 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a3) Gecko/20040804 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a3) Gecko/20040811 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041130 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041222 Camino/0.8+" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040825 Camino/0.8.1" - family: "Camino" - major: '0' - minor: '8' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040827 Camino/0.8.1" - family: "Camino" - major: '0' - minor: '8' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041201 Camino/0.8.2" - family: "Camino" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040517 Camino/0.8b" - family: "Camino" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.0.1) Gecko/20021220 Chimera/0.6+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 Epiphany/1.0" - family: "Epiphany" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030821 Epiphany/1.0" - family: "Epiphany" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030630 Epiphany/1.0.1" - family: "Epiphany" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 Epiphany/1.0.4" - family: "Epiphany" - major: '1' - minor: '0' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031208 Epiphany/1.0.6" - family: "Epiphany" - major: '1' - minor: '0' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 Epiphany/1.0.6" - family: "Epiphany" - major: '1' - minor: '0' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031229 Epiphany/1.0.6" - family: "Epiphany" - major: '1' - minor: '0' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040223 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040115 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.6) Gecko/20040114 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.6) Gecko/20040115 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040118 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040317 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040324 Epiphany/1.0.7" - family: "Epiphany" - major: '1' - minor: '0' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040124 Epiphany/1.0.8" - family: "Epiphany" - major: '1' - minor: '0' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Epiphany/1.1.12" - family: "Epiphany" - major: '1' - minor: '1' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040415 Epiphany/1.1.12" - family: "Epiphany" - major: '1' - minor: '1' - patch: '12' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040415 Epiphany/1.2.2" - family: "Epiphany" - major: '1' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040206 Epiphany/1.2.2" - family: "Epiphany" - major: '1' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040322 Epiphany/1.2.2" - family: "Epiphany" - major: '1' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 Epiphany/1.2.3" - family: "Epiphany" - major: '1' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040404 Epiphany/1.2.3" - family: "Epiphany" - major: '1' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Epiphany/1.2.4" - family: "Epiphany" - major: '1' - minor: '2' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Epiphany/1.2.5" - family: "Epiphany" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040528 Epiphany/1.2.5" - family: "Epiphany" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040906 Epiphany/1.2.5" - family: "Epiphany" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040413 Epiphany/1.2.5" - family: "Epiphany" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.6) Gecko/20040414 Epiphany/1.2.5" - family: "Epiphany" - major: '1' - minor: '2' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040628 Epiphany/1.2.6" - family: "Epiphany" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Epiphany/1.2.6" - family: "Epiphany" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040624 Epiphany/1.2.6" - family: "Epiphany" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040625 Epiphany/1.2.6" - family: "Epiphany" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Epiphany/1.2.6" - family: "Epiphany" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040404 Epiphany/1.2.6.90" - family: "Epiphany" - major: '1' - minor: '2' - patch: '6' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 Epiphany/1.2.7" - family: "Epiphany" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040810 Epiphany/1.2.7" - family: "Epiphany" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040818 Epiphany/1.2.7" - family: "Epiphany" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040819 Epiphany/1.2.7" - family: "Epiphany" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 Epiphany/1.2.7" - family: "Epiphany" - major: '1' - minor: '2' - patch: '7' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20040821 Epiphany/1.2.8" - family: "Epiphany" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.2) Gecko/20041016 Epiphany/1.2.8" - family: "Epiphany" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 Epiphany/1.2.8" - family: "Epiphany" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040807 Epiphany/1.2.8" - family: "Epiphany" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040820 Epiphany/1.2.8" - family: "Epiphany" - major: '1' - minor: '2' - patch: '8' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Epiphany/1.3.0" - family: "Epiphany" - major: '1' - minor: '3' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041112 Epiphany/1.4.4" - family: "Epiphany" - major: '1' - minor: '4' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041020 Epiphany/1.4.4" - family: "Epiphany" - major: '1' - minor: '4' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041113 Epiphany/1.4.4" - family: "Epiphany" - major: '1' - minor: '4' - patch: '4' - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.3) Gecko/20041126 Epiphany/1.4.5" - family: "Epiphany" - major: '1' - minor: '4' - patch: '5' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041116 Epiphany/1.4.6" - family: "Epiphany" - major: '1' - minor: '4' - patch: '6' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030504 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030610 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4b) Gecko/20030623 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; IRIX64 IP30; en-US; rv:1.4b) Gecko/20030618 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030722 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Solaris Sparc; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4b) Gecko/20030517 Mozilla Firebird/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Idefix hic erat!; Fenestra 50a.Chr.n.; la; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5a) Gecko/20030801 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030801 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030811 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030905 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030912 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5a) Gecko/20030918 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030821 Mozilla Firebird/0.6.1+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5b) Gecko/20030910 Firebird/0.6.1+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.5a) Gecko/20030908 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5a) Gecko/20030729 Mozilla Firebird/0.6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.5) Gecko/20031026 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031002 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20031105 Firebird/0.7+ (aebrahim)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031208 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6b) Gecko/20031216 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040114 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040429 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; PL; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; fr; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031023 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031208 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20040415 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031015 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031110 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031120 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031215 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031225 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20040114 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20040120 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20040130 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20040201 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20030924 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6a) Gecko/20031012 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040116 Firebird/0.7+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.5) Gecko/20031007 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5) Gecko/20031020 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5) Gecko/20031202 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.5) Gecko/20040114 Firebird/0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7a) Gecko/20040113 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7a) Gecko/20040210 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040120 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040129 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040410 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20040409 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040118 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040210 Firebird/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Firefox)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win64 (AMD64); en-US; Firefox" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040815 Lightningraccoon/0.9.1+ (All your Firefox 0.9.1+ are belong to Firesomething!)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040413 Waterdog/0.8.0+ (Firefox/#version# polymorph)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox_123/0.9.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.6) Gecko/20040210 Firesalamandre/0.8 (User Agent modifie grace a Firesomething. Telechargez Firefox en francais sur http://frenchmozilla.org/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux; en-US) Gecko/20040101 Firefox" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Firefox (Gecko)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla Dark Firefox" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla (Windows;+U;+Windows; en-GB) Gecko Firefox" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20040913 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.3) Gecko/20040925 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040908 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10.1 WebWasher 3.3" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10 StumbleUpon/1.999" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040928 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10 StumbleUpon/1.996" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040911 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10 Mnenhy/0.6.0.104" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040928 Firefox/0.10 (MOOX M2)" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; rv:1.7.3) Gecko/20040913 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; rv:1.7.3) Gecko/20040913 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; rv:1.7.3) Gecko/20040914 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041011 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1 StumbleUpon/1.999" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040911 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040913 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040914 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040919 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040923 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040924 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040928 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040929 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 Mnenhy/0.6.0.104" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041003 Firefox/0.10" - family: "Firefox" - major: '0' - minor: '10' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20040911 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (MacOS; U; Panther; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041103 Mozilla Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041109 Firefox/0.10.1 (MOOX M3)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7) Gecko/20040803 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040913 Firefox/0.10.1 (Firefox/0.10.1 rebrand: Mozilla Firesomething)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20040930 Firefox/0.10.1 (MOOX M3)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041006 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 (MOOX M3)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/0.10.1 (MOOX M2)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041031 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040910 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040911 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 (ax)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 StumbleUpon/1.999" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Thunderchicken/0.10.1 (All your Firefox/0.10.1 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.3) Gecko/20041027 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; Slackware; Linux i686; Slackware; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; IRIX64 6.5; rv:1.7.3) Gecko/20041020 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040911 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040913 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040914 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040916 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040921 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040928 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/0.10.1 (Linux/GTK)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041001 Firefox/Slackware-0.10.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041003 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041005 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041007 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041008 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041011 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041012 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041013 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041014 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041015 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041019 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041020 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041021 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041023 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041025 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041026 Firefox/0.10.1 (Debian package 0.10.1+1.0PR-4)" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041028 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041031 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041103 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041106 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041110 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041119 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041123 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20041202 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; rv:1.7.3) Gecko/20041022 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; rv:1.7.3) Gecko/20041020 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; rv:1.7.3) Gecko/20050220 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; rv:1.7.3) Gecko/20040916 Firefox/0.10.1" - family: "Firefox" - major: '0' - minor: '10' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Linux) Firefox/0.3" - family: "Firefox" - major: '0' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20041122 Firefox/0.5.6+" - family: "Firefox" - major: '0' - minor: '5' - patch: '6' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20041122 Firefox/0.5.6+" - family: "Firefox" - major: '0' - minor: '5' - patch: '6' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.6 StumbleUpon/1.73" - family: "Firefox" - major: '0' - minor: '6' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040407 Firefox/0.6 StumbleUpon/1.66" - family: "Firefox" - major: '0' - minor: '6' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.6.1 StumbleUpon/1.89" - family: "Firefox" - major: '0' - minor: '6' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.6.1 StumbleUpon/1.87" - family: "Firefox" - major: '0' - minor: '6' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.6 StumbleUpon/1.902" - family: "Firefox" - major: '0' - minor: '6' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041116 Firefox/0.6.1 StumbleUpon/1.87" - family: "Firefox" - major: '0' - minor: '6' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050110 Firefox/0.6.1 StumbleUpon/1.8 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '0' - minor: '6' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20050101 Firefox/0.6.4" - family: "Firefox" - major: '0' - minor: '6' - patch: '4' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.7 StumbleUpon/1.901" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.7 StumbleUpon/1.902" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.7 StumbleUpon/1.904" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040310 Firefox/0.7 StumbleUpon/1.895" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.7 StumbleUpon/1.9" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040313 Firefox/0.7" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.7 StumbleUpon/1.9" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040809 Firefox/0.7 StumbleUpon/1.89" - family: "Firefox" - major: '0' - minor: '7' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8 Mozilla/5.0 (compatible; Konqueror/3.2; Linux) (KHTML, like Gecko)" - family: "Konqueror" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.7b) Gecko/20040410 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (BeOS; U; BeOS BePC; en-US; rv:1.7b) Gecko/20040412 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Linux) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Firefox/0.8; Win32) Gecko/20040206" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Linux; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.903" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040308 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040311 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040314 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7b) Gecko/20040325 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040509 Firefox/0.8.0+ (MMx2000)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040519 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040531 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+ StumbleUpon/1.99" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a2) Gecko/20040616 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040417 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040501 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040503 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040510 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040513 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a) Gecko/20040517 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; rv:1.8a2) Gecko/20040522 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Njindonjs HR; en-US; rv:1.6) Gecko/20040206 Firefox/0.8)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.908" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040304 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7b) Gecko/20040318 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040608 Moonbadger/0.8.0+ (All your Firefox/0.8.0+ are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040803 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a2) Gecko/20040525 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a) Gecko/20040504 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; it-IT; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pt-BR; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; ru-RU; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; fr; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040206 Firefox/0.8 (Firefox/0.8)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7) Gecko/20040803 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 (All your Firefox/0.8 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 (ax)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.904" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.905" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.908" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.909" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Moonbird/0.8 (Firefox/0.8 polymorph)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Superwolf/0.8 (All your Firefox/0.8 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040210 Firefox/0.8 (www.proxomitron.de)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.8 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7a) Gecko/20040218 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040226 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040304 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040320 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040404 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040414 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040417 Firefox/0.8.0+ (MozJF)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040524 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040605 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040608 Firefox 0.8+/0.8.0+" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040613 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.8 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.8 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a1) Gecko/20040520 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040521 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040523 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040525 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040604 Firefox/0.8.0+ (stipe) (Proxomitron Naoko 4.51)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040608 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040421 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040422 Firefox/0.8.0+ (TierMann VC++Tools)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040427 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040504 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040507 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040510 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040511 Firefox/0.8.0+ (ax)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040512 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a) Gecko/20040518 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7b) Gecko/20040412 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7b) Gecko/20040302 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.6) Gecko/20040206 Firefox/0.8 (Proud Firefox user - IE suckz)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7) Gecko/20040803 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-CA; rv:1.8a) Gecko/20040508 Firefox/0.8 Royal Oak (Mozilla)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-NZ; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firecow/0.8 (Firefox/0.8 Get over it!)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 (ax)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 - <>" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 (John Bokma, http://johnbokma.com/)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 MSIE 5" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.903" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.906" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.907 (All your Firefox/0.8 StumbleUpon/1.907 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.908" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.909" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Lightningdog/0.8 (All your Firefox/0.8 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Waterworm/0.8 (All your Firefox/0.8 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040210 Firefox/0.8 (Lohvarn)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040210 Firefox/0.8 (stipe)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.8 StumbleUpon/1.908" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7a) Gecko/20040221 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040302 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040310 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040313 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040315 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040318 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040321 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040321 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040321 Firefox/0.8.0+ (mmoy)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040322 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040323 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040324 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040326 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040327 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040329 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040330 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040331 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040331 Firefox/0.8.0+ (scragz)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040403 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040404 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040406 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040406 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040407 Firefox/0.8.0+ (djeter)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040408 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040408 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040409 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040410 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040411 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040412 Firefox/0.8.0+ (mmoy-O2-GL7-SSE2-crc32-quek01235)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040512 Firefox/0.8.0+ (MOOX)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040520 Firefox/0.8.0+ (MOOX-AV)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040521 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040521 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040523 Firefox/0.8.0+ (MOOX-AV)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040529 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040530 Firefox/0.8.0+ (Lohvarn)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040601 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040601 Firefox/0.8.0+ (MOOX-TK)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040607 Firefox/0.8.0+ (MOOX-AV)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040610 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.8 StumbleUpon/1.909" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Waternarwhal/0.8 (Firefox/0.8)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.8 StumbleUpon/1.909" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040629 Firefox/0.8 (MOOX-AV)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.8 Gumby" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.8 StumbleUpon/1.909" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.8 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.8 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a1) Gecko/20040520 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040521 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040522 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040522 Firefox/0.8.0+ (MOOX-TK)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040523 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040524 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040524 Firefox/0.8.0+ (BlueFyre)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040525 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040526 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040527 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040601 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040602 Firefox/0.8.0+ (bangbang023)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040605 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040710 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040807 Firefox/0.8 StumbleUpon/1.99" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040415 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040417 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040425 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040426 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040428 Firefox/0.8.0+ (dbright)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040430 Firefox/0.8.0+ (mmoy-O2-GL7-SSE2-crc32)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040502 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040502 Firefox/0.8.0+ (scragz)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040503 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040503 Firefox/0.8.0+ (mmoy-Pentium4a)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040504 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040505 Firefox/0.8.0+ (MOOX)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040507 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040512 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040516 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040517 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040518 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040518 Firefox/0.8.0+ (mmoy-2004-05-05-Pentium4b)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.6) Gecko/20040206 Firefox 0.8/0.8 (MSIE 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.6) Gecko/20040206 Firefox/0.8 StumbleUpon/1.906" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.6) Gecko/20040209 Firefox/0.8 (Oxs G7 SSE optimized)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.8 StumbleUpon/1.99" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; tr-TR; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; de-DE; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040803 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040803 Firefox/0.8 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8a2) Gecko/20040601 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; cs-CZ; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040606 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; en-US; rv:1.6) Gecko/20040227 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040213 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040218 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040303 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040317 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040405 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040422 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040425 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040429 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040503 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040504 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040610 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040627 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040805 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040812 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; ja-JP; rv:1.6) Gecko/20040429 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040212 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040227 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040428 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.6) Gecko/20040612 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8a) Gecko/20040418 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040429 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040506 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-UK; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8 StumbleUpon/1.904" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8 StumbleUpon/1.99" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040207 Firefox/0.8 TGB579860FilterStats" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040208 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040209 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040211 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040212 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040216 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040220 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040221 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040222 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040223 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040224 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040226 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040227 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040228 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040229 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040301 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040301 Firefox/0.8 StumbleUpon/1.909" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040302 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040308 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040310 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040316 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040317 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040317 Firefox/0.8 - www.ubuntulinux.org" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040322 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040323 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040324 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040327 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040330 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040402 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040403 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040404 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040405 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040405 Firefox/0.8.0+ StumbleUpon/1.895" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040407 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040412 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040415 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040416 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040417 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040418 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040420 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040421 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040422 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040423 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040424 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040425 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040426 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040427 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040428 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040429 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040501 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040502 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040503 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040504 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040506 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040508 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040509 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040513 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040514 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040515 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040517 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040518 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040519 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040522 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040523 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040527 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040530 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040531 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040602 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040611 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040612 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040621 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040630 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040701 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040707 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040713 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040715 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040726 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.8 StumbleUpon/1.904" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.8 StumbleUpon/1.906" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/0.8 (Debian package 1.0-4)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050110 Firefox/0.8 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7a) Gecko/20040218 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/02004032 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040313 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040326 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040328 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040403 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040411 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040630 Firefox/0.8 StumbleUpon/1.904" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040708 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040529 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040602 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040605 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040617 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040630 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040428 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040429 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040430 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040502 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040503 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040505 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040516 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040518 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040225 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040327 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040506 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040602 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.6) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040219 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040327 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040421 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040506 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040602 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.6) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; MS-is-evil; en-US; rv:1.6) Gecko/20040405 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.6) Gecko/20040219 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sl-SI; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sl-SI; rv:1.6) Gecko/20040212 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.6) Gecko/20040602 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-CN; rv:1.6) Gecko/20040207 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.6) Gecko/20040327 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.6) Gecko/20040603 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.6) Gecko/20040615 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.6) Gecko/20040527 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.6) Gecko/20040408 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.6) Gecko/20040609 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040324 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040825 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20040902 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20041228 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20050204 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.6) Gecko/20050228 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD macppc; en-US; rv:1.6) Gecko/20040822 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040210 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040211 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040214 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040403 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040629 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/6.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040614 Firefox/0.8" - family: "Firefox" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040222 Firefox/0.8.0+ (mmoy)" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a2) Gecko/20040604 Firefox/0.8.0+" - family: "Firefox" - major: '0' - minor: '8' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040628 Firefox/0.9.1 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 StumbleUpon/1.999" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040815 Firefox/0.9.3 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pl-PL; rv:1.7) Gecko/20040614 Firefox/0.9 Mnenhy/0.6.0.104" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041107 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040614 Lightningdog/0.9 (Firefox/0.9 polymorph)" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040617 Firefox/0.9.0+" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a2) Gecko/20040711 Firefox/0.9.0+" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9.3 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9.3 StumbleUpon/1.998" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Firefox/0.9 Mnenhy/0.6.0.104" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 Firefox/0.9.0" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9 WebWasher 3.3" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 INTERNET COMMANDER/0.9 (All your Firefox/0.9 are DEREK SMART'S BECAUSE HE HAS A PHD AND YOU DON'T)" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040623 Firefox/0.9.0+" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040625 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040703 Firefox/0.9.0+" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.0" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 StumbleUpon/1.999" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040808 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.9.3 StumbleUpon/1.995" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.9 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040629 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Firefox/0.9 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040615 Seaant/0.9 (All your Firefox/0.9 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040617 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040619 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040620 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040624 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1 Mnenhy/0.6.0.104" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040701 Firefox/0.9.0+ (daihard: P4/SSE2)" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040704 Firefox/0.9.0+" - family: "Firefox" - major: '0' - minor: '9' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 StumbleUpon/1.999" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7) Gecko/20040616 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040615 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040616 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040614 Firefox/0.9" - family: "Firefox" - major: '0' - minor: '9' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20040831 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040628 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a3) Gecko/20040810 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a5) Gecko/20041121 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7) Gecko/20040629 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.2) Gecko/20040819 Firefox/0.9.1+ (ax)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040713 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.8a6) Gecko/20041127 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040811 Firefox/0.9.1+ (pigfoot)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9.1 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040804 Firefox/0.9.1+ (bangbang023)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040808 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a3) Gecko/20040815 Firefox/0.9.1+ (MOOX-TK)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a5) Gecko/20041110 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-AR; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040810 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040811 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040812 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040814 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040814 Firefox/0.9.1+ (MOOX M3)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20040629 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9.1 StumbleUpon/1.993" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9.1 StumbleUpon/1.994" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040626 Spacepanda/0.9.1 (Firefox/0.9.1 serious edition)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040729 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040802 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040802 Firefox/0.9.1+ (moox)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040805 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040726 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040811 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040820 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040827 Firefox/0.9.1+ (MOOX M3)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040901 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a3) Gecko/20040904 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a5) Gecko/20041114 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040629 Firefox/0.9.1 (MOOX-AV)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; it-IT; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040706 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040725 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040729 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040804 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040806 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040629 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; pt-BR; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040819 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040825 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040629 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040630 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040701 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040702 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040704 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040705 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040706 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040708 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040710 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040711 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040714 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040715 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040719 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040721 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040729 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040730 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040730 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040801 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040802 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.1+ (lokean SVG-enabled)" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040804 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040730 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040805 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040824 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040902 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a5) Gecko/20041027 Firefox/0.9.1+" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7) Gecko/20040712 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7) Gecko/20040719 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040629 Firefox/0.9.1" - family: "Firefox" - major: '0' - minor: '9' - patch: '1' - - user_agent_string: "Firefox 0.9.2 (The intelligent alternative)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.7) Gecko/20040711 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pt-BR; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 (ax)" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2 (ax)" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040707 Waterbug/0.9.2 (All your Firefox/0.9.2 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040709 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux; en-US; rv:1.7) Gecko/20040707 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040708 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040712 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040716 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040801 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040802 Firefox/0.9.2" - family: "Firefox" - major: '0' - minor: '9' - patch: '2' - - user_agent_string: "Firefox 0.9.3 (compatible;MSIE 6.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Firefox/0.9.3 (compatible;MSIE 6.1; Windows 98)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Firefox 0.9.3 (compatible MSIE is gay;Linux)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Firefox/0.9.3 [en] (All your base are belong to us)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (i686; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-DE; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; it-IT; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7) Gecko/20040803 Firefox/0.9.3 (#)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 WebWasher 3.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040803 Firejackalope/0.9.3 (All your Firefox/0.9.3 are belong to Firesomething)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040805 Firefox/0.9.3 (djeter)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; tr-TR; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-DE; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; fr; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7) Gecko/20041015 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040806 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040807 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040811 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040813 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040830 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040910 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040927 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20041016 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7) Gecko/20040808 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ca-CA; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7) Gecko/20040809 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040803 Firefox/0.9.3 Mnenhy/0.6.0.104" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040804 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040805 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040806 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040807 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040808 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040809 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040810 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040813 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040814 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040818 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040819 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040823 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040824 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040825 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040827 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040830 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040831 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040901 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040904 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040914 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040917 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040920 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040926 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040928 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu) StumbleUpon/1.999" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7) Gecko/20040803 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; uk-UA; rv:1.7) Gecko/20040809 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; de-DE; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7) Gecko/20040813 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; fr; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7) Gecko/20040902 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7) Gecko/20040817 Firefox/0.9.3" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; WinNT; es-AR; rv:1.7) Gecko/20041013 Firefox/0.9.3 (Ubuntu)" - family: "Firefox" - major: '0' - minor: '9' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050302 Firefox/0.9.6" - family: "Firefox" - major: '0' - minor: '9' - patch: '6' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040626 Firefox/0.9.6" - family: "Firefox" - major: '0' - minor: '9' - patch: '6' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050302 Firefox/0.9.6" - family: "Firefox" - major: '0' - minor: '9' - patch: '6' - - user_agent_string: "Best website about travels.(New Zealand, Thailand, Bolivia)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "appName/appVersion (Windows; U; Windows NT 5.0; zh-CN; rv:1.7.5) Gecko/20041107 Firefox/1.0 (vendorComment)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "(Firefox/1.0; Mac OS X Panther)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Firefox/1.0 Mozilla/5.0 Netscape/7.1elezeta (Debian GNU/Linux)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.001 (Windows NT 5.0) [en] Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Amiga OS; U; Amiga OS 5.3; en-US; rv:5.3) Gecko/20040707 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (ca-AD; Celtric) Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; ; Apple ][) Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Gameboy Color; U; Gameboy OS 2005; de-DE) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Linux; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Linux i686; nb-NO; rv:1.7.5) Gecko/20041108 Firefox/1.0 Frodo" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Linux; U; Windows NT 5.1; es-ES; rv:1.7.3) Gecko/20041027 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2 (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.0 (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041130 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20050208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20050208 Firefox/1.0 StumbleUpon/1.9991" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7) Gecko/20040628 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041207 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041211 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041222 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20041225 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8a6) Gecko/20050109 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050220 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050224 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b2) Gecko/20050225 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050128 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050128 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050202 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050205 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050209 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050212 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050216 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050217 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050218 Firefox/1.0+ (PowerBook)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fi-FI; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JPM; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JPM; rv:1.7.5) Gecko/20041108 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; zh-TW; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (; U;;; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; de-DE;SKC) Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 Windows Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; de-AT; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; ja-JP; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; cs-CZ; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; da-DK; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; el-GR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:1.7.5) Gecko/20041113 Firefox/1.0 (MOOX M1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (*mh*)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 SR" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a6) Gecko/20050108 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a6) Gecko/20050110 Firefox/1.0+ (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050302 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050115 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b) Gecko/20050218 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; es-ES; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; hu-HU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; hu-HU; rv:1.7.5) Gecko/20041110 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; it-IT; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pl-PL; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; pt-BR; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; tr-TR; rv:1.7.5) Gecko/20041208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; zh-CN; rv:1.7.5) Gecko/20041124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; zh-TW; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows 98; nl-NL; rv:1.7.5) Gecko/20041112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ca-AD; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; cs-CZ; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; da-DK; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; da-DK; rv:1.7.5) Gecko/20041118 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.3) Gecko/20041027 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/~20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0 WebWasher 3.3" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 -awstats-exclude" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Mnenhy/0.6.0.104" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 PR" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.998" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.9991" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041108 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041108 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041115 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041123 Firefox/1.0 (Community Edition FireFox P4W-X2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20050114 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5; Google-TR-1) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040812 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20041209 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050101 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6) Gecko/20050107 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8a6; Google-TR-1) Gecko/20050101 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b2) Gecko/20050301 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050117 Firefox/1.0+ (BlueFyre)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050118 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050122 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050131 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050201 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050202 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050204 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050206 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050206 Firefox/1.0+ (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050209 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050210 Firefox/1.0+ (BlueFyre)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8b) Gecko/20050215 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.7.5) Gecko/20041210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fi-FI; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fi-FI; rv:1.7.5) Gecko/20041108 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; hu-HU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7.3) Gecko/20041027 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ko-KR; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; nl-NL; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ru-RU; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; sl-SI; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.7.3) Gecko/20041101 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.7.5) Gecko/20041124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.7.5) Gecko/20041124 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-TW; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; bg-BG; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ca-AD; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; da-DK; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-bn; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.3) Gecko/20041027 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0 Mnenhy/0.6.0.104" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0 WebWasher/1.2.2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0 (CK-UKL)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0 StumbleUpon/1.999,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; el-GR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-AU; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-CA; rv:1.8b2) Gecko/20050226 Firefox/1.0+ (nightly)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-CA; rv:1.8b) Gecko/20050216 Firefox/1.0+ (trunk)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-EN; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-gb; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 StumbleUpon/1.9992" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041113 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041128 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041129 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-NZ; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-UK; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040903 Firefox/1.0 PR (NOT FINAL) (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041106 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Ad/www.yetanotherblog.de" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (All your Firefox/1.0 are belong to us)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (Arjan says HI!)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (Goobergunchian Edition)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Mnenhy/0.6.0.104" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 Mnenhy/0.7.1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (Not Netscape 7.1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 sexyfox/0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.9991" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.9992" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 WebWasher 3.3" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 www.city.poznan.pl/1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Superjellyfish/1.0 (All your Firefox/1.0 are belong to Firesomething)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041108 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041108 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M3) Mnenhy/0.6.0.104" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 StumbleUpon/1.999 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 StumbleUpon/1.999 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041112 Firefox/1.0 (stipe)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041114 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041115 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050129 Firefox/1.0 (pigfoot)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050206 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050207 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050209 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050211 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050214 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5; Google-TR-1) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5; Google-TR-1) Gecko/20041107 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5;ME) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0 StumbleUpon/1.9992" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20040103 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041204 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041206 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041209 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041211 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041214 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041215 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041218 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041220 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041221 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041229 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20041230 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050101 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050104 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050108 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050109 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050111 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a6) Gecko/20050131 Firefox/1.0+ (Firefox CE Trunk 2004-12-23 P4W-X15)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050222 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050301 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b2) Gecko/20050305 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050113 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050115 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050116 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050117 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050118 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050123 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050124 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050125 Firefox/1.0+ WebWasher 3.3" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050126 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050128 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050131 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050201 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050204 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050205 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050206 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050207 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050210 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050211 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050213 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050215 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050216 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050217 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050218 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0; ortzzuwt" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.5) Gecko/20041107 xFirefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.5) Gecko/20041108 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.5) Gecko/20041208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.5) Gecko/20041210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.5) Gecko/20041210 Firefox/1.0 Internet Watcher 2000/ V1.4" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fi-FI; rv:1.7.5) Gecko/20041108 Firefox/1.0 StumbleUpon/1.9991" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.3) Gecko/20041027 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.5; Google-TR-1) Gecko/20041109 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; hu-HU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.3) Gecko/20041027 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.5) Gecko/20041108 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.5) Gecko/20041108 Firefox/1.0 StumbleUpon/1.996" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.5) Gecko/20041110 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-VE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7.5) Gecko/20041108 Firefox/1.0,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7.5) Gecko/20041111 Firefox/1.0 (JTw)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.8a6) Gecko/20050107 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ko-KR; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nb-NO; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041116 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.7.5) Gecko/20041110 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.8a6) Gecko/20050109 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.8b2) Gecko/20050220 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.8b) Gecko/20050206 Firefox/1.0+ (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-PT; rv:1.8b) Gecko/20050218 Firefox/1.0+ (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ro-RO; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.7.3) Gecko/20041027 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sk-SK; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sl-SI; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sl-SI; rv:1.7.5) Gecko/20041113 Firefox/1.0 (largie's)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20040321 Firefox/1.0 DEBUG" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; tr-TR; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; tr-TR; rv:1.7.5) Gecko/20041208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.7.5) Gecko/20041124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-CN; rv:1.7.5) Gecko/20041124 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; zh-TW; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041108 Firefox/1.0 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20050208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8a6) Gecko/20050110 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8b2) Gecko/20050228 Firefox/1.0+ (MOOX M1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8b) Gecko/20050114 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; es-es; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; es-ES; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; it-IT; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; ru-RU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; zh-TW; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 6.0; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; es-ES; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; ; Windows NT 5.1; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Slackware - current; Linux i686; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Slackware; Linux i586; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Darwin Power Macintosh; en-US; rv:1.7.5) Gecko/20041208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.3) Gecko/20041104 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.7.5) Gecko/20050104 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-UK; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041029 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041113 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041114 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041115 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041120 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041123 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041125 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041127 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041130 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041203 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041207 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041209 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041215 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041218 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041222 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041224 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041227 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041228 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20041229 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050102 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050104 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050105 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050106 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050115 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050117 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050120 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050123 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050125 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050127 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050204 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050205 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050207 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050212 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050215 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050225 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050226 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; ja-JP; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i686; es; rv:1.7.5) Gecko/20041128 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux) Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20050103 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; chrome://navigator/locale/navigator.properties; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20041119 Firefox/1.0 (Debian package 1.0-3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.5) Gecko/20050206 Firefox/1.0 (Debian package 1.0+dfsg.1-5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-CH; rv:1.7.5) Gecko/20040107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041207 Firefox/1.0 (Debian package 1.0-5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20041211 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20050202 Firefox/1.0 (Debian package 1.0+dfsg.1-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.7.5) Gecko/20041209 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu4-warty99)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.8) Gecko/20050101 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040907 Firefox/1.0 PR (NOT FINAL)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041026 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041029 Firefox/1.0RC1 (Debian package 0.99+1.0RC1-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041030 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041030 Firefox/1.0RC1 (Debian package 0.99+1.0RC1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041102 Firefox/1.0RC1 (Debian package 0.99+1.0RC1-3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041105 Firefox/1.0RC1 (Debian package 0.99+1.0RC1-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041112 Firefox/1.0RC1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041009 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041106 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 SPELLSHIDO!" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041113 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041114 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041115 Firefox/1.0 StumbleUpon/1.998" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041116 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041116 Firefox/1.0 (Ubuntu) StumbleUpon/1.999 (Ubuntu package 1.0-2ubuntu3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041116 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041117 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041117 Firefox/1.0 (Debian package 1.0-2.0.0.45.linspire0.4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041119 Firefox/1.0 (Debian package 1.0-3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041120 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041120 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041121 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041123 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041125 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041126 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041127 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 0.99+1.0RC1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041129 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041129 Firefox/1.0 (Debian package 1.0-3.backports.org.1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041130 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041201 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041203 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041204 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041204 Firefox/1.0 (Debian package 1.0.x.2-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041205 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041206 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041207 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041207 Firefox/1.0 (Debian package 1.0-5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041207 Firefox/1.0 StumbleUpon/1.999 (Debian package 1.0-5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041208 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041209 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041209 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu4-warty99)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041211 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041212 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041213 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041214 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041214 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041215 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041215 Firefox/1.0 Red Hat/1.0-12.EL4" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041216 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041218 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219 Firebunny/1.0 (Firefox/1.0)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219 Firefox/1.0 (Debian package 1.0+dfsg.1-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041219 Firefox/1.0 (Debian package 1.0+dfsg.1-1) Mnenhy/0.7.1" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041220 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041222 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041223 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041223 Firefox/1.0 Yoper/FIREFOX_RPM_AM" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041224 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041225 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041226 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041227 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041228 Firefox/1.0 Fedora/1.0-7" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041228 Firefox/1.0 Fedora/1.0-8" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041230 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041231 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050103 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050104 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050105 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050106 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050109 Firefox/1.0 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050113 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050115 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050116 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050120 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050120 Firefox/1.0 (Debian package 1.0+dfsg.1-3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050121 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050121 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050123 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050123 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050125 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050126 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050127 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Debian package 1.0.x.2-13)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050129 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050130 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050131 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050201 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050202 Firefox/1.0 (Debian package 1.0+dfsg.1-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050203 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050203 Firefox/1.0 (Debian)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050203 Firefox/1.0 (Debian package 1.0.x.2-15)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050205 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050206 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050206 Firefox/1.0 (Debian package 1.0+dfsg.1-5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050207 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050209 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050210 Firefox/1.0 StumbleUpon/1.999 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050215 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050218 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050221 Firefox/1.0 (Ubuntu)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050221 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050222 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050223 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050225 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20050228 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20041013 Firefox/1.0.0" - family: "Firefox" - major: '1' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a6) Gecko/20041204 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050117 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050201 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050207 Firefox/1.0+ (daihard: P4/SSE2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050212 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8b) Gecko/20050218 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-AR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20041210 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; es-MX; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fi-FI; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.5) Gecko/20041108 Firefox/1.0 Mnenhy/0.7" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20041115 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20041116 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0-2ubuntu3)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20041119 Firefox/1.0 (Debian package 1.0-3 Moostik.net)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050110 Firefox/1.0 StumbleUpon/1.998 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050202 Firefox/1.0 (Debian package 1.0+dfsg.1-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050206 Firefox/1.0 (Debian package 1.0+dfsg.1-5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; he-IL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; hr-HR; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.7.3) Gecko/20041101 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; hu-HU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.5) Gecko/20041128 Firefox/1.0 (Debian package 1.0-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; nl-NL; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; nl-NL; rv:1.7.5) Gecko/20050221 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.5) Gecko/20041108 Slackware Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.5) Gecko/20050110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pt-BR; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ru-RU; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.5) Gecko/20050110 Firefox/1.0 StumbleUpon/1.999 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; sv-SE; rv:1.7.5) Gecko/20050210 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; tr-TR; rv:1.7.5) Gecko/20041208 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; us; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; zh-TW; rv:1.7.5) Gecko/20041119 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i786; en-US; rv:1.8b2) Gecko/20050225 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i786; en-US; rv:1.8b) Gecko/20050212 Firefox/1.0+" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20041116 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20041125 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20041209 Firefox/1.0 (Debian package 1.0-5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20041220 Firefox/1.0 (Debian package 1.0+dfsg.1-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050110 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050123 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux ppc; es-US; rv:1.7.5) Gecko/20041220 Firefox/1.0 (1.0)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux; sl-SI; rv:1.7.5) Gecko/20041112 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; da-DK; rv:1.7.5) Gecko/20041118 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041112 Firefox/1.0 (Debian package 1.0-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041116 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041117 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041130 Firefox/1.0 (Debian package 1.0-4)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041204 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041214 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041218 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20041226 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050104 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050106 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050111 Firefox/1.0 (Debian package 1.0+dfsg.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050114 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050124 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-2ubuntu5)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050211 Firefox/1.0 (Debian package 1.0+dfsg.1-6)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.5) Gecko/20050221 Firefox/1.0 (Ubuntu) (Ubuntu package 1.0+dfsg.1-6ubuntu1)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; MSIE 6.0; Linux i686; en-US; rv:1.7.5; IDF-BCC;) Gecko/20041111 Firefox/1.0 (Debian package 1.0-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.5) Gecko/20041114 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.5) Gecko/20050103 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.5) Gecko/20050126 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.5) Gecko/20050128 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD amd64; en-US; rv:1.7.5) Gecko/20050122 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.7.5) Gecko/20041128 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; OpenBSD i386; en-US; rv:1.7.5) Gecko/20050101 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Slackware; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Slackware; Linux i686; pl-PL; rv:1.7.5) Gecko/20041108 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.5) Gecko/20041111 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.5) Gecko/20041213 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.7.5) Gecko/20050101 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041110 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041130 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20041207 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7.5) Gecko/20050213 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "WhoreNuts/2.0 (Windows; U; Win98; en-US; rv:1.7.5) ScabCount/123883 Firefox/1.0" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Gecko/20041108 Firefox/1.0; Mac_PowerPC)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Gecko/20050225 Firefox/1.0.1 Antares; U; Antares 5.5" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Gecko/20050228 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; de-DE; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 StumbleUpon/1.9991" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.6) Gecko/20050227 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; hu-HU; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.7.6) Gecko/20050223 Firefox/1.0.1,gzip(gfe) (via translate.google.com)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; nl-NL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050222 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 robert" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 StumbleUpon/1.9991" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 StumbleUpon/1.9992" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1 (MOOX M1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; it-IT; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; zh-CN; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ca-AD; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; el-GR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 StumbleUpon/1.9992" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1 (pigfoot)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1 (MOOX M2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1 (MOOX M3)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.6; Google-TR-1) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-AR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.7.6) Gecko/20050303 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; hu-HU; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; it-IT; rv:1.7.6) Gecko/20050226 Firefox/1.0.1 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.6) Gecko/20050301 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.6) Gecko/20050303 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.7.6) Gecko/20050301 Firefox/1.0.1 Fedora/1.0.1-1.3.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050224 Firefox/1.0.1 Fedora/1.0.1-1.3.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050225 Firefox/1.0.1 Red Hat/1.0.1-1.4.3" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050226 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050227 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050228 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050301 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050301 Firefox/1.0.1 (Debian package 1.0.1-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1 Fedora/1.0.1-1.3.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050303 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050305 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050306 Firefox/1.0.1 (Debian package 1.0.1-2)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.6) Gecko/20050301 Firefox/1.0.1 (Debian package 1.0.1-1)" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; it-IT; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.7.6) Gecko/20050224 Firefox/1.0.1 Fedora/1.0.1-1.3.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; pl-PL; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050223 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050302 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.7.6) Gecko/20050308 Firefox/1.0.1" - family: "Firefox" - major: '1' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.6) Gecko/20050225 Firefox/1.0.2" - family: "Firefox" - major: '1' - minor: '0' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.3) Gecko/20041101 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2 StumbleUpon/1.999" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041030 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041031 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20041101 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041102 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2 (ax)" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pl-PL; rv:1.7.5) Gecko/20041104 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041103 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041105 Firefox/1.0RC2" - family: "Firefox" - major: '1' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Linux Slackware; U;Linux Slackware 10.1; en-US; rv:1.8.0) Gecko/20050616 Firefox/1.1" - family: "Firefox" - major: '1' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0) Gecko/20050304 Firefox/1.1" - family: "Firefox" - major: '1' - minor: '1' - patch: - - user_agent_string: "Mozilla Firefox/5.0" - family: "Firefox" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/7.1" - family: "Firefox" - major: '7' - minor: '1' - patch: - - user_agent_string: "Firefox 7.1.3(compatible MSIE is gay;Linugz)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Linux Slackware x86_64 BlackBox; de_AT; Intel@Xeon) Firefox/Gecko" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.2b) Gecko/20021016 K-Meleon 0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.2b) Gecko/20021016 K-Meleon 0.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8" - family: "K-Meleon" - major: '0' - minor: '8' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.1" - family: "K-Meleon" - major: '0' - minor: '8' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031016 K-Meleon/0.8.2" - family: "K-Meleon" - major: '0' - minor: '8' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 MultiZilla/ StumbleUpon/1.995" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040613 MultiZilla/1.5.0.4h" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040803 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.7) Gecko/20040617 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (OS/2; U; Warp 4.5; en-US; rv:1.8a3) Gecko/20040819 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.3.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040803 MultiZilla/1.6.3.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040804 MultiZilla/1.6.4.0b (ax)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.6) Gecko/20040113 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3.1; MultiZilla v1.4.0.3J) Gecko/20031007 MultiZilla/1.6.0.0d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6a) Gecko/20031030 MultiZilla/1.6.0.0a" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040803 MultiZilla/1.6.0.0e" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040316 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040316 MultiZilla/1.6.3.1c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7b) Gecko/20040318 MultiZilla/1.6.1.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040514 MultiZilla/1.6.4.0a" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040616 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.6) Gecko/20040113 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7.2) Gecko/20040803 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-AT; rv:1.7) Gecko/20040616 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.0.0e" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.3.0d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.3.1c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.3.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 MultiZilla/1.6.3.2c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 MultiZilla/1.6.2.0c (ax)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 MultiZilla/1.6.4.0b (ax)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.3) Gecko/20040910 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041217 MultiZilla/1.6.0.0e" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040421 MultiZilla/1.6.3.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514 MultiZilla/1.6.3.2f" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040514 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040608 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 MultiZilla/1.6.2.1a" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040616 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a1) Gecko/20040520 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a2) Gecko/20040714 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a4) Gecko/20040927 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8a) Gecko/20040429 MultiZilla/1.6.3.2c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624 MultiZilla/1.6.1.0b (ax)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Debian GNU/Linux - only dead fish go with the flow - i686; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.2) Gecko/20040301 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 MultiZilla/1.6.2.1a" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040115 MultiZilla/1.6.3.0e" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 MultiZilla/1.6.3.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040510 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040528 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040913 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20041014 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040316 MultiZilla/1.6.3.0e" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421 MultiZilla/1.6.2.0c" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040425 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040608 MultiZilla/1.6.2.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 MultiZilla/1.6.2.1d" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a3) Gecko/20040805 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8a) Gecko/20040501 MultiZilla/1.6.4.0b" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031107 MultiZilla/v1.1.20" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2b) Gecko/20021007 Phoenix/0.3" - family: "Phoenix" - major: '0' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5" - family: "Phoenix" - major: '0' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5" - family: "Phoenix" - major: '0' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021207 Phoenix/0.5" - family: "Phoenix" - major: '0' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MS FrontPage 6.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MSFrontPage/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.0; Windows 3.1)" - family: "IE" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.0; Windows 3.1; Sculptor; Rules)" - family: "IE" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.0; Windows 95)" - family: "IE" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.0; Windows 95) via HTTP/1.0 coder.internet-elite.com/" - family: "IE" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/3.0 (compatible; MSIE 3.0; Windows NT 5.0)" - family: "IE" - major: '3' - minor: '0' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.01; Windows 3.1)" - family: "IE" - major: '3' - minor: '01' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.01; Windows 95)" - family: "IE" - major: '3' - minor: '01' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.02; Windows 95)" - family: "IE" - major: '3' - minor: '02' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.02; WindowsCE" - family: "IE" - major: '3' - minor: '02' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; PIEPlus 1.2; 240x320; PPC)" - family: "IE" - major: '3' - minor: '02' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; PPC; 240x320)" - family: "IE" - major: '3' - minor: '02' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; MSIE 3.02; Windows CE; Smartphone; 176x220)" - family: "IE" - major: '3' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; MSN 2.5; Windows 95)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows 95)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows 95; FunWebProducts-MyWay)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows 95; .NET CLR 1.1.4322)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows NT)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 4.0)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 5.0)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows NT 5.1)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; Windows XP)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_PPC)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Windows 95; Toshiba Corporation)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; AOL 5.0; Mac_PPC)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Mac_PowerPC)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; MSN 2.5; AOL 3.0; Windows 98; Compaq; wGoVols)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; MSN 2.5; MSN 2.5; AOL 4.0; Windows 98)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; MSN 2.5; Windows 98)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 2000)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95; FREESERVE_IE4)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95; iOpus-I-M)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95; QXW0300f)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 95; TriStar Enterprises)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98;CP=MS)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98; DigExt)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98; DT)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98; Messages.co.uk)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows 98; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; 240x320)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; MSN Companion 2.0; 800x600; Compaq)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; PPC; 240x320)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows CE; Smartphone; 176x220)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows NT 5.0)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.01; Windows; U; 32bit)" - family: "IE" - major: '4' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.5; Mac_PowerPC)" - family: "IE" - major: '4' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.5; Windows 98; )" - family: "IE" - major: '4' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.5; Windows NT 5.0)" - family: "IE" - major: '4' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5; Windows NT 5.1; Windows XP SP2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.00; Windows 98" - family: "IE" - major: '5' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 4.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 5.0; Windows 95; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 5.0; Windows 95; DigExt; DT)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 5.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 5.0; Windows 98; DigExt; DT)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 6.0; Windows 98; Compaq; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 6.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 7.0;TargetAOL7.0; Windows 95; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 7.0;TargetAOL7.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 7.0; Windows 95; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 7.0; Windows 98)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 7.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 7.0; Windows 98; DigExt; FunWebProducts)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 7.0; Windows 98; Hotbar 4.3.2.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; AOL 8.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0b1; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; AtHome021)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; e412357VZ_IE50M)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; p412360OptusCabl)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; s412454BPH6mac)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; s412514Mac/m/4.5)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; S425166QXM03307)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) (via translate.google.com)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC; X111923v13b.08)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; MSN 2.0; AOL 7.0; Windows 95; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; MSN 2.5; AOL 5.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; MSN 2.5; AOL 5.0; Windows 98; DT; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; MSN 2.5; MSN 2.5; Windows 98)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; MSN 2.5; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; MSN 2.5; Windows 98; DigExt; CindyKlett 1)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; MSNIA; AOL 7.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; AT&T WNS5.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; BTinternet V8.4; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; 1.21.2 )" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; AtHome0107)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; btclick.com Build BTCFSOHOQ2)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; DT)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; freenet 4.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; Hotbar 2.0; AT&T CSM6.0; FunWebProducts)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; JUNO)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; LILLY-EMA-EN)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; QXW0330q)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; QXW03314)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; sureseeker.com)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; tco2)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DigExt; YComp 5.0.2.4)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DT)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; DT; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; OZEMR1999V01)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) VoilaBot BETA 1.2 (http://www.voila.com/)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95; ZDNetSL)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; {10708F41-46D9-11D9-9941-0008A127FF36})" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; {251744E0-8FEE-11D8-8ED7-00045A9E19B3})" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; {BD767A21-2BDF-11D9-B494-0050BAFA5FC2})" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; Compaq; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; Compaq; DigExt; FunWebProducts)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0(compatible; MSIE 5.0; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; A084)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; AIRF)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Arcor 2.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; AtHome033; FunWebProducts)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; AT&T CSM6.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Creative)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; */E-Plus-002)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; freenet200)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; freenet 4.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; FreeSurf myweb.nl v1.0.1)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; FunWebProducts)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; FunWebProducts; Creative)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; FunWebProducts; FunWebProducts-MyWay)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; FunWebProducts-MyWay)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Hotbar 2.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Hotbar 4.3.2.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Hotbar 4.3.5.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; iebar)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt);JTB:15:88fba442-193e-11d9-bb86-0050fc8126b1" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; KITL27; (R1 1.3))" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; LanguageForce)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Mannesmann Arcor)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Matrix Y2K - Preview Browser)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MAX1.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MCNON1.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MindSpring Internet Services)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc21; v5m)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MSN 6.1; MSNbMSFT; MSNmen-us; MSNczz; v5m)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MSNIA)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; pbc4.0.0.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; pi 3.0.0.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; QXW0331m)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; QXW0331w)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; (R1 1.3))" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; SC/5.07/1.00/Compaq)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; searchengine2000.com; sureseeker.com)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; StudentenNet)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; sureseeker.com)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; TencentTraveler )" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; TiscaliFreeNet)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; tn3.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; V1.0Tomorrow1000)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt) via Avirt Gateway Server v4.2" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; Virgilio3pc)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; VNIE5 RefIE5)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; vtown v1.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; www.ASPSimply.com)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; YComp 5.0.2.4)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; YComp 5.0.2.5)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; YComp 5.0.2.6)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt; yplus 1.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; formatpb; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; FunWebProducts)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; FunWebProducts; Hotbar 4.4.5.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; NETACT; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; provided by VSNL)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; Q321120)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; QXW03301; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; QXW03301; DigExt; sunrise4)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; Software Trading Edition)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; WebHopper)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; YComp 5.0.0.0; Cox High Speed Internet Customer; sbcydsl 3.12" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT;)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.1)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; Bob)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; Adam's Mark Hotels)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; AT&T WNS5.0; AT&T CSM6.0; AT&T WNS5.0 IE5.0.01)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; DT)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; DTS Agent" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; (R1 1.3))" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; TBIT)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; Yahoo-1.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DT; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; QXW0330d; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 [fi] (compatible; MSIE 5.0; Windows 98)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 [fr] (compatible; MSIE 5.0; Windows 98)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.0; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.0; Windows 98;)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.0; Windows NT/95/98))" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "MSIE 5.0" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "MSIE 5.0 (compatible; noyb; Windows5.1)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; AOL 4.0; Windows 98)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; AOL 4.0; Windows 98; QXW0332b)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; AOL 5.0; Windows 95; QXW0332b)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; AOL 7.0; Windows 98)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; AOL 7.0; Windows 98; YPC 3.0.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; AOL 8.0; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; CS 2000; Windows 95; AT&T WNS5.0; DigExt)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; MSN 2.5; Windows 98)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; MSNIA; Windows 95; MSNIA)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; BCD2000; FunWebProducts)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; DT)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; Microplex 1.0.1.5; OptusIE501-018)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; Microplex 2.0; OptusIE501-018)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; MSNIA)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; QXW0332b)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; QXW0332i)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; QXW03336)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; QXW0333a)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; SEARCHALOT.COM IE5; iOpus-I-M)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; USA On-Site)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; Xtra)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; 1012SurfnetVersion2.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; 1&1 Puretec)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; 981)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; AO1.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; AskBar 2.01; Hotbar 4.4.5.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; AT&T CSM6.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; BCD2000)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; BPH32_57a)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; BT Internet)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Config C)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; DT)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; F-5.0.1SP1-20000718; F-5.0.1-20000221)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; FDM)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Feat Ext 19)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; FREE)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; FunWebProducts)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; FunWebProducts; FunWebProducts-MyWay)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; GTE_IE5)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Hotbar 2.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Hotbar 3.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Hotbar 4.4.2.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Hotbar 4.4.7.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Hotbar 4.5.1.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Hotbar4.5.3.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; KSC)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Linux 2.4.2-mvista_01) [Netgem; 4.0.6; InterDigital-T]" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Linux 2.4.2-mvista_01) [Netgem; 4.4.2; i-Player; netbox; NetgemUK]" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Linux 2.4.2-mvista_01) [Netgem; 4.4.3b1; i-Player; netbox; NetgemUK]" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Linux 2.4.2-mvista_01) [Netgem; 4.5.2a; i-Player; netbox; btdigitaltv]" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Linux 2.4.2-mvista_01) [Netgem; 4.5.2a; i-Player; netbox; NetgemUK]" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Linux 2.4.2-mvista_01) [Netgem; 4.5.2b; i-Player; netbox; NetgemUK]" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; MRA 2.5 (build 00387))" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; MSNIA)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; MSOCD; AtHome020)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; OptusIE501-018)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; pi 3.0.0.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; QXC03304)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; QXW03335)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; QXW03336)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; (R1 1.3))" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; SEARCHALOT.COM IE5)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; SPINWAY.COM)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; SQSW)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; sureseeker.com)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; surfEU DE S1)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Teleos)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; TNET5.0NL)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; {World Online})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows 98; YComp 5.0.2.6)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 4.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {2BBC0D6A-BD8E-43C8-9CA1-81673682EF32})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {31BF9C41-DE4C-49B8-B050-19E27C86DC76})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {59C0EB25-1B95-4B4C-AF0B-C247D74597B0})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {87CA9FD1-DEE6-4CB5-98FE-62BA2CA583DE})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {944D8EEF-056A-4073-B8F3-C317B94BA3C0})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {A68BF0C3-9B5E-4F63-A05B-0ADCAF21F0C8})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {ABF22706-058D-48D2-B032-BC3A65229618})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Admiral Group Limited -)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; AHP)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Assistant 1.0.2.4)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; AtHome021SI)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Bitscape Solutions, India)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Boeing Kit)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {CDC8EB20-F4B7-4407-BD64-40AB1B97D85C})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Coles Myer Ltd.)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Creative)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; DigExt)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; DigExt; iebar; (R1 1.5))" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; DigExt; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; DigExt; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; digit_may2002)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; DT)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {E73D9CB8-6F87-458B-9943-F0284A59F969}; FDM)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; {EEC83506-405F-4B48-BA4F-047A5AA92F3E})" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; */E-Plus-002)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; F-5.0.1-20021031)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FDM)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FPC 014)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FunWebProducts)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FunWebProducts),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FunWebProducts-MyTotalSearch)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FunWebProducts-MyWay)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FunWebProducts; .NET CLR 2.0.40607)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; FW1)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; H010818)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)Host: www.pgts.com.au" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 3.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 3.0) via NetCache version 3.1.2c-Solaris" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 4.2.4.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 4.3.1.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 4.4.2.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 4.4.5.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 4.4.5.0; FunWebProducts)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar 4.4.6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Hotbar4.5.3.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; i-NavFourF)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; iOpus-I-M)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Launceston Church Grammar School)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Mohammad Ali Jinnah University)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MRA 4.0 (build 00768))" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MSOCD; AtHome020)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; .NET CLR 1.0.2914)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; .NET CLR 2.0.40607)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Netcom_BA_DD)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; OptusIE55-31)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; PCUser)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; PhaseOut-www.phaseout.net; PhaseOut-www.phaseout.net)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Q312461)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Q321120)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Q321120; Feat Ext 20)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; (R1 1.1))" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; (R1 1.3))" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; (R1 1.5))" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Sgrunt|V106|671|S-1000478620)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; Smart Explorer 6.1)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; surfEU DE M2)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; T312461)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; TencentTraveler )" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; TNT Australia Pty Ltd)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; T-Online Internatinal AG; MSIECrawler)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; WebTap)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; YComp 5.0.2.5)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0; YComp 5.0.2.6; FunWebProducts)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.1)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; Aztec)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; BWB 09032000; BWB 07032000)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; DT)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; freenet 4.0)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; FunWebProducts)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; IE4SUPER; IE4COPLEY; proxyho; proxyinternet)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; IE501NTAb)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; OIZ - Switzerland)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; QXW0332s)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; QXW03336)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; [R1 1.3])" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; SBC)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; Sears Roebuck and Co. 2001)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; S.N.O.W Workstation)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; v1.0 C1; v2.0 C3; v4.0 C3; v2.0 C1)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; v1.0 C1; v4.0 C3)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; www.k2pdf.com)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT; YComp 5.0.2.4)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "MSIE 5.01" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "MSIE 5.01 (Windows 98)" - family: "IE" - major: '5' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.05; Windows NT 4.0)" - family: "IE" - major: '5' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.05; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.12; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.13; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '13' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.14; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '14' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '15' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.16; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '16' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '17' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.17; Mac_PowerPC),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '17' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.2; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '2' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.2; Mac_PowerPC) - Internet Explorer 5.2, Mac" - family: "IE" - major: '5' - minor: '2' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.21; Mac_PowerPC" - family: "IE" - major: '5' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.21; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.22; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)" - family: "IE" - major: '5' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 95)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 95; Arcor 2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 95; EWE TEL)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 95; FDM)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 98; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 98; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 98; VV50110)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows 98; Win 9x 4.90; Q312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 5.0; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0;TargetAOL6.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 95)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 6.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 95)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; {326AFFA0-90D0-11D8-9D83-444553540000})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; DT; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Hotbar 4.2.1.1362)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Q312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; QXW03371)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Win 9x 4.90; AN10HaendlerWelcomeletter1200; AO1.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Win 9x 4.90; Creative; (R1 1.3))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Win 9x 4.90; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows 98; Win 9x 4.90; (R1 1.5))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 7.0; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 8.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 8.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 8.0; Windows 98; Win 9x 4.90; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 8.0; Windows 98; Win 9x 4.90; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 8.0; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 8.0; Windows NT 5.0; BTT V3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 9.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 9.0; Windows 98; Win 9x 4.90; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; AOL 9.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; CS 2000 6.0; Wal-Mart Connect 6.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; CS 2000 6.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; CS 2000 6.0; Windows 98; YComp 5.0.2.6)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; CS 2000; Windows 98; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; CS 2000; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; AOL 6.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; AOL 7.0; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 95; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 98; {476BCB60-A826-11D8-9866-444553540000})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 98; AT&T CSM6.0; YComp 5.0.2.5)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSN 2.5; Windows 98; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSNIA; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSNIA; Windows 98; AT&T CSM6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSNIA; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; MSNIA; Windows 98; Win 9x 4.90; MSNIA)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 3.11)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; AN10HaendlerWelcomeletter1200; AO1.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; A&R Internet; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; BCD2000)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; BPB32_v2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; CSO 3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; DigExt)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; indo.net IE40 users)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; iOpus-I-M)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; iPrimus)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; IT-Office)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; OptusIE501-018)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; OptusIE55-31)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; OptusIE55-31; BPH03)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; PC Games Hardware)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; QXW0333s)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; QXW0333x)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; QXW0334j)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; qxw03377)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; QXW03395)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; StumbleUpon.com 1.758)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; surfEU DE S3)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; SYMPA)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; T312461; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; T312461; UDWXQ08154711; Praise and Worship to the Lamb of God!)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; TBP_6.1_AC)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; TBP_7.0_GS)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; Tucows)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; wave internet services-LAN)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; WSIE)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 95; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; )" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98;)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)." - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible;MSIE 5.5; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible;MSIE 5.5; Windows 98);" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0(compatible; MSIE 5.5; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; 1 & 1 Internet AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; {25FDDD80-7A10-11D9-B0EA-00055D3406F7})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; 3301; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; {88CC0240-7784-11D9-B0EA-00055D3406F7})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; AIRF)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; AT&T CSM6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; AT&T WNS5.0; AT&T WNS5.2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; AT&T WNS5.2; AT&T CSM6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; AUTOSIGN W95 WNT VER01)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Avant Browser [avantbrowser.com])" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; AWWCD; OptusIE501-018)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; {B0727E40-7BFF-11D8-BF96-00028A14743D})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; {B85C43C0-6408-11D8-890A-005004AD1452})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; BPH32_59)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; brip1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; BTopenworld)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Chariot; Hotbar 4.3.2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; CNE-Internet 02252000)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; COM+ 1.0.2204)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Compaq)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Compaq; PeoplePC 2.3.0; ISP)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Config C; Config D)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Config D; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Creative)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; CSO 3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; CWMIE55WDU)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DAC)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DIL0001021)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; distributed by ish)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DT; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DT; Hotbar 3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DT; http://www.Abolimba.de)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DT; MSIECrawler)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; DT; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; */E-Plus-002)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; ESB{1B6DEFA6-3A18-4B9B-9022-99348A8910CF})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; {FE627F21-305D-11D9-A75F-00055D2D4DD4})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; freenet 4.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; FunWebProducts-MyWay)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; FunWebProducts-MyWay; DVD Owner)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; GlobtelNet)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; HanseNet ADSL v1.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Hotbar 4.3.1.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Hotbar 4.3.2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Hotbar 4.5.1.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; HTMLAB)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; HTMLAB; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Installed by Symantec Package)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Jet2Web Internet Service GmbH)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; KITV4.7 Wanadoo)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; KSK sp. z o.o.)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; L1 IE5.5 301100)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; MRA 3.0 (build 00614))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; MSN 6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; MSOCD; AtHomeNL191)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; NetCaptor 6.2.1A)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; .NET CLR 1.1.4322);JTB:15:82cffcc4-8761-4b59-9ba1-c2cba02980a7" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; N_o_k_i_a)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; OptusIE55-31)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; OptusIE55-31; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; OptusIE55-32)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; OTCDv1.4)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; PeoplePC 1.0; ISP)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Q312461; T312461; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0300Z)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0333s)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW03346)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW03347)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW03349)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0334h)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0334j)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW03354)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW03356)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0335n)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0335o)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0335v)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0336b)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW03373)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; qxw03376b)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0337i)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0337t)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0338o)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0338t)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0338t; MSIECrawler)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; QXW0530g)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; (R1 1.1))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; (R1 1.3))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; (R1 1.5))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Royal Perth Hospital)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; salzburg-online)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; SiteCoach 1.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; sureseeker.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; surfEU DE M2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; surfEU DE S1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; surfEU DE S3)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461; Cox High Speed Internet Customer)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T312461; V-5.5SP2-20011022)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; TBP_6.1_AC)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; TBP_7.0_GS)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; TBP_7.0_GS; DefensiveSurfing.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Teleos)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Teleos; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Terminal)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; tn3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; tn4.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Turk Nokta Net; AIRF)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; version55)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; VNIE55)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Wanadoo 6.0; Feedreader)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98) WebWasher 3.3" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Wegener Arcade)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; A084)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; AIRF; FunWebProducts; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; AN10HaendlerWelcomeletter1200)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; AN10HaendlerWelcomeletter1200; AO1.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Arcor 2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; AtHome021SI; (R1 1.5))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; AT&T CSM6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; AVPersonalSerial 728479f8326c352757535b791d2e62b027776bc6)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Circle0701)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; CNE-Internet 02252000)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Creative)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; {D7B0F19C-92C9-4506-96FC-7357186B5914})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; DT-AT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; DT; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; DVD Owner)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; EDISINETD02)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; FDM)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Feat Ext 19)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; freenet 4.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; FunWebProducts; FunWebProducts-MyWay)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; FunWebProducts; MSIECrawler)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; H010818; BTT V3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; H010818; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; H010818; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; HEP AS; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.1.8.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.3.2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Hotbar 4.4.2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; IDL Internet)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; iebar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; iOpus-I-M)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Kit Terra Premium; FunWebProducts),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; libero)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; MSIECrawler)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; MSN 6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; MSN 6.1; MSNbBBYZ; MSNmen-us; MSNc21; v5m)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; MSOCD)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; MyIE2; FunWebProducts; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; .NET CLR 1.0.3705; Hotbar 4.6.1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; .NET CLR 1.0.3705; Hotbar 4.6.1),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; ntlworld v2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; ONDOWN3.2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; OptusIE55-31)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; pbc4.0.0.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; PeoplePal 3.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Q312461; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; QXW0335v)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; (R1 1.3))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; (R1 1.5))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; sbcydsl 3.12; YComp 5.0.8.6; AT&T CSM6.0; AT&T CSM7.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; ScreenSurfer.de)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; SNET OLR v5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; SPINWAY.COM)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; StarBand Version 4.0.0.2; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; StumbleUpon.com 1.760; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Supplied by blueyonder)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; surfEU DE M2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; T312461; (R1 1.3))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; TBP_7.0_GS)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; tele.ring Version 4.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; TUCOWS)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; V1.0Tomorrow1000)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; V1.0Tomorrow1000; Q312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90) (via translate.google.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; Wanadoo 5.4; Wanadoo 5.5; Wanadoo 6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Win 9x 4.90; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; www.vancouver-bc-canada-guide.com; NetCaptor 7.2.2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; YComp 5.0.2.5)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; YComp 5.0.2.6)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; ZDNetIndia)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; ZDNetIndia.com browser)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; ZDNetIndia; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; ZDNetSL)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows 98; Zon CD-rom versie 2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows CE)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; 1 & 1 Internet AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; 1&1 Internet AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; AIRF)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; by IndiaTimes)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; c_commcd1; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; CHIP Explorer :-)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; DekaBank; DGZ-DekaBank; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; DERA IE 4.01 Install 1.0.0.6-CD)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; DEV4012; SP4012)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; DigExt)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; DigExt; QXW03346)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; ENR 2.0 emb)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; F-5.0.0-19990720)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; FR 09/05/2000)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; FunWebProducts; Hotbar 4.4.5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; GDMS_98A_BRAZIL)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Gothaer Versicherung Mobil)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; H010818; DoJ-SOE-4.0.0.0-build-20000213)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; H010818; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; H010818; HEWLETT-PACKARD -- IE 5.5 SP1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Housenet Full 1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Humana1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; HVB 2/2001; T312461; HVB)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; ICN - 000407; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; IE55232Ab)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; i-NavFourF)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Installed by Symantec Package)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; IT-Office)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; L1 IE5.5 December 2000)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Logica 5.01.1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; LycosDE1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; MATAV_IE_55_HUN)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; MI Brandenburg; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; MSIE-5.5-DZBANK)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; .NET CLR 1.0.3705; Googlebot; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Googlebot)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; N_O_K_I_A)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; norisbank; iOpus-I-M)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; P20314IEAK1; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Provided by UAL)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; QXW03002)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; QXW0330d)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; QXW0333v)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; QXW03346)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; QXW0334h; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; QXW03356)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; QXW03371)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; (R1 1.3))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; (R1 1.5))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; RBPD2711)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Sema UK Telecoms upgrade)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; SQSW)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Suncorp Metway Ltd)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461; FunWebProducts-MyWay)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461; IK)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461; (R1 1.1))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; T312461; Unilever Research)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; TIN ie4a32bit rel.1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Tucows)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; USHO-111203)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; v4.0 C3; v5 C5)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; Version 2/5.5 Customised)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 4.0; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT5)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5;Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; 1 & 1 Internet AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {2F8067D2-867C-4351-A289-786E8307965E})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; 3304)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; 3305)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; 360networks)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {4D391717-5781-46B1-9B5E-82D8014C43B0}; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {54ACD89C-CE9B-4CD3-9617-E30DE3DA8738})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {5A4938A5-F50D-46DE-80AA-C659EC68625D}; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {5C8D4EB8-815B-42DD-BF83-63A5F7F7377D}; Hotbar 4.4.6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {63AE5C75-6D69-4DC2-B8E2-F8E204D31206})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; 828750)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {A4E04F4A-3C7A-484D-B1E0-DE64E78EB309})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) Active Cache Request" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {AF9A0710-ED4B-4DEE-884C-E0BB887C2E44})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Agilent Technologies IE5.5 SP2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Agilent Technologies IE5.5 SP2; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Airservices Australia)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Alexa Toolbar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; AspTear 1.5)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; AT&T CSM6.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; AT&T CSM7.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; AWWCD)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; bkbrel07)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; BOCSIE55SP2; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; BTopenworld)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) But of course, that's a fake. I'm really running Mozilla on a non-Microsoft OS, and I've only set these headers to get around the restrictions of people who are ignorant enough to exclude the browser that " - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {C89A4139-160D-4323-B132-B58019B2AF1A})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; CBC/SRC)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; CHEP Australia; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; CHMC)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Coles Myer Ltd.)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; compaq)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; compaq; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Config D)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Config D; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Connex 13/02/2001; Connect 25/07/2002)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Creative)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; CSC)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; CWMIE55WODU)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; CWMIE55WODU; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DAF)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Dept. of Primary Industries)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DEUBA)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DGD (AutoProxy4))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DPU; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; DT; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; [eburo v1.3])" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; [eburo v1.3]; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; [eburo v1.3]; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; {EE17FE27-30FE-41A1-992C-71356B0262D1})" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; ESB{FC3DA1FF-49D4-4235-B656-6358FBC0D57B}; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; FDM)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Fisher-Price)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; FREE; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; FunWebProducts; maxweb)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; GameBar)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; GEP IE 5.5 SP2 Standard; GEP IE 5.5 SP1 Standard)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Groupe DANONE)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; 828750)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; Navstd27juin2001en)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; Q316059)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; H010818; UB1800; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Hotbar 2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Hotbar 4.1.8.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Hotbar 4.2.8.0; H010818)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Hotbar 4.4.5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; HTMLAB)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; ICT)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Installed by Symantec Package)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Installed by Symantec Package; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; iOpus-I-M)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0);JTB:104:a95eef30-9f35-4ec0-bc43-66a16a703faf" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; KSK sp. z o.o.)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; LCPL)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; LILLY-US-EN)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; LLY-EMA-EN)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Logica 5.5 SP2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Merrill IE 5.5 SP2 Install Kit; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; mhs)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; MSOCD; AtHomeEN191)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Nambour State High School (Queensland Australia); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.2914)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; N_o_k_i_a)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; N_O_K_I_A)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Nokia 7650; 240*320)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; N_O_K_I_A; (R1 1.5))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; NSW.net)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; nwb)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; OptusIE55-31)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; OptusIE55-31; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Oregano2 )" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Patriot V5.5.1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; PRU_IE55SP1; PRU_IE55)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Q312461; iOpus-I-M)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Q312461; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; QXW0336o)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; qxw0337d)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; QXW0338d)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; (R1 1.1))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; (R1 1.3))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; (R1 1.5))" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; RA; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; RA; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; RC7.4 release)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; RC7.4 release; i-NavFourF)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; SCF - Mean & Nasty; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; SDS IE5.5 SP2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; S.N.O.W.2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; S.N.O.W.2; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; surfEU DE M1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; SWS)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; CAT-COE)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; DOJ3jx7bf)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; F-5.5SP2-20011022)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; F-5.5SP2-20011022; F-5.0.1-20000221)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; FunWebProducts)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; Guidant IE5 09302001 Win2000 Distribution; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; istb 702; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; ITS 2.0.2)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; MSIECrawler)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; .NET CLR 1.0.3705)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; PC SRP 2.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461; POIE4SP2; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; TBPH_601; Feat Ext 19)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; TheFreeDictionary.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Thiess Pty Ltd)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T-Online Internatinal AG)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; U)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; Unknown)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0) (via translate.google.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; www.ASPSimply.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; www.bfsel.com)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; WYETH)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; YComp 5.0.0.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; YComp 5.0.8.6)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; ZDNetIE55)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.1)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.7 [en] (compatible; MSIE 5.5; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.8 [en] (compatible; MSIE 5.5; Windows NT 5.1; U)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (compatible;MSIE 5.5; Windows 3.11)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (compatible;MSIE 5.5; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.5; Windows NT 5.0)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.5; Windows XP);" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.1 (compatible;MSIE 5.5; Windows 98)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/7.2 (compatible; MSIE 5.5; Windows 98; DigExt)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "MSIE 5.5" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5.1; Windows NT 4.0; T312461; spw500; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "MSIE 6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 (compatible; MSIE 6.0; Windows 98; 240X320; PPC; Default)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.00; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 5.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 5.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 5.0; Windows 98; Win 9x 4.90; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 6.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 6.0; Windows 98; Creative)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 6.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 6.0; Windows 98; Win 9x 4.90; Q321120)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 6.0; Windows NT 5.1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows 98; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows 98; Win 9x 4.90; freenet 4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; FunWebProducts; SV1; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; Hotbar 4.3.2.0; BCD2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; Hotbar 4.4.7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; PCUser; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; Q321120; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; Q321120; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 7.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; {5F4036E0-6271-11D8-8929-000AE67C2897})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; AT&T CSM6.0; FunWebProducts; Hotbar 4.2.9.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; Compaq)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; GA55sp2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98);JTB:2:825c2721-bc07-11d8-bdea-444553540000" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; Win 9x 4.90; AT&T CSM6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; Win 9x 4.90; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; Win 9x 4.90; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows 98; Win 9x 4.90; OUBrowser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; {1EB73F69-5BFB-4D8C-9BA8-72A428DA75D3}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; {3B4748F2-EE14-4317-B069-7AB6F7AEFE69})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; BTOW V9.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; CDSource=storecd_01_03; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; CDSource=v9e.05)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; DigExt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; FunWebProducts; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; generic_01_01; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; Hotbar 4.4.6.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; SaveWealth)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; StumbleUpon.com 1.751)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; SV1; FunWebProducts; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; YComp 5.0.0.0; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 8.0; Windows NT 5.1; YComp 5.0.0.0; SYMPA; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; Win 9x 4.90; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; Win 9x 4.90; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; Win 9x 4.90; YPC 3.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows 98; YComp 5.0.0.0; AT&T CSM6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.0; Hotbar 4.3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.0; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {07D8E8DA-0530-4B69-A0A4-7EB7CB54C821}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {2E4B39C0-67F6-4E50-BD40-FAD19B5CAA8A})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; 3305)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {7197B170-E810-4522-9DC0-088AAD5AD6E9}; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {723EBBEB-CBB8-4A00-AD75-0A0B1A0517ED})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {8B658E16-E35C-4C43-A913-307AA2BADC55}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {9CCDF57C-A828-47C1-9431-3670BDEC44B6}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {9D60457B-6A0F-4CAF-8C22-B463BC201CBB})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; BCD2000; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; CDSource=storecd_01_03; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; CDv5.1.1_1099)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {D2F65954-6A14-43B5-86BE-42556275B763})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; dial)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; DigExt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; ESB{67E15522-64F5-4326-B157-10FF147CA5E9}; ESB{EF27D6C9-1D19-4ED9-B494-FA921D24CCB0}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; {FD960C72-0B96-40FA-BFF5-6B1CE3F64B60}; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; SV1; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; FunWebProducts; YPC 3.0.2; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; generic_01_01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Hotbar 4.2.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Hotbar 4.3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; iOpus-I-M; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Preload_01_07)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Q312461; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Q312461; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Roadrunner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Roadrunner; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; Creative; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; FunWebProducts; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; Grip Toolbar 2.07a; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; Hotbar4.5.3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; Media Center PC 3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Media Center PC 3.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; SV1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; v8c.01; Hotbar 4.2.11.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; Wanadoo 5.5; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; YPC 3.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.0; Windows NT 5.1; YPC 3.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; AOL 9.9; Beta 0.9.4201.270; Browser Control 0.9.0.4; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; {DB0219C0-5374-11D9-81F0-00010292A080})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; GTelnet1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98) OmniWeb/v496" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98; Win 9x 4.90; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 4.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 4.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; iOpus-I-M; SEARCHALOT.COM IE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0b; Windows NT 5.1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows 98; Compaq)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows NT 5.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; CS 2000 6.0; Wal-Mart Connect 6.0; Windows NT 5.1; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; AOL 8.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; AOL 8.0; Windows 98; {99AEF9F6-AD65-4E28-B512-F173232EBD29})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; AOL 9.0; Windows 98; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla /4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; AT&T WNS5.0; AT&T CSM6.0; AT&T CSM8.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; FunWebProducts; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; iPrimus; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; PCUser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; sureseeker.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; sureseeker.com; searchengine2000.com; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows 98; YPC 3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.5; Windows NT 5.1; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.6; Windows 98; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.6; Windows 98; T312461; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSN 2.6; Windows 98; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; Creative)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; Hotbar 4.3.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; MSOCD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; T312461; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSNIA; Windows 98; Win 9x 4.90; AT&T CSM6.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 3.1; Wanadoo 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 95)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 95; PalmSource; Blazer 3.0) 16;160x160" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/ 4.0 (compatible; MSIE 6.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98);" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible;MSIE 6.0;Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 100)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 1&1 Internet AG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 1&1 Puretec)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 1&1 Puretec; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {12Move})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 1.57.1 )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {1A030500-6279-11D8-91F9-00055D306537}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {29C5C4C0-87CA-11D8-94C0-00E07DE10B20})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {3171E4C0-49BB-11D9-8CA9-D07E76ABD032})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 3304; MSN 8.0; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; 3305)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {57F5F0C1-E226-11D8-A9B2-00C04F5BBF26})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {62FF51C0-7B8B-11D8-AD78-004F4905E079})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {6C917480-655F-11D8-8622-444553540000})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {728C4D40-8C75-11D9-86F6-D73001167134}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {7E8AF401-1A03-11D9-BF45-444553540000})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {7EC49A61-187E-11D9-824D-0008A15DF7A2}; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {8F9DB3A0-A757-11D8-A1FE-444553540000}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {9C20C200-1109-11D8-8F74-444553540000})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AAPT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AIRF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AIT; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; alice01; DP1000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; alice01; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; alice01; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Alitalia Custom)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; APC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; APCMAG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; APCMAG; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AskBar 3.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AskBar 3.00; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AskBar 3.00; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AtHome0107)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AtHome0107; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AtHome033)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AtHomeI0107)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AtHomeI0107; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AT&T CSM6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AT&T CSM6.0; AT&T CSM7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AT&T CSM6.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AT&T CSM6.0; Q312461; AT&T CSM7.0; AT&T CSM8.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AT&T CSM7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AT&T WNS5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AT&T WNS5.0; MSOCD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; austarnet_2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; AUTOSIGN W2000 WNT VER03)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Avant Browser [avantbrowser.com]; OptusNetDSL6)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {B3EB8D41-DE48-11D8-BBF4-00804815CB32})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BB1.0 IE5.5.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {BBA839A0-7F6C-11D9-8278-0080C8E10726})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BCD2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BCD2000; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {BDBAC461-139C-11D9-B962-00A0CCD11F28})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BIGPOND_ADSL_42)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BIGPOND_ADSL_42; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BPB32_v2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; bpc; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BPH03)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BPH32_55a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BPH32_59; OptusIE501-018)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BTO E1.07; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BTOW)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BTOW V9.0; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BTOW V9.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; BTOW V9.5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {CA066580-6E9C-11D8-97BC-0060088DA696}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; CDSource=cannonst)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; CDSource=v2.15e.04)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; CDSource=vBB1c.00; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Centrum.cz Turbo2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Compaq)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Computer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Cox High Speed Internet Customer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Cox High Speed Internet Customer; NetCaptor 7.5.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Cox High Speed Internet Customer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; cPanelGui 6.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Creative)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Creative; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; CSOLVE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DCSI)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Deepnet Explorer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DigExt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DigExt; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; digit_may2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DIL0001021; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DP1000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DVD Owner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; DVD Owner; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {E39750C0-6F5B-40B4-9D70-0681DB8795DA})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; eBook)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)::ELNSB50::0000411003200258031c016c000000000506000800000000" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)::ELNSB50::0000411003200258032001df000000000507000900000000" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)::ELNSB50::000041100400030003de0208000000000502000800000000" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)::ELNSB50::000081900320025803140197000000000502000800000000" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; ESB{13B30CE0-EC80-11D8-83BE-0001031746AB})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; ESB{BBA298E0-3889-11D8-9F02-0010B5525635})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; ESB{F0B8BB20-643F-11D0-9C90-00C0F0741766}; yie6_SBC; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; ezn73ie5-1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; EZN/PC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; EZN/PC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {F361FD20-F590-11D7-AFAF-0050FC225B60})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; F-5.0.0-19990720; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; {FD464440-B8BD-11D8-9957-00010273BF2C}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; formatpb)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FREE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; freenet DSL 1.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; freeonline)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; fs_ie5_04_2000i)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; fs_pb_ie5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; Feat Ext 21)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; FunWebProducts-MyTotalSearch)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; Hotbar 4.4.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts-MyWay; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; NN5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; FunWebProducts; SEARCHALOT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; GFR)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; APCMAG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; Hotbar 4.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; i-MailBook)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; MathPlayer 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; VZ_IE6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; H010818; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hellas On Line; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.1.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.1.8.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.3.1.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.3.2.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.3.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.4.5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.5.1.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.5.1.0; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; HTMLAB; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; ICONZ IE5CD; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; IDG.pl)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; IE5.x/Winxx/EZN/xx)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; IESYM6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iiNet CD1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; i-Nav 3.0.1.0F)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Installed by Symantec Package)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; InterNetia 0002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iOpus-I-M; ISP40; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iOpus-I-M; MyIE2; FunWebProducts-MyWay)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iOpus-I-M; NetCaptor 7.5.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iP-BLD03)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iPrimus)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; iPrimus; OptusIE501-018)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98);JTB:140:1255fb21-285b-11d9-bc23-444553540000" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98);JTB:15:344477a2-2c6d-11d9-a611-000854034fa2" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; JUNO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; JyxoToolbar1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; KB0:176933)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; KPN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MADE BY WEBO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MathPlayer 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MathPlayer 2.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MathPlayer 2.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MindSpring Internet Services)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSN 8.0; MSN 8.5; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSN 8.0; MSN 8.5; MSNbQ001; MSNmen-us; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSN 9.0;MSN 9.1; MSNbQ001; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSN 9.0; MSNbBBYZ; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSOCD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSOCD; AtHome021SI; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSOCD; AtHomeEN191)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSOCD; Cox High Speed Internet Customer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MSOCD; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MyIE2; iOpus-I-M; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MyIE2; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; MyIE2; Q312461; Maxthon)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Neostrada Plus 5.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Neostrada TP 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Neostrada TP 6.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; NetCaptor 7.5.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; NetCaptor 7.5.3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.1.4322),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.1.4322; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; NN4.2.0.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusIE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusIE501-018; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusIE501-018; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusIE55-27)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusIE55-28)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusIE55-31)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusIE55-31; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusNetCable-02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusNetDSL6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OptusNetDUI6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OZHARLIT6.0_1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OZHARLIT6.0_1_PP3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; OZHARLIT6.0_1_PP3; Hotbar 4.1.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Panoramic IT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCM_04; DVD Owner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCM_06a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCQuest)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCQuest; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCUser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCUser; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PCUser; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PeoplePC 1.0; hpford)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PeoplePC 2.4.5; ISP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PeoplePC 2.4.5; ISP; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Pioneer Internet - www.pldi.net)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PKBL008; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; PowerUp IE5 1.01.02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; pro)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; provided by blueyonder)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; AT&T CSM6.0; AT&T CSM7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; DF23Fav/2.5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; H010818; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; H010818; yie6_SBCDSL; sbcydsl 3.12; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; TUCOWS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q312461; YComp 5.0.0.0; NN5.0.3.3; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q321017)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Q321120; Feat Ext 1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW03398)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW03399)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW0339a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW0339b; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW0339c)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW0339d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW0339m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW03404)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW0340e; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW0340k)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; QXW03416)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; (R1 1.1); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; (R1 1.3); (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Roadrunner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Roadrunner; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Rogers Hi-Speed Internet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Rogers Hi-Speed Internet; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; sbcydsl 3.12)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; sbcydsl 3.12; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SEARCHALOT.COM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Sgrunt|V108|867|S538318592|dial; snprtz|S03066638220053; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SIK1.02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SIK30)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SIK30; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SIS; {SIS})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SiteKiosk 5.5 Build 36; HBBKLP01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Skyline Displays, Inc.; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SL102000; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SpamBlockerUtility 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Spartipps.Com PS Edition; iOpus-I-M; MyIE2; DX-Browser (V4.0.0.0; http://www.dxbrowser.de))" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SPINWAY.COM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Strato DSL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; StumbleUpon.com 1.735)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; StumbleUpon.com 1.758)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; StumbleUpon.com 1.760; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Superonline)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Supplied by Cloudnet, Inc.)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; supplied by tiscali)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; sureseeker.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SYMPA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; SYMPA; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Hotbar 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Newman College)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Q312461; Hotbar 4.0; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T312461; V-5.5SP2-20011022)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; TBP_6.1_AC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; tco2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; telus.net_v5.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; telus.net_v5.0.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; TencentTraveler )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; TeomaBar 2.01; Wysigot 5.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; tiscali)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; TNET5.0NL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; T-Online Internatinal AG; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Total Internet; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; TUCOWS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; TUCOWS; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; TUCOWS; Q312461; FunWebProducts; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Ubbi)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; V1.0Tomorrow1000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; v11b.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; V-5.5SP2-20011022)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; VNIE5; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; VNIE5 RefIE5; SCREAMING_IE5_V2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; VNIE60)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; VZ_IE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; VZ_IE6; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; W3C standards are important. Stop fucking obsessing over user-agent already.)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Wanadoo 5.6),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Wanadoo 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Wanadoo 6.0),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Wanadoo cable; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; WC/qrDwCOdiRzNfl)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Web Link Validator 3.5" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) WebWasher 2.2.1" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; WestNet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x4.90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; 1&1 Internet AG by USt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; {2A23FA2A-F9FD-484E-801D-DF232F7C64BA}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; {74787047-5497-4FC4-8302-D08B74E01B4B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; APCMAG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; AskBar 3.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; AT&T CSM6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; AT&T CSM6.0; AT&T CSM8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; AT&T CSM6.0; VZ_IE6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; AT&T ELC5.5; T312461; {Cablevision Optimum Online})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; AT&T WNS5.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Avant Browser [avantbrowser.com])" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Avant Browser [avantbrowser.com]; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Avant Browser [avantbrowser.com]; YPC 3.1.0; iOpus-I-M; .NET CLR 1.1.4322)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; BIGPOND_ADSL_42)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; BIGPOND_ADSL_42; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; brip1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; BT Business Broadband)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; BT Openworld BB; YPC 3.0.2; FunWebProducts; yplus 4.3.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; BTopenworld; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; {C954D864-F84E-7490-1E6D-7AF74AE2E175})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; CDSource=ALLIED_01_01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Charter B1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Cox High Speed Internet Customer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Creative)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; c't)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; DT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; DT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; DT; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; DT; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; {E895B1EF-805F-4965-88D8-54AF2D5541F7})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; EnterNet; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; ESB{6BC1B80D-8E38-4080-99B0-2440E59328A1})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; {F77382BC-AB24-49B4-8059-71D9365FEEB2})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Feedreader)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FREE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; freenet 4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FREESERVE_IE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FunWebProducts; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FunWebProducts; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FunWebProducts; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FunWebProducts-MyTotalSearch; FunWebProducts; Hotbar 4.4.6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; FunWebProducts; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; generic_01_01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; H010818; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; H010818; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar 4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar 4.1.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar 4.2.11.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar 4.2.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Hotbar4.5.3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; HWE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; iebar; MSN 9.0;MSN 9.1; MSNbQ002; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; JJ)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Mailinfo [1999999999999999])" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MSN 9.0;MSN 9.1; MSNbQ002; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MSN 9.0;MSN 9.1; MSNbQ002; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MSN 9.0; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MSOCD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MSOCD; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; MyIE2; Free Download Manager)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; ONDOWN3.2; AtHome021SI)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; OptusIE55-31)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; OptusIE55-31; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; OptusIE55-31; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; OptusNetCable-02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; OptusNetDUI6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; OUBrowser; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; PC ACTUAL (VNU Business Publications España)),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; PCUser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; PCUser; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; PCUser; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Provided by Alphalink (Australia) Pty Ltd; H010818; FunWebProducts);JTB:15:d16f74f8-64d6-4024-a74d-b8724a1c548c" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; FtSoJ 666)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; Hotbar 4.1.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; Hotbar 4.5.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; LDE0308a; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; SEARCHALOT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461) WebWasher 3.3" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q312461; YPC 3.0.1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Q321120; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Queens-ITS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; QXW0337s)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Roadrunner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Rogers Hi-Speed Internet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Rough Cutz)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; sbcydsl 3.12; FunWebProducts; yplus 3.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; sbcydsl 3.12; YPC 3.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; SIK1.02; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; SIK30)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; SIK30; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; son0302CD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Sunet v2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Supplied by blueyonder)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Supplied by blueyonder; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Supplied by blueyonder; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; SYMPA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; T312461; Headline-Reader; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; T312461; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; T312461; Wanadoo 5.3; Wanadoo 5.5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; T312461; Wanadoo 5.5; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; TeomaBar 2.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; T-Online Internatinal AG; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; TUCOWS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Virgin 3.00; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; VZ_IE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; VZ_IE6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; Xtra)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; YComp 5.0.2.5; SIK30)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; yie5.5_SBCDSL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; yie6_SBC; YPC 3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; YPC 3.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; YPC 3.0.1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Win 9x 4.90; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; WRV)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; www.ASPSimply.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; www.k2pdf.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; www.spambully.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Xtra)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; Xtra; Hotbar 4.3.5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.0.0; Cox High Speed Internet Customer; sbcydsl 3.12" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.0.0; OptusIE55-31)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.4; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YComp 5.0.2.6; IESYM6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBCDial; YPC 3.0.0; FunWebProducts; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBCDSL; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBCDSL; sbcydsl 3.11; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBCDSL; sbcydsl 3.12)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBCDSL; sbcydsl 3.12; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBCDSL; sbcydsl 3.12; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBCDSL; sbcydsl 3.12; yplus 3.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6_SBC; YPC 3.0.1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; yie6; YComp 5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.0; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.0; BT Openworld BB; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.1; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.2; BT Openworld BB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.0.2; BT Openworld BB; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; YPC 3.1.0; yplus 4.5.03b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows CE; MyIE2; PPC; 240x320; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows compatible LesnikBot)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; 11-12-2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; 3COM U.S. Robotics)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; ABN AMRO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; AIRF; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; APC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; APCMAG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Aztec)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Bank of New Zealand)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; BVG InfoNet V5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; CLS4; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; CNETHomeBuild03171999; DigExt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; COLLAB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config A V1.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config A V1.3; Config C V1.3; v5 C5; Config D V1.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config A V1.3; Config D V1.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config A V1.3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config A V1.3; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config A V1.3; v4.0 C3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config A V1.3; v5 C5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Config A V1.0; Config D V1.3; Config A V1.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; CT2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Deepnet Explorer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; digit_may2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; digit_may2002; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; eircom/june2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Girafabot; girafabot at girafa dot com; http://www.girafa.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; H010818; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; H010818; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Hays Personnel Services)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Hotbar 4.1.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Hotbar 4.1.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Hotbar 4.4.5.0; Config A V1.0; Config A V1.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; HVB 2/2001; HVB-GROUP, 0001_CIT; spunt-ois-intranet; ois-intranet; HVB: NT-OIS; HVB; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; HVB 2/2001; HVB; NT-Zentrale; HVB-GROUP, 0001_Zentrale; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; IE55CX1; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; JPMC_CDI)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; MCS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; MRA 2.55 (build 00423); MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; MSIE5.0; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; MyIE2; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; NAB PC IE6SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; NetServ; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; P20314IEAK1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; PCQuest; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; PCUser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; po; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Q312461; QXW0339m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Q342532)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Qwest - 11122003-a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; QXW0339c)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; QXW0339m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; RBC; 9LA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; RZNT2000.010)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; SDE 2/12/02 1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; SEARCHALOT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; STIE5-000710)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; supplied by tiscali)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; DI60SP1001; DOJ3jx7bf; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; Hotbar 4.1.8.0; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; Q312461; (R1 1.1); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; Q312461; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; SI; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; T312461; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; terranet.pl; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; TESIEAK6a; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; TTC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; TUCOWS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Union Pacific Corporate Image)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; v1.0 C1; v4.0 C3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; v1.0 C1; v4.0 C3; iOpus-I-M; v2.0 C1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; v1.0 C1; v4.0 C3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; www.ASPSimply.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; Yahoo-1.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; YComp 5.0.0.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible;MSIE 6.0; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {01B9B056-41CF-4C49-9F15-FBFD356FACB9}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {06123460-5191-47D8-9801-E64CEE8E7D7C}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {061F9742-FB3A-4B13-8D81-F1DBCFA49E24})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {06537897-63B2-495D-BD75-97D5F17AEF61}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {0D43CA9A-9A2A-4AD3-9FB3-D11ED856701C})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ¾ÜÆÄÀÏ (atfile.com); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {109E9252-FC9D-4712-9D79-AC1C6061FD02}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 1&1 Internet AG by USt; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 123-Reg The Cheapest & Easiest Way to Get a Domain Name)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {12AB035D-BD79-4DED-B042-E95ED524B435}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {143F7CDC-2BEF-45ED-9CA0-9B2076F467D4}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {144098F2-DE3D-4A0E-AA56-C97DABCBEC15})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 1.57.1 )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {19449247-55EC-4B9A-A99C-A1FD75AB322A})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {1AAA4471-A825-4D94-9F91-18DF18D97101}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {1B07E273-0A6C-440D-8E04-CBB9F30106AD})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 2.5.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {282E02E6-44BF-4FF6-9C84-59755CC87202}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {298A087F-0FE1-40C9-A893-97A76A73F88E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {2C0881E9-B6B7-45DB-BFDF-F70BB47FA680}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {2DABB6D9-031A-4174-9C59-D87776C152AC}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {2E487848-058A-4532-83EE-AFF12A987739}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {305B1A70-D1DC-45EF-AA35-F707BBEE85EC}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 3303; iebar; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {338C77F9-6668-40F2-B9AA-7B8B3AACAADA}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {3504DB01-C872-40F5-90A1-A76E8C7BA7F8})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {359046E3-C000-44A8-90B3-BA1FA146D3ED}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {3FD9CEF8-894A-4FFE-BD59-6B3A28A6967A}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 3M/MSIE 6.0;; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 3M/MSIE 6.0;; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {4E075391-5B06-46A7-872B-70EB64C44294})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {4EC4D46A-2224-42E4-B20E-263A00146AD5}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {4F1675AF-7549-42E8-A055-6E4554DDB2B6})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {53D150F0-3948-40FB-AED0-BC12A07D16CB}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {57B317DC-AF18-477D-B26C-D635B7BC0C6C}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {59290DD6-57E1-419C-A050-BC983EB72656})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {5C6515F0-765B-4AD8-A168-3761FB537EBB}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {5DB0254E-3F8C-4DDA-A3D4-6C543537187B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {607C5361-86F7-42A1-8BC4-E3BB7EF36E49}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {62BA8785-A517-4CF6-8456-56716A6D1158}; iebar; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {649E2463-3332-4F08-A0B1-8CCC13C2A5B6}; CLX-IE-5.5sp2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {665CA5DF-6149-4382-9952-7B39C4A56AD1})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {68B11FD1-3CDB-4433-8D4B-FAC8D8352E6E}; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {6B81900A-D6AA-461E-8FC6-1620330AC921}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {6B9216F6-4521-47B0-B084-2A8E511A0B9F}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {6D3765E4-9B4F-43FA-A724-82E2F0EF0D1F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {6E0F184F-9748-4A0E-8B0C-F812273A1D33})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {6E678899-843C-496E-9B27-A35206C3E26B}; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {6EFA4147-88FB-4570-8DA4-EE21FA159006}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {70E73558-8F52-4A75-9312-C8E68DEDAB57})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {7144A0D4-D427-4095-B265-D15A8756742F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {79AF7E55-D81C-44D9-8636-94129DF9DF37}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {79CEA9FC-BE53-45A3-B81D-B66479A78C7D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {7A9D705C-6447-43AF-9CBD-F3EBBC64467D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {8036F106-4980-4D9C-8E40-BC990D1C5340}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {81629412-DDAE-4320-9573-1909044055F5})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {86464A58-0461-4217-8D58-67F6F1813A02}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {89CD3E7F-86F4-4766-8A15-773ED2B1ECDA}; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 90)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {90333DAB-0FE6-4FE7-9F0A-37211DA1DD26})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {90A67E22-1FA8-46DB-913D-5BFAB83B9187}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {9444DFA5-F00A-4C9C-A481-D228454293AC})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {96C6F6D2-27AB-4CE8-A693-5FB34DED41C9})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {9C8127EF-235E-4DB5-A132-FB67DCB6DB9E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; 9L5.5; 9LA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A253E2A3-43A6-4F7C-ACE5-7ACE750E8496}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A26143E3-E395-4A08-906C-2094F96F9992}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A39C4CA3-D28E-48DF-A362-5D0862045D4B}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A45DB481-08E3-4625-85C0-18D272EFA672})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A5E3D903-A7D5-493D-8319-D7A126A43C4E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A64C95F3-2891-4793-8163-A6165CF588EC})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A6B5140D-D366-4853-A784-224D481F964A})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {A6E2595A-77BF-4A90-BDD6-581660B19BAF}; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AAL; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AAPT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ABACUS LABS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Abbey National PLC; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Abiliti Solutions; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ABN AMRO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ABN AMRO; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ABN AMRO; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Agilent Technologies IE5.5 SP2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Agilent Technologies IE5.5 SP2; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Agilent Technologies IE5.5 SP2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AGIS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AIRF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AIRF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AIRF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AJA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alcatel Portugal IE6 SP1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; alice01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ANZ Banking Group)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ANZ Banking Group; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AOL 9.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APC; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APCMAG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APCMAG; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APCMAG; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APCMAG; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APCMAG; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APC; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; APC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AQL - Groupe Silicomp; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AskBar 3.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AskBar 3.00; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AskBar 3.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AskBar 3.00; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM6.0; AT&T CSM 6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM6.0; AT&T CSM7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM6.0; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM6.0; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM6.0; www.ASPSimply.com; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM7.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM7.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T CSM8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; AT&T WNS5.1; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser 6.5.1.3 [avantbrowser.com]; .NET CLR 1.1.4322)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser 7.0.0.8 [avantbrowser.com]; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; Feedreader)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; i-NavFourF; NetCaptor 7.2.2)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; .NET CLR 1.1.4322)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avant Browser [avantbrowser.com]; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Avi 1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {B0B866F5-5095-4A87-AD12-D436006DEE38}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; b2c01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {B42D1284-FDB2-4F37-A1DF-857CBBCA89B2})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {B75CE5DB-567A-44D7-920D-1228B51B3B3E}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Bank of New Zealand)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BAssF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BB1.0 IE5.5.2; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BB1.0 IE5.5.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BB&T Standard Load (IE 6 sp1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BCD2000; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BCIE6SP1; .NET CLR 1.0.3705; Working 081103 Rev 6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BCUC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; bfz Aschaffenburg)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; bgflie; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BIGPOND_ADSL_42)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BIGPOND_ADSL_42; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Boeing kit)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Boeing Kit)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Boeing kit; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Boeing Kit; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Boeing kit; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BOTW)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BOUK)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; brip1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; brip1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BSS; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BT [build 60A])" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; btclick.com Build BTCFMFQ3; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BT Openworld BB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BTopenworld; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; bull ;-) ; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Business 1st; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; BWL 5.5 IEAK; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; by Hi-HO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; c20010830)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {C545DFFA-2A55-4A99-AC19-EB846E5457EA})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {C5C1AC35-93B1-48C0-BAD1-FD616C71A118}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {C6A15346-4AC9-4272-8CF7-151480C6A9D4})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {C7132536-FBAC-4135-9D87-C6DEC6B0AFE0}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {C8EA929F-150F-4C5F-81E2-A258BEDBF712})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {Cablevision Systems Corporation})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {CB1C5177-05C4-4DFE-B687-AD6AF39ACD3E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {CB46BCEF-212D-452A-9341-734FBBA61540}; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CBC/SRC; Hotbar 4.4.9.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CCSU; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {CD8D3547-6274-46D5-947D-12B00C362FD5}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=ALLIED_01_01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=ALLIED_01_01; ESB{1A596234-D5AD-49CF-A3D5-B814562D9F84})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=ALLIED_01_01; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=BP1b.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=BP1b.00; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=v2.15e.03; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=v2.15e.04)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CDSource=vBB1c.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {CF867BA5-3DE3-4197-A46B-0C7BBF5C2285}; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {CF8E2F64-C6B1-4DAE-BFDE-0D69737FAA8A})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Chemopetrol)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CHOP_IE55_V2; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CHWIE_SE60)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CIBA SC Standard Setup)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CIBA SC Standard Setup; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; City of Mesa, Mesa, AZ, USA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CL_P2K_1_1_2_1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CNGTRUST)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CO770; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Coles Myer Ltd.)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Coles Myer Ltd.; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Coles Myer Ltd.; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; COM+ 1.0.2204)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Combellga; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; compaq)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Compaq; DigExt; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; compaq; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; compaq; T312461; Hotbar 4.1.8.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Compatible; Version; Platform; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Computer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Computer) WebWasher 3.3" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Config D; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Conman 2.5; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Cox High Speed Internet Customer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Cox High Speed Internet Customer; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Cox High Speed Internet Customer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CoxIE55)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CoxIE55; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CPT-IE401SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CPWR)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Creative)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Creative; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CSMMWebClient1001; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CSUF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; cust 2.01 r7; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Customized by Adrian Connor; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; CyberZilla; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {D208973F-8755-4E82-A102-0AAA11511D7B}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {D4183739-BB5C-46AB-B754-64727133F2A5}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {D48C8B2F-108A-48C8-9F5F-058A0125BFB9})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {D86494B1-7D5D-4748-838D-529552349E2B}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {DA7D9C31-C746-405E-A35A-6798A9DD3842})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Data center)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Datavend Internet Services)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DCC=6.SP1-E)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {DD52EB3A-6F72-4BDC-8490-161016E9E39C})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Debian Linux; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Deepnet Explorer 1.3.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Deepnet Explorer 1.3.2; Lunascape 1.4.1)" - family: "Lunascape" - major: '1' - minor: '4' - patch: '1' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Deepnet Explorer 1.3.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Deepnet Explorer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Deepnet Explorer; .NET CLR 1.1.4322; .NET CLR 2.0.40607; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Deptartment of Premier & Cabinet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Dept. of Primary Industries)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DeptoMtz/237)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DET_ITD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DHSI60SP1001)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DHSI60SP1001; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DHSI60SP1001; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; dial)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Dialer/1.10/ADSL; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; dial; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; Hotbar 4.2.11.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; MyIE2; FDM)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; OZHARLIT6.0_1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; Q312461; NetCaptor 7.0 Beta 3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; Q312461; NetCaptor 7.0 Beta 5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; ScreenSurfer.de; http://www.ScreenSurfer.de; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; Tucows)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DigExt; YPC 3.0.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; digit_may2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; digit_may2002; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; digit_may2002; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; digit_may2002; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DIL0001021)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DOF-IE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DOJ3jx7bf; T312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; drebaIE-ZE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DrKW=IEAK; DrKW; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DrKW; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DT-AT; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DT; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; DVD Owner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {E39E04A9-A873-4BEB-8AC9-8AAE2C5F4B36}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {E4CBDA2C-2AD6-4963-934B-78AA66873B09})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; E5; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {E6BC9F59-0BE1-42F0-B30B-28E630FC426C})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; [eburo v1.3])" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {EDEBBC92-1A23-4CCF-A287-E7C446EE184E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; EDS; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; eircom/june2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; EMC IS 55; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Endeavour Sports High School)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Era)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ERACON AG; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{18990B24-B930-4963-9F4A-61EC73B586A7})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{262D05ED-F4C4-41AA-9DF8-72398CBAFD6B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{3B40AD5C-7E2F-46D4-9A6A-7C43322AC378}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{3E1AFDF1-14A8-422C-AE93-58363EDEAF96})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{5CEA4270-4309-43DE-913E-4A34AC4DDAC0})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{5D6E1D2C-9FB8-4423-8E9D-9AD635CED031}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{6000F0D1-9B3D-429E-9991-2DA84AB29E7A}; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{69A214B6-5A7B-43E5-89D8-E8F4A9946F3E}; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{97B6FDFD-F75F-4CB4-8F1D-FA16B707E202})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{9FFE22ED-496B-4730-B4EA-CFCDCAF1FCAE})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{A6A5FEED-9585-4F90-8424-38ED6FD61D32}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{CDD58A96-417A-4783-B196-B39BD35B879E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{E8E61902-FB81-4DDA-8BD2-1CE907F88866}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{F512E5D9-AF79-49FE-A3A6-83693239F5C0})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ESB{F7D303AF-E887-4662-945C-FF4B3413A379}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; EV20020426A; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; EXPRESS_004; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ezn)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {F1EA689F-1B1F-474B-8E21-C2122AD49CE8})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {F30610B3-0195-4745-BFEF-D07509032CA2})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; F-5.0.1SP1-20000718; F-5.0.1-20000221; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {F60857FB-3034-40CF-9E34-A28D3EF30C9F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; F-6.0SP1-20030218)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; F-6.0SP1-20030218; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {FABA9F34-879A-44F2-84B8-83E37CC31579})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FastWeb)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FastWeb; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FCP Intranet Browser; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {FD5A89C5-E2DA-4278-BBCB-B19DA07185AB}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {FD604FB4-DBBF-481F-A46F-543390363E21})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; {FDD074C3-CFD3-4CD5-B6FA-1A4AE8C0852D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FDM; COM+ 1.0.2204)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FDM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Feat Ext 21)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Feedreader)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Feedreader; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Feedreader; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Flow Systems)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; formsPlayer 1.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; formsPlayer 1.3; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FORSCOM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Franciscans Australia; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FREE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FREETELECOM; Wanadoo 6.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FREE; Wanadoo 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Fujitsu Services GmbH, Germany; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; bkbrel07)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; FunWebProducts-MyTotalSearch; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; GameBar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; Hotbar4.5.3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyTotalSearch)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyTotalSearch; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay; MSIE 6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay; .NET CLR 1.0.3705; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts-MyWay; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.0.3705; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.1.4322; Google-TR-1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 1.1.4322; .NET CLR 2.0.40301)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; (R1 1.5); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FunWebProducts; Telia; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; FUSAIE55SP2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GENA SDV2.1; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GEP IE 5.5 SP1 Standard)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GEP IE 5.5 SP2 Standard; GEP IE 5.5 SP1 Standard; GESM IE 5.5 SP2 Standard)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GEP IE 5.5 SP2 Standard; GEP IE 5.5 SP1 Standard; T312461; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GEP IE 5.5 SP2 Standard; GEP IE 5.5 SP1 Standard; T312461; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GIS IE6.0 Build 20020920)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GIS IE6.0 Build 20031007)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GIS IE6.0 Build 20031007; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GIS IE6.0 Build 20031007; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GMX AG by USt; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Google)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Googlebot)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; GPM - MSIE 6.0 SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Gulfstream Aerospace)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; 3M/MSIE 6.0;; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; 824145)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; 824145; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; 824145; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; 828750; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; 828750; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; ANZ Banking Group)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; AT&T CSM7.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; BASA Standard)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; BB55; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; BCIE6SP1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; brip1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Client Engineering 20010828; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; HEWLETT-PACKARD -- IE 5.5 SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Hewlett-Packard; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Hotbar 4.3.1.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Inovant)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Inovant; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; iOpus-I-M; YComp 5.0.8.6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Q316059)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; Roadrunner; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; RVQhNDHN5fHE9Vytg36u/rdyxKj6LSKTLgkNEyABZ==)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; SILSOE; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; T312461; Hewlett-Packard; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; T312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; UB1.4_IE6.0_SP1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; UB1.4_IE6.0_SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; UB1.4_IE6.0_SP1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; H010818; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HCJME)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Heath Park High School; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Het Net 3.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Het Net 4.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hewlett-Packard)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hewlett-Packard IE5.5-SP2; Hotbar 4.1.8.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hewlett-Packard IE5.5-SP2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hewlett-Packard; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HMEUK)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HO32600; HO32501; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HomePage)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 3.0; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.1.7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.1.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.1.8.0; Hewlett-Packard IE5.5-SP2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.1.8.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.1.8.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.1.8.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.2.14.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.2.4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.2.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.3.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.3.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.6.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.4.6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.5.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar4.5.3.0; MyIE2; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hot Lingo 2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Hot Lingo 2.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HTMLAB; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; http://InternetSupervision.com/UrlMonitor)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; http://www.pregnancycrawler.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HWT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IBP; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IBP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ICT 20021217; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; &id;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IDG.pl)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE5.5_ SP2_wOLE; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ie6dist)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE6IEAK; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE6/SEF; IE6/FO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE6 SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE6SP1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE6SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iebar; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iebar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iebar; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE_EFY)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IESFYINTL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IESFYINTL; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IESYM6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IESYM6; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IESYM6; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IE UACh; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Illinois State University; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Illinois State University; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-MailBook; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF; FeedEater; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; i-NavFourF; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; InfoCommons)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; infor INTRANET; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Installed by Symantec Package)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Installed by Symantec Package; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Internet Cafe 324)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Internet Cafe 324; ICafe 324)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; internetsupervision.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; INTRANETUSER)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; INTRANETUSER; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; Alexa Toolbar; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; PRU_IE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iOpus-I-M; (R1 1.5); .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; iPrimus)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Issued by ACC Web Services; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; istb 644; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; istb 702)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; istb 702; AskBar 3.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; istb 702; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ISU; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; IWSS:PC-8684-ayrale; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KC135ATS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; kiev.xvand.net; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322; hunter)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; kinglothar; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KITV4.7 Wanadoo)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KITV4.7 Wanadoo; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KKman2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KKman3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; KKman3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Kvaerner ASA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; L1 IE5.5 301100; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ; labs.giannone.unisannio.it; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LCAP-CB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LCPL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LDE0308a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LDE0308a),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; @lee-road.co.uk)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LendingTree.com; AIRF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LLY-EMA-EN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LM-MS; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LM-MS; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Lockheed Martin TSS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Logica 5.5 SP2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Logica 5.5 SP2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Loyal 4arcade.com User II)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LU)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; LWC-dev)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maersk Data AS, Denmark; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Magistrat Wien)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Magistrat Wien; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Manufacturing and Customization)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Marineamt Rostock; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MathPlayer 2.0; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; Alexa Toolbar)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; MyIE2)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; MyIE2; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Maxthon; (R1 1.3))" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Mazillo)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MBsdk0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MenloIE; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MISCS 1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MMS Standard)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Monash University (Customised IE 5.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Mozilla/4.0 (compatiable; MSIE 6.0; Windows NT; Anexsys LLC))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Mozilla/4.0 (compatible; MSIE 5.0; Debian GNU/Linux; Windows NT); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Mozilla/4.0 (compatible; MSIE 5.0; Win9x/NT; JUNO))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HDR.05.01.00.06; .NET CLR 1.0.3705; .NET CLR 1.1.4322); .NET CLR 1.1.4322))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MRA 2.5 (build 00387))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MRA 4.0 (build 00768))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; msie 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc0z)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSOCD; AtHome020; Vj2qqm9YVSwdmA06; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSOCD; AtHome021SI; YPC 3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSOCD; AtHomeEN191)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSOCD; Hewlett-Packard)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MSP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MTK; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; Alexa Toolbar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; FunWebProducts)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; FunWebProducts; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; FunWebProducts; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; iebar; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; i-NavFourF)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; i-NavFourF; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; Maxthon)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; MRA 4.0 (build 00768); .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; NRTE; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; Poco 0.31)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; Poco 0.31; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; (R1 1.3))" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; (R1 1.5))" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; (R1 1.5); .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; MyIE2; Websearch4u 2; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NAB PC IE6SP1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 6.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 7.0.2 Final)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 7.0 Beta 2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 7.5.0 Gold)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 7.5.0 Gold; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 7.5.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 7.5.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NetCaptor 7.5.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705; .NET CLR 2.0.40426)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; Alexa Toolbar; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; Free Download Manager)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.40301)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.40607; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) NS8/0.9.6" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) via Avirt Gateway Server v4.2" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) WebWasher 3.3" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.1.4322) (www.proxomitron.de)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.40607; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.40607; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Net M@nager V4.00 - www.vinn.com.au)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Nevada DOT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NIX)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NN5.0.4.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; N_O_K_I_A)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; N_O_K_I_A; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; N_O_K_I_A; TheFreeDictionary.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Nomad)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Nordstrom; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Nordstrom; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NoSpiesHere)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Novo Nordisk Engineering A/S)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NSWFB SOEWKS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NSW.net)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ntlworld v2.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NTSSVCCORP04022001-ELSAUG2001; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; NZCity 6.0; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ODP links test; http://tuezilla.de/test-odp-links-agent.html)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Office of State Courts Administrator)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusIE55-27; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusIE55-31)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusIE55-31; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusNetCable-02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusNetCable-02; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusNetDSL6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; OptusNetDSL6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Orange Development Dinges)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PAS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCM_06a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCM_06a; Hotbar 4.4.1.1381; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCM_06a; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCnet Version January 2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCQuest)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PC SRP 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCUser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCUser; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PCUser; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PHS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PhysEd)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PIB99A)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Pierce County WA v1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Planet Internet PIM 2; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PNCStd; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PneuDraulics Inc - Rancho Cucamonga - CA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PowerGeekz Rulez; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PPI 05022002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Private information. DO NOT SHARE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Progressive Insurance; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Progressive Insurance; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Provided by Alphalink (Australia) Pty Ltd)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; provided by CRC North Keilor)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PRU_IE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PsyStudentDesktop)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PVH; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; PwCIE6v01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q123456)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; ADP Micro 6.0 SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Amgen.v1b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Amgen.v1b; YPC 3.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Amgen-v1c)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; APCMAG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; AT&T CSM 6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; compaq; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; ESB{586E8C53-5BFC-491B-928B-AA1E0EDEC154})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; ESB{E6216221-1B63-48B0-B352-CF03FD47282F}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Feedreader)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; HD 6.1 Custom; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Hotbar 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Hotbar 4.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; i-NavFourF; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; ir.ie6.v1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Marshfield Clinic)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Mind Your Own Damn Business!!!!!!)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; MSIE 5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; MTK; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; MyIE2; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; MyIE2; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.0.2728; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322; ByteMe_6969)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; ONDOWN3.2; Cox High Speed Internet Customer; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; OptusIE55-31; OptusIE501-018)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; QXW0339r; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; sbcydsl 3.12; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; SEARCHALOT.COM IE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; SWFPAC NSB IE6sp1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; Walsrode Online http://www.walsrode-net.de)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YComp 5.0.0.0; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YComp 5.0.0.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YComp 5.0.2.6; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YComp 5.0.2.6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q312461; YPC 3.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q321064)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q321120)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Q342532)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QPC MegaBrowser 1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QPC MegaBrowser 1.0; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QS 4.1.1.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QS 4.1.2.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QS 4.1.2.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW0333r; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW03399; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW0339a; MyIE2; Maxthon; i-NavFourF; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW0339d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW0339d; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW0339h)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW03411; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW03413)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW03416)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW03416; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; QXW03417; Gruss von BURGSMUE; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.1); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.1); (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); .NET CLR 1.1.4322; SiteKiosk 5.5 Build 45; ALAMOANA2; SiteCoach 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.3); (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.5); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; (R1 1.5); .NET CLR 1.1.4322; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; RA_APAU)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; RayDen)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; RBC; 9LA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; RC75 Release)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; RC75 Release; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Reuters Global Desktop)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; RHIE6SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; RIS GmbH - 1.1 - A)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Roadrunner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Roadrunner; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Rogers Hi-Speed Internet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Rogers Hi-Speed Internet; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) RPT-HTTPClient/0.3-3" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SAA; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SailBrowser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SALT 1.0.4223.1 0111 Developer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SALT 1.0.4223.4223 0111; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SALT 1.0.4613.0 0111 Developer; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SALT 1.0.4613.0 0111 Developer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SALT 1.0.4613.0 0111 Developer; Search Box Toolbar 1.0b2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SBC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SBC; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SBC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.11; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; FunWebProducts; yie6_SBCDSL; yplus 3.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YComp 5.0.0.0; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YComp 5.0.0.0; UB1.4_IE6.0_SP1; iebar; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YComp 5.0.0.0; yie6_SBCDSL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YPC 3.0.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YPC 3.0.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sbcydsl 3.12; YPC 3.0.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SBC; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SCB; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SDS IE6 SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SDS IE6 SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SDS IE6 SP1; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SEARCHALOT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SEARCHALOT 102303)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SEARCHALOT.COM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SEARCHALOT.COM IE5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SEARCHALOT.COM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Siemens Testmanager; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SIK1.02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SIK30)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SIK30; FunWebProducts; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SIK30; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SiteKiosk 5.5 Build 45; SiteCoach 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SKM v1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SlimBrowser [flashpeak.com]; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SLM; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Smart Explorer 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Smart Explorer v6.0 ( Evaluation Period ); Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SMSHome (http://www.aggsoft.com); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; snft internet; SEARCHALOT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; S.N.O.W.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; S.N.O.W.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; snprtz|dialno; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SOEBUILD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SPEED; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SQSW)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SRA-60-05032003; RC-60-040226)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StarBand Version 1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StarBand Version 4.0.0.2; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Steria102002; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Steria Browser - MKG; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; STIE55-010209; STIE5-000710; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; STJUDE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; student.vuw.ac.nz)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.733; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.733; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.736; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.737; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.755)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.760)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.917)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; StumbleUpon.com 1.917; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; stumbleupon.com 1.924)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Supplied by blueyonder)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Supplied by Tesco.net; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; sureseeker.com; iebar; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; surfEU DE M2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SURFkit V5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SWSIT; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SYMPA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SYMPA; ESB{F8AB14A0-3270-47A7-9717-22047C6C04E7}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SYMPA; FunWebProducts; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SYMPA; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SYMPA; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; SYMPA; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Systems Management Server (4-28-03))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; t20010828; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; AIRF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; BTOW V9.5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461;DI60SP1001; {1D9923A3-DFFD-4703-95E9-DB38D1421256}; DI60SP1001; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461;DI60SP1001; {1D9923A3-DFFD-4703-95E9-DB38D1421256}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Digipub,Grape; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; DonRocks; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; DSCC/DLA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; EK60SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Emf!sysUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; F-6.0SP1-20030218)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; FunWebProducts; Hotbar 4.4.5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; FunWebProducts-MyWay; drebaIE-ZE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; FunWebProducts-MyWay; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; General Mills, Inc -6SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; General Mills, Inc -6SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Hewlett-Packard IE5.5-SP2; YComp 5.0.0.0; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Hotbar 4.2.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; iebar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; IE_DT2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; image_azv)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Infowalker v1.01; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; iOpus-I-M; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; istb 641; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; istb 702)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; MRA 4.0 (build 00768); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; MyIE2; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.0.3705; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.0.3705; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; PC SRP 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; PC SRP 2.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; PC SRP 2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; PC SRP 2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; PGE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; PGE; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; POIE4SP1; POIE4SP2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; POIE4SP2; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; PPG; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Q312461; (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; (R1 1.5); .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; sbcydsl 3.12; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; SBS V1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; SBS V1.1; SBS V1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; SLM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; TeomaBar 2.01; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; TTUHSC; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; Tyco Electronics 01/2003)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; YComp 5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461; YComp 5.0.2.6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Taunton School; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TBP_7.0_GS; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TBP_7.0_GS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TBP_7.0_GS; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TDSNET73INS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Teacher; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TELEFONICA DE ARGENTINA; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Telia; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler ; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler ; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TencentTraveler ; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TeomaBar 2.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TeomaBar 2.01; formsPlayer 1.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TESIEAK6a; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Texas Instruments)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TheFreeDictionary.com; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; The Scots College)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TIDK)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TIETOS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T-Online Internatinal AG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TOYOTA CANADA INC.; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T-SYSTEMS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TUCOWS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Tucows; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TUCOWS; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TUCOWS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TUCOWS; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TUCOWS; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; TYCHO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Tyco Electronics 01/2003)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Tyco Electronics 01/2003; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UB1.2_IE6.0_SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UB1.4_IE6.0_SP1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UB1.4_IE6.0_SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UB1.4_IE6.0_SP1; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; University of Leicester; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; University of Limerick, Ireland; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; University of Limerick, Ireland; T312461; .NET CLR 1.1.4322) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Updated-1-22-2004)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UPS-Corporate)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UPS-Corporate; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UQconnect)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UQL Public Workstation; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UrlMonitor)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; urSQL; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; user@ch.eu.csc.com; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; %username%)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; utvi160403)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; UWE Bristol; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; VB_ITS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; VBN; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; VDOT IE6 sp1 - Landesk Package 8-2003; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Verizon Wireless 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Verizon Wireless 2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; VEU)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Virgilio6pc)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Vodafone España)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Vodafone España; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Vodafone; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Volkswagen of America; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; VSAT500)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; V-TV Browser7.0.0.0 (Build 700))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; VZ_IE6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; W2K/KW; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Wanadoo 6.1),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Wanadoo 6.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) WebWasher 3.3" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; wg16)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WHCC/0.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WHCC/0.6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WHCC/0.6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WODC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WRV)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.acction.com.au)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.amorosi4u.de.vu)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.amorosi4u.de.vu) (www.proxomitron.de)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.ASPSimply.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.ASPSimply.com; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.ASPSimply.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.bfsel.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.k2pdf.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.k2pdf.com; .NET CLR 2.0.40607; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; www.VanessaAmorosi.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WYETH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; Wysigot 5.22; Iconico-WebTools-Pro-v1-0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.0.0; SBC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.4; Hotbar 4.4.2.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.4; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.4; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.4; Supplied by Tesco.net)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.5; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.6; Hotbar 4.4.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YComp 5.0.2.6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBCDSL; sbcydsl 3.12)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBCDSL; sbcydsl 3.12; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBCDSL; sbcydsl 3.12; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBCDSL; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBC; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBC; YPC 3.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBC; YPC 3.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBC; YPC 3.0.1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; yie6_SBC; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.0; yplus 4.0.00d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.1; IBP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.1; yie6_SBC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.3; sbcydsl 3.12; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; YPC 3.0.3; sbcydsl 3.12; FunWebProducts; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ZDNetIndia; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; ZI Imaging Corporation; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {00E372B7-BEAF-4DE2-8656-D9E207B7A868}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {00FC4ECE-55C0-4CC0-B927-A257C53EEA9B}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {010372B4-6664-4F0F-9F72-69CDEAAEF34C}; SV1; sensis; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {01CCA09B-D5C0-494F-9AB2-C6A542FB3229}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {02E74E79-2624-4118-ACC0-B2B5E3303175}; SV1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {04C71239-93BC-463E-8049-E98C6347C7B6}; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {05292C4C-2C29-4A29-A4A3-07773831343F}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {059455F9-7AF0-4213-B2BF-552E61CC057A}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0840790C-3719-4A4D-95C6-1C8D668C09FB}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {096DD935-8F09-400D-862E-BAB1224F8D8B}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0A4A867A-C305-4125-BDE0-9596EAE3F231}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0A6E773D-A7D9-4536-BA0E-85BC13B3537F}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0A9BDEB0-929E-4F14-B6C5-EEF41B896043})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0AB53206-6DD9-450D-B4AA-685C7E5148B6}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0AB63054-8A7C-42DB-BFD8-DCBDA1D57B67}; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0DC2355B-02C9-42D8-9358-7CC385381704})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {0F233567-886D-460E-BCD2-88171D6F8C04}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {10D39F67-2519-4768-A71A-9F7915E2CABE}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {11C208DD-B1E1-49F3-A67C-2E8F81A0450E}; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 1&1 Internet AG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 1.21.2 ; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1272B23E-8FD1-4BBE-A149-41B4E94621EA})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 1.41.1 ; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {150A8501-CEA4-4B5F-A7C9-55616EDF8F6C}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {154813CD-3783-458E-B7E0-3294360CA69E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 1.56.1 )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 1.57.1 )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1639F6BF-2F23-4A84-AB07-B2FC5A94935A}; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1681F45C-A0AD-4298-922C-5469DF1CB2EB}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {16A0E5E0-30C1-4ACA-AB32-0719A8E952AA})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {17156865-D8E3-4E6C-B430-78B89BA7C978}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {177ECE14-992D-4AA3-894B-5071AFBC00D5}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {18154988-E91C-4941-B5B6-4FD487BC0525}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {18C2BD69-EEEF-4151-BBA4-23B98B4B6B03}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1903CC58-2135-4245-A3C4-C539A1B2F880}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1907B553-57F7-4A6E-870A-C4744E1B6316}; iebar; CustomExchangeBrowser; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1A29EBB4-B546-4452-A5BE-BECD78E4775F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 1C)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1DD69613-6D5A-4E27-862B-7CD98B580F7A}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {1E96F9A7-2DD2-4386-8EB8-7D4B33840A98}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 1ngo!)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 20040404; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2085FE1A-3A52-4263-9403-CB8938637154}; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {22311735-7766-4562-8318-CFBA42C160AD}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {22827DFF-8DEE-4B06-A2D8-42D90E0D53CA})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {23320F0D-2CA6-4BB2-B889-E23EDE240004}; AskBar 3.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {23521C6A-ECC2-4461-B2D4-9D9C390B90F0})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {24886906-C12D-4D24-8A85-046283E20B25}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {26335003-5381-431D-85FC-5FBAE901B682}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {28267C2F-1F37-4133-A363-3AE7FE96A5ED}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {284FBE28-A81E-404D-AF29-EDD0384E1E1F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 2919; 21231; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2C003D7B-598B-0DEA-1120-FD31003AE559})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2C283092-4E93-4C58-ABE1-07EC5031F0D5}; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2D23B066-4320-4A33-97E2-37D1E986227E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2D25856C-B035-4C44-A548-A4A90CFF8355}; ESB{0F85F697-7BE6-4024-9936-09124BD6C11D}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2EC67C21-DA69-496A-A8A2-C518BF746B76}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2F11EBA2-D79D-47CE-8038-E25C5C60CA50})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {2FD51919-0611-4405-A0C0-2B0757909879}; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 2XP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3043E601-196A-4FD7-89B3-30B82C26D3D1}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {32097A18-1D85-423C-913C-A7BFACBE9070}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3277AD62-7541-4E08-85FC-9058C62AFB67}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {328DDFC1-1867-4044-B118-01E6C8878FA6})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 3301)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 3304)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 3305)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 3305; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3328C095-323C-45D5-8C47-94D927422276})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {341A244C-4429-403A-953F-332E6B717C94}; FunWebProducts; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3463A193-AB0F-48A2-A40F-314E277D4FA8}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {35466D8B-0733-4318-9C15-90D01F7D18B4}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {35A6C8BC-4D10-464E-9059-0786612B0949}; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {35DE4964-76A5-4C61-A6C1-12ADF40CF932})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {360D7714-1669-40B4-8A79-8DC66280E427}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {364EDA13-8707-497D-8D19-043EC47F06E9}; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {366089E4-4B15-4161-81BD-0BE380E6C054}; urSQL; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {387DAA29-45E7-4360-9D07-3C17CEF67768}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3A536119-BE87-47FE-A2CA-00EC28725F68}; SV1; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3A584A4D-518C-4D0E-BC6B-541B7D69A3FE})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3CB6D22A-827A-4D5B-95D1-C25042B282C6}; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3D309697-A650-4F70-9E8B-3E5BBD8136D4}; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3F766A6E-FF5A-419A-8E0D-B410CC976848}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {3FD99CE8-4876-42EB-A98E-C3240840E16F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 3M/MSIE 5.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 3M/MSIE 5.5; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {40BEA18B-3AD4-4A88-87CB-9F3E34B672C5})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {41D06DE4-3B47-4AFE-8586-A2A0BC21128B}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {42662884-5207-488E-88DD-22D1EE5876E4})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {438A4A73-BC8A-4815-81F7-E684646FE3BB}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {4489F513-F2F4-428D-862D-E328E98846C1})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {474A61B2-06FD-4AC4-BD58-15A5EE8D135A}; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {48B30A43-F85C-421C-B89F-5D8DCE6F0C33})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {48BC54DC-03AC-43C8-98C3-6C74FAFA4CBF})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {4907EF1F-C744-4C7A-BD93-DB6598A4124F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {4910F99D-049A-4B1E-AA4C-6254837DE90E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {497D41FB-CBB2-4214-A8FA-2C8339E15215}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {4D0F642B-7758-4DD7-806D-22F5C327491B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {4DAD8D3C-DBF0-48FF-81D9-D8B6056B250A}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {4F0AA017-AB3E-4B63-94AC-3554E6E79E2B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {505431EF-B36F-4113-AD87-A9F319C9A9A7})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {505F1043-8A30-492E-A1F4-6D76A19DAFDC}; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {51B5AE33-C14D-49E0-B977-C367563556E8})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {52370F31-7911-CA01-5788-3A30A77F2822})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {53810FCF-D003-454B-BE56-53B2FCF44FD9}; www.kpas.net; IBP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {55173041-4495-432A-B14A-DC8C4904669C}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {55173041-4495-432A-B14A-DC8C4904669C}; .NET CLR 1.0.3705; .NET CLR 1.1.4322; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {5677AA33-67A1-4270-B68D-B5D5A4E95FA0}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {56B378DE-DAA6-4681-9973-9BEF2D4DDC6F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {56CD5059-BD0C-4315-9677-6D1C92EAF5A8}; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {56FA8E7E-12AB-4911-A191-21C37C311D65}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {581A1CD1-357D-4B8D-8953-C522246CC007}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {581CB45E-7FDC-4B9A-B71C-28266E860749})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {59632201-F778-4CBA-B1F4-C4CCD491D964}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {5B643202-DEAC-4D35-BC57-FE4279576E94})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {5C2F722D-C130-4AD3-8A07-5D3C659A6926}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {5C405188-4130-4F5D-801B-92844913257D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {5CD38EE8-DD84-47A1-9FD8-61C91D812942}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {5D6BCA52-DC20-46F7-B828-2B34BB4618F9}; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {5DF11A3C-26FC-451E-9C44-151B22E63F64}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 601-24)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6240A551-23EB-402C-8A79-008063B05AC2}; Alexa Toolbar; Feat Ext 18)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {625B82F8-3C54-4C68-B502-9EDAD5E5A2B0}; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {654B0711-4A85-42E7-983F-7C17305D0E48}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {66830790-BB7A-4162-B58C-8A914A9DFF5C}; SV1; 1.57.1 ; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {671249BD-E4C8-4962-8F4C-B5116D567611}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {67198D79-41B9-4775-88C5-FF11BF28DF6E}; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {676CA98F-335D-4002-AE68-06EC0FCD863E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {68070A19-8A16-4631-9EC8-4A06D22F83A6}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6A5F8282-BD7B-4C03-AA47-D5EA5EE6CC2C})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6A7ABDFC-3C88-42D6-8E5C-464935051D13})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6B03FCEC-E168-4CD2-946B-4E7C3171D66C})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6BC3FAAA-4F70-42A4-A3D9-5D6E7D38B6E6}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6BD7D868-97D7-4021-A0D1-AFAFDE7AED4A}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6BE32F1D-C93D-4A7A-AB49-C6C28663C805}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6C4A00C9-0682-4A2B-A5C5-7C066461D41A})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6C54EE4C-5F00-4EEB-AABA-A35C734E2654})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6D2550C2-E7EC-4A02-84F9-AE5DA7671170}; SV1; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6D733935-1BA5-402C-81CD-EFFD0A66928B}; SV1; OptusNetDSL6; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {6FC0CBD9-8501-A7A3-BC23-9E828B1739DD})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7029D658-033C-4F21-9334-3028D54A9C46}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {70A105A4-3B56-40B8-ACB3-0B9567712A0C}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7166AA8D-9F2D-45AF-BC84-3A13C84AB68C}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {716A884C-2833-41B9-B4A2-7CFF5CC19774}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {725986B4-361D-4262-888A-1DEF1D40A677}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7275A900-6883-4F2C-9D7B-9D7E6F1B1CAD}; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {73031379-6EF6-48A2-8182-5E04CA2B100D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {73CA2DB1-3D3A-4AA3-BE60-1AB52BBA5DC7})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {73FC897C-EB65-481A-9DFE-D5E6BA3549EF}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {746BDD15-B60E-45F9-8D9B-0DDBC59E6A16}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7564D434-679A-406F-BB78-7277EA46547A}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7609500E-F1F7-4395-AD02-DA8F288385DB}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {76558216-F653-405A-BD95-00857C519BFB})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {76CBD2B2-30E1-4D85-BD1B-D854AEB6FC5B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {76D1A158-5E58-4876-B3B5-09A18AF2D3AB}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {773D9899-3378-495E-AC5D-D9489250EB13})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {776316A7-FEC1-44A8-9DB5-8469FF21105D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {77820B37-7295-47CD-8842-0AA10651F383}; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {79D3BB58-8001-4C11-BB86-ADE061CEAF25})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7A834B30-AA9D-4D2B-AC38-919CE48D56E2})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7AAD7328-EFD7-4E69-8B69-7E9E6D5F4B2F}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7DABAE32-5850-47DE-A886-7BF64850D96D}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7DCFFE58-FF03-4A2A-B3E6-8149BB0EF19F}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7F82049C-378B-4A5A-98D6-E1D43E43CFA0})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {7FB10817-27B8-4D7C-86DD-C61DFD37585B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {80351674-652B-4DDA-8432-41F8E61AB1E7})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {82EFCD46-30E8-45E3-99B6-AD90BEBDAD6B}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {835E8FC0-7916-4D1F-AA80-DD7F553053C6}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {8421A6E1-44C8-4B7D-A950-5EDE1F3181F0}; SV1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {85192DB1-086A-4E53-A59F-BDB83377709A}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {858921CC-D456-4230-95D4-B968432409B3})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {8590B1C5-F4E9-41B0-A990-A8C325015392}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {8621CC8A-4F10-45B1-9C16-A289C29FB98E}; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {865C266F-BCAE-421B-BF88-F1B120A4F943}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {88516849-FDAF-4A0A-956F-FA2CF2F6D7F9}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {888CC72D-0C51-4514-9AA7-507E9D2D6A9E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {89E40FF4-BD77-4586-B092-EB6957FFEEC0}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {8F1D0313-7282-4B1C-B38B-E33B59B2B5B8}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {8F8DADE0-9F1C-406B-8D45-A3686358668D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {906090F7-10E4-4B25-B2D9-D258E722AFC4}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {913B3453-254F-4FC2-AB37-B3CB009590D0}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9520EB69-95A9-4B9E-B576-F9453174C6F8}; ESB{C8AD18A8-BC88-40E8-97D9-31784C41F582}; ESB{50D170B2-6884-4234-96B4-22273E912859})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {965166C4-481A-4D30-8597-0A4319911257}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; 97828)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {97D5F745-44A2-4093-B7E1-E8235862D1CA}; SV1; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {996DA28F-748C-4439-ABC3-4546531ED0FC})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9AA7FFB2-7E7D-4B92-86AE-835F7B135CB9}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9AFC0F21-2679-4207-98D7-E2DB9CDC0E89})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9B8F54EC-CC98-489C-9050-D61EF01E6D45})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9C3408B0-029E-479E-93AD-AA8492C083CE})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9CD98633-D53A-4916-B25D-BBF0EC6299A5}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9CD98633-D53A-4916-B25D-BBF0EC6299A5}; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9CE63974-BFE2-4797-BEB8-B8C133A401B9}; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9E70E38E-EEFE-48E4-9B4C-BF0FEE5E94CD}; .NET CLR 1.0.3705; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {9FE37218-F0B4-43AA-8528-2B052E647F3C}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A159BA28-48C0-4189-BEE6-D59494BCDD76})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A27C75DF-D29F-4B21-834D-66C1B23297E5})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A2841CE9-E06C-4BB2-AF6B-14C4EAA0F0CF}; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A333877C-5AE7-4532-969B-A6004713EF80}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A4E5458B-4CE1-4552-9D0E-8C01D102C7FA}; FunWebProducts; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A5891798-8194-4EC2-BB31-8C33151147C0}; ESB{9E677553-0D9B-4A40-B6E7-8AD691A3065F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A61CE854-3B32-4B71-B3BD-60DCE467E30E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A88CFFCD-C389-47D6-8AEC-52C1DB0371C4})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A97D2399-C6DD-47F7-A9E3-4C2842744510}; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {A9D3BF59-505F-4316-AA7F-ABC49BF4B03E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AAPT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AAPT; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AAPT; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {ABC49948-9942-404D-B4FE-574FCA90475D}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ACSWorld; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; actually Firefox - assholes, support Mozilla/5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ADP Plaza - Build 64; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {AE17F330-EBBA-4B78-B5DF-3288211BACB4})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {AE480139-C1AA-4168-9BA2-24E090FBB8C7}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WILDdesigns; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; Q312461; SV1; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AIRF; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AKH Wien; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Al Asad/Hunter Site, LSA Anaconda; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Alexa Toolbar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Alexa Toolbar; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Alexa Toolbar; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Alisys_ONO; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ALPHA/06)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ALPHA; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; anna mielec tani seks dziwka; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ANONYMOUS; Huntingtower [INTRANET ONLY]; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AOL7; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APCMAG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APCMAG; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APCMAG; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APCMAG; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APCMAG; OptusIE501-018; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APCMAG; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APCMAG; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APC; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; APU-XP; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Arcor 2.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Arcor 2.0; SV1; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Arcor Online 3.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 2.11; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00; .NET CLR 1.1.4322; Fluffi Bot+)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00; SV1; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskBar 3.00; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskJPBar 3.00; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AskJPBar 3.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome021SI; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome021SI; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome033)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome033; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome033; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome033; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHome033; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AtHomeEN191)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ATOM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; AT&T CSM 6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; AT&T CSM 6.0; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; AT&T CSM 6.0; YComp 5.0.2.6; FunWebProducts; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; AT&T CSM 6; SV1; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; AT&T CSM 6; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; AT&T CSM8.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc11; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; Q312461; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; Q312461; SV1; .NET CLR 1.1.4322; MSN 9.0; MSNbQ001; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; Roadrunner; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM6.0; YComp 5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM 6; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM 6; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; FunWebProducts; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; .NET CLR 1.1.4322; Feat Ext 13)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM7.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM8.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T CSM8.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T WNS5.2; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; AT&T WNS5.2; Q312461; AT&T CSM6.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; austarnet_2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; Alexa Toolbar)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; FunWebProducts-MyWay)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; MyIE2; Feedreader; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; MyIE2; SV1; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; .NET CLR 1.1.4322)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; SV1)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Avant Browser [avantbrowser.com]; SV1; .NET CLR 1.0.3705)" - family: "Avant" - major: '1' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Awe¤6 - Adonay Web Explorer; Mozilla/4.0 (compatible; Awe¤6 - Adonay Web Explorer); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {B0832C32-9DEE-429D-9138-56DD764E4C9E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {B2570479-25DA-7559-C478-C0A0855A6BD5}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {B3215A47-A5E1-4B6A-9BB4-3DF0A424B6A1}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {B473E576-6FFF-4F71-9FE5-29224CE32692})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {B8106019-1D23-4C8E-808C-AE28616B449A}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {B9554770-CEA1-4514-BC49-A30D9169404D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {B98C23CE-0A06-492A-A248-BF4336DE4EDD})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BB B500 U2.02; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {BBD40907-B7C9-4947-9B8F-A62A288A98F9}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BB-INTRA-MAI2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BBT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; MathPlayer 2.0; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; Q312461; SV1; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; SV1; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; SV1; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCD2000; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BCIE6SP1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {BD0F71D8-0AC0-49F7-BD87-81F5C24E60E3})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {BF2D4BA4-80A1-46E5-AC3F-B62AED59596C}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {BF8B323E-06A3-459F-BAB5-ABE8401D417A}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; bgft)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BIGPOND_ADSL_42; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BIGPOND_ADSL_42; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BizLink; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; bmi ecommerce; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; bpc; SV1; (R1 1.3); (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BP E1.06; SV1; Smart Explorer 6.1; 1.41.1 ; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BPH32_56; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BRA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Brew_Browser_6.0_SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; brip1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; brip1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; brip1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; brip1; SV1; Sidewinder 1.0; formsPlayer 2.0; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .: BritishHeaven.de :.; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT [build 60A]; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Business Broadband; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTinternet V8.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTinternet V8.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTinternet V8.4; YComp 5.0.2.6; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTinternet V8.4; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTopenworld; AIRF; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTopenworld; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld BB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld BB; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld BB; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld BB; SV1; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld BB; YPC 3.0.0; yplus 4.3.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld BB; YPC 3.0.2; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld Broadband)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld Broadband; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld Broadband; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BT Openworld Broadband; YPC 3.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTopenworld; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTopenworld; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTopenworld; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTopenworld; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTopenworld; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTOW)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTOW; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTOW V9.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTOW V9.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BTT V3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; BWCH30; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C122D12A-1212-49C3-89B0-CD9F3ED9F7BD}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C1B43645-698E-4524-9042-76FC08FDE51A})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C2EED8D4-0E69-4BC2-8F34-3B246690F6DE}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C389C776-89D8-4251-A003-AC55DE5E6821}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C429A6DA-4192-4DD9-85EA-B5EC7CB4DA25}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C5D1D9A9-F1A0-4C62-8162-8BA0DD8C3BA4})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C67ED323-27F6-4127-B7F2-56691D7AC32F})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {C713E123-6F1C-41FC-84B3-880D9608E8D7}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {Cablevision Optimum Online}; (R1 1.3); Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CASPERXP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CASPERXP; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CASPERXP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {CD23D801-AD49-4451-BCEE-0E1BBFC3E71A})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=ALLIED_01_01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=ALLIED_01_01; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=ALLIED_01_01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=ALLIED_01_01; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=BP1b.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=BP1b.00; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=BP1b.00; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=storecd_01_03; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v11c.01; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v12a.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v13b.06; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDsource=v2.15e.03)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v3.12a.00; SV1; YPC 3.0.2; yplus 4.3.02b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v9e.01; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v9e.03; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v9e.05)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v9e.05; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v9e.05; NN5.0.2.12; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v9e.05; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=v9e.07)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CDSource=vBB1c.00; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {CE4189CF-B7E9-4F85-B301-6CC3C11A0196}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {CEDA55FF-C15E-4879-88A3-A83B90CAFEC5}; MCI Windows Corporate Image; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; :certegy Corporate; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Charlestown; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Charter B1; FunWebProducts; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Charter B1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Charter B1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CHWIE_NL70; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CHWIE_NO60; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CHWIE_NO70; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CHWIE_SE70; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CITGO09302002; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Cng)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CNnet Internet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; COE June 03, 2002; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; COE June 03, 2002; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; College of Business Administration Lab; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; COM+ 1.0.2204)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; compaq; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; compaq; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; compaq; YPC 3.0.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Compatible; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; @; Compatible; Version; Platform)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Compatible; Version; Platform)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Connect 1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Consorzio Operativo Gruppo MPS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; consumer; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Corporate Image; MCI Windows Corporate Image; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Cox High Speed Internet Customer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Cox High Speed Internet Customer; Hotbar 4.2.8.0; Hotbar 4.3.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Cox High Speed Internet Customer; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Cox High Speed Internet Customer; Q312461; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Cox High Speed Internet Customer; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CP; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CP; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CPT-IE401SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CPT-IE401SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CPT-IE401SP1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CPWR)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CPWR; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; ESB{AE9445A2-0ED0-4AC0-BDE4-3EA933008624}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; Hotbar 4.4.5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; Q342532)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Creative; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Crick Enhanced; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {CSC})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {CSC}; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CSIE60SP01; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CS.v0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CursorZone 1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CustomExchangeBrowser; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Customized by Computer West; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CVnet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; CWCRDAY; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D009E04F-7285-4277-BAF6-77797A8417CF})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D03E5946-02C5-4FFB-BDF7-A2D658A27777})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D15E0797-FD3B-413C-B67B-63D937268BE0}; Feat Ext 21)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D1F76FF8-EE02-4E7F-BB77-5D6682CC4F46}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D2C0EFBA-26D7-48B4-8500-1F2483B6044C}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D379CF0A-4B77-463F-B99C-6E854BEACF65}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D546DB1D-E98F-468A-8876-49573C986A27}; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {D72714F6-A809-4DE6-B422-2B2ADCEBF152}; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DAgroupPLC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DATASIEL; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {DB056177-05D3-45EF-A868-F029A67735C0}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {DBF8B407-FE31-4D86-8C6E-2F831D79AB5B}; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {DC6A17BE-3A95-4B92-8292-A8EE80FB04CB})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {DCAEF9CE-8251-422E-ADD0-AD2B56DEFED3})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dcdev001; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DCSI; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {DD7B8EB4-6D8A-46BB-B262-45CEC0C799E8})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DDnDD; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer 1.3.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer 1.3.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Deepnet Explorer; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DesignLinks; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {DFD18BB5-E42B-42DE-9F12-A936648D0AF1})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DFO-MPO Internet Explorer 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DGD (AutoProxy4); .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; -D-H1-MS318089; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; -D-H1-MS318089; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DI60SP1001; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dial)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Dialer/1.10/ADSL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Dialer/1.10/ADSL; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Dialer/2.08/Frisurf; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dial; NetCaptor 7.0 Beta 2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dial; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dial; SV1; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dial; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dial; SV1; www.ASPSimply.com; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; AAPT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; Assistant 1.0.2.4; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; digit_may2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; FunWebProducts; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; KITV4.7 Wanadoo)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; NN4.2.0.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; OptusNetCable-02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; OptusNetDSL6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; Q312461; iOpus-I-M; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; Q312461; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; Rogers Hi-Speed Internet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; SV1; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; VNIE60; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; VNIE MESH_PC; YPC 3.0.2; yplus 4.4.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DigExt; YPC 3.0.2; yplus 4.3.02b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; digit_may2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; digit_may2002; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; digit_may2002; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Distance Learning, Inc.)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; D-M1-MSSP1; D-M1-200309AC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dna Internet; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DOJ3jx7bf; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DOJ3jx7bf; .NET CLR 2.0.40607; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DownloadSpeed; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DP1000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; dpx; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; drebaIE-ZE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DrKW; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DRS_E)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DRS_E; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DRS;Techcom Software Solutions Inc.;KDDS1277;IE6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; d:tnt7_ForumBrowser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; d:tnt7_ForumBrowser; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DVD Owner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; DVD Owner; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E2B5FAFC-1899-497E-BACC-EEEA7F24A5D2}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E2E07F6D-A6E7-1684-82DA-8DE003B9C217})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E422A9F3-43BA-41E7-AF5D-838A15EBE348}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E4BBB50E-5B1B-4D8C-A819-AD524233897E}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E5E08788-0480-4269-BC71-A7797C5D3C62}; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E69CE46B-FC60-6F41-B5CD-7789712032EA}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E85C6A09-3F78-4078-B300-293C2CD8FD03})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {E875708F-E195-B824-10FE-6BB954D80082})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {EA1C7663-ACC4-45B1-8A90-221B12478AF0})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {ED79526B-0CE1-4925-AAFF-F8C063DE0161})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {EE8C6E6D-7C14-493D-96D8-96189CDB443C})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {EEF090D2-AD10-4793-AA02-7C5F2B8F099F}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {EFACCBB9-0BDC-4B3A-A7B9-051398D9E119})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; eircom/june2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; EJGVNET; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; EK60SP1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; EMC IS 55; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Emiliano ti vede ....)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) [en]" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ENGINE; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; EROLS040199)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{02508E72-8688-4F8C-BF9C-73C3D029563C}; SV1; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{101D66DC-5446-428D-A6EA-ED273C9FC84B}; Hotbar 4.4.7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{10ED3712-AD0D-4BB1-8D3C-0B0E15A671C4}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{1234D1DF-0277-4F9A-A0EB-0FAF5D432EE2}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{133E6249-80BF-4741-9A39-10C8D7C998AC}; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{136B3929-78D3-4728-A726-73ECC4B983CF})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{180F232C-E374-4B08-A664-FA09F726DBE4})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{1C38363F-253A-4424-B102-4495048AF33E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{28878E88-F98C-4A17-878A-E36A996D5072}; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{2F39423D-9DBB-48B9-B343-20ACBF9CFDC2}; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{30E3976E-D14C-4C93-B9B7-9AFECD8F306F}; MyIE2; Maxthon)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{31889988-FC07-40BA-7F3E-AEBEA15391D6}; ESB{E2E93F3B-0BE5-472F-2ABB-1C9AEFB49813}; ESB{CC56F89D-FD35-4E39-6074-F0B433D7D482}; ESB{225AAA31-E92C-4034-89D0-14B9F20BE982}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{34824601-AC35-488E-B249-BCD4AAF8A1C6})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{35404506-8A98-49E1-9E17-D61E2C1BAC18})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{3D72EE78-2FEB-4C75-B8DC-3BF40C60D3C5})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{45F63CFC-FA29-4C6E-A6D6-B947491001C8}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{472D70C9-7893-4D2B-B119-BB44221294EC}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{4779B872-DBEE-40A8-8442-E0FF5DA484D7}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{484F9004-564C-4B12-AC4E-1418ECDE928A}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{4B268CB2-51FA-4C84-B624-6DE3F0D887DA}; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{4D3EA7A9-3801-4A63-91E9-5CCC71E6868C}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{4E071CF0-5E40-4332-8E3D-AF6371997B08}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{58553345-1609-429A-8ED6-D9F1B9A77DC2}; ESB{65E1A955-DCEC-465A-821C-54F40FF8B34A}; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{5D811861-EA95-45EE-B290-38265CDC5E35}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{62965017-4DF0-4965-87E8-BA0D8449C3DE})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{688258C8-E4A8-482F-9667-C29B4CABFA9A}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{68DE235B-522D-4012-A9D9-E5F196997BC0}; ESB{D7EC4F6C-EFE4-4DBB-A0BD-FFCA2CEF6E60})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{6AF1F99B-2A01-4167-B3EE-BC497D63F9D4}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{6EFB5336-7A45-448B-843F-9AC66EF6FBD1})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{73AE67D7-E15F-4325-B51F-124AB9646A23}; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{75618962-1051-4901-83E3-FA45F0DE1ADD})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{75E350B6-0105-4218-971A-A1CB090DC683}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{77A48D0F-61AF-44B4-BEFD-42E758642C6D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{7D07736D-DE37-4F7F-AC8E-C68237EBF022}; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{7F8B060C-274D-4956-B4B4-46DEFBCBF28A}; ESB{4B5E3CE7-C53E-4C53-A2EE-6D064498DF1F}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{82EA8C84-7DC3-489C-B779-A3469BE4708E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{83E1DA4B-9DEF-4AFB-883B-D347E5A6107D}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{87F2D8B2-4248-4885-A012-C7B7FA26F488})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{8C127829-44A0-4BB8-9D28-E81994F66EE0}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{8C9138AB-F2ED-4BB7-A14E-2A3D3D977E0B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{91E7C142-4F0C-49FA-81C3-1E8A6C52A2F3}; ESB{C50C0A96-9BEB-46E8-B245-4EC5EC3830E5}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{9981848E-AAB6-4A05-B8A4-3A0A5F328952}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{9B524756-DEC6-4F01-8E9F-5922E7097A74}; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{9C041F81-CD5B-4241-9C74-CD4FE075546E}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{A1F633C5-98D0-4F80-A38A-7A216501394C}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{A5C6ECFC-8673-444F-B7E7-DE0C5B59D622}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{ABA66D21-29BE-4BAF-BAD4-ED6812C1E033}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{ADA09EE9-2082-4E60-A551-973A98214068})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{B485C8BD-00D2-42A3-A424-90D47ECB16EA}; ESB{51D3AFB9-B34E-42EB-8AD7-D60D7CEF84E2}; ESB{B901E2E3-3130-4FD3-A611-F671E4D7D235}; ESB{F8ED9EF0-B332-437D-AF6F-E4D7929AAE51}; ESB{145C6EA3-68A6-4840-8583-FDE74" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{BC8D007D-0F64-48DF-9841-D9A5F8184B58}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{C48545AB-77DE-4E4E-AC5B-183794002D5B})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{C809320D-9E35-41B8-B589-1857D6C6B121}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{C9452703-6C32-4564-9A1C-E11A31A69CD4}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{CD23C4DA-697C-4A7E-B50B-884DD2A1A8E2}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{D65EE013-85EB-431B-A47F-633C4457E9BE})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{D6E592CA-A859-4145-A375-64AC4DFC291D}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{D8F6BF12-200C-466E-85E5-06BBD005995E}; YPC 3.0.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{E3E1E7D6-9A2C-4F39-843E-362AB50F6088}; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{E63A7B5D-0538-4B3D-BBAB-915D834B1FE3})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{E6DD635D-0921-4491-B013-17AF67B2E602}; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{EA155034-249E-47E4-988B-5576EA36F928}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{EA67BD1B-D57E-4131-BCEC-E5C35BD6A0CE}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{F0F896A7-E6EA-4914-B1DE-C16BBB4A67E1})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{F40811EE-DF17-4BC9-8785-B362ABF34098}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{F7A8BDDE-BB37-40C8-AA1D-4B57BD78EFBA}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{FE364DB1-9712-443D-8511-83A85984644A}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ESB{FF0BE471-F8FA-4219-8FFC-07515C5FCB9C}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Eurobell Internet; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; exNetPanel:1059240)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F1ECC819-455A-46BC-A405-EFB52BF85707}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F2024F27-DA75-4D6A-B590-2AD23305F9F7}; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F27B2FF4-5121-47B1-8A63-CE5BD1021640})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F29D822D-EED0-4E29-8B61-8B038CEC1C0A}; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F35D706E-FD32-451F-9A2F-DFD96F9F0DA6})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F3A9F2D1-57F6-4A32-8E00-5AA391FC89A2})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F467C9A2-D4AF-4B0F-890E-8F8923BAE9C2}; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F4E70CE0-6237-4227-906E-788A750F9FB4}; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; F-6.0SP1-20030218)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; F-6.0SP1-20030218; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F70A8590-C5BA-483C-BE5F-8589C20E9B38})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F7BF8B53-70AB-4EA6-915C-C70769C62210})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F8498490-1D66-4D29-9FCC-BB35327A6257}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {F8FE05B9-FCEF-4302-AC51-C4B61FFBF4B9})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FA63D7BD-846C-43EE-9287-0FB9150B1111}; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FB15F932-A469-4646-BCB4-8EB15AECFF9F}; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FC1AC744-B5CC-4237-96AA-E63B9FE6FE44})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FD749AFA-79D4-49DF-9348-6228D25835C8})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FDM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FE8FFD49-3EE4-412F-B700-175757E8EA1B}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Feat Ext 20)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Feat Ext 21)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FEB_2004-TPG; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Feedreader)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Feedreader; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Feedreader; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FF25C218-3C07-491B-BFCA-D6C5557A414F}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FF360BD3-4648-4D2D-94C7-F95404BDC9BB})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FF8CB3A2-81BE-4550-B98C-CC9DFAF7A452}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FF8CB3A2-81BE-4550-B98C-CC9DFAF7A452}; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {FFBF6A73-2389-4D4F-A470-862760ED16CD}; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FGL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FIDUCIA IT AG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FIPID-{6/j.Ss94W0oM{6KchRpCsLmMQ222656249)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fisg IE 6.0 SP1 (FID r2.0); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FMRCo cfg. 6.01.3.1b1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FMRCo cfg. 6.01.3.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FORSCOM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Free Download Manager)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; FunWebProducts) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; SV1),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FREE; Wanadoo 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FreeWeb Explorer 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FS_COMPAQ_IE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fs_ie5_04_2000_preload)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; fuck you; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; AskBar 3.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; BCD2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; dial; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; ESB{27845BE7-0EC6-473C-8064-3C4A063AB585}; ESB{5CEF3C99-0C80-47FB-B591-9EA0568D728D})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; FIPID-{8ORj5ZKEvfbg{8r02nwzw7eKE181427001)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; FunWebProducts-MyWay; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; FunWebProducts-MyWay; Wanadoo 6.1; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Grip Toolbar 2.07)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.3.5.0; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.1.0; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.2.0; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.5.0; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.5.0; MSN 8.0; MSN 8.5; MSNbBBYZ; MSNmen-us; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.5.0; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.7.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.4.9.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.5.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.5.1.0; MSN 6.1; MSNbMSFT; MSNmen-nz; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.5.1.0; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar4.5.2.0; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar4.5.3.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar4.5.3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; HTMLAB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; IBP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; iebar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; iebar; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; KKman2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Maxthon; FREE)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MSN 6.1; MSNbMSFT; MSNmsv-se; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MSN 8.0; MSN 8.5; MSNbVZ02; MSNmen-us; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyTotalSearch)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyTotalSearch; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyTotalSearch; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; ESB{285EDB64-F0D5-40CE-9E80-0424E454F7A4}; ESB{82D87D6A-A9EA-4A92-A8E0-46F5501A1E54}; ESB{53A21F9E-0210-412D-A05D-A8145EBD094A}; ESB{B709ECE9-AE61-48D0-8788-FBBAD5FECB3E}; ESB{829700D" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; Grip Toolbar 2.07a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; JyxoToolbar1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; NetCaptor 6.5.0B6; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; .NET CLR 1.0.3705; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; OptusNetDSL6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts-MyWay; SV1; www.kpas.net; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; OptusNetCable-02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; OptusNetDSL6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; OZHARLIT5.5_1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; PP; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Preload_01_07; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Primus-AOL; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SIK30)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; AAPT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; ESB{793F2EFD-3EE8-4B36-AB38-1853C6EC257E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; Hotbar4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; Maxthon; MediaPilot; MediaPilotAd; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; Maxthon; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; MSN 6.1; MSNbDELL; MSNmen-us; MSNc22; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; snprtz|T04114572010350)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; son-OEM-1101; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; SV1; YPC 3.2.0; .NET CLR 1.1.4322; PeoplePal 3.0; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FunWebProducts; YPC 3.0.1; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; FVSD#52)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; [Gecko])" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; generic_01_01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; generic_01_01; FunWebProducts; (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; generic_01_01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; generic_01_01; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GIS IE5.5 SP1 4-20-2001 DMG Build)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GIS IE6.0 Build 20030604; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GIS IE6.0 Build 20031007; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GIS IE6.0 Build 20031008; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GIS IE6.0 Build 20031008; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GIS IE6.0 Build 20031111; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GIS IE 6.0 Build 20040714; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Global Visioneers, LLC - www.GlobalVisioneers.com -; Globcal Visioneers, LLC - www.GlobalVisioneers.com -)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GMX AG by USt; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; GoldenWeb.it)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Googlebot)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Googlebot/2.1 (+http://www.googlebot.com/bot.html))" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Googlebot/2.1 (+http://www.googlebot.com/bot.html); Maxthon; FDM)" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Google-TR-1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; H010818)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; H010818; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; H010818; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; H010818; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; H010818; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HCI0430; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HCI0441; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Headline-Reader; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Het Net 3.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hewlett-Packard; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hewlett-Packard; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HinBox 0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HJS.NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; hlink5.5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.7.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.8.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.8.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.8.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.8.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.8.0; SV1; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.1.8.0; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.10.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.11.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.1.1281; MSN 6.1; MSNbMSFT; MSNmfr-fr; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.1.1367; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.1.1367; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.13.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.13.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.14.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.14.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.8.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.2.8.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.3.1.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.3.2.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.3.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.3.5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.3.5.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.1.1394)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.1.1394; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.1.1406; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar4.4.1.1415)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar4.4.1.1415; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; FunWebProducts; MSN 6.1; MSNbDELL; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.2.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0; FunWebProducts-MyWay; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.5.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.6.0),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.6.0; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.6.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.6.0; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.6.0; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.7.0; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.7.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.8.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.4.9.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.0.0; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.0.0; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.0.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.1.0; .NET CLR 1.1.4322; FDM; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.1.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.5.1.0; SV1; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar4.5.3.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar4.5.3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar4.5.3.0; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hotbar Unknown; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Hot Lingo 2.0; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HPC Factor; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HTMLAB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HTMLAB; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; hubbabubba)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HW-IE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IBP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IBP; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IBP; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IBP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Ibrowse/3.2(Ibrowse3.2;AmigaOS4.0); SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Icewtr Network services (jen); SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ICLP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ICM60)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ICM60; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ICSLabs - USC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ICT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ICT; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IDG.pl)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE5.x/Winxx/EZN/xx; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.05; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE60BRMM by STASM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.0 (FID r1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.0 SP1 (FID r2.0))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.0 SP1 (FID r2.0); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.0 SP1 (FID r3.0); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.0 SP1 (FID r3.0); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.0 SP1 (FID r3.0); (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE 6.0 SP1 Unrestricted; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE6CFG32a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE6CFG32a; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE6SP1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; DP Oslo; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-in; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iebar; SV1; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IE; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IESYM6; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IgwanaBrowser; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; Feedreader; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; Feedreader; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; .NET CLR 1.1.4322; FB-Solutions)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IncoNet Starter Kit ver 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; INFINOLOGY CORP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; INFOAVE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; INFOAVE5; Q312461; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; INFOAVE5; Q312461; SV1; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Infowalker v1.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Infowalker v1.01; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; INTDUN; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; brip1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; Free Download Manager)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; Maxthon; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; MyIE2; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; IBP; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; MathPlayer 2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; MyIE2; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iOpus-I-M; SV1; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iP-BLD03-PRE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iP-BLD03-PRE; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iP-BLD03; SV1; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iP-CMPQ-2003; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iP-CMPQ-HDD; FunWebProducts; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iP-CMPQ-HDD; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ip_internal_request; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iPrimus)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; iRider 2.07.0018; SV1; Feedreader; .NET CLR 1.1.4322)" - family: "iRider" - major: '2' - minor: '07' - patch: '0018' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; isp1057; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; istb 702)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; istb 702; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ITS-Ver1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IWSS:MSC01048/00096b3da0d3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IWSS:SPH-XP-SACH02/0008a1091f37; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; IWSS:WXP4390/00904b631249; IWSS:WXP4390/000d567960f4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JackGTestLocalMachineValue; someFunkyString; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Others)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JAS; SV1; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JLC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JMV)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JMV; SV1; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1);JTB:15:817d2be2-fc1c-4568-8f4e-cc5f9a982e3b" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Juni)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JUNO; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JyxoToolbar1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JyxoToolbar1.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JyxoToolbar1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; JyxoToolbar1.0; SV1; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Katiesoft 7; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KITXP40NL; MSN 6.1; MSNbMSFT; MSNmnl-nl; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KKman2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KKman2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KKman3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Kmart; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Kmart; Q312461; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KPMG; InstantAlbert; XBOXToolbar; CustomToobar.com; Eduardo A. Morcillo; Custom Browser Inc.; SavantMedia; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KPMG; InstantAlbert; XBOXToolbar; CustomToobar.com; Eduardo A. Morcillo; Custom Browser Inc.; SavantMedia; SinglesToolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; KPSWorkstation; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; LDS Church)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; LIB Staff; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Link Checker Pro 3.1.72, http://www.Link-Checker-Pro.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; LN; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; LTH Browser 3.02a; FDM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Lunascape 1.3.1)" - family: "Lunascape" - major: '1' - minor: '3' - patch: '1' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; luv u; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; lvw)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; LW0815)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Lycos-Online; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MADE BY WEBO; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MassCops Browser; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MathPlayer 2.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Matrix Y2K - Preview Browser; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; Alexa Toolbar)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; FDM)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; iRider 2.20.0002)" - family: "iRider" - major: '2' - minor: '20' - patch: '0002' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; MyIE2; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; MyIE2; SV1)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; MyIE2; SV1; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; (R1 1.5))" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; SailBrowser 2005; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; Stardock Blog Navigator 1.0; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; SV1)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; SV1; Alexa Toolbar)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; SV1; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; SV1; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon; SV1; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; McInternetBrasil_MCAAE_3112; NusaQuiosque; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MCI Windows Corporate Image; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MCI Windows Corporate Image; QS 4.1.1.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MCI Windows Corporate Image; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MCI Windows XP Corporate Image; MCI Windows Corporate Image; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MediaPilot; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Megara Web; IE 6.05; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mercer Human Resource Consulting; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Metro C&C, Croatia)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MidBC001; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Miele & Cie. Explorer Version 6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MiniJv2 3.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; mip.sdu.dk)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mon_AutoConfig_v1.02_STL; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mountainside; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .Mozilla)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Menara); SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (Compatible; MSIE 6.0; Windows 2000; MCK); Mozilla/4.0 (Compatible; MSIE 6.0; Win; MCK); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0; -D-H1-MS318089))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; HDR.05.01.00.06; .NET CLR 1.0.3705; .NET CLR 1.1.4322); .NET CLR 1.1.4322); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible,MSIE 6.0; Windows NT; Brite Way Publishing; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0(compatible; MSIE 6; Win32; Mck))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0(compatible; MSIE 6; Win32; Mck); Mozilla/4.0 (Compatible; MSIE 6.0; Win; MCK))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Mozilla/4.0 (zgodny z ISO 900087635.5); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MPD JV v1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MRA 2.5 (build 00387))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MRA 3.0 (build 00614))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MRA 4.0 (build 00768))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MS Custom IE; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSIE6XPV1; KB824145; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; msie6xpv1; LM_POSTPLATFORM; MSIE6ENV6; MS04-004; CU_POSTPLATFORM; .NET CLR 1.0.3705; .NET CLR 1.1.4322; LM_50_POSTPLATFORM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; msie6xpv1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; msie6xpv1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmbr-br; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-sg; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc21)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmit-it; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 6.1; MSNbMSFT; MSNmtc-tw; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 8.0; MSN 8.5; MSNbBBYZ; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 8.0; MSN 8.5; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-gb; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 9.0; MSNbBBYZ; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 9.0; MSNbDELL; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSN 9.0; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; AtHome0200; T312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; AtHome021SI; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; AtHomeEN191; Hotbar 4.3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; AtHomeEN191; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; Q312461; Hotbar 4.0; SEARCHALOT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MSOCD; T312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MTI; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MTI; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Multikabel)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyHealthyVet; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2 0.3)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Alexa Toolbar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Deepnet Explorer; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; ESB{9D28903E-AE01-4815-A52A-AE2885F86845}; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; ESB{E225A099-D057-4FEF-BAC6-3BEC123804CC}; NN5.0.2.23)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Feedreader)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Feedreader; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; FunWebProducts)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Hotbar 4.5.0.0; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; i-NavFourF; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; iOpus-I-M; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; iRider 2.10.0008)" - family: "iRider" - major: '2' - minor: '10' - patch: '0008' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; JyxoToolbar1.0; iolbar-3.0.0.XXXX; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Matrix Y2K - Preview Browser; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; AIRF; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; iOpus-I-M; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; .NET CLR 1.1.4322; FDM)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; SV1)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; SV1; Deepnet Explorer; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; SV1; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; Maxthon; SV1; .NET CLR 1.1.4322; Tablet PC 1.7; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; NetCaptor 7.0.1)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; NetCaptor 7.5.3; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.2914; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; (R1 1.1); FDM)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; (R1 1.1); .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; (R1 1.3))" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; (R1 1.5))" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; (R1 1.5); .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; Alexa Toolbar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; CustomToolbar.com; Maxthon)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; Mailinfo [102065]; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; Maxthon)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; Maxthon; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.1.4322; FDM)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; MyIE2; TheFreeDictionary.com)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Nahrain)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NARA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NaturaMediterraneoEEmare; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Neostrada Plus 5.6; FIPID-{2N8gA8m2Ta32{2nYX0EkruYpg585052490; i-MailBook)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Neostrada TP 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.0.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.0.2 Final; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.0.2 Final; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.1.0 Beta 2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.2.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.2.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.2.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.0 Gold)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.0 Gold; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.0 Gold; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.2; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.2; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.3; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NetCaptor 7.5.4; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3621)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .BGDID000017489A1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Dave)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Feat Ext 21)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Googlebot; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; &id;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; MSN 8.0; MSN 8.5; MSNbDELL; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; MSN 8.0; MSN 8.5; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.0.3621; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Tablet PC 1.7)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; XMPP TipicIM v.RC6 1.6.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; NetNearU)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; Tablet PC 1.7; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Alexa Toolbar; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Donut RAPT #51 Sugi)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322-dtb)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Feat Ext 18)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Feat Ext 19)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Feat Ext 21)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Free Download Manager)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Lunascape 1.4.1)" - family: "Lunascape" - major: '1' - minor: '4' - patch: '1' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmde-de; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc11; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmnl-be; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 8.0; MSN 8.5; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 8.0; MSN 8.5; MSNbVZ02; MSNmen-us; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 9.0; MSNbBBYZ; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 9.0; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; MSN 9.0; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40301)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40426)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.31113)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.40301)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.40426)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Netibar 1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; SpamBlockerUtility 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; Tobbes surfing board)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322) WebWasher 3.3" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; XMPP TipicIM v.RC5 1.6.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.40607; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.40607; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.40607; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Netpenny)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Netvitamine Toolbar (+http://www.netvitamine.com); i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; New Value #1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NISSC; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NISSC; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NN4.2.0.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NN5.0.2.23; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NN5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NN5.0.3.3; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NN5.0.3.3; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; NN5.0.600.15)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Nordstrom; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ntlworld v2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ntlworld v2.0; Hotbar 4.5.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ntlworld v2.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; nxforms/1.00; formsPlayer 1.1; formsPlayer 1.3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ONET; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Ongame E-Solutions AB; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ONLINE 5.5; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OnlyInternet.Net; Personal Computer Doctors)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ONS Internet Explorer 6.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OPT-OUT; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OPT-OUT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OPT-OUT; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE501-018)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE501-018; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE501-018; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-27)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-27; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-27; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-31; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE55-32)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusIE5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; SV1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetCable-02; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OptusNetDSL6; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Origin Energy Limited - SOE 3.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OZEHAR01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OZHARLIT6.0_1_PP3; FunWebProducts; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OZHARLIT6.0_1_PP3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OZHARLIT6.0_1_PP3; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; OZHARLIT6.0_HN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Paros/3.2.0" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PASSCALL; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PCAdvisor032002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PCPLUS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PCUser; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PeoplePal 3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Performance Technologies S.A.; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PGE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PhaseOut [www.phaseout.net]; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PKBL008; fs_ie5_04_2000i)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Plus a few changes)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PNCStd)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Poco 0.31; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Polkomtel S.A.; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PottsNet; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PowerBase6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Preload_01_07)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Preload_01_07; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Prepaidonline.com.au setup; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Primus-AOL)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PrimusCAlanEN; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PrimusDSLEN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PrimusPCEN)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PROGRATECH; MSIE6.0XP OpenBrowser CPOP5.2; DyGO.NET MailSRV; MyIE2; SV1; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Provided by Alphalink (Australia) Pty Ltd)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PRU_IE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PwCIE6v01; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; PwCIE6v01; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q-06062002-K2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q-06062002-K2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312460)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; 1.21.2 ; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; AAPT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; AIRF; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Amgen.v1b; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; APCMAG; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; AT&T CSM6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; AT&T CSM6.0; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; BCD2000; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; BrowserBob; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; BTopenworld; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; CDSource=ALLIED_01_01; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; CDSource=storecd_01_03; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; COM+ 1.0.2204; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Cox High Speed Internet Customer; 1.41.1 )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Cox High Speed Internet Customer; i-NavFourF; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Cox High Speed Internet Customer; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Cox High Speed Internet Customer; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; DVD Owner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; ESB{6C1AEBB4-8C44-41AE-866F-707D5E75B0E9}; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; ESB{A44A754F-952B-4E88-802A-5725DBA66F0E})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; F-6.0-20020225)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Feedreader)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Feedreader; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; FunWebProducts-MyWay; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; FunWebProducts; NetCaptor 7.5.2; WebCloner 2.3; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; FunWebProducts; ntlworld v2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; GIL 2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hewlett-Packard; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 3.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.1.5.0; MyIE2; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.1.8.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.4.5.0; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.4.7.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.4.7.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.5.1.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Hotbar 4.5.1.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; IESYM6; Hotbar 4.5.0.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; IOpener Release 1.1.04)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; iOpus-I-M; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; iOpus-I-M; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; MathPlayer 2.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; MyIE2; Maxthon; SV1; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; MyIE2; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; MyIE2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.2914; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.0.3705; .NET CLR 1.2.2125; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; NN5.0.600.11)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; OptusNetDSL6; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Paul BunyaNet; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Q-07122002-K2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; (R1 1.3); .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Roadrunner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Roadrunner; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; Roadrunner; TheFreeDictionary.com; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; sbcydsl 3.12; YComp 5.0.0.0; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SIK30; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; 18ko/; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; ATB; Visited by ATB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; GIL 2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; IBP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; SV1; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; T312461; SV1; EnergyPlugIn; dial; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; TeomaBar 2.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; TeomaBar 2.01; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; TeomaBar 2.01; SV1; MSN 6.1; MSNbMSFT; MSNmja-jp; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; tiscali; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; TUCOWS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; TVA Build 2001-10-11)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.0.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.2.5; Hotbar 4.2.8.0; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YComp 5.0.2.6; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YPC 3.0.1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461; YPC 3.0.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312462)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312463)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312464)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312465)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312466)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312467)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312468)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312469)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q321017)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q321017; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q321120; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q321120; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q321120; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q321150; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q342532)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q822925; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QinetiQ IE6 V02; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QS 4.1.1.2; DVD Owner; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QS 4.1.2.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QS 4.1.2.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QS 4.1.2.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Queensland Government; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QUT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QUT Printing Services; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Qwest - 11122003-a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Qwest - 11122003-a; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Qwest - 12302003-sms)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Qwest - 12302003-sms; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QXW0330d; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QXW0339d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; QXW0340e; www.ASPSimply.com; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.1); FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.1); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.1); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3)),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; [R1 1.3]; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.3); .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; (R1 1.5); (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; RD&E v.6.0 r.6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; RD&E v.6.0 r.6; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Really Firefox-It works fine asshole)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Renault)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Renault; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; RI-ADMIN12112003)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; FunWebProducts; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Roadrunner; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; Hotbar 4.4.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; Hotbar 4.4.2.0; SV1; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; TheFreeDictionary.com; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; YPC 3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; YPC 3.1.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Rogers Hi-Speed Internet; YPC 3.1.0; yplus 4.5.03b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; RSD66)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; rtc user)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; rtc user; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; RWE Dea AG)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)-s" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SALT 1.0.3404.1 1007 Developer; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SALT 1.0.4223.1 0111 Developer; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SALT 1.0.4223.1 0111 Developer; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SALT 1.0.4613.0 0111 Developer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SALT 1.0.5507.1 0111 Developer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SAVEWEALTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; ESB{E49F02C9-B446-4F5C-9EB8-5A2DF808DA80}; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; FunWebProducts; YPC 3.0.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; SV1; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; SV1; YPC 3.0.3; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.1.4322; yplus 3.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YComp 5.0.0.0; yplus 3.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; yie6_SBCDSL; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YPC 3.0.1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sbcydsl 3.12; YPC 3.0.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SBS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SBS; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SC/5.10/1.14/Telenor)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SC/5.10/1.14/Telenor; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SC/5.60/1.01/FS-Internett; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; School of Business and Computing; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SCL Build)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; ScreenSurfer.de; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SEARCHALOT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SEARCHALOT.COM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SEARCHALOT.COM; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SearchFox Toolbar 2.0b1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sfgdata=5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SFIE60122601; SFIEAUTH1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SFIEAUTH1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SGC; SGC STUDENTS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Sgrunt|V107|634|S-1869674593|dialno; alice01; snprtz|dialno; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Sgrunt|V109|1684|S-129601565|dial; snprtz|S03037726560360)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Sgrunt|V109|622|S1290160941|dialno; snprtz|dialno)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Sgrunt|V109|69|S-327757572|dialno)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Shazam; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Siemens A/S; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; FunWebProducts; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; FunWebProducts; SV1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SIK30; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SINGNET)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SINGNET/HTMLAB; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SiteCoach 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SKY11a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SKY13; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SlimBrowser [flashpeak.com])" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Smart Explorer 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Smart Explorer 6.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Smart Explorer 6.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Smart Explorer v6.0 ( Evaluation Period ))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Smart Explorer v6.0 ( Evaluation Period ); .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; snft internet; SV1; OptusNetDSL6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; snopud.com client; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Snowdrop Systems; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; snprtz|dialno; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; snprtz|S03037726560360)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; snprtz|T03022004250337; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; snprtz|T04125278003990)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SOK)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SON-1102CD; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SON-1102CD; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; sp1, AHS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SP/6.35/1.01/ONLINE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SPARTA AREA SCHOOLS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SPServe)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; **SPS**; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SS.CC. Palma)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StarBand Version 1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StarBand Version 4.0.0.2; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StarBand Version 4.0.0.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StarBand Version 4.0.0.2; SV1; .NET CLR 1.0.3705; Media Center PC 2.8; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {Starpower})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; STB; 560x384; MSNTV 4.1; THMDR)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; STIE60-021004; STIE60-020212; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; STI; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; STI; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stokeybot)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Stonehenge School)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StopTrackingMe; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Stratford ISD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.733; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.735; MyIE2; SV1; Maxthon; JyxoToolbar1.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.735; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.736; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.744)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.755)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.755; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.758; MyIE2; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.758; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.760)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.760; iRider 2.21.1108; .NET CLR 1.1.4322)" - family: "iRider" - major: '2' - minor: '21' - patch: '1108' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.760; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.760; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.760; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.763)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.763; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.818; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.818; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.820; SV1; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.901; FDM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.906; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.910; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.910; SV1; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.910; SV1; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.917; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.917; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.917; SV1; Hotbar 4.5.1.0; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.919; Maxthon; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; StumbleUpon.com 1.919; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stumbleupon.com 1.923; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stumbleupon.com 1.923; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stumbleupon.com 1.924; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stumbleupon.com 1.924; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stumbleupon.com 1.925; .NET CLR 1.0.3705; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stumbleupon.com 1.926; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; stumbleupon.com 1.926; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; subagente; Agente; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Sunrise; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by blueyonder)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by blueyonder; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by blueyonder; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by blueyonder; SV1; Hotbar 4.5.1.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by blueyonder; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Supplied by Tesco.net)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Surf Mechanic; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 1.41.1 ; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 1.56.1 ; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; 9LA; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AAPT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; ACTC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AIRF; NetCaptor 7.2.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AIRF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar; jd; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Alexa Toolbar; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; ALL YOUR BASE ARE BELONG TO US; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Antenna Preview Window)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Antenna Preview Window; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AOL7)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; APCMAG; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Arcor 5.002; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Arcor 5.002; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Arcor 5.003)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AskBar 3.00; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AT&T CSM6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AT&T CSM7.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AT&T CSM8.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AUTOSIGN W2000 WNT VER03)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AVPersonalSerial 2b206c294a291e6470432759423669f000255953; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BBIP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BCD2000; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Berg Network Client; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BMD Melbourne; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Boeing Kit; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; brip1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BTHS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BT Openworld BB; YPC 3.0.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BT Openworld Broadband; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BT Openworld Broadband; YPC 3.2.0; yplus 4.3.02d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; BTY; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Burnie High Student)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Canning College)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CaseDOSA/Operator; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CDSource=BP1b.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CDSource=v11c.01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CDSource=v9e.04; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CIM Gruppen; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Citrix)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Compatible; Version; ISP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Cox High Speed Internet Customer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Cox High Speed Internet Customer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Creative; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CSIE60SP02; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CursorZone 1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; CursorZone Grip Toolbar 2.08; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; custom; custom; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; custom; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Deepnet Explorer)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Deepnet Explorer 1.3.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Deepnet Explorer 1.3.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Deepnet Explorer 1.3.2; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Deepnet Explorer; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Deepnet Explorer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Deepnet Explorer; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DHSI60SP1001; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DI60SP1001)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DigExt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DigExt; FunWebProducts; Media Center PC 3.0; .NET CLR 1.0.3705; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; digit_may2002)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; D-M1-200309AC;D-M1-MSSP1; D-M1-200309AC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DOJ3jx7bf; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Domain user; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Donkey; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DownloadSpeed; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DVD Owner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; DVD Owner; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Editor 3.0 - http://www.e-ditor.com; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; ESB{77898B69-9C1F-433D-B8EA-FD6FA2B8A2CC}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; ESB{C6B1C008-FCCB-4A07-BF79-6BEED181D1F0})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; E-train)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; evUI; Agency Manager Management Console; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FDM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FeedEater; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Feedreader; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Feedreader; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Feedreader; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Feedreader; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Feedreader; (R1 1.5); .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; formsPlayer 1.3; nxforms/1.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FREE; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FTDv3 Browser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FTDv3 Browser; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; 1.56.1 ; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; 1.56.1 ; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Alawar 2.08; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Hotbar4.5.3.0; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Hotbar4.5.3.0; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc00; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Hotbar4.5.3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; i-NavFourF; onlineTV; www.cdesign.de; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts-MyWay)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts-MyWay; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts-MyWay; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmnl-nl; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; (R1 1.1); (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; SpamBlockerUtility 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; FunWebProducts; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GambleEnt; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; gameland)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GIS IE6.0 Build 20031111; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; GMX AG by USt; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; gogo)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Golfing Paradise; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Tablet PC 1.7)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Grip Toolbar 2.07a)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Grip Toolbar 2.08; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Headline-Reader; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; HEL INTERNET EXPLORER)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.2.14.0; .NET CLR 1.0.3705; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.4.5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.4.6.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.4.6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.5.1.0; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.5.1.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.5.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar4.5.3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar4.5.3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar4.5.3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar4.5.3.0; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar4.6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar 4.6.1; MSN 6.1; MSNbMSFT; MSNmnl-nl; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Hotbar Unknown; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; HTMLAB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://www.aztrx.com/ )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://www.tropicdesigns.net)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; http://www.tropicdesigns.net; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; IBP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; IBP; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; IBP; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; IBP; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iebar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iebar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iebar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iebar; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iebar; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Imperial College; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; i-NavFourF; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; i-NavFourF; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; i-NavFourF; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iOpus-I-M; Wanadoo 6.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iP-CMPQ-2003; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; iP-CMPQ-HDD; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; IWSS:wxp4432/00114366da97; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; JNet; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; JUNO)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; KATIESOFT 6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; KKman3.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; LetNet Connect, [www.letu.edu]; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; lWh.lgS.rfU.lxd; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Manor Trust::)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MathPlayer 2.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MathPlayer 2.0; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 2.0.41202)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MathPlayer 2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; Alexa Toolbar)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; FREE)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; FREE; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; NetCaptor 7.5.4)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322; FDM)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322; FDM; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; (R1 1.5); .NET CLR 2.0.40903)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MaxXium; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Media Center PC 3.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Media Center PC 3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Media Center PC 3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MediaPilot)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT; Campus Bundaberg;))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MRA 4.0 (build 00768); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MRA 4.0 (build 00768); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSCS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbDELL; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmfr-fr; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 6.1; MSNbMSFT; MSNmnl-nl; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 9.0;MSN 9.1; MSNbQ002; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MTI; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MTK; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; iebar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; Maxthon)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; Maxthon; Alexa Toolbar)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; Maxthon; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; Maxthon; (R1 1.3))" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; Maxthon; TaxWise19.00[0016]; TaxWise19.01[0003]; TaxWise19.02[0005]; TaxWise19.03[0001]; TaxWise19.04[0001]; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; .NET CLR 1.0.3705)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Neostrada Plus 5.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Neostrada TP 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.2.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.0 Gold; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.2; FDM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.2; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.3; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.3; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.4; Media Center PC 3.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetCaptor 7.5.4; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Alexa Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Media Center PC 2.8; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Media Center PC 2.8; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Media Center PC 3.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Media Center PC 3.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; MSN 6.1; MSNbMSFT; MSNmit-it; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1; Googlebot/2.1)" - family: "Googlebot" - major: '2' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1; .NET CLR 2.0.40209)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Q342532)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Tablet PC 1.7)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; XMPP TipicIM v.RC6 1.6.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 2.0.40607; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Tablet PC 1.7)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Tablet PC 1.7; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Tablet PC 1.7; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; 45c42354c4e5r4cw!(s)4sd)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Alexa Toolbar; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Alexa Toolbar; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322) Babya Discoverer 8.0:" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; FDM; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Hotbar 4.6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Hotbar 4.6.1; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Hotbar 4.6.1; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Lunascape 1.4.0beta3)" - family: "Lunascape" - major: '1' - minor: '4' - patch: '0' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Lunascape 1.4.1)" - family: "Lunascape" - major: '1' - minor: '4' - patch: '1' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Lunascape 1.4.1),gzip(gfe) (via translate.google.com)" - family: "Lunascape" - major: '1' - minor: '4' - patch: '1' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Lunascape 2.0.1)" - family: "Lunascape" - major: '2' - minor: '0' - patch: '1' - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmde-at; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-ca; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-gb; MSNc0z; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc11; MSNc11)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc11; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-us; MSNc21; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmit-it; MSNc0z; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbBC01; MSNmen-ca; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbBC01; MSNmfr-ca; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-gb; MSNcOTH)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcIA; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbMSNI; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbQ002; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSN 9.0;MSN 9.1; MSNbVZ02; MSNmen-us; MSNcOTH; MPLUS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MSNc11; MSN 6.1; MSNbMSFT; MSNmen-us)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.2914; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.2914; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Media Center PC 3.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; Version; Platform; Compatible)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40209)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40301)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40903; Avalon 6.0.4030)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.41115)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.41202)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50110)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50110; Avalon 6.0.4030)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50215)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; NOKTURNAL KICKS ASS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Q342532)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Secure IE 3.3.1263)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; Tablet PC 1.7)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.40607; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.40607; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.40607; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.40607; .NET CLR 2.0.40426; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.40903; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.41118; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50126)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Net M@nager V4.00 - www.vinn.com.au)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NetPanel:763771; npUID:763771; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; NN4.2.0.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; N_O_K_I_A)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) NS8/0.9.6" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; nxforms/1.00; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OfficeWorld.com/1.082)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusIE55-31)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusIE55-31; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusNetCable-02)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusNetDSL6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusNetDSL6; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusNetDSL6; FDM; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusNetDSL6; MathPlayer 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusNetDSL6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; OptusNetDSL6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Overture; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; PeoplePal 3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Poco 0.31)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Poco 0.31; TencentTraveler ; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; PrimusDSLEN; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Prisoner; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; provided by blueyonder; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Q342532)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Quik Internet (0102098b))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.1))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.0.3705; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc0z; MSNc00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.3); (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); MSN 6.1; MSNbMSFT; MSNmen-us; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 3.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); onlineTV; www.cdesign.de)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; (R1 1.5); snprtz|T04077983781234)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; RCBIE6XPMAN; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Rogers Hi-Speed Internet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SALT 1.0.3404.1 1007 Developer; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SALT 1.0.5507.1 0111 Developer; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SALT 1.0.5507.1 0111 Developer; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Sgrunt|V108|654|S-2135541317|dial; snprtz|T03087750360356; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Sgrunt|V109|34|S-1398421108|dialno; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Sgrunt|V109|547|S1107901103|dial; XBE|29|S04039483631143; snprtz|S04048557771347)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Sgrunt|V109|598|S76509116|dialno)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SIK30)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SIK30; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SIK30; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SLPS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SmartShop)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SON-1102CD)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SON-1102CD; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; SPARTA AREA SCHOOLS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; sumit)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Suncorp Metway Ltd; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Supplied by blueyonder)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Supplied by blueyonder; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Supplied by Tesco.net; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; surfEU FI V3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Tablet PC 1.7; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Tablet PC 1.7; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TBP_6.1_AC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TencentTraveler )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TeomaBar 2.01; AskBar 3.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TeomaBar 2.01; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TheFreeDictionary.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TheFreeDictionary.com; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; TNET5.0NL; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; urSQL; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; User Agent; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; UserAgent; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Virgin 3.00)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; VND Toolbar; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; VNIE5 RefIE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; VNIE5 RefIE5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; VNIE60; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; VNIE60; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Wanadoo 5.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Wanadoo 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Wanadoo 6.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Wassup; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; WebSpeedReader 8.6.96; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) WebWasher 3.3" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; WHCC/0.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; WHCC/0.6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; WHCC/0.6; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; WI4C 3.5.3.001; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; www.ASPSimply.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; www.aztrx.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; www.k2pdf.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Wysigot 5.51)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; XMPP TipicIM v.RC6 1.6.8; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; XN2K3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; yie6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; yie6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; yie6_SBC; YPC 3.0.3; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.1; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.2; .NET CLR 1.1.4322; yplus 4.4.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.3; .NET CLR 1.1.4322; yplus 4.0.00d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.0.3; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.1.0; bgft; Media Center PC 3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.1.0; Media Center PC 3.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.1.0; yplus 4.5.03b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; YPC 3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SWSIT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SWSIT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Sykes Enterprises Inc. B.V.)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SYMPA)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SYMPA; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SYMPA; Q312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SYMPA; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; Artabus)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; DI IE 5.5 SP2 Standard; GESM IE 5.5 SP2 Standard; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; PGE; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; Q312461; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; SV1; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; SV1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; SV1; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; T312461; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TARGET HQ; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TaxWise19.00[0016]; TaxWise19.05[0002]; TaxWise19.07[0006]; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_6.1_AC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_6.1_AC; NetCaptor 7.5.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_6.1_AC; (R1 1.3); Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_7.0_GS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_7.0_GS; FunWebProducts; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_7.0_GS; Hotbar 4.5.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_7.0_GS; .NET CLR 1.1.4322; MSN 6.1; MSNbMSFT; MSNmen-au; MSNc00; v5m)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_7.0_GS; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBP_7.0_GS; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TBPH_601)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TDSNET8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; telus.net_v450HS; SV1; Hotbar 4.5.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; telus.net_v5.0.1; Hotbar 4.5.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TencentTraveler )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TencentTraveler ; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TeomaBar 2.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TeomaBar 2.01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TeomaBar 2.01; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Testing.net; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Texas Instruments)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Texas Instruments, Inc; [R1 1.3]; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; The Department of Treasury - Bureau Of The Public Debt)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TheFreeDictionary.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TheFreeDictionary.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TheFreeDictionary.com; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; The Free Lance-Star Publishing Company)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Thiess Pty Ltd)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; tip; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TiscaliFreeNet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Tiscali; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TMS Inst 5.5; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TNT Australia Pty Ltd; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Total Internet; Q312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TR.NET Dialup Ver.2.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TRPIT; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TRPIT; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TS User; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TUCOWS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TUCOWS; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TVA Build 2002-05-16)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TVA Build 2002-05-16; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; U)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; UBIS-RESNET 2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; UKPORTAL; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; UrIE 4.0; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; urSQL; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; %username%; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 2.8)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; USERNAME_PASSWORD_IS_ENABLED; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; UUNET)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; V1.0Tomorrow1000; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; v11b.01; FunWebProducts; SV1; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; V6.00-003)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; v6.1b; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; V6; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Videotron)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Videotron; SV1; CustomExchangeBrowser; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VIRTUALIT.BIZ; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Virtual IT - http://www.virtualit.biz)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE4 3.1.814; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE5 RefIE5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE5 RefIE5; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE5 RefIE5; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE5 RefIE5; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE60)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE60; MyIE2)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE60; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE60; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; VNIE60; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Voicecrying.com; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Voyager II; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; vtown v1.0; FunWebProducts; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo042NLPP01HCFFFFFFEC; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo042NLPP01HCFFFFFFFA; AtHome033)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.5)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.5; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.5; SV1),gzip(gfe) (via translate.google.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.5; Wanadoo 6.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.5; Wanadoo 6.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.5; Wanadoo 6.2; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.6; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 5.6; Wanadoo 6.1; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; i-NavFourF)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; i-NavFourF; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.1; Wanadoo 6.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo 6.2; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wanadoo Câble 5.6; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Was guckst du?; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WCCTA; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; weasel & chicken; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WebSpeedReader 8.7.4; Hotbar 4.5.1.0; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) WebWasherEE/3.4.1 3.4.1" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Westerville Public Library; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WestNet)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Weybridge; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WHCC/0.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WHCC/0.6; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WHCC/0.6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WHCC/0.6; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WHCC/0.6; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WHO Synergy II; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wile E. Coyote Build - ACME)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Windows XP SP2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Windows XP SP2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WinXP-SOE v3.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WODC; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .WONKZ)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wooohooooooooooooooooooooooooooo!; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; World Interactive Software)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; {World Online})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WRV)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; W&S; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; WWIEPlugin; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.amorosi4u.de.vu)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.ASPSimply.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.ASPSimply.com; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.ASPSimply.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.ASPSimply.com; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.ASPSimply.com; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.ASPSimply.com; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.Bertram-Engel.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.BERTRAM-ENGEL.com Webmaster; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.k2pdf.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.k2pdf.com; Compatible; Version; Platform)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.k2pdf.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.k2pdf.com; SV1; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.k2pdf.com; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.oxy-com.com; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.spambully.com)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.spambully.com; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; www.wbglinks.net)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wysigot 5.22; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Wysigot 5.4; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; X Channel Browser)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; XTM02b Beta 1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; XTM02b Beta 1; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; FunWebProducts; Hotbar 4.5.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; FunWebProducts-MyWay; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; FunWebProducts; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; Hotbar 4.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; Maxthon; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; .NET CLR 1.0.2914)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; Rogers Hi-Speed Internet; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; sbcydsl 3.11; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; sbcydsl 3.12; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; SEARCHALOT; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.0.0; yplus 3.01)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.4)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.4; AskBar 2.11)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.4; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.5; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; Feedreader)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; Hotbar 4.4.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.2.6; ntlworld v2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.8.6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.8.6; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YComp 5.0.8.6; SV1; yplus 1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; DVD Owner)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6)Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6_SBC)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6_SBCDSL; FunWebProducts; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6_SBCDSL; sbcydsl 3.12; YComp 5.0.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6_SBCDSL; sbcydsl 3.12; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6_SBC; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; sbcydsl 3.12; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6_SBC; YPC 3.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; SV1; (R1 1.5))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; YComp 5.0.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; YPC 3.0.3; (R1 1.3))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yie6; YPC 3.0.3; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; BT Openworld BB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; BTopenworld; yplus 4.3.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; FunWebProducts; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; SV1; (R1 1.1); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; SV1; yplus 4.0.00d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.0; yplus 4.3.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; FunWebProducts; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; FunWebProducts; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; Hotbar 4.4.2.0; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; NetCaptor 7.5.0 Gold)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.0.3705; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.0.3705; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; (R1 1.3); (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; (R1 1.5; yplus 4.1.00b))" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1; .NET CLR 1.0.3705; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; SV1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; yie6_SBC; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; BT Openworld BB)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; BT Openworld BB; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; BT Openworld BB; .NET CLR 1.1.4322; yplus 4.3.02d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; BT Openworld BB; SV1; yplus 4.3.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; BT Openworld BB; SV1; yplus 4.3.02d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; .NET CLR 1.0.3705; yplus 4.4.02d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; .NET CLR 1.1.4322; .NET CLR 1.0.3705; yplus 4.4.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; .NET CLR 1.1.4322; yplus 4.3.01b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; .NET CLR 1.1.4322; yplus 4.3.02b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; SV1; ESB{4146F2DC-3320-4F28-8906-D3591D69426E}; TheFreeDictionary.com; yie6-uk; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; SV1; yplus 4.3.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; SV1; yplus 4.3.02b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; yplus 4.3.02b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; yplus 4.3.02d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.2; yplus 4.4.01d)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; FunWebProducts; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; .NET CLR 1.1.4322; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; SV1; .NET CLR 1.0.3705; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; SV1; .NET CLR 1.1.4322; Hotbar 4.6.1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; SV1; .NET CLR 1.1.4322; yplus 4.0.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.0.3; SV1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.1.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.1.0; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.1.0; SV1; FunWebProducts)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.1.0; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.1.0; SV1; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.2.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; YPC 3.2.0; .NET CLR 1.0.3705; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; yplus 4.1.00b)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Z-HARPE)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Zurich North America; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; {2C2E9759-7422-4D75-89A2-9C0419FE3957}; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; {2D24C5F8-6342-4582-8057-099D1FBBF5EC}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; {4372BAAC-73EB-4BF5-9A5F-E4F106925C4E}; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; {61F2E4DF-60B7-4C8A-8BD9-98853FF61315}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; {85167A96-330B-4FA4-B250-90A9AA0F0FCF}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; {8D08774B-017A-4392-97D1-F9D354660A55}; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; ATLAS.SK_01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Data Center; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2;;) [de]" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Deepnet Explorer 1.3.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; demne is my dog)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; digit_may2002; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; EFW TSC2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Feedreader; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; FunWebProducts-MyWay; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; FunWebProducts-MyWay; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; FunWebProducts; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Glazenzaal; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; GruppoMPS; Maxthon; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; H; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; i-NavFourF; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Infowalker v1.01; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; iTreeSurf 3.6.1 (Build 056); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; LCC Internal User - 010; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; LCC Internal User - 014; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Maxthon; .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Maxthon; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Maxthon; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Maxthon; (R1 1.5); .NET CLR 1.1.4322)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Maxthon; SV1; Deepnet Explorer 1.3.2; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "Maxthon" - major: '0' - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Moneysupermarket.com Financial Group; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; MyIE2; iTreeSurf 3.6.1 (Build 056); .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; MyIE2; Maxthon; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; MyIE2; .NET CLR 1.1.4322)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; MyIE2; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "MyIE2" - major: "0" - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; NetCaptor 7.5.0 Gold; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; NetCaptor 7.5.1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; NetCaptor 7.5.3; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40420)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; FDM)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; MSIECrawler)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.40301)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.40419)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 1.1.4322; .NET CLR 2.0.41115)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; .NET CLR 2.0.31113;)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Poco 0.31; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Q312461; .NET CLR 1.0.3705; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Q321120; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; (R1 1.5); .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; (R1 1.5); .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SALT 1.0.0.0 1007 Developer; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; stumbleupon.com 1.923; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 1.0.3705; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; TencentTraveler ; .NET CLR 1.1.4322; Alexa Toolbar)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Weybridge; .NET CLR 1.1.4322; .NET CLR 2.0.40903)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; AMD64)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; x64; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; Win64; x64; SV1; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; WOW64; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; WOW64; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; www.ASPSimply.com; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 6.0; .NET CLR 1.2.30703)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT; MS Search 4.0 Robot)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows XP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible;MSIE 6.0; Windows XP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows XP Professional Bot v.5.)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows 2000)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible;MSIE 6.0; Windows 3.11)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible;MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.40607)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.2)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 8.3; )" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Windows XP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (compatible;MSIE 6.0;Windows XP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 [de] (compatible; MSIE 6.0; Windows 98)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 [en] (compatible; MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/6.0 (compatible; MSIE 6.0; Windows 3.11 For workgroups; {6BD3E7C1-0732-43E8-8828-291A709CC070})" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MSIE 6.0 (compatible; MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE 6.0 (compatible; MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE/6.0 (compatible; MSIE 6.0; Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE 6.0 (compatible; MSIE 6.0; Windows NT 5.1)/4.78 (TuringOS; Turing Machine; 0.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE 6.0)\" (MSIE 6.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE 6.0 (+MSIE 6.0; Windows NT 5.0; Q312461;; MSIE; Windows)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE 6.0 (Windows NT 5.1)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "MSIE/6.0 ( Windows NT 5.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MSIE/6.0 (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MSIE 6.0 (Win XP)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.01; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.02; Windows 98)" - family: "IE" - major: '6' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.3 (compatible; MSIE 6.2; Windows NT 6.0)" - family: "IE" - major: '6' - minor: '2' - patch: - - user_agent_string: "Mozilla/6.1 (compatible;MSIE 6.5; Windows 98)" - family: "IE" - major: '6' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 7.66; Windows NT 5.1; SV1)" - family: "IE" - major: '7' - minor: '66' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 7.66; Windows NT 5.1; SV1; .NET CLR 1.1.4322)" - family: "IE" - major: '7' - minor: '66' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 8.0; Windows 94)(2000/08/12-2000/08/24)" - family: "IE" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 1.0.3705)" - family: "IE" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 7.0a1; Windows NT 5.1; SV1; .NET CLR 1.1.4322; MS IdentiServ 1.4.12)" - family: "IE" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSXPLAYer2.014)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; MuscatFerret/1.6.3; claude@euroferret.com) via proxy gateway CERN-HTTPD/3.0 libwww/2.17" - family: "Other" - major: - minor: - patch: - - user_agent_string: "MVAClient" - family: "Other" - major: - minor: - patch: - - user_agent_string: "My Browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; NCSA_Mosaic; windows; SV1; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NCSA_Mosaic/2.6 (X11;IRIX 4.0.5F IP12)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01 (compatible; Netbox/3.5 R92.5; Linux 2.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01 (compatible; NetBox/3.5 R92.3; Linux 2.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01 (compatible; Netbox/3.5 R93rc3; Linux 2.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01 (compatible; Netgem/3.6.7; netbox; Linux 2.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ZoneSurf/2.4 (BeOS; U; BeOS 5.0 BePC; en-US; 0.8)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; NetPositive/2.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; NetPositive/2.2.1; BeOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; NetPositive/2.2.2; BeOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; NetPositive/2.2.3; FreeBSD 5.2.1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "netscape (compatible; netscape; linux; SV1; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Netscape 7.0; Windows 98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Netscape 7.0; Windows NT 4.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible;Netscape 7.1; Windows 98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Netscape 7.3R; Windows 92)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 Netscape 7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (Netscape 4.79; Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.5; Windows NT 5.0) Netscape 7.1" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Netscape 4.08; Windows 98; DigExt)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible;Netscape 4.76 Mozilla 1.4;Linux 2.6.7)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Netscape 7.0; Windows 98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Netscape Gecko/20040803" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows XP; en-US; rv:1.7.5) Netscape 7.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-CA; rv:0.9.4) Gecko/20011128 Netscape 7.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113 Netscape 7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040626 Netscape Navigator 4.x/4.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020921 BigBrother/Netscape6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/7.1 [en] (Windows NT 5.1; U)Netscape" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Navigator/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape 1.22 (Win16; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape 2.1 (compatible; MSIE 2.0B1; Windows for Workgroup 3.11; i386; en-US)" - family: "IE" - major: '2' - minor: '0' - patch: - - user_agent_string: "Netscape 4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 [en]C-WNS2.5 (Wim95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 [en] (Win2000; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 [en] (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 [en] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 [en] (X11; I; HP-UX B.10.20 9000/712)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 [en] (X11; I; SunOS 5.5.1 sun4m)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.04 (Linux i686; 1.7.3; Linux i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.05 [en] (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.05 [en] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.05 [fr] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.05 (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.06 [en] (Direct Hit Grabber)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.06 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.06 [en] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.06 [en] (X11; U; Linux 2.0.27 i586)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.06 (Macintosh; I; PPC, Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.06 (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.07C-SGI [en] (X11; I; IRIX 6.5 IP32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.07 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.07 [en] (X11; I; Linux 2.0.36 i586)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.07 (X11; I; Nav; Linux 5.1.33 i586; )" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (Win16; I ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (Win16; U ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en](Win95; U; Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (Win98; I ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (Win98; U ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (Windows 3.11; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (WinNT; I ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (WinNT; U ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [en] (X11; U; Linux 2.4.9-34 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 [fr] (Win95; I ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 (Macintosh; U; PPC, Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.08 (PDA; PalmOS/sony/model atom/Revision:2.0.22 (en)) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.08 (PDA; PalmOS/sony/model atom/Revision:2.0.26 (de)) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.08 (PDA; PalmOS/sony/model luke/Revision:2.0.22 (en)) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.08 (PDA; PalmOS/sony/model luke/Revision:2.0.26 (de)) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.08 (PDA; PalmOS/sony/model prmr/Revision:2.0.22 (en)) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.08 (PDA; Windows CE/1.0.0) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.08 (PPC; Windows CE/1.0.0) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.08 (SmartPhone; Symbian OS-Series60/1.03) NetFront/3.2" - family: "NetFront" - major: '3' - minor: '2' - patch: - - user_agent_string: "Mozilla/4.1 (BEOS; U ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.1 [ja] (X11; I; Linux 2.2.13-33cmc1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.41 (BEOS; U ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [de] (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en]C-AtHome0405 (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en]C-CCK-MCD snapN45b1 (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en]C-CCK-MCD (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en] (X11; I; Alpha 06; Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [en] (X11; I; IRIX64 6.5 IP30) Mozilla/4.08 [en] (Win95; I ;Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 [fr] (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 RPT-HTTPClient/0.3-2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 (Windows; U; Windows NT 5.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape/4.5 (WindowsNT;8-bit)" - family: "Netscape" - major: '4' - minor: '5' - patch: - - user_agent_string: "Netscape Navigator 4.5 (Windows; U; Windows NT 5.1; sl-SI; rv:1.4) Netscape/4.5" - family: "Netscape" - major: '4' - minor: '5' - patch: - - user_agent_string: "Mozilla/4.51C-ASML_1N06S [en] (X11; I; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.51 [de]C-CCK-MCD DT (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.51 [de]C-CCK-MCD FS SBS (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.51 [de]C-CCK-MCD QXW03200 (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.51 [de]C-CCK-MCD QXW03200 (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.51 [de] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.51 [en]C-CCK-MCD (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.51 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.6 [de]C-freenet 4.0 (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.6 [de] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.6 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [de] (OS/2; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en]C-CCK-MCD (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en]C-CCK-MCD (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en] (OS/2; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en] (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en] (X11; I; Linux 2.2.13-33cmc1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en] (X11; I; Linux 2.4.25 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [en] (X11; U; ) - BrowseX (2.0.0 Windows)" - family: "BrowseX" - major: '2' - minor: '0' - patch: '0' - - user_agent_string: "Mozilla/4.61 [en] (X11; U; FreeBSD 4.9-RC i386)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 [ja] (X11; I; Linux 2.2.13-33cmc1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.61 (X11; )" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7C-CCK-MCD [en] (X11; I; SunOS 5.6 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de]C-CCK-MCD 1&1 PureTec Edition 02/2000 (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de]C-CCK-MCD QXW0322a (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de]C-freenet 4.0 (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de]C-SYMPA (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de] (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [de] (X11; Linux)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en]C-CCK-MCD EBM-Compaq1 (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en]C-CCK-MCD NSCPCD47 (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en]C-SYMPA (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en-gb] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en, US, en_US] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (X11; I; AIX 4.2)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (X11; I; HP-UX B.10.20 9000/782)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (X11; I; Linux 2.6.4 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (X11; I; OSF1 V4.0 alpha)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (X11; I; SunOS 5.8 i86pc)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [en] (X11; I; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [fr]C-CCK-MCD C_ASPI_1_0 (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [fr] (WinNT; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [fr] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [ja] (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [ja] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 [ja] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (Macintosh; ppc)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (X11; Linux)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7x [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7x [en] (Win9x)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.71 [en]C-NECCK (Win95; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.71 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.71 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.72 [en] (Win95; I) WebWasher 3.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.72 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.72 [en] (Win98; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.72 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.72 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.72 [en] (X11; I; Linux 2.2.14 i586)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.72 (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73C-CCK-MCD VerizonDSL (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [de]C-CCK-MCD DT (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [de]C-CCK-MCD DT (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [de]C-CCK-MCD DT (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [de] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [en]C-SYMPA (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [en] (Windows NT 5.0; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.73 [en] (X11; U; Linux 2.2.19 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.74 [en]C-DIAL (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.74 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.74 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75C-CERN UNIX pcjinr02 45 [en] (X11; U; Linux 2.2.19-6.2.1.1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 compatible - Mozilla/5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [de]C-CCK-MCD DT (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [de]C-CCK-MCD QXW0325g (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [de] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en]C-CCK-MCD {C-UDP; VUT} (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en]C-CCK-MCD {Nokia} (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en]C-CCK-MCD (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en] (X11; U; Linux 2.2.16-22 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en] (X11; U; SunOS 5.6 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en] (X11; U; SunOS 5.7 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 [en] (X11; U; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.75 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 (000000000; 0; 000)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76C-SGI [en] (X11; I; IRIX 6.5 IP32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en]C-bls40 (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en]C-CCK-MCD cf476 (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en]C-CCK-MCD (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (PalmOS; U; WebPro/3.0; Palm-Arzl)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; FreeBSD 5.2-RC i386)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; HP-UX B.11.00 9000/785)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; Linux 2.2.18 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; Linux 2.4.16 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i586)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; Linux 2.4.2-2 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; OSF1 V5.1 alpha)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; SunOS 5.7 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; SunOS 5.8 i86pc)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; SunOS 5.8 sun4m)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 [en] (X11; U; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76iC-CCK-MCD [en_US] (X11; U; AIX 4.3)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 (Macintosh; I; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 (Macintosh; I; PPC; Incompatible my ass! What if I don't want your jerky, elitist, ugly-assed css crap? Screw you!)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.76 (X11; U; Linux 2.6.3 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 (BeOS; U; BeOS BePC; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77C-CCK-MCD {C-UDP; EBM-APPLE} (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [de] (X11; U; Linux 2.2.19-SMP i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en]C-SYMPAL (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en]C-SYMPAL (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (X11; U; AIX 4.3)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (X11; U; Linux 2.2.19-6.2.1 i586)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (X11; U; Linux 2.4.2-2 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (X11; U; Linux 2.4.24 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (X11; U; Linux 2.4.27-c800-1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (X11; U; Linux 2.4.9-34 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.77 [en] (X11; U; SunOS 5.7 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78C-br_XT_4_78 [en] (X11; U; SunOS 5.8 i86pc; Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78C-CCK-MCD [en] (X11; U; HP-UX B.10.26 9000/785)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78C-CCK-MCD vg_472 [en] (X11; U; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78C-ja [ja/Vine] (X11; U; Linux 2.4.22-0vl2.11 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [de]C-CCK-MCD DT (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [de] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [de] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [de] (X11; U; Linux 2.4.7-10 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (Win98; I) IBrowse/2.3 (MorphOS 1.4)" - family: "IBrowse" - major: '2' - minor: '3' - patch: - - user_agent_string: "Mozilla/4.78 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; AIX 4.3)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; Linux 2.2.13 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; Linux 2.4.16-4GB i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; Linux 2.4.7-10 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; Linux 2.4.8-26mdk i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; Linux 2.4.9-34 i686; Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; SunOS 5.9 i86pc)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [en] (X11; U; SunOS 5.9 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [ja] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [ja] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.78 [uk] (WinME; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79C-Boeing UNIX Kit [en] (X11; U; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79C-CCK-MCD [en] (X11; U; Linux 2.4.28-1-p4smp i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79C-CCK-MCD [en] (X11; U; SunOS 5.9 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79C-SGI [en] (X11; I; IRIX64 6.5 IP30)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79C-SGI [en] (X11; I; IRIX64 6.5 IP35)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79C-SGI [en] (X11; I; IRIX 6.5 IP32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [de] (X11; U; Linux 2.2.20 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en]C-CCK-MCD {UMUC/CCKUS} (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (WinNT; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; HP-UX B.11.00 9000/785)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; Linux 2.2.12 i386)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; Linux 2.4.18-3 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; Linux 2.4.2 i386)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; SunOS 5.8 sun4m)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; SunOS 5.8 sun4u; Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 [en] (X11; U; SunOS 5.9 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.79 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape 4.79" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 (AmigaOS 3.5; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8C-SGI [en] (X11; U; IRIX64 6.5 IP30)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8C-SGI [en] (X11; U; IRIX 6.5-ALPHA-1278921420 IP32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8C-SGI [en] (X11; U; IRIX 6.5 IP32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [de] (X11; U; Linux 2.6.4-52-default i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en]C-CCK-MCD EBM-Compaq (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en]C-CCK-MCD (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Linux; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (MSIE; Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Solaris)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Win3.11; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Win95; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Win98; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Windows NT 5.0; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (Windows NT 5.1; U) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (wouw)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.2.16-22 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.4.18-3smp i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.4.20-4GB i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.4.26 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.4.27-ow1 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.4.2 i386)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.4.2 i386; Nav)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; Linux 2.4.2 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [en] (X11; U; SunOS 5.8 sun4u)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [fr] (Windows NT 5.1; U)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 (Macintosh; U; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 [us] (X11; U; Linux 2.4.26 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.8 (Win)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.25 Netscape/5.0 (X11; U; IRIX 6.3 IP32)" - family: "Netscape" - major: '5' - minor: '0' - patch: - - user_agent_string: "Netscape/5.001 (windows; U; NT4.0; en-us) Gecko/25250101" - family: "Netscape" - major: '5' - minor: '001' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20001108 Netscape6/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; m18) Gecko/20001108 Netscape6/6.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en; rv:1.0) Netscape/6.0" - family: "Netscape" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20010131 Netscape6/6.01" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux 2.4.2-2 i586; en-US; m18) Gecko/20010131 Netscape6/6.01" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Linux 2.6.5) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:0.9.2) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1\"" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:7.01) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.6) Gecko/20040206 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US) Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; HP-UX 9000/785; en-US; rv:1.6) Gecko/20020604 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:0.9.2) Gecko/20011002 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.5 (Windows; U; Windows NT 5.1; en-US; rv:0.9.2) Gecko/20010726 Netscape6/6.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape 6.1 (X11; I; Linux 2.4.18 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; Netscape6/6.2.1; Macintosh; en-US)" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 Galeon/1.3.17 (X11; Linux i686; U;) Gecko/0-pie Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:0.9.4.1) Gecko/20020318 Netscape6/6.2.2" - family: "Netscape" - major: '6' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:0.9.4) Gecko/20011022 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:0.9.4) Gecko/20011130 Netscape6/6.2.1" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; fr-FR; rv:0.9.4) Gecko/20011130 Netscape6/6.2.1" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-CA; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:0.9.4) Gecko/20011019 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-CA; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 (CK-SillyDog)" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4) Gecko/20011022 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; mag1001; rv:0.9.4) Gecko/20011019 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 (ax)" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011019 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; pl-PL; rv:1.7.6) Gecko/20050309 Netscape/6.2" - family: "Netscape" - major: '6' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-DE; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2" - family: "Netscape" - major: '6' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT5.1; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4.1) Gecko/20020314 Netscape6/6.2.2" - family: "Netscape" - major: '6' - minor: '2' - patch: '2' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011022 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20011126 Netscape6/6.2.1" - family: "Netscape" - major: '6' - minor: '2' - patch: '1' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.4) Gecko/20020508 Netscape6/6.2.3" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv 1.3) Gecko/20030313 Netscape6/6.2.3_STRS" - family: "Netscape" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20011022 Netscape6/6.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape 6.2 (Macintosh; N; PPC; ja)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040803 Netscape6/6.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.5; Windows; NT 5.0) Netscape/7" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Netscape 7" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Netscape/7.0;)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-CA; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-CMIL)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (nscd2)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; mag0802; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.1) Gecko/20040823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-Friars!)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-LucentTPES)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-NGA)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-N_O_K_I_A)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020512 Netscape/7.0b1" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0rc2) Gecko/20020618 Netscape/7.0b1" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0 (BDP)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0 (BDP),gzip(gfe) (via translate.google.com)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-10527)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-4arcade)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-AAPT)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-FRS)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (CK-WICGR/MIT)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0 (OEM-HPQ-PRS1C03)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; es-ES; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; pt-BR; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.0 (NSEUPD V44 14.11.2003)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; AIX 000F384A4C00; en-US; rv:1.0.1) Gecko/20030213 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux 2.4.2-2 i586; en-US; m18) Gecko/20010131 Netscape7/7.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux-2.6.4-4GB i686; en-US; m18;) Gecko/20030624 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux; en-US; rv:1.0.1) Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc2) Gecko/20020513 Netscape/7.0b1" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4m; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020719 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.0.1) Gecko/20020921 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.4a) Gecko/20020920 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; fr-FR; rv:1.0.1) Gecko/20020920 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4u; ja-JP; rv:1.0.1) Gecko/20020920 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; SunOS sun4us; en-US; rv:1.0.1) Gecko/20020920 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/7.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "\"Netscape 7.0\"" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape/7.0" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Netscape/7.0 (BeOS 5; x86; NetServer; en-US) Gecko/20040604" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Netscape/7.0 [en] (Windows NT 5.1; U)" - family: "Netscape" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; ja-JP; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.01 (CK-FEL-IcD)" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 (CK-Disanet)" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01 (CK-N_O_K_I_A)" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.01 (ax) (CK-SillyDog)" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20021120 Netscape/7.01" - family: "Netscape" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; de-DE; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC; ja-JP; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US; rv1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-CA; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-GB; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (ax)" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (CK-SillyDog)" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (CK-DNJ702R1)" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7) Gecko/20040617 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; pt-BR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-CA; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (ax)" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (CK-MIT)" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02 (VAUSSU03)" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02 (CK-Ifremer)" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US) Netscape7/7.02" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i386; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; de-DE; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; fr-FR; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; ja-JP; rv:1.0.2) Gecko/20030208 Netscape/7.02" - family: "Netscape" - major: '7' - minor: '02' - patch: - - user_agent_string: "Netscape 7.02" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.5; Windows NT 5.0) Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; X11; U; SunOS 5.8 sun4u) Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.4) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Netscape7.1; Windows NT 5.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; rv:1.4; U) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:0.9.2) Gecko/20010726 Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; Localization; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010726 Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; PROMO)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) WebWasher 3.3" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; fr-FR; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (CK-UKL)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030603 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) (CK-SillyDog)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; PROMO)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 StumbleUpon/1.906 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040210 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.1) Gecko/20040707 Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:0.9.2) Gecko/20010726 Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; BDP)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; CDonDemand-Dom)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax) (CK-SillyDog)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax; PROMO)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Mozilla; Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041204 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.7) Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Mozilla/5.0 (Windows; U; Win98; en-US; Localization; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)/0.10 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 7.0; en-US; rv:1.7.3) Gecko/20040910 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; de-DE; rv:1.4) Gecko/20030619 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US) Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (CK-DNJ71R1)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.8a2) Gecko/20040527 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; fr-FR; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT; en-US; Localization; rv:1.4) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; Windows NT 5.1; .NET CLR) Gecko/20030624 Netscape/7.1 (ax)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686) Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.4) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.6) Gecko/20040418 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux-2.6.4-4GB i686; en-US; m18;) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 Netscape/7.1 (BDP)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040324 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; rv:1.7.3) Gecko/20040913 Netscape/7.1" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/7.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape7/7.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape/7.1 (compatible; Linux; X11; de_DE; U) [Firefox 0.8]" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Netscape/7.1 [de] (Windows NT 5.1; U)" - family: "Netscape" - major: '7' - minor: '1' - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 5.5; Windows NT 5.0; PPC Mac OS X; en-us) Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 [en] (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050204 Netscape/7.2 (PowerBook)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8b) Gecko/20050208 Netscape/7.2 (PowerBook)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Netscape/7.2e6/6.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (OpenBSD; en-US) Gecko/20030624 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; en-GB; rv:1.7.2) Gecko/20040804 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win95; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; Localization; rv:1.4) Gecko/20030624 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; nl-NL; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.2) Gecko/20010726 Netscape7/7.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) Mnenhy/0.6.0.104" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; sk-SK; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031007 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax [RLP])" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (Donzilla/0.2)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (Donzilla/0.6a)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (Donzilla/0.6a2)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 StumbleUpon/1.995 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040625 Netscape/7.2 (as)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040625 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.5) Gecko/20031007 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6 (Compatible with Netscape/7.2)) Gecko/20041027 Debian/1.6-5.1.0.45.lindows0.69" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040805 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041107 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050306 Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Netscape 7.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Netscape/7.2" - family: "Netscape" - major: '7' - minor: '2' - patch: - - user_agent_string: "Netscape 7.2 (X11; I; Linux 2.4.18 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.2) Gecko/20050208 Netscape/7.20" - family: "Netscape" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Netscape/7.3 (ax)" - family: "Netscape" - major: '7' - minor: '3' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.6) Gecko/20050225 Netscape/8.0" - family: "Netscape" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win98; en-US; Localization; rv1.4) Gecko20030624 Netscape7.1 (ax)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; NetVisualize b202)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/2.0 (compatible; NEWT ActiveX; Win32)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Nintendo64/1.0 (SuperMarioOS with Cray-II Y-MP Emulation)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Nintendo64/1.7 (SuperMarioOS with Sun 15K Y-MP Emulation)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NoctBrowser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Nokia 6600" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3100/1.0 (04.01) Profile/MIDP-1.0 Configuration/CLDC-1.0" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3200/1.0 (4.18) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3200/1.0 () Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3220/2.0 (03.30) Profile/MIDP-2.0 Configuration/CLDC-1.1 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3410" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3510i/1.0 (04.01) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3510i/1.0 (04.01) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.1.5a (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3510i/1.0 (04.44) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3510i/1.0 (05.30) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3650" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3650/1.0 (4.13) SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3650/1.0 (4.17) SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3650/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3650/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia3650/1.0 SymbianOS/6.1 Series60/1.2 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.7 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6010/1.0 (8.18) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6100" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6100/1.0 (05.16)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6100/1.0 (05.16) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/1.1 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6100/1.0 (05.16) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/mainline (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6600" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6600/1.0 (3.42.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6600/1.0 (3.42.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6600/1.0 (4.09.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6600/1.0 (4.09.1) SymbianOS/7.0s Series60/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6600/1.0 SymbianOS" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6610/1.0 (5.63) Profile/MIDP-1.0 Configuration/CLDC-1.0" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6610I/1.0 (3.10) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6610I/1.0 (3.10) Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Link/5.1.2.7 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6630" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6630/1.0 (3.45.113) SymbianOS/8.0 Series60/2.6 Profile/MIDP-2.0 Configuration/CLDC-1.1 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia6800" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia7250/1.0 (3.12) Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia7250/1.0 (3.14)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia7610/2.0 (3.0417.0ch) Symbian" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia7650" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "Nokia7650/1.0 SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0 (Google WAP Proxy/1.0)" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "NokiaN-Gage/1.0 (4.03) SymbianOS/6.1 Series60/0.9 Profile/MIDP-1.0 Configuration/CLDC-1.0" - family: "Nokia Services (WAP) Browser" - major: - minor: - patch: - - user_agent_string: "NP/0.1 (NP; http://www.nameprotect.com; npbot@nameprotect.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.01 (compatible; NPT 0.0 beta)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.01-beta (Nutch; http://www.nutch.org/docs/en/bot.html; nutch-agent@lists.sourceforge.net)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.03-dev (Nutch; http://www.nutch.org/docs/bot.html; nutch-agent@lists.sourceforge.net)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.03-dev (Nutch; http://www.nutch.org/docs/en/bot.html; nutch-agent@lists.sourceforge.net)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.06-dev (bot; http://www.nebel.de:8080/en/bot.html; nutch-agent@nebel.de)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.06-dev (bot; http://www.nebel.de/bot.html; nutch-agent@nebel.de)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.06-dev (Nutch; http://www.nutch.org/docs/en/bot.html; jagdeepssandhu@hotmail.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.06-dev (Nutch; http://www.nutch.org/docs/en/bot.html; nutch-agent@lists.sourceforge.net)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchCVS/0.06-dev (Nutch; http://www.s14g.com/en/search.html; travelbot@s14g.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NutchOSUOSL/0.05-dev (Nutch; http://www.nutch.org/docs/en/bot.html; nutch-agent@lists.sourceforge.net)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Nutscrape/1.0 (CP/M; 8-bit)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Nutscrape/9.0 (CP/M; 8-bit)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SEC-SGHC225-C225UVDH1-NW.Browser3.01 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "NWSpider 0.9" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ObjectsSearch/0.01 (ObjectsSearch; http://www.ObjectsSearch.com/bot.html; support@thesoftwareobjects.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ObjectsSearch/0.06 (ObjectsSearch; http://www.ObjectsSearch.com/bot.html; support@thesoftwareobjects.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ObjectsSearch/0.07 (ObjectsSearch; http://www.ObjectsSearch.com/bot.html; support@thesoftwareobjects.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (compatible; OffByOne; Windows 2000)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (compatible; OffByOne; Windows 2000) Webster Pro V3.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (compatible; OffByOne; Windows 2000) Webster Pro V3.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (compatible; OffByOne; Windows 98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (compatible; OffByOne; Windows 98) Webster Pro V3.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.7 (compatible; OffByOne; Windows NT 4.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.5 (compatible; OmniWeb/4.1.1-v423; Mac_PowerPC)" - family: "OmniWeb" - major: '4' - minor: '1' - patch: '1' - - user_agent_string: "Mozilla/4.5 (compatible; OmniWeb/4.3-v435; Mac_PowerPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Opera" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Opera/ (X11; Linux i686; U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (BeOS R4.5;US) Opera 3.60 [en]" - family: "Opera" - major: '3' - minor: '60' - patch: - - user_agent_string: "Mozilla/3.0 (Windows 3.10;US) Opera 3.62 [en]" - family: "Opera" - major: '3' - minor: '62' - patch: - - user_agent_string: "Mozilla/4.71 (Windows 3.10; US) Opera 3.62 [en]" - family: "Opera" - major: '3' - minor: '62' - patch: - - user_agent_string: "Mozilla/4.71 (Windows 3.10;US) Opera 3.62 [en]" - family: "Opera" - major: '3' - minor: '62' - patch: - - user_agent_string: "Mozilla/4.71 (Windows 98;US) Opera 3.62 [en]" - family: "Opera" - major: '3' - minor: '62' - patch: - - user_agent_string: "Mozilla/4.72 (Windows 98;US) Opera 4.0 Beta 3 [en]" - family: "Opera" - major: '4' - minor: '0' - patch: - - user_agent_string: "Opera/4.02 (Windows 98; U) [en]" - family: "Opera" - major: '4' - minor: '02' - patch: - - user_agent_string: "Opera/4.03 (Windows NT 4.0; U)" - family: "Opera" - major: '4' - minor: '03' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh;US;PPC) Opera 5.0 [en]" - family: "Opera" - major: '5' - minor: '0' - patch: - - user_agent_string: "Opera/5.01 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '5' - minor: '01' - patch: - - user_agent_string: "Opera/5.02 (alpha 06; AmigaOS) [en]" - family: "Opera" - major: '5' - minor: '02' - patch: - - user_agent_string: "Opera/5.02 (Windows 98; U) [en]" - family: "Opera" - major: '5' - minor: '02' - patch: - - user_agent_string: "Opera/5.02 (Windows 98; U) [en]" - family: "Opera" - major: '5' - minor: '02' - patch: - - user_agent_string: "Opera/5.02 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '5' - minor: '02' - patch: - - user_agent_string: "Opera/5.02 (X11; U; Linux i686; en-US)" - family: "Opera" - major: '5' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5.12 [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 5.12 [es]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 5.12 [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 5.12 [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 5.12 [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 5.1) Opera 5.12 [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 5.12 [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 5.12 [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Opera/5.12 (Windows 2000; U) [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Opera/5.12 (Windows 98; U) [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Opera/5.12 (Windows NT 4.0; U) [fr]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Opera/5.12 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '5' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.18-4GB i686) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.18-4 i686) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Linux) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC) Opera 6.0 [ja]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Symbian OS; Series 90) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 95) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows ME; U) Opera 6.0 [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Opera/6.00 (Windows 98; U) [en]" - family: "Opera" - major: '6' - minor: '00' - patch: - - user_agent_string: "Opera/6.0 (Macintosh; PPC Mac OS X; U) [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Opera/6.0 (Windows 2000; U) [de]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Opera/6.0 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Opera/6.0 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Opera/6.0 (Windows 98; U) [en]" - family: "Opera" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.01 [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.01 [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.01 [es]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 6.01 [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 6.01 [en] WebWasher 3.3" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.01 [de]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.01 [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.01 [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.01 [es]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.78 (Windows 2000; U) Opera 6.01 [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/5.0 (Windows XP; U) Opera 6.01 [en]\"" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Opera/6.01 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Opera/6.01 (Windows ME; U) [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Opera/6.01 (Windows XP; U) [en]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Opera/6.01 (Windows XP; U) [ru]" - family: "Opera" - major: '6' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.02 [en]" - family: "Opera" - major: '6' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS) Opera 6.02 [en]" - family: "Opera" - major: '6' - minor: '02' - patch: - - user_agent_string: "Mozilla/5.0 (Linux 2.4.26 i586; U) Opera 6.02 [en]" - family: "Opera" - major: '6' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.24 i686) Opera 6.03 [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Linux) Opera 6.03 [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.03 [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.03 [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Opera/6.03 (Linux 2.4.19-64GB-SMP i686; U) [de]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Opera/6.03 (Linux 2.4.19 i686; U) [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Opera/6.03 (OpenBSD 3.2 i386; U) [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Opera/6.03 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Opera/6.03 (Windows 98; U) [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Opera/6.03 (Windows ME; U) [ja]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Opera/6.03 (Windows XP; U) [en]" - family: "Opera" - major: '6' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.04 [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.04 [en-GB]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.04 [en-GB]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows ME) Opera 6.04 [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.04 [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 6.04 [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Opera/6.04 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Opera/6.04 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Opera/6.04 (Windows 2000; U) [en-GB]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Opera/6.04 (Windows 98; U) [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Opera/6.04 (Windows 98; U) [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Opera/6.04 (Windows 98; U) [en-GB]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Opera/6.04 (Windows XP; U) [en]" - family: "Opera" - major: '6' - minor: '04' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.05 [de]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.05 [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.05 [it]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.05 ~ [~ [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.05 [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.05 [es]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.05 OCV2 [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT 4.0) Opera 6.05 [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.05 [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.05 [hu]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 2000; U) Opera 6.05 [de]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/5.0 (Windows XP; U) Opera 6.05 [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Opera/6.05 (Windows 2000; U) [de]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Opera/6.05 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Opera/6.05 (Windows 98; U) [de]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Opera/6.05 (Windows 98; U) [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Opera/6.05 (Windows 98; U) [en] WebWasher 3.0" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Opera/6.05 (Windows XP; U) [de]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Opera/6.05 (Windows XP; U) [en]" - family: "Opera" - major: '6' - minor: '05' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.06 [de]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 2000) Opera 6.06 [en]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.06 [bg]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.06 [en]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98) Opera 6.06 [en] (www.proxomitron.de)" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Windows XP) Opera 6.06 [en]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 2000; U) Opera 6.06 [en]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Opera/6.06 (Windows 2000; U) [en]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Opera/6.06 (Windows 98; U) [de]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Opera/6.06 (Windows 98; U) [en]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Opera/6.06 (Windows 98; U) [en] (www.proxomitron.de)" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Opera/6.06 (Windows XP; U) [en]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Opera/6.06 (Windows XP; U) [ja]" - family: "Opera" - major: '6' - minor: '06' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.2 i386) Opera 6.1 [en]" - family: "Opera" - major: '6' - minor: '1' - patch: - - user_agent_string: "Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 6600;423) Opera 6.10 [de]" - family: "Opera" - major: '6' - minor: '10' - patch: - - user_agent_string: "Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 7650;424) Opera 6.10 [de]" - family: "Opera" - major: '6' - minor: '10' - patch: - - user_agent_string: "Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Series 60;424) Opera 6.10 [en]" - family: "Opera" - major: '6' - minor: '10' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; FreeBSD 4.4-RELEASE i386) Opera 6.11 [en]" - family: "Opera" - major: '6' - minor: '11' - patch: - - user_agent_string: "Mozilla/5.0 (UNIX; U) Opera 6.11 [en]" - family: "Opera" - major: '6' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; FreeBSD 5.3-RC2 i386) Opera 6.12 [en]" - family: "Opera" - major: '6' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; Linux 2.4.22 i686) Opera 6.12 [en]" - family: "Opera" - major: '6' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; UNIX) Opera 6.12 [en]" - family: "Opera" - major: '6' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.78 (FreeBSD 5.0-RELEASE-p7 i386; U) Opera 6.12 [en]" - family: "Opera" - major: '6' - minor: '12' - patch: - - user_agent_string: "Opera/6.12 (FreeBSD 4.8-RELEASE i386; U) [en]" - family: "Opera" - major: '6' - minor: '12' - patch: - - user_agent_string: "Opera/6.12 (UNIX; U) [en]" - family: "Opera" - major: '6' - minor: '12' - patch: - - user_agent_string: "Mozilla/4.1 (compatible; MSIE 5.0; Symbian OS; Nokia 6600;451) Opera 6.20 [en]" - family: "Opera" - major: '6' - minor: '20' - patch: - - user_agent_string: "Opera/7 (Windows 98; U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Opera/7.x (compatible; Konqueror/2.2.2; Linux 2.8.4-rc1; X11; i686)" - family: "Konqueror" - major: '2' - minor: '2' - patch: '2' - - user_agent_string: "Opera/7.x (Windows NT 5.1; U) [hr]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0(DDIPOCKET;KYOCERA/AH-K3001V/1.1.17.65.000000/0.1/C100) Opera 7.0" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows 2000) Opera 7.0 [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows 98) Opera 7.0 [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.0 [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.0 [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows XP) Opera 7.0 [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 Opera/7.0 (X11; U; Linux i686; de-DE; rv:1.6) Gecko/20040114" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 2000; U) Opera 7.0 [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Opera/7.00 (Windows NT 5.0; U)" - family: "Opera" - major: '7' - minor: '00' - patch: - - user_agent_string: "Opera/7.0 (Windows 2000; U) [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Opera/7.0 (Windows 2000; U) [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Opera/7.0 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows 98) Opera 7.01 [en]" - family: "Opera" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows 98) Opera 7.01 [ru]" - family: "Opera" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows ME) Opera 7.01 [en]" - family: "Opera" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.01 [en]" - family: "Opera" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]" - family: "Opera" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [ru]" - family: "Opera" - major: '7' - minor: '01' - patch: - - user_agent_string: "Opera/7.01 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '01' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows 98) Opera 7.02 [en]" - family: "Opera" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows ME) Opera 7.02 [en]" - family: "Opera" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.02 [en]" - family: "Opera" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.02 [en]" - family: "Opera" - major: '7' - minor: '02' - patch: - - user_agent_string: "Opera/7.02 Bork-edition (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '02' - patch: - - user_agent_string: "Opera/7.02 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '02' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows 98) Opera 7.03 [en]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.03 [en]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) Opera 7.03 [ja]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.03 [en]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.03 [ru]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Opera/7.03 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Opera/7.03 (Windows NT 5.0; U) [de]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Opera/7.03 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Opera/7.03 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Opera/7.03 (Windows NT 5.0; U) [nl]" - family: "Opera" - major: '7' - minor: '03' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.10 [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.10 [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.10 [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Opera/7.10 (Linux 2.4.20 i686; U) [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Opera/7.10 (Windows ME; U) [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Opera/7.10 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Opera/7.10 (Windows NT 5.0; U) [en] (www.proxomitron.de)" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Opera/7.10 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Opera/7.10 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '10' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Linux 2.4.18-bf2.4 i686) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Linux 2.4.20-8 i686) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Linux 2.4.26 i686) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Linux 2.4.2 i386) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Linux 2.6.6 i686) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.11 [es]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.11 [de]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.11 [es-ES]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.11 [pl]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.11 [ru]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/5.0 (Linux 2.4.20-openmosix-3 i686; U) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.11 [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Linux 2.4.18-xfs i686; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Linux 2.4.20-gentoo-r1 i686; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Linux 2.6.3-4mdk i686; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.0; U) [es]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.0; U) [it]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.0; U) [pl]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.0; U) [ru]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.1; U) [es]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Opera/7.11 (Windows NT 5.2; U) [en]" - family: "Opera" - major: '7' - minor: '11' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 95) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.20 [ja]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.20 [ru]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.20 [ja]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.20 [ru]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.20 [de]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.20 [sk]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.20 [ja]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.20 [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Opera/7.20 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Opera/7.20 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Opera/7.20 (Windows NT 5.1; U) [røv]" - family: "Opera" - major: '7' - minor: '20' - patch: - - user_agent_string: "Mozilla/3.0 (Windows 98; U) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.21 [pl]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.21 [fi]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.21 [de]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.21 [pl]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.21 [ru]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.21 [zh-cn]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i586) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.21 [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows 98; U) [de]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows NT 5.0; U) [it]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows NT 5.1; U) [fi]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Opera/7.21 (Windows NT 5.2; U) [en]" - family: "Opera" - major: '7' - minor: '21' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.22 [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.22 [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.22 [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.22 [fr]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.22 [pl]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.22 [de]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.22 [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.22 [es-ES]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.22 [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.22 [fr]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.22 [de]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Opera/7.22 (Windows NT 5.0; U) [de] WebWasher 3.3" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Opera/7.22 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Opera/7.22 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Opera/7.22 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Opera/7.22 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '22' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Linux) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.23 [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.23 [en-GB]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.23 [es-ES]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.23 [es-LA]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.23 [hu]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.23 [nl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.23 [en] WebWasher 3.3" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.23 [es-LA]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.23 [pl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.23 [ru]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.23 [fr]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [en-GB]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [es-ES]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [fr]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [it]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [ja]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [nb]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [pl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [ru]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.23 [sv]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [cs]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [en-GB]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [es-ES]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [es-LA]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [fr]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [it]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [ja]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [nb]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [nl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [pl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [pt-BR]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [ru]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [sv]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [zh-cn]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.23 [zh-tw] WebWasher 3.3" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.23 [pl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.23 [ru]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; FreeBSD i386) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.23 [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.23 [es-ES]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.23 [ru]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; SunOS sun4u) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; SunOS sun4u) Opera 7.23 [ja]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 4.0; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.0; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.78 (X11; FreeBSD i386; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Opera 7.23; Windows NT 5.1)" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 7.23 [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows ME; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.23 [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.23 [et]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (X11; FreeBSD i386; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.23 [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.23 [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (compatible; MSIE 6.0; X11; Linux i586) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Linux 2.4.24-ck1 i686; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows 98; U) [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows ME; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 4.0; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U)" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [en-GB]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [es-ES]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [es-LA]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [pl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [ru]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.0; U) [tr]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [cs]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [da]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [en-GB]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [es]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [es-LA]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [fi]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [fr]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [ja]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [ru]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [sv]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [tr]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.1; U) [zh-tw]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (Windows NT 5.2; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; FreeBSD i386; U) [bg]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; Linux i386; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; Linux i686; U) [de]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; Linux i686; U) [en-GB]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; Linux i686; U) [es-ES]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; Linux i686; U) [fi]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; Linux i686; U) [sv]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Opera/7.23 (X11; SunOS sun4u; U) [en]" - family: "Opera" - major: '7' - minor: '23' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Qt embedded; Linux armv5tel; 640x480) Opera 7.30 [en]" - family: "Opera" - major: '7' - minor: '30' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Opera 7.30; Irax)" - family: "Opera" - major: '7' - minor: '30' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.0; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/3.0 (X11; SunOS sun4u; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Mac_PowerPC) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 2000; Opera 7.50 [en])" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.50 [ru]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.50 [ru]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.50 [sv]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.50 [de]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.50 [IT]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.50 [pl]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.50 [ru]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.50 [de] (www.proxomitron.de)" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; FreeBSD i386) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.50 [es-ES]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; SunOS sun4u) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.78 (Windows 98; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.0; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/4.78 (X11; Linux i686; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.50 [ru]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.50 [ru]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/5.0 (X11; FreeBSD i386; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.50 [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.50 [es-LA]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Macintosh; U; PPC Mac OS X 10.3.3; en-US; rv:1.1 ) via HTTP/1.0 offshore.unitedbanks.org/" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows 95; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows 98; U) [en-US]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.0; U) [cs]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.0; U) [pl]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.0; U) [ru]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.1; U) [en-GB]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (Windows NT 5.2; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (X11; FreeBSD i386; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Opera/7.50 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '50' - patch: - - user_agent_string: "Mozilla/3.0 (X11; Linux i686; U) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.51 [cs]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.51 [ru]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; FreeBSD i386) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.51 [de]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux ppc) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.78 (X11; Linux i686; U) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/5.0 (Windows ME; U) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.51 [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Linux) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Mac_PowerPC; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows 95; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows 98; U) [de]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows ME; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows NT 4.0; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows NT 5.0; U) [de]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows NT 5.1; U) [fr]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (X11; Linux i686; U) [de]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (X11; Linux i686; U) [fi]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Opera/7.51 (X11; SunOS sun4u; U) [en]" - family: "Opera" - major: '7' - minor: '51' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.52 [pl]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.52 [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.52 [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.52 [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; FreeBSD i386) Opera 7.52 [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.52 [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/4.78 (X11; Linux i686; U) Opera 7.52 [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.52 [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Macintosh; PPC Mac OS X; U) [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.0; U) [en] WebWasher 3.3" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.1; U) [nb]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (Windows NT 5.2; U) [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Opera/7.52 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '52' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.53 [da]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.53 [ja]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.53 [de]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.53 [es-ES]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.53 [ja]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; FreeBSD i386) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.0; U) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.53 [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows NT 5.0; U) [de]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows NT 5.0; U) [ja]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows NT 5.1; U) [ja]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (Windows XP; U) [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Opera/7.53 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '53' - patch: - - user_agent_string: "Mozilla/3.0 (Windows 98; U) Opera 7.54 [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.0; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.1; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.1; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.1; U) Opera 7.54 [es-ES]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.1; U) Opera 7.54 [sv]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.1; U) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 95) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.54 [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.54 [fr]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.54 [nb]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.54 [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98) Opera 7.54u1 [nl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME) Opera 7.54u1 [hu]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [es-ES]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [fi]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [fr]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [IT]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [ja]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54 [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54u1 [fr]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) Opera 7.54u1 [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [bg]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [cs]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [da]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [de],gzip(gfe) (via translate.google.com)" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [es-ES]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [et]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [fi]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [fr]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [hu]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [it]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [IT]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [nb]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [nl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54 [pt-BR]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54u1 [ja]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.54u1 [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; FreeBSD i386) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; FreeBSD i386) Opera 7.54 [ru]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.54 [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686) Opera 7.54 [it]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; SunOS sun4u) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/4.78 (X11; Linux i686; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; PPC Mac OS X; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows 98; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows ME; U) Opera 7.54 [ja]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.54 [it]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.54u1 [en] WebWasher 3.0" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.54 [ca]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.54 [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.54 [sv]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.54u1 [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.54u1 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (X11; FreeBSD i386; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U) Opera 7.54 [fr]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux x86_64; U) Opera 7.54 [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Amiga) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (AmigaOS 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (FreeBSD; U)" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Linux 2.4.18-xfs i686; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Linux) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Macintosh; PPC Mac OS X; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera 7.54 (Macintosh; U; PPC Mac OS X v10.4 Tiger ) via HTTP/1.0 deep.space.star-travel.org/" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows 98; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows ME; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 4.0; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 4.0; U) [en] WebWasher 2.2.1" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.0; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.0; U) [ja]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.1; U) [hu]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.1; U) [ja]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.1; U) [pt-BR]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows NT 5.2; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54u1 (Windows; U)" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Unix; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows 95; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows 98; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows 98; U) [es-ES]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows 98; U) [hu]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows 98; U) [nl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows 98; U) [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows ME; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows ME; U) [es-ES]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 4.0; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 4.0; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 4.0; U) [es-ar]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [fi]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [fr]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U; have a nice day :) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U; have a nice day;) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [ja]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.0; U) [sv]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1)" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [cs]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [es-ES]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [fr]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [hu]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [it]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [IT]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [nb]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [nl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [ru]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows NT 5.1; U) [sv]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (Windows; U)" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; FreeBSD i386; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i386; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i586; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i686; U)" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i686; U) [cs]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i686; U) [de]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i686; U) [nl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i686; U) [pl]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; Linux i686; U) [sv]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; SunOS sun4u; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; SunOS sun4u; U) [en]" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Opera/7.54 (X11; U; Linux i686; fr-FR; rv:1.5)" - family: "Opera" - major: '7' - minor: '54' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.1; U) Opera 7.60 [de] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/3.0 (Windows NT 5.1; U) Opera 7.60 [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; en) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; en) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; es) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.60 [en]" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.60 [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1) Opera 7.60 [nl] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; pl) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686; en) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686; IT) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.60 [de] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.78 (Windows NT 5.1; U) Opera 7.60 [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U) Opera 7.60 [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U; pl) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U; en) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.60 [de] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U) Opera 7.60 [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U; pl) Opera 7.60" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera 7.60 (FreeBSD i686; U) [en] via HTTP/1.0 foot.fetish-expert.org/" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera 7.60 (Linux 2.4.10-4GB i686; U)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera 7.60 (Linux 2.4.8-26mdk i686; U) [en] FreeSurf tmfweb.nl v1.1 via HTTP/1.0 vienna.unitedworldcouncil.org/" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 preview 4 (Mac OS X 10.3)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows 98; U; pl)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera 7.60 (Windows NT 4.0; U) [en] via HTTP/1.0 l33t0-HaX0r.hiddenip.com/" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.0; U; en)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.0; U; ja)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.0; U; ja),gzip(gfe) (via translate.google.com)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.0; U; pl)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.1; U; de)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.1; U) [de] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.1; U; en)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.1; U) [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.1; U) [pl]" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.1; U) [pl] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.2; U; en)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.2; U) [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (Windows NT 5.2; U) [en] (IBM EVV/3.0/EAK01AG9/LE)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera 7.60 (X11; Linux i386; U) [en] via HTTP/1.0 evil-uncle.trojanchecker.com/" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (X11; Linux i686; U; en)" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Opera/7.60 (X11; Linux i686; U) [en]" - family: "Opera" - major: '7' - minor: '60' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Mac_PowerPC Mac OS X; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows 98; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows ME; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; de) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; en) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; cs) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; de) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; en) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; hu) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; en) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686; IT) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux i686; pl) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; X11; Linux ppc; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.0; U; ru) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/5.0 (Windows NT 5.1; U; en) Opera 8.00" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Mozilla/5.0 (X11; Linux i686; U; en) Opera 8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.00 (Windows 98; U; de)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.0; U)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.0; U; de)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.0; U; en)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.0; U; pl)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.1; U; bg)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.1; U; cs)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.1; U; de)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.1; U; en)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.1; U; es)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.1; U; Mockingbird)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows NT 5.2; U; en)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.00 (Windows; U)" - family: "Opera" - major: '8' - minor: '00' - patch: - - user_agent_string: "Opera/8.0 (Macintosh; PPC Mac OS X; U; en)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (Windows 98; U; en)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (Windows ME; U; en)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (Windows NT 5.0; U; en)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (Windows NT 5.1; U; de)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (Windows NT 5.1; U; en)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (Windows NT 5.1; U; pl)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (Windows NT 5.2; U; en)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (X11; Linux i686; U; en)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Opera/8.0 (X11; Linux i686; U; pt-BR)" - family: "Opera" - major: '8' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Opera 8.4; Windows ME; Maxthon; .NET CLR 1.1.4322)" - family: "Opera" - major: '8' - minor: '4' - patch: - - user_agent_string: "Operah" - family: "Other" - major: - minor: - patch: - - user_agent_string: "OZ Browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "P3P Client" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PenguinFear (compatible; windows ce;; Windows NT 5.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PHILIPS-Fisio311/2.1 UP/4.1.19m" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PHP/4.2.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PHP/4.2.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PhpDig/PHPDIG_VERSION (+http://www.phpdig.net/robot.php)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PHP version tracker" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (compatible; MSIE 6.0; Pike HTTP client) Pike/7.6.25" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "PinkSock/1.0 (eComStation 1.2; en-CA; rv:0.4.9) PinkSock/20040416" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PinkSock/1.1 [en] (X11; U; SunOS 5.9 i86)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PinkSock/1.2 [en_CA] (OpenBeOS 0.2 i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PinkSock/1.3 [en_CA] (X11; U; SunOS 5.10 i86)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PinkSock/1.4 [en_CA] (16-bit; U; DR-DOS 7.22)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "PinkSock/1.5 [en_CA] (X11R6.7.0; U; FreeBSD 4.10-RELEASE)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "pipeLiner/0.10 (PipeLine Spider; http://www.pipeline-search.com/webmaster.html)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "POE-Component-Client-HTTP/0.510 (perl; N; POE; en; rv:0.510)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Popdexter/1.0 (http://www.popdex.com/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "portalmmm/2.0_M341i(c10;TB)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Powermarks/3.5; Windows 95/98/2000/NT)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Privoxy/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Privoxy/3.0 (Anonymous)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Program Shareware 1.0.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Progressive Download" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Proxomitron (www.proxomitron.de)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "puf/0.93.2a (Linux 2.4.20-19.9; i686)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Python-urllib/1.15" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Python-urllib/2.0a1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Python-urllib/2.0a1, Dowser/0.26 (http://dowser.sourceforge.net)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Qarp-1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ReadAheadWebBrowserHost" - family: "Other" - major: - minor: - patch: - - user_agent_string: "RealDownload/4.0.0.40" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Reaper/2.07 (+http://www.sitesearch.ca/reaper)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "RPT-HTTPClient/0.3-3E" - family: "Other" - major: - minor: - patch: - - user_agent_string: "RT-browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SA/0.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Safari" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/01 (KHTML, like Gecko) Safari/01" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; cs-cz) AppleWebKit/103u (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/103u (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (macintosh; U; PPC mac OS X; en) AppleWebKit/103u (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/103u (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/103u (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-US) AppleWebKit/103u (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/103u (KHTML, like Gecko) Safari/100" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/103u (KHTML, like Gecko) Safari/100.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es-es) AppleWebKit/106.2 (KHTML, like Gecko) Safari/100.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Safari 1.2 (Macintosh; U; PPC Mac OS X; en-us)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/146.1 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/124 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/185 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/124 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-au) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es-es) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fi-fi) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; is-is) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/124 (KHTML, like Gecko) Safari/125.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; el-gr) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es-es) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.11" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; da-dk) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-at) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-au) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-au) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-ca) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-ca) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es-es) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es-es) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-ca) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; he-il) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; is-is) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; no-no) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; th-th) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; zh-tw) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; zh-tw) AppleWebKit/125.5.6 (KHTML, like Gecko) Safari/125.12" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (000000000; 0; 000 000 00 0; 00) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.2.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es-es) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; is-is) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ru-ru) AppleWebKit/125.2 (KHTML, like Gecko) Safari/125.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.4.2 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; is-is) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/125.5 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; no-no) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; pt-pt) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/125.4 (KHTML, like Gecko) Safari/125.9" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/175 (KHTML, like Gecko) Safari/1.3" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/146.1 (KHTML, like Gecko) Safari/146" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/146 (KHTML, like Gecko) Safari/146" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/146.1 (KHTML, like Gecko) Safari/146" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/146.1 (KHTML, like Gecko) Safari/146" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es) AppleWebKit/146.1 (KHTML, like Gecko) Safari/146" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/146.1 (KHTML, like Gecko) Safari/146" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/146.1 (KHTML, like Gecko) Safari/146" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/164 (KHTML, like Gecko) Safari/164" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/168 (KHTML, like Gecko) Safari/168" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/168 (KHTML, like Gecko) Safari/168" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/168 (KHTML, like Gecko) Safari/168" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/168 (KHTML, like Gecko) Safari/168" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/168 (KHTML, like Gecko) Safari/168" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/172 (KHTML, like Gecko) Safari/172" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/176 (KHTML, like Gecko) Safari/176" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/179 (KHTML, like Gecko) Safari/179" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/185 (KHTML, like Gecko) Safari/185" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/401 (KHTML, like Gecko) Safari/401" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/403 (KHTML, like Gecko) Safari/403" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/405 (KHTML, like Gecko) Safari/405" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/412 (KHTML, like Gecko) Safari/412" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/48 (like Gecko) Safari/48" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/64 (KHTML, like Gecko) Safari/64" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/73 (KHTML, like Gecko) Safari/73" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/85 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/85 (KHTML, like Gecko) Safari/85" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.5" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Windows; U; Win16; en-US; rv:1.7) Safari/85.5" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.6" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.6" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.6" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.6" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-au) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-gb) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; it-it) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sv-se) AppleWebKit/85.7 (KHTML, like Gecko) Safari/85.7" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; de-de) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-au) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/225 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; es) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; fr-fr) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-au) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; ja-jp) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; nl-nl) AppleWebKit/85.8.2 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; sa) AppleWebKit/85.8.5 (KHTML, like Gecko) Safari/85.8.1" - family: "Safari" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppeWebKit/XX (KHTML, like Gecko) Safari/YY" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/XX (KHTML, like Gecko) Safari/YY" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SafariBookmarkChecker/1.27 (+http://www.coriolis.ch/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.0; SaferSurf; DigExt)" - family: "IE" - major: '5' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.5; SaferSurf; DigExt)" - family: "IE" - major: '5' - minor: '5' - patch: - - user_agent_string: "Satan 666 (7th level of Hell)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "savvybot/0.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Search-Channel" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SecretBrowser/007" - family: "Other" - major: - minor: - patch: - - user_agent_string: "S.E.K Tron (AmigaOS; alpha/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "S.E.K Tron (AmigaOS; alpha/06; AmigaOS 3.5; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "S.E.K Tron (AmigaOS; alpha/06; AmigaOS; .NET CLR 1.1.4322)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "S.E.K Tron (AmigaOS; alpha/06; Win98)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "S.E.K-Tron Systems" - family: "Other" - major: - minor: - patch: - - user_agent_string: "S.E.K-Tron Systems(compatible; MSIE 6.0; Matrix; SEK-Tron Systems; Windows NT 5.0)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "SEK Tron (AmigaOS; alpha/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "S.E.K-Tron Systems(compatible; MSIE 6.0; Matrix; SEK-Tron Systems; AmigaOS)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "S.E.K-Tron Systems(SEK-Tron; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SHARP-TQ-GX10" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SHARP-TQ-GX30" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Shockwave Flash" - family: "Other" - major: - minor: - patch: - - user_agent_string: "ShowLinks/1.0 libwww/5.4.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SIE-S55/16" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Simpy/1.1 (Simpy; http://www.simpy.com/?ref=bot; feedback at simpy dot com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SISLink" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SiteBar/3.2.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 6.0; Slackware)" - family: "IE" - major: '6' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; SmartPhone; Symbian OS/1.1.0) NetFront/3.1" - family: "NetFront" - major: '3' - minor: '1' - patch: - - user_agent_string: "Smurf Power" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Snoopy v1.01" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Snowstorm/0.1.0 (windows; U; SnowStep0.6.0; en-us) Gecko/20201231" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Solar Conflict (www.solarconflict.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "sony ericsson" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonP800/" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonP900/" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonP900/ UP.Link/5.1.2.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT230/R101 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT306/R101 UP.Link/1.1 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT616" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SonyEricssonT68/R502 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Sopheus Project/0.01 (Nutch; http://www.thenetplanet.com; info@thenetplanet.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SpaceBison/0.01 [fu] (Win67; X; Lolzor)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SpaceBison/0.01 [fu] (Win67; X; ShonenKnife)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Space Bison/0.02 [fu] (Win67; X; SK)" - family: "Space Bison" - major: '0' - minor: '02' - patch: - - user_agent_string: "Space Bison/0.69 [fu] (Win72; incompatible)" - family: "Space Bison" - major: '0' - minor: '69' - patch: - - user_agent_string: "SpiderMan 3.0.1-2-11-111 (CP/M;8-bit)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SquidClamAV_Redirector 1.6" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Squid-Prefetch" - family: "Other" - major: - minor: - patch: - - user_agent_string: "StackRambler/2.0 (MSIE incompatible)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "StarDownloader/1.44" - family: "Other" - major: - minor: - patch: - - user_agent_string: "StarDownloader/1.52" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Steeler/2.0 (http://www.tkl.iis.u-tokyo.ac.jp/~crawler/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; SuperCleaner 2.81; Windows NT 5.1)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Supergrass (GNU/Windows; U) [sr]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SuperMarioBrowser/3.0 [en] (NintendoOS 0.4.27)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SuperMarioBrowser/3.0 (WarioOS; U; WarioWare 2.1.4; en-US)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "SymbianOS/6.1 Series60/1.2 Profile/MIDP-" - family: "Nokia OSS Browser" - major: '1' - minor: '2' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; Synapse)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Teleport Pro/1.29" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Teleport Pro/1.29.1590" - family: "Other" - major: - minor: - patch: - - user_agent_string: "TheBlacksheepbrowser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "theConcept/1.0 (Macintosh)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "theConcept/1.1 (Macintosh)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Toaster/2.0 (X11; U; BeOS i786; en, de; rv:7.8.9) Gecko/20250223 Toaster/2.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Tutorial Crawler 1.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "TygoProwler (http://www.tygo.com/)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "UP.Browser/3.1.02-SC01 UP.Link/5.0.2.9 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '3' - minor: '1' - patch: '02' - - user_agent_string: "OWG1 UP/4.1.20a UP.Browser/4.1.20a-XXXX UP.Link/5.1.2.12 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '4' - minor: '1' - patch: '20' - - user_agent_string: "QC2135 UP.Browser/4.1.22b UP.Link/4.2.1.8 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '4' - minor: '1' - patch: '22' - - user_agent_string: "MOT-85/01.04 UP.Browser/4.1.26m.737 UP.Link/5.1.2.12 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '4' - minor: '1' - patch: '26' - - user_agent_string: "MOT-A-0A/00.06 UP.Browser/4.1.27a1 UP.Link/4.2.3.5h" - family: "UP.Browser" - major: '4' - minor: '1' - patch: '27' - - user_agent_string: "MOT-A-2D/00.02 UP.Browser/4.1.27a1 UP.Link/5.1.2.12 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '4' - minor: '1' - patch: '27' - - user_agent_string: "MOT-A-86/00.00 UP.Browser/4.1.27a1 UP.Link/4.2.3.5h (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '4' - minor: '1' - patch: '27' - - user_agent_string: "MOT-A-86/00.00 UP.Browser/4.1.27a1 UP.Link/5.1.2.12 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '4' - minor: '1' - patch: '27' - - user_agent_string: "Motorola-T33/1.5.1a UP.Browser/5.0.1.7.c.2 (GUI) (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '5' - minor: '0' - patch: '1' - - user_agent_string: "Alcatel-BG3/1.0 UP.Browser/5.0.3.1.2 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '5' - minor: '0' - patch: '3' - - user_agent_string: "KDDI/CA23/UP. Browser/6.0.2.254 (GUI) MMP/1.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Panasonic-G60/1.0 UP.Browser/6.1.0.7 MMP/1.0 UP.Browser/6.1.0.7 (GUI) MMP/1.0 UP.Link/5.1.1a (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SAGEM-myX-5m/1.0 UP.Browser/6.1.0.6.1.c.3 (GUI) MMP/1.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SAMSUNG-SGH-E700/BSI UP.Browser/6.1.0.6 (GUI) MMP/1.0" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SAMSUNG-SGH-E700/BSI UP.Browser/6.1.0.6 (GUI) MMP/1.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SAMSUNG-SGH-E700-OLYMPIC2004/1.0 UP.Browser/6.1.0.6 (GUI) MMP/1.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SAMSUNG-SGH-X600/K3 UP.Browser/6.1.0.6 (GUI) MMP/1.0" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SIE-C60/12 UP.Browser/6.1.0.5.c.6 (GUI) MMP/1.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SIE-M55/11 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Browser/6.1.0.7.3 (GUI) MMP/1.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SIE-MC60/10 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Browser/6.1.0.7.3 (GUI) MMP/1.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SIE-MC60/10 Profile/MIDP-1.0 Configuration/CLDC-1.0 UP.Browser/6.1.0.7.3 (GUI) MMP/1.0 UP.Link/5.1.1.5a" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SIE-S55/11 UP.Browser/6.1.0.5.c.2 (GUI) MMP/1.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "SIE-S55/20 UP.Browser/6.1.0.5.c.6 (GUI) MMP/1.0 UP.Link/1.1 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "UP.Browser/6.1.0.1.140 (Google CHTML Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '1' - patch: '0' - - user_agent_string: "KDDI-HI32 UP.Browser/6.2.0.5 (GUI) MMP/2.0" - family: "UP.Browser" - major: '6' - minor: '2' - patch: '0' - - user_agent_string: "SHARP-TQ-GX20/1.0 UP.Browser/6.2.0.1.185 (GUI) MMP/2.0" - family: "UP.Browser" - major: '6' - minor: '2' - patch: '0' - - user_agent_string: "OPWV-SDK/62 UP.Browser/6.2.2.1.208 (GUI) MMP/2.0" - family: "UP.Browser" - major: '6' - minor: '2' - patch: '2' - - user_agent_string: "VM4050/132.037 UP.Browser/6.2.2.4.e.1.100 (GUI) MMP/2.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)" - family: "UP.Browser" - major: '6' - minor: '2' - patch: '2' - - user_agent_string: "LGE-VX7000/1.0 UP.Browser/6.2.3.1.174 (GUI) MMP/2.0 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '6' - minor: '2' - patch: '3' - - user_agent_string: "SIE-CX65/12 UP.Browser/7.0.0.1.c.3 (GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 (Google WAP Proxy/1.0)" - family: "UP.Browser" - major: '7' - minor: '0' - patch: '0' - - user_agent_string: "SIE-S65/25 UP.Browser/7.0.0.1.c.3 (GUI) MMP/2.0 Profile/MIDP-2.0 Configuration/CLDC-1.1" - family: "UP.Browser" - major: '7' - minor: '0' - patch: '0' - - user_agent_string: "SEC-SGHX427M UP.Link/1.1 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Uptimebot" - family: "Other" - major: - minor: - patch: - - user_agent_string: "UptimeBot" - family: "Other" - major: - minor: - patch: - - user_agent_string: "User-Agent: Mozilla/5.0 (Windows; U; Windows; de-DE; rv:1.7.5)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7b) Gecko/20040329" - family: "Other" - major: - minor: - patch: - - user_agent_string: "User-Agent: S.E.K Tron (AmigaOS; alpha/06; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Veczilla/0.35beta (X11; U; UNICOS/mk 21164a(EV5.6) Cray T3E; en-US; m18) Gecko/20020202 Netscape6/6.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Veczilla/0.35beta (X11; U; UNICOS/mk 21164a(EV5.6) Cray T3E; en-US; m18) Gecko/20040329" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/5.5 (compatible; Voyager; AmigaOS)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "W32/Trojan.Coced.226" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Emacs-W3/4.0pre.46 URL/p4.0pre.46 (i386-suse-linux; X11)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.3" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.3.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.3.1+cvs-1.411" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.3.1+cvs-1.414" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.3.2+mee-p24-19+moe-1.5.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.4.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.4.1-m17n-20030308" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.4.2" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.5" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.5+cvs-1.916" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.5 (FreeBSD),gzip(gfe) (via translate.google.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "w3m/0.5.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WannaBe (Macintosh; PPC)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Wap" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WAP" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Web Browser" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; WebCapture 2.0; Auto; Windows)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; WebCapture 2.0; Windows)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WebCatSv" - family: "Other" - major: - minor: - patch: - - user_agent_string: "webcollage/1.114" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WebForm 1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/6.0 (compatible; WebGod 9.1; Windows NT 6.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WebHopper" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 (compatible; WebMon 1.0.10; Windows 98 SE)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WebPix 1.0 (www.netwu.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WebRescuer v0.2.4" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WebStripper/2.20" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WebStripper/2.58" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/3.0 WebTV/1.2 (compatible; MSIE 2.0)" - family: "IE" - major: '2' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 4.0; WebTV/2.6)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 WebTV/2.6 (compatible; MSIE 4.0)" - family: "IE" - major: '4' - minor: '0' - patch: - - user_agent_string: "WebZIP/4.1 (http://www.spidersoft.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "wget 1.1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Wget/1.8.2 modified" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Wget/1.9+cvs-stable (Red Hat modified)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 5.00; Window 98)" - family: "IE" - major: '5' - minor: '00' - patch: - - user_agent_string: "WinHTTP Example/1.0" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WinWAP-PRO/3.1 (3.1.5.190) UP.Link/5.1.2.5 (Google WAP Proxy/1.0)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WM2003/1 (Windows CE 3.0; U) [en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WordPress/1.2.1 PHP/4.3.9-1" - family: "Other" - major: - minor: - patch: - - user_agent_string: "WorldWideWeb-X/3.2 (+Web Directory)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Wotbox/0.7-alpha (bot@wotbox.com; http://www.wotbox.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Wotbox/alpha0.6 (bot@wotbox.com; http://www.wotbox.com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "www.WebSearch.com.au" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 9.0b; Xbox-OS2) Obsidian" - family: "IE" - major: '9' - minor: '0' - patch: - - user_agent_string: "Mozilla/4.0 (compatible; MSIE 7.0b; Xbox-OS2) Obsidian" - family: "IE" - major: '7' - minor: '0' - patch: - - user_agent_string: "XBoX 64 (NVidea GForce 3 Architecture)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Xtreme Browser/0.14 (Linux; U) [i386-en]" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Yahoo-MMAudVid/1.0 (mms dash mmaudvidcrawler dash support at yahoo dash inc dot com)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "Yandex/1.01.001 (compatible; Win16; I)" - family: "Other" - major: - minor: - patch: - - user_agent_string: "YottaShopping_Bot/4.12 (+http://www.yottashopping.com) Shopping Search Engine" - family: "Other" - major: - minor: - patch: diff --git a/node_modules/karma/node_modules/useragent/test/fixtures/static.custom.yaml b/node_modules/karma/node_modules/useragent/test/fixtures/static.custom.yaml deleted file mode 100644 index bacf1a08..00000000 --- a/node_modules/karma/node_modules/useragent/test/fixtures/static.custom.yaml +++ /dev/null @@ -1,13 +0,0 @@ -test_cases: - - - user_agent_string: 'curl/7.12.1 (i686-redhat-linux-gnu) libcurl/7.12.1 OpenSSL/0.9.7a zlib/1.2.1.2 libidn/0.5.6' - family: 'cURL' - major: '7' - minor: '12' - patch: '1' - - - user_agent_string: 'Wget/1.10.1 (Red Hat modified)' - family: 'Wget' - major: '1' - minor: '10' - patch: '1' diff --git a/node_modules/karma/node_modules/useragent/test/fixtures/testcases.yaml b/node_modules/karma/node_modules/useragent/test/fixtures/testcases.yaml deleted file mode 100644 index d60c8863..00000000 --- a/node_modules/karma/node_modules/useragent/test/fixtures/testcases.yaml +++ /dev/null @@ -1,389 +0,0 @@ -test_cases: - - - user_agent_string: 'Mozilla/5.0 (X11i; Linux; C) AppleWebKikt/533.3 (KHTML, like Gecko) QtCarBrowser Safari/533.3' - family: 'QtCarBrowser' - major: '1' - minor: - patch: - - - user_agent_string: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_4) AppleWebKit/537.8+ (KHTML, like Gecko) Version/6.0 Safari/536.25' - family: 'WebKit Nightly' - major: '537' - minor: '8' - patch: - - - user_agent_string: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22' - family: 'WebKit Nightly' - major: '534' - minor: - patch: - - - user_agent_string: 'facebookexternalhit/1.1 (+http://www.facebook.com/externalhit_uatext.php)' - family: 'FacebookBot' - major: '1' - minor: '1' - patch: - - - user_agent_string: 'Pingdom.com_bot_version_1.4_(http://www.pingdom.com/)' - family: 'PingdomBot' - major: '1' - minor: '4' - patch: - - - user_agent_string: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22' - family: 'WebKit Nightly' - major: '534' - minor: - patch: - - - user_agent_string: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1+ (KHTML, like Gecko) Version/5.1.1 Safari/534.51.22' - family: 'WebKit Nightly' - major: '537' - minor: '1' - patch: - - - user_agent_string: 'Mozilla/5.0 (Linux x86_64) AppleWebKit/534.26+ WebKitGTK+/1.4.1 luakit/f3a2dbe' - family: 'LuaKit' - major: - minor: - patch: - - - user_agent_string: 'Mozilla/5.0 (X11; Linux x86_64; rv:2.0) Gecko/20110408 conkeror/0.9.3' - family: 'Conkeror' - major: '0' - minor: '9' - patch: '3' - - - user_agent_string: 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20110302 Conkeror/0.9.2 (Debian-0.9.2+git100804-1)' - family: 'Conkeror' - major: '0' - minor: '9' - patch: '2' - - - - user_agent_string: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110414 Lightning/1.0b3pre Thunderbird/3.1.10' - family: 'Lightning' - major: '1' - minor: '0' - patch: 'b3pre' - - - user_agent_string: 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 ThunderBrowse/3.3.5' - family: 'ThunderBrowse' - major: '3' - minor: '3' - patch: '5' - - - user_agent_string: 'Mozilla/5.0 (Windows; U; en-US) AppleWebKit/531.9 (KHTML, like Gecko) AdobeAIR/2.5.1' - family: 'AdobeAIR' - major: '2' - minor: '5' - patch: '1' - - - user_agent_string: 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)' - family: 'Googlebot' - major: '2' - minor: '1' - patch: - - - user_agent_string: 'Mozilla/5.0 YottaaMonitor;' - family: 'YottaaMonitor' - major: - minor: - patch: - - - user_agent_string: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) RockMelt/0.8.34.841 Chrome/6.0.472.63 Safari/534.3' - family: 'RockMelt' - major: '0' - minor: '8' - patch: '34' - - - user_agent_string: 'Mozilla/5.0 (X11; Linux x86_64; rv:2.0) Gecko/20110417 IceCat/4.0' - family: 'IceCat' - major: '4' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/5.0 (X11; U; Linux i686; nl-NL) AppleWebKit/534.3 (KHTML, like Gecko) WeTab-Browser Safari/534.3' - family: 'WeTab' - major: - minor: - patch: - - - user_agent_string: 'Mozilla/4.0 (compatible; Linux 2.6.10) NetFront/3.3 Kindle/1.0 (screen 600x800)' - family: 'Kindle' - major: '1' - minor: '0' - patch: - - - user_agent_string: 'Opera/9.80 (Android 3.2; Linux; Opera Tablet/ADR-1106291546; U; en) Presto/2.8.149 Version/11.10' - family: 'Opera Tablet' - major: '11' - minor: '10' - patch: - - - user_agent_string: 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) FireWeb/1.0.0.0' - family: 'FireWeb' - major: '1' - minor: '0' - patch: '0' - - - user_agent_string: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Comodo_Dragon/4.1.1.11 Chrome/4.1.249.1042 Safari/532.5' - family: 'Comodo Dragon' - major: '4' - minor: '1' - patch: '1' - - - user_agent_string: 'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_2 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8H7 Safari/6533.18.5' - family: 'Mobile Safari' - major: '5' - minor: '0' - patch: '2' - - - user_agent_string: 'Mozilla/5.0 (Linux; U; Android 3.0.1; en-us; GT-P7510 Build/HRI83) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13' - family: 'Android' - major: '3' - minor: '0' - patch: '1' - - - user_agent_string: 'Mozilla/5.0 (hp-tablet; Linux; hpwOS/3.0.0; U; en-US) AppleWebKit/534.6 (KHTML, like Gecko) wOSBrowser/233.58 Safari/534.6 TouchPad/1.0' - family: 'webOS TouchPad' - major: '1' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/4.0 (compatible; MSIE 7.0; Windows Phone OS 7.0; Trident/3.1; IEMobile/7.0; SAMSUNG; SGH-i917)' - family: 'IE Mobile' - major: '7' - minor: '0' - patch: - - - - user_agent_string: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_7; en-us) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Safari/530.17 Skyfire/2.0' - family: 'Skyfire' - major: '2' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/5.0 (PlayBook; U; RIM Tablet OS 1.0.0; en-US) AppleWebKit/534.8+ (KHTML, like Gecko) Version/0.0.1 Safari/534.8+' - family: 'Blackberry WebKit' - major: '1' - minor: '0' - patch: '0' - - - user_agent_string: 'Mozilla/5.0 (X11; U; Linux i686; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Ubuntu/10.10 Chromium/10.0.648.133 Chrome/10.0.648.133 Safari/534.16' - family: 'Chromium' - major: '10' - minor: '0' - patch: '648' - - - user_agent_string: 'Mozilla/5.0 (Windows NT 5.1; rv:2.0) Gecko/20110407 Firefox/4.0.3 PaleMoon/4.0.3' - family: 'Pale Moon (Firefox Variant)' - major: '4' - minor: '0' - patch: '3' - - - user_agent_string: 'Opera/9.80 (Series 60; Opera Mini/6.24455/25.677; U; fr) Presto/2.5.25 Version/10.54' - family: 'Opera Mini' - major: '6' - minor: '24455' - patch: - - - user_agent_string: 'Mozilla/5.0 (X11; Linux i686 (x86_64); rv:2.0b4) Gecko/20100818 Firefox/4.0b4' - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: 'b4' - - - user_agent_string: 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12' - family: 'Firefox' - major: '3' - minor: '6' - patch: '12' - - - user_agent_string: 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.1pre) Gecko/20090717 Ubuntu/9.04 (jaunty) Shiretoko/3.5.1pre' - family: 'Firefox (Shiretoko)' - major: '3' - minor: '5' - patch: '1pre' - - - user_agent_string: 'Mozilla/5.0 (X11; Linux x86_64; rv:2.0b8pre) Gecko/20101031 Firefox-4.0/4.0b8pre' - family: 'Firefox Beta' - major: '4' - minor: '0' - patch: 'b8pre' - - - user_agent_string: 'Mozilla/5.0 (X11; U; BSD Four; en-US) AppleWebKit/533.3 (KHTML, like Gecko) rekonq Safari/533.3' - family: 'Rekonq' - major: - minor: - patch: - - - user_agent_string: 'Mozilla/5.0 (X11; Linux i686) AppleWebKit/534.34 (KHTML, like Gecko) rekonq/1.0 Safari/534.34' - family: 'Rekonq' - major: '1' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/5.0 (X11; U; Linux; de-DE) AppleWebKit/527 (KHTML, like Gecko, Safari/419.3) konqueror/4.3.1' - family: 'Konqueror' - major: '4' - minor: '3' - patch: '1' - - - user_agent_string: 'SomethingWeNeverKnewExisted' - family: 'Other' - major: - minor: - patch: - - - user_agent_string: 'Midori/0.2 (X11; Linux; U; en-us) WebKit/531.2 ' - family: 'Midori' - major: '0' - minor: '2' - patch: - - - user_agent_string: 'Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a1) Gecko/20100208 MozillaDeveloperPreview/3.7a1 (.NET CLR 3.5.30729)' - family: 'MozillaDeveloperPreview' - major: '3' - minor: '7' - patch: 'a1' - - - user_agent_string: 'Opera/9.80 (Windows NT 5.1; U; ru) Presto/2.5.24 Version/10.53' - family: 'Opera' - major: '10' - minor: '53' - patch: - - - user_agent_string: 'Opera/9.80 (S60; SymbOS; Opera Mobi/275; U; es-ES) Presto/2.4.13 Version/10.00' - family: 'Opera Mobile' - major: '10' - minor: '00' - patch: - - - user_agent_string: 'Mozilla/5.0 (webOS/1.2; U; en-US) AppleWebKit/525.27.1 (KHTML, like Gecko) Version/1.0 Safari/525.27.1 Desktop/1.0' - family: 'webOSBrowser' - major: '1' - minor: '2' - patch: - - - user_agent_string: 'Mozilla/5.0 (iPad; U; CPU OS 3_2 like Mac OS X; en-us) AppleWebKit/531.21.10 (KHTML, like Gecko) Version/4.0.4 Mobile/7B367 Safari/531.21.10' - family: 'Mobile Safari' - major: '4' - minor: '0' - patch: '4' - - - user_agent_string: 'Mozilla/5.0 (SAMSUNG; SAMSUNG-GT-S8500/S8500XXJEE; U; Bada/1.0; nl-nl) AppleWebKit/533.1 (KHTML, like Gecko) Dolfin/2.0 Mobile WVGA SMM-MMS/1.2.0 OPN-B' - family: 'Dolfin' - major: '2' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; BOLT/2.101) AppleWebKit/530 (KHTML, like Gecko) Version/4.0 Safari/530.17' - family: 'BOLT' - major: '2' - minor: '101' - patch: - - # Safari - - user_agent_string: 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/418.8 (KHTML, like Gecko) Safari/419.3' - family: 'Safari' - major: - minor: - patch: - - - user_agent_string: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_5; en-us) AppleWebKit/533.18.1 (KHTML, like Gecko) Version/5.0.2 Safari/533.18.5' - family: 'Safari' - major: '5' - minor: '0' - patch: '2' - - # BlackBerry devices - - user_agent_string: 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en-GB) AppleWebKit/534.1+ (KHTML, like Gecko) Version/6.0.0.141 Mobile Safari/534.1+' - family: 'Blackberry WebKit' - major: '6' - minor: '0' - patch: '0' - - - user_agent_string: 'Mozilla/5.0 (BlackBerry; U; BlackBerry 9800; en-US) AppleWebKit/534.1 (KHTML, like Gecko) Version/6.0.0.91 Mobile Safari/534.1 ' - family: 'Blackberry WebKit' - major: '6' - minor: '0' - patch: '0' - - # Chrome frame - - user_agent_string: 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; Sleipnir 2.8.5)3.0.30729)' - js_ua: "{'js_user_agent_string': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.169.1 Safari/530.1'}" - family: 'Chrome Frame (Sleipnir 2)' - major: '2' - minor: '0' - patch: '169' - - - user_agent_string: 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; chromeframe; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729)' - js_ua: "{'js_user_agent_string': 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.169.1 Safari/530.1'}" - family: 'Chrome Frame (IE 8)' - major: '2' - minor: '0' - patch: '169' - - # Chrome Frame installed but not enabled - - user_agent_string: 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; chromeframe; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)' - js_ua: "{'js_user_agent_string': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)'}" - family: 'IE' - major: '8' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB6; .NET CLR 2.0.50727; .NET CLR 1.1.4322)' - js_ua: "{'js_user_agent_string': 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 1.1.4322)', 'js_user_agent_family': 'IE Platform Preview', 'js_user_agent_v1': '9', 'js_user_agent_v2': '0', 'js_user_agent_v3': '1'}" - family: 'IE Platform Preview' - major: '9' - minor: '0' - patch: '1' - - - user_agent_string: 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_3; en-us; Silk/1.1.0-80) AppleWebKit/533.16 (KHTML, like Gecko) Version/5.0 Safari/533.16 Silk-Accelerated=true' - family: 'Silk' - major: '1' - minor: '1' - patch: '0-80' - -# - user_agent_string: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; XBLWP7; ZuneWP7)' -# family: 'IE Mobile' -# major: '9' -# minor: '0' -# patch: - - - user_agent_string: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; SGH-i917)' - family: 'IE Mobile' - major: '9' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/5.0 (compatible; MSIE 9.0; Windows Phone OS 7.5; Trident/5.0; IEMobile/9.0; SAMSUNG; SGH-i917)' - family: 'IE Mobile' - major: '9' - minor: '0' - patch: - - - user_agent_string: 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; chromeframe/11.0.660.0)' - family: 'Chrome Frame' - major: '11' - minor: '0' - patch: '660' - - - user_agent_string: 'PyAMF/0.6.1' - family: 'PyAMF' - major: '0' - minor: '6' - patch: '1' - - - user_agent_string: 'python-requests/0.14 CPython/2.6 Linux/2.6-43-server' - family: 'Python Requests' - major: '0' - minor: '14' - patch: - - - user_agent_string: 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; ARM; Trident/6.0)' - family: 'IE' - major: '10' - minor: '0' - patch: diff --git a/node_modules/karma/node_modules/useragent/test/mocha.opts b/node_modules/karma/node_modules/useragent/test/mocha.opts deleted file mode 100644 index bf0875dd..00000000 --- a/node_modules/karma/node_modules/useragent/test/mocha.opts +++ /dev/null @@ -1,4 +0,0 @@ ---reporter spec ---ui bdd ---require should ---growl diff --git a/node_modules/karma/node_modules/useragent/test/parser.qa.js b/node_modules/karma/node_modules/useragent/test/parser.qa.js deleted file mode 100644 index fda5434a..00000000 --- a/node_modules/karma/node_modules/useragent/test/parser.qa.js +++ /dev/null @@ -1,45 +0,0 @@ -var useragent = require('../') - , should = require('should') - , yaml = require('yamlparser') - , fs = require('fs'); - -// run over the testcases, some might fail, some might not. This is just qu -// test to see if we can parse without errors, and with a reasonable amount -// of errors. -[ - 'testcases.yaml' - , 'static.custom.yaml' - , 'firefoxes.yaml' - , 'pgts.yaml' -].forEach(function (filename) { - var testcases = fs.readFileSync(__dirname +'/fixtures/' + filename).toString() - , parsedyaml = yaml.eval(testcases); - - testcases = parsedyaml.test_cases; - testcases.forEach(function (test) { - // we are unable to parse these tests atm because invalid JSON is used to - // store the useragents - if (typeof test.user_agent_string !== 'string') return; - - // these tests suck as the test files are broken, enable this to have about - // 40 more failing tests - if (test.family.match(/googlebot|avant/i)) return; - - // attempt to parse the shizzle js based stuff - var js_ua; - if (test.js_ua) { - js_ua = (Function('return ' + test.js_ua)()).js_user_agent_string; - } - - exports[filename + ': ' + test.user_agent_string] = function () { - var agent = useragent.parse(test.user_agent_string, js_ua); - - agent.family.should.equal(test.family); - // we need to test if v1 is a string, because the yamlparser transforms - // empty v1: statements to {} - agent.major.should.equal(typeof test.major == 'string' ? test.major : '0'); - agent.minor.should.equal(typeof test.minor == 'string' ? test.minor : '0'); - agent.patch.should.equal(typeof test.patch == 'string' ? test.patch : '0'); - } - }); -}); diff --git a/node_modules/karma/node_modules/useragent/test/parser.test.js b/node_modules/karma/node_modules/useragent/test/parser.test.js deleted file mode 100644 index ab6473fe..00000000 --- a/node_modules/karma/node_modules/useragent/test/parser.test.js +++ /dev/null @@ -1,214 +0,0 @@ -describe('useragent', function () { - 'use strict'; - - var useragent = require('../') - , ua = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.24 Safari/535.2"; - - it('should expose the current version number', function () { - useragent.version.should.match(/^\d+\.\d+\.\d+$/); - }); - - it('should expose the Agent interface', function () { - useragent.Agent.should.be.a('function'); - }); - - it('should expose the OperatingSystem interface', function () { - useragent.OperatingSystem.should.be.a('function'); - }); - - it('should expose the Device interface', function () { - useragent.Device.should.be.a('function'); - }); - - it('should expose the dictionary lookup', function () { - useragent.lookup.should.be.a('function'); - }); - - it('should expose the parser', function () { - useragent.parse.should.be.a('function'); - }); - - it('should expose the useragent tester', function () { - useragent.is.should.be.a('function'); - }); - - describe('#parse', function () { - it('correctly transforms everything to the correct instances', function () { - var agent = useragent.parse(ua); - - agent.should.be.an.instanceOf(useragent.Agent); - agent.os.should.be.an.instanceOf(useragent.OperatingSystem); - agent.device.should.be.an.instanceOf(useragent.Device); - }); - - it('correctly parsers the operating system', function () { - var os = useragent.parse(ua).os; - - os.toString().should.equal('Mac OS X 10.7.1'); - os.toVersion().should.equal('10.7.1'); - JSON.stringify(os).should.equal('{"family":"Mac OS X","major":"10","minor":"7","patch":"1"}'); - - os.major.should.equal('10'); - os.minor.should.equal('7'); - os.patch.should.equal('1'); - }); - - it('should not throw errors when no useragent is given', function () { - var agent = useragent.parse(); - - agent.family.should.equal('Other'); - agent.major.should.equal('0'); - agent.minor.should.equal('0'); - agent.patch.should.equal('0'); - - agent.os.toString().should.equal('Other'); - agent.toVersion().should.equal('0.0.0'); - agent.toString().should.equal('Other 0.0.0 / Other'); - agent.toAgent().should.equal('Other 0.0.0'); - JSON.stringify(agent).should.equal('{"family":"Other","major":"0","minor":"0","patch":"0","device":{"family":"Other"},"os":{"family":"Other"}}'); - }); - - it('should not throw errors on empty strings and default to unkown', function () { - var agent = useragent.parse(''); - - agent.family.should.equal('Other'); - agent.major.should.equal('0'); - agent.minor.should.equal('0'); - agent.patch.should.equal('0'); - - agent.os.toString().should.equal('Other'); - agent.toVersion().should.equal('0.0.0'); - agent.toString().should.equal('Other 0.0.0 / Other'); - agent.toAgent().should.equal('Other 0.0.0'); - JSON.stringify(agent).should.equal('{"family":"Other","major":"0","minor":"0","patch":"0","device":{"family":"Other"},"os":{"family":"Other"}}'); - }); - - it('should correctly parse chromes user agent', function () { - var agent = useragent.parse(ua); - - agent.family.should.equal('Chrome'); - agent.major.should.equal('15'); - agent.minor.should.equal('0'); - agent.patch.should.equal('874'); - - agent.os.toString().should.equal('Mac OS X 10.7.1'); - agent.toVersion().should.equal('15.0.874'); - agent.toString().should.equal('Chrome 15.0.874 / Mac OS X 10.7.1'); - agent.toAgent().should.equal('Chrome 15.0.874'); - JSON.stringify(agent).should.equal('{"family":"Chrome","major":"15","minor":"0","patch":"874","device":{"family":"Other"},"os":{"family":"Mac OS X","major":"10","minor":"7","patch":"1"}}'); - }); - }); - - describe('#fromJSON', function () { - it('should re-generate the Agent instance', function () { - var agent = useragent.parse(ua) - , string = JSON.stringify(agent) - , agent2 = useragent.fromJSON(string); - - agent2.family.should.equal(agent.family); - agent2.major.should.equal(agent.major); - agent2.minor.should.equal(agent.minor); - agent2.patch.should.equal(agent.patch); - - agent2.device.family.should.equal(agent.device.family); - - agent2.os.family.should.equal(agent.os.family); - agent2.os.major.should.equal(agent.os.major); - agent2.os.minor.should.equal(agent.os.minor); - agent2.os.patch.should.equal(agent.os.patch); - }); - - it('should also work with legacy JSON', function () { - var agent = useragent.fromJSON('{"family":"Chrome","major":"15","minor":"0","patch":"874","os":"Mac OS X"}'); - - agent.family.should.equal('Chrome'); - agent.major.should.equal('15'); - agent.minor.should.equal('0'); - agent.patch.should.equal('874'); - - agent.device.family.should.equal('Other'); - - agent.os.family.should.equal('Mac OS X'); - }); - }); - - describe('#is', function () { - var chrome = ua - , firefox = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20100101 Firefox/8.0' - , ie = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; yie8)' - , opera = 'Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; de) Opera 11.51' - , safari = 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; da-dk) AppleWebKit/533.21.1 (KHTML, like Gecko) Version/5.0.5 Safari/533.21.1' - , ipod = 'Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; ja-jp) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5'; - - it('should not throw errors when called without arguments', function () { - useragent.is(); - useragent.is(''); - }); - - it('should correctly detect google chrome', function () { - useragent.is(chrome).chrome.should.equal(true); - useragent.is(chrome).webkit.should.equal(true); - useragent.is(chrome).safari.should.equal(false); - useragent.is(chrome).firefox.should.equal(false); - useragent.is(chrome).mozilla.should.equal(false); - useragent.is(chrome).ie.should.equal(false); - useragent.is(chrome).opera.should.equal(false); - useragent.is(chrome).mobile_safari.should.equal(false); - }); - - it('should correctly detect firefox', function () { - useragent.is(firefox).chrome.should.equal(false); - useragent.is(firefox).webkit.should.equal(false); - useragent.is(firefox).safari.should.equal(false); - useragent.is(firefox).firefox.should.equal(true); - useragent.is(firefox).mozilla.should.equal(true); - useragent.is(firefox).ie.should.equal(false); - useragent.is(firefox).opera.should.equal(false); - useragent.is(firefox).mobile_safari.should.equal(false); - }); - - it('should correctly detect internet explorer', function () { - useragent.is(ie).chrome.should.equal(false); - useragent.is(ie).webkit.should.equal(false); - useragent.is(ie).safari.should.equal(false); - useragent.is(ie).firefox.should.equal(false); - useragent.is(ie).mozilla.should.equal(false); - useragent.is(ie).ie.should.equal(true); - useragent.is(ie).opera.should.equal(false); - useragent.is(ie).mobile_safari.should.equal(false); - }); - - it('should correctly detect opera', function () { - useragent.is(opera).chrome.should.equal(false); - useragent.is(opera).webkit.should.equal(false); - useragent.is(opera).safari.should.equal(false); - useragent.is(opera).firefox.should.equal(false); - useragent.is(opera).mozilla.should.equal(false); - useragent.is(opera).ie.should.equal(false); - useragent.is(opera).opera.should.equal(true); - useragent.is(opera).mobile_safari.should.equal(false); - }); - - it('should correctly detect safari', function () { - useragent.is(safari).chrome.should.equal(false); - useragent.is(safari).webkit.should.equal(true); - useragent.is(safari).safari.should.equal(true); - useragent.is(safari).firefox.should.equal(false); - useragent.is(safari).mozilla.should.equal(false); - useragent.is(safari).ie.should.equal(false); - useragent.is(safari).opera.should.equal(false); - useragent.is(safari).mobile_safari.should.equal(false); - }); - - it('should correctly detect safari-mobile', function () { - useragent.is(ipod).chrome.should.equal(false); - useragent.is(ipod).webkit.should.equal(true); - useragent.is(ipod).safari.should.equal(true); - useragent.is(ipod).firefox.should.equal(false); - useragent.is(ipod).mozilla.should.equal(false); - useragent.is(ipod).ie.should.equal(false); - useragent.is(ipod).opera.should.equal(false); - useragent.is(ipod).mobile_safari.should.equal(true); - }); - }); -}); diff --git a/node_modules/karma/package.json b/node_modules/karma/package.json deleted file mode 100644 index 8e8af9bb..00000000 --- a/node_modules/karma/package.json +++ /dev/null @@ -1,392 +0,0 @@ -{ - "name": "karma", - "description": "Spectacular Test Runner for JavaScript.", - "homepage": "http://karma-runner.github.io/", - "repository": { - "type": "git", - "url": "git://github.com/karma-runner/karma.git" - }, - "bugs": { - "url": "https://github.com/karma-runner/karma/issues" - }, - "keywords": [ - "karma", - "spectacular", - "runner", - "karma", - "js", - "javascript", - "testing", - "test", - "remote", - "execution" - ], - "author": { - "name": "Vojta Jína", - "email": "vojta.jina@gmail.com" - }, - "contributors": [ - { - "name": "Friedel Ziegelmayer", - "email": "friedel.ziegelmayer@gmail.com" - }, - { - "name": "taichi", - "email": "ryushi@gmail.com" - }, - { - "name": "Liam Newman", - "email": "bitwiseman@gmail.com" - }, - { - "name": "Shyam Seshadri", - "email": "shyamseshadri@gmail.com" - }, - { - "name": "Kim Joar Bekkelund", - "email": "kjbekkelund@gmail.com" - }, - { - "name": "Tim Cuthbertson", - "email": "tim@gfxmonk.net" - }, - { - "name": "Andrew Martin", - "email": "sublimino@gmail.com" - }, - { - "name": "Daniel Aleksandersen", - "email": "code@daniel.priv.no" - }, - { - "name": "Ilya Volodin", - "email": "ivolodin@vistaprint.com" - }, - { - "name": "Iristyle", - "email": "Iristyle@github" - }, - { - "name": "Marcello Nuccio", - "email": "marcello.nuccio@gmail.com" - }, - { - "name": "pavelgj", - "email": "pavelgj@gmail.com" - }, - { - "name": "Bulat Shakirzyanov", - "email": "mallluhuct@gmail.com" - }, - { - "name": "Ethan J. Brown", - "email": "ethan_j_brown@hotmail.com" - }, - { - "name": "Hugues Malphettes", - "email": "hmalphettes@gmail.com" - }, - { - "name": "Igor Minar", - "email": "iiminar@gmail.com" - }, - { - "name": "James Ford", - "email": "jford@psyked.co.uk" - }, - { - "name": "Roarke Gaskill", - "email": "roarke.gaskill@gmail.com" - }, - { - "name": "ngiebel", - "email": "ngiebel@starkinvestments.com" - }, - { - "name": "rdodev", - "email": "rubenoz@gmail.com" - }, - { - "name": "Alexander Shtuchkin", - "email": "ashtuchkin@gmail.com" - }, - { - "name": "Andy Joslin", - "email": "andytjoslin@gmail.com" - }, - { - "name": "AvnerCohen", - "email": "israbirding@gmail.com" - }, - { - "name": "Breno Calazans", - "email": "breno@vtex.com.br" - }, - { - "name": "Brian Ford", - "email": "btford@umich.edu" - }, - { - "name": "Chad Smith", - "email": "chad@configit.com" - }, - { - "name": "Chris Dawson", - "email": "xrdawson@gmail.com" - }, - { - "name": "Danny Croft", - "email": "danny.croft@yahoo.co.uk" - }, - { - "name": "David Jensen", - "email": "david@frode.(none)", - "url": "none" - }, - { - "name": "David M. Karr", - "email": "dk068x@att.com" - }, - { - "name": "David Souther", - "email": "davidsouther@gmail.com" - }, - { - "name": "Dillon", - "email": "mdillon@reachmail.com" - }, - { - "name": "Ed Rooth", - "email": "ed.rooth@rackspace.com" - }, - { - "name": "Eldar Jafarov", - "email": "djkojb@gmail.com" - }, - { - "name": "Eric Baer", - "email": "me@ericbaer.com" - }, - { - "name": "Franck Garcia", - "email": "garcia.franck@gmail.com" - }, - { - "name": "Fred Sauer", - "email": "fredsa@google.com" - }, - { - "name": "Geert Van Laethem", - "email": "geert.van.laethem@pandora.be" - }, - { - "name": "Igor Minar", - "email": "igor@angularjs.org" - }, - { - "name": "James Shore", - "email": "jshore@jamesshore.com" - }, - { - "name": "Jeff Froom", - "email": "jeff@jfroom.com" - }, - { - "name": "Jeff Jewiss", - "email": "jeffjewiss@gmail.com" - }, - { - "name": "Julian Connor", - "email": "julian.connor@venmo.com" - }, - { - "name": "Karolis Narkevicius", - "email": "karolis.n@gmail.com" - }, - { - "name": "Kevin Ortman", - "email": "kevin_ortman@msn.com" - }, - { - "name": "Lukasz Zatorski", - "email": "lzatorski@gmail.com" - }, - { - "name": "Marko Anastasov", - "email": "marko@renderedtext.com" - }, - { - "name": "Martin Lemanski", - "email": "martin.lemanski@gmx.at" - }, - { - "name": "Matias Niemelä", - "email": "matias@yearofmoo.com" - }, - { - "name": "Merrick Christensen", - "email": "merrick.christensen@gmail.com" - }, - { - "name": "Milan Aleksic", - "email": "milanaleksic@gmail.com" - }, - { - "name": "Nick Payne", - "email": "nick@kurai.co.uk" - }, - { - "name": "Nish", - "email": "nishantpatel611@gmail.com" - }, - { - "name": "Nuno Job", - "email": "nunojobpinto@gmail.com" - }, - { - "name": "Pascal Hartig", - "email": "phartig@rdrei.net" - }, - { - "name": "Patrick Lussan", - "email": "patrick.lussan@componize.com" - }, - { - "name": "Patrik Henningsson", - "email": "patrik.henningsson@gmail.com" - }, - { - "name": "Pete Bacon Darwin", - "email": "pete@bacondarwin.com" - }, - { - "name": "Pete Swan", - "email": "pete@indabamusic.com" - }, - { - "name": "Peter Yates", - "email": "pd.yates@gmail.com" - }, - { - "name": "Remy Sharp", - "email": "remy@remysharp.com" - }, - { - "name": "Shane Osbourne", - "email": "shane.osbourne8@gmail.com" - }, - { - "name": "Tim Olshansky", - "email": "tim.olshansky@gmail.com" - }, - { - "name": "Veronica Lynn", - "email": "veronica.lynn@redjack.com" - }, - { - "name": "Yi Wang", - "email": "e@yi-wang.me" - }, - { - "name": "Zhang zhengzheng", - "email": "code@tychio.net" - }, - { - "name": "ahaurw01", - "email": "ahaurwitz@gmail.com" - }, - { - "name": "ashaffer", - "email": "darawk@gmail.com" - }, - { - "name": "hrgdavor", - "email": "hrgdavor@gmail.com" - }, - { - "name": "lanshunfang", - "email": "lanshunfang@gmail.com" - }, - { - "name": "toran billups", - "email": "toranb@gmail.com" - } - ], - "dependencies": { - "di": "~0.0.1", - "socket.io": "~0.9.13", - "chokidar": "~0.7.0", - "glob": "~3.1.21", - "minimatch": "~0.2", - "http-proxy": "~0.10", - "optimist": "~0.3", - "coffee-script": "~1.6", - "rimraf": "~2.1", - "q": "~0.9", - "colors": "0.6.0-1", - "lodash": "~1.1", - "mime": "~1.2", - "log4js": "~0.6.3", - "useragent": "~2.0.4", - "graceful-fs": "~1.2.1", - "connect": "~2.8.4" - }, - "peerDependencies": { - "karma-jasmine": "*", - "karma-requirejs": "*", - "karma-coffee-preprocessor": "*", - "karma-html2js-preprocessor": "*", - "karma-chrome-launcher": "*", - "karma-firefox-launcher": "*", - "karma-phantomjs-launcher": "*", - "karma-script-launcher": "*" - }, - "devDependencies": { - "grunt": "~0.4", - "grunt-simple-mocha": "git://github.com/yaymukund/grunt-simple-mocha.git", - "grunt-contrib-jshint": "~0.3", - "grunt-coffeelint": "~0.0.6", - "grunt-npm": "~0.0.1", - "grunt-bump": "~0.0.10", - "grunt-conventional-changelog": "~1.0.0", - "grunt-auto-release": "~0.0.3", - "mocks": "~0.0.10", - "which": "~1.0", - "sinon-chai": "~2.3", - "chai": "~1.5", - "mocha": "~1.8", - "sinon": "~1.6", - "timer-shim": "~0.2", - "chai-as-promised": "~3.2", - "qq": "~0.3", - "karma-jasmine": "*", - "karma-mocha": "*", - "karma-qunit": "*", - "karma-coverage": "*", - "karma-requirejs": "*", - "karma-growl-reporter": "*", - "karma-junit-reporter": "*", - "karma-chrome-launcher": "*", - "karma-firefox-launcher": "*", - "karma-sauce-launcher": "*", - "karma-phantomjs-launcher": "*", - "karma-ng-scenario": "*", - "karma-coffee-preprocessor": "*", - "karma-html2js-preprocessor": "*", - "karma-browserstack-launcher": "git://github.com/karma-runner/karma-browserstack-launcher.git", - "semver": "~1.1.4", - "grunt-contrib-watch": "~0.5.0" - }, - "main": "./lib/index", - "bin": { - "karma": "./bin/karma" - }, - "engines": { - "node": "~0.8 || ~0.10" - }, - "version": "0.10.6", - "readme": "# Karma [![Build Status](https://secure.travis-ci.org/karma-runner/karma.png?branch=master)](http://travis-ci.org/karma-runner/karma)\n\nA simple tool that allows you to execute JavaScript code in multiple\n_real_ browsers, powered by [Node.js] and [Socket.io].\n\n> The main purpose of Karma is to make your TDD development easy,\n> fast, and fun.\n\n## When should I use Karma?\n\n* You want to test code in *real* browsers.\n* You want to test code in multiple browsers (desktop, mobile,\n tablets, etc.).\n* You want to execute your tests locally during development.\n* You want to execute your tests on a continuous integration server.\n* You want to execute your tests on every save.\n* You love your terminal.\n* You don't want your (testing) life to suck.\n* You want to use [Istanbul] to automagically generate coverage\n reports.\n* You want to use [RequireJS] for your source files.\n\n\n## But I still want to use \\_insert testing library\\_\n\nKarma is not a testing framework, neither an assertion library,\nso for that you can use pretty much anything you like. Right now out\nof the box there is support for\n\n* [Mocha]\n* [Jasmine]\n* [QUnit]\n* \\_anything else\\_ Write your own adapter. It's not that hard. And we\n are here to help.\n\n\n## Which Browsers can I use?\n\nAll the major browsers are supported, if you want to know more see the\n[Browsers] page.\n\n\n## I want to use it. Where do I sign?\n\nYou don't need to sign anything but here are some resources to help\nyou to get started. And if you need even more infos have a look at our\ngreat [website].\n\n### Obligatory Screencast.\n\nEvery serious project has a screencast, so here is ours. Just click\n[here] and let the show begin.\n\n### NPM Installation.\n\nIf you have [Node.js] installed, it's as simple as\n\n```bash\n$ npm install -g karma\n```\n\nThis will give you the latest stable version available on npm. If you\nwant to live life on the edge you can do so by\n\n```bash\n$ npm install -g karma@canary\n```\n\nThe curious can have a look at the documentation articles for\n[Getting Started] and [Versioning].\n\n### Using it.\n\nGo into your project and create a Karma configuration. That is\njust a simple JavaScript or CoffeeScript file that tells Karma\nwhere all the awesomeness of your project are.\n\nYou can find a simple example in\n[test/client/karma.conf.js](https://github.com/karma-runner/karma/blob/master/test/client/karma.conf.js)\nwhich contains most of the options.\n\nTo create your own from scratch there is the `init` command, which\nwill be named `karma.conf.js` by default:\n\n```bash\n$ karma init\n```\nThis will ask you many questions and if you answered them all correct\nyou will be allowed to use Karma.\n\nFor more information on the configuration options see\n[Configuration File Overview].\n\nNow that you have your configuration all that is left to do is to\nstart Karma:\n```bash\n$ karma start\n```\n\nIf you want to run tests manually (without auto watching file changes), you can:\n```bash\n$ karma run\n```\nBut only if you have started the Karma server before.\n\n\n## Why did you create this?\n\nThroughout the development of [AngularJS], we've been using [JSTD] for\ntesting. I really think that JSTD is a great idea. Unfortunately, we\nhad many problems with JSTD, so we decided to write our own test\nrunner based on the same idea. We wanted a simple tool just for\nexecuting JavaScript tests that is both stable and fast. That's why we\nuse the awesome [Socket.io] library and [Node.js].\n\n\n## I still don't get it. Where can I get help?\n\n* [Docs]\n* [Mailing List]\n* [Issuetracker]\n* [@JsKarma] on Twitter\n\n## This is so great. I want to help.\n\nSee\n[Contributing.md](https://github.com/karma-runner/karma/blob/master/CONTRIBUTING.md)\nor the [docs] for more information.\n\n\n## My boss wants a license. So where is it?\n\n### The MIT License\n\n> Copyright (C) 2011-2013 Vojta Jína.\n>\n> Permission is hereby granted, free of charge, to any person\n> obtaining a copy of this software and associated documentation files\n> (the \"Software\"), to deal in the Software without restriction,\n> including without limitation the rights to use, copy, modify, merge,\n> publish, distribute, sublicense, and/or sell copies of the Software,\n> and to permit persons to whom the Software is furnished to do so,\n> subject to the following conditions:\n>\n> The above copyright notice and this permission notice shall be\n> included in all copies or substantial portions of the Software.\n>\n> THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n> BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n> ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n> CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n> SOFTWARE.\n\n\n\n[AngularJS]: http://angularjs.org/\n[JSTD]: http://code.google.com/p/js-test-driver/\n[Socket.io]: http://socket.io/\n[Node.js]: http://nodejs.org/\n[Jasmine]: http://pivotal.github.io/jasmine/\n[Mocha]: http://visionmedia.github.io/mocha/\n[QUnit]: http://qunitjs.com/\n[here]: http://www.youtube.com/watch?v=MVw8N3hTfCI\n[Mailing List]: https://groups.google.com/forum/#!forum/karma-users\n[Issuetracker]: https://github.com/karma-runner/karma/issues\n[@JsKarma]: http://twitter.com/JsKarma\n[RequireJS]: http://requirejs.org/\n[Istanbul]: https://github.com/gotwarlost/istanbul\n\n[Browsers]: http://karma-runner.github.io/0.8/config/browsers.html\n[Versioning]: http://karma-runner.github.io/0.8/about/versioning.html\n[Configuration File Overview]: http://karma-runner.github.io/0.8/config/configuration-file.html\n[docs]: http://karma-runner.github.io\n[Docs]: http://karma-runner.github.io\n[website]: http://karma-runner.github.io\n", - "readmeFilename": "README.md", - "_id": "karma@0.10.6", - "_from": "karma@>=0.9" -} diff --git a/node_modules/karma/static/client.html b/node_modules/karma/static/client.html deleted file mode 100644 index 5a139223..00000000 --- a/node_modules/karma/static/client.html +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Karma - - - - - - - - -
      - - - - - - - diff --git a/node_modules/karma/static/context.html b/node_modules/karma/static/context.html deleted file mode 100644 index a1d6cb9e..00000000 --- a/node_modules/karma/static/context.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - %SCRIPTS% - - - diff --git a/node_modules/karma/static/debug.html b/node_modules/karma/static/debug.html deleted file mode 100644 index 772c1fd9..00000000 --- a/node_modules/karma/static/debug.html +++ /dev/null @@ -1,48 +0,0 @@ - - - - - Karma DEBUG RUNNER - - - - - - - - - %SCRIPTS% - - - diff --git a/node_modules/karma/static/karma.js b/node_modules/karma/static/karma.js deleted file mode 100644 index d23a1e4f..00000000 --- a/node_modules/karma/static/karma.js +++ /dev/null @@ -1,294 +0,0 @@ -(function(window, document, io) { - -var CONTEXT_URL = 'context.html'; -var VERSION = '%KARMA_VERSION%'; -var KARMA_URL_ROOT = '%KARMA_URL_ROOT%'; - -// connect socket.io -// https://github.com/LearnBoost/Socket.IO/wiki/Configuring-Socket.IO -var socket = io.connect('http://' + location.host, { - 'reconnection delay': 500, - 'reconnection limit': 2000, - 'resource': KARMA_URL_ROOT.substr(1) + 'socket.io', - 'sync disconnect on unload': true, - 'max reconnection attempts': Infinity -}); - -var browsersElement = document.getElementById('browsers'); -socket.on('info', function(browsers) { - var items = [], status; - for (var i = 0; i < browsers.length; i++) { - status = browsers[i].isReady ? 'idle' : 'executing'; - items.push('
    • ' + browsers[i].name + ' is ' + status + '
    • '); - } - browsersElement.innerHTML = items.join('\n'); -}); -socket.on('disconnect', function() { - browsersElement.innerHTML = ''; -}); - -var titleElement = document.getElementById('title'); -var bannerElement = document.getElementById('banner'); -var updateStatus = function(status) { - return function(param) { - var paramStatus = param ? status.replace('$', param) : status; - titleElement.innerHTML = 'Karma v' + VERSION + ' - ' + paramStatus; - bannerElement.className = status === 'connected' ? 'online' : 'offline'; - }; -}; - -socket.on('connect', updateStatus('connected')); -socket.on('disconnect', updateStatus('disconnected')); -socket.on('reconnecting', updateStatus('reconnecting in $ ms...')); -socket.on('reconnect', updateStatus('re-connected')); -socket.on('reconnect_failed', updateStatus('failed to reconnect')); - -var instanceOf = function(value, constructorName) { - return Object.prototype.toString.apply(value) === '[object ' + constructorName + ']'; -}; - -/* jshint unused: false */ -var Karma = function(socket, context, navigator, location) { - var hasError = false; - var store = {}; - var self = this; - - var resultsBufferLimit = 1; - var resultsBuffer = []; - - this.VERSION = VERSION; - this.config = {}; - - this.setupContext = function(contextWindow) { - if (hasError) { - return; - } - - var getConsole = function(currentWindow) { - return currentWindow.console || { - log: function() {}, - info: function() {}, - warn: function() {}, - error: function() {}, - debug: function() {} - }; - }; - - contextWindow.__karma__ = this; - - // This causes memory leak in Chrome (17.0.963.66) - contextWindow.onerror = function() { - return contextWindow.__karma__.error.apply(contextWindow.__karma__, arguments); - }; - - contextWindow.onbeforeunload = function(e, b) { - if (context.src !== 'about:blank') { - // TODO(vojta): show what test (with explanation about jasmine.UPDATE_INTERVAL) - contextWindow.__karma__.error('Some of your tests did a full page reload!'); - } - }; - - // patch the console - var localConsole = contextWindow.console = getConsole(contextWindow); - var browserConsoleLog = localConsole.log; - var logMethods = ['log', 'info', 'warn', 'error', 'debug']; - var patchConsoleMethod = function(method) { - var orig = localConsole[method]; - if (!orig) { - return; - } - localConsole[method] = function() { - self.log(method, arguments); - return Function.prototype.apply.call(orig, localConsole, arguments); - }; - }; - for (var i = 0; i < logMethods.length; i++) { - patchConsoleMethod(logMethods[i]); - } - - contextWindow.dump = function() { - self.log('dump', arguments); - }; - - contextWindow.alert = function(msg) { - self.log('alert', [msg]); - }; - }; - - this.log = function(type, args) { - var values = []; - - for (var i = 0; i < args.length; i++) { - values.push(this.stringify(args[i], 3)); - } - - this.info({log: values.join(', '), type: type}); - }; - - this.stringify = function(obj, depth) { - - if (depth === 0) { - return '...'; - } - - if (obj === null) { - return 'null'; - } - - switch (typeof obj) { - case 'string': - return '\'' + obj + '\''; - case 'undefined': - return 'undefined'; - case 'function': - return obj.toString().replace(/\{[\s\S]*\}/, '{ ... }'); - case 'boolean': - return obj ? 'true' : 'false'; - case 'object': - var strs = []; - if (instanceOf(obj, 'Array')) { - strs.push('['); - for (var i = 0, ii = obj.length; i < ii; i++) { - if (i) { - strs.push(', '); - } - strs.push(this.stringify(obj[i], depth - 1)); - } - strs.push(']'); - } else if (instanceOf(obj, 'Date')) { - return obj.toString(); - } else if (instanceOf(obj, 'Text')) { - return obj.nodeValue; - } else if (instanceOf(obj, 'Comment')) { - return ''; - } else if (obj.outerHTML) { - return obj.outerHTML; - } else { - strs.push(obj.constructor.name); - strs.push('{'); - var first = true; - for(var key in obj) { - if (obj.hasOwnProperty(key)) { - if (first) { first = false; } else { strs.push(', '); } - strs.push(key + ': ' + this.stringify(obj[key], depth - 1)); - } - } - strs.push('}'); - } - return strs.join(''); - default: - return obj; - } - }; - - - var clearContext = function() { - context.src = 'about:blank'; - }; - - // error during js file loading (most likely syntax error) - // we are not going to execute at all - this.error = function(msg, url, line) { - hasError = true; - socket.emit('error', url ? msg + '\nat ' + url + (line ? ':' + line : '') : msg); - this.complete(); - return false; - }; - - this.result = function(result) { - if (resultsBufferLimit === 1) { - return socket.emit('result', result); - } - - resultsBuffer.push(result); - - if (resultsBuffer.length === resultsBufferLimit) { - socket.emit('result', resultsBuffer); - resultsBuffer = []; - } - }; - - this.complete = function(result) { - if (resultsBuffer.length) { - socket.emit('result', resultsBuffer); - resultsBuffer = []; - } - - // give the browser some time to breath, there could be a page reload, but because a bunch of - // tests could run in the same event loop, we wouldn't notice. - setTimeout(function() { - socket.emit('complete', result || {}); - clearContext(); - }, 0); - }; - - this.info = function(info) { - socket.emit('info', info); - }; - - // all files loaded, let's start the execution - this.loaded = function() { - // has error -> cancel - if (!hasError) { - this.start(this.config); - } - - // remove reference to child iframe - this.start = null; - }; - - this.store = function(key, value) { - if (typeof value === 'undefined') { - return store[key]; - } - - if (Object.prototype.toString.apply(value) === '[object Array]') { - var s = store[key] = []; - for (var i = 0; i < value.length; i++) { - s.push(value[i]); - } - } else { - // TODO(vojta): clone objects + deep - store[key] = value; - } - }; - - // supposed to be overriden by the context - // TODO(vojta): support multiple callbacks (queue) - this.start = this.complete; - - socket.on('execute', function(cfg) { - // reset hasError and reload the iframe - hasError = false; - self.config = cfg; - context.src = CONTEXT_URL; - - // clear the console before run - // works only on FF (Safari, Chrome do not allow to clear console from js source) - if (window.console && window.console.clear) { - window.console.clear(); - } - }); - - // report browser name, id - socket.on('connect', function() { - var transport = socket.socket.transport.name; - - // TODO(vojta): make resultsBufferLimit configurable - if (transport === 'websocket' || transport === 'flashsocket') { - resultsBufferLimit = 1; - } else { - resultsBufferLimit = 50; - } - - socket.emit('register', { - name: navigator.userAgent, - id: parseInt((location.search.match(/\?id=(.*)/) || [])[1], 10) || null - }); - }); -}; - - -window.karma = new Karma(socket, document.getElementById('context'), window.navigator, window.location); - -})(window, document, window.io); diff --git a/node_modules/karma/test-results.xml b/node_modules/karma/test-results.xml deleted file mode 100644 index e9d7c52f..00000000 --- a/node_modules/karma/test-results.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/node_modules/karma/thesis.pdf b/node_modules/karma/thesis.pdf deleted file mode 100644 index 76cf7cc8..00000000 Binary files a/node_modules/karma/thesis.pdf and /dev/null differ diff --git a/node_modules/requirejs/README.md b/node_modules/requirejs/README.md deleted file mode 100644 index 545b31d7..00000000 --- a/node_modules/requirejs/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# requirejs - -RequireJS for use in Node. includes: - -* r.js: the RequireJS optimizer, and AMD runtime for use in Node. -* require.js: The browser-based AMD loader. - -More information at http://requirejs.org - diff --git a/node_modules/requirejs/bin/r.js b/node_modules/requirejs/bin/r.js deleted file mode 100755 index 55028dad..00000000 --- a/node_modules/requirejs/bin/r.js +++ /dev/null @@ -1,26059 +0,0 @@ -#!/usr/bin/env node -/** - * @license r.js 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/* - * This is a bootstrap script to allow running RequireJS in the command line - * in either a Java/Rhino or Node environment. It is modified by the top-level - * dist.js file to inject other files to completely enable this file. It is - * the shell of the r.js file. - */ - -/*jslint evil: true, nomen: true, sloppy: true */ -/*global readFile: true, process: false, Packages: false, print: false, -console: false, java: false, module: false, requirejsVars, navigator, -document, importScripts, self, location, Components, FileUtils */ - -var requirejs, require, define, xpcUtil; -(function (console, args, readFileFunc) { - var fileName, env, fs, vm, path, exec, rhinoContext, dir, nodeRequire, - nodeDefine, exists, reqMain, loadedOptimizedLib, existsForNode, Cc, Ci, - version = '2.1.9', - jsSuffixRegExp = /\.js$/, - commandOption = '', - useLibLoaded = {}, - //Used by jslib/rhino/args.js - rhinoArgs = args, - //Used by jslib/xpconnect/args.js - xpconnectArgs = args, - readFile = typeof readFileFunc !== 'undefined' ? readFileFunc : null; - - function showHelp() { - console.log('See https://github.com/jrburke/r.js for usage.'); - } - - if ((typeof navigator !== 'undefined' && typeof document !== 'undefined') || - (typeof importScripts !== 'undefined' && typeof self !== 'undefined')) { - env = 'browser'; - - readFile = function (path) { - return fs.readFileSync(path, 'utf8'); - }; - - exec = function (string) { - return eval(string); - }; - - exists = function () { - console.log('x.js exists not applicable in browser env'); - return false; - }; - - } else if (typeof Packages !== 'undefined') { - env = 'rhino'; - - fileName = args[0]; - - if (fileName && fileName.indexOf('-') === 0) { - commandOption = fileName.substring(1); - fileName = args[1]; - } - - //Set up execution context. - rhinoContext = Packages.org.mozilla.javascript.ContextFactory.getGlobal().enterContext(); - - exec = function (string, name) { - return rhinoContext.evaluateString(this, string, name, 0, null); - }; - - exists = function (fileName) { - return (new java.io.File(fileName)).exists(); - }; - - //Define a console.log for easier logging. Don't - //get fancy though. - if (typeof console === 'undefined') { - console = { - log: function () { - print.apply(undefined, arguments); - } - }; - } - } else if (typeof process !== 'undefined' && process.versions && !!process.versions.node) { - env = 'node'; - - //Get the fs module via Node's require before it - //gets replaced. Used in require/node.js - fs = require('fs'); - vm = require('vm'); - path = require('path'); - //In Node 0.7+ existsSync is on fs. - existsForNode = fs.existsSync || path.existsSync; - - nodeRequire = require; - nodeDefine = define; - reqMain = require.main; - - //Temporarily hide require and define to allow require.js to define - //them. - require = undefined; - define = undefined; - - readFile = function (path) { - return fs.readFileSync(path, 'utf8'); - }; - - exec = function (string, name) { - return vm.runInThisContext(this.requirejsVars.require.makeNodeWrapper(string), - name ? fs.realpathSync(name) : ''); - }; - - exists = function (fileName) { - return existsForNode(fileName); - }; - - - fileName = process.argv[2]; - - if (fileName && fileName.indexOf('-') === 0) { - commandOption = fileName.substring(1); - fileName = process.argv[3]; - } - } else if (typeof Components !== 'undefined' && Components.classes && Components.interfaces) { - env = 'xpconnect'; - - Components.utils['import']('resource://gre/modules/FileUtils.jsm'); - Cc = Components.classes; - Ci = Components.interfaces; - - fileName = args[0]; - - if (fileName && fileName.indexOf('-') === 0) { - commandOption = fileName.substring(1); - fileName = args[1]; - } - - xpcUtil = { - isWindows: ('@mozilla.org/windows-registry-key;1' in Cc), - cwd: function () { - return FileUtils.getFile("CurWorkD", []).path; - }, - - //Remove . and .. from paths, normalize on front slashes - normalize: function (path) { - //There has to be an easier way to do this. - var i, part, ary, - firstChar = path.charAt(0); - - if (firstChar !== '/' && - firstChar !== '\\' && - path.indexOf(':') === -1) { - //A relative path. Use the current working directory. - path = xpcUtil.cwd() + '/' + path; - } - - ary = path.replace(/\\/g, '/').split('/'); - - for (i = 0; i < ary.length; i += 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - ary.splice(i - 1, 2); - i -= 2; - } - } - return ary.join('/'); - }, - - xpfile: function (path) { - var fullPath; - try { - fullPath = xpcUtil.normalize(path); - if (xpcUtil.isWindows) { - fullPath = fullPath.replace(/\//g, '\\'); - } - return new FileUtils.File(fullPath); - } catch (e) { - throw new Error((fullPath || path) + ' failed: ' + e); - } - }, - - readFile: function (/*String*/path, /*String?*/encoding) { - //A file read function that can deal with BOMs - encoding = encoding || "utf-8"; - - var inStream, convertStream, - readData = {}, - fileObj = xpcUtil.xpfile(path); - - //XPCOM, you so crazy - try { - inStream = Cc['@mozilla.org/network/file-input-stream;1'] - .createInstance(Ci.nsIFileInputStream); - inStream.init(fileObj, 1, 0, false); - - convertStream = Cc['@mozilla.org/intl/converter-input-stream;1'] - .createInstance(Ci.nsIConverterInputStream); - convertStream.init(inStream, encoding, inStream.available(), - Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER); - - convertStream.readString(inStream.available(), readData); - return readData.value; - } catch (e) { - throw new Error((fileObj && fileObj.path || '') + ': ' + e); - } finally { - if (convertStream) { - convertStream.close(); - } - if (inStream) { - inStream.close(); - } - } - } - }; - - readFile = xpcUtil.readFile; - - exec = function (string) { - return eval(string); - }; - - exists = function (fileName) { - return xpcUtil.xpfile(fileName).exists(); - }; - - //Define a console.log for easier logging. Don't - //get fancy though. - if (typeof console === 'undefined') { - console = { - log: function () { - print.apply(undefined, arguments); - } - }; - } - } - - /** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -//Not using strict: uneven strict support in browsers, #392, and causes -//problems with requirejs.exec()/transpiler plugins that may not be strict. -/*jslint regexp: true, nomen: true, sloppy: true */ -/*global window, navigator, document, importScripts, setTimeout, opera */ - - -(function (global) { - var req, s, head, baseElement, dataMain, src, - interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.9', - commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, - cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, - jsSuffixRegExp = /\.js$/, - currDirRegExp = /^\.\//, - op = Object.prototype, - ostring = op.toString, - hasOwn = op.hasOwnProperty, - ap = Array.prototype, - apsp = ap.splice, - isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), - isWebWorker = !isBrowser && typeof importScripts !== 'undefined', - //PS3 indicates loaded and complete, but need to wait for complete - //specifically. Sequence is 'loading', 'loaded', execution, - // then 'complete'. The UA check is unfortunate, but not sure how - //to feature test w/o causing perf issues. - readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? - /^complete$/ : /^(complete|loaded)$/, - defContextName = '_', - //Oh the tragedy, detecting opera. See the usage of isOpera for reason. - isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', - contexts = {}, - cfg = {}, - globalDefQueue = [], - useInteractive = false; - - function isFunction(it) { - return ostring.call(it) === '[object Function]'; - } - - function isArray(it) { - return ostring.call(it) === '[object Array]'; - } - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } - } - } - } - - /** - * Helper function for iterating over an array backwards. If the func - * returns a true value, it will break out of the loop. - */ - function eachReverse(ary, func) { - if (ary) { - var i; - for (i = ary.length - 1; i > -1; i -= 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } - } - } - } - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - function getOwn(obj, prop) { - return hasProp(obj, prop) && obj[prop]; - } - - /** - * Cycles over properties in an object and calls a function for each - * property value. If the function returns a truthy value, then the - * iteration is stopped. - */ - function eachProp(obj, func) { - var prop; - for (prop in obj) { - if (hasProp(obj, prop)) { - if (func(obj[prop], prop)) { - break; - } - } - } - } - - /** - * Simple function to mix in properties from source into target, - * but only if target does not already have a property of the same name. - */ - function mixin(target, source, force, deepStringMixin) { - if (source) { - eachProp(source, function (value, prop) { - if (force || !hasProp(target, prop)) { - if (deepStringMixin && typeof value !== 'string') { - if (!target[prop]) { - target[prop] = {}; - } - mixin(target[prop], value, force, deepStringMixin); - } else { - target[prop] = value; - } - } - }); - } - return target; - } - - //Similar to Function.prototype.bind, but the 'this' object is specified - //first, since it is easier to read/figure out what 'this' will be. - function bind(obj, fn) { - return function () { - return fn.apply(obj, arguments); - }; - } - - function scripts() { - return document.getElementsByTagName('script'); - } - - function defaultOnError(err) { - throw err; - } - - //Allow getting a global that expressed in - //dot notation, like 'a.b.c'. - function getGlobal(value) { - if (!value) { - return value; - } - var g = global; - each(value.split('.'), function (part) { - g = g[part]; - }); - return g; - } - - /** - * Constructs an error with a pointer to an URL with more information. - * @param {String} id the error ID that maps to an ID on a web page. - * @param {String} message human readable error. - * @param {Error} [err] the original error, if there is one. - * - * @returns {Error} - */ - function makeError(id, msg, err, requireModules) { - var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); - e.requireType = id; - e.requireModules = requireModules; - if (err) { - e.originalError = err; - } - return e; - } - - if (typeof define !== 'undefined') { - //If a define is already in play via another AMD loader, - //do not overwrite. - return; - } - - if (typeof requirejs !== 'undefined') { - if (isFunction(requirejs)) { - //Do not overwrite and existing requirejs instance. - return; - } - cfg = requirejs; - requirejs = undefined; - } - - //Allow for a require config object - if (typeof require !== 'undefined' && !isFunction(require)) { - //assume it is a config object. - cfg = require; - require = undefined; - } - - function newContext(contextName) { - var inCheckLoaded, Module, context, handlers, - checkLoadedTimeoutId, - config = { - //Defaults. Do not set a default for map - //config to speed up normalize(), which - //will run faster if there is no default. - waitSeconds: 7, - baseUrl: './', - paths: {}, - pkgs: {}, - shim: {}, - config: {} - }, - registry = {}, - //registry of just enabled modules, to speed - //cycle breaking code when lots of modules - //are registered, but not activated. - enabledRegistry = {}, - undefEvents = {}, - defQueue = [], - defined = {}, - urlFetched = {}, - requireCounter = 1, - unnormalizedCounter = 1; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i += 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - /** - * Given a relative module name, like ./something, normalize it to - * a real name that can be mapped to a path. - * @param {String} name the relative name - * @param {String} baseName a real name that the name arg is relative - * to. - * @param {Boolean} applyMap apply the map config to the value. Should - * only be done if this normalization is for a dependency ID. - * @returns {String} normalized name - */ - function normalize(name, baseName, applyMap) { - var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment, - foundMap, foundI, foundStarMap, starI, - baseParts = baseName && baseName.split('/'), - normalizedBaseParts = baseParts, - map = config.map, - starMap = map && map['*']; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - if (getOwn(config.pkgs, baseName)) { - //If the baseName is a package name, then just treat it as one - //name to concat the name with. - normalizedBaseParts = baseParts = [baseName]; - } else { - //Convert baseName to array, and lop off the last part, - //so that . matches that 'directory' and not name of the baseName's - //module. For instance, baseName of 'one/two/three', maps to - //'one/two/three.js', but we want the directory, 'one/two' for - //this normalization. - normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); - } - - name = normalizedBaseParts.concat(name.split('/')); - trimDots(name); - - //Some use of packages may use a . path to reference the - //'main' module name, so normalize for that. - pkgConfig = getOwn(config.pkgs, (pkgName = name[0])); - name = name.join('/'); - if (pkgConfig && name === pkgName + '/' + pkgConfig.main) { - name = pkgName; - } - } else if (name.indexOf('./') === 0) { - // No baseName, so this is ID is resolved relative - // to baseUrl, pull off the leading dot. - name = name.substring(2); - } - } - - //Apply map config if available. - if (applyMap && map && (baseParts || starMap)) { - nameParts = name.split('/'); - - for (i = nameParts.length; i > 0; i -= 1) { - nameSegment = nameParts.slice(0, i).join('/'); - - if (baseParts) { - //Find the longest baseName segment match in the config. - //So, do joins on the biggest to smallest lengths of baseParts. - for (j = baseParts.length; j > 0; j -= 1) { - mapValue = getOwn(map, baseParts.slice(0, j).join('/')); - - //baseName segment has config, find if it has one for - //this name. - if (mapValue) { - mapValue = getOwn(mapValue, nameSegment); - if (mapValue) { - //Match, update name to the new value. - foundMap = mapValue; - foundI = i; - break; - } - } - } - } - - if (foundMap) { - break; - } - - //Check for a star map match, but just hold on to it, - //if there is a shorter segment match later in a matching - //config, then favor over this star map. - if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { - foundStarMap = getOwn(starMap, nameSegment); - starI = i; - } - } - - if (!foundMap && foundStarMap) { - foundMap = foundStarMap; - foundI = starI; - } - - if (foundMap) { - nameParts.splice(0, foundI, foundMap); - name = nameParts.join('/'); - } - } - - return name; - } - - function removeScript(name) { - if (isBrowser) { - each(scripts(), function (scriptNode) { - if (scriptNode.getAttribute('data-requiremodule') === name && - scriptNode.getAttribute('data-requirecontext') === context.contextName) { - scriptNode.parentNode.removeChild(scriptNode); - return true; - } - }); - } - } - - function hasPathFallback(id) { - var pathConfig = getOwn(config.paths, id); - if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { - //Pop off the first array value, since it failed, and - //retry - pathConfig.shift(); - context.require.undef(id); - context.require([id]); - return true; - } - } - - //Turns a plugin!resource to [plugin, resource] - //with the plugin being undefined if the name - //did not have a plugin prefix. - function splitPrefix(name) { - var prefix, - index = name ? name.indexOf('!') : -1; - if (index > -1) { - prefix = name.substring(0, index); - name = name.substring(index + 1, name.length); - } - return [prefix, name]; - } - - /** - * Creates a module mapping that includes plugin prefix, module - * name, and path. If parentModuleMap is provided it will - * also normalize the name via require.normalize() - * - * @param {String} name the module name - * @param {String} [parentModuleMap] parent module map - * for the module name, used to resolve relative names. - * @param {Boolean} isNormalized: is the ID already normalized. - * This is true if this call is done for a define() module ID. - * @param {Boolean} applyMap: apply the map config to the ID. - * Should only be true if this map is for a dependency. - * - * @returns {Object} - */ - function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { - var url, pluginModule, suffix, nameParts, - prefix = null, - parentName = parentModuleMap ? parentModuleMap.name : null, - originalName = name, - isDefine = true, - normalizedName = ''; - - //If no name, then it means it is a require call, generate an - //internal name. - if (!name) { - isDefine = false; - name = '_@r' + (requireCounter += 1); - } - - nameParts = splitPrefix(name); - prefix = nameParts[0]; - name = nameParts[1]; - - if (prefix) { - prefix = normalize(prefix, parentName, applyMap); - pluginModule = getOwn(defined, prefix); - } - - //Account for relative paths if there is a base name. - if (name) { - if (prefix) { - if (pluginModule && pluginModule.normalize) { - //Plugin is loaded, use its normalize method. - normalizedName = pluginModule.normalize(name, function (name) { - return normalize(name, parentName, applyMap); - }); - } else { - normalizedName = normalize(name, parentName, applyMap); - } - } else { - //A regular module. - normalizedName = normalize(name, parentName, applyMap); - - //Normalized name may be a plugin ID due to map config - //application in normalize. The map config values must - //already be normalized, so do not need to redo that part. - nameParts = splitPrefix(normalizedName); - prefix = nameParts[0]; - normalizedName = nameParts[1]; - isNormalized = true; - - url = context.nameToUrl(normalizedName); - } - } - - //If the id is a plugin id that cannot be determined if it needs - //normalization, stamp it with a unique ID so two matching relative - //ids that may conflict can be separate. - suffix = prefix && !pluginModule && !isNormalized ? - '_unnormalized' + (unnormalizedCounter += 1) : - ''; - - return { - prefix: prefix, - name: normalizedName, - parentMap: parentModuleMap, - unnormalized: !!suffix, - url: url, - originalName: originalName, - isDefine: isDefine, - id: (prefix ? - prefix + '!' + normalizedName : - normalizedName) + suffix - }; - } - - function getModule(depMap) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (!mod) { - mod = registry[id] = new context.Module(depMap); - } - - return mod; - } - - function on(depMap, name, fn) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (hasProp(defined, id) && - (!mod || mod.defineEmitComplete)) { - if (name === 'defined') { - fn(defined[id]); - } - } else { - mod = getModule(depMap); - if (mod.error && name === 'error') { - fn(mod.error); - } else { - mod.on(name, fn); - } - } - } - - function onError(err, errback) { - var ids = err.requireModules, - notified = false; - - if (errback) { - errback(err); - } else { - each(ids, function (id) { - var mod = getOwn(registry, id); - if (mod) { - //Set error on module, so it skips timeout checks. - mod.error = err; - if (mod.events.error) { - notified = true; - mod.emit('error', err); - } - } - }); - - if (!notified) { - req.onError(err); - } - } - } - - /** - * Internal method to transfer globalQueue items to this context's - * defQueue. - */ - function takeGlobalQueue() { - //Push all the globalDefQueue items into the context's defQueue - if (globalDefQueue.length) { - //Array splice in the values since the context code has a - //local var ref to defQueue, so cannot just reassign the one - //on context. - apsp.apply(defQueue, - [defQueue.length - 1, 0].concat(globalDefQueue)); - globalDefQueue = []; - } - } - - handlers = { - 'require': function (mod) { - if (mod.require) { - return mod.require; - } else { - return (mod.require = context.makeRequire(mod.map)); - } - }, - 'exports': function (mod) { - mod.usingExports = true; - if (mod.map.isDefine) { - if (mod.exports) { - return mod.exports; - } else { - return (mod.exports = defined[mod.map.id] = {}); - } - } - }, - 'module': function (mod) { - if (mod.module) { - return mod.module; - } else { - return (mod.module = { - id: mod.map.id, - uri: mod.map.url, - config: function () { - var c, - pkg = getOwn(config.pkgs, mod.map.id); - // For packages, only support config targeted - // at the main module. - c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) : - getOwn(config.config, mod.map.id); - return c || {}; - }, - exports: defined[mod.map.id] - }); - } - } - }; - - function cleanRegistry(id) { - //Clean up machinery used for waiting modules. - delete registry[id]; - delete enabledRegistry[id]; - } - - function breakCycle(mod, traced, processed) { - var id = mod.map.id; - - if (mod.error) { - mod.emit('error', mod.error); - } else { - traced[id] = true; - each(mod.depMaps, function (depMap, i) { - var depId = depMap.id, - dep = getOwn(registry, depId); - - //Only force things that have not completed - //being defined, so still in the registry, - //and only if it has not been matched up - //in the module already. - if (dep && !mod.depMatched[i] && !processed[depId]) { - if (getOwn(traced, depId)) { - mod.defineDep(i, defined[depId]); - mod.check(); //pass false? - } else { - breakCycle(dep, traced, processed); - } - } - }); - processed[id] = true; - } - } - - function checkLoaded() { - var map, modId, err, usingPathFallback, - waitInterval = config.waitSeconds * 1000, - //It is possible to disable the wait interval by using waitSeconds of 0. - expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), - noLoads = [], - reqCalls = [], - stillLoading = false, - needCycleCheck = true; - - //Do not bother if this call was a result of a cycle break. - if (inCheckLoaded) { - return; - } - - inCheckLoaded = true; - - //Figure out the state of all the modules. - eachProp(enabledRegistry, function (mod) { - map = mod.map; - modId = map.id; - - //Skip things that are not enabled or in error state. - if (!mod.enabled) { - return; - } - - if (!map.isDefine) { - reqCalls.push(mod); - } - - if (!mod.error) { - //If the module should be executed, and it has not - //been inited and time is up, remember it. - if (!mod.inited && expired) { - if (hasPathFallback(modId)) { - usingPathFallback = true; - stillLoading = true; - } else { - noLoads.push(modId); - removeScript(modId); - } - } else if (!mod.inited && mod.fetched && map.isDefine) { - stillLoading = true; - if (!map.prefix) { - //No reason to keep looking for unfinished - //loading. If the only stillLoading is a - //plugin resource though, keep going, - //because it may be that a plugin resource - //is waiting on a non-plugin cycle. - return (needCycleCheck = false); - } - } - } - }); - - if (expired && noLoads.length) { - //If wait time expired, throw error of unloaded modules. - err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); - err.contextName = context.contextName; - return onError(err); - } - - //Not expired, check for a cycle. - if (needCycleCheck) { - each(reqCalls, function (mod) { - breakCycle(mod, {}, {}); - }); - } - - //If still waiting on loads, and the waiting load is something - //other than a plugin resource, or there are still outstanding - //scripts, then just try back later. - if ((!expired || usingPathFallback) && stillLoading) { - //Something is still waiting to load. Wait for it, but only - //if a timeout is not already in effect. - if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { - checkLoadedTimeoutId = setTimeout(function () { - checkLoadedTimeoutId = 0; - checkLoaded(); - }, 50); - } - } - - inCheckLoaded = false; - } - - Module = function (map) { - this.events = getOwn(undefEvents, map.id) || {}; - this.map = map; - this.shim = getOwn(config.shim, map.id); - this.depExports = []; - this.depMaps = []; - this.depMatched = []; - this.pluginMaps = {}; - this.depCount = 0; - - /* this.exports this.factory - this.depMaps = [], - this.enabled, this.fetched - */ - }; - - Module.prototype = { - init: function (depMaps, factory, errback, options) { - options = options || {}; - - //Do not do more inits if already done. Can happen if there - //are multiple define calls for the same module. That is not - //a normal, common case, but it is also not unexpected. - if (this.inited) { - return; - } - - this.factory = factory; - - if (errback) { - //Register for errors on this module. - this.on('error', errback); - } else if (this.events.error) { - //If no errback already, but there are error listeners - //on this module, set up an errback to pass to the deps. - errback = bind(this, function (err) { - this.emit('error', err); - }); - } - - //Do a copy of the dependency array, so that - //source inputs are not modified. For example - //"shim" deps are passed in here directly, and - //doing a direct modification of the depMaps array - //would affect that config. - this.depMaps = depMaps && depMaps.slice(0); - - this.errback = errback; - - //Indicate this module has be initialized - this.inited = true; - - this.ignore = options.ignore; - - //Could have option to init this module in enabled mode, - //or could have been previously marked as enabled. However, - //the dependencies are not known until init is called. So - //if enabled previously, now trigger dependencies as enabled. - if (options.enabled || this.enabled) { - //Enable this module and dependencies. - //Will call this.check() - this.enable(); - } else { - this.check(); - } - }, - - defineDep: function (i, depExports) { - //Because of cycles, defined callback for a given - //export can be called more than once. - if (!this.depMatched[i]) { - this.depMatched[i] = true; - this.depCount -= 1; - this.depExports[i] = depExports; - } - }, - - fetch: function () { - if (this.fetched) { - return; - } - this.fetched = true; - - context.startTime = (new Date()).getTime(); - - var map = this.map; - - //If the manager is for a plugin managed resource, - //ask the plugin to load it now. - if (this.shim) { - context.makeRequire(this.map, { - enableBuildCallback: true - })(this.shim.deps || [], bind(this, function () { - return map.prefix ? this.callPlugin() : this.load(); - })); - } else { - //Regular dependency. - return map.prefix ? this.callPlugin() : this.load(); - } - }, - - load: function () { - var url = this.map.url; - - //Regular dependency. - if (!urlFetched[url]) { - urlFetched[url] = true; - context.load(this.map.id, url); - } - }, - - /** - * Checks if the module is ready to define itself, and if so, - * define it. - */ - check: function () { - if (!this.enabled || this.enabling) { - return; - } - - var err, cjsModule, - id = this.map.id, - depExports = this.depExports, - exports = this.exports, - factory = this.factory; - - if (!this.inited) { - this.fetch(); - } else if (this.error) { - this.emit('error', this.error); - } else if (!this.defining) { - //The factory could trigger another require call - //that would result in checking this module to - //define itself again. If already in the process - //of doing that, skip this work. - this.defining = true; - - if (this.depCount < 1 && !this.defined) { - if (isFunction(factory)) { - //If there is an error listener, favor passing - //to that instead of throwing an error. However, - //only do it for define()'d modules. require - //errbacks should not be called for failures in - //their callbacks (#699). However if a global - //onError is set, use that. - if ((this.events.error && this.map.isDefine) || - req.onError !== defaultOnError) { - try { - exports = context.execCb(id, factory, depExports, exports); - } catch (e) { - err = e; - } - } else { - exports = context.execCb(id, factory, depExports, exports); - } - - if (this.map.isDefine) { - //If setting exports via 'module' is in play, - //favor that over return value and exports. After that, - //favor a non-undefined return value over exports use. - cjsModule = this.module; - if (cjsModule && - cjsModule.exports !== undefined && - //Make sure it is not already the exports value - cjsModule.exports !== this.exports) { - exports = cjsModule.exports; - } else if (exports === undefined && this.usingExports) { - //exports already set the defined value. - exports = this.exports; - } - } - - if (err) { - err.requireMap = this.map; - err.requireModules = this.map.isDefine ? [this.map.id] : null; - err.requireType = this.map.isDefine ? 'define' : 'require'; - return onError((this.error = err)); - } - - } else { - //Just a literal value - exports = factory; - } - - this.exports = exports; - - if (this.map.isDefine && !this.ignore) { - defined[id] = exports; - - if (req.onResourceLoad) { - req.onResourceLoad(context, this.map, this.depMaps); - } - } - - //Clean up - cleanRegistry(id); - - this.defined = true; - } - - //Finished the define stage. Allow calling check again - //to allow define notifications below in the case of a - //cycle. - this.defining = false; - - if (this.defined && !this.defineEmitted) { - this.defineEmitted = true; - this.emit('defined', this.exports); - this.defineEmitComplete = true; - } - - } - }, - - callPlugin: function () { - var map = this.map, - id = map.id, - //Map already normalized the prefix. - pluginMap = makeModuleMap(map.prefix); - - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(pluginMap); - - on(pluginMap, 'defined', bind(this, function (plugin) { - var load, normalizedMap, normalizedMod, - name = this.map.name, - parentName = this.map.parentMap ? this.map.parentMap.name : null, - localRequire = context.makeRequire(map.parentMap, { - enableBuildCallback: true - }); - - //If current map is not normalized, wait for that - //normalized name to load instead of continuing. - if (this.map.unnormalized) { - //Normalize the ID if the plugin allows it. - if (plugin.normalize) { - name = plugin.normalize(name, function (name) { - return normalize(name, parentName, true); - }) || ''; - } - - //prefix and name should already be normalized, no need - //for applying map config again either. - normalizedMap = makeModuleMap(map.prefix + '!' + name, - this.map.parentMap); - on(normalizedMap, - 'defined', bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true, - ignore: true - }); - })); - - normalizedMod = getOwn(registry, normalizedMap.id); - if (normalizedMod) { - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(normalizedMap); - - if (this.events.error) { - normalizedMod.on('error', bind(this, function (err) { - this.emit('error', err); - })); - } - normalizedMod.enable(); - } - - return; - } - - load = bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true - }); - }); - - load.error = bind(this, function (err) { - this.inited = true; - this.error = err; - err.requireModules = [id]; - - //Remove temp unnormalized modules for this module, - //since they will never be resolved otherwise now. - eachProp(registry, function (mod) { - if (mod.map.id.indexOf(id + '_unnormalized') === 0) { - cleanRegistry(mod.map.id); - } - }); - - onError(err); - }); - - //Allow plugins to load other code without having to know the - //context or how to 'complete' the load. - load.fromText = bind(this, function (text, textAlt) { - /*jslint evil: true */ - var moduleName = map.name, - moduleMap = makeModuleMap(moduleName), - hasInteractive = useInteractive; - - //As of 2.1.0, support just passing the text, to reinforce - //fromText only being called once per resource. Still - //support old style of passing moduleName but discard - //that moduleName in favor of the internal ref. - if (textAlt) { - text = textAlt; - } - - //Turn off interactive script matching for IE for any define - //calls in the text, then turn it back on at the end. - if (hasInteractive) { - useInteractive = false; - } - - //Prime the system by creating a module instance for - //it. - getModule(moduleMap); - - //Transfer any config to this other module. - if (hasProp(config.config, id)) { - config.config[moduleName] = config.config[id]; - } - - try { - req.exec(text); - } catch (e) { - return onError(makeError('fromtexteval', - 'fromText eval for ' + id + - ' failed: ' + e, - e, - [id])); - } - - if (hasInteractive) { - useInteractive = true; - } - - //Mark this as a dependency for the plugin - //resource - this.depMaps.push(moduleMap); - - //Support anonymous modules. - context.completeLoad(moduleName); - - //Bind the value of that module to the value for this - //resource ID. - localRequire([moduleName], load); - }); - - //Use parentName here since the plugin's name is not reliable, - //could be some weird string with no path that actually wants to - //reference the parentName's path. - plugin.load(map.name, localRequire, load, config); - })); - - context.enable(pluginMap, this); - this.pluginMaps[pluginMap.id] = pluginMap; - }, - - enable: function () { - enabledRegistry[this.map.id] = this; - this.enabled = true; - - //Set flag mentioning that the module is enabling, - //so that immediate calls to the defined callbacks - //for dependencies do not trigger inadvertent load - //with the depCount still being zero. - this.enabling = true; - - //Enable each dependency - each(this.depMaps, bind(this, function (depMap, i) { - var id, mod, handler; - - if (typeof depMap === 'string') { - //Dependency needs to be converted to a depMap - //and wired up to this module. - depMap = makeModuleMap(depMap, - (this.map.isDefine ? this.map : this.map.parentMap), - false, - !this.skipMap); - this.depMaps[i] = depMap; - - handler = getOwn(handlers, depMap.id); - - if (handler) { - this.depExports[i] = handler(this); - return; - } - - this.depCount += 1; - - on(depMap, 'defined', bind(this, function (depExports) { - this.defineDep(i, depExports); - this.check(); - })); - - if (this.errback) { - on(depMap, 'error', bind(this, this.errback)); - } - } - - id = depMap.id; - mod = registry[id]; - - //Skip special modules like 'require', 'exports', 'module' - //Also, don't call enable if it is already enabled, - //important in circular dependency cases. - if (!hasProp(handlers, id) && mod && !mod.enabled) { - context.enable(depMap, this); - } - })); - - //Enable each plugin that is used in - //a dependency - eachProp(this.pluginMaps, bind(this, function (pluginMap) { - var mod = getOwn(registry, pluginMap.id); - if (mod && !mod.enabled) { - context.enable(pluginMap, this); - } - })); - - this.enabling = false; - - this.check(); - }, - - on: function (name, cb) { - var cbs = this.events[name]; - if (!cbs) { - cbs = this.events[name] = []; - } - cbs.push(cb); - }, - - emit: function (name, evt) { - each(this.events[name], function (cb) { - cb(evt); - }); - if (name === 'error') { - //Now that the error handler was triggered, remove - //the listeners, since this broken Module instance - //can stay around for a while in the registry. - delete this.events[name]; - } - } - }; - - function callGetModule(args) { - //Skip modules already defined. - if (!hasProp(defined, args[0])) { - getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); - } - } - - function removeListener(node, func, name, ieName) { - //Favor detachEvent because of IE9 - //issue, see attachEvent/addEventListener comment elsewhere - //in this file. - if (node.detachEvent && !isOpera) { - //Probably IE. If not it will throw an error, which will be - //useful to know. - if (ieName) { - node.detachEvent(ieName, func); - } - } else { - node.removeEventListener(name, func, false); - } - } - - /** - * Given an event from a script node, get the requirejs info from it, - * and then removes the event listeners on the node. - * @param {Event} evt - * @returns {Object} - */ - function getScriptData(evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - var node = evt.currentTarget || evt.srcElement; - - //Remove the listeners once here. - removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); - removeListener(node, context.onScriptError, 'error'); - - return { - node: node, - id: node && node.getAttribute('data-requiremodule') - }; - } - - function intakeDefines() { - var args; - - //Any defined modules in the global queue, intake them now. - takeGlobalQueue(); - - //Make sure any remaining defQueue items get properly processed. - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); - } else { - //args are id, deps, factory. Should be normalized by the - //define() function. - callGetModule(args); - } - } - } - - context = { - config: config, - contextName: contextName, - registry: registry, - defined: defined, - urlFetched: urlFetched, - defQueue: defQueue, - Module: Module, - makeModuleMap: makeModuleMap, - nextTick: req.nextTick, - onError: onError, - - /** - * Set a configuration for the context. - * @param {Object} cfg config object to integrate. - */ - configure: function (cfg) { - //Make sure the baseUrl ends in a slash. - if (cfg.baseUrl) { - if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { - cfg.baseUrl += '/'; - } - } - - //Save off the paths and packages since they require special processing, - //they are additive. - var pkgs = config.pkgs, - shim = config.shim, - objs = { - paths: true, - config: true, - map: true - }; - - eachProp(cfg, function (value, prop) { - if (objs[prop]) { - if (prop === 'map') { - if (!config.map) { - config.map = {}; - } - mixin(config[prop], value, true, true); - } else { - mixin(config[prop], value, true); - } - } else { - config[prop] = value; - } - }); - - //Merge shim - if (cfg.shim) { - eachProp(cfg.shim, function (value, id) { - //Normalize the structure - if (isArray(value)) { - value = { - deps: value - }; - } - if ((value.exports || value.init) && !value.exportsFn) { - value.exportsFn = context.makeShimExports(value); - } - shim[id] = value; - }); - config.shim = shim; - } - - //Adjust packages if necessary. - if (cfg.packages) { - each(cfg.packages, function (pkgObj) { - var location; - - pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; - location = pkgObj.location; - - //Create a brand new object on pkgs, since currentPackages can - //be passed in again, and config.pkgs is the internal transformed - //state for all package configs. - pkgs[pkgObj.name] = { - name: pkgObj.name, - location: location || pkgObj.name, - //Remove leading dot in main, so main paths are normalized, - //and remove any trailing .js, since different package - //envs have different conventions: some use a module name, - //some use a file name. - main: (pkgObj.main || 'main') - .replace(currDirRegExp, '') - .replace(jsSuffixRegExp, '') - }; - }); - - //Done with modifications, assing packages back to context config - config.pkgs = pkgs; - } - - //If there are any "waiting to execute" modules in the registry, - //update the maps for them, since their info, like URLs to load, - //may have changed. - eachProp(registry, function (mod, id) { - //If module already has init called, since it is too - //late to modify them, and ignore unnormalized ones - //since they are transient. - if (!mod.inited && !mod.map.unnormalized) { - mod.map = makeModuleMap(id); - } - }); - - //If a deps array or a config callback is specified, then call - //require with those args. This is useful when require is defined as a - //config object before require.js is loaded. - if (cfg.deps || cfg.callback) { - context.require(cfg.deps || [], cfg.callback); - } - }, - - makeShimExports: function (value) { - function fn() { - var ret; - if (value.init) { - ret = value.init.apply(global, arguments); - } - return ret || (value.exports && getGlobal(value.exports)); - } - return fn; - }, - - makeRequire: function (relMap, options) { - options = options || {}; - - function localRequire(deps, callback, errback) { - var id, map, requireMod; - - if (options.enableBuildCallback && callback && isFunction(callback)) { - callback.__requireJsBuild = true; - } - - if (typeof deps === 'string') { - if (isFunction(callback)) { - //Invalid call - return onError(makeError('requireargs', 'Invalid require call'), errback); - } - - //If require|exports|module are requested, get the - //value for them from the special handlers. Caveat: - //this only works while module is being defined. - if (relMap && hasProp(handlers, deps)) { - return handlers[deps](registry[relMap.id]); - } - - //Synchronous access to one module. If require.get is - //available (as in the Node adapter), prefer that. - if (req.get) { - return req.get(context, deps, relMap, localRequire); - } - - //Normalize module name, if it contains . or .. - map = makeModuleMap(deps, relMap, false, true); - id = map.id; - - if (!hasProp(defined, id)) { - return onError(makeError('notloaded', 'Module name "' + - id + - '" has not been loaded yet for context: ' + - contextName + - (relMap ? '' : '. Use require([])'))); - } - return defined[id]; - } - - //Grab defines waiting in the global queue. - intakeDefines(); - - //Mark all the dependencies as needing to be loaded. - context.nextTick(function () { - //Some defines could have been added since the - //require call, collect them. - intakeDefines(); - - requireMod = getModule(makeModuleMap(null, relMap)); - - //Store if map config should be applied to this require - //call for dependencies. - requireMod.skipMap = options.skipMap; - - requireMod.init(deps, callback, errback, { - enabled: true - }); - - checkLoaded(); - }); - - return localRequire; - } - - mixin(localRequire, { - isBrowser: isBrowser, - - /** - * Converts a module name + .extension into an URL path. - * *Requires* the use of a module name. It does not support using - * plain URLs like nameToUrl. - */ - toUrl: function (moduleNamePlusExt) { - var ext, - index = moduleNamePlusExt.lastIndexOf('.'), - segment = moduleNamePlusExt.split('/')[0], - isRelative = segment === '.' || segment === '..'; - - //Have a file extension alias, and it is not the - //dots from a relative path. - if (index !== -1 && (!isRelative || index > 1)) { - ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); - moduleNamePlusExt = moduleNamePlusExt.substring(0, index); - } - - return context.nameToUrl(normalize(moduleNamePlusExt, - relMap && relMap.id, true), ext, true); - }, - - defined: function (id) { - return hasProp(defined, makeModuleMap(id, relMap, false, true).id); - }, - - specified: function (id) { - id = makeModuleMap(id, relMap, false, true).id; - return hasProp(defined, id) || hasProp(registry, id); - } - }); - - //Only allow undef on top level require calls - if (!relMap) { - localRequire.undef = function (id) { - //Bind any waiting define() calls to this context, - //fix for #408 - takeGlobalQueue(); - - var map = makeModuleMap(id, relMap, true), - mod = getOwn(registry, id); - - removeScript(id); - - delete defined[id]; - delete urlFetched[map.url]; - delete undefEvents[id]; - - if (mod) { - //Hold on to listeners in case the - //module will be attempted to be reloaded - //using a different config. - if (mod.events.defined) { - undefEvents[id] = mod.events; - } - - cleanRegistry(id); - } - }; - } - - return localRequire; - }, - - /** - * Called to enable a module if it is still in the registry - * awaiting enablement. A second arg, parent, the parent module, - * is passed in for context, when this method is overriden by - * the optimizer. Not shown here to keep code compact. - */ - enable: function (depMap) { - var mod = getOwn(registry, depMap.id); - if (mod) { - getModule(depMap).enable(); - } - }, - - /** - * Internal method used by environment adapters to complete a load event. - * A load event could be a script load or just a load pass from a synchronous - * load call. - * @param {String} moduleName the name of the module to potentially complete. - */ - completeLoad: function (moduleName) { - var found, args, mod, - shim = getOwn(config.shim, moduleName) || {}, - shExports = shim.exports; - - takeGlobalQueue(); - - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - args[0] = moduleName; - //If already found an anonymous module and bound it - //to this name, then this is some other anon module - //waiting for its completeLoad to fire. - if (found) { - break; - } - found = true; - } else if (args[0] === moduleName) { - //Found matching define call for this script! - found = true; - } - - callGetModule(args); - } - - //Do this after the cycle of callGetModule in case the result - //of those calls/init calls changes the registry. - mod = getOwn(registry, moduleName); - - if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { - if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { - if (hasPathFallback(moduleName)) { - return; - } else { - return onError(makeError('nodefine', - 'No define call for ' + moduleName, - null, - [moduleName])); - } - } else { - //A script that does not call define(), so just simulate - //the call for it. - callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); - } - } - - checkLoaded(); - }, - - /** - * Converts a module name to a file path. Supports cases where - * moduleName may actually be just an URL. - * Note that it **does not** call normalize on the moduleName, - * it is assumed to have already been normalized. This is an - * internal API, not a public one. Use toUrl for the public API. - */ - nameToUrl: function (moduleName, ext, skipExt) { - var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url, - parentPath; - - //If a colon is in the URL, it indicates a protocol is used and it is just - //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) - //or ends with .js, then assume the user meant to use an url and not a module id. - //The slash is important for protocol-less URLs as well as full paths. - if (req.jsExtRegExp.test(moduleName)) { - //Just a plain path, not module name lookup, so just return it. - //Add extension if it is included. This is a bit wonky, only non-.js things pass - //an extension, this method probably needs to be reworked. - url = moduleName + (ext || ''); - } else { - //A module that needs to be converted to a path. - paths = config.paths; - pkgs = config.pkgs; - - syms = moduleName.split('/'); - //For each module name segment, see if there is a path - //registered for it. Start with most specific name - //and work up from it. - for (i = syms.length; i > 0; i -= 1) { - parentModule = syms.slice(0, i).join('/'); - pkg = getOwn(pkgs, parentModule); - parentPath = getOwn(paths, parentModule); - if (parentPath) { - //If an array, it means there are a few choices, - //Choose the one that is desired - if (isArray(parentPath)) { - parentPath = parentPath[0]; - } - syms.splice(0, i, parentPath); - break; - } else if (pkg) { - //If module name is just the package name, then looking - //for the main module. - if (moduleName === pkg.name) { - pkgPath = pkg.location + '/' + pkg.main; - } else { - pkgPath = pkg.location; - } - syms.splice(0, i, pkgPath); - break; - } - } - - //Join the path parts together, then figure out if baseUrl is needed. - url = syms.join('/'); - url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); - url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; - } - - return config.urlArgs ? url + - ((url.indexOf('?') === -1 ? '?' : '&') + - config.urlArgs) : url; - }, - - //Delegates to req.load. Broken out as a separate function to - //allow overriding in the optimizer. - load: function (id, url) { - req.load(context, id, url); - }, - - /** - * Executes a module callback function. Broken out as a separate function - * solely to allow the build system to sequence the files in the built - * layer in the right sequence. - * - * @private - */ - execCb: function (name, callback, args, exports) { - return callback.apply(exports, args); - }, - - /** - * callback for script loads, used to check status of loading. - * - * @param {Event} evt the event from the browser for the script - * that was loaded. - */ - onScriptLoad: function (evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - if (evt.type === 'load' || - (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { - //Reset interactive script so a script node is not held onto for - //to long. - interactiveScript = null; - - //Pull out the name of the module and the context. - var data = getScriptData(evt); - context.completeLoad(data.id); - } - }, - - /** - * Callback for script errors. - */ - onScriptError: function (evt) { - var data = getScriptData(evt); - if (!hasPathFallback(data.id)) { - return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); - } - } - }; - - context.require = context.makeRequire(); - return context; - } - - /** - * Main entry point. - * - * If the only argument to require is a string, then the module that - * is represented by that string is fetched for the appropriate context. - * - * If the first argument is an array, then it will be treated as an array - * of dependency string names to fetch. An optional function callback can - * be specified to execute when all of those dependencies are available. - * - * Make a local req variable to help Caja compliance (it assumes things - * on a require that are not standardized), and to give a short - * name for minification/local scope use. - */ - req = requirejs = function (deps, callback, errback, optional) { - - //Find the right context, use default - var context, config, - contextName = defContextName; - - // Determine if have config object in the call. - if (!isArray(deps) && typeof deps !== 'string') { - // deps is a config object - config = deps; - if (isArray(callback)) { - // Adjust args if there are dependencies - deps = callback; - callback = errback; - errback = optional; - } else { - deps = []; - } - } - - if (config && config.context) { - contextName = config.context; - } - - context = getOwn(contexts, contextName); - if (!context) { - context = contexts[contextName] = req.s.newContext(contextName); - } - - if (config) { - context.configure(config); - } - - return context.require(deps, callback, errback); - }; - - /** - * Support require.config() to make it easier to cooperate with other - * AMD loaders on globally agreed names. - */ - req.config = function (config) { - return req(config); - }; - - /** - * Execute something after the current tick - * of the event loop. Override for other envs - * that have a better solution than setTimeout. - * @param {Function} fn function to execute later. - */ - req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { - setTimeout(fn, 4); - } : function (fn) { fn(); }; - - /** - * Export require as a global, but only if it does not already exist. - */ - if (!require) { - require = req; - } - - req.version = version; - - //Used to filter out dependencies that are already paths. - req.jsExtRegExp = /^\/|:|\?|\.js$/; - req.isBrowser = isBrowser; - s = req.s = { - contexts: contexts, - newContext: newContext - }; - - //Create default context. - req({}); - - //Exports some context-sensitive methods on global require. - each([ - 'toUrl', - 'undef', - 'defined', - 'specified' - ], function (prop) { - //Reference from contexts instead of early binding to default context, - //so that during builds, the latest instance of the default context - //with its config gets used. - req[prop] = function () { - var ctx = contexts[defContextName]; - return ctx.require[prop].apply(ctx, arguments); - }; - }); - - if (isBrowser) { - head = s.head = document.getElementsByTagName('head')[0]; - //If BASE tag is in play, using appendChild is a problem for IE6. - //When that browser dies, this can be removed. Details in this jQuery bug: - //http://dev.jquery.com/ticket/2709 - baseElement = document.getElementsByTagName('base')[0]; - if (baseElement) { - head = s.head = baseElement.parentNode; - } - } - - /** - * Any errors that require explicitly generates will be passed to this - * function. Intercept/override it if you want custom error handling. - * @param {Error} err the error object. - */ - req.onError = defaultOnError; - - /** - * Creates the node for the load command. Only used in browser envs. - */ - req.createNode = function (config, moduleName, url) { - var node = config.xhtml ? - document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : - document.createElement('script'); - node.type = config.scriptType || 'text/javascript'; - node.charset = 'utf-8'; - node.async = true; - return node; - }; - - /** - * Does the request to load a module for the browser case. - * Make this a separate function to allow other environments - * to override it. - * - * @param {Object} context the require context to find state. - * @param {String} moduleName the name of the module. - * @param {Object} url the URL to the module. - */ - req.load = function (context, moduleName, url) { - var config = (context && context.config) || {}, - node; - if (isBrowser) { - //In the browser so use a script tag - node = req.createNode(config, moduleName, url); - - node.setAttribute('data-requirecontext', context.contextName); - node.setAttribute('data-requiremodule', moduleName); - - //Set up load listener. Test attachEvent first because IE9 has - //a subtle issue in its addEventListener and script onload firings - //that do not match the behavior of all other browsers with - //addEventListener support, which fire the onload event for a - //script right after the script execution. See: - //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution - //UNFORTUNATELY Opera implements attachEvent but does not follow the script - //script execution mode. - if (node.attachEvent && - //Check if node.attachEvent is artificially added by custom script or - //natively supported by browser - //read https://github.com/jrburke/requirejs/issues/187 - //if we can NOT find [native code] then it must NOT natively supported. - //in IE8, node.attachEvent does not have toString() - //Note the test for "[native code" with no closing brace, see: - //https://github.com/jrburke/requirejs/issues/273 - !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && - !isOpera) { - //Probably IE. IE (at least 6-8) do not fire - //script onload right after executing the script, so - //we cannot tie the anonymous define call to a name. - //However, IE reports the script as being in 'interactive' - //readyState at the time of the define call. - useInteractive = true; - - node.attachEvent('onreadystatechange', context.onScriptLoad); - //It would be great to add an error handler here to catch - //404s in IE9+. However, onreadystatechange will fire before - //the error handler, so that does not help. If addEventListener - //is used, then IE will fire error before load, but we cannot - //use that pathway given the connect.microsoft.com issue - //mentioned above about not doing the 'script execute, - //then fire the script load event listener before execute - //next script' that other browsers do. - //Best hope: IE10 fixes the issues, - //and then destroys all installs of IE 6-9. - //node.attachEvent('onerror', context.onScriptError); - } else { - node.addEventListener('load', context.onScriptLoad, false); - node.addEventListener('error', context.onScriptError, false); - } - node.src = url; - - //For some cache cases in IE 6-8, the script executes before the end - //of the appendChild execution, so to tie an anonymous define - //call to the module name (which is stored on the node), hold on - //to a reference to this node, but clear after the DOM insertion. - currentlyAddingScript = node; - if (baseElement) { - head.insertBefore(node, baseElement); - } else { - head.appendChild(node); - } - currentlyAddingScript = null; - - return node; - } else if (isWebWorker) { - try { - //In a web worker, use importScripts. This is not a very - //efficient use of importScripts, importScripts will block until - //its script is downloaded and evaluated. However, if web workers - //are in play, the expectation that a build has been done so that - //only one script needs to be loaded anyway. This may need to be - //reevaluated if other use cases become common. - importScripts(url); - - //Account for anonymous modules - context.completeLoad(moduleName); - } catch (e) { - context.onError(makeError('importscripts', - 'importScripts failed for ' + - moduleName + ' at ' + url, - e, - [moduleName])); - } - } - }; - - function getInteractiveScript() { - if (interactiveScript && interactiveScript.readyState === 'interactive') { - return interactiveScript; - } - - eachReverse(scripts(), function (script) { - if (script.readyState === 'interactive') { - return (interactiveScript = script); - } - }); - return interactiveScript; - } - - //Look for a data-main script attribute, which could also adjust the baseUrl. - if (isBrowser && !cfg.skipDataMain) { - //Figure out baseUrl. Get it from the script tag with require.js in it. - eachReverse(scripts(), function (script) { - //Set the 'head' where we can append children by - //using the script's parent. - if (!head) { - head = script.parentNode; - } - - //Look for a data-main attribute to set main script for the page - //to load. If it is there, the path to data main becomes the - //baseUrl, if it is not already set. - dataMain = script.getAttribute('data-main'); - if (dataMain) { - //Preserve dataMain in case it is a path (i.e. contains '?') - mainScript = dataMain; - - //Set final baseUrl if there is not already an explicit one. - if (!cfg.baseUrl) { - //Pull off the directory of data-main for use as the - //baseUrl. - src = mainScript.split('/'); - mainScript = src.pop(); - subPath = src.length ? src.join('/') + '/' : './'; - - cfg.baseUrl = subPath; - } - - //Strip off any trailing .js since mainScript is now - //like a module name. - mainScript = mainScript.replace(jsSuffixRegExp, ''); - - //If mainScript is still a path, fall back to dataMain - if (req.jsExtRegExp.test(mainScript)) { - mainScript = dataMain; - } - - //Put the data-main script in the files to load. - cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; - - return true; - } - }); - } - - /** - * The function that handles definitions of modules. Differs from - * require() in that a string for the module should be the first argument, - * and the function to execute after dependencies are loaded should - * return a value to define the module corresponding to the first argument's - * name. - */ - define = function (name, deps, callback) { - var node, context; - - //Allow for anonymous modules - if (typeof name !== 'string') { - //Adjust args appropriately - callback = deps; - deps = name; - name = null; - } - - //This module may not have dependencies - if (!isArray(deps)) { - callback = deps; - deps = null; - } - - //If no name, and callback is a function, then figure out if it a - //CommonJS thing with dependencies. - if (!deps && isFunction(callback)) { - deps = []; - //Remove comments from the callback string, - //look for require calls, and pull them into the dependencies, - //but only if there are function args. - if (callback.length) { - callback - .toString() - .replace(commentRegExp, '') - .replace(cjsRequireRegExp, function (match, dep) { - deps.push(dep); - }); - - //May be a CommonJS thing even without require calls, but still - //could use exports, and module. Avoid doing exports and module - //work though if it just needs require. - //REQUIRES the function to expect the CommonJS variables in the - //order listed below. - deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); - } - } - - //If in IE 6-8 and hit an anonymous define() call, do the interactive - //work. - if (useInteractive) { - node = currentlyAddingScript || getInteractiveScript(); - if (node) { - if (!name) { - name = node.getAttribute('data-requiremodule'); - } - context = contexts[node.getAttribute('data-requirecontext')]; - } - } - - //Always save off evaluating the def call until the script onload handler. - //This allows multiple modules to be in a file without prematurely - //tracing dependencies, and allows for anonymous module support, - //where the module name is not known until the script onload event - //occurs. If no context, use the global queue, and get it processed - //in the onscript load callback. - (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); - }; - - define.amd = { - jQuery: true - }; - - - /** - * Executes the text. Normally just uses eval, but can be modified - * to use a better, environment-specific call. Only used for transpiling - * loader plugins, not for plain JS modules. - * @param {String} text the text to execute/evaluate. - */ - req.exec = function (text) { - /*jslint evil: true */ - return eval(text); - }; - - //Set up with config info. - req(cfg); -}(this)); - - - - this.requirejsVars = { - require: require, - requirejs: require, - define: define - }; - - if (env === 'browser') { - /** - * @license RequireJS rhino Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -//sloppy since eval enclosed with use strict causes problems if the source -//text is not strict-compliant. -/*jslint sloppy: true, evil: true */ -/*global require, XMLHttpRequest */ - -(function () { - require.load = function (context, moduleName, url) { - var xhr = new XMLHttpRequest(); - - xhr.open('GET', url, true); - xhr.send(); - - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - eval(xhr.responseText); - - //Support anonymous modules. - context.completeLoad(moduleName); - } - }; - }; -}()); - } else if (env === 'rhino') { - /** - * @license RequireJS rhino Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint */ -/*global require: false, java: false, load: false */ - -(function () { - 'use strict'; - require.load = function (context, moduleName, url) { - - load(url); - - //Support anonymous modules. - context.completeLoad(moduleName); - }; - -}()); - } else if (env === 'node') { - this.requirejsVars.nodeRequire = nodeRequire; - require.nodeRequire = nodeRequire; - - /** - * @license RequireJS node Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint regexp: false */ -/*global require: false, define: false, requirejsVars: false, process: false */ - -/** - * This adapter assumes that x.js has loaded it and set up - * some variables. This adapter just allows limited RequireJS - * usage from within the requirejs directory. The general - * node adapater is r.js. - */ - -(function () { - 'use strict'; - - var nodeReq = requirejsVars.nodeRequire, - req = requirejsVars.require, - def = requirejsVars.define, - fs = nodeReq('fs'), - path = nodeReq('path'), - vm = nodeReq('vm'), - //In Node 0.7+ existsSync is on fs. - exists = fs.existsSync || path.existsSync, - hasOwn = Object.prototype.hasOwnProperty; - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - function syncTick(fn) { - fn(); - } - - function makeError(message, moduleName) { - var err = new Error(message); - err.requireModules = [moduleName]; - return err; - } - - //Supply an implementation that allows synchronous get of a module. - req.get = function (context, moduleName, relModuleMap, localRequire) { - if (moduleName === "require" || moduleName === "exports" || moduleName === "module") { - context.onError(makeError("Explicit require of " + moduleName + " is not allowed.", moduleName)); - } - - var ret, oldTick, - moduleMap = context.makeModuleMap(moduleName, relModuleMap, false, true); - - //Normalize module name, if it contains . or .. - moduleName = moduleMap.id; - - if (hasProp(context.defined, moduleName)) { - ret = context.defined[moduleName]; - } else { - if (ret === undefined) { - //Make sure nextTick for this type of call is sync-based. - oldTick = context.nextTick; - context.nextTick = syncTick; - try { - if (moduleMap.prefix) { - //A plugin, call requirejs to handle it. Now that - //nextTick is syncTick, the require will complete - //synchronously. - localRequire([moduleMap.originalName]); - - //Now that plugin is loaded, can regenerate the moduleMap - //to get the final, normalized ID. - moduleMap = context.makeModuleMap(moduleMap.originalName, relModuleMap, false, true); - moduleName = moduleMap.id; - } else { - //Try to dynamically fetch it. - req.load(context, moduleName, moduleMap.url); - - //Enable the module - context.enable(moduleMap, relModuleMap); - } - - //Break any cycles by requiring it normally, but this will - //finish synchronously - require([moduleName]); - - //The above calls are sync, so can do the next thing safely. - ret = context.defined[moduleName]; - } finally { - context.nextTick = oldTick; - } - } - } - - return ret; - }; - - req.nextTick = function (fn) { - process.nextTick(fn); - }; - - //Add wrapper around the code so that it gets the requirejs - //API instead of the Node API, and it is done lexically so - //that it survives later execution. - req.makeNodeWrapper = function (contents) { - return '(function (require, requirejs, define) { ' + - contents + - '\n}(requirejsVars.require, requirejsVars.requirejs, requirejsVars.define));'; - }; - - req.load = function (context, moduleName, url) { - var contents, err, - config = context.config; - - if (config.shim[moduleName] && (!config.suppress || !config.suppress.nodeShim)) { - console.warn('Shim config not supported in Node, may or may not work. Detected ' + - 'for module: ' + moduleName); - } - - if (exists(url)) { - contents = fs.readFileSync(url, 'utf8'); - - contents = req.makeNodeWrapper(contents); - try { - vm.runInThisContext(contents, fs.realpathSync(url)); - } catch (e) { - err = new Error('Evaluating ' + url + ' as module "' + - moduleName + '" failed with error: ' + e); - err.originalError = e; - err.moduleName = moduleName; - err.requireModules = [moduleName]; - err.fileName = url; - return context.onError(err); - } - } else { - def(moduleName, function () { - //Get the original name, since relative requires may be - //resolved differently in node (issue #202). Also, if relative, - //make it relative to the URL of the item requesting it - //(issue #393) - var dirName, - map = hasProp(context.registry, moduleName) && - context.registry[moduleName].map, - parentMap = map && map.parentMap, - originalName = map && map.originalName; - - if (originalName.charAt(0) === '.' && parentMap) { - dirName = parentMap.url.split('/'); - dirName.pop(); - originalName = dirName.join('/') + '/' + originalName; - } - - try { - return (context.config.nodeRequire || req.nodeRequire)(originalName); - } catch (e) { - err = new Error('Tried loading "' + moduleName + '" at ' + - url + ' then tried node\'s require("' + - originalName + '") and it failed ' + - 'with error: ' + e); - err.originalError = e; - err.moduleName = originalName; - err.requireModules = [moduleName]; - return context.onError(err); - } - }); - } - - //Support anonymous modules. - context.completeLoad(moduleName); - }; - - //Override to provide the function wrapper for define/require. - req.exec = function (text) { - /*jslint evil: true */ - text = req.makeNodeWrapper(text); - return eval(text); - }; -}()); - - } else if (env === 'xpconnect') { - /** - * @license RequireJS xpconnect Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint */ -/*global require, load */ - -(function () { - 'use strict'; - require.load = function (context, moduleName, url) { - - load(url); - - //Support anonymous modules. - context.completeLoad(moduleName); - }; - -}()); - - } - - //Support a default file name to execute. Useful for hosted envs - //like Joyent where it defaults to a server.js as the only executed - //script. But only do it if this is not an optimization run. - if (commandOption !== 'o' && (!fileName || !jsSuffixRegExp.test(fileName))) { - fileName = 'main.js'; - } - - /** - * Loads the library files that can be used for the optimizer, or for other - * tasks. - */ - function loadLib() { - /** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global Packages: false, process: false, window: false, navigator: false, - document: false, define: false */ - -/** - * A plugin that modifies any /env/ path to be the right path based on - * the host environment. Right now only works for Node, Rhino and browser. - */ -(function () { - var pathRegExp = /(\/|^)env\/|\{env\}/, - env = 'unknown'; - - if (typeof Packages !== 'undefined') { - env = 'rhino'; - } else if (typeof process !== 'undefined' && process.versions && !!process.versions.node) { - env = 'node'; - } else if ((typeof navigator !== 'undefined' && typeof document !== 'undefined') || - (typeof importScripts !== 'undefined' && typeof self !== 'undefined')) { - env = 'browser'; - } else if (typeof Components !== 'undefined' && Components.classes && Components.interfaces) { - env = 'xpconnect'; - } - - define('env', { - get: function () { - return env; - }, - - load: function (name, req, load, config) { - //Allow override in the config. - if (config.env) { - env = config.env; - } - - name = name.replace(pathRegExp, function (match, prefix) { - if (match.indexOf('{') === -1) { - return prefix + env + '/'; - } else { - return env; - } - }); - - req([name], function (mod) { - load(mod); - }); - } - }); -}());/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true */ -/*global define */ - -define('lang', function () { - 'use strict'; - - var lang, - hasOwn = Object.prototype.hasOwnProperty; - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - lang = { - backSlashRegExp: /\\/g, - ostring: Object.prototype.toString, - - isArray: Array.isArray || function (it) { - return lang.ostring.call(it) === "[object Array]"; - }, - - isFunction: function(it) { - return lang.ostring.call(it) === "[object Function]"; - }, - - isRegExp: function(it) { - return it && it instanceof RegExp; - }, - - hasProp: hasProp, - - //returns true if the object does not have an own property prop, - //or if it does, it is a falsy value. - falseProp: function (obj, prop) { - return !hasProp(obj, prop) || !obj[prop]; - }, - - //gets own property value for given prop on object - getOwn: function (obj, prop) { - return hasProp(obj, prop) && obj[prop]; - }, - - _mixin: function(dest, source, override){ - var name; - for (name in source) { - if(source.hasOwnProperty(name) && - (override || !dest.hasOwnProperty(name))) { - dest[name] = source[name]; - } - } - - return dest; // Object - }, - - /** - * mixin({}, obj1, obj2) is allowed. If the last argument is a boolean, - * then the source objects properties are force copied over to dest. - */ - mixin: function(dest){ - var parameters = Array.prototype.slice.call(arguments), - override, i, l; - - if (!dest) { dest = {}; } - - if (parameters.length > 2 && typeof arguments[parameters.length-1] === 'boolean') { - override = parameters.pop(); - } - - for (i = 1, l = parameters.length; i < l; i++) { - lang._mixin(dest, parameters[i], override); - } - return dest; // Object - }, - - - /** - * Does a type of deep copy. Do not give it anything fancy, best - * for basic object copies of objects that also work well as - * JSON-serialized things, or has properties pointing to functions. - * For non-array/object values, just returns the same object. - * @param {Object} obj copy properties from this object - * @param {Object} [result] optional result object to use - * @return {Object} - */ - deeplikeCopy: function (obj) { - var type, result; - - if (lang.isArray(obj)) { - result = []; - obj.forEach(function(value) { - result.push(lang.deeplikeCopy(value)); - }); - return result; - } - - type = typeof obj; - if (obj === null || obj === undefined || type === 'boolean' || - type === 'string' || type === 'number' || lang.isFunction(obj) || - lang.isRegExp(obj)) { - return obj; - } - - //Anything else is an object, hopefully. - result = {}; - lang.eachProp(obj, function(value, key) { - result[key] = lang.deeplikeCopy(value); - }); - return result; - }, - - delegate: (function () { - // boodman/crockford delegation w/ cornford optimization - function TMP() {} - return function (obj, props) { - TMP.prototype = obj; - var tmp = new TMP(); - TMP.prototype = null; - if (props) { - lang.mixin(tmp, props); - } - return tmp; // Object - }; - }()), - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - each: function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (func(ary[i], i, ary)) { - break; - } - } - } - }, - - /** - * Cycles over properties in an object and calls a function for each - * property value. If the function returns a truthy value, then the - * iteration is stopped. - */ - eachProp: function eachProp(obj, func) { - var prop; - for (prop in obj) { - if (hasProp(obj, prop)) { - if (func(obj[prop], prop)) { - break; - } - } - } - }, - - //Similar to Function.prototype.bind, but the "this" object is specified - //first, since it is easier to read/figure out what "this" will be. - bind: function bind(obj, fn) { - return function () { - return fn.apply(obj, arguments); - }; - }, - - //Escapes a content string to be be a string that has characters escaped - //for inclusion as part of a JS string. - jsEscape: function (content) { - return content.replace(/(["'\\])/g, '\\$1') - .replace(/[\f]/g, "\\f") - .replace(/[\b]/g, "\\b") - .replace(/[\n]/g, "\\n") - .replace(/[\t]/g, "\\t") - .replace(/[\r]/g, "\\r"); - } - }; - return lang; -}); -/** - * prim 0.0.1 Copyright (c) 2012-2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/requirejs/prim for details - */ - -/*global setImmediate, process, setTimeout, define, module */ - -//Set prime.hideResolutionConflict = true to allow "resolution-races" -//in promise-tests to pass. -//Since the goal of prim is to be a small impl for trusted code, it is -//more important to normally throw in this case so that we can find -//logic errors quicker. - -var prim; -(function () { - 'use strict'; - var op = Object.prototype, - hasOwn = op.hasOwnProperty; - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (ary[i]) { - func(ary[i], i, ary); - } - } - } - } - - function check(p) { - if (hasProp(p, 'e') || hasProp(p, 'v')) { - if (!prim.hideResolutionConflict) { - throw new Error('nope'); - } - return false; - } - return true; - } - - function notify(ary, value) { - prim.nextTick(function () { - each(ary, function (item) { - item(value); - }); - }); - } - - prim = function prim() { - var p, - ok = [], - fail = []; - - return (p = { - callback: function (yes, no) { - if (no) { - p.errback(no); - } - - if (hasProp(p, 'v')) { - prim.nextTick(function () { - yes(p.v); - }); - } else { - ok.push(yes); - } - }, - - errback: function (no) { - if (hasProp(p, 'e')) { - prim.nextTick(function () { - no(p.e); - }); - } else { - fail.push(no); - } - }, - - finished: function () { - return hasProp(p, 'e') || hasProp(p, 'v'); - }, - - rejected: function () { - return hasProp(p, 'e'); - }, - - resolve: function (v) { - if (check(p)) { - p.v = v; - notify(ok, v); - } - return p; - }, - reject: function (e) { - if (check(p)) { - p.e = e; - notify(fail, e); - } - return p; - }, - - start: function (fn) { - p.resolve(); - return p.promise.then(fn); - }, - - promise: { - then: function (yes, no) { - var next = prim(); - - p.callback(function (v) { - try { - if (yes && typeof yes === 'function') { - v = yes(v); - } - - if (v && v.then) { - v.then(next.resolve, next.reject); - } else { - next.resolve(v); - } - } catch (e) { - next.reject(e); - } - }, function (e) { - var err; - - try { - if (!no || typeof no !== 'function') { - next.reject(e); - } else { - err = no(e); - - if (err && err.then) { - err.then(next.resolve, next.reject); - } else { - next.resolve(err); - } - } - } catch (e2) { - next.reject(e2); - } - }); - - return next.promise; - }, - - fail: function (no) { - return p.promise.then(null, no); - }, - - end: function () { - p.errback(function (e) { - throw e; - }); - } - } - }); - }; - - prim.serial = function (ary) { - var result = prim().resolve().promise; - each(ary, function (item) { - result = result.then(function () { - return item(); - }); - }); - return result; - }; - - prim.nextTick = typeof setImmediate === 'function' ? setImmediate : - (typeof process !== 'undefined' && process.nextTick ? - process.nextTick : (typeof setTimeout !== 'undefined' ? - function (fn) { - setTimeout(fn, 0); - } : function (fn) { - fn(); - })); - - if (typeof define === 'function' && define.amd) { - define('prim', function () { return prim; }); - } else if (typeof module !== 'undefined' && module.exports) { - module.exports = prim; - } -}()); -if(env === 'browser') { -/** - * @license RequireJS Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Just a stub for use with uglify's consolidator.js -define('browser/assert', function () { - return {}; -}); - -} - -if(env === 'node') { -/** - * @license RequireJS Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Needed so that rhino/assert can return a stub for uglify's consolidator.js -define('node/assert', ['assert'], function (assert) { - return assert; -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Just a stub for use with uglify's consolidator.js -define('rhino/assert', function () { - return {}; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -//Just a stub for use with uglify's consolidator.js -define('xpconnect/assert', function () { - return {}; -}); - -} - -if(env === 'browser') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, process: false */ - -define('browser/args', function () { - //Always expect config via an API call - return []; -}); - -} - -if(env === 'node') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, process: false */ - -define('node/args', function () { - //Do not return the "node" or "r.js" arguments - var args = process.argv.slice(2); - - //Ignore any command option used for main x.js branching - if (args[0] && args[0].indexOf('-') === 0) { - args = args.slice(1); - } - - return args; -}); - -} - -if(env === 'rhino') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, process: false */ - -var jsLibRhinoArgs = (typeof rhinoArgs !== 'undefined' && rhinoArgs) || [].concat(Array.prototype.slice.call(arguments, 0)); - -define('rhino/args', function () { - var args = jsLibRhinoArgs; - - //Ignore any command option used for main x.js branching - if (args[0] && args[0].indexOf('-') === 0) { - args = args.slice(1); - } - - return args; -}); - -} - -if(env === 'xpconnect') { -/** - * @license Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define, xpconnectArgs */ - -var jsLibXpConnectArgs = (typeof xpconnectArgs !== 'undefined' && xpconnectArgs) || [].concat(Array.prototype.slice.call(arguments, 0)); - -define('xpconnect/args', function () { - var args = jsLibXpConnectArgs; - - //Ignore any command option used for main x.js branching - if (args[0] && args[0].indexOf('-') === 0) { - args = args.slice(1); - } - - return args; -}); - -} - -if(env === 'browser') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('browser/load', ['./file'], function (file) { - function load(fileName) { - eval(file.readFile(fileName)); - } - - return load; -}); - -} - -if(env === 'node') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('node/load', ['fs'], function (fs) { - function load(fileName) { - var contents = fs.readFileSync(fileName, 'utf8'); - process.compile(contents, fileName); - } - - return load; -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -define('rhino/load', function () { - return load; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, load: false */ - -define('xpconnect/load', function () { - return load; -}); - -} - -if(env === 'browser') { -/** - * @license Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint sloppy: true, nomen: true */ -/*global require, define, console, XMLHttpRequest, requirejs, location */ - -define('browser/file', ['prim'], function (prim) { - - var file, - currDirRegExp = /^\.(\/|$)/; - - function frontSlash(path) { - return path.replace(/\\/g, '/'); - } - - function exists(path) { - var status, xhr = new XMLHttpRequest(); - - //Oh yeah, that is right SYNC IO. Behold its glory - //and horrible blocking behavior. - xhr.open('HEAD', path, false); - xhr.send(); - status = xhr.status; - - return status === 200 || status === 304; - } - - function mkDir(dir) { - console.log('mkDir is no-op in browser'); - } - - function mkFullDir(dir) { - console.log('mkFullDir is no-op in browser'); - } - - file = { - backSlashRegExp: /\\/g, - exclusionRegExp: /^\./, - getLineSeparator: function () { - return '/'; - }, - - exists: function (fileName) { - return exists(fileName); - }, - - parent: function (fileName) { - var parts = fileName.split('/'); - parts.pop(); - return parts.join('/'); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {String} fileName - */ - absPath: function (fileName) { - var dir; - if (currDirRegExp.test(fileName)) { - dir = frontSlash(location.href); - if (dir.indexOf('/') !== -1) { - dir = dir.split('/'); - - //Pull off protocol and host, just want - //to allow paths (other build parts, like - //require._isSupportedBuildUrl do not support - //full URLs), but a full path from - //the root. - dir.splice(0, 3); - - dir.pop(); - dir = '/' + dir.join('/'); - } - - fileName = dir + fileName.substring(1); - } - - return fileName; - }, - - normalize: function (fileName) { - return fileName; - }, - - isFile: function (path) { - return true; - }, - - isDirectory: function (path) { - return false; - }, - - getFilteredFileList: function (startDir, regExpFilters, makeUnixPaths) { - console.log('file.getFilteredFileList is no-op in browser'); - }, - - copyDir: function (srcDir, destDir, regExpFilter, onlyCopyNew) { - console.log('file.copyDir is no-op in browser'); - - }, - - copyFile: function (srcFileName, destFileName, onlyCopyNew) { - console.log('file.copyFile is no-op in browser'); - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - console.log('file.renameFile is no-op in browser'); - }, - - /** - * Reads a *text* file. - */ - readFile: function (path, encoding) { - var xhr = new XMLHttpRequest(); - - //Oh yeah, that is right SYNC IO. Behold its glory - //and horrible blocking behavior. - xhr.open('GET', path, false); - xhr.send(); - - return xhr.responseText; - }, - - readFileAsync: function (path, encoding) { - var xhr = new XMLHttpRequest(), - d = prim(); - - xhr.open('GET', path, true); - xhr.send(); - - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - if (xhr.status > 400) { - d.reject(new Error('Status: ' + xhr.status + ': ' + xhr.statusText)); - } else { - d.resolve(xhr.responseText); - } - } - }; - - return d.promise; - }, - - saveUtf8File: function (fileName, fileContents) { - //summary: saves a *text* file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf8"); - }, - - saveFile: function (fileName, fileContents, encoding) { - requirejs.browser.saveFile(fileName, fileContents, encoding); - }, - - deleteFile: function (fileName) { - console.log('file.deleteFile is no-op in browser'); - }, - - /** - * Deletes any empty directories under the given directory. - */ - deleteEmptyDirs: function (startDir) { - console.log('file.deleteEmptyDirs is no-op in browser'); - } - }; - - return file; - -}); - -} - -if(env === 'node') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: false, octal:false, strict: false */ -/*global define: false, process: false */ - -define('node/file', ['fs', 'path', 'prim'], function (fs, path, prim) { - - var isWindows = process.platform === 'win32', - windowsDriveRegExp = /^[a-zA-Z]\:\/$/, - file; - - function frontSlash(path) { - return path.replace(/\\/g, '/'); - } - - function exists(path) { - if (isWindows && path.charAt(path.length - 1) === '/' && - path.charAt(path.length - 2) !== ':') { - path = path.substring(0, path.length - 1); - } - - try { - fs.statSync(path); - return true; - } catch (e) { - return false; - } - } - - function mkDir(dir) { - if (!exists(dir) && (!isWindows || !windowsDriveRegExp.test(dir))) { - fs.mkdirSync(dir, 511); - } - } - - function mkFullDir(dir) { - var parts = dir.split('/'), - currDir = '', - first = true; - - parts.forEach(function (part) { - //First part may be empty string if path starts with a slash. - currDir += part + '/'; - first = false; - - if (part) { - mkDir(currDir); - } - }); - } - - file = { - backSlashRegExp: /\\/g, - exclusionRegExp: /^\./, - getLineSeparator: function () { - return '/'; - }, - - exists: function (fileName) { - return exists(fileName); - }, - - parent: function (fileName) { - var parts = fileName.split('/'); - parts.pop(); - return parts.join('/'); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {String} fileName - */ - absPath: function (fileName) { - return frontSlash(path.normalize(frontSlash(fs.realpathSync(fileName)))); - }, - - normalize: function (fileName) { - return frontSlash(path.normalize(fileName)); - }, - - isFile: function (path) { - return fs.statSync(path).isFile(); - }, - - isDirectory: function (path) { - return fs.statSync(path).isDirectory(); - }, - - getFilteredFileList: function (/*String*/startDir, /*RegExp*/regExpFilters, /*boolean?*/makeUnixPaths) { - //summary: Recurses startDir and finds matches to the files that match regExpFilters.include - //and do not match regExpFilters.exclude. Or just one regexp can be passed in for regExpFilters, - //and it will be treated as the "include" case. - //Ignores files/directories that start with a period (.) unless exclusionRegExp - //is set to another value. - var files = [], topDir, regExpInclude, regExpExclude, dirFileArray, - i, stat, filePath, ok, dirFiles, fileName; - - topDir = startDir; - - regExpInclude = regExpFilters.include || regExpFilters; - regExpExclude = regExpFilters.exclude || null; - - if (file.exists(topDir)) { - dirFileArray = fs.readdirSync(topDir); - for (i = 0; i < dirFileArray.length; i++) { - fileName = dirFileArray[i]; - filePath = path.join(topDir, fileName); - stat = fs.statSync(filePath); - if (stat.isFile()) { - if (makeUnixPaths) { - //Make sure we have a JS string. - if (filePath.indexOf("/") === -1) { - filePath = frontSlash(filePath); - } - } - - ok = true; - if (regExpInclude) { - ok = filePath.match(regExpInclude); - } - if (ok && regExpExclude) { - ok = !filePath.match(regExpExclude); - } - - if (ok && (!file.exclusionRegExp || - !file.exclusionRegExp.test(fileName))) { - files.push(filePath); - } - } else if (stat.isDirectory() && - (!file.exclusionRegExp || !file.exclusionRegExp.test(fileName))) { - dirFiles = this.getFilteredFileList(filePath, regExpFilters, makeUnixPaths); - files.push.apply(files, dirFiles); - } - } - } - - return files; //Array - }, - - copyDir: function (/*String*/srcDir, /*String*/destDir, /*RegExp?*/regExpFilter, /*boolean?*/onlyCopyNew) { - //summary: copies files from srcDir to destDir using the regExpFilter to determine if the - //file should be copied. Returns a list file name strings of the destinations that were copied. - regExpFilter = regExpFilter || /\w/; - - //Normalize th directory names, but keep front slashes. - //path module on windows now returns backslashed paths. - srcDir = frontSlash(path.normalize(srcDir)); - destDir = frontSlash(path.normalize(destDir)); - - var fileNames = file.getFilteredFileList(srcDir, regExpFilter, true), - copiedFiles = [], i, srcFileName, destFileName; - - for (i = 0; i < fileNames.length; i++) { - srcFileName = fileNames[i]; - destFileName = srcFileName.replace(srcDir, destDir); - - if (file.copyFile(srcFileName, destFileName, onlyCopyNew)) { - copiedFiles.push(destFileName); - } - } - - return copiedFiles.length ? copiedFiles : null; //Array or null - }, - - copyFile: function (/*String*/srcFileName, /*String*/destFileName, /*boolean?*/onlyCopyNew) { - //summary: copies srcFileName to destFileName. If onlyCopyNew is set, it only copies the file if - //srcFileName is newer than destFileName. Returns a boolean indicating if the copy occurred. - var parentDir; - - //logger.trace("Src filename: " + srcFileName); - //logger.trace("Dest filename: " + destFileName); - - //If onlyCopyNew is true, then compare dates and only copy if the src is newer - //than dest. - if (onlyCopyNew) { - if (file.exists(destFileName) && fs.statSync(destFileName).mtime.getTime() >= fs.statSync(srcFileName).mtime.getTime()) { - return false; //Boolean - } - } - - //Make sure destination dir exists. - parentDir = path.dirname(destFileName); - if (!file.exists(parentDir)) { - mkFullDir(parentDir); - } - - fs.writeFileSync(destFileName, fs.readFileSync(srcFileName, 'binary'), 'binary'); - - return true; //Boolean - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - return fs.renameSync(from, to); - }, - - /** - * Reads a *text* file. - */ - readFile: function (/*String*/path, /*String?*/encoding) { - if (encoding === 'utf-8') { - encoding = 'utf8'; - } - if (!encoding) { - encoding = 'utf8'; - } - - var text = fs.readFileSync(path, encoding); - - //Hmm, would not expect to get A BOM, but it seems to happen, - //remove it just in case. - if (text.indexOf('\uFEFF') === 0) { - text = text.substring(1, text.length); - } - - return text; - }, - - readFileAsync: function (path, encoding) { - var d = prim(); - try { - d.resolve(file.readFile(path, encoding)); - } catch (e) { - d.reject(e); - } - return d.promise; - }, - - saveUtf8File: function (/*String*/fileName, /*String*/fileContents) { - //summary: saves a *text* file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf8"); - }, - - saveFile: function (/*String*/fileName, /*String*/fileContents, /*String?*/encoding) { - //summary: saves a *text* file. - var parentDir; - - if (encoding === 'utf-8') { - encoding = 'utf8'; - } - if (!encoding) { - encoding = 'utf8'; - } - - //Make sure destination directories exist. - parentDir = path.dirname(fileName); - if (!file.exists(parentDir)) { - mkFullDir(parentDir); - } - - fs.writeFileSync(fileName, fileContents, encoding); - }, - - deleteFile: function (/*String*/fileName) { - //summary: deletes a file or directory if it exists. - var files, i, stat; - if (file.exists(fileName)) { - stat = fs.statSync(fileName); - if (stat.isDirectory()) { - files = fs.readdirSync(fileName); - for (i = 0; i < files.length; i++) { - this.deleteFile(path.join(fileName, files[i])); - } - fs.rmdirSync(fileName); - } else { - fs.unlinkSync(fileName); - } - } - }, - - - /** - * Deletes any empty directories under the given directory. - */ - deleteEmptyDirs: function (startDir) { - var dirFileArray, i, fileName, filePath, stat; - - if (file.exists(startDir)) { - dirFileArray = fs.readdirSync(startDir); - for (i = 0; i < dirFileArray.length; i++) { - fileName = dirFileArray[i]; - filePath = path.join(startDir, fileName); - stat = fs.statSync(filePath); - if (stat.isDirectory()) { - file.deleteEmptyDirs(filePath); - } - } - - //If directory is now empty, remove it. - if (fs.readdirSync(startDir).length === 0) { - file.deleteFile(startDir); - } - } - } - }; - - return file; - -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -//Helper functions to deal with file I/O. - -/*jslint plusplus: false */ -/*global java: false, define: false */ - -define('rhino/file', ['prim'], function (prim) { - var file = { - backSlashRegExp: /\\/g, - - exclusionRegExp: /^\./, - - getLineSeparator: function () { - return file.lineSeparator; - }, - - lineSeparator: java.lang.System.getProperty("line.separator"), //Java String - - exists: function (fileName) { - return (new java.io.File(fileName)).exists(); - }, - - parent: function (fileName) { - return file.absPath((new java.io.File(fileName)).getParentFile()); - }, - - normalize: function (fileName) { - return file.absPath(fileName); - }, - - isFile: function (path) { - return (new java.io.File(path)).isFile(); - }, - - isDirectory: function (path) { - return (new java.io.File(path)).isDirectory(); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {java.io.File||String} file - */ - absPath: function (fileObj) { - if (typeof fileObj === "string") { - fileObj = new java.io.File(fileObj); - } - return (fileObj.getCanonicalPath() + "").replace(file.backSlashRegExp, "/"); - }, - - getFilteredFileList: function (/*String*/startDir, /*RegExp*/regExpFilters, /*boolean?*/makeUnixPaths, /*boolean?*/startDirIsJavaObject) { - //summary: Recurses startDir and finds matches to the files that match regExpFilters.include - //and do not match regExpFilters.exclude. Or just one regexp can be passed in for regExpFilters, - //and it will be treated as the "include" case. - //Ignores files/directories that start with a period (.) unless exclusionRegExp - //is set to another value. - var files = [], topDir, regExpInclude, regExpExclude, dirFileArray, - i, fileObj, filePath, ok, dirFiles; - - topDir = startDir; - if (!startDirIsJavaObject) { - topDir = new java.io.File(startDir); - } - - regExpInclude = regExpFilters.include || regExpFilters; - regExpExclude = regExpFilters.exclude || null; - - if (topDir.exists()) { - dirFileArray = topDir.listFiles(); - for (i = 0; i < dirFileArray.length; i++) { - fileObj = dirFileArray[i]; - if (fileObj.isFile()) { - filePath = fileObj.getPath(); - if (makeUnixPaths) { - //Make sure we have a JS string. - filePath = String(filePath); - if (filePath.indexOf("/") === -1) { - filePath = filePath.replace(/\\/g, "/"); - } - } - - ok = true; - if (regExpInclude) { - ok = filePath.match(regExpInclude); - } - if (ok && regExpExclude) { - ok = !filePath.match(regExpExclude); - } - - if (ok && (!file.exclusionRegExp || - !file.exclusionRegExp.test(fileObj.getName()))) { - files.push(filePath); - } - } else if (fileObj.isDirectory() && - (!file.exclusionRegExp || !file.exclusionRegExp.test(fileObj.getName()))) { - dirFiles = this.getFilteredFileList(fileObj, regExpFilters, makeUnixPaths, true); - files.push.apply(files, dirFiles); - } - } - } - - return files; //Array - }, - - copyDir: function (/*String*/srcDir, /*String*/destDir, /*RegExp?*/regExpFilter, /*boolean?*/onlyCopyNew) { - //summary: copies files from srcDir to destDir using the regExpFilter to determine if the - //file should be copied. Returns a list file name strings of the destinations that were copied. - regExpFilter = regExpFilter || /\w/; - - var fileNames = file.getFilteredFileList(srcDir, regExpFilter, true), - copiedFiles = [], i, srcFileName, destFileName; - - for (i = 0; i < fileNames.length; i++) { - srcFileName = fileNames[i]; - destFileName = srcFileName.replace(srcDir, destDir); - - if (file.copyFile(srcFileName, destFileName, onlyCopyNew)) { - copiedFiles.push(destFileName); - } - } - - return copiedFiles.length ? copiedFiles : null; //Array or null - }, - - copyFile: function (/*String*/srcFileName, /*String*/destFileName, /*boolean?*/onlyCopyNew) { - //summary: copies srcFileName to destFileName. If onlyCopyNew is set, it only copies the file if - //srcFileName is newer than destFileName. Returns a boolean indicating if the copy occurred. - var destFile = new java.io.File(destFileName), srcFile, parentDir, - srcChannel, destChannel; - - //logger.trace("Src filename: " + srcFileName); - //logger.trace("Dest filename: " + destFileName); - - //If onlyCopyNew is true, then compare dates and only copy if the src is newer - //than dest. - if (onlyCopyNew) { - srcFile = new java.io.File(srcFileName); - if (destFile.exists() && destFile.lastModified() >= srcFile.lastModified()) { - return false; //Boolean - } - } - - //Make sure destination dir exists. - parentDir = destFile.getParentFile(); - if (!parentDir.exists()) { - if (!parentDir.mkdirs()) { - throw "Could not create directory: " + parentDir.getCanonicalPath(); - } - } - - //Java's version of copy file. - srcChannel = new java.io.FileInputStream(srcFileName).getChannel(); - destChannel = new java.io.FileOutputStream(destFileName).getChannel(); - destChannel.transferFrom(srcChannel, 0, srcChannel.size()); - srcChannel.close(); - destChannel.close(); - - return true; //Boolean - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - return (new java.io.File(from)).renameTo((new java.io.File(to))); - }, - - readFile: function (/*String*/path, /*String?*/encoding) { - //A file read function that can deal with BOMs - encoding = encoding || "utf-8"; - var fileObj = new java.io.File(path), - input = new java.io.BufferedReader(new java.io.InputStreamReader(new java.io.FileInputStream(fileObj), encoding)), - stringBuffer, line; - try { - stringBuffer = new java.lang.StringBuffer(); - line = input.readLine(); - - // Byte Order Mark (BOM) - The Unicode Standard, version 3.0, page 324 - // http://www.unicode.org/faq/utf_bom.html - - // Note that when we use utf-8, the BOM should appear as "EF BB BF", but it doesn't due to this bug in the JDK: - // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4508058 - if (line && line.length() && line.charAt(0) === 0xfeff) { - // Eat the BOM, since we've already found the encoding on this file, - // and we plan to concatenating this buffer with others; the BOM should - // only appear at the top of a file. - line = line.substring(1); - } - while (line !== null) { - stringBuffer.append(line); - stringBuffer.append(file.lineSeparator); - line = input.readLine(); - } - //Make sure we return a JavaScript string and not a Java string. - return String(stringBuffer.toString()); //String - } finally { - input.close(); - } - }, - - readFileAsync: function (path, encoding) { - var d = prim(); - try { - d.resolve(file.readFile(path, encoding)); - } catch (e) { - d.reject(e); - } - return d.promise; - }, - - saveUtf8File: function (/*String*/fileName, /*String*/fileContents) { - //summary: saves a file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf-8"); - }, - - saveFile: function (/*String*/fileName, /*String*/fileContents, /*String?*/encoding) { - //summary: saves a file. - var outFile = new java.io.File(fileName), outWriter, parentDir, os; - - parentDir = outFile.getAbsoluteFile().getParentFile(); - if (!parentDir.exists()) { - if (!parentDir.mkdirs()) { - throw "Could not create directory: " + parentDir.getAbsolutePath(); - } - } - - if (encoding) { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile), encoding); - } else { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile)); - } - - os = new java.io.BufferedWriter(outWriter); - try { - os.write(fileContents); - } finally { - os.close(); - } - }, - - deleteFile: function (/*String*/fileName) { - //summary: deletes a file or directory if it exists. - var fileObj = new java.io.File(fileName), files, i; - if (fileObj.exists()) { - if (fileObj.isDirectory()) { - files = fileObj.listFiles(); - for (i = 0; i < files.length; i++) { - this.deleteFile(files[i]); - } - } - fileObj["delete"](); - } - }, - - /** - * Deletes any empty directories under the given directory. - * The startDirIsJavaObject is private to this implementation's - * recursion needs. - */ - deleteEmptyDirs: function (startDir, startDirIsJavaObject) { - var topDir = startDir, - dirFileArray, i, fileObj; - - if (!startDirIsJavaObject) { - topDir = new java.io.File(startDir); - } - - if (topDir.exists()) { - dirFileArray = topDir.listFiles(); - for (i = 0; i < dirFileArray.length; i++) { - fileObj = dirFileArray[i]; - if (fileObj.isDirectory()) { - file.deleteEmptyDirs(fileObj, true); - } - } - - //If the directory is empty now, delete it. - if (topDir.listFiles().length === 0) { - file.deleteFile(String(topDir.getPath())); - } - } - } - }; - - return file; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -//Helper functions to deal with file I/O. - -/*jslint plusplus: false */ -/*global define, Components, xpcUtil */ - -define('xpconnect/file', ['prim'], function (prim) { - var file, - Cc = Components.classes, - Ci = Components.interfaces, - //Depends on xpcUtil which is set up in x.js - xpfile = xpcUtil.xpfile; - - function mkFullDir(dirObj) { - //1 is DIRECTORY_TYPE, 511 is 0777 permissions - if (!dirObj.exists()) { - dirObj.create(1, 511); - } - } - - file = { - backSlashRegExp: /\\/g, - - exclusionRegExp: /^\./, - - getLineSeparator: function () { - return file.lineSeparator; - }, - - lineSeparator: ('@mozilla.org/windows-registry-key;1' in Cc) ? - '\r\n' : '\n', - - exists: function (fileName) { - return xpfile(fileName).exists(); - }, - - parent: function (fileName) { - return xpfile(fileName).parent; - }, - - normalize: function (fileName) { - return file.absPath(fileName); - }, - - isFile: function (path) { - return xpfile(path).isFile(); - }, - - isDirectory: function (path) { - return xpfile(path).isDirectory(); - }, - - /** - * Gets the absolute file path as a string, normalized - * to using front slashes for path separators. - * @param {java.io.File||String} file - */ - absPath: function (fileObj) { - if (typeof fileObj === "string") { - fileObj = xpfile(fileObj); - } - return fileObj.path; - }, - - getFilteredFileList: function (/*String*/startDir, /*RegExp*/regExpFilters, /*boolean?*/makeUnixPaths, /*boolean?*/startDirIsObject) { - //summary: Recurses startDir and finds matches to the files that match regExpFilters.include - //and do not match regExpFilters.exclude. Or just one regexp can be passed in for regExpFilters, - //and it will be treated as the "include" case. - //Ignores files/directories that start with a period (.) unless exclusionRegExp - //is set to another value. - var files = [], topDir, regExpInclude, regExpExclude, dirFileArray, - fileObj, filePath, ok, dirFiles; - - topDir = startDir; - if (!startDirIsObject) { - topDir = xpfile(startDir); - } - - regExpInclude = regExpFilters.include || regExpFilters; - regExpExclude = regExpFilters.exclude || null; - - if (topDir.exists()) { - dirFileArray = topDir.directoryEntries; - while (dirFileArray.hasMoreElements()) { - fileObj = dirFileArray.getNext().QueryInterface(Ci.nsILocalFile); - if (fileObj.isFile()) { - filePath = fileObj.path; - if (makeUnixPaths) { - if (filePath.indexOf("/") === -1) { - filePath = filePath.replace(/\\/g, "/"); - } - } - - ok = true; - if (regExpInclude) { - ok = filePath.match(regExpInclude); - } - if (ok && regExpExclude) { - ok = !filePath.match(regExpExclude); - } - - if (ok && (!file.exclusionRegExp || - !file.exclusionRegExp.test(fileObj.leafName))) { - files.push(filePath); - } - } else if (fileObj.isDirectory() && - (!file.exclusionRegExp || !file.exclusionRegExp.test(fileObj.leafName))) { - dirFiles = this.getFilteredFileList(fileObj, regExpFilters, makeUnixPaths, true); - files.push.apply(files, dirFiles); - } - } - } - - return files; //Array - }, - - copyDir: function (/*String*/srcDir, /*String*/destDir, /*RegExp?*/regExpFilter, /*boolean?*/onlyCopyNew) { - //summary: copies files from srcDir to destDir using the regExpFilter to determine if the - //file should be copied. Returns a list file name strings of the destinations that were copied. - regExpFilter = regExpFilter || /\w/; - - var fileNames = file.getFilteredFileList(srcDir, regExpFilter, true), - copiedFiles = [], i, srcFileName, destFileName; - - for (i = 0; i < fileNames.length; i += 1) { - srcFileName = fileNames[i]; - destFileName = srcFileName.replace(srcDir, destDir); - - if (file.copyFile(srcFileName, destFileName, onlyCopyNew)) { - copiedFiles.push(destFileName); - } - } - - return copiedFiles.length ? copiedFiles : null; //Array or null - }, - - copyFile: function (/*String*/srcFileName, /*String*/destFileName, /*boolean?*/onlyCopyNew) { - //summary: copies srcFileName to destFileName. If onlyCopyNew is set, it only copies the file if - //srcFileName is newer than destFileName. Returns a boolean indicating if the copy occurred. - var destFile = xpfile(destFileName), - srcFile = xpfile(srcFileName); - - //logger.trace("Src filename: " + srcFileName); - //logger.trace("Dest filename: " + destFileName); - - //If onlyCopyNew is true, then compare dates and only copy if the src is newer - //than dest. - if (onlyCopyNew) { - if (destFile.exists() && destFile.lastModifiedTime >= srcFile.lastModifiedTime) { - return false; //Boolean - } - } - - srcFile.copyTo(destFile.parent, destFile.leafName); - - return true; //Boolean - }, - - /** - * Renames a file. May fail if "to" already exists or is on another drive. - */ - renameFile: function (from, to) { - var toFile = xpfile(to); - return xpfile(from).moveTo(toFile.parent, toFile.leafName); - }, - - readFile: xpcUtil.readFile, - - readFileAsync: function (path, encoding) { - var d = prim(); - try { - d.resolve(file.readFile(path, encoding)); - } catch (e) { - d.reject(e); - } - return d.promise; - }, - - saveUtf8File: function (/*String*/fileName, /*String*/fileContents) { - //summary: saves a file using UTF-8 encoding. - file.saveFile(fileName, fileContents, "utf-8"); - }, - - saveFile: function (/*String*/fileName, /*String*/fileContents, /*String?*/encoding) { - var outStream, convertStream, - fileObj = xpfile(fileName); - - mkFullDir(fileObj.parent); - - try { - outStream = Cc['@mozilla.org/network/file-output-stream;1'] - .createInstance(Ci.nsIFileOutputStream); - //438 is decimal for 0777 - outStream.init(fileObj, 0x02 | 0x08 | 0x20, 511, 0); - - convertStream = Cc['@mozilla.org/intl/converter-output-stream;1'] - .createInstance(Ci.nsIConverterOutputStream); - - convertStream.init(outStream, encoding, 0, 0); - convertStream.writeString(fileContents); - } catch (e) { - throw new Error((fileObj && fileObj.path || '') + ': ' + e); - } finally { - if (convertStream) { - convertStream.close(); - } - if (outStream) { - outStream.close(); - } - } - }, - - deleteFile: function (/*String*/fileName) { - //summary: deletes a file or directory if it exists. - var fileObj = xpfile(fileName); - if (fileObj.exists()) { - fileObj.remove(true); - } - }, - - /** - * Deletes any empty directories under the given directory. - * The startDirIsJavaObject is private to this implementation's - * recursion needs. - */ - deleteEmptyDirs: function (startDir, startDirIsObject) { - var topDir = startDir, - dirFileArray, fileObj; - - if (!startDirIsObject) { - topDir = xpfile(startDir); - } - - if (topDir.exists()) { - dirFileArray = topDir.directoryEntries; - while (dirFileArray.hasMoreElements()) { - fileObj = dirFileArray.getNext().QueryInterface(Ci.nsILocalFile); - - if (fileObj.isDirectory()) { - file.deleteEmptyDirs(fileObj, true); - } - } - - //If the directory is empty now, delete it. - dirFileArray = topDir.directoryEntries; - if (!dirFileArray.hasMoreElements()) { - file.deleteFile(topDir.path); - } - } - } - }; - - return file; -}); - -} - -if(env === 'browser') { -/*global process */ -define('browser/quit', function () { - 'use strict'; - return function (code) { - }; -}); -} - -if(env === 'node') { -/*global process */ -define('node/quit', function () { - 'use strict'; - return function (code) { - var draining = 0; - var exit = function () { - if (draining === 0) { - process.exit(code); - } else { - draining -= 1; - } - }; - if (process.stdout.bufferSize) { - draining += 1; - process.stdout.once('drain', exit); - } - if (process.stderr.bufferSize) { - draining += 1; - process.stderr.once('drain', exit); - } - exit(); - }; -}); - -} - -if(env === 'rhino') { -/*global quit */ -define('rhino/quit', function () { - 'use strict'; - return function (code) { - return quit(code); - }; -}); - -} - -if(env === 'xpconnect') { -/*global quit */ -define('xpconnect/quit', function () { - 'use strict'; - return function (code) { - return quit(code); - }; -}); - -} - -if(env === 'browser') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('browser/print', function () { - function print(msg) { - console.log(msg); - } - - return print; -}); - -} - -if(env === 'node') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, console: false */ - -define('node/print', function () { - function print(msg) { - console.log(msg); - } - - return print; -}); - -} - -if(env === 'rhino') { -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, print: false */ - -define('rhino/print', function () { - return print; -}); - -} - -if(env === 'xpconnect') { -/** - * @license RequireJS Copyright (c) 2013, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false, print: false */ - -define('xpconnect/print', function () { - return print; -}); - -} -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint nomen: false, strict: false */ -/*global define: false */ - -define('logger', ['env!env/print'], function (print) { - var logger = { - TRACE: 0, - INFO: 1, - WARN: 2, - ERROR: 3, - SILENT: 4, - level: 0, - logPrefix: "", - - logLevel: function( level ) { - this.level = level; - }, - - trace: function (message) { - if (this.level <= this.TRACE) { - this._print(message); - } - }, - - info: function (message) { - if (this.level <= this.INFO) { - this._print(message); - } - }, - - warn: function (message) { - if (this.level <= this.WARN) { - this._print(message); - } - }, - - error: function (message) { - if (this.level <= this.ERROR) { - this._print(message); - } - }, - - _print: function (message) { - this._sysPrint((this.logPrefix ? (this.logPrefix + " ") : "") + message); - }, - - _sysPrint: function (message) { - print(message); - } - }; - - return logger; -}); -//Just a blank file to use when building the optimizer with the optimizer, -//so that the build does not attempt to inline some env modules, -//like Node's fs and path. - -/* - Copyright (C) 2012 Ariya Hidayat - Copyright (C) 2012 Mathias Bynens - Copyright (C) 2012 Joost-Wim Boekesteijn - Copyright (C) 2012 Kris Kowal - Copyright (C) 2012 Yusuke Suzuki - Copyright (C) 2012 Arpad Borsos - Copyright (C) 2011 Ariya Hidayat - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY - DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/*jslint bitwise:true plusplus:true */ -/*global esprima:true, define:true, exports:true, window: true, -throwError: true, createLiteral: true, generateStatement: true, -parseAssignmentExpression: true, parseBlock: true, parseExpression: true, -parseFunctionDeclaration: true, parseFunctionExpression: true, -parseFunctionSourceElements: true, parseVariableIdentifier: true, -parseLeftHandSideExpression: true, -parseStatement: true, parseSourceElement: true */ - -(function (root, factory) { - 'use strict'; - - // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, - // Rhino, and plain browser loading. - if (typeof define === 'function' && define.amd) { - define('esprima', ['exports'], factory); - } else if (typeof exports !== 'undefined') { - factory(exports); - } else { - factory((root.esprima = {})); - } -}(this, function (exports) { - 'use strict'; - - var Token, - TokenName, - Syntax, - PropertyKind, - Messages, - Regex, - source, - strict, - index, - lineNumber, - lineStart, - length, - buffer, - state, - extra; - - Token = { - BooleanLiteral: 1, - EOF: 2, - Identifier: 3, - Keyword: 4, - NullLiteral: 5, - NumericLiteral: 6, - Punctuator: 7, - StringLiteral: 8 - }; - - TokenName = {}; - TokenName[Token.BooleanLiteral] = 'Boolean'; - TokenName[Token.EOF] = ''; - TokenName[Token.Identifier] = 'Identifier'; - TokenName[Token.Keyword] = 'Keyword'; - TokenName[Token.NullLiteral] = 'Null'; - TokenName[Token.NumericLiteral] = 'Numeric'; - TokenName[Token.Punctuator] = 'Punctuator'; - TokenName[Token.StringLiteral] = 'String'; - - Syntax = { - AssignmentExpression: 'AssignmentExpression', - ArrayExpression: 'ArrayExpression', - BlockStatement: 'BlockStatement', - BinaryExpression: 'BinaryExpression', - BreakStatement: 'BreakStatement', - CallExpression: 'CallExpression', - CatchClause: 'CatchClause', - ConditionalExpression: 'ConditionalExpression', - ContinueStatement: 'ContinueStatement', - DoWhileStatement: 'DoWhileStatement', - DebuggerStatement: 'DebuggerStatement', - EmptyStatement: 'EmptyStatement', - ExpressionStatement: 'ExpressionStatement', - ForStatement: 'ForStatement', - ForInStatement: 'ForInStatement', - FunctionDeclaration: 'FunctionDeclaration', - FunctionExpression: 'FunctionExpression', - Identifier: 'Identifier', - IfStatement: 'IfStatement', - Literal: 'Literal', - LabeledStatement: 'LabeledStatement', - LogicalExpression: 'LogicalExpression', - MemberExpression: 'MemberExpression', - NewExpression: 'NewExpression', - ObjectExpression: 'ObjectExpression', - Program: 'Program', - Property: 'Property', - ReturnStatement: 'ReturnStatement', - SequenceExpression: 'SequenceExpression', - SwitchStatement: 'SwitchStatement', - SwitchCase: 'SwitchCase', - ThisExpression: 'ThisExpression', - ThrowStatement: 'ThrowStatement', - TryStatement: 'TryStatement', - UnaryExpression: 'UnaryExpression', - UpdateExpression: 'UpdateExpression', - VariableDeclaration: 'VariableDeclaration', - VariableDeclarator: 'VariableDeclarator', - WhileStatement: 'WhileStatement', - WithStatement: 'WithStatement' - }; - - PropertyKind = { - Data: 1, - Get: 2, - Set: 4 - }; - - // Error messages should be identical to V8. - Messages = { - UnexpectedToken: 'Unexpected token %0', - UnexpectedNumber: 'Unexpected number', - UnexpectedString: 'Unexpected string', - UnexpectedIdentifier: 'Unexpected identifier', - UnexpectedReserved: 'Unexpected reserved word', - UnexpectedEOS: 'Unexpected end of input', - NewlineAfterThrow: 'Illegal newline after throw', - InvalidRegExp: 'Invalid regular expression', - UnterminatedRegExp: 'Invalid regular expression: missing /', - InvalidLHSInAssignment: 'Invalid left-hand side in assignment', - InvalidLHSInForIn: 'Invalid left-hand side in for-in', - MultipleDefaultsInSwitch: 'More than one default clause in switch statement', - NoCatchOrFinally: 'Missing catch or finally after try', - UnknownLabel: 'Undefined label \'%0\'', - Redeclaration: '%0 \'%1\' has already been declared', - IllegalContinue: 'Illegal continue statement', - IllegalBreak: 'Illegal break statement', - IllegalReturn: 'Illegal return statement', - StrictModeWith: 'Strict mode code may not include a with statement', - StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', - StrictVarName: 'Variable name may not be eval or arguments in strict mode', - StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', - StrictParamDupe: 'Strict mode function may not have duplicate parameter names', - StrictFunctionName: 'Function name may not be eval or arguments in strict mode', - StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', - StrictDelete: 'Delete of an unqualified identifier in strict mode.', - StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', - AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', - AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', - StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', - StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', - StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', - StrictReservedWord: 'Use of future reserved word in strict mode' - }; - - // See also tools/generate-unicode-regex.py. - Regex = { - NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), - NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') - }; - - // Ensure the condition is true, otherwise throw an error. - // This is only to have a better contract semantic, i.e. another safety net - // to catch a logic error. The condition shall be fulfilled in normal case. - // Do NOT use this to enforce a certain condition on any user input. - - function assert(condition, message) { - if (!condition) { - throw new Error('ASSERT: ' + message); - } - } - - function sliceSource(from, to) { - return source.slice(from, to); - } - - if (typeof 'esprima'[0] === 'undefined') { - sliceSource = function sliceArraySource(from, to) { - return source.slice(from, to).join(''); - }; - } - - function isDecimalDigit(ch) { - return '0123456789'.indexOf(ch) >= 0; - } - - function isHexDigit(ch) { - return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; - } - - function isOctalDigit(ch) { - return '01234567'.indexOf(ch) >= 0; - } - - - // 7.2 White Space - - function isWhiteSpace(ch) { - return (ch === ' ') || (ch === '\u0009') || (ch === '\u000B') || - (ch === '\u000C') || (ch === '\u00A0') || - (ch.charCodeAt(0) >= 0x1680 && - '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(ch) >= 0); - } - - // 7.3 Line Terminators - - function isLineTerminator(ch) { - return (ch === '\n' || ch === '\r' || ch === '\u2028' || ch === '\u2029'); - } - - // 7.6 Identifier Names and Identifiers - - function isIdentifierStart(ch) { - return (ch === '$') || (ch === '_') || (ch === '\\') || - (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || - ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch)); - } - - function isIdentifierPart(ch) { - return (ch === '$') || (ch === '_') || (ch === '\\') || - (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || - ((ch >= '0') && (ch <= '9')) || - ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierPart.test(ch)); - } - - // 7.6.1.2 Future Reserved Words - - function isFutureReservedWord(id) { - switch (id) { - - // Future reserved words. - case 'class': - case 'enum': - case 'export': - case 'extends': - case 'import': - case 'super': - return true; - } - - return false; - } - - function isStrictModeReservedWord(id) { - switch (id) { - - // Strict Mode reserved words. - case 'implements': - case 'interface': - case 'package': - case 'private': - case 'protected': - case 'public': - case 'static': - case 'yield': - case 'let': - return true; - } - - return false; - } - - function isRestrictedWord(id) { - return id === 'eval' || id === 'arguments'; - } - - // 7.6.1.1 Keywords - - function isKeyword(id) { - var keyword = false; - switch (id.length) { - case 2: - keyword = (id === 'if') || (id === 'in') || (id === 'do'); - break; - case 3: - keyword = (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); - break; - case 4: - keyword = (id === 'this') || (id === 'else') || (id === 'case') || (id === 'void') || (id === 'with'); - break; - case 5: - keyword = (id === 'while') || (id === 'break') || (id === 'catch') || (id === 'throw'); - break; - case 6: - keyword = (id === 'return') || (id === 'typeof') || (id === 'delete') || (id === 'switch'); - break; - case 7: - keyword = (id === 'default') || (id === 'finally'); - break; - case 8: - keyword = (id === 'function') || (id === 'continue') || (id === 'debugger'); - break; - case 10: - keyword = (id === 'instanceof'); - break; - } - - if (keyword) { - return true; - } - - switch (id) { - // Future reserved words. - // 'const' is specialized as Keyword in V8. - case 'const': - return true; - - // For compatiblity to SpiderMonkey and ES.next - case 'yield': - case 'let': - return true; - } - - if (strict && isStrictModeReservedWord(id)) { - return true; - } - - return isFutureReservedWord(id); - } - - // 7.4 Comments - - function skipComment() { - var ch, blockComment, lineComment; - - blockComment = false; - lineComment = false; - - while (index < length) { - ch = source[index]; - - if (lineComment) { - ch = source[index++]; - if (isLineTerminator(ch)) { - lineComment = false; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } - } else if (blockComment) { - if (isLineTerminator(ch)) { - if (ch === '\r' && source[index + 1] === '\n') { - ++index; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - ch = source[index++]; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - if (ch === '*') { - ch = source[index]; - if (ch === '/') { - ++index; - blockComment = false; - } - } - } - } else if (ch === '/') { - ch = source[index + 1]; - if (ch === '/') { - index += 2; - lineComment = true; - } else if (ch === '*') { - index += 2; - blockComment = true; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - break; - } - } else if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } else { - break; - } - } - } - - function scanHexEscape(prefix) { - var i, len, ch, code = 0; - - len = (prefix === 'u') ? 4 : 2; - for (i = 0; i < len; ++i) { - if (index < length && isHexDigit(source[index])) { - ch = source[index++]; - code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); - } else { - return ''; - } - } - return String.fromCharCode(code); - } - - function scanIdentifier() { - var ch, start, id, restore; - - ch = source[index]; - if (!isIdentifierStart(ch)) { - return; - } - - start = index; - if (ch === '\\') { - ++index; - if (source[index] !== 'u') { - return; - } - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - if (ch === '\\' || !isIdentifierStart(ch)) { - return; - } - id = ch; - } else { - index = restore; - id = 'u'; - } - } else { - id = source[index++]; - } - - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch)) { - break; - } - if (ch === '\\') { - ++index; - if (source[index] !== 'u') { - return; - } - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - if (ch === '\\' || !isIdentifierPart(ch)) { - return; - } - id += ch; - } else { - index = restore; - id += 'u'; - } - } else { - id += source[index++]; - } - } - - // There is no keyword or literal with only one character. - // Thus, it must be an identifier. - if (id.length === 1) { - return { - type: Token.Identifier, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (isKeyword(id)) { - return { - type: Token.Keyword, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.1 Null Literals - - if (id === 'null') { - return { - type: Token.NullLiteral, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.2 Boolean Literals - - if (id === 'true' || id === 'false') { - return { - type: Token.BooleanLiteral, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - return { - type: Token.Identifier, - value: id, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.7 Punctuators - - function scanPunctuator() { - var start = index, - ch1 = source[index], - ch2, - ch3, - ch4; - - // Check for most common single-character punctuators. - - if (ch1 === ';' || ch1 === '{' || ch1 === '}') { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === ',' || ch1 === '(' || ch1 === ')') { - ++index; - return { - type: Token.Punctuator, - value: ch1, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // Dot (.) can also start a floating-point number, hence the need - // to check the next character. - - ch2 = source[index + 1]; - if (ch1 === '.' && !isDecimalDigit(ch2)) { - return { - type: Token.Punctuator, - value: source[index++], - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // Peek more characters. - - ch3 = source[index + 2]; - ch4 = source[index + 3]; - - // 4-character punctuator: >>>= - - if (ch1 === '>' && ch2 === '>' && ch3 === '>') { - if (ch4 === '=') { - index += 4; - return { - type: Token.Punctuator, - value: '>>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // 3-character punctuators: === !== >>> <<= >>= - - if (ch1 === '=' && ch2 === '=' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '===', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '!' && ch2 === '=' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '!==', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '>' && ch2 === '>' && ch3 === '>') { - index += 3; - return { - type: Token.Punctuator, - value: '>>>', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '<' && ch2 === '<' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '<<=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - if (ch1 === '>' && ch2 === '>' && ch3 === '=') { - index += 3; - return { - type: Token.Punctuator, - value: '>>=', - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 2-character punctuators: <= >= == != ++ -- << >> && || - // += -= *= %= &= |= ^= /= - - if (ch2 === '=') { - if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { - index += 2; - return { - type: Token.Punctuator, - value: ch1 + ch2, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) { - if ('+-<>&|'.indexOf(ch2) >= 0) { - index += 2; - return { - type: Token.Punctuator, - value: ch1 + ch2, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // The remaining 1-character punctuators. - - if ('[]<>+-*%&|^!~?:=/'.indexOf(ch1) >= 0) { - return { - type: Token.Punctuator, - value: source[index++], - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - } - - // 7.8.3 Numeric Literals - - function scanNumericLiteral() { - var number, start, ch; - - ch = source[index]; - assert(isDecimalDigit(ch) || (ch === '.'), - 'Numeric literal must start with a decimal digit or a decimal point'); - - start = index; - number = ''; - if (ch !== '.') { - number = source[index++]; - ch = source[index]; - - // Hex number starts with '0x'. - // Octal number starts with '0'. - if (number === '0') { - if (ch === 'x' || ch === 'X') { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isHexDigit(ch)) { - break; - } - number += source[index++]; - } - - if (number.length <= 2) { - // only 0x - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - return { - type: Token.NumericLiteral, - value: parseInt(number, 16), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } else if (isOctalDigit(ch)) { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isOctalDigit(ch)) { - break; - } - number += source[index++]; - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch) || isDecimalDigit(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - return { - type: Token.NumericLiteral, - value: parseInt(number, 8), - octal: true, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // decimal number starts with '0' such as '09' is illegal. - if (isDecimalDigit(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } - - if (ch === '.') { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } - - if (ch === 'e' || ch === 'E') { - number += source[index++]; - - ch = source[index]; - if (ch === '+' || ch === '-') { - number += source[index++]; - } - - ch = source[index]; - if (isDecimalDigit(ch)) { - number += source[index++]; - while (index < length) { - ch = source[index]; - if (!isDecimalDigit(ch)) { - break; - } - number += source[index++]; - } - } else { - ch = 'character ' + ch; - if (index >= length) { - ch = ''; - } - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - if (index < length) { - ch = source[index]; - if (isIdentifierStart(ch)) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } - - return { - type: Token.NumericLiteral, - value: parseFloat(number), - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - // 7.8.4 String Literals - - function scanStringLiteral() { - var str = '', quote, start, ch, code, unescaped, restore, octal = false; - - quote = source[index]; - assert((quote === '\'' || quote === '"'), - 'String literal must starts with a quote'); - - start = index; - ++index; - - while (index < length) { - ch = source[index++]; - - if (ch === quote) { - quote = ''; - break; - } else if (ch === '\\') { - ch = source[index++]; - if (!isLineTerminator(ch)) { - switch (ch) { - case 'n': - str += '\n'; - break; - case 'r': - str += '\r'; - break; - case 't': - str += '\t'; - break; - case 'u': - case 'x': - restore = index; - unescaped = scanHexEscape(ch); - if (unescaped) { - str += unescaped; - } else { - index = restore; - str += ch; - } - break; - case 'b': - str += '\b'; - break; - case 'f': - str += '\f'; - break; - case 'v': - str += '\x0B'; - break; - - default: - if (isOctalDigit(ch)) { - code = '01234567'.indexOf(ch); - - // \0 is not octal escape sequence - if (code !== 0) { - octal = true; - } - - if (index < length && isOctalDigit(source[index])) { - octal = true; - code = code * 8 + '01234567'.indexOf(source[index++]); - - // 3 digits are only allowed when string starts - // with 0, 1, 2, 3 - if ('0123'.indexOf(ch) >= 0 && - index < length && - isOctalDigit(source[index])) { - code = code * 8 + '01234567'.indexOf(source[index++]); - } - } - str += String.fromCharCode(code); - } else { - str += ch; - } - break; - } - } else { - ++lineNumber; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - } - } else if (isLineTerminator(ch)) { - break; - } else { - str += ch; - } - } - - if (quote !== '') { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - return { - type: Token.StringLiteral, - value: str, - octal: octal, - lineNumber: lineNumber, - lineStart: lineStart, - range: [start, index] - }; - } - - function scanRegExp() { - var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false; - - buffer = null; - skipComment(); - - start = index; - ch = source[index]; - assert(ch === '/', 'Regular expression literal must start with a slash'); - str = source[index++]; - - while (index < length) { - ch = source[index++]; - str += ch; - if (ch === '\\') { - ch = source[index++]; - // ECMA-262 7.8.5 - if (isLineTerminator(ch)) { - throwError({}, Messages.UnterminatedRegExp); - } - str += ch; - } else if (classMarker) { - if (ch === ']') { - classMarker = false; - } - } else { - if (ch === '/') { - terminated = true; - break; - } else if (ch === '[') { - classMarker = true; - } else if (isLineTerminator(ch)) { - throwError({}, Messages.UnterminatedRegExp); - } - } - } - - if (!terminated) { - throwError({}, Messages.UnterminatedRegExp); - } - - // Exclude leading and trailing slash. - pattern = str.substr(1, str.length - 2); - - flags = ''; - while (index < length) { - ch = source[index]; - if (!isIdentifierPart(ch)) { - break; - } - - ++index; - if (ch === '\\' && index < length) { - ch = source[index]; - if (ch === 'u') { - ++index; - restore = index; - ch = scanHexEscape('u'); - if (ch) { - flags += ch; - str += '\\u'; - for (; restore < index; ++restore) { - str += source[restore]; - } - } else { - index = restore; - flags += 'u'; - str += '\\u'; - } - } else { - str += '\\'; - } - } else { - flags += ch; - str += ch; - } - } - - try { - value = new RegExp(pattern, flags); - } catch (e) { - throwError({}, Messages.InvalidRegExp); - } - - return { - literal: str, - value: value, - range: [start, index] - }; - } - - function isIdentifierName(token) { - return token.type === Token.Identifier || - token.type === Token.Keyword || - token.type === Token.BooleanLiteral || - token.type === Token.NullLiteral; - } - - function advance() { - var ch, token; - - skipComment(); - - if (index >= length) { - return { - type: Token.EOF, - lineNumber: lineNumber, - lineStart: lineStart, - range: [index, index] - }; - } - - token = scanPunctuator(); - if (typeof token !== 'undefined') { - return token; - } - - ch = source[index]; - - if (ch === '\'' || ch === '"') { - return scanStringLiteral(); - } - - if (ch === '.' || isDecimalDigit(ch)) { - return scanNumericLiteral(); - } - - token = scanIdentifier(); - if (typeof token !== 'undefined') { - return token; - } - - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - - function lex() { - var token; - - if (buffer) { - index = buffer.range[1]; - lineNumber = buffer.lineNumber; - lineStart = buffer.lineStart; - token = buffer; - buffer = null; - return token; - } - - buffer = null; - return advance(); - } - - function lookahead() { - var pos, line, start; - - if (buffer !== null) { - return buffer; - } - - pos = index; - line = lineNumber; - start = lineStart; - buffer = advance(); - index = pos; - lineNumber = line; - lineStart = start; - - return buffer; - } - - // Return true if there is a line terminator before the next token. - - function peekLineTerminator() { - var pos, line, start, found; - - pos = index; - line = lineNumber; - start = lineStart; - skipComment(); - found = lineNumber !== line; - index = pos; - lineNumber = line; - lineStart = start; - - return found; - } - - // Throw an exception - - function throwError(token, messageFormat) { - var error, - args = Array.prototype.slice.call(arguments, 2), - msg = messageFormat.replace( - /%(\d)/g, - function (whole, index) { - return args[index] || ''; - } - ); - - if (typeof token.lineNumber === 'number') { - error = new Error('Line ' + token.lineNumber + ': ' + msg); - error.index = token.range[0]; - error.lineNumber = token.lineNumber; - error.column = token.range[0] - lineStart + 1; - } else { - error = new Error('Line ' + lineNumber + ': ' + msg); - error.index = index; - error.lineNumber = lineNumber; - error.column = index - lineStart + 1; - } - - throw error; - } - - function throwErrorTolerant() { - try { - throwError.apply(null, arguments); - } catch (e) { - if (extra.errors) { - extra.errors.push(e); - } else { - throw e; - } - } - } - - - // Throw an exception because of the token. - - function throwUnexpected(token) { - if (token.type === Token.EOF) { - throwError(token, Messages.UnexpectedEOS); - } - - if (token.type === Token.NumericLiteral) { - throwError(token, Messages.UnexpectedNumber); - } - - if (token.type === Token.StringLiteral) { - throwError(token, Messages.UnexpectedString); - } - - if (token.type === Token.Identifier) { - throwError(token, Messages.UnexpectedIdentifier); - } - - if (token.type === Token.Keyword) { - if (isFutureReservedWord(token.value)) { - throwError(token, Messages.UnexpectedReserved); - } else if (strict && isStrictModeReservedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictReservedWord); - return; - } - throwError(token, Messages.UnexpectedToken, token.value); - } - - // BooleanLiteral, NullLiteral, or Punctuator. - throwError(token, Messages.UnexpectedToken, token.value); - } - - // Expect the next token to match the specified punctuator. - // If not, an exception will be thrown. - - function expect(value) { - var token = lex(); - if (token.type !== Token.Punctuator || token.value !== value) { - throwUnexpected(token); - } - } - - // Expect the next token to match the specified keyword. - // If not, an exception will be thrown. - - function expectKeyword(keyword) { - var token = lex(); - if (token.type !== Token.Keyword || token.value !== keyword) { - throwUnexpected(token); - } - } - - // Return true if the next token matches the specified punctuator. - - function match(value) { - var token = lookahead(); - return token.type === Token.Punctuator && token.value === value; - } - - // Return true if the next token matches the specified keyword - - function matchKeyword(keyword) { - var token = lookahead(); - return token.type === Token.Keyword && token.value === keyword; - } - - // Return true if the next token is an assignment operator - - function matchAssign() { - var token = lookahead(), - op = token.value; - - if (token.type !== Token.Punctuator) { - return false; - } - return op === '=' || - op === '*=' || - op === '/=' || - op === '%=' || - op === '+=' || - op === '-=' || - op === '<<=' || - op === '>>=' || - op === '>>>=' || - op === '&=' || - op === '^=' || - op === '|='; - } - - function consumeSemicolon() { - var token, line; - - // Catch the very common case first. - if (source[index] === ';') { - lex(); - return; - } - - line = lineNumber; - skipComment(); - if (lineNumber !== line) { - return; - } - - if (match(';')) { - lex(); - return; - } - - token = lookahead(); - if (token.type !== Token.EOF && !match('}')) { - throwUnexpected(token); - } - } - - // Return true if provided expression is LeftHandSideExpression - - function isLeftHandSide(expr) { - return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; - } - - // 11.1.4 Array Initialiser - - function parseArrayInitialiser() { - var elements = []; - - expect('['); - - while (!match(']')) { - if (match(',')) { - lex(); - elements.push(null); - } else { - elements.push(parseAssignmentExpression()); - - if (!match(']')) { - expect(','); - } - } - } - - expect(']'); - - return { - type: Syntax.ArrayExpression, - elements: elements - }; - } - - // 11.1.5 Object Initialiser - - function parsePropertyFunction(param, first) { - var previousStrict, body; - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (first && strict && isRestrictedWord(param[0].name)) { - throwErrorTolerant(first, Messages.StrictParamName); - } - strict = previousStrict; - - return { - type: Syntax.FunctionExpression, - id: null, - params: param, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - function parseObjectPropertyKey() { - var token = lex(); - - // Note: This function is called only from parseObjectProperty(), where - // EOF and Punctuator tokens are already filtered out. - - if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return createLiteral(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseObjectProperty() { - var token, key, id, param; - - token = lookahead(); - - if (token.type === Token.Identifier) { - - id = parseObjectPropertyKey(); - - // Property Assignment: Getter and Setter. - - if (token.value === 'get' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - expect(')'); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction([]), - kind: 'get' - }; - } else if (token.value === 'set' && !match(':')) { - key = parseObjectPropertyKey(); - expect('('); - token = lookahead(); - if (token.type !== Token.Identifier) { - expect(')'); - throwErrorTolerant(token, Messages.UnexpectedToken, token.value); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction([]), - kind: 'set' - }; - } else { - param = [ parseVariableIdentifier() ]; - expect(')'); - return { - type: Syntax.Property, - key: key, - value: parsePropertyFunction(param, token), - kind: 'set' - }; - } - } else { - expect(':'); - return { - type: Syntax.Property, - key: id, - value: parseAssignmentExpression(), - kind: 'init' - }; - } - } else if (token.type === Token.EOF || token.type === Token.Punctuator) { - throwUnexpected(token); - } else { - key = parseObjectPropertyKey(); - expect(':'); - return { - type: Syntax.Property, - key: key, - value: parseAssignmentExpression(), - kind: 'init' - }; - } - } - - function parseObjectInitialiser() { - var properties = [], property, name, kind, map = {}, toString = String; - - expect('{'); - - while (!match('}')) { - property = parseObjectProperty(); - - if (property.key.type === Syntax.Identifier) { - name = property.key.name; - } else { - name = toString(property.key.value); - } - kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; - if (Object.prototype.hasOwnProperty.call(map, name)) { - if (map[name] === PropertyKind.Data) { - if (strict && kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.StrictDuplicateProperty); - } else if (kind !== PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } - } else { - if (kind === PropertyKind.Data) { - throwErrorTolerant({}, Messages.AccessorDataProperty); - } else if (map[name] & kind) { - throwErrorTolerant({}, Messages.AccessorGetSet); - } - } - map[name] |= kind; - } else { - map[name] = kind; - } - - properties.push(property); - - if (!match('}')) { - expect(','); - } - } - - expect('}'); - - return { - type: Syntax.ObjectExpression, - properties: properties - }; - } - - // 11.1.6 The Grouping Operator - - function parseGroupExpression() { - var expr; - - expect('('); - - expr = parseExpression(); - - expect(')'); - - return expr; - } - - - // 11.1 Primary Expressions - - function parsePrimaryExpression() { - var token = lookahead(), - type = token.type; - - if (type === Token.Identifier) { - return { - type: Syntax.Identifier, - name: lex().value - }; - } - - if (type === Token.StringLiteral || type === Token.NumericLiteral) { - if (strict && token.octal) { - throwErrorTolerant(token, Messages.StrictOctalLiteral); - } - return createLiteral(lex()); - } - - if (type === Token.Keyword) { - if (matchKeyword('this')) { - lex(); - return { - type: Syntax.ThisExpression - }; - } - - if (matchKeyword('function')) { - return parseFunctionExpression(); - } - } - - if (type === Token.BooleanLiteral) { - lex(); - token.value = (token.value === 'true'); - return createLiteral(token); - } - - if (type === Token.NullLiteral) { - lex(); - token.value = null; - return createLiteral(token); - } - - if (match('[')) { - return parseArrayInitialiser(); - } - - if (match('{')) { - return parseObjectInitialiser(); - } - - if (match('(')) { - return parseGroupExpression(); - } - - if (match('/') || match('/=')) { - return createLiteral(scanRegExp()); - } - - return throwUnexpected(lex()); - } - - // 11.2 Left-Hand-Side Expressions - - function parseArguments() { - var args = []; - - expect('('); - - if (!match(')')) { - while (index < length) { - args.push(parseAssignmentExpression()); - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - return args; - } - - function parseNonComputedProperty() { - var token = lex(); - - if (!isIdentifierName(token)) { - throwUnexpected(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseNonComputedMember() { - expect('.'); - - return parseNonComputedProperty(); - } - - function parseComputedMember() { - var expr; - - expect('['); - - expr = parseExpression(); - - expect(']'); - - return expr; - } - - function parseNewExpression() { - var expr; - - expectKeyword('new'); - - expr = { - type: Syntax.NewExpression, - callee: parseLeftHandSideExpression(), - 'arguments': [] - }; - - if (match('(')) { - expr['arguments'] = parseArguments(); - } - - return expr; - } - - function parseLeftHandSideExpressionAllowCall() { - var expr; - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || match('(')) { - if (match('(')) { - expr = { - type: Syntax.CallExpression, - callee: expr, - 'arguments': parseArguments() - }; - } else if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - } - } - - return expr; - } - - - function parseLeftHandSideExpression() { - var expr; - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[')) { - if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - } - } - - return expr; - } - - // 11.3 Postfix Expressions - - function parsePostfixExpression() { - var expr = parseLeftHandSideExpressionAllowCall(), token; - - token = lookahead(); - if (token.type !== Token.Punctuator) { - return expr; - } - - if ((match('++') || match('--')) && !peekLineTerminator()) { - // 11.3.1, 11.3.2 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPostfix); - } - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - expr = { - type: Syntax.UpdateExpression, - operator: lex().value, - argument: expr, - prefix: false - }; - } - - return expr; - } - - // 11.4 Unary Operators - - function parseUnaryExpression() { - var token, expr; - - token = lookahead(); - if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { - return parsePostfixExpression(); - } - - if (match('++') || match('--')) { - token = lex(); - expr = parseUnaryExpression(); - // 11.4.4, 11.4.5 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant({}, Messages.StrictLHSPrefix); - } - - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - expr = { - type: Syntax.UpdateExpression, - operator: token.value, - argument: expr, - prefix: true - }; - return expr; - } - - if (match('+') || match('-') || match('~') || match('!')) { - expr = { - type: Syntax.UnaryExpression, - operator: lex().value, - argument: parseUnaryExpression(), - prefix: true - }; - return expr; - } - - if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { - expr = { - type: Syntax.UnaryExpression, - operator: lex().value, - argument: parseUnaryExpression(), - prefix: true - }; - if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { - throwErrorTolerant({}, Messages.StrictDelete); - } - return expr; - } - - return parsePostfixExpression(); - } - - // 11.5 Multiplicative Operators - - function parseMultiplicativeExpression() { - var expr = parseUnaryExpression(); - - while (match('*') || match('/') || match('%')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseUnaryExpression() - }; - } - - return expr; - } - - // 11.6 Additive Operators - - function parseAdditiveExpression() { - var expr = parseMultiplicativeExpression(); - - while (match('+') || match('-')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseMultiplicativeExpression() - }; - } - - return expr; - } - - // 11.7 Bitwise Shift Operators - - function parseShiftExpression() { - var expr = parseAdditiveExpression(); - - while (match('<<') || match('>>') || match('>>>')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseAdditiveExpression() - }; - } - - return expr; - } - // 11.8 Relational Operators - - function parseRelationalExpression() { - var expr, previousAllowIn; - - previousAllowIn = state.allowIn; - state.allowIn = true; - - expr = parseShiftExpression(); - - while (match('<') || match('>') || match('<=') || match('>=') || (previousAllowIn && matchKeyword('in')) || matchKeyword('instanceof')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseShiftExpression() - }; - } - - state.allowIn = previousAllowIn; - return expr; - } - - // 11.9 Equality Operators - - function parseEqualityExpression() { - var expr = parseRelationalExpression(); - - while (match('==') || match('!=') || match('===') || match('!==')) { - expr = { - type: Syntax.BinaryExpression, - operator: lex().value, - left: expr, - right: parseRelationalExpression() - }; - } - - return expr; - } - - // 11.10 Binary Bitwise Operators - - function parseBitwiseANDExpression() { - var expr = parseEqualityExpression(); - - while (match('&')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '&', - left: expr, - right: parseEqualityExpression() - }; - } - - return expr; - } - - function parseBitwiseXORExpression() { - var expr = parseBitwiseANDExpression(); - - while (match('^')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '^', - left: expr, - right: parseBitwiseANDExpression() - }; - } - - return expr; - } - - function parseBitwiseORExpression() { - var expr = parseBitwiseXORExpression(); - - while (match('|')) { - lex(); - expr = { - type: Syntax.BinaryExpression, - operator: '|', - left: expr, - right: parseBitwiseXORExpression() - }; - } - - return expr; - } - - // 11.11 Binary Logical Operators - - function parseLogicalANDExpression() { - var expr = parseBitwiseORExpression(); - - while (match('&&')) { - lex(); - expr = { - type: Syntax.LogicalExpression, - operator: '&&', - left: expr, - right: parseBitwiseORExpression() - }; - } - - return expr; - } - - function parseLogicalORExpression() { - var expr = parseLogicalANDExpression(); - - while (match('||')) { - lex(); - expr = { - type: Syntax.LogicalExpression, - operator: '||', - left: expr, - right: parseLogicalANDExpression() - }; - } - - return expr; - } - - // 11.12 Conditional Operator - - function parseConditionalExpression() { - var expr, previousAllowIn, consequent; - - expr = parseLogicalORExpression(); - - if (match('?')) { - lex(); - previousAllowIn = state.allowIn; - state.allowIn = true; - consequent = parseAssignmentExpression(); - state.allowIn = previousAllowIn; - expect(':'); - - expr = { - type: Syntax.ConditionalExpression, - test: expr, - consequent: consequent, - alternate: parseAssignmentExpression() - }; - } - - return expr; - } - - // 11.13 Assignment Operators - - function parseAssignmentExpression() { - var token, expr; - - token = lookahead(); - expr = parseConditionalExpression(); - - if (matchAssign()) { - // LeftHandSideExpression - if (!isLeftHandSide(expr)) { - throwErrorTolerant({}, Messages.InvalidLHSInAssignment); - } - - // 11.13.1 - if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { - throwErrorTolerant(token, Messages.StrictLHSAssignment); - } - - expr = { - type: Syntax.AssignmentExpression, - operator: lex().value, - left: expr, - right: parseAssignmentExpression() - }; - } - - return expr; - } - - // 11.14 Comma Operator - - function parseExpression() { - var expr = parseAssignmentExpression(); - - if (match(',')) { - expr = { - type: Syntax.SequenceExpression, - expressions: [ expr ] - }; - - while (index < length) { - if (!match(',')) { - break; - } - lex(); - expr.expressions.push(parseAssignmentExpression()); - } - - } - return expr; - } - - // 12.1 Block - - function parseStatementList() { - var list = [], - statement; - - while (index < length) { - if (match('}')) { - break; - } - statement = parseSourceElement(); - if (typeof statement === 'undefined') { - break; - } - list.push(statement); - } - - return list; - } - - function parseBlock() { - var block; - - expect('{'); - - block = parseStatementList(); - - expect('}'); - - return { - type: Syntax.BlockStatement, - body: block - }; - } - - // 12.2 Variable Statement - - function parseVariableIdentifier() { - var token = lex(); - - if (token.type !== Token.Identifier) { - throwUnexpected(token); - } - - return { - type: Syntax.Identifier, - name: token.value - }; - } - - function parseVariableDeclaration(kind) { - var id = parseVariableIdentifier(), - init = null; - - // 12.2.1 - if (strict && isRestrictedWord(id.name)) { - throwErrorTolerant({}, Messages.StrictVarName); - } - - if (kind === 'const') { - expect('='); - init = parseAssignmentExpression(); - } else if (match('=')) { - lex(); - init = parseAssignmentExpression(); - } - - return { - type: Syntax.VariableDeclarator, - id: id, - init: init - }; - } - - function parseVariableDeclarationList(kind) { - var list = []; - - do { - list.push(parseVariableDeclaration(kind)); - if (!match(',')) { - break; - } - lex(); - } while (index < length); - - return list; - } - - function parseVariableStatement() { - var declarations; - - expectKeyword('var'); - - declarations = parseVariableDeclarationList(); - - consumeSemicolon(); - - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: 'var' - }; - } - - // kind may be `const` or `let` - // Both are experimental and not in the specification yet. - // see http://wiki.ecmascript.org/doku.php?id=harmony:const - // and http://wiki.ecmascript.org/doku.php?id=harmony:let - function parseConstLetDeclaration(kind) { - var declarations; - - expectKeyword(kind); - - declarations = parseVariableDeclarationList(kind); - - consumeSemicolon(); - - return { - type: Syntax.VariableDeclaration, - declarations: declarations, - kind: kind - }; - } - - // 12.3 Empty Statement - - function parseEmptyStatement() { - expect(';'); - - return { - type: Syntax.EmptyStatement - }; - } - - // 12.4 Expression Statement - - function parseExpressionStatement() { - var expr = parseExpression(); - - consumeSemicolon(); - - return { - type: Syntax.ExpressionStatement, - expression: expr - }; - } - - // 12.5 If statement - - function parseIfStatement() { - var test, consequent, alternate; - - expectKeyword('if'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - consequent = parseStatement(); - - if (matchKeyword('else')) { - lex(); - alternate = parseStatement(); - } else { - alternate = null; - } - - return { - type: Syntax.IfStatement, - test: test, - consequent: consequent, - alternate: alternate - }; - } - - // 12.6 Iteration Statements - - function parseDoWhileStatement() { - var body, test, oldInIteration; - - expectKeyword('do'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - if (match(';')) { - lex(); - } - - return { - type: Syntax.DoWhileStatement, - body: body, - test: test - }; - } - - function parseWhileStatement() { - var test, body, oldInIteration; - - expectKeyword('while'); - - expect('('); - - test = parseExpression(); - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - return { - type: Syntax.WhileStatement, - test: test, - body: body - }; - } - - function parseForVariableDeclaration() { - var token = lex(); - - return { - type: Syntax.VariableDeclaration, - declarations: parseVariableDeclarationList(), - kind: token.value - }; - } - - function parseForStatement() { - var init, test, update, left, right, body, oldInIteration; - - init = test = update = null; - - expectKeyword('for'); - - expect('('); - - if (match(';')) { - lex(); - } else { - if (matchKeyword('var') || matchKeyword('let')) { - state.allowIn = false; - init = parseForVariableDeclaration(); - state.allowIn = true; - - if (init.declarations.length === 1 && matchKeyword('in')) { - lex(); - left = init; - right = parseExpression(); - init = null; - } - } else { - state.allowIn = false; - init = parseExpression(); - state.allowIn = true; - - if (matchKeyword('in')) { - // LeftHandSideExpression - if (!isLeftHandSide(init)) { - throwErrorTolerant({}, Messages.InvalidLHSInForIn); - } - - lex(); - left = init; - right = parseExpression(); - init = null; - } - } - - if (typeof left === 'undefined') { - expect(';'); - } - } - - if (typeof left === 'undefined') { - - if (!match(';')) { - test = parseExpression(); - } - expect(';'); - - if (!match(')')) { - update = parseExpression(); - } - } - - expect(')'); - - oldInIteration = state.inIteration; - state.inIteration = true; - - body = parseStatement(); - - state.inIteration = oldInIteration; - - if (typeof left === 'undefined') { - return { - type: Syntax.ForStatement, - init: init, - test: test, - update: update, - body: body - }; - } - - return { - type: Syntax.ForInStatement, - left: left, - right: right, - body: body, - each: false - }; - } - - // 12.7 The continue statement - - function parseContinueStatement() { - var token, label = null; - - expectKeyword('continue'); - - // Optimize the most common form: 'continue;'. - if (source[index] === ';') { - lex(); - - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: null - }; - } - - if (peekLineTerminator()) { - if (!state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: null - }; - } - - token = lookahead(); - if (token.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !state.inIteration) { - throwError({}, Messages.IllegalContinue); - } - - return { - type: Syntax.ContinueStatement, - label: label - }; - } - - // 12.8 The break statement - - function parseBreakStatement() { - var token, label = null; - - expectKeyword('break'); - - // Optimize the most common form: 'break;'. - if (source[index] === ';') { - lex(); - - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: null - }; - } - - if (peekLineTerminator()) { - if (!(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: null - }; - } - - token = lookahead(); - if (token.type === Token.Identifier) { - label = parseVariableIdentifier(); - - if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { - throwError({}, Messages.UnknownLabel, label.name); - } - } - - consumeSemicolon(); - - if (label === null && !(state.inIteration || state.inSwitch)) { - throwError({}, Messages.IllegalBreak); - } - - return { - type: Syntax.BreakStatement, - label: label - }; - } - - // 12.9 The return statement - - function parseReturnStatement() { - var token, argument = null; - - expectKeyword('return'); - - if (!state.inFunctionBody) { - throwErrorTolerant({}, Messages.IllegalReturn); - } - - // 'return' followed by a space and an identifier is very common. - if (source[index] === ' ') { - if (isIdentifierStart(source[index + 1])) { - argument = parseExpression(); - consumeSemicolon(); - return { - type: Syntax.ReturnStatement, - argument: argument - }; - } - } - - if (peekLineTerminator()) { - return { - type: Syntax.ReturnStatement, - argument: null - }; - } - - if (!match(';')) { - token = lookahead(); - if (!match('}') && token.type !== Token.EOF) { - argument = parseExpression(); - } - } - - consumeSemicolon(); - - return { - type: Syntax.ReturnStatement, - argument: argument - }; - } - - // 12.10 The with statement - - function parseWithStatement() { - var object, body; - - if (strict) { - throwErrorTolerant({}, Messages.StrictModeWith); - } - - expectKeyword('with'); - - expect('('); - - object = parseExpression(); - - expect(')'); - - body = parseStatement(); - - return { - type: Syntax.WithStatement, - object: object, - body: body - }; - } - - // 12.10 The swith statement - - function parseSwitchCase() { - var test, - consequent = [], - statement; - - if (matchKeyword('default')) { - lex(); - test = null; - } else { - expectKeyword('case'); - test = parseExpression(); - } - expect(':'); - - while (index < length) { - if (match('}') || matchKeyword('default') || matchKeyword('case')) { - break; - } - statement = parseStatement(); - if (typeof statement === 'undefined') { - break; - } - consequent.push(statement); - } - - return { - type: Syntax.SwitchCase, - test: test, - consequent: consequent - }; - } - - function parseSwitchStatement() { - var discriminant, cases, clause, oldInSwitch, defaultFound; - - expectKeyword('switch'); - - expect('('); - - discriminant = parseExpression(); - - expect(')'); - - expect('{'); - - cases = []; - - if (match('}')) { - lex(); - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - } - - oldInSwitch = state.inSwitch; - state.inSwitch = true; - defaultFound = false; - - while (index < length) { - if (match('}')) { - break; - } - clause = parseSwitchCase(); - if (clause.test === null) { - if (defaultFound) { - throwError({}, Messages.MultipleDefaultsInSwitch); - } - defaultFound = true; - } - cases.push(clause); - } - - state.inSwitch = oldInSwitch; - - expect('}'); - - return { - type: Syntax.SwitchStatement, - discriminant: discriminant, - cases: cases - }; - } - - // 12.13 The throw statement - - function parseThrowStatement() { - var argument; - - expectKeyword('throw'); - - if (peekLineTerminator()) { - throwError({}, Messages.NewlineAfterThrow); - } - - argument = parseExpression(); - - consumeSemicolon(); - - return { - type: Syntax.ThrowStatement, - argument: argument - }; - } - - // 12.14 The try statement - - function parseCatchClause() { - var param; - - expectKeyword('catch'); - - expect('('); - if (match(')')) { - throwUnexpected(lookahead()); - } - - param = parseVariableIdentifier(); - // 12.14.1 - if (strict && isRestrictedWord(param.name)) { - throwErrorTolerant({}, Messages.StrictCatchVariable); - } - - expect(')'); - - return { - type: Syntax.CatchClause, - param: param, - body: parseBlock() - }; - } - - function parseTryStatement() { - var block, handlers = [], finalizer = null; - - expectKeyword('try'); - - block = parseBlock(); - - if (matchKeyword('catch')) { - handlers.push(parseCatchClause()); - } - - if (matchKeyword('finally')) { - lex(); - finalizer = parseBlock(); - } - - if (handlers.length === 0 && !finalizer) { - throwError({}, Messages.NoCatchOrFinally); - } - - return { - type: Syntax.TryStatement, - block: block, - guardedHandlers: [], - handlers: handlers, - finalizer: finalizer - }; - } - - // 12.15 The debugger statement - - function parseDebuggerStatement() { - expectKeyword('debugger'); - - consumeSemicolon(); - - return { - type: Syntax.DebuggerStatement - }; - } - - // 12 Statements - - function parseStatement() { - var token = lookahead(), - expr, - labeledBody; - - if (token.type === Token.EOF) { - throwUnexpected(token); - } - - if (token.type === Token.Punctuator) { - switch (token.value) { - case ';': - return parseEmptyStatement(); - case '{': - return parseBlock(); - case '(': - return parseExpressionStatement(); - default: - break; - } - } - - if (token.type === Token.Keyword) { - switch (token.value) { - case 'break': - return parseBreakStatement(); - case 'continue': - return parseContinueStatement(); - case 'debugger': - return parseDebuggerStatement(); - case 'do': - return parseDoWhileStatement(); - case 'for': - return parseForStatement(); - case 'function': - return parseFunctionDeclaration(); - case 'if': - return parseIfStatement(); - case 'return': - return parseReturnStatement(); - case 'switch': - return parseSwitchStatement(); - case 'throw': - return parseThrowStatement(); - case 'try': - return parseTryStatement(); - case 'var': - return parseVariableStatement(); - case 'while': - return parseWhileStatement(); - case 'with': - return parseWithStatement(); - default: - break; - } - } - - expr = parseExpression(); - - // 12.12 Labelled Statements - if ((expr.type === Syntax.Identifier) && match(':')) { - lex(); - - if (Object.prototype.hasOwnProperty.call(state.labelSet, expr.name)) { - throwError({}, Messages.Redeclaration, 'Label', expr.name); - } - - state.labelSet[expr.name] = true; - labeledBody = parseStatement(); - delete state.labelSet[expr.name]; - - return { - type: Syntax.LabeledStatement, - label: expr, - body: labeledBody - }; - } - - consumeSemicolon(); - - return { - type: Syntax.ExpressionStatement, - expression: expr - }; - } - - // 13 Function Definition - - function parseFunctionSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted, - oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody; - - expect('{'); - - while (index < length) { - token = lookahead(); - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = sliceSource(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - oldLabelSet = state.labelSet; - oldInIteration = state.inIteration; - oldInSwitch = state.inSwitch; - oldInFunctionBody = state.inFunctionBody; - - state.labelSet = {}; - state.inIteration = false; - state.inSwitch = false; - state.inFunctionBody = true; - - while (index < length) { - if (match('}')) { - break; - } - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - - expect('}'); - - state.labelSet = oldLabelSet; - state.inIteration = oldInIteration; - state.inSwitch = oldInSwitch; - state.inFunctionBody = oldInFunctionBody; - - return { - type: Syntax.BlockStatement, - body: sourceElements - }; - } - - function parseFunctionDeclaration() { - var id, param, params = [], body, token, stricted, firstRestricted, message, previousStrict, paramSet; - - expectKeyword('function'); - token = lookahead(); - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - - expect('('); - - if (!match(')')) { - paramSet = {}; - while (index < length) { - token = lookahead(); - param = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - stricted = token; - message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - stricted = token; - message = Messages.StrictParamDupe; - } - } else if (!firstRestricted) { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - firstRestricted = token; - message = Messages.StrictParamDupe; - } - } - params.push(param); - paramSet[param.name] = true; - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return { - type: Syntax.FunctionDeclaration, - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - function parseFunctionExpression() { - var token, id = null, stricted, firstRestricted, message, param, params = [], body, previousStrict, paramSet; - - expectKeyword('function'); - - if (!match('(')) { - token = lookahead(); - id = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - throwErrorTolerant(token, Messages.StrictFunctionName); - } - } else { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictFunctionName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } - } - } - - expect('('); - - if (!match(')')) { - paramSet = {}; - while (index < length) { - token = lookahead(); - param = parseVariableIdentifier(); - if (strict) { - if (isRestrictedWord(token.value)) { - stricted = token; - message = Messages.StrictParamName; - } - if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - stricted = token; - message = Messages.StrictParamDupe; - } - } else if (!firstRestricted) { - if (isRestrictedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictParamName; - } else if (isStrictModeReservedWord(token.value)) { - firstRestricted = token; - message = Messages.StrictReservedWord; - } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { - firstRestricted = token; - message = Messages.StrictParamDupe; - } - } - params.push(param); - paramSet[param.name] = true; - if (match(')')) { - break; - } - expect(','); - } - } - - expect(')'); - - previousStrict = strict; - body = parseFunctionSourceElements(); - if (strict && firstRestricted) { - throwError(firstRestricted, message); - } - if (strict && stricted) { - throwErrorTolerant(stricted, message); - } - strict = previousStrict; - - return { - type: Syntax.FunctionExpression, - id: id, - params: params, - defaults: [], - body: body, - rest: null, - generator: false, - expression: false - }; - } - - // 14 Program - - function parseSourceElement() { - var token = lookahead(); - - if (token.type === Token.Keyword) { - switch (token.value) { - case 'const': - case 'let': - return parseConstLetDeclaration(token.value); - case 'function': - return parseFunctionDeclaration(); - default: - return parseStatement(); - } - } - - if (token.type !== Token.EOF) { - return parseStatement(); - } - } - - function parseSourceElements() { - var sourceElement, sourceElements = [], token, directive, firstRestricted; - - while (index < length) { - token = lookahead(); - if (token.type !== Token.StringLiteral) { - break; - } - - sourceElement = parseSourceElement(); - sourceElements.push(sourceElement); - if (sourceElement.expression.type !== Syntax.Literal) { - // this is not directive - break; - } - directive = sliceSource(token.range[0] + 1, token.range[1] - 1); - if (directive === 'use strict') { - strict = true; - if (firstRestricted) { - throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); - } - } else { - if (!firstRestricted && token.octal) { - firstRestricted = token; - } - } - } - - while (index < length) { - sourceElement = parseSourceElement(); - if (typeof sourceElement === 'undefined') { - break; - } - sourceElements.push(sourceElement); - } - return sourceElements; - } - - function parseProgram() { - var program; - strict = false; - program = { - type: Syntax.Program, - body: parseSourceElements() - }; - return program; - } - - // The following functions are needed only when the option to preserve - // the comments is active. - - function addComment(type, value, start, end, loc) { - assert(typeof start === 'number', 'Comment must have valid position'); - - // Because the way the actual token is scanned, often the comments - // (if any) are skipped twice during the lexical analysis. - // Thus, we need to skip adding a comment if the comment array already - // handled it. - if (extra.comments.length > 0) { - if (extra.comments[extra.comments.length - 1].range[1] > start) { - return; - } - } - - extra.comments.push({ - type: type, - value: value, - range: [start, end], - loc: loc - }); - } - - function scanComment() { - var comment, ch, loc, start, blockComment, lineComment; - - comment = ''; - blockComment = false; - lineComment = false; - - while (index < length) { - ch = source[index]; - - if (lineComment) { - ch = source[index++]; - if (isLineTerminator(ch)) { - loc.end = { - line: lineNumber, - column: index - lineStart - 1 - }; - lineComment = false; - addComment('Line', comment, start, index - 1, loc); - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - comment = ''; - } else if (index >= length) { - lineComment = false; - comment += ch; - loc.end = { - line: lineNumber, - column: length - lineStart - }; - addComment('Line', comment, start, length, loc); - } else { - comment += ch; - } - } else if (blockComment) { - if (isLineTerminator(ch)) { - if (ch === '\r' && source[index + 1] === '\n') { - ++index; - comment += '\r\n'; - } else { - comment += ch; - } - ++lineNumber; - ++index; - lineStart = index; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - ch = source[index++]; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - comment += ch; - if (ch === '*') { - ch = source[index]; - if (ch === '/') { - comment = comment.substr(0, comment.length - 1); - blockComment = false; - ++index; - loc.end = { - line: lineNumber, - column: index - lineStart - }; - addComment('Block', comment, start, index, loc); - comment = ''; - } - } - } - } else if (ch === '/') { - ch = source[index + 1]; - if (ch === '/') { - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - start = index; - index += 2; - lineComment = true; - if (index >= length) { - loc.end = { - line: lineNumber, - column: index - lineStart - }; - lineComment = false; - addComment('Line', comment, start, index, loc); - } - } else if (ch === '*') { - start = index; - index += 2; - blockComment = true; - loc = { - start: { - line: lineNumber, - column: index - lineStart - 2 - } - }; - if (index >= length) { - throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); - } - } else { - break; - } - } else if (isWhiteSpace(ch)) { - ++index; - } else if (isLineTerminator(ch)) { - ++index; - if (ch === '\r' && source[index] === '\n') { - ++index; - } - ++lineNumber; - lineStart = index; - } else { - break; - } - } - } - - function filterCommentLocation() { - var i, entry, comment, comments = []; - - for (i = 0; i < extra.comments.length; ++i) { - entry = extra.comments[i]; - comment = { - type: entry.type, - value: entry.value - }; - if (extra.range) { - comment.range = entry.range; - } - if (extra.loc) { - comment.loc = entry.loc; - } - comments.push(comment); - } - - extra.comments = comments; - } - - function collectToken() { - var start, loc, token, range, value; - - skipComment(); - start = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - token = extra.advance(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - if (token.type !== Token.EOF) { - range = [token.range[0], token.range[1]]; - value = sliceSource(token.range[0], token.range[1]); - extra.tokens.push({ - type: TokenName[token.type], - value: value, - range: range, - loc: loc - }); - } - - return token; - } - - function collectRegex() { - var pos, loc, regex, token; - - skipComment(); - - pos = index; - loc = { - start: { - line: lineNumber, - column: index - lineStart - } - }; - - regex = extra.scanRegExp(); - loc.end = { - line: lineNumber, - column: index - lineStart - }; - - // Pop the previous token, which is likely '/' or '/=' - if (extra.tokens.length > 0) { - token = extra.tokens[extra.tokens.length - 1]; - if (token.range[0] === pos && token.type === 'Punctuator') { - if (token.value === '/' || token.value === '/=') { - extra.tokens.pop(); - } - } - } - - extra.tokens.push({ - type: 'RegularExpression', - value: regex.literal, - range: [pos, index], - loc: loc - }); - - return regex; - } - - function filterTokenLocation() { - var i, entry, token, tokens = []; - - for (i = 0; i < extra.tokens.length; ++i) { - entry = extra.tokens[i]; - token = { - type: entry.type, - value: entry.value - }; - if (extra.range) { - token.range = entry.range; - } - if (extra.loc) { - token.loc = entry.loc; - } - tokens.push(token); - } - - extra.tokens = tokens; - } - - function createLiteral(token) { - return { - type: Syntax.Literal, - value: token.value - }; - } - - function createRawLiteral(token) { - return { - type: Syntax.Literal, - value: token.value, - raw: sliceSource(token.range[0], token.range[1]) - }; - } - - function createLocationMarker() { - var marker = {}; - - marker.range = [index, index]; - marker.loc = { - start: { - line: lineNumber, - column: index - lineStart - }, - end: { - line: lineNumber, - column: index - lineStart - } - }; - - marker.end = function () { - this.range[1] = index; - this.loc.end.line = lineNumber; - this.loc.end.column = index - lineStart; - }; - - marker.applyGroup = function (node) { - if (extra.range) { - node.groupRange = [this.range[0], this.range[1]]; - } - if (extra.loc) { - node.groupLoc = { - start: { - line: this.loc.start.line, - column: this.loc.start.column - }, - end: { - line: this.loc.end.line, - column: this.loc.end.column - } - }; - } - }; - - marker.apply = function (node) { - if (extra.range) { - node.range = [this.range[0], this.range[1]]; - } - if (extra.loc) { - node.loc = { - start: { - line: this.loc.start.line, - column: this.loc.start.column - }, - end: { - line: this.loc.end.line, - column: this.loc.end.column - } - }; - } - }; - - return marker; - } - - function trackGroupExpression() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - expect('('); - - expr = parseExpression(); - - expect(')'); - - marker.end(); - marker.applyGroup(expr); - - return expr; - } - - function trackLeftHandSideExpression() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[')) { - if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - marker.end(); - marker.apply(expr); - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - marker.end(); - marker.apply(expr); - } - } - - return expr; - } - - function trackLeftHandSideExpressionAllowCall() { - var marker, expr; - - skipComment(); - marker = createLocationMarker(); - - expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); - - while (match('.') || match('[') || match('(')) { - if (match('(')) { - expr = { - type: Syntax.CallExpression, - callee: expr, - 'arguments': parseArguments() - }; - marker.end(); - marker.apply(expr); - } else if (match('[')) { - expr = { - type: Syntax.MemberExpression, - computed: true, - object: expr, - property: parseComputedMember() - }; - marker.end(); - marker.apply(expr); - } else { - expr = { - type: Syntax.MemberExpression, - computed: false, - object: expr, - property: parseNonComputedMember() - }; - marker.end(); - marker.apply(expr); - } - } - - return expr; - } - - function filterGroup(node) { - var n, i, entry; - - n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {}; - for (i in node) { - if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') { - entry = node[i]; - if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) { - n[i] = entry; - } else { - n[i] = filterGroup(entry); - } - } - } - return n; - } - - function wrapTrackingFunction(range, loc) { - - return function (parseFunction) { - - function isBinary(node) { - return node.type === Syntax.LogicalExpression || - node.type === Syntax.BinaryExpression; - } - - function visit(node) { - var start, end; - - if (isBinary(node.left)) { - visit(node.left); - } - if (isBinary(node.right)) { - visit(node.right); - } - - if (range) { - if (node.left.groupRange || node.right.groupRange) { - start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0]; - end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1]; - node.range = [start, end]; - } else if (typeof node.range === 'undefined') { - start = node.left.range[0]; - end = node.right.range[1]; - node.range = [start, end]; - } - } - if (loc) { - if (node.left.groupLoc || node.right.groupLoc) { - start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start; - end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end; - node.loc = { - start: start, - end: end - }; - } else if (typeof node.loc === 'undefined') { - node.loc = { - start: node.left.loc.start, - end: node.right.loc.end - }; - } - } - } - - return function () { - var marker, node; - - skipComment(); - - marker = createLocationMarker(); - node = parseFunction.apply(null, arguments); - marker.end(); - - if (range && typeof node.range === 'undefined') { - marker.apply(node); - } - - if (loc && typeof node.loc === 'undefined') { - marker.apply(node); - } - - if (isBinary(node)) { - visit(node); - } - - return node; - }; - }; - } - - function patch() { - - var wrapTracking; - - if (extra.comments) { - extra.skipComment = skipComment; - skipComment = scanComment; - } - - if (extra.raw) { - extra.createLiteral = createLiteral; - createLiteral = createRawLiteral; - } - - if (extra.range || extra.loc) { - - extra.parseGroupExpression = parseGroupExpression; - extra.parseLeftHandSideExpression = parseLeftHandSideExpression; - extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall; - parseGroupExpression = trackGroupExpression; - parseLeftHandSideExpression = trackLeftHandSideExpression; - parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall; - - wrapTracking = wrapTrackingFunction(extra.range, extra.loc); - - extra.parseAdditiveExpression = parseAdditiveExpression; - extra.parseAssignmentExpression = parseAssignmentExpression; - extra.parseBitwiseANDExpression = parseBitwiseANDExpression; - extra.parseBitwiseORExpression = parseBitwiseORExpression; - extra.parseBitwiseXORExpression = parseBitwiseXORExpression; - extra.parseBlock = parseBlock; - extra.parseFunctionSourceElements = parseFunctionSourceElements; - extra.parseCatchClause = parseCatchClause; - extra.parseComputedMember = parseComputedMember; - extra.parseConditionalExpression = parseConditionalExpression; - extra.parseConstLetDeclaration = parseConstLetDeclaration; - extra.parseEqualityExpression = parseEqualityExpression; - extra.parseExpression = parseExpression; - extra.parseForVariableDeclaration = parseForVariableDeclaration; - extra.parseFunctionDeclaration = parseFunctionDeclaration; - extra.parseFunctionExpression = parseFunctionExpression; - extra.parseLogicalANDExpression = parseLogicalANDExpression; - extra.parseLogicalORExpression = parseLogicalORExpression; - extra.parseMultiplicativeExpression = parseMultiplicativeExpression; - extra.parseNewExpression = parseNewExpression; - extra.parseNonComputedProperty = parseNonComputedProperty; - extra.parseObjectProperty = parseObjectProperty; - extra.parseObjectPropertyKey = parseObjectPropertyKey; - extra.parsePostfixExpression = parsePostfixExpression; - extra.parsePrimaryExpression = parsePrimaryExpression; - extra.parseProgram = parseProgram; - extra.parsePropertyFunction = parsePropertyFunction; - extra.parseRelationalExpression = parseRelationalExpression; - extra.parseStatement = parseStatement; - extra.parseShiftExpression = parseShiftExpression; - extra.parseSwitchCase = parseSwitchCase; - extra.parseUnaryExpression = parseUnaryExpression; - extra.parseVariableDeclaration = parseVariableDeclaration; - extra.parseVariableIdentifier = parseVariableIdentifier; - - parseAdditiveExpression = wrapTracking(extra.parseAdditiveExpression); - parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression); - parseBitwiseANDExpression = wrapTracking(extra.parseBitwiseANDExpression); - parseBitwiseORExpression = wrapTracking(extra.parseBitwiseORExpression); - parseBitwiseXORExpression = wrapTracking(extra.parseBitwiseXORExpression); - parseBlock = wrapTracking(extra.parseBlock); - parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements); - parseCatchClause = wrapTracking(extra.parseCatchClause); - parseComputedMember = wrapTracking(extra.parseComputedMember); - parseConditionalExpression = wrapTracking(extra.parseConditionalExpression); - parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration); - parseEqualityExpression = wrapTracking(extra.parseEqualityExpression); - parseExpression = wrapTracking(extra.parseExpression); - parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration); - parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration); - parseFunctionExpression = wrapTracking(extra.parseFunctionExpression); - parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression); - parseLogicalANDExpression = wrapTracking(extra.parseLogicalANDExpression); - parseLogicalORExpression = wrapTracking(extra.parseLogicalORExpression); - parseMultiplicativeExpression = wrapTracking(extra.parseMultiplicativeExpression); - parseNewExpression = wrapTracking(extra.parseNewExpression); - parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty); - parseObjectProperty = wrapTracking(extra.parseObjectProperty); - parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey); - parsePostfixExpression = wrapTracking(extra.parsePostfixExpression); - parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression); - parseProgram = wrapTracking(extra.parseProgram); - parsePropertyFunction = wrapTracking(extra.parsePropertyFunction); - parseRelationalExpression = wrapTracking(extra.parseRelationalExpression); - parseStatement = wrapTracking(extra.parseStatement); - parseShiftExpression = wrapTracking(extra.parseShiftExpression); - parseSwitchCase = wrapTracking(extra.parseSwitchCase); - parseUnaryExpression = wrapTracking(extra.parseUnaryExpression); - parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration); - parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier); - } - - if (typeof extra.tokens !== 'undefined') { - extra.advance = advance; - extra.scanRegExp = scanRegExp; - - advance = collectToken; - scanRegExp = collectRegex; - } - } - - function unpatch() { - if (typeof extra.skipComment === 'function') { - skipComment = extra.skipComment; - } - - if (extra.raw) { - createLiteral = extra.createLiteral; - } - - if (extra.range || extra.loc) { - parseAdditiveExpression = extra.parseAdditiveExpression; - parseAssignmentExpression = extra.parseAssignmentExpression; - parseBitwiseANDExpression = extra.parseBitwiseANDExpression; - parseBitwiseORExpression = extra.parseBitwiseORExpression; - parseBitwiseXORExpression = extra.parseBitwiseXORExpression; - parseBlock = extra.parseBlock; - parseFunctionSourceElements = extra.parseFunctionSourceElements; - parseCatchClause = extra.parseCatchClause; - parseComputedMember = extra.parseComputedMember; - parseConditionalExpression = extra.parseConditionalExpression; - parseConstLetDeclaration = extra.parseConstLetDeclaration; - parseEqualityExpression = extra.parseEqualityExpression; - parseExpression = extra.parseExpression; - parseForVariableDeclaration = extra.parseForVariableDeclaration; - parseFunctionDeclaration = extra.parseFunctionDeclaration; - parseFunctionExpression = extra.parseFunctionExpression; - parseGroupExpression = extra.parseGroupExpression; - parseLeftHandSideExpression = extra.parseLeftHandSideExpression; - parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall; - parseLogicalANDExpression = extra.parseLogicalANDExpression; - parseLogicalORExpression = extra.parseLogicalORExpression; - parseMultiplicativeExpression = extra.parseMultiplicativeExpression; - parseNewExpression = extra.parseNewExpression; - parseNonComputedProperty = extra.parseNonComputedProperty; - parseObjectProperty = extra.parseObjectProperty; - parseObjectPropertyKey = extra.parseObjectPropertyKey; - parsePrimaryExpression = extra.parsePrimaryExpression; - parsePostfixExpression = extra.parsePostfixExpression; - parseProgram = extra.parseProgram; - parsePropertyFunction = extra.parsePropertyFunction; - parseRelationalExpression = extra.parseRelationalExpression; - parseStatement = extra.parseStatement; - parseShiftExpression = extra.parseShiftExpression; - parseSwitchCase = extra.parseSwitchCase; - parseUnaryExpression = extra.parseUnaryExpression; - parseVariableDeclaration = extra.parseVariableDeclaration; - parseVariableIdentifier = extra.parseVariableIdentifier; - } - - if (typeof extra.scanRegExp === 'function') { - advance = extra.advance; - scanRegExp = extra.scanRegExp; - } - } - - function stringToArray(str) { - var length = str.length, - result = [], - i; - for (i = 0; i < length; ++i) { - result[i] = str.charAt(i); - } - return result; - } - - function parse(code, options) { - var program, toString; - - toString = String; - if (typeof code !== 'string' && !(code instanceof String)) { - code = toString(code); - } - - source = code; - index = 0; - lineNumber = (source.length > 0) ? 1 : 0; - lineStart = 0; - length = source.length; - buffer = null; - state = { - allowIn: true, - labelSet: {}, - inFunctionBody: false, - inIteration: false, - inSwitch: false - }; - - extra = {}; - if (typeof options !== 'undefined') { - extra.range = (typeof options.range === 'boolean') && options.range; - extra.loc = (typeof options.loc === 'boolean') && options.loc; - extra.raw = (typeof options.raw === 'boolean') && options.raw; - if (typeof options.tokens === 'boolean' && options.tokens) { - extra.tokens = []; - } - if (typeof options.comment === 'boolean' && options.comment) { - extra.comments = []; - } - if (typeof options.tolerant === 'boolean' && options.tolerant) { - extra.errors = []; - } - } - - if (length > 0) { - if (typeof source[0] === 'undefined') { - // Try first to convert to a string. This is good as fast path - // for old IE which understands string indexing for string - // literals only and not for string object. - if (code instanceof String) { - source = code.valueOf(); - } - - // Force accessing the characters via an array. - if (typeof source[0] === 'undefined') { - source = stringToArray(code); - } - } - } - - patch(); - try { - program = parseProgram(); - if (typeof extra.comments !== 'undefined') { - filterCommentLocation(); - program.comments = extra.comments; - } - if (typeof extra.tokens !== 'undefined') { - filterTokenLocation(); - program.tokens = extra.tokens; - } - if (typeof extra.errors !== 'undefined') { - program.errors = extra.errors; - } - if (extra.range || extra.loc) { - program.body = filterGroup(program.body); - } - } catch (e) { - throw e; - } finally { - unpatch(); - extra = {}; - } - - return program; - } - - // Sync with package.json. - exports.version = '1.0.4'; - - exports.parse = parse; - - // Deep copy. - exports.Syntax = (function () { - var name, types = {}; - - if (typeof Object.create === 'function') { - types = Object.create(null); - } - - for (name in Syntax) { - if (Syntax.hasOwnProperty(name)) { - types[name] = Syntax[name]; - } - } - - if (typeof Object.freeze === 'function') { - Object.freeze(types); - } - - return types; - }()); - -})); -/* vim: set sw=4 ts=4 et tw=80 : */ -/** - * @license Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*global define, Reflect */ - -/* - * xpcshell has a smaller stack on linux and windows (1MB vs 9MB on mac), - * and the recursive nature of esprima can cause it to overflow pretty - * quickly. So favor it built in Reflect parser: - * https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API - */ -define('esprimaAdapter', ['./esprima', 'env'], function (esprima, env) { - if (env.get() === 'xpconnect' && typeof Reflect !== 'undefined') { - return Reflect; - } else { - return esprima; - } -}); -define('uglifyjs/consolidator', ["require", "exports", "module", "./parse-js", "./process"], function(require, exports, module) { -/** - * @preserve Copyright 2012 Robert Gust-Bardon . - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * * Redistributions of source code must retain the above - * copyright notice, this list of conditions and the following - * disclaimer. - * - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER "AS IS" AND ANY - * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ - -/** - * @fileoverview Enhances UglifyJS with consolidation of null, Boolean, and String values. - *

      Also known as aliasing, this feature has been deprecated in the Closure Compiler since its - * initial release, where it is unavailable from the CLI. The Closure Compiler allows one to log and - * influence this process. In contrast, this implementation does not introduce - * any variable declarations in global code and derives String values from - * identifier names used as property accessors.

      - *

      Consolidating literals may worsen the data compression ratio when an encoding - * transformation is applied. For instance, jQuery 1.7.1 takes 248235 bytes. - * Building it with - * UglifyJS v1.2.5 results in 93647 bytes (37.73% of the original) which are - * then compressed to 33154 bytes (13.36% of the original) using gzip(1). Building it with the same - * version of UglifyJS 1.2.5 patched with the implementation of consolidation - * results in 80784 bytes (a decrease of 12863 bytes, i.e. 13.74%, in comparison - * to the aforementioned 93647 bytes) which are then compressed to 34013 bytes - * (an increase of 859 bytes, i.e. 2.59%, in comparison to the aforementioned - * 33154 bytes).

      - *

      Written in the strict variant - * of ECMA-262 5.1 Edition. Encoded in UTF-8. Follows Revision 2.28 of the Google JavaScript Style Guide (except for the - * discouraged use of the {@code function} tag and the {@code namespace} tag). - * 100% typed for the Closure Compiler Version 1741.

      - *

      Should you find this software useful, please consider a donation.

      - * @author follow.me@RGustBardon (Robert Gust-Bardon) - * @supported Tested with: - * - */ - -/*global console:false, exports:true, module:false, require:false */ -/*jshint sub:true */ -/** - * Consolidates null, Boolean, and String values found inside an AST. - * @param {!TSyntacticCodeUnit} oAbstractSyntaxTree An array-like object - * representing an AST. - * @return {!TSyntacticCodeUnit} An array-like object representing an AST with its null, Boolean, and - * String values consolidated. - */ -// TODO(user) Consolidation of mathematical values found in numeric literals. -// TODO(user) Unconsolidation. -// TODO(user) Consolidation of ECMA-262 6th Edition programs. -// TODO(user) Rewrite in ECMA-262 6th Edition. -exports['ast_consolidate'] = function(oAbstractSyntaxTree) { - 'use strict'; - /*jshint bitwise:true, curly:true, eqeqeq:true, forin:true, immed:true, - latedef:true, newcap:true, noarge:true, noempty:true, nonew:true, - onevar:true, plusplus:true, regexp:true, undef:true, strict:true, - sub:false, trailing:true */ - - var _, - /** - * A record consisting of data about one or more source elements. - * @constructor - * @nosideeffects - */ - TSourceElementsData = function() { - /** - * The category of the elements. - * @type {number} - * @see ESourceElementCategories - */ - this.nCategory = ESourceElementCategories.N_OTHER; - /** - * The number of occurrences (within the elements) of each primitive - * value that could be consolidated. - * @type {!Array.>} - */ - this.aCount = []; - this.aCount[EPrimaryExpressionCategories.N_IDENTIFIER_NAMES] = {}; - this.aCount[EPrimaryExpressionCategories.N_STRING_LITERALS] = {}; - this.aCount[EPrimaryExpressionCategories.N_NULL_AND_BOOLEAN_LITERALS] = - {}; - /** - * Identifier names found within the elements. - * @type {!Array.} - */ - this.aIdentifiers = []; - /** - * Prefixed representation Strings of each primitive value that could be - * consolidated within the elements. - * @type {!Array.} - */ - this.aPrimitiveValues = []; - }, - /** - * A record consisting of data about a primitive value that could be - * consolidated. - * @constructor - * @nosideeffects - */ - TPrimitiveValue = function() { - /** - * The difference in the number of terminal symbols between the original - * source text and the one with the primitive value consolidated. If the - * difference is positive, the primitive value is considered worthwhile. - * @type {number} - */ - this.nSaving = 0; - /** - * An identifier name of the variable that will be declared and assigned - * the primitive value if the primitive value is consolidated. - * @type {string} - */ - this.sName = ''; - }, - /** - * A record consisting of data on what to consolidate within the range of - * source elements that is currently being considered. - * @constructor - * @nosideeffects - */ - TSolution = function() { - /** - * An object whose keys are prefixed representation Strings of each - * primitive value that could be consolidated within the elements and - * whose values are corresponding data about those primitive values. - * @type {!Object.} - * @see TPrimitiveValue - */ - this.oPrimitiveValues = {}; - /** - * The difference in the number of terminal symbols between the original - * source text and the one with all the worthwhile primitive values - * consolidated. - * @type {number} - * @see TPrimitiveValue#nSaving - */ - this.nSavings = 0; - }, - /** - * The processor of ASTs found - * in UglifyJS. - * @namespace - * @type {!TProcessor} - */ - oProcessor = (/** @type {!TProcessor} */ require('./process')), - /** - * A record consisting of a number of constants that represent the - * difference in the number of terminal symbols between a source text with - * a modified syntactic code unit and the original one. - * @namespace - * @type {!Object.} - */ - oWeights = { - /** - * The difference in the number of punctuators required by the bracket - * notation and the dot notation. - *

      '[]'.length - '.'.length

      - * @const - * @type {number} - */ - N_PROPERTY_ACCESSOR: 1, - /** - * The number of punctuators required by a variable declaration with an - * initialiser. - *

      ':'.length + ';'.length

      - * @const - * @type {number} - */ - N_VARIABLE_DECLARATION: 2, - /** - * The number of terminal symbols required to introduce a variable - * statement (excluding its variable declaration list). - *

      'var '.length

      - * @const - * @type {number} - */ - N_VARIABLE_STATEMENT_AFFIXATION: 4, - /** - * The number of terminal symbols needed to enclose source elements - * within a function call with no argument values to a function with an - * empty parameter list. - *

      '(function(){}());'.length

      - * @const - * @type {number} - */ - N_CLOSURE: 17 - }, - /** - * Categories of primary expressions from which primitive values that - * could be consolidated are derivable. - * @namespace - * @enum {number} - */ - EPrimaryExpressionCategories = { - /** - * Identifier names used as property accessors. - * @type {number} - */ - N_IDENTIFIER_NAMES: 0, - /** - * String literals. - * @type {number} - */ - N_STRING_LITERALS: 1, - /** - * Null and Boolean literals. - * @type {number} - */ - N_NULL_AND_BOOLEAN_LITERALS: 2 - }, - /** - * Prefixes of primitive values that could be consolidated. - * The String values of the prefixes must have same number of characters. - * The prefixes must not be used in any properties defined in any version - * of ECMA-262. - * @namespace - * @enum {string} - */ - EValuePrefixes = { - /** - * Identifies String values. - * @type {string} - */ - S_STRING: '#S', - /** - * Identifies null and Boolean values. - * @type {string} - */ - S_SYMBOLIC: '#O' - }, - /** - * Categories of source elements in terms of their appropriateness of - * having their primitive values consolidated. - * @namespace - * @enum {number} - */ - ESourceElementCategories = { - /** - * Identifies a source element that includes the {@code with} statement. - * @type {number} - */ - N_WITH: 0, - /** - * Identifies a source element that includes the {@code eval} identifier name. - * @type {number} - */ - N_EVAL: 1, - /** - * Identifies a source element that must be excluded from the process - * unless its whole scope is examined. - * @type {number} - */ - N_EXCLUDABLE: 2, - /** - * Identifies source elements not posing any problems. - * @type {number} - */ - N_OTHER: 3 - }, - /** - * The list of literals (other than the String ones) whose primitive - * values can be consolidated. - * @const - * @type {!Array.} - */ - A_OTHER_SUBSTITUTABLE_LITERALS = [ - 'null', // The null literal. - 'false', // The Boolean literal {@code false}. - 'true' // The Boolean literal {@code true}. - ]; - - (/** - * Consolidates all worthwhile primitive values in a syntactic code unit. - * @param {!TSyntacticCodeUnit} oSyntacticCodeUnit An array-like object - * representing the branch of the abstract syntax tree representing the - * syntactic code unit along with its scope. - * @see TPrimitiveValue#nSaving - */ - function fExamineSyntacticCodeUnit(oSyntacticCodeUnit) { - var _, - /** - * Indicates whether the syntactic code unit represents global code. - * @type {boolean} - */ - bIsGlobal = 'toplevel' === oSyntacticCodeUnit[0], - /** - * Indicates whether the whole scope is being examined. - * @type {boolean} - */ - bIsWhollyExaminable = !bIsGlobal, - /** - * An array-like object representing source elements that constitute a - * syntactic code unit. - * @type {!TSyntacticCodeUnit} - */ - oSourceElements, - /** - * A record consisting of data about the source element that is - * currently being examined. - * @type {!TSourceElementsData} - */ - oSourceElementData, - /** - * The scope of the syntactic code unit. - * @type {!TScope} - */ - oScope, - /** - * An instance of an object that allows the traversal of an AST. - * @type {!TWalker} - */ - oWalker, - /** - * An object encompassing collections of functions used during the - * traversal of an AST. - * @namespace - * @type {!Object.>} - */ - oWalkers = { - /** - * A collection of functions used during the surveyance of source - * elements. - * @namespace - * @type {!Object.} - */ - oSurveySourceElement: { - /**#nocode+*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. Adds the identifier of the function and its formal - * parameters to the list of identifier names found. - * @param {string} sIdentifier The identifier of the function. - * @param {!Array.} aFormalParameterList Formal parameters. - * @param {!TSyntacticCodeUnit} oFunctionBody Function code. - */ - 'defun': function( - sIdentifier, - aFormalParameterList, - oFunctionBody) { - fClassifyAsExcludable(); - fAddIdentifier(sIdentifier); - aFormalParameterList.forEach(fAddIdentifier); - }, - /** - * Increments the count of the number of occurrences of the String - * value that is equivalent to the sequence of terminal symbols - * that constitute the encountered identifier name. - * @param {!TSyntacticCodeUnit} oExpression The nonterminal - * MemberExpression. - * @param {string} sIdentifierName The identifier name used as the - * property accessor. - * @return {!Array} The encountered branch of an AST with its nonterminal - * MemberExpression traversed. - */ - 'dot': function(oExpression, sIdentifierName) { - fCountPrimaryExpression( - EPrimaryExpressionCategories.N_IDENTIFIER_NAMES, - EValuePrefixes.S_STRING + sIdentifierName); - return ['dot', oWalker.walk(oExpression), sIdentifierName]; - }, - /** - * Adds the optional identifier of the function and its formal - * parameters to the list of identifier names found. - * @param {?string} sIdentifier The optional identifier of the - * function. - * @param {!Array.} aFormalParameterList Formal parameters. - * @param {!TSyntacticCodeUnit} oFunctionBody Function code. - */ - 'function': function( - sIdentifier, - aFormalParameterList, - oFunctionBody) { - if ('string' === typeof sIdentifier) { - fAddIdentifier(sIdentifier); - } - aFormalParameterList.forEach(fAddIdentifier); - }, - /** - * Either increments the count of the number of occurrences of the - * encountered null or Boolean value or classifies a source element - * as containing the {@code eval} identifier name. - * @param {string} sIdentifier The identifier encountered. - */ - 'name': function(sIdentifier) { - if (-1 !== A_OTHER_SUBSTITUTABLE_LITERALS.indexOf(sIdentifier)) { - fCountPrimaryExpression( - EPrimaryExpressionCategories.N_NULL_AND_BOOLEAN_LITERALS, - EValuePrefixes.S_SYMBOLIC + sIdentifier); - } else { - if ('eval' === sIdentifier) { - oSourceElementData.nCategory = - ESourceElementCategories.N_EVAL; - } - fAddIdentifier(sIdentifier); - } - }, - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. - * @param {TSyntacticCodeUnit} oExpression The expression whose - * value is to be returned. - */ - 'return': function(oExpression) { - fClassifyAsExcludable(); - }, - /** - * Increments the count of the number of occurrences of the - * encountered String value. - * @param {string} sStringValue The String value of the string - * literal encountered. - */ - 'string': function(sStringValue) { - if (sStringValue.length > 0) { - fCountPrimaryExpression( - EPrimaryExpressionCategories.N_STRING_LITERALS, - EValuePrefixes.S_STRING + sStringValue); - } - }, - /** - * Adds the identifier reserved for an exception to the list of - * identifier names found. - * @param {!TSyntacticCodeUnit} oTry A block of code in which an - * exception can occur. - * @param {Array} aCatch The identifier reserved for an exception - * and a block of code to handle the exception. - * @param {TSyntacticCodeUnit} oFinally An optional block of code - * to be evaluated regardless of whether an exception occurs. - */ - 'try': function(oTry, aCatch, oFinally) { - if (Array.isArray(aCatch)) { - fAddIdentifier(aCatch[0]); - } - }, - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. Adds the identifier of each declared variable to the list - * of identifier names found. - * @param {!Array.} aVariableDeclarationList Variable - * declarations. - */ - 'var': function(aVariableDeclarationList) { - fClassifyAsExcludable(); - aVariableDeclarationList.forEach(fAddVariable); - }, - /** - * Classifies a source element as containing the {@code with} - * statement. - * @param {!TSyntacticCodeUnit} oExpression An expression whose - * value is to be converted to a value of type Object and - * become the binding object of a new object environment - * record of a new lexical environment in which the statement - * is to be executed. - * @param {!TSyntacticCodeUnit} oStatement The statement to be - * executed in the augmented lexical environment. - * @return {!Array} An empty array to stop the traversal. - */ - 'with': function(oExpression, oStatement) { - oSourceElementData.nCategory = ESourceElementCategories.N_WITH; - return []; - } - /**#nocode-*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - }, - /** - * A collection of functions used while looking for nested functions. - * @namespace - * @type {!Object.} - */ - oExamineFunctions: { - /**#nocode+*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - /** - * Orders an examination of a nested function declaration. - * @this {!TSyntacticCodeUnit} An array-like object representing - * the branch of an AST representing the syntactic code unit along with - * its scope. - * @return {!Array} An empty array to stop the traversal. - */ - 'defun': function() { - fExamineSyntacticCodeUnit(this); - return []; - }, - /** - * Orders an examination of a nested function expression. - * @this {!TSyntacticCodeUnit} An array-like object representing - * the branch of an AST representing the syntactic code unit along with - * its scope. - * @return {!Array} An empty array to stop the traversal. - */ - 'function': function() { - fExamineSyntacticCodeUnit(this); - return []; - } - /**#nocode-*/ // JsDoc Toolkit 2.4.0 hides some of the keys. - } - }, - /** - * Records containing data about source elements. - * @type {Array.} - */ - aSourceElementsData = [], - /** - * The index (in the source text order) of the source element - * immediately following a Directive Prologue. - * @type {number} - */ - nAfterDirectivePrologue = 0, - /** - * The index (in the source text order) of the source element that is - * currently being considered. - * @type {number} - */ - nPosition, - /** - * The index (in the source text order) of the source element that is - * the last element of the range of source elements that is currently - * being considered. - * @type {(undefined|number)} - */ - nTo, - /** - * Initiates the traversal of a source element. - * @param {!TWalker} oWalker An instance of an object that allows the - * traversal of an abstract syntax tree. - * @param {!TSyntacticCodeUnit} oSourceElement A source element from - * which the traversal should commence. - * @return {function(): !TSyntacticCodeUnit} A function that is able to - * initiate the traversal from a given source element. - */ - cContext = function(oWalker, oSourceElement) { - /** - * @return {!TSyntacticCodeUnit} A function that is able to - * initiate the traversal from a given source element. - */ - var fLambda = function() { - return oWalker.walk(oSourceElement); - }; - - return fLambda; - }, - /** - * Classifies the source element as excludable if it does not - * contain a {@code with} statement or the {@code eval} identifier - * name. - */ - fClassifyAsExcludable = function() { - if (oSourceElementData.nCategory === - ESourceElementCategories.N_OTHER) { - oSourceElementData.nCategory = - ESourceElementCategories.N_EXCLUDABLE; - } - }, - /** - * Adds an identifier to the list of identifier names found. - * @param {string} sIdentifier The identifier to be added. - */ - fAddIdentifier = function(sIdentifier) { - if (-1 === oSourceElementData.aIdentifiers.indexOf(sIdentifier)) { - oSourceElementData.aIdentifiers.push(sIdentifier); - } - }, - /** - * Adds the identifier of a variable to the list of identifier names - * found. - * @param {!Array} aVariableDeclaration A variable declaration. - */ - fAddVariable = function(aVariableDeclaration) { - fAddIdentifier(/** @type {string} */ aVariableDeclaration[0]); - }, - /** - * Increments the count of the number of occurrences of the prefixed - * String representation attributed to the primary expression. - * @param {number} nCategory The category of the primary expression. - * @param {string} sName The prefixed String representation attributed - * to the primary expression. - */ - fCountPrimaryExpression = function(nCategory, sName) { - if (!oSourceElementData.aCount[nCategory].hasOwnProperty(sName)) { - oSourceElementData.aCount[nCategory][sName] = 0; - if (-1 === oSourceElementData.aPrimitiveValues.indexOf(sName)) { - oSourceElementData.aPrimitiveValues.push(sName); - } - } - oSourceElementData.aCount[nCategory][sName] += 1; - }, - /** - * Consolidates all worthwhile primitive values in a range of source - * elements. - * @param {number} nFrom The index (in the source text order) of the - * source element that is the first element of the range. - * @param {number} nTo The index (in the source text order) of the - * source element that is the last element of the range. - * @param {boolean} bEnclose Indicates whether the range should be - * enclosed within a function call with no argument values to a - * function with an empty parameter list if any primitive values - * are consolidated. - * @see TPrimitiveValue#nSaving - */ - fExamineSourceElements = function(nFrom, nTo, bEnclose) { - var _, - /** - * The index of the last mangled name. - * @type {number} - */ - nIndex = oScope.cname, - /** - * The index of the source element that is currently being - * considered. - * @type {number} - */ - nPosition, - /** - * A collection of functions used during the consolidation of - * primitive values and identifier names used as property - * accessors. - * @namespace - * @type {!Object.} - */ - oWalkersTransformers = { - /** - * If the String value that is equivalent to the sequence of - * terminal symbols that constitute the encountered identifier - * name is worthwhile, a syntactic conversion from the dot - * notation to the bracket notation ensues with that sequence - * being substituted by an identifier name to which the value - * is assigned. - * Applies to property accessors that use the dot notation. - * @param {!TSyntacticCodeUnit} oExpression The nonterminal - * MemberExpression. - * @param {string} sIdentifierName The identifier name used as - * the property accessor. - * @return {!Array} A syntactic code unit that is equivalent to - * the one encountered. - * @see TPrimitiveValue#nSaving - */ - 'dot': function(oExpression, sIdentifierName) { - /** - * The prefixed String value that is equivalent to the - * sequence of terminal symbols that constitute the - * encountered identifier name. - * @type {string} - */ - var sPrefixed = EValuePrefixes.S_STRING + sIdentifierName; - - return oSolutionBest.oPrimitiveValues.hasOwnProperty( - sPrefixed) && - oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0 ? - ['sub', - oWalker.walk(oExpression), - ['name', - oSolutionBest.oPrimitiveValues[sPrefixed].sName]] : - ['dot', oWalker.walk(oExpression), sIdentifierName]; - }, - /** - * If the encountered identifier is a null or Boolean literal - * and its value is worthwhile, the identifier is substituted - * by an identifier name to which that value is assigned. - * Applies to identifier names. - * @param {string} sIdentifier The identifier encountered. - * @return {!Array} A syntactic code unit that is equivalent to - * the one encountered. - * @see TPrimitiveValue#nSaving - */ - 'name': function(sIdentifier) { - /** - * The prefixed representation String of the identifier. - * @type {string} - */ - var sPrefixed = EValuePrefixes.S_SYMBOLIC + sIdentifier; - - return [ - 'name', - oSolutionBest.oPrimitiveValues.hasOwnProperty(sPrefixed) && - oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0 ? - oSolutionBest.oPrimitiveValues[sPrefixed].sName : - sIdentifier - ]; - }, - /** - * If the encountered String value is worthwhile, it is - * substituted by an identifier name to which that value is - * assigned. - * Applies to String values. - * @param {string} sStringValue The String value of the string - * literal encountered. - * @return {!Array} A syntactic code unit that is equivalent to - * the one encountered. - * @see TPrimitiveValue#nSaving - */ - 'string': function(sStringValue) { - /** - * The prefixed representation String of the primitive value - * of the literal. - * @type {string} - */ - var sPrefixed = - EValuePrefixes.S_STRING + sStringValue; - - return oSolutionBest.oPrimitiveValues.hasOwnProperty( - sPrefixed) && - oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0 ? - ['name', - oSolutionBest.oPrimitiveValues[sPrefixed].sName] : - ['string', sStringValue]; - } - }, - /** - * Such data on what to consolidate within the range of source - * elements that is currently being considered that lead to the - * greatest known reduction of the number of the terminal symbols - * in comparison to the original source text. - * @type {!TSolution} - */ - oSolutionBest = new TSolution(), - /** - * Data representing an ongoing attempt to find a better - * reduction of the number of the terminal symbols in comparison - * to the original source text than the best one that is - * currently known. - * @type {!TSolution} - * @see oSolutionBest - */ - oSolutionCandidate = new TSolution(), - /** - * A record consisting of data about the range of source elements - * that is currently being examined. - * @type {!TSourceElementsData} - */ - oSourceElementsData = new TSourceElementsData(), - /** - * Variable declarations for each primitive value that is to be - * consolidated within the elements. - * @type {!Array.} - */ - aVariableDeclarations = [], - /** - * Augments a list with a prefixed representation String. - * @param {!Array.} aList A list that is to be augmented. - * @return {function(string)} A function that augments a list - * with a prefixed representation String. - */ - cAugmentList = function(aList) { - /** - * @param {string} sPrefixed Prefixed representation String of - * a primitive value that could be consolidated within the - * elements. - */ - var fLambda = function(sPrefixed) { - if (-1 === aList.indexOf(sPrefixed)) { - aList.push(sPrefixed); - } - }; - - return fLambda; - }, - /** - * Adds the number of occurrences of a primitive value of a given - * category that could be consolidated in the source element with - * a given index to the count of occurrences of that primitive - * value within the range of source elements that is currently - * being considered. - * @param {number} nPosition The index (in the source text order) - * of a source element. - * @param {number} nCategory The category of the primary - * expression from which the primitive value is derived. - * @return {function(string)} A function that performs the - * addition. - * @see cAddOccurrencesInCategory - */ - cAddOccurrences = function(nPosition, nCategory) { - /** - * @param {string} sPrefixed The prefixed representation String - * of a primitive value. - */ - var fLambda = function(sPrefixed) { - if (!oSourceElementsData.aCount[nCategory].hasOwnProperty( - sPrefixed)) { - oSourceElementsData.aCount[nCategory][sPrefixed] = 0; - } - oSourceElementsData.aCount[nCategory][sPrefixed] += - aSourceElementsData[nPosition].aCount[nCategory][ - sPrefixed]; - }; - - return fLambda; - }, - /** - * Adds the number of occurrences of each primitive value of a - * given category that could be consolidated in the source - * element with a given index to the count of occurrences of that - * primitive values within the range of source elements that is - * currently being considered. - * @param {number} nPosition The index (in the source text order) - * of a source element. - * @return {function(number)} A function that performs the - * addition. - * @see fAddOccurrences - */ - cAddOccurrencesInCategory = function(nPosition) { - /** - * @param {number} nCategory The category of the primary - * expression from which the primitive value is derived. - */ - var fLambda = function(nCategory) { - Object.keys( - aSourceElementsData[nPosition].aCount[nCategory] - ).forEach(cAddOccurrences(nPosition, nCategory)); - }; - - return fLambda; - }, - /** - * Adds the number of occurrences of each primitive value that - * could be consolidated in the source element with a given index - * to the count of occurrences of that primitive values within - * the range of source elements that is currently being - * considered. - * @param {number} nPosition The index (in the source text order) - * of a source element. - */ - fAddOccurrences = function(nPosition) { - Object.keys(aSourceElementsData[nPosition].aCount).forEach( - cAddOccurrencesInCategory(nPosition)); - }, - /** - * Creates a variable declaration for a primitive value if that - * primitive value is to be consolidated within the elements. - * @param {string} sPrefixed Prefixed representation String of a - * primitive value that could be consolidated within the - * elements. - * @see aVariableDeclarations - */ - cAugmentVariableDeclarations = function(sPrefixed) { - if (oSolutionBest.oPrimitiveValues[sPrefixed].nSaving > 0) { - aVariableDeclarations.push([ - oSolutionBest.oPrimitiveValues[sPrefixed].sName, - [0 === sPrefixed.indexOf(EValuePrefixes.S_SYMBOLIC) ? - 'name' : 'string', - sPrefixed.substring(EValuePrefixes.S_SYMBOLIC.length)] - ]); - } - }, - /** - * Sorts primitive values with regard to the difference in the - * number of terminal symbols between the original source text - * and the one with those primitive values consolidated. - * @param {string} sPrefixed0 The prefixed representation String - * of the first of the two primitive values that are being - * compared. - * @param {string} sPrefixed1 The prefixed representation String - * of the second of the two primitive values that are being - * compared. - * @return {number} - *
      - *
      -1
      - *
      if the first primitive value must be placed before - * the other one,
      - *
      0
      - *
      if the first primitive value may be placed before - * the other one,
      - *
      1
      - *
      if the first primitive value must not be placed - * before the other one.
      - *
      - * @see TSolution.oPrimitiveValues - */ - cSortPrimitiveValues = function(sPrefixed0, sPrefixed1) { - /** - * The difference between: - *
        - *
      1. the difference in the number of terminal symbols - * between the original source text and the one with the - * first primitive value consolidated, and
      2. - *
      3. the difference in the number of terminal symbols - * between the original source text and the one with the - * second primitive value consolidated.
      4. - *
      - * @type {number} - */ - var nDifference = - oSolutionCandidate.oPrimitiveValues[sPrefixed0].nSaving - - oSolutionCandidate.oPrimitiveValues[sPrefixed1].nSaving; - - return nDifference > 0 ? -1 : nDifference < 0 ? 1 : 0; - }, - /** - * Assigns an identifier name to a primitive value and calculates - * whether instances of that primitive value are worth - * consolidating. - * @param {string} sPrefixed The prefixed representation String - * of a primitive value that is being evaluated. - */ - fEvaluatePrimitiveValue = function(sPrefixed) { - var _, - /** - * The index of the last mangled name. - * @type {number} - */ - nIndex, - /** - * The representation String of the primitive value that is - * being evaluated. - * @type {string} - */ - sName = - sPrefixed.substring(EValuePrefixes.S_SYMBOLIC.length), - /** - * The number of source characters taken up by the - * representation String of the primitive value that is - * being evaluated. - * @type {number} - */ - nLengthOriginal = sName.length, - /** - * The number of source characters taken up by the - * identifier name that could substitute the primitive - * value that is being evaluated. - * substituted. - * @type {number} - */ - nLengthSubstitution, - /** - * The number of source characters taken up by by the - * representation String of the primitive value that is - * being evaluated when it is represented by a string - * literal. - * @type {number} - */ - nLengthString = oProcessor.make_string(sName).length; - - oSolutionCandidate.oPrimitiveValues[sPrefixed] = - new TPrimitiveValue(); - do { // Find an identifier unused in this or any nested scope. - nIndex = oScope.cname; - oSolutionCandidate.oPrimitiveValues[sPrefixed].sName = - oScope.next_mangled(); - } while (-1 !== oSourceElementsData.aIdentifiers.indexOf( - oSolutionCandidate.oPrimitiveValues[sPrefixed].sName)); - nLengthSubstitution = oSolutionCandidate.oPrimitiveValues[ - sPrefixed].sName.length; - if (0 === sPrefixed.indexOf(EValuePrefixes.S_SYMBOLIC)) { - // foo:null, or foo:null; - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving -= - nLengthSubstitution + nLengthOriginal + - oWeights.N_VARIABLE_DECLARATION; - // null vs foo - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving += - oSourceElementsData.aCount[ - EPrimaryExpressionCategories. - N_NULL_AND_BOOLEAN_LITERALS][sPrefixed] * - (nLengthOriginal - nLengthSubstitution); - } else { - // foo:'fromCharCode'; - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving -= - nLengthSubstitution + nLengthString + - oWeights.N_VARIABLE_DECLARATION; - // .fromCharCode vs [foo] - if (oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_IDENTIFIER_NAMES - ].hasOwnProperty(sPrefixed)) { - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving += - oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_IDENTIFIER_NAMES - ][sPrefixed] * - (nLengthOriginal - nLengthSubstitution - - oWeights.N_PROPERTY_ACCESSOR); - } - // 'fromCharCode' vs foo - if (oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_STRING_LITERALS - ].hasOwnProperty(sPrefixed)) { - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving += - oSourceElementsData.aCount[ - EPrimaryExpressionCategories.N_STRING_LITERALS - ][sPrefixed] * - (nLengthString - nLengthSubstitution); - } - } - if (oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving > - 0) { - oSolutionCandidate.nSavings += - oSolutionCandidate.oPrimitiveValues[sPrefixed].nSaving; - } else { - oScope.cname = nIndex; // Free the identifier name. - } - }, - /** - * Adds a variable declaration to an existing variable statement. - * @param {!Array} aVariableDeclaration A variable declaration - * with an initialiser. - */ - cAddVariableDeclaration = function(aVariableDeclaration) { - (/** @type {!Array} */ oSourceElements[nFrom][1]).unshift( - aVariableDeclaration); - }; - - if (nFrom > nTo) { - return; - } - // If the range is a closure, reuse the closure. - if (nFrom === nTo && - 'stat' === oSourceElements[nFrom][0] && - 'call' === oSourceElements[nFrom][1][0] && - 'function' === oSourceElements[nFrom][1][1][0]) { - fExamineSyntacticCodeUnit(oSourceElements[nFrom][1][1]); - return; - } - // Create a list of all derived primitive values within the range. - for (nPosition = nFrom; nPosition <= nTo; nPosition += 1) { - aSourceElementsData[nPosition].aPrimitiveValues.forEach( - cAugmentList(oSourceElementsData.aPrimitiveValues)); - } - if (0 === oSourceElementsData.aPrimitiveValues.length) { - return; - } - for (nPosition = nFrom; nPosition <= nTo; nPosition += 1) { - // Add the number of occurrences to the total count. - fAddOccurrences(nPosition); - // Add identifiers of this or any nested scope to the list. - aSourceElementsData[nPosition].aIdentifiers.forEach( - cAugmentList(oSourceElementsData.aIdentifiers)); - } - // Distribute identifier names among derived primitive values. - do { // If there was any progress, find a better distribution. - oSolutionBest = oSolutionCandidate; - if (Object.keys(oSolutionCandidate.oPrimitiveValues).length > 0) { - // Sort primitive values descending by their worthwhileness. - oSourceElementsData.aPrimitiveValues.sort(cSortPrimitiveValues); - } - oSolutionCandidate = new TSolution(); - oSourceElementsData.aPrimitiveValues.forEach( - fEvaluatePrimitiveValue); - oScope.cname = nIndex; - } while (oSolutionCandidate.nSavings > oSolutionBest.nSavings); - // Take the necessity of adding a variable statement into account. - if ('var' !== oSourceElements[nFrom][0]) { - oSolutionBest.nSavings -= oWeights.N_VARIABLE_STATEMENT_AFFIXATION; - } - if (bEnclose) { - // Take the necessity of forming a closure into account. - oSolutionBest.nSavings -= oWeights.N_CLOSURE; - } - if (oSolutionBest.nSavings > 0) { - // Create variable declarations suitable for UglifyJS. - Object.keys(oSolutionBest.oPrimitiveValues).forEach( - cAugmentVariableDeclarations); - // Rewrite expressions that contain worthwhile primitive values. - for (nPosition = nFrom; nPosition <= nTo; nPosition += 1) { - oWalker = oProcessor.ast_walker(); - oSourceElements[nPosition] = - oWalker.with_walkers( - oWalkersTransformers, - cContext(oWalker, oSourceElements[nPosition])); - } - if ('var' === oSourceElements[nFrom][0]) { // Reuse the statement. - (/** @type {!Array.} */ aVariableDeclarations.reverse( - )).forEach(cAddVariableDeclaration); - } else { // Add a variable statement. - Array.prototype.splice.call( - oSourceElements, - nFrom, - 0, - ['var', aVariableDeclarations]); - nTo += 1; - } - if (bEnclose) { - // Add a closure. - Array.prototype.splice.call( - oSourceElements, - nFrom, - 0, - ['stat', ['call', ['function', null, [], []], []]]); - // Copy source elements into the closure. - for (nPosition = nTo + 1; nPosition > nFrom; nPosition -= 1) { - Array.prototype.unshift.call( - oSourceElements[nFrom][1][1][3], - oSourceElements[nPosition]); - } - // Remove source elements outside the closure. - Array.prototype.splice.call( - oSourceElements, - nFrom + 1, - nTo - nFrom + 1); - } - } - if (bEnclose) { - // Restore the availability of identifier names. - oScope.cname = nIndex; - } - }; - - oSourceElements = (/** @type {!TSyntacticCodeUnit} */ - oSyntacticCodeUnit[bIsGlobal ? 1 : 3]); - if (0 === oSourceElements.length) { - return; - } - oScope = bIsGlobal ? oSyntacticCodeUnit.scope : oSourceElements.scope; - // Skip a Directive Prologue. - while (nAfterDirectivePrologue < oSourceElements.length && - 'directive' === oSourceElements[nAfterDirectivePrologue][0]) { - nAfterDirectivePrologue += 1; - aSourceElementsData.push(null); - } - if (oSourceElements.length === nAfterDirectivePrologue) { - return; - } - for (nPosition = nAfterDirectivePrologue; - nPosition < oSourceElements.length; - nPosition += 1) { - oSourceElementData = new TSourceElementsData(); - oWalker = oProcessor.ast_walker(); - // Classify a source element. - // Find its derived primitive values and count their occurrences. - // Find all identifiers used (including nested scopes). - oWalker.with_walkers( - oWalkers.oSurveySourceElement, - cContext(oWalker, oSourceElements[nPosition])); - // Establish whether the scope is still wholly examinable. - bIsWhollyExaminable = bIsWhollyExaminable && - ESourceElementCategories.N_WITH !== oSourceElementData.nCategory && - ESourceElementCategories.N_EVAL !== oSourceElementData.nCategory; - aSourceElementsData.push(oSourceElementData); - } - if (bIsWhollyExaminable) { // Examine the whole scope. - fExamineSourceElements( - nAfterDirectivePrologue, - oSourceElements.length - 1, - false); - } else { // Examine unexcluded ranges of source elements. - for (nPosition = oSourceElements.length - 1; - nPosition >= nAfterDirectivePrologue; - nPosition -= 1) { - oSourceElementData = (/** @type {!TSourceElementsData} */ - aSourceElementsData[nPosition]); - if (ESourceElementCategories.N_OTHER === - oSourceElementData.nCategory) { - if ('undefined' === typeof nTo) { - nTo = nPosition; // Indicate the end of a range. - } - // Examine the range if it immediately follows a Directive Prologue. - if (nPosition === nAfterDirectivePrologue) { - fExamineSourceElements(nPosition, nTo, true); - } - } else { - if ('undefined' !== typeof nTo) { - // Examine the range that immediately follows this source element. - fExamineSourceElements(nPosition + 1, nTo, true); - nTo = void 0; // Obliterate the range. - } - // Examine nested functions. - oWalker = oProcessor.ast_walker(); - oWalker.with_walkers( - oWalkers.oExamineFunctions, - cContext(oWalker, oSourceElements[nPosition])); - } - } - } - }(oAbstractSyntaxTree = oProcessor.ast_add_scope(oAbstractSyntaxTree))); - return oAbstractSyntaxTree; -}; -/*jshint sub:false */ - -/* Local Variables: */ -/* mode: js */ -/* coding: utf-8 */ -/* indent-tabs-mode: nil */ -/* tab-width: 2 */ -/* End: */ -/* vim: set ft=javascript fenc=utf-8 et ts=2 sts=2 sw=2: */ -/* :mode=javascript:noTabs=true:tabSize=2:indentSize=2:deepIndent=true: */ -}); -define('uglifyjs/parse-js', ["exports"], function(exports) { -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - - This version is suitable for Node.js. With minimal changes (the - exports stuff) it should work on any JS platform. - - This file contains the tokenizer/parser. It is a port to JavaScript - of parse-js [1], a JavaScript parser library written in Common Lisp - by Marijn Haverbeke. Thank you Marijn! - - [1] http://marijn.haverbeke.nl/parse-js/ - - Exported functions: - - - tokenizer(code) -- returns a function. Call the returned - function to fetch the next token. - - - parse(code) -- returns an AST of the given JavaScript code. - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2010 (c) Mihai Bazon - Based on parse-js (http://marijn.haverbeke.nl/parse-js/). - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -/* -----[ Tokenizer (constants) ]----- */ - -var KEYWORDS = array_to_hash([ - "break", - "case", - "catch", - "const", - "continue", - "debugger", - "default", - "delete", - "do", - "else", - "finally", - "for", - "function", - "if", - "in", - "instanceof", - "new", - "return", - "switch", - "throw", - "try", - "typeof", - "var", - "void", - "while", - "with" -]); - -var RESERVED_WORDS = array_to_hash([ - "abstract", - "boolean", - "byte", - "char", - "class", - "double", - "enum", - "export", - "extends", - "final", - "float", - "goto", - "implements", - "import", - "int", - "interface", - "long", - "native", - "package", - "private", - "protected", - "public", - "short", - "static", - "super", - "synchronized", - "throws", - "transient", - "volatile" -]); - -var KEYWORDS_BEFORE_EXPRESSION = array_to_hash([ - "return", - "new", - "delete", - "throw", - "else", - "case" -]); - -var KEYWORDS_ATOM = array_to_hash([ - "false", - "null", - "true", - "undefined" -]); - -var OPERATOR_CHARS = array_to_hash(characters("+-*&%=<>!?|~^")); - -var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i; -var RE_OCT_NUMBER = /^0[0-7]+$/; -var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i; - -var OPERATORS = array_to_hash([ - "in", - "instanceof", - "typeof", - "new", - "void", - "delete", - "++", - "--", - "+", - "-", - "!", - "~", - "&", - "|", - "^", - "*", - "/", - "%", - ">>", - "<<", - ">>>", - "<", - ">", - "<=", - ">=", - "==", - "===", - "!=", - "!==", - "?", - "=", - "+=", - "-=", - "/=", - "*=", - "%=", - ">>=", - "<<=", - ">>>=", - "|=", - "^=", - "&=", - "&&", - "||" -]); - -var WHITESPACE_CHARS = array_to_hash(characters(" \u00a0\n\r\t\f\u000b\u200b\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\uFEFF")); - -var PUNC_BEFORE_EXPRESSION = array_to_hash(characters("[{(,.;:")); - -var PUNC_CHARS = array_to_hash(characters("[]{}(),;:")); - -var REGEXP_MODIFIERS = array_to_hash(characters("gmsiy")); - -/* -----[ Tokenizer ]----- */ - -var UNICODE = { // Unicode 6.1 - letter: new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F0\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), - combining_mark: new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u08E4-\\u08FE\\u0900-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C01-\\u0C03\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C82\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0D02\\u0D03\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D82\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF2-\\u1CF4\\u1DC0-\\u1DE6\\u1DFC-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA674-\\uA67D\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA880\\uA881\\uA8B4-\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"), - connector_punctuation: new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]"), - digit: new RegExp("[\\u0030-\\u0039\\u0660-\\u0669\\u06F0-\\u06F9\\u07C0-\\u07C9\\u0966-\\u096F\\u09E6-\\u09EF\\u0A66-\\u0A6F\\u0AE6-\\u0AEF\\u0B66-\\u0B6F\\u0BE6-\\u0BEF\\u0C66-\\u0C6F\\u0CE6-\\u0CEF\\u0D66-\\u0D6F\\u0E50-\\u0E59\\u0ED0-\\u0ED9\\u0F20-\\u0F29\\u1040-\\u1049\\u1090-\\u1099\\u17E0-\\u17E9\\u1810-\\u1819\\u1946-\\u194F\\u19D0-\\u19D9\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1B50-\\u1B59\\u1BB0-\\u1BB9\\u1C40-\\u1C49\\u1C50-\\u1C59\\uA620-\\uA629\\uA8D0-\\uA8D9\\uA900-\\uA909\\uA9D0-\\uA9D9\\uAA50-\\uAA59\\uABF0-\\uABF9\\uFF10-\\uFF19]") -}; - -function is_letter(ch) { - return UNICODE.letter.test(ch); -}; - -function is_digit(ch) { - ch = ch.charCodeAt(0); - return ch >= 48 && ch <= 57; -}; - -function is_unicode_digit(ch) { - return UNICODE.digit.test(ch); -} - -function is_alphanumeric_char(ch) { - return is_digit(ch) || is_letter(ch); -}; - -function is_unicode_combining_mark(ch) { - return UNICODE.combining_mark.test(ch); -}; - -function is_unicode_connector_punctuation(ch) { - return UNICODE.connector_punctuation.test(ch); -}; - -function is_identifier_start(ch) { - return ch == "$" || ch == "_" || is_letter(ch); -}; - -function is_identifier_char(ch) { - return is_identifier_start(ch) - || is_unicode_combining_mark(ch) - || is_unicode_digit(ch) - || is_unicode_connector_punctuation(ch) - || ch == "\u200c" // zero-width non-joiner - || ch == "\u200d" // zero-width joiner (in my ECMA-262 PDF, this is also 200c) - ; -}; - -function parse_js_number(num) { - if (RE_HEX_NUMBER.test(num)) { - return parseInt(num.substr(2), 16); - } else if (RE_OCT_NUMBER.test(num)) { - return parseInt(num.substr(1), 8); - } else if (RE_DEC_NUMBER.test(num)) { - return parseFloat(num); - } -}; - -function JS_Parse_Error(message, line, col, pos) { - this.message = message; - this.line = line + 1; - this.col = col + 1; - this.pos = pos + 1; - this.stack = new Error().stack; -}; - -JS_Parse_Error.prototype.toString = function() { - return this.message + " (line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack; -}; - -function js_error(message, line, col, pos) { - throw new JS_Parse_Error(message, line, col, pos); -}; - -function is_token(token, type, val) { - return token.type == type && (val == null || token.value == val); -}; - -var EX_EOF = {}; - -function tokenizer($TEXT) { - - var S = { - text : $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/^\uFEFF/, ''), - pos : 0, - tokpos : 0, - line : 0, - tokline : 0, - col : 0, - tokcol : 0, - newline_before : false, - regex_allowed : false, - comments_before : [] - }; - - function peek() { return S.text.charAt(S.pos); }; - - function next(signal_eof, in_string) { - var ch = S.text.charAt(S.pos++); - if (signal_eof && !ch) - throw EX_EOF; - if (ch == "\n") { - S.newline_before = S.newline_before || !in_string; - ++S.line; - S.col = 0; - } else { - ++S.col; - } - return ch; - }; - - function eof() { - return !S.peek(); - }; - - function find(what, signal_eof) { - var pos = S.text.indexOf(what, S.pos); - if (signal_eof && pos == -1) throw EX_EOF; - return pos; - }; - - function start_token() { - S.tokline = S.line; - S.tokcol = S.col; - S.tokpos = S.pos; - }; - - function token(type, value, is_comment) { - S.regex_allowed = ((type == "operator" && !HOP(UNARY_POSTFIX, value)) || - (type == "keyword" && HOP(KEYWORDS_BEFORE_EXPRESSION, value)) || - (type == "punc" && HOP(PUNC_BEFORE_EXPRESSION, value))); - var ret = { - type : type, - value : value, - line : S.tokline, - col : S.tokcol, - pos : S.tokpos, - endpos : S.pos, - nlb : S.newline_before - }; - if (!is_comment) { - ret.comments_before = S.comments_before; - S.comments_before = []; - // make note of any newlines in the comments that came before - for (var i = 0, len = ret.comments_before.length; i < len; i++) { - ret.nlb = ret.nlb || ret.comments_before[i].nlb; - } - } - S.newline_before = false; - return ret; - }; - - function skip_whitespace() { - while (HOP(WHITESPACE_CHARS, peek())) - next(); - }; - - function read_while(pred) { - var ret = "", ch = peek(), i = 0; - while (ch && pred(ch, i++)) { - ret += next(); - ch = peek(); - } - return ret; - }; - - function parse_error(err) { - js_error(err, S.tokline, S.tokcol, S.tokpos); - }; - - function read_num(prefix) { - var has_e = false, after_e = false, has_x = false, has_dot = prefix == "."; - var num = read_while(function(ch, i){ - if (ch == "x" || ch == "X") { - if (has_x) return false; - return has_x = true; - } - if (!has_x && (ch == "E" || ch == "e")) { - if (has_e) return false; - return has_e = after_e = true; - } - if (ch == "-") { - if (after_e || (i == 0 && !prefix)) return true; - return false; - } - if (ch == "+") return after_e; - after_e = false; - if (ch == ".") { - if (!has_dot && !has_x && !has_e) - return has_dot = true; - return false; - } - return is_alphanumeric_char(ch); - }); - if (prefix) - num = prefix + num; - var valid = parse_js_number(num); - if (!isNaN(valid)) { - return token("num", valid); - } else { - parse_error("Invalid syntax: " + num); - } - }; - - function read_escaped_char(in_string) { - var ch = next(true, in_string); - switch (ch) { - case "n" : return "\n"; - case "r" : return "\r"; - case "t" : return "\t"; - case "b" : return "\b"; - case "v" : return "\u000b"; - case "f" : return "\f"; - case "0" : return "\0"; - case "x" : return String.fromCharCode(hex_bytes(2)); - case "u" : return String.fromCharCode(hex_bytes(4)); - case "\n": return ""; - default : return ch; - } - }; - - function hex_bytes(n) { - var num = 0; - for (; n > 0; --n) { - var digit = parseInt(next(true), 16); - if (isNaN(digit)) - parse_error("Invalid hex-character pattern in string"); - num = (num << 4) | digit; - } - return num; - }; - - function read_string() { - return with_eof_error("Unterminated string constant", function(){ - var quote = next(), ret = ""; - for (;;) { - var ch = next(true); - if (ch == "\\") { - // read OctalEscapeSequence (XXX: deprecated if "strict mode") - // https://github.com/mishoo/UglifyJS/issues/178 - var octal_len = 0, first = null; - ch = read_while(function(ch){ - if (ch >= "0" && ch <= "7") { - if (!first) { - first = ch; - return ++octal_len; - } - else if (first <= "3" && octal_len <= 2) return ++octal_len; - else if (first >= "4" && octal_len <= 1) return ++octal_len; - } - return false; - }); - if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8)); - else ch = read_escaped_char(true); - } - else if (ch == quote) break; - else if (ch == "\n") throw EX_EOF; - ret += ch; - } - return token("string", ret); - }); - }; - - function read_line_comment() { - next(); - var i = find("\n"), ret; - if (i == -1) { - ret = S.text.substr(S.pos); - S.pos = S.text.length; - } else { - ret = S.text.substring(S.pos, i); - S.pos = i; - } - return token("comment1", ret, true); - }; - - function read_multiline_comment() { - next(); - return with_eof_error("Unterminated multiline comment", function(){ - var i = find("*/", true), - text = S.text.substring(S.pos, i); - S.pos = i + 2; - S.line += text.split("\n").length - 1; - S.newline_before = S.newline_before || text.indexOf("\n") >= 0; - - // https://github.com/mishoo/UglifyJS/issues/#issue/100 - if (/^@cc_on/i.test(text)) { - warn("WARNING: at line " + S.line); - warn("*** Found \"conditional comment\": " + text); - warn("*** UglifyJS DISCARDS ALL COMMENTS. This means your code might no longer work properly in Internet Explorer."); - } - - return token("comment2", text, true); - }); - }; - - function read_name() { - var backslash = false, name = "", ch, escaped = false, hex; - while ((ch = peek()) != null) { - if (!backslash) { - if (ch == "\\") escaped = backslash = true, next(); - else if (is_identifier_char(ch)) name += next(); - else break; - } - else { - if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); - ch = read_escaped_char(); - if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); - name += ch; - backslash = false; - } - } - if (HOP(KEYWORDS, name) && escaped) { - hex = name.charCodeAt(0).toString(16).toUpperCase(); - name = "\\u" + "0000".substr(hex.length) + hex + name.slice(1); - } - return name; - }; - - function read_regexp(regexp) { - return with_eof_error("Unterminated regular expression", function(){ - var prev_backslash = false, ch, in_class = false; - while ((ch = next(true))) if (prev_backslash) { - regexp += "\\" + ch; - prev_backslash = false; - } else if (ch == "[") { - in_class = true; - regexp += ch; - } else if (ch == "]" && in_class) { - in_class = false; - regexp += ch; - } else if (ch == "/" && !in_class) { - break; - } else if (ch == "\\") { - prev_backslash = true; - } else { - regexp += ch; - } - var mods = read_name(); - return token("regexp", [ regexp, mods ]); - }); - }; - - function read_operator(prefix) { - function grow(op) { - if (!peek()) return op; - var bigger = op + peek(); - if (HOP(OPERATORS, bigger)) { - next(); - return grow(bigger); - } else { - return op; - } - }; - return token("operator", grow(prefix || next())); - }; - - function handle_slash() { - next(); - var regex_allowed = S.regex_allowed; - switch (peek()) { - case "/": - S.comments_before.push(read_line_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - case "*": - S.comments_before.push(read_multiline_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - } - return S.regex_allowed ? read_regexp("") : read_operator("/"); - }; - - function handle_dot() { - next(); - return is_digit(peek()) - ? read_num(".") - : token("punc", "."); - }; - - function read_word() { - var word = read_name(); - return !HOP(KEYWORDS, word) - ? token("name", word) - : HOP(OPERATORS, word) - ? token("operator", word) - : HOP(KEYWORDS_ATOM, word) - ? token("atom", word) - : token("keyword", word); - }; - - function with_eof_error(eof_error, cont) { - try { - return cont(); - } catch(ex) { - if (ex === EX_EOF) parse_error(eof_error); - else throw ex; - } - }; - - function next_token(force_regexp) { - if (force_regexp != null) - return read_regexp(force_regexp); - skip_whitespace(); - start_token(); - var ch = peek(); - if (!ch) return token("eof"); - if (is_digit(ch)) return read_num(); - if (ch == '"' || ch == "'") return read_string(); - if (HOP(PUNC_CHARS, ch)) return token("punc", next()); - if (ch == ".") return handle_dot(); - if (ch == "/") return handle_slash(); - if (HOP(OPERATOR_CHARS, ch)) return read_operator(); - if (ch == "\\" || is_identifier_start(ch)) return read_word(); - parse_error("Unexpected character '" + ch + "'"); - }; - - next_token.context = function(nc) { - if (nc) S = nc; - return S; - }; - - return next_token; - -}; - -/* -----[ Parser (constants) ]----- */ - -var UNARY_PREFIX = array_to_hash([ - "typeof", - "void", - "delete", - "--", - "++", - "!", - "~", - "-", - "+" -]); - -var UNARY_POSTFIX = array_to_hash([ "--", "++" ]); - -var ASSIGNMENT = (function(a, ret, i){ - while (i < a.length) { - ret[a[i]] = a[i].substr(0, a[i].length - 1); - i++; - } - return ret; -})( - ["+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&="], - { "=": true }, - 0 -); - -var PRECEDENCE = (function(a, ret){ - for (var i = 0, n = 1; i < a.length; ++i, ++n) { - var b = a[i]; - for (var j = 0; j < b.length; ++j) { - ret[b[j]] = n; - } - } - return ret; -})( - [ - ["||"], - ["&&"], - ["|"], - ["^"], - ["&"], - ["==", "===", "!=", "!=="], - ["<", ">", "<=", ">=", "in", "instanceof"], - [">>", "<<", ">>>"], - ["+", "-"], - ["*", "/", "%"] - ], - {} -); - -var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); - -var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); - -/* -----[ Parser ]----- */ - -function NodeWithToken(str, start, end) { - this.name = str; - this.start = start; - this.end = end; -}; - -NodeWithToken.prototype.toString = function() { return this.name; }; - -function parse($TEXT, exigent_mode, embed_tokens) { - - var S = { - input : typeof $TEXT == "string" ? tokenizer($TEXT, true) : $TEXT, - token : null, - prev : null, - peeked : null, - in_function : 0, - in_directives : true, - in_loop : 0, - labels : [] - }; - - S.token = next(); - - function is(type, value) { - return is_token(S.token, type, value); - }; - - function peek() { return S.peeked || (S.peeked = S.input()); }; - - function next() { - S.prev = S.token; - if (S.peeked) { - S.token = S.peeked; - S.peeked = null; - } else { - S.token = S.input(); - } - S.in_directives = S.in_directives && ( - S.token.type == "string" || is("punc", ";") - ); - return S.token; - }; - - function prev() { - return S.prev; - }; - - function croak(msg, line, col, pos) { - var ctx = S.input.context(); - js_error(msg, - line != null ? line : ctx.tokline, - col != null ? col : ctx.tokcol, - pos != null ? pos : ctx.tokpos); - }; - - function token_error(token, msg) { - croak(msg, token.line, token.col); - }; - - function unexpected(token) { - if (token == null) - token = S.token; - token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); - }; - - function expect_token(type, val) { - if (is(type, val)) { - return next(); - } - token_error(S.token, "Unexpected token " + S.token.type + ", expected " + type); - }; - - function expect(punc) { return expect_token("punc", punc); }; - - function can_insert_semicolon() { - return !exigent_mode && ( - S.token.nlb || is("eof") || is("punc", "}") - ); - }; - - function semicolon() { - if (is("punc", ";")) next(); - else if (!can_insert_semicolon()) unexpected(); - }; - - function as() { - return slice(arguments); - }; - - function parenthesised() { - expect("("); - var ex = expression(); - expect(")"); - return ex; - }; - - function add_tokens(str, start, end) { - return str instanceof NodeWithToken ? str : new NodeWithToken(str, start, end); - }; - - function maybe_embed_tokens(parser) { - if (embed_tokens) return function() { - var start = S.token; - var ast = parser.apply(this, arguments); - ast[0] = add_tokens(ast[0], start, prev()); - return ast; - }; - else return parser; - }; - - var statement = maybe_embed_tokens(function() { - if (is("operator", "/") || is("operator", "/=")) { - S.peeked = null; - S.token = S.input(S.token.value.substr(1)); // force regexp - } - switch (S.token.type) { - case "string": - var dir = S.in_directives, stat = simple_statement(); - if (dir && stat[1][0] == "string" && !is("punc", ",")) - return as("directive", stat[1][1]); - return stat; - case "num": - case "regexp": - case "operator": - case "atom": - return simple_statement(); - - case "name": - return is_token(peek(), "punc", ":") - ? labeled_statement(prog1(S.token.value, next, next)) - : simple_statement(); - - case "punc": - switch (S.token.value) { - case "{": - return as("block", block_()); - case "[": - case "(": - return simple_statement(); - case ";": - next(); - return as("block"); - default: - unexpected(); - } - - case "keyword": - switch (prog1(S.token.value, next)) { - case "break": - return break_cont("break"); - - case "continue": - return break_cont("continue"); - - case "debugger": - semicolon(); - return as("debugger"); - - case "do": - return (function(body){ - expect_token("keyword", "while"); - return as("do", prog1(parenthesised, semicolon), body); - })(in_loop(statement)); - - case "for": - return for_(); - - case "function": - return function_(true); - - case "if": - return if_(); - - case "return": - if (S.in_function == 0) - croak("'return' outside of function"); - return as("return", - is("punc", ";") - ? (next(), null) - : can_insert_semicolon() - ? null - : prog1(expression, semicolon)); - - case "switch": - return as("switch", parenthesised(), switch_block_()); - - case "throw": - if (S.token.nlb) - croak("Illegal newline after 'throw'"); - return as("throw", prog1(expression, semicolon)); - - case "try": - return try_(); - - case "var": - return prog1(var_, semicolon); - - case "const": - return prog1(const_, semicolon); - - case "while": - return as("while", parenthesised(), in_loop(statement)); - - case "with": - return as("with", parenthesised(), statement()); - - default: - unexpected(); - } - } - }); - - function labeled_statement(label) { - S.labels.push(label); - var start = S.token, stat = statement(); - if (exigent_mode && !HOP(STATEMENTS_WITH_LABELS, stat[0])) - unexpected(start); - S.labels.pop(); - return as("label", label, stat); - }; - - function simple_statement() { - return as("stat", prog1(expression, semicolon)); - }; - - function break_cont(type) { - var name; - if (!can_insert_semicolon()) { - name = is("name") ? S.token.value : null; - } - if (name != null) { - next(); - if (!member(name, S.labels)) - croak("Label " + name + " without matching loop or statement"); - } - else if (S.in_loop == 0) - croak(type + " not inside a loop or switch"); - semicolon(); - return as(type, name); - }; - - function for_() { - expect("("); - var init = null; - if (!is("punc", ";")) { - init = is("keyword", "var") - ? (next(), var_(true)) - : expression(true, true); - if (is("operator", "in")) { - if (init[0] == "var" && init[1].length > 1) - croak("Only one variable declaration allowed in for..in loop"); - return for_in(init); - } - } - return regular_for(init); - }; - - function regular_for(init) { - expect(";"); - var test = is("punc", ";") ? null : expression(); - expect(";"); - var step = is("punc", ")") ? null : expression(); - expect(")"); - return as("for", init, test, step, in_loop(statement)); - }; - - function for_in(init) { - var lhs = init[0] == "var" ? as("name", init[1][0]) : init; - next(); - var obj = expression(); - expect(")"); - return as("for-in", init, lhs, obj, in_loop(statement)); - }; - - var function_ = function(in_statement) { - var name = is("name") ? prog1(S.token.value, next) : null; - if (in_statement && !name) - unexpected(); - expect("("); - return as(in_statement ? "defun" : "function", - name, - // arguments - (function(first, a){ - while (!is("punc", ")")) { - if (first) first = false; else expect(","); - if (!is("name")) unexpected(); - a.push(S.token.value); - next(); - } - next(); - return a; - })(true, []), - // body - (function(){ - ++S.in_function; - var loop = S.in_loop; - S.in_directives = true; - S.in_loop = 0; - var a = block_(); - --S.in_function; - S.in_loop = loop; - return a; - })()); - }; - - function if_() { - var cond = parenthesised(), body = statement(), belse; - if (is("keyword", "else")) { - next(); - belse = statement(); - } - return as("if", cond, body, belse); - }; - - function block_() { - expect("{"); - var a = []; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - a.push(statement()); - } - next(); - return a; - }; - - var switch_block_ = curry(in_loop, function(){ - expect("{"); - var a = [], cur = null; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - if (is("keyword", "case")) { - next(); - cur = []; - a.push([ expression(), cur ]); - expect(":"); - } - else if (is("keyword", "default")) { - next(); - expect(":"); - cur = []; - a.push([ null, cur ]); - } - else { - if (!cur) unexpected(); - cur.push(statement()); - } - } - next(); - return a; - }); - - function try_() { - var body = block_(), bcatch, bfinally; - if (is("keyword", "catch")) { - next(); - expect("("); - if (!is("name")) - croak("Name expected"); - var name = S.token.value; - next(); - expect(")"); - bcatch = [ name, block_() ]; - } - if (is("keyword", "finally")) { - next(); - bfinally = block_(); - } - if (!bcatch && !bfinally) - croak("Missing catch/finally blocks"); - return as("try", body, bcatch, bfinally); - }; - - function vardefs(no_in) { - var a = []; - for (;;) { - if (!is("name")) - unexpected(); - var name = S.token.value; - next(); - if (is("operator", "=")) { - next(); - a.push([ name, expression(false, no_in) ]); - } else { - a.push([ name ]); - } - if (!is("punc", ",")) - break; - next(); - } - return a; - }; - - function var_(no_in) { - return as("var", vardefs(no_in)); - }; - - function const_() { - return as("const", vardefs()); - }; - - function new_() { - var newexp = expr_atom(false), args; - if (is("punc", "(")) { - next(); - args = expr_list(")"); - } else { - args = []; - } - return subscripts(as("new", newexp, args), true); - }; - - var expr_atom = maybe_embed_tokens(function(allow_calls) { - if (is("operator", "new")) { - next(); - return new_(); - } - if (is("punc")) { - switch (S.token.value) { - case "(": - next(); - return subscripts(prog1(expression, curry(expect, ")")), allow_calls); - case "[": - next(); - return subscripts(array_(), allow_calls); - case "{": - next(); - return subscripts(object_(), allow_calls); - } - unexpected(); - } - if (is("keyword", "function")) { - next(); - return subscripts(function_(false), allow_calls); - } - if (HOP(ATOMIC_START_TOKEN, S.token.type)) { - var atom = S.token.type == "regexp" - ? as("regexp", S.token.value[0], S.token.value[1]) - : as(S.token.type, S.token.value); - return subscripts(prog1(atom, next), allow_calls); - } - unexpected(); - }); - - function expr_list(closing, allow_trailing_comma, allow_empty) { - var first = true, a = []; - while (!is("punc", closing)) { - if (first) first = false; else expect(","); - if (allow_trailing_comma && is("punc", closing)) break; - if (is("punc", ",") && allow_empty) { - a.push([ "atom", "undefined" ]); - } else { - a.push(expression(false)); - } - } - next(); - return a; - }; - - function array_() { - return as("array", expr_list("]", !exigent_mode, true)); - }; - - function object_() { - var first = true, a = []; - while (!is("punc", "}")) { - if (first) first = false; else expect(","); - if (!exigent_mode && is("punc", "}")) - // allow trailing comma - break; - var type = S.token.type; - var name = as_property_name(); - if (type == "name" && (name == "get" || name == "set") && !is("punc", ":")) { - a.push([ as_name(), function_(false), name ]); - } else { - expect(":"); - a.push([ name, expression(false) ]); - } - } - next(); - return as("object", a); - }; - - function as_property_name() { - switch (S.token.type) { - case "num": - case "string": - return prog1(S.token.value, next); - } - return as_name(); - }; - - function as_name() { - switch (S.token.type) { - case "name": - case "operator": - case "keyword": - case "atom": - return prog1(S.token.value, next); - default: - unexpected(); - } - }; - - function subscripts(expr, allow_calls) { - if (is("punc", ".")) { - next(); - return subscripts(as("dot", expr, as_name()), allow_calls); - } - if (is("punc", "[")) { - next(); - return subscripts(as("sub", expr, prog1(expression, curry(expect, "]"))), allow_calls); - } - if (allow_calls && is("punc", "(")) { - next(); - return subscripts(as("call", expr, expr_list(")")), true); - } - return expr; - }; - - function maybe_unary(allow_calls) { - if (is("operator") && HOP(UNARY_PREFIX, S.token.value)) { - return make_unary("unary-prefix", - prog1(S.token.value, next), - maybe_unary(allow_calls)); - } - var val = expr_atom(allow_calls); - while (is("operator") && HOP(UNARY_POSTFIX, S.token.value) && !S.token.nlb) { - val = make_unary("unary-postfix", S.token.value, val); - next(); - } - return val; - }; - - function make_unary(tag, op, expr) { - if ((op == "++" || op == "--") && !is_assignable(expr)) - croak("Invalid use of " + op + " operator"); - return as(tag, op, expr); - }; - - function expr_op(left, min_prec, no_in) { - var op = is("operator") ? S.token.value : null; - if (op && op == "in" && no_in) op = null; - var prec = op != null ? PRECEDENCE[op] : null; - if (prec != null && prec > min_prec) { - next(); - var right = expr_op(maybe_unary(true), prec, no_in); - return expr_op(as("binary", op, left, right), min_prec, no_in); - } - return left; - }; - - function expr_ops(no_in) { - return expr_op(maybe_unary(true), 0, no_in); - }; - - function maybe_conditional(no_in) { - var expr = expr_ops(no_in); - if (is("operator", "?")) { - next(); - var yes = expression(false); - expect(":"); - return as("conditional", expr, yes, expression(false, no_in)); - } - return expr; - }; - - function is_assignable(expr) { - if (!exigent_mode) return true; - switch (expr[0]+"") { - case "dot": - case "sub": - case "new": - case "call": - return true; - case "name": - return expr[1] != "this"; - } - }; - - function maybe_assign(no_in) { - var left = maybe_conditional(no_in), val = S.token.value; - if (is("operator") && HOP(ASSIGNMENT, val)) { - if (is_assignable(left)) { - next(); - return as("assign", ASSIGNMENT[val], left, maybe_assign(no_in)); - } - croak("Invalid assignment"); - } - return left; - }; - - var expression = maybe_embed_tokens(function(commas, no_in) { - if (arguments.length == 0) - commas = true; - var expr = maybe_assign(no_in); - if (commas && is("punc", ",")) { - next(); - return as("seq", expr, expression(true, no_in)); - } - return expr; - }); - - function in_loop(cont) { - try { - ++S.in_loop; - return cont(); - } finally { - --S.in_loop; - } - }; - - return as("toplevel", (function(a){ - while (!is("eof")) - a.push(statement()); - return a; - })([])); - -}; - -/* -----[ Utilities ]----- */ - -function curry(f) { - var args = slice(arguments, 1); - return function() { return f.apply(this, args.concat(slice(arguments))); }; -}; - -function prog1(ret) { - if (ret instanceof Function) - ret = ret(); - for (var i = 1, n = arguments.length; --n > 0; ++i) - arguments[i](); - return ret; -}; - -function array_to_hash(a) { - var ret = {}; - for (var i = 0; i < a.length; ++i) - ret[a[i]] = true; - return ret; -}; - -function slice(a, start) { - return Array.prototype.slice.call(a, start || 0); -}; - -function characters(str) { - return str.split(""); -}; - -function member(name, array) { - for (var i = array.length; --i >= 0;) - if (array[i] == name) - return true; - return false; -}; - -function HOP(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -}; - -var warn = function() {}; - -/* -----[ Exports ]----- */ - -exports.tokenizer = tokenizer; -exports.parse = parse; -exports.slice = slice; -exports.curry = curry; -exports.member = member; -exports.array_to_hash = array_to_hash; -exports.PRECEDENCE = PRECEDENCE; -exports.KEYWORDS_ATOM = KEYWORDS_ATOM; -exports.RESERVED_WORDS = RESERVED_WORDS; -exports.KEYWORDS = KEYWORDS; -exports.ATOMIC_START_TOKEN = ATOMIC_START_TOKEN; -exports.OPERATORS = OPERATORS; -exports.is_alphanumeric_char = is_alphanumeric_char; -exports.is_identifier_start = is_identifier_start; -exports.is_identifier_char = is_identifier_char; -exports.set_logger = function(logger) { - warn = logger; -}; - -// Local variables: -// js-indent-level: 4 -// End: -});define('uglifyjs/squeeze-more', ["require", "exports", "module", "./parse-js", "./squeeze-more"], function(require, exports, module) { -var jsp = require("./parse-js"), - pro = require("./process"), - slice = jsp.slice, - member = jsp.member, - curry = jsp.curry, - MAP = pro.MAP, - PRECEDENCE = jsp.PRECEDENCE, - OPERATORS = jsp.OPERATORS; - -function ast_squeeze_more(ast) { - var w = pro.ast_walker(), walk = w.walk, scope; - function with_scope(s, cont) { - var save = scope, ret; - scope = s; - ret = cont(); - scope = save; - return ret; - }; - function _lambda(name, args, body) { - return [ this[0], name, args, with_scope(body.scope, curry(MAP, body, walk)) ]; - }; - return w.with_walkers({ - "toplevel": function(body) { - return [ this[0], with_scope(this.scope, curry(MAP, body, walk)) ]; - }, - "function": _lambda, - "defun": _lambda, - "new": function(ctor, args) { - if (ctor[0] == "name") { - if (ctor[1] == "Array" && !scope.has("Array")) { - if (args.length != 1) { - return [ "array", args ]; - } else { - return walk([ "call", [ "name", "Array" ], args ]); - } - } else if (ctor[1] == "Object" && !scope.has("Object")) { - if (!args.length) { - return [ "object", [] ]; - } else { - return walk([ "call", [ "name", "Object" ], args ]); - } - } else if ((ctor[1] == "RegExp" || ctor[1] == "Function" || ctor[1] == "Error") && !scope.has(ctor[1])) { - return walk([ "call", [ "name", ctor[1] ], args]); - } - } - }, - "call": function(expr, args) { - if (expr[0] == "dot" && expr[1][0] == "string" && args.length == 1 - && (args[0][1] > 0 && expr[2] == "substring" || expr[2] == "substr")) { - return [ "call", [ "dot", expr[1], "slice"], args]; - } - if (expr[0] == "dot" && expr[2] == "toString" && args.length == 0) { - // foo.toString() ==> foo+"" - if (expr[1][0] == "string") return expr[1]; - return [ "binary", "+", expr[1], [ "string", "" ]]; - } - if (expr[0] == "name") { - if (expr[1] == "Array" && args.length != 1 && !scope.has("Array")) { - return [ "array", args ]; - } - if (expr[1] == "Object" && !args.length && !scope.has("Object")) { - return [ "object", [] ]; - } - if (expr[1] == "String" && !scope.has("String")) { - return [ "binary", "+", args[0], [ "string", "" ]]; - } - } - } - }, function() { - return walk(pro.ast_add_scope(ast)); - }); -}; - -exports.ast_squeeze_more = ast_squeeze_more; - -// Local variables: -// js-indent-level: 4 -// End: -}); -define('uglifyjs/process', ["require", "exports", "module", "./parse-js", "./squeeze-more"], function(require, exports, module) { -/*********************************************************************** - - A JavaScript tokenizer / parser / beautifier / compressor. - - This version is suitable for Node.js. With minimal changes (the - exports stuff) it should work on any JS platform. - - This file implements some AST processors. They work on data built - by parse-js. - - Exported functions: - - - ast_mangle(ast, options) -- mangles the variable/function names - in the AST. Returns an AST. - - - ast_squeeze(ast) -- employs various optimizations to make the - final generated code even smaller. Returns an AST. - - - gen_code(ast, options) -- generates JS code from the AST. Pass - true (or an object, see the code for some options) as second - argument to get "pretty" (indented) code. - - -------------------------------- (C) --------------------------------- - - Author: Mihai Bazon - - http://mihai.bazon.net/blog - - Distributed under the BSD license: - - Copyright 2010 (c) Mihai Bazon - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - * Redistributions of source code must retain the above - copyright notice, this list of conditions and the following - disclaimer. - - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials - provided with the distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY - EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR - TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF - THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - ***********************************************************************/ - -var jsp = require("./parse-js"), - curry = jsp.curry, - slice = jsp.slice, - member = jsp.member, - is_identifier_char = jsp.is_identifier_char, - PRECEDENCE = jsp.PRECEDENCE, - OPERATORS = jsp.OPERATORS; - -/* -----[ helper for AST traversal ]----- */ - -function ast_walker() { - function _vardefs(defs) { - return [ this[0], MAP(defs, function(def){ - var a = [ def[0] ]; - if (def.length > 1) - a[1] = walk(def[1]); - return a; - }) ]; - }; - function _block(statements) { - var out = [ this[0] ]; - if (statements != null) - out.push(MAP(statements, walk)); - return out; - }; - var walkers = { - "string": function(str) { - return [ this[0], str ]; - }, - "num": function(num) { - return [ this[0], num ]; - }, - "name": function(name) { - return [ this[0], name ]; - }, - "toplevel": function(statements) { - return [ this[0], MAP(statements, walk) ]; - }, - "block": _block, - "splice": _block, - "var": _vardefs, - "const": _vardefs, - "try": function(t, c, f) { - return [ - this[0], - MAP(t, walk), - c != null ? [ c[0], MAP(c[1], walk) ] : null, - f != null ? MAP(f, walk) : null - ]; - }, - "throw": function(expr) { - return [ this[0], walk(expr) ]; - }, - "new": function(ctor, args) { - return [ this[0], walk(ctor), MAP(args, walk) ]; - }, - "switch": function(expr, body) { - return [ this[0], walk(expr), MAP(body, function(branch){ - return [ branch[0] ? walk(branch[0]) : null, - MAP(branch[1], walk) ]; - }) ]; - }, - "break": function(label) { - return [ this[0], label ]; - }, - "continue": function(label) { - return [ this[0], label ]; - }, - "conditional": function(cond, t, e) { - return [ this[0], walk(cond), walk(t), walk(e) ]; - }, - "assign": function(op, lvalue, rvalue) { - return [ this[0], op, walk(lvalue), walk(rvalue) ]; - }, - "dot": function(expr) { - return [ this[0], walk(expr) ].concat(slice(arguments, 1)); - }, - "call": function(expr, args) { - return [ this[0], walk(expr), MAP(args, walk) ]; - }, - "function": function(name, args, body) { - return [ this[0], name, args.slice(), MAP(body, walk) ]; - }, - "debugger": function() { - return [ this[0] ]; - }, - "defun": function(name, args, body) { - return [ this[0], name, args.slice(), MAP(body, walk) ]; - }, - "if": function(conditional, t, e) { - return [ this[0], walk(conditional), walk(t), walk(e) ]; - }, - "for": function(init, cond, step, block) { - return [ this[0], walk(init), walk(cond), walk(step), walk(block) ]; - }, - "for-in": function(vvar, key, hash, block) { - return [ this[0], walk(vvar), walk(key), walk(hash), walk(block) ]; - }, - "while": function(cond, block) { - return [ this[0], walk(cond), walk(block) ]; - }, - "do": function(cond, block) { - return [ this[0], walk(cond), walk(block) ]; - }, - "return": function(expr) { - return [ this[0], walk(expr) ]; - }, - "binary": function(op, left, right) { - return [ this[0], op, walk(left), walk(right) ]; - }, - "unary-prefix": function(op, expr) { - return [ this[0], op, walk(expr) ]; - }, - "unary-postfix": function(op, expr) { - return [ this[0], op, walk(expr) ]; - }, - "sub": function(expr, subscript) { - return [ this[0], walk(expr), walk(subscript) ]; - }, - "object": function(props) { - return [ this[0], MAP(props, function(p){ - return p.length == 2 - ? [ p[0], walk(p[1]) ] - : [ p[0], walk(p[1]), p[2] ]; // get/set-ter - }) ]; - }, - "regexp": function(rx, mods) { - return [ this[0], rx, mods ]; - }, - "array": function(elements) { - return [ this[0], MAP(elements, walk) ]; - }, - "stat": function(stat) { - return [ this[0], walk(stat) ]; - }, - "seq": function() { - return [ this[0] ].concat(MAP(slice(arguments), walk)); - }, - "label": function(name, block) { - return [ this[0], name, walk(block) ]; - }, - "with": function(expr, block) { - return [ this[0], walk(expr), walk(block) ]; - }, - "atom": function(name) { - return [ this[0], name ]; - }, - "directive": function(dir) { - return [ this[0], dir ]; - } - }; - - var user = {}; - var stack = []; - function walk(ast) { - if (ast == null) - return null; - try { - stack.push(ast); - var type = ast[0]; - var gen = user[type]; - if (gen) { - var ret = gen.apply(ast, ast.slice(1)); - if (ret != null) - return ret; - } - gen = walkers[type]; - return gen.apply(ast, ast.slice(1)); - } finally { - stack.pop(); - } - }; - - function dive(ast) { - if (ast == null) - return null; - try { - stack.push(ast); - return walkers[ast[0]].apply(ast, ast.slice(1)); - } finally { - stack.pop(); - } - }; - - function with_walkers(walkers, cont){ - var save = {}, i; - for (i in walkers) if (HOP(walkers, i)) { - save[i] = user[i]; - user[i] = walkers[i]; - } - var ret = cont(); - for (i in save) if (HOP(save, i)) { - if (!save[i]) delete user[i]; - else user[i] = save[i]; - } - return ret; - }; - - return { - walk: walk, - dive: dive, - with_walkers: with_walkers, - parent: function() { - return stack[stack.length - 2]; // last one is current node - }, - stack: function() { - return stack; - } - }; -}; - -/* -----[ Scope and mangling ]----- */ - -function Scope(parent) { - this.names = {}; // names defined in this scope - this.mangled = {}; // mangled names (orig.name => mangled) - this.rev_mangled = {}; // reverse lookup (mangled => orig.name) - this.cname = -1; // current mangled name - this.refs = {}; // names referenced from this scope - this.uses_with = false; // will become TRUE if with() is detected in this or any subscopes - this.uses_eval = false; // will become TRUE if eval() is detected in this or any subscopes - this.directives = []; // directives activated from this scope - this.parent = parent; // parent scope - this.children = []; // sub-scopes - if (parent) { - this.level = parent.level + 1; - parent.children.push(this); - } else { - this.level = 0; - } -}; - -function base54_digits() { - if (typeof DIGITS_OVERRIDE_FOR_TESTING != "undefined") - return DIGITS_OVERRIDE_FOR_TESTING; - else - return "etnrisouaflchpdvmgybwESxTNCkLAOM_DPHBjFIqRUzWXV$JKQGYZ0516372984"; -} - -var base54 = (function(){ - var DIGITS = base54_digits(); - return function(num) { - var ret = "", base = 54; - do { - ret += DIGITS.charAt(num % base); - num = Math.floor(num / base); - base = 64; - } while (num > 0); - return ret; - }; -})(); - -Scope.prototype = { - has: function(name) { - for (var s = this; s; s = s.parent) - if (HOP(s.names, name)) - return s; - }, - has_mangled: function(mname) { - for (var s = this; s; s = s.parent) - if (HOP(s.rev_mangled, mname)) - return s; - }, - toJSON: function() { - return { - names: this.names, - uses_eval: this.uses_eval, - uses_with: this.uses_with - }; - }, - - next_mangled: function() { - // we must be careful that the new mangled name: - // - // 1. doesn't shadow a mangled name from a parent - // scope, unless we don't reference the original - // name from this scope OR from any sub-scopes! - // This will get slow. - // - // 2. doesn't shadow an original name from a parent - // scope, in the event that the name is not mangled - // in the parent scope and we reference that name - // here OR IN ANY SUBSCOPES! - // - // 3. doesn't shadow a name that is referenced but not - // defined (possibly global defined elsewhere). - for (;;) { - var m = base54(++this.cname), prior; - - // case 1. - prior = this.has_mangled(m); - if (prior && this.refs[prior.rev_mangled[m]] === prior) - continue; - - // case 2. - prior = this.has(m); - if (prior && prior !== this && this.refs[m] === prior && !prior.has_mangled(m)) - continue; - - // case 3. - if (HOP(this.refs, m) && this.refs[m] == null) - continue; - - // I got "do" once. :-/ - if (!is_identifier(m)) - continue; - - return m; - } - }, - set_mangle: function(name, m) { - this.rev_mangled[m] = name; - return this.mangled[name] = m; - }, - get_mangled: function(name, newMangle) { - if (this.uses_eval || this.uses_with) return name; // no mangle if eval or with is in use - var s = this.has(name); - if (!s) return name; // not in visible scope, no mangle - if (HOP(s.mangled, name)) return s.mangled[name]; // already mangled in this scope - if (!newMangle) return name; // not found and no mangling requested - return s.set_mangle(name, s.next_mangled()); - }, - references: function(name) { - return name && !this.parent || this.uses_with || this.uses_eval || this.refs[name]; - }, - define: function(name, type) { - if (name != null) { - if (type == "var" || !HOP(this.names, name)) - this.names[name] = type || "var"; - return name; - } - }, - active_directive: function(dir) { - return member(dir, this.directives) || this.parent && this.parent.active_directive(dir); - } -}; - -function ast_add_scope(ast) { - - var current_scope = null; - var w = ast_walker(), walk = w.walk; - var having_eval = []; - - function with_new_scope(cont) { - current_scope = new Scope(current_scope); - current_scope.labels = new Scope(); - var ret = current_scope.body = cont(); - ret.scope = current_scope; - current_scope = current_scope.parent; - return ret; - }; - - function define(name, type) { - return current_scope.define(name, type); - }; - - function reference(name) { - current_scope.refs[name] = true; - }; - - function _lambda(name, args, body) { - var is_defun = this[0] == "defun"; - return [ this[0], is_defun ? define(name, "defun") : name, args, with_new_scope(function(){ - if (!is_defun) define(name, "lambda"); - MAP(args, function(name){ define(name, "arg") }); - return MAP(body, walk); - })]; - }; - - function _vardefs(type) { - return function(defs) { - MAP(defs, function(d){ - define(d[0], type); - if (d[1]) reference(d[0]); - }); - }; - }; - - function _breacont(label) { - if (label) - current_scope.labels.refs[label] = true; - }; - - return with_new_scope(function(){ - // process AST - var ret = w.with_walkers({ - "function": _lambda, - "defun": _lambda, - "label": function(name, stat) { current_scope.labels.define(name) }, - "break": _breacont, - "continue": _breacont, - "with": function(expr, block) { - for (var s = current_scope; s; s = s.parent) - s.uses_with = true; - }, - "var": _vardefs("var"), - "const": _vardefs("const"), - "try": function(t, c, f) { - if (c != null) return [ - this[0], - MAP(t, walk), - [ define(c[0], "catch"), MAP(c[1], walk) ], - f != null ? MAP(f, walk) : null - ]; - }, - "name": function(name) { - if (name == "eval") - having_eval.push(current_scope); - reference(name); - } - }, function(){ - return walk(ast); - }); - - // the reason why we need an additional pass here is - // that names can be used prior to their definition. - - // scopes where eval was detected and their parents - // are marked with uses_eval, unless they define the - // "eval" name. - MAP(having_eval, function(scope){ - if (!scope.has("eval")) while (scope) { - scope.uses_eval = true; - scope = scope.parent; - } - }); - - // for referenced names it might be useful to know - // their origin scope. current_scope here is the - // toplevel one. - function fixrefs(scope, i) { - // do children first; order shouldn't matter - for (i = scope.children.length; --i >= 0;) - fixrefs(scope.children[i]); - for (i in scope.refs) if (HOP(scope.refs, i)) { - // find origin scope and propagate the reference to origin - for (var origin = scope.has(i), s = scope; s; s = s.parent) { - s.refs[i] = origin; - if (s === origin) break; - } - } - }; - fixrefs(current_scope); - - return ret; - }); - -}; - -/* -----[ mangle names ]----- */ - -function ast_mangle(ast, options) { - var w = ast_walker(), walk = w.walk, scope; - options = defaults(options, { - mangle : true, - toplevel : false, - defines : null, - except : null, - no_functions : false - }); - - function get_mangled(name, newMangle) { - if (!options.mangle) return name; - if (!options.toplevel && !scope.parent) return name; // don't mangle toplevel - if (options.except && member(name, options.except)) - return name; - if (options.no_functions && HOP(scope.names, name) && - (scope.names[name] == 'defun' || scope.names[name] == 'lambda')) - return name; - return scope.get_mangled(name, newMangle); - }; - - function get_define(name) { - if (options.defines) { - // we always lookup a defined symbol for the current scope FIRST, so declared - // vars trump a DEFINE symbol, but if no such var is found, then match a DEFINE value - if (!scope.has(name)) { - if (HOP(options.defines, name)) { - return options.defines[name]; - } - } - return null; - } - }; - - function _lambda(name, args, body) { - if (!options.no_functions && options.mangle) { - var is_defun = this[0] == "defun", extra; - if (name) { - if (is_defun) name = get_mangled(name); - else if (body.scope.references(name)) { - extra = {}; - if (!(scope.uses_eval || scope.uses_with)) - name = extra[name] = scope.next_mangled(); - else - extra[name] = name; - } - else name = null; - } - } - body = with_scope(body.scope, function(){ - args = MAP(args, function(name){ return get_mangled(name) }); - return MAP(body, walk); - }, extra); - return [ this[0], name, args, body ]; - }; - - function with_scope(s, cont, extra) { - var _scope = scope; - scope = s; - if (extra) for (var i in extra) if (HOP(extra, i)) { - s.set_mangle(i, extra[i]); - } - for (var i in s.names) if (HOP(s.names, i)) { - get_mangled(i, true); - } - var ret = cont(); - ret.scope = s; - scope = _scope; - return ret; - }; - - function _vardefs(defs) { - return [ this[0], MAP(defs, function(d){ - return [ get_mangled(d[0]), walk(d[1]) ]; - }) ]; - }; - - function _breacont(label) { - if (label) return [ this[0], scope.labels.get_mangled(label) ]; - }; - - return w.with_walkers({ - "function": _lambda, - "defun": function() { - // move function declarations to the top when - // they are not in some block. - var ast = _lambda.apply(this, arguments); - switch (w.parent()[0]) { - case "toplevel": - case "function": - case "defun": - return MAP.at_top(ast); - } - return ast; - }, - "label": function(label, stat) { - if (scope.labels.refs[label]) return [ - this[0], - scope.labels.get_mangled(label, true), - walk(stat) - ]; - return walk(stat); - }, - "break": _breacont, - "continue": _breacont, - "var": _vardefs, - "const": _vardefs, - "name": function(name) { - return get_define(name) || [ this[0], get_mangled(name) ]; - }, - "try": function(t, c, f) { - return [ this[0], - MAP(t, walk), - c != null ? [ get_mangled(c[0]), MAP(c[1], walk) ] : null, - f != null ? MAP(f, walk) : null ]; - }, - "toplevel": function(body) { - var self = this; - return with_scope(self.scope, function(){ - return [ self[0], MAP(body, walk) ]; - }); - }, - "directive": function() { - return MAP.at_top(this); - } - }, function() { - return walk(ast_add_scope(ast)); - }); -}; - -/* -----[ - - compress foo["bar"] into foo.bar, - - remove block brackets {} where possible - - join consecutive var declarations - - various optimizations for IFs: - - if (cond) foo(); else bar(); ==> cond?foo():bar(); - - if (cond) foo(); ==> cond&&foo(); - - if (foo) return bar(); else return baz(); ==> return foo?bar():baz(); // also for throw - - if (foo) return bar(); else something(); ==> {if(foo)return bar();something()} - ]----- */ - -var warn = function(){}; - -function best_of(ast1, ast2) { - return gen_code(ast1).length > gen_code(ast2[0] == "stat" ? ast2[1] : ast2).length ? ast2 : ast1; -}; - -function last_stat(b) { - if (b[0] == "block" && b[1] && b[1].length > 0) - return b[1][b[1].length - 1]; - return b; -} - -function aborts(t) { - if (t) switch (last_stat(t)[0]) { - case "return": - case "break": - case "continue": - case "throw": - return true; - } -}; - -function boolean_expr(expr) { - return ( (expr[0] == "unary-prefix" - && member(expr[1], [ "!", "delete" ])) || - - (expr[0] == "binary" - && member(expr[1], [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ])) || - - (expr[0] == "binary" - && member(expr[1], [ "&&", "||" ]) - && boolean_expr(expr[2]) - && boolean_expr(expr[3])) || - - (expr[0] == "conditional" - && boolean_expr(expr[2]) - && boolean_expr(expr[3])) || - - (expr[0] == "assign" - && expr[1] === true - && boolean_expr(expr[3])) || - - (expr[0] == "seq" - && boolean_expr(expr[expr.length - 1])) - ); -}; - -function empty(b) { - return !b || (b[0] == "block" && (!b[1] || b[1].length == 0)); -}; - -function is_string(node) { - return (node[0] == "string" || - node[0] == "unary-prefix" && node[1] == "typeof" || - node[0] == "binary" && node[1] == "+" && - (is_string(node[2]) || is_string(node[3]))); -}; - -var when_constant = (function(){ - - var $NOT_CONSTANT = {}; - - // this can only evaluate constant expressions. If it finds anything - // not constant, it throws $NOT_CONSTANT. - function evaluate(expr) { - switch (expr[0]) { - case "string": - case "num": - return expr[1]; - case "name": - case "atom": - switch (expr[1]) { - case "true": return true; - case "false": return false; - case "null": return null; - } - break; - case "unary-prefix": - switch (expr[1]) { - case "!": return !evaluate(expr[2]); - case "typeof": return typeof evaluate(expr[2]); - case "~": return ~evaluate(expr[2]); - case "-": return -evaluate(expr[2]); - case "+": return +evaluate(expr[2]); - } - break; - case "binary": - var left = expr[2], right = expr[3]; - switch (expr[1]) { - case "&&" : return evaluate(left) && evaluate(right); - case "||" : return evaluate(left) || evaluate(right); - case "|" : return evaluate(left) | evaluate(right); - case "&" : return evaluate(left) & evaluate(right); - case "^" : return evaluate(left) ^ evaluate(right); - case "+" : return evaluate(left) + evaluate(right); - case "*" : return evaluate(left) * evaluate(right); - case "/" : return evaluate(left) / evaluate(right); - case "%" : return evaluate(left) % evaluate(right); - case "-" : return evaluate(left) - evaluate(right); - case "<<" : return evaluate(left) << evaluate(right); - case ">>" : return evaluate(left) >> evaluate(right); - case ">>>" : return evaluate(left) >>> evaluate(right); - case "==" : return evaluate(left) == evaluate(right); - case "===" : return evaluate(left) === evaluate(right); - case "!=" : return evaluate(left) != evaluate(right); - case "!==" : return evaluate(left) !== evaluate(right); - case "<" : return evaluate(left) < evaluate(right); - case "<=" : return evaluate(left) <= evaluate(right); - case ">" : return evaluate(left) > evaluate(right); - case ">=" : return evaluate(left) >= evaluate(right); - case "in" : return evaluate(left) in evaluate(right); - case "instanceof" : return evaluate(left) instanceof evaluate(right); - } - } - throw $NOT_CONSTANT; - }; - - return function(expr, yes, no) { - try { - var val = evaluate(expr), ast; - switch (typeof val) { - case "string": ast = [ "string", val ]; break; - case "number": ast = [ "num", val ]; break; - case "boolean": ast = [ "name", String(val) ]; break; - default: - if (val === null) { ast = [ "atom", "null" ]; break; } - throw new Error("Can't handle constant of type: " + (typeof val)); - } - return yes.call(expr, ast, val); - } catch(ex) { - if (ex === $NOT_CONSTANT) { - if (expr[0] == "binary" - && (expr[1] == "===" || expr[1] == "!==") - && ((is_string(expr[2]) && is_string(expr[3])) - || (boolean_expr(expr[2]) && boolean_expr(expr[3])))) { - expr[1] = expr[1].substr(0, 2); - } - else if (no && expr[0] == "binary" - && (expr[1] == "||" || expr[1] == "&&")) { - // the whole expression is not constant but the lval may be... - try { - var lval = evaluate(expr[2]); - expr = ((expr[1] == "&&" && (lval ? expr[3] : lval)) || - (expr[1] == "||" && (lval ? lval : expr[3])) || - expr); - } catch(ex2) { - // IGNORE... lval is not constant - } - } - return no ? no.call(expr, expr) : null; - } - else throw ex; - } - }; - -})(); - -function warn_unreachable(ast) { - if (!empty(ast)) - warn("Dropping unreachable code: " + gen_code(ast, true)); -}; - -function prepare_ifs(ast) { - var w = ast_walker(), walk = w.walk; - // In this first pass, we rewrite ifs which abort with no else with an - // if-else. For example: - // - // if (x) { - // blah(); - // return y; - // } - // foobar(); - // - // is rewritten into: - // - // if (x) { - // blah(); - // return y; - // } else { - // foobar(); - // } - function redo_if(statements) { - statements = MAP(statements, walk); - - for (var i = 0; i < statements.length; ++i) { - var fi = statements[i]; - if (fi[0] != "if") continue; - - if (fi[3]) continue; - - var t = fi[2]; - if (!aborts(t)) continue; - - var conditional = walk(fi[1]); - - var e_body = redo_if(statements.slice(i + 1)); - var e = e_body.length == 1 ? e_body[0] : [ "block", e_body ]; - - return statements.slice(0, i).concat([ [ - fi[0], // "if" - conditional, // conditional - t, // then - e // else - ] ]); - } - - return statements; - }; - - function redo_if_lambda(name, args, body) { - body = redo_if(body); - return [ this[0], name, args, body ]; - }; - - function redo_if_block(statements) { - return [ this[0], statements != null ? redo_if(statements) : null ]; - }; - - return w.with_walkers({ - "defun": redo_if_lambda, - "function": redo_if_lambda, - "block": redo_if_block, - "splice": redo_if_block, - "toplevel": function(statements) { - return [ this[0], redo_if(statements) ]; - }, - "try": function(t, c, f) { - return [ - this[0], - redo_if(t), - c != null ? [ c[0], redo_if(c[1]) ] : null, - f != null ? redo_if(f) : null - ]; - } - }, function() { - return walk(ast); - }); -}; - -function for_side_effects(ast, handler) { - var w = ast_walker(), walk = w.walk; - var $stop = {}, $restart = {}; - function stop() { throw $stop }; - function restart() { throw $restart }; - function found(){ return handler.call(this, this, w, stop, restart) }; - function unary(op) { - if (op == "++" || op == "--") - return found.apply(this, arguments); - }; - function binary(op) { - if (op == "&&" || op == "||") - return found.apply(this, arguments); - }; - return w.with_walkers({ - "try": found, - "throw": found, - "return": found, - "new": found, - "switch": found, - "break": found, - "continue": found, - "assign": found, - "call": found, - "if": found, - "for": found, - "for-in": found, - "while": found, - "do": found, - "return": found, - "unary-prefix": unary, - "unary-postfix": unary, - "conditional": found, - "binary": binary, - "defun": found - }, function(){ - while (true) try { - walk(ast); - break; - } catch(ex) { - if (ex === $stop) break; - if (ex === $restart) continue; - throw ex; - } - }); -}; - -function ast_lift_variables(ast) { - var w = ast_walker(), walk = w.walk, scope; - function do_body(body, env) { - var _scope = scope; - scope = env; - body = MAP(body, walk); - var hash = {}, names = MAP(env.names, function(type, name){ - if (type != "var") return MAP.skip; - if (!env.references(name)) return MAP.skip; - hash[name] = true; - return [ name ]; - }); - if (names.length > 0) { - // looking for assignments to any of these variables. - // we can save considerable space by moving the definitions - // in the var declaration. - for_side_effects([ "block", body ], function(ast, walker, stop, restart) { - if (ast[0] == "assign" - && ast[1] === true - && ast[2][0] == "name" - && HOP(hash, ast[2][1])) { - // insert the definition into the var declaration - for (var i = names.length; --i >= 0;) { - if (names[i][0] == ast[2][1]) { - if (names[i][1]) // this name already defined, we must stop - stop(); - names[i][1] = ast[3]; // definition - names.push(names.splice(i, 1)[0]); - break; - } - } - // remove this assignment from the AST. - var p = walker.parent(); - if (p[0] == "seq") { - var a = p[2]; - a.unshift(0, p.length); - p.splice.apply(p, a); - } - else if (p[0] == "stat") { - p.splice(0, p.length, "block"); // empty statement - } - else { - stop(); - } - restart(); - } - stop(); - }); - body.unshift([ "var", names ]); - } - scope = _scope; - return body; - }; - function _vardefs(defs) { - var ret = null; - for (var i = defs.length; --i >= 0;) { - var d = defs[i]; - if (!d[1]) continue; - d = [ "assign", true, [ "name", d[0] ], d[1] ]; - if (ret == null) ret = d; - else ret = [ "seq", d, ret ]; - } - if (ret == null && w.parent()[0] != "for") { - if (w.parent()[0] == "for-in") - return [ "name", defs[0][0] ]; - return MAP.skip; - } - return [ "stat", ret ]; - }; - function _toplevel(body) { - return [ this[0], do_body(body, this.scope) ]; - }; - return w.with_walkers({ - "function": function(name, args, body){ - for (var i = args.length; --i >= 0 && !body.scope.references(args[i]);) - args.pop(); - if (!body.scope.references(name)) name = null; - return [ this[0], name, args, do_body(body, body.scope) ]; - }, - "defun": function(name, args, body){ - if (!scope.references(name)) return MAP.skip; - for (var i = args.length; --i >= 0 && !body.scope.references(args[i]);) - args.pop(); - return [ this[0], name, args, do_body(body, body.scope) ]; - }, - "var": _vardefs, - "toplevel": _toplevel - }, function(){ - return walk(ast_add_scope(ast)); - }); -}; - -function ast_squeeze(ast, options) { - ast = squeeze_1(ast, options); - ast = squeeze_2(ast, options); - return ast; -}; - -function squeeze_1(ast, options) { - options = defaults(options, { - make_seqs : true, - dead_code : true, - no_warnings : false, - keep_comps : true, - unsafe : false - }); - - var w = ast_walker(), walk = w.walk, scope; - - function negate(c) { - var not_c = [ "unary-prefix", "!", c ]; - switch (c[0]) { - case "unary-prefix": - return c[1] == "!" && boolean_expr(c[2]) ? c[2] : not_c; - case "seq": - c = slice(c); - c[c.length - 1] = negate(c[c.length - 1]); - return c; - case "conditional": - return best_of(not_c, [ "conditional", c[1], negate(c[2]), negate(c[3]) ]); - case "binary": - var op = c[1], left = c[2], right = c[3]; - if (!options.keep_comps) switch (op) { - case "<=" : return [ "binary", ">", left, right ]; - case "<" : return [ "binary", ">=", left, right ]; - case ">=" : return [ "binary", "<", left, right ]; - case ">" : return [ "binary", "<=", left, right ]; - } - switch (op) { - case "==" : return [ "binary", "!=", left, right ]; - case "!=" : return [ "binary", "==", left, right ]; - case "===" : return [ "binary", "!==", left, right ]; - case "!==" : return [ "binary", "===", left, right ]; - case "&&" : return best_of(not_c, [ "binary", "||", negate(left), negate(right) ]); - case "||" : return best_of(not_c, [ "binary", "&&", negate(left), negate(right) ]); - } - break; - } - return not_c; - }; - - function make_conditional(c, t, e) { - var make_real_conditional = function() { - if (c[0] == "unary-prefix" && c[1] == "!") { - return e ? [ "conditional", c[2], e, t ] : [ "binary", "||", c[2], t ]; - } else { - return e ? best_of( - [ "conditional", c, t, e ], - [ "conditional", negate(c), e, t ] - ) : [ "binary", "&&", c, t ]; - } - }; - // shortcut the conditional if the expression has a constant value - return when_constant(c, function(ast, val){ - warn_unreachable(val ? e : t); - return (val ? t : e); - }, make_real_conditional); - }; - - function rmblock(block) { - if (block != null && block[0] == "block" && block[1]) { - if (block[1].length == 1) - block = block[1][0]; - else if (block[1].length == 0) - block = [ "block" ]; - } - return block; - }; - - function _lambda(name, args, body) { - return [ this[0], name, args, tighten(body, "lambda") ]; - }; - - // this function does a few things: - // 1. discard useless blocks - // 2. join consecutive var declarations - // 3. remove obviously dead code - // 4. transform consecutive statements using the comma operator - // 5. if block_type == "lambda" and it detects constructs like if(foo) return ... - rewrite like if (!foo) { ... } - function tighten(statements, block_type) { - statements = MAP(statements, walk); - - statements = statements.reduce(function(a, stat){ - if (stat[0] == "block") { - if (stat[1]) { - a.push.apply(a, stat[1]); - } - } else { - a.push(stat); - } - return a; - }, []); - - statements = (function(a, prev){ - statements.forEach(function(cur){ - if (prev && ((cur[0] == "var" && prev[0] == "var") || - (cur[0] == "const" && prev[0] == "const"))) { - prev[1] = prev[1].concat(cur[1]); - } else { - a.push(cur); - prev = cur; - } - }); - return a; - })([]); - - if (options.dead_code) statements = (function(a, has_quit){ - statements.forEach(function(st){ - if (has_quit) { - if (st[0] == "function" || st[0] == "defun") { - a.push(st); - } - else if (st[0] == "var" || st[0] == "const") { - if (!options.no_warnings) - warn("Variables declared in unreachable code"); - st[1] = MAP(st[1], function(def){ - if (def[1] && !options.no_warnings) - warn_unreachable([ "assign", true, [ "name", def[0] ], def[1] ]); - return [ def[0] ]; - }); - a.push(st); - } - else if (!options.no_warnings) - warn_unreachable(st); - } - else { - a.push(st); - if (member(st[0], [ "return", "throw", "break", "continue" ])) - has_quit = true; - } - }); - return a; - })([]); - - if (options.make_seqs) statements = (function(a, prev) { - statements.forEach(function(cur){ - if (prev && prev[0] == "stat" && cur[0] == "stat") { - prev[1] = [ "seq", prev[1], cur[1] ]; - } else { - a.push(cur); - prev = cur; - } - }); - if (a.length >= 2 - && a[a.length-2][0] == "stat" - && (a[a.length-1][0] == "return" || a[a.length-1][0] == "throw") - && a[a.length-1][1]) - { - a.splice(a.length - 2, 2, - [ a[a.length-1][0], - [ "seq", a[a.length-2][1], a[a.length-1][1] ]]); - } - return a; - })([]); - - // this increases jQuery by 1K. Probably not such a good idea after all.. - // part of this is done in prepare_ifs anyway. - // if (block_type == "lambda") statements = (function(i, a, stat){ - // while (i < statements.length) { - // stat = statements[i++]; - // if (stat[0] == "if" && !stat[3]) { - // if (stat[2][0] == "return" && stat[2][1] == null) { - // a.push(make_if(negate(stat[1]), [ "block", statements.slice(i) ])); - // break; - // } - // var last = last_stat(stat[2]); - // if (last[0] == "return" && last[1] == null) { - // a.push(make_if(stat[1], [ "block", stat[2][1].slice(0, -1) ], [ "block", statements.slice(i) ])); - // break; - // } - // } - // a.push(stat); - // } - // return a; - // })(0, []); - - return statements; - }; - - function make_if(c, t, e) { - return when_constant(c, function(ast, val){ - if (val) { - t = walk(t); - warn_unreachable(e); - return t || [ "block" ]; - } else { - e = walk(e); - warn_unreachable(t); - return e || [ "block" ]; - } - }, function() { - return make_real_if(c, t, e); - }); - }; - - function abort_else(c, t, e) { - var ret = [ [ "if", negate(c), e ] ]; - if (t[0] == "block") { - if (t[1]) ret = ret.concat(t[1]); - } else { - ret.push(t); - } - return walk([ "block", ret ]); - }; - - function make_real_if(c, t, e) { - c = walk(c); - t = walk(t); - e = walk(e); - - if (empty(e) && empty(t)) - return [ "stat", c ]; - - if (empty(t)) { - c = negate(c); - t = e; - e = null; - } else if (empty(e)) { - e = null; - } else { - // if we have both else and then, maybe it makes sense to switch them? - (function(){ - var a = gen_code(c); - var n = negate(c); - var b = gen_code(n); - if (b.length < a.length) { - var tmp = t; - t = e; - e = tmp; - c = n; - } - })(); - } - var ret = [ "if", c, t, e ]; - if (t[0] == "if" && empty(t[3]) && empty(e)) { - ret = best_of(ret, walk([ "if", [ "binary", "&&", c, t[1] ], t[2] ])); - } - else if (t[0] == "stat") { - if (e) { - if (e[0] == "stat") - ret = best_of(ret, [ "stat", make_conditional(c, t[1], e[1]) ]); - else if (aborts(e)) - ret = abort_else(c, t, e); - } - else { - ret = best_of(ret, [ "stat", make_conditional(c, t[1]) ]); - } - } - else if (e && t[0] == e[0] && (t[0] == "return" || t[0] == "throw") && t[1] && e[1]) { - ret = best_of(ret, [ t[0], make_conditional(c, t[1], e[1] ) ]); - } - else if (e && aborts(t)) { - ret = [ [ "if", c, t ] ]; - if (e[0] == "block") { - if (e[1]) ret = ret.concat(e[1]); - } - else { - ret.push(e); - } - ret = walk([ "block", ret ]); - } - else if (t && aborts(e)) { - ret = abort_else(c, t, e); - } - return ret; - }; - - function _do_while(cond, body) { - return when_constant(cond, function(cond, val){ - if (!val) { - warn_unreachable(body); - return [ "block" ]; - } else { - return [ "for", null, null, null, walk(body) ]; - } - }); - }; - - return w.with_walkers({ - "sub": function(expr, subscript) { - if (subscript[0] == "string") { - var name = subscript[1]; - if (is_identifier(name)) - return [ "dot", walk(expr), name ]; - else if (/^[1-9][0-9]*$/.test(name) || name === "0") - return [ "sub", walk(expr), [ "num", parseInt(name, 10) ] ]; - } - }, - "if": make_if, - "toplevel": function(body) { - return [ "toplevel", tighten(body) ]; - }, - "switch": function(expr, body) { - var last = body.length - 1; - return [ "switch", walk(expr), MAP(body, function(branch, i){ - var block = tighten(branch[1]); - if (i == last && block.length > 0) { - var node = block[block.length - 1]; - if (node[0] == "break" && !node[1]) - block.pop(); - } - return [ branch[0] ? walk(branch[0]) : null, block ]; - }) ]; - }, - "function": _lambda, - "defun": _lambda, - "block": function(body) { - if (body) return rmblock([ "block", tighten(body) ]); - }, - "binary": function(op, left, right) { - return when_constant([ "binary", op, walk(left), walk(right) ], function yes(c){ - return best_of(walk(c), this); - }, function no() { - return function(){ - if(op != "==" && op != "!=") return; - var l = walk(left), r = walk(right); - if(l && l[0] == "unary-prefix" && l[1] == "!" && l[2][0] == "num") - left = ['num', +!l[2][1]]; - else if (r && r[0] == "unary-prefix" && r[1] == "!" && r[2][0] == "num") - right = ['num', +!r[2][1]]; - return ["binary", op, left, right]; - }() || this; - }); - }, - "conditional": function(c, t, e) { - return make_conditional(walk(c), walk(t), walk(e)); - }, - "try": function(t, c, f) { - return [ - "try", - tighten(t), - c != null ? [ c[0], tighten(c[1]) ] : null, - f != null ? tighten(f) : null - ]; - }, - "unary-prefix": function(op, expr) { - expr = walk(expr); - var ret = [ "unary-prefix", op, expr ]; - if (op == "!") - ret = best_of(ret, negate(expr)); - return when_constant(ret, function(ast, val){ - return walk(ast); // it's either true or false, so minifies to !0 or !1 - }, function() { return ret }); - }, - "name": function(name) { - switch (name) { - case "true": return [ "unary-prefix", "!", [ "num", 0 ]]; - case "false": return [ "unary-prefix", "!", [ "num", 1 ]]; - } - }, - "while": _do_while, - "assign": function(op, lvalue, rvalue) { - lvalue = walk(lvalue); - rvalue = walk(rvalue); - var okOps = [ '+', '-', '/', '*', '%', '>>', '<<', '>>>', '|', '^', '&' ]; - if (op === true && lvalue[0] === "name" && rvalue[0] === "binary" && - ~okOps.indexOf(rvalue[1]) && rvalue[2][0] === "name" && - rvalue[2][1] === lvalue[1]) { - return [ this[0], rvalue[1], lvalue, rvalue[3] ] - } - return [ this[0], op, lvalue, rvalue ]; - }, - "call": function(expr, args) { - expr = walk(expr); - if (options.unsafe && expr[0] == "dot" && expr[1][0] == "string" && expr[2] == "toString") { - return expr[1]; - } - return [ this[0], expr, MAP(args, walk) ]; - }, - "num": function (num) { - if (!isFinite(num)) - return [ "binary", "/", num === 1 / 0 - ? [ "num", 1 ] : num === -1 / 0 - ? [ "unary-prefix", "-", [ "num", 1 ] ] - : [ "num", 0 ], [ "num", 0 ] ]; - - return [ this[0], num ]; - } - }, function() { - return walk(prepare_ifs(walk(prepare_ifs(ast)))); - }); -}; - -function squeeze_2(ast, options) { - var w = ast_walker(), walk = w.walk, scope; - function with_scope(s, cont) { - var save = scope, ret; - scope = s; - ret = cont(); - scope = save; - return ret; - }; - function lambda(name, args, body) { - return [ this[0], name, args, with_scope(body.scope, curry(MAP, body, walk)) ]; - }; - return w.with_walkers({ - "directive": function(dir) { - if (scope.active_directive(dir)) - return [ "block" ]; - scope.directives.push(dir); - }, - "toplevel": function(body) { - return [ this[0], with_scope(this.scope, curry(MAP, body, walk)) ]; - }, - "function": lambda, - "defun": lambda - }, function(){ - return walk(ast_add_scope(ast)); - }); -}; - -/* -----[ re-generate code from the AST ]----- */ - -var DOT_CALL_NO_PARENS = jsp.array_to_hash([ - "name", - "array", - "object", - "string", - "dot", - "sub", - "call", - "regexp", - "defun" -]); - -function make_string(str, ascii_only) { - var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){ - switch (s) { - case "\\": return "\\\\"; - case "\b": return "\\b"; - case "\f": return "\\f"; - case "\n": return "\\n"; - case "\r": return "\\r"; - case "\u2028": return "\\u2028"; - case "\u2029": return "\\u2029"; - case '"': ++dq; return '"'; - case "'": ++sq; return "'"; - case "\0": return "\\0"; - } - return s; - }); - if (ascii_only) str = to_ascii(str); - if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'"; - else return '"' + str.replace(/\x22/g, '\\"') + '"'; -}; - -function to_ascii(str) { - return str.replace(/[\u0080-\uffff]/g, function(ch) { - var code = ch.charCodeAt(0).toString(16); - while (code.length < 4) code = "0" + code; - return "\\u" + code; - }); -}; - -var SPLICE_NEEDS_BRACKETS = jsp.array_to_hash([ "if", "while", "do", "for", "for-in", "with" ]); - -function gen_code(ast, options) { - options = defaults(options, { - indent_start : 0, - indent_level : 4, - quote_keys : false, - space_colon : false, - beautify : false, - ascii_only : false, - inline_script: false - }); - var beautify = !!options.beautify; - var indentation = 0, - newline = beautify ? "\n" : "", - space = beautify ? " " : ""; - - function encode_string(str) { - var ret = make_string(str, options.ascii_only); - if (options.inline_script) - ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); - return ret; - }; - - function make_name(name) { - name = name.toString(); - if (options.ascii_only) - name = to_ascii(name); - return name; - }; - - function indent(line) { - if (line == null) - line = ""; - if (beautify) - line = repeat_string(" ", options.indent_start + indentation * options.indent_level) + line; - return line; - }; - - function with_indent(cont, incr) { - if (incr == null) incr = 1; - indentation += incr; - try { return cont.apply(null, slice(arguments, 1)); } - finally { indentation -= incr; } - }; - - function last_char(str) { - str = str.toString(); - return str.charAt(str.length - 1); - }; - - function first_char(str) { - return str.toString().charAt(0); - }; - - function add_spaces(a) { - if (beautify) - return a.join(" "); - var b = []; - for (var i = 0; i < a.length; ++i) { - var next = a[i + 1]; - b.push(a[i]); - if (next && - ((is_identifier_char(last_char(a[i])) && (is_identifier_char(first_char(next)) - || first_char(next) == "\\")) || - (/[\+\-]$/.test(a[i].toString()) && /^[\+\-]/.test(next.toString()) || - last_char(a[i]) == "/" && first_char(next) == "/"))) { - b.push(" "); - } - } - return b.join(""); - }; - - function add_commas(a) { - return a.join("," + space); - }; - - function parenthesize(expr) { - var gen = make(expr); - for (var i = 1; i < arguments.length; ++i) { - var el = arguments[i]; - if ((el instanceof Function && el(expr)) || expr[0] == el) - return "(" + gen + ")"; - } - return gen; - }; - - function best_of(a) { - if (a.length == 1) { - return a[0]; - } - if (a.length == 2) { - var b = a[1]; - a = a[0]; - return a.length <= b.length ? a : b; - } - return best_of([ a[0], best_of(a.slice(1)) ]); - }; - - function needs_parens(expr) { - if (expr[0] == "function" || expr[0] == "object") { - // dot/call on a literal function requires the - // function literal itself to be parenthesized - // only if it's the first "thing" in a - // statement. This means that the parent is - // "stat", but it could also be a "seq" and - // we're the first in this "seq" and the - // parent is "stat", and so on. Messy stuff, - // but it worths the trouble. - var a = slice(w.stack()), self = a.pop(), p = a.pop(); - while (p) { - if (p[0] == "stat") return true; - if (((p[0] == "seq" || p[0] == "call" || p[0] == "dot" || p[0] == "sub" || p[0] == "conditional") && p[1] === self) || - ((p[0] == "binary" || p[0] == "assign" || p[0] == "unary-postfix") && p[2] === self)) { - self = p; - p = a.pop(); - } else { - return false; - } - } - } - return !HOP(DOT_CALL_NO_PARENS, expr[0]); - }; - - function make_num(num) { - var str = num.toString(10), a = [ str.replace(/^0\./, ".").replace('e+', 'e') ], m; - if (Math.floor(num) === num) { - if (num >= 0) { - a.push("0x" + num.toString(16).toLowerCase(), // probably pointless - "0" + num.toString(8)); // same. - } else { - a.push("-0x" + (-num).toString(16).toLowerCase(), // probably pointless - "-0" + (-num).toString(8)); // same. - } - if ((m = /^(.*?)(0+)$/.exec(num))) { - a.push(m[1] + "e" + m[2].length); - } - } else if ((m = /^0?\.(0+)(.*)$/.exec(num))) { - a.push(m[2] + "e-" + (m[1].length + m[2].length), - str.substr(str.indexOf("."))); - } - return best_of(a); - }; - - var w = ast_walker(); - var make = w.walk; - return w.with_walkers({ - "string": encode_string, - "num": make_num, - "name": make_name, - "debugger": function(){ return "debugger;" }, - "toplevel": function(statements) { - return make_block_statements(statements) - .join(newline + newline); - }, - "splice": function(statements) { - var parent = w.parent(); - if (HOP(SPLICE_NEEDS_BRACKETS, parent)) { - // we need block brackets in this case - return make_block.apply(this, arguments); - } else { - return MAP(make_block_statements(statements, true), - function(line, i) { - // the first line is already indented - return i > 0 ? indent(line) : line; - }).join(newline); - } - }, - "block": make_block, - "var": function(defs) { - return "var " + add_commas(MAP(defs, make_1vardef)) + ";"; - }, - "const": function(defs) { - return "const " + add_commas(MAP(defs, make_1vardef)) + ";"; - }, - "try": function(tr, ca, fi) { - var out = [ "try", make_block(tr) ]; - if (ca) out.push("catch", "(" + ca[0] + ")", make_block(ca[1])); - if (fi) out.push("finally", make_block(fi)); - return add_spaces(out); - }, - "throw": function(expr) { - return add_spaces([ "throw", make(expr) ]) + ";"; - }, - "new": function(ctor, args) { - args = args.length > 0 ? "(" + add_commas(MAP(args, function(expr){ - return parenthesize(expr, "seq"); - })) + ")" : ""; - return add_spaces([ "new", parenthesize(ctor, "seq", "binary", "conditional", "assign", function(expr){ - var w = ast_walker(), has_call = {}; - try { - w.with_walkers({ - "call": function() { throw has_call }, - "function": function() { return this } - }, function(){ - w.walk(expr); - }); - } catch(ex) { - if (ex === has_call) - return true; - throw ex; - } - }) + args ]); - }, - "switch": function(expr, body) { - return add_spaces([ "switch", "(" + make(expr) + ")", make_switch_block(body) ]); - }, - "break": function(label) { - var out = "break"; - if (label != null) - out += " " + make_name(label); - return out + ";"; - }, - "continue": function(label) { - var out = "continue"; - if (label != null) - out += " " + make_name(label); - return out + ";"; - }, - "conditional": function(co, th, el) { - return add_spaces([ parenthesize(co, "assign", "seq", "conditional"), "?", - parenthesize(th, "seq"), ":", - parenthesize(el, "seq") ]); - }, - "assign": function(op, lvalue, rvalue) { - if (op && op !== true) op += "="; - else op = "="; - return add_spaces([ make(lvalue), op, parenthesize(rvalue, "seq") ]); - }, - "dot": function(expr) { - var out = make(expr), i = 1; - if (expr[0] == "num") { - if (!/[a-f.]/i.test(out)) - out += "."; - } else if (expr[0] != "function" && needs_parens(expr)) - out = "(" + out + ")"; - while (i < arguments.length) - out += "." + make_name(arguments[i++]); - return out; - }, - "call": function(func, args) { - var f = make(func); - if (f.charAt(0) != "(" && needs_parens(func)) - f = "(" + f + ")"; - return f + "(" + add_commas(MAP(args, function(expr){ - return parenthesize(expr, "seq"); - })) + ")"; - }, - "function": make_function, - "defun": make_function, - "if": function(co, th, el) { - var out = [ "if", "(" + make(co) + ")", el ? make_then(th) : make(th) ]; - if (el) { - out.push("else", make(el)); - } - return add_spaces(out); - }, - "for": function(init, cond, step, block) { - var out = [ "for" ]; - init = (init != null ? make(init) : "").replace(/;*\s*$/, ";" + space); - cond = (cond != null ? make(cond) : "").replace(/;*\s*$/, ";" + space); - step = (step != null ? make(step) : "").replace(/;*\s*$/, ""); - var args = init + cond + step; - if (args == "; ; ") args = ";;"; - out.push("(" + args + ")", make(block)); - return add_spaces(out); - }, - "for-in": function(vvar, key, hash, block) { - return add_spaces([ "for", "(" + - (vvar ? make(vvar).replace(/;+$/, "") : make(key)), - "in", - make(hash) + ")", make(block) ]); - }, - "while": function(condition, block) { - return add_spaces([ "while", "(" + make(condition) + ")", make(block) ]); - }, - "do": function(condition, block) { - return add_spaces([ "do", make(block), "while", "(" + make(condition) + ")" ]) + ";"; - }, - "return": function(expr) { - var out = [ "return" ]; - if (expr != null) out.push(make(expr)); - return add_spaces(out) + ";"; - }, - "binary": function(operator, lvalue, rvalue) { - var left = make(lvalue), right = make(rvalue); - // XXX: I'm pretty sure other cases will bite here. - // we need to be smarter. - // adding parens all the time is the safest bet. - if (member(lvalue[0], [ "assign", "conditional", "seq" ]) || - lvalue[0] == "binary" && PRECEDENCE[operator] > PRECEDENCE[lvalue[1]] || - lvalue[0] == "function" && needs_parens(this)) { - left = "(" + left + ")"; - } - if (member(rvalue[0], [ "assign", "conditional", "seq" ]) || - rvalue[0] == "binary" && PRECEDENCE[operator] >= PRECEDENCE[rvalue[1]] && - !(rvalue[1] == operator && member(operator, [ "&&", "||", "*" ]))) { - right = "(" + right + ")"; - } - else if (!beautify && options.inline_script && (operator == "<" || operator == "<<") - && rvalue[0] == "regexp" && /^script/i.test(rvalue[1])) { - right = " " + right; - } - return add_spaces([ left, operator, right ]); - }, - "unary-prefix": function(operator, expr) { - var val = make(expr); - if (!(expr[0] == "num" || (expr[0] == "unary-prefix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr))) - val = "(" + val + ")"; - return operator + (jsp.is_alphanumeric_char(operator.charAt(0)) ? " " : "") + val; - }, - "unary-postfix": function(operator, expr) { - var val = make(expr); - if (!(expr[0] == "num" || (expr[0] == "unary-postfix" && !HOP(OPERATORS, operator + expr[1])) || !needs_parens(expr))) - val = "(" + val + ")"; - return val + operator; - }, - "sub": function(expr, subscript) { - var hash = make(expr); - if (needs_parens(expr)) - hash = "(" + hash + ")"; - return hash + "[" + make(subscript) + "]"; - }, - "object": function(props) { - var obj_needs_parens = needs_parens(this); - if (props.length == 0) - return obj_needs_parens ? "({})" : "{}"; - var out = "{" + newline + with_indent(function(){ - return MAP(props, function(p){ - if (p.length == 3) { - // getter/setter. The name is in p[0], the arg.list in p[1][2], the - // body in p[1][3] and type ("get" / "set") in p[2]. - return indent(make_function(p[0], p[1][2], p[1][3], p[2], true)); - } - var key = p[0], val = parenthesize(p[1], "seq"); - if (options.quote_keys) { - key = encode_string(key); - } else if ((typeof key == "number" || !beautify && +key + "" == key) - && parseFloat(key) >= 0) { - key = make_num(+key); - } else if (!is_identifier(key)) { - key = encode_string(key); - } - return indent(add_spaces(beautify && options.space_colon - ? [ key, ":", val ] - : [ key + ":", val ])); - }).join("," + newline); - }) + newline + indent("}"); - return obj_needs_parens ? "(" + out + ")" : out; - }, - "regexp": function(rx, mods) { - if (options.ascii_only) rx = to_ascii(rx); - return "/" + rx + "/" + mods; - }, - "array": function(elements) { - if (elements.length == 0) return "[]"; - return add_spaces([ "[", add_commas(MAP(elements, function(el, i){ - if (!beautify && el[0] == "atom" && el[1] == "undefined") return i === elements.length - 1 ? "," : ""; - return parenthesize(el, "seq"); - })), "]" ]); - }, - "stat": function(stmt) { - return stmt != null - ? make(stmt).replace(/;*\s*$/, ";") - : ";"; - }, - "seq": function() { - return add_commas(MAP(slice(arguments), make)); - }, - "label": function(name, block) { - return add_spaces([ make_name(name), ":", make(block) ]); - }, - "with": function(expr, block) { - return add_spaces([ "with", "(" + make(expr) + ")", make(block) ]); - }, - "atom": function(name) { - return make_name(name); - }, - "directive": function(dir) { - return make_string(dir) + ";"; - } - }, function(){ return make(ast) }); - - // The squeezer replaces "block"-s that contain only a single - // statement with the statement itself; technically, the AST - // is correct, but this can create problems when we output an - // IF having an ELSE clause where the THEN clause ends in an - // IF *without* an ELSE block (then the outer ELSE would refer - // to the inner IF). This function checks for this case and - // adds the block brackets if needed. - function make_then(th) { - if (th == null) return ";"; - if (th[0] == "do") { - // https://github.com/mishoo/UglifyJS/issues/#issue/57 - // IE croaks with "syntax error" on code like this: - // if (foo) do ... while(cond); else ... - // we need block brackets around do/while - return make_block([ th ]); - } - var b = th; - while (true) { - var type = b[0]; - if (type == "if") { - if (!b[3]) - // no else, we must add the block - return make([ "block", [ th ]]); - b = b[3]; - } - else if (type == "while" || type == "do") b = b[2]; - else if (type == "for" || type == "for-in") b = b[4]; - else break; - } - return make(th); - }; - - function make_function(name, args, body, keyword, no_parens) { - var out = keyword || "function"; - if (name) { - out += " " + make_name(name); - } - out += "(" + add_commas(MAP(args, make_name)) + ")"; - out = add_spaces([ out, make_block(body) ]); - return (!no_parens && needs_parens(this)) ? "(" + out + ")" : out; - }; - - function must_has_semicolon(node) { - switch (node[0]) { - case "with": - case "while": - return empty(node[2]) || must_has_semicolon(node[2]); - case "for": - case "for-in": - return empty(node[4]) || must_has_semicolon(node[4]); - case "if": - if (empty(node[2]) && !node[3]) return true; // `if' with empty `then' and no `else' - if (node[3]) { - if (empty(node[3])) return true; // `else' present but empty - return must_has_semicolon(node[3]); // dive into the `else' branch - } - return must_has_semicolon(node[2]); // dive into the `then' branch - case "directive": - return true; - } - }; - - function make_block_statements(statements, noindent) { - for (var a = [], last = statements.length - 1, i = 0; i <= last; ++i) { - var stat = statements[i]; - var code = make(stat); - if (code != ";") { - if (!beautify && i == last && !must_has_semicolon(stat)) { - code = code.replace(/;+\s*$/, ""); - } - a.push(code); - } - } - return noindent ? a : MAP(a, indent); - }; - - function make_switch_block(body) { - var n = body.length; - if (n == 0) return "{}"; - return "{" + newline + MAP(body, function(branch, i){ - var has_body = branch[1].length > 0, code = with_indent(function(){ - return indent(branch[0] - ? add_spaces([ "case", make(branch[0]) + ":" ]) - : "default:"); - }, 0.5) + (has_body ? newline + with_indent(function(){ - return make_block_statements(branch[1]).join(newline); - }) : ""); - if (!beautify && has_body && i < n - 1) - code += ";"; - return code; - }).join(newline) + newline + indent("}"); - }; - - function make_block(statements) { - if (!statements) return ";"; - if (statements.length == 0) return "{}"; - return "{" + newline + with_indent(function(){ - return make_block_statements(statements).join(newline); - }) + newline + indent("}"); - }; - - function make_1vardef(def) { - var name = def[0], val = def[1]; - if (val != null) - name = add_spaces([ make_name(name), "=", parenthesize(val, "seq") ]); - return name; - }; - -}; - -function split_lines(code, max_line_length) { - var splits = [ 0 ]; - jsp.parse(function(){ - var next_token = jsp.tokenizer(code); - var last_split = 0; - var prev_token; - function current_length(tok) { - return tok.pos - last_split; - }; - function split_here(tok) { - last_split = tok.pos; - splits.push(last_split); - }; - function custom(){ - var tok = next_token.apply(this, arguments); - out: { - if (prev_token) { - if (prev_token.type == "keyword") break out; - } - if (current_length(tok) > max_line_length) { - switch (tok.type) { - case "keyword": - case "atom": - case "name": - case "punc": - split_here(tok); - break out; - } - } - } - prev_token = tok; - return tok; - }; - custom.context = function() { - return next_token.context.apply(this, arguments); - }; - return custom; - }()); - return splits.map(function(pos, i){ - return code.substring(pos, splits[i + 1] || code.length); - }).join("\n"); -}; - -/* -----[ Utilities ]----- */ - -function repeat_string(str, i) { - if (i <= 0) return ""; - if (i == 1) return str; - var d = repeat_string(str, i >> 1); - d += d; - if (i & 1) d += str; - return d; -}; - -function defaults(args, defs) { - var ret = {}; - if (args === true) - args = {}; - for (var i in defs) if (HOP(defs, i)) { - ret[i] = (args && HOP(args, i)) ? args[i] : defs[i]; - } - return ret; -}; - -function is_identifier(name) { - return /^[a-z_$][a-z0-9_$]*$/i.test(name) - && name != "this" - && !HOP(jsp.KEYWORDS_ATOM, name) - && !HOP(jsp.RESERVED_WORDS, name) - && !HOP(jsp.KEYWORDS, name); -}; - -function HOP(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -}; - -// some utilities - -var MAP; - -(function(){ - MAP = function(a, f, o) { - var ret = [], top = [], i; - function doit() { - var val = f.call(o, a[i], i); - if (val instanceof AtTop) { - val = val.v; - if (val instanceof Splice) { - top.push.apply(top, val.v); - } else { - top.push(val); - } - } - else if (val != skip) { - if (val instanceof Splice) { - ret.push.apply(ret, val.v); - } else { - ret.push(val); - } - } - }; - if (a instanceof Array) for (i = 0; i < a.length; ++i) doit(); - else for (i in a) if (HOP(a, i)) doit(); - return top.concat(ret); - }; - MAP.at_top = function(val) { return new AtTop(val) }; - MAP.splice = function(val) { return new Splice(val) }; - var skip = MAP.skip = {}; - function AtTop(val) { this.v = val }; - function Splice(val) { this.v = val }; -})(); - -/* -----[ Exports ]----- */ - -exports.ast_walker = ast_walker; -exports.ast_mangle = ast_mangle; -exports.ast_squeeze = ast_squeeze; -exports.ast_lift_variables = ast_lift_variables; -exports.gen_code = gen_code; -exports.ast_add_scope = ast_add_scope; -exports.set_logger = function(logger) { warn = logger }; -exports.make_string = make_string; -exports.split_lines = split_lines; -exports.MAP = MAP; - -// keep this last! -exports.ast_squeeze_more = require("./squeeze-more").ast_squeeze_more; - -// Local variables: -// js-indent-level: 4 -// End: -}); -define('uglifyjs/index', ["require", "exports", "module", "./parse-js", "./process", "./consolidator"], function(require, exports, module) { -//convienence function(src, [options]); -function uglify(orig_code, options){ - options || (options = {}); - var jsp = uglify.parser; - var pro = uglify.uglify; - - var ast = jsp.parse(orig_code, options.strict_semicolons); // parse code and get the initial AST - ast = pro.ast_mangle(ast, options.mangle_options); // get a new AST with mangled names - ast = pro.ast_squeeze(ast, options.squeeze_options); // get an AST with compression optimizations - var final_code = pro.gen_code(ast, options.gen_options); // compressed code here - return final_code; -}; - -uglify.parser = require("./parse-js"); -uglify.uglify = require("./process"); -uglify.consolidator = require("./consolidator"); - -module.exports = uglify -});/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/array-set', function (require, exports, module) { - - var util = require('./util'); - - /** - * A data structure which is a combination of an array and a set. Adding a new - * member is O(1), testing for membership is O(1), and finding the index of an - * element is O(1). Removing elements from the set is not supported. Only - * strings are supported for membership. - */ - function ArraySet() { - this._array = []; - this._set = {}; - } - - /** - * Static method for creating ArraySet instances from an existing array. - */ - ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { - var set = new ArraySet(); - for (var i = 0, len = aArray.length; i < len; i++) { - set.add(aArray[i], aAllowDuplicates); - } - return set; - }; - - /** - * Add the given string to this set. - * - * @param String aStr - */ - ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { - var isDuplicate = this.has(aStr); - var idx = this._array.length; - if (!isDuplicate || aAllowDuplicates) { - this._array.push(aStr); - } - if (!isDuplicate) { - this._set[util.toSetString(aStr)] = idx; - } - }; - - /** - * Is the given string a member of this set? - * - * @param String aStr - */ - ArraySet.prototype.has = function ArraySet_has(aStr) { - return Object.prototype.hasOwnProperty.call(this._set, - util.toSetString(aStr)); - }; - - /** - * What is the index of the given string in the array? - * - * @param String aStr - */ - ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { - if (this.has(aStr)) { - return this._set[util.toSetString(aStr)]; - } - throw new Error('"' + aStr + '" is not in the set.'); - }; - - /** - * What is the element at the given index? - * - * @param Number aIdx - */ - ArraySet.prototype.at = function ArraySet_at(aIdx) { - if (aIdx >= 0 && aIdx < this._array.length) { - return this._array[aIdx]; - } - throw new Error('No element indexed by ' + aIdx); - }; - - /** - * Returns the array representation of this set (which has the proper indices - * indicated by indexOf). Note that this is a copy of the internal array used - * for storing the members so that no one can mess with internal state. - */ - ArraySet.prototype.toArray = function ArraySet_toArray() { - return this._array.slice(); - }; - - exports.ArraySet = ArraySet; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - * - * Based on the Base 64 VLQ implementation in Closure Compiler: - * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java - * - * Copyright 2011 The Closure Compiler Authors. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials provided - * with the distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -define('source-map/base64-vlq', function (require, exports, module) { - - var base64 = require('./base64'); - - // A single base 64 digit can contain 6 bits of data. For the base 64 variable - // length quantities we use in the source map spec, the first bit is the sign, - // the next four bits are the actual value, and the 6th bit is the - // continuation bit. The continuation bit tells us whether there are more - // digits in this value following this digit. - // - // Continuation - // | Sign - // | | - // V V - // 101011 - - var VLQ_BASE_SHIFT = 5; - - // binary: 100000 - var VLQ_BASE = 1 << VLQ_BASE_SHIFT; - - // binary: 011111 - var VLQ_BASE_MASK = VLQ_BASE - 1; - - // binary: 100000 - var VLQ_CONTINUATION_BIT = VLQ_BASE; - - /** - * Converts from a two-complement value to a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) - * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) - */ - function toVLQSigned(aValue) { - return aValue < 0 - ? ((-aValue) << 1) + 1 - : (aValue << 1) + 0; - } - - /** - * Converts to a two-complement value from a value where the sign bit is - * is placed in the least significant bit. For example, as decimals: - * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 - * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 - */ - function fromVLQSigned(aValue) { - var isNegative = (aValue & 1) === 1; - var shifted = aValue >> 1; - return isNegative - ? -shifted - : shifted; - } - - /** - * Returns the base 64 VLQ encoded value. - */ - exports.encode = function base64VLQ_encode(aValue) { - var encoded = ""; - var digit; - - var vlq = toVLQSigned(aValue); - - do { - digit = vlq & VLQ_BASE_MASK; - vlq >>>= VLQ_BASE_SHIFT; - if (vlq > 0) { - // There are still more digits in this value, so we must make sure the - // continuation bit is marked. - digit |= VLQ_CONTINUATION_BIT; - } - encoded += base64.encode(digit); - } while (vlq > 0); - - return encoded; - }; - - /** - * Decodes the next base 64 VLQ value from the given string and returns the - * value and the rest of the string. - */ - exports.decode = function base64VLQ_decode(aStr) { - var i = 0; - var strLen = aStr.length; - var result = 0; - var shift = 0; - var continuation, digit; - - do { - if (i >= strLen) { - throw new Error("Expected more digits in base 64 VLQ value."); - } - digit = base64.decode(aStr.charAt(i++)); - continuation = !!(digit & VLQ_CONTINUATION_BIT); - digit &= VLQ_BASE_MASK; - result = result + (digit << shift); - shift += VLQ_BASE_SHIFT; - } while (continuation); - - return { - value: fromVLQSigned(result), - rest: aStr.slice(i) - }; - }; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/base64', function (require, exports, module) { - - var charToIntMap = {}; - var intToCharMap = {}; - - 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' - .split('') - .forEach(function (ch, index) { - charToIntMap[ch] = index; - intToCharMap[index] = ch; - }); - - /** - * Encode an integer in the range of 0 to 63 to a single base 64 digit. - */ - exports.encode = function base64_encode(aNumber) { - if (aNumber in intToCharMap) { - return intToCharMap[aNumber]; - } - throw new TypeError("Must be between 0 and 63: " + aNumber); - }; - - /** - * Decode a single base 64 digit to an integer. - */ - exports.decode = function base64_decode(aChar) { - if (aChar in charToIntMap) { - return charToIntMap[aChar]; - } - throw new TypeError("Not a valid base 64 digit: " + aChar); - }; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/binary-search', function (require, exports, module) { - - /** - * Recursive implementation of binary search. - * - * @param aLow Indices here and lower do not contain the needle. - * @param aHigh Indices here and higher do not contain the needle. - * @param aNeedle The element being searched for. - * @param aHaystack The non-empty array being searched. - * @param aCompare Function which takes two elements and returns -1, 0, or 1. - */ - function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare) { - // This function terminates when one of the following is true: - // - // 1. We find the exact element we are looking for. - // - // 2. We did not find the exact element, but we can return the next - // closest element that is less than that element. - // - // 3. We did not find the exact element, and there is no next-closest - // element which is less than the one we are searching for, so we - // return null. - var mid = Math.floor((aHigh - aLow) / 2) + aLow; - var cmp = aCompare(aNeedle, aHaystack[mid], true); - if (cmp === 0) { - // Found the element we are looking for. - return aHaystack[mid]; - } - else if (cmp > 0) { - // aHaystack[mid] is greater than our needle. - if (aHigh - mid > 1) { - // The element is in the upper half. - return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare); - } - // We did not find an exact match, return the next closest one - // (termination case 2). - return aHaystack[mid]; - } - else { - // aHaystack[mid] is less than our needle. - if (mid - aLow > 1) { - // The element is in the lower half. - return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare); - } - // The exact needle element was not found in this haystack. Determine if - // we are in termination case (2) or (3) and return the appropriate thing. - return aLow < 0 - ? null - : aHaystack[aLow]; - } - } - - /** - * This is an implementation of binary search which will always try and return - * the next lowest value checked if there is no exact hit. This is because - * mappings between original and generated line/col pairs are single points, - * and there is an implicit region between each of them, so a miss just means - * that you aren't on the very start of a region. - * - * @param aNeedle The element you are looking for. - * @param aHaystack The array that is being searched. - * @param aCompare A function which takes the needle and an element in the - * array and returns -1, 0, or 1 depending on whether the needle is less - * than, equal to, or greater than the element, respectively. - */ - exports.search = function search(aNeedle, aHaystack, aCompare) { - return aHaystack.length > 0 - ? recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare) - : null; - }; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/source-map-consumer', function (require, exports, module) { - - var util = require('./util'); - var binarySearch = require('./binary-search'); - var ArraySet = require('./array-set').ArraySet; - var base64VLQ = require('./base64-vlq'); - - /** - * A SourceMapConsumer instance represents a parsed source map which we can - * query for information about the original file positions by giving it a file - * position in the generated source. - * - * The only parameter is the raw source map (either as a JSON string, or - * already parsed to an object). According to the spec, source maps have the - * following attributes: - * - * - version: Which version of the source map spec this map is following. - * - sources: An array of URLs to the original source files. - * - names: An array of identifiers which can be referrenced by individual mappings. - * - sourceRoot: Optional. The URL root from which all sources are relative. - * - sourcesContent: Optional. An array of contents of the original source files. - * - mappings: A string of base64 VLQs which contain the actual mappings. - * - file: The generated file this source map is associated with. - * - * Here is an example source map, taken from the source map spec[0]: - * - * { - * version : 3, - * file: "out.js", - * sourceRoot : "", - * sources: ["foo.js", "bar.js"], - * names: ["src", "maps", "are", "fun"], - * mappings: "AA,AB;;ABCDE;" - * } - * - * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# - */ - function SourceMapConsumer(aSourceMap) { - var sourceMap = aSourceMap; - if (typeof aSourceMap === 'string') { - sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); - } - - var version = util.getArg(sourceMap, 'version'); - var sources = util.getArg(sourceMap, 'sources'); - var names = util.getArg(sourceMap, 'names'); - var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); - var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); - var mappings = util.getArg(sourceMap, 'mappings'); - var file = util.getArg(sourceMap, 'file', null); - - if (version !== this._version) { - throw new Error('Unsupported version: ' + version); - } - - // Pass `true` below to allow duplicate names and sources. While source maps - // are intended to be compressed and deduplicated, the TypeScript compiler - // sometimes generates source maps with duplicates in them. See Github issue - // #72 and bugzil.la/889492. - this._names = ArraySet.fromArray(names, true); - this._sources = ArraySet.fromArray(sources, true); - this.sourceRoot = sourceRoot; - this.sourcesContent = sourcesContent; - this.file = file; - - // `this._generatedMappings` and `this._originalMappings` hold the parsed - // mapping coordinates from the source map's "mappings" attribute. Each - // object in the array is of the form - // - // { - // generatedLine: The line number in the generated code, - // generatedColumn: The column number in the generated code, - // source: The path to the original source file that generated this - // chunk of code, - // originalLine: The line number in the original source that - // corresponds to this chunk of generated code, - // originalColumn: The column number in the original source that - // corresponds to this chunk of generated code, - // name: The name of the original symbol which generated this chunk of - // code. - // } - // - // All properties except for `generatedLine` and `generatedColumn` can be - // `null`. - // - // `this._generatedMappings` is ordered by the generated positions. - // - // `this._originalMappings` is ordered by the original positions. - this._generatedMappings = []; - this._originalMappings = []; - this._parseMappings(mappings, sourceRoot); - } - - /** - * Create a SourceMapConsumer from a SourceMapGenerator. - * - * @param SourceMapGenerator aSourceMap - * The source map that will be consumed. - * @returns SourceMapConsumer - */ - SourceMapConsumer.fromSourceMap = - function SourceMapConsumer_fromSourceMap(aSourceMap) { - var smc = Object.create(SourceMapConsumer.prototype); - - smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); - smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); - smc.sourceRoot = aSourceMap._sourceRoot; - smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), - smc.sourceRoot); - smc.file = aSourceMap._file; - - smc._generatedMappings = aSourceMap._mappings.slice() - .sort(util.compareByGeneratedPositions); - smc._originalMappings = aSourceMap._mappings.slice() - .sort(util.compareByOriginalPositions); - - return smc; - }; - - /** - * The version of the source mapping spec that we are consuming. - */ - SourceMapConsumer.prototype._version = 3; - - /** - * The list of original sources. - */ - Object.defineProperty(SourceMapConsumer.prototype, 'sources', { - get: function () { - return this._sources.toArray().map(function (s) { - return this.sourceRoot ? util.join(this.sourceRoot, s) : s; - }, this); - } - }); - - /** - * Parse the mappings in a string in to a data structure which we can easily - * query (an ordered list in this._generatedMappings). - */ - SourceMapConsumer.prototype._parseMappings = - function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { - var generatedLine = 1; - var previousGeneratedColumn = 0; - var previousOriginalLine = 0; - var previousOriginalColumn = 0; - var previousSource = 0; - var previousName = 0; - var mappingSeparator = /^[,;]/; - var str = aStr; - var mapping; - var temp; - - while (str.length > 0) { - if (str.charAt(0) === ';') { - generatedLine++; - str = str.slice(1); - previousGeneratedColumn = 0; - } - else if (str.charAt(0) === ',') { - str = str.slice(1); - } - else { - mapping = {}; - mapping.generatedLine = generatedLine; - - // Generated column. - temp = base64VLQ.decode(str); - mapping.generatedColumn = previousGeneratedColumn + temp.value; - previousGeneratedColumn = mapping.generatedColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original source. - temp = base64VLQ.decode(str); - mapping.source = this._sources.at(previousSource + temp.value); - previousSource += temp.value; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source, but no line and column'); - } - - // Original line. - temp = base64VLQ.decode(str); - mapping.originalLine = previousOriginalLine + temp.value; - previousOriginalLine = mapping.originalLine; - // Lines are stored 0-based - mapping.originalLine += 1; - str = temp.rest; - if (str.length === 0 || mappingSeparator.test(str.charAt(0))) { - throw new Error('Found a source and line, but no column'); - } - - // Original column. - temp = base64VLQ.decode(str); - mapping.originalColumn = previousOriginalColumn + temp.value; - previousOriginalColumn = mapping.originalColumn; - str = temp.rest; - - if (str.length > 0 && !mappingSeparator.test(str.charAt(0))) { - // Original name. - temp = base64VLQ.decode(str); - mapping.name = this._names.at(previousName + temp.value); - previousName += temp.value; - str = temp.rest; - } - } - - this._generatedMappings.push(mapping); - if (typeof mapping.originalLine === 'number') { - this._originalMappings.push(mapping); - } - } - } - - this._originalMappings.sort(util.compareByOriginalPositions); - }; - - /** - * Find the mapping that best matches the hypothetical "needle" mapping that - * we are searching for in the given "haystack" of mappings. - */ - SourceMapConsumer.prototype._findMapping = - function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, - aColumnName, aComparator) { - // To return the position we are searching for, we must first find the - // mapping for the given position and then return the opposite position it - // points to. Because the mappings are sorted, we can use binary search to - // find the best mapping. - - if (aNeedle[aLineName] <= 0) { - throw new TypeError('Line must be greater than or equal to 1, got ' - + aNeedle[aLineName]); - } - if (aNeedle[aColumnName] < 0) { - throw new TypeError('Column must be greater than or equal to 0, got ' - + aNeedle[aColumnName]); - } - - return binarySearch.search(aNeedle, aMappings, aComparator); - }; - - /** - * Returns the original source, line, and column information for the generated - * source's line and column positions provided. The only argument is an object - * with the following properties: - * - * - line: The line number in the generated source. - * - column: The column number in the generated source. - * - * and an object is returned with the following properties: - * - * - source: The original source file, or null. - * - line: The line number in the original source, or null. - * - column: The column number in the original source, or null. - * - name: The original identifier, or null. - */ - SourceMapConsumer.prototype.originalPositionFor = - function SourceMapConsumer_originalPositionFor(aArgs) { - var needle = { - generatedLine: util.getArg(aArgs, 'line'), - generatedColumn: util.getArg(aArgs, 'column') - }; - - var mapping = this._findMapping(needle, - this._generatedMappings, - "generatedLine", - "generatedColumn", - util.compareByGeneratedPositions); - - if (mapping) { - var source = util.getArg(mapping, 'source', null); - if (source && this.sourceRoot) { - source = util.join(this.sourceRoot, source); - } - return { - source: source, - line: util.getArg(mapping, 'originalLine', null), - column: util.getArg(mapping, 'originalColumn', null), - name: util.getArg(mapping, 'name', null) - }; - } - - return { - source: null, - line: null, - column: null, - name: null - }; - }; - - /** - * Returns the original source content. The only argument is the url of the - * original source file. Returns null if no original source content is - * availible. - */ - SourceMapConsumer.prototype.sourceContentFor = - function SourceMapConsumer_sourceContentFor(aSource) { - if (!this.sourcesContent) { - return null; - } - - if (this.sourceRoot) { - aSource = util.relative(this.sourceRoot, aSource); - } - - if (this._sources.has(aSource)) { - return this.sourcesContent[this._sources.indexOf(aSource)]; - } - - var url; - if (this.sourceRoot - && (url = util.urlParse(this.sourceRoot))) { - // XXX: file:// URIs and absolute paths lead to unexpected behavior for - // many users. We can help them out when they expect file:// URIs to - // behave like it would if they were running a local HTTP server. See - // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. - var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); - if (url.scheme == "file" - && this._sources.has(fileUriAbsPath)) { - return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] - } - - if ((!url.path || url.path == "/") - && this._sources.has("/" + aSource)) { - return this.sourcesContent[this._sources.indexOf("/" + aSource)]; - } - } - - throw new Error('"' + aSource + '" is not in the SourceMap.'); - }; - - /** - * Returns the generated line and column information for the original source, - * line, and column positions provided. The only argument is an object with - * the following properties: - * - * - source: The filename of the original source. - * - line: The line number in the original source. - * - column: The column number in the original source. - * - * and an object is returned with the following properties: - * - * - line: The line number in the generated source, or null. - * - column: The column number in the generated source, or null. - */ - SourceMapConsumer.prototype.generatedPositionFor = - function SourceMapConsumer_generatedPositionFor(aArgs) { - var needle = { - source: util.getArg(aArgs, 'source'), - originalLine: util.getArg(aArgs, 'line'), - originalColumn: util.getArg(aArgs, 'column') - }; - - if (this.sourceRoot) { - needle.source = util.relative(this.sourceRoot, needle.source); - } - - var mapping = this._findMapping(needle, - this._originalMappings, - "originalLine", - "originalColumn", - util.compareByOriginalPositions); - - if (mapping) { - return { - line: util.getArg(mapping, 'generatedLine', null), - column: util.getArg(mapping, 'generatedColumn', null) - }; - } - - return { - line: null, - column: null - }; - }; - - SourceMapConsumer.GENERATED_ORDER = 1; - SourceMapConsumer.ORIGINAL_ORDER = 2; - - /** - * Iterate over each mapping between an original source/line/column and a - * generated line/column in this source map. - * - * @param Function aCallback - * The function that is called with each mapping. - * @param Object aContext - * Optional. If specified, this object will be the value of `this` every - * time that `aCallback` is called. - * @param aOrder - * Either `SourceMapConsumer.GENERATED_ORDER` or - * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to - * iterate over the mappings sorted by the generated file's line/column - * order or the original's source/line/column order, respectively. Defaults to - * `SourceMapConsumer.GENERATED_ORDER`. - */ - SourceMapConsumer.prototype.eachMapping = - function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { - var context = aContext || null; - var order = aOrder || SourceMapConsumer.GENERATED_ORDER; - - var mappings; - switch (order) { - case SourceMapConsumer.GENERATED_ORDER: - mappings = this._generatedMappings; - break; - case SourceMapConsumer.ORIGINAL_ORDER: - mappings = this._originalMappings; - break; - default: - throw new Error("Unknown order of iteration."); - } - - var sourceRoot = this.sourceRoot; - mappings.map(function (mapping) { - var source = mapping.source; - if (source && sourceRoot) { - source = util.join(sourceRoot, source); - } - return { - source: source, - generatedLine: mapping.generatedLine, - generatedColumn: mapping.generatedColumn, - originalLine: mapping.originalLine, - originalColumn: mapping.originalColumn, - name: mapping.name - }; - }).forEach(aCallback, context); - }; - - exports.SourceMapConsumer = SourceMapConsumer; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/source-map-generator', function (require, exports, module) { - - var base64VLQ = require('./base64-vlq'); - var util = require('./util'); - var ArraySet = require('./array-set').ArraySet; - - /** - * An instance of the SourceMapGenerator represents a source map which is - * being built incrementally. To create a new one, you must pass an object - * with the following properties: - * - * - file: The filename of the generated source. - * - sourceRoot: An optional root for all URLs in this source map. - */ - function SourceMapGenerator(aArgs) { - this._file = util.getArg(aArgs, 'file'); - this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); - this._sources = new ArraySet(); - this._names = new ArraySet(); - this._mappings = []; - this._sourcesContents = null; - } - - SourceMapGenerator.prototype._version = 3; - - /** - * Creates a new SourceMapGenerator based on a SourceMapConsumer - * - * @param aSourceMapConsumer The SourceMap. - */ - SourceMapGenerator.fromSourceMap = - function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { - var sourceRoot = aSourceMapConsumer.sourceRoot; - var generator = new SourceMapGenerator({ - file: aSourceMapConsumer.file, - sourceRoot: sourceRoot - }); - aSourceMapConsumer.eachMapping(function (mapping) { - var newMapping = { - generated: { - line: mapping.generatedLine, - column: mapping.generatedColumn - } - }; - - if (mapping.source) { - newMapping.source = mapping.source; - if (sourceRoot) { - newMapping.source = util.relative(sourceRoot, newMapping.source); - } - - newMapping.original = { - line: mapping.originalLine, - column: mapping.originalColumn - }; - - if (mapping.name) { - newMapping.name = mapping.name; - } - } - - generator.addMapping(newMapping); - }); - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - generator.setSourceContent(sourceFile, content); - } - }); - return generator; - }; - - /** - * Add a single mapping from original source line and column to the generated - * source's line and column for this source map being created. The mapping - * object should have the following properties: - * - * - generated: An object with the generated line and column positions. - * - original: An object with the original line and column positions. - * - source: The original source file (relative to the sourceRoot). - * - name: An optional original token name for this mapping. - */ - SourceMapGenerator.prototype.addMapping = - function SourceMapGenerator_addMapping(aArgs) { - var generated = util.getArg(aArgs, 'generated'); - var original = util.getArg(aArgs, 'original', null); - var source = util.getArg(aArgs, 'source', null); - var name = util.getArg(aArgs, 'name', null); - - this._validateMapping(generated, original, source, name); - - if (source && !this._sources.has(source)) { - this._sources.add(source); - } - - if (name && !this._names.has(name)) { - this._names.add(name); - } - - this._mappings.push({ - generatedLine: generated.line, - generatedColumn: generated.column, - originalLine: original != null && original.line, - originalColumn: original != null && original.column, - source: source, - name: name - }); - }; - - /** - * Set the source content for a source file. - */ - SourceMapGenerator.prototype.setSourceContent = - function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { - var source = aSourceFile; - if (this._sourceRoot) { - source = util.relative(this._sourceRoot, source); - } - - if (aSourceContent !== null) { - // Add the source content to the _sourcesContents map. - // Create a new _sourcesContents map if the property is null. - if (!this._sourcesContents) { - this._sourcesContents = {}; - } - this._sourcesContents[util.toSetString(source)] = aSourceContent; - } else { - // Remove the source file from the _sourcesContents map. - // If the _sourcesContents map is empty, set the property to null. - delete this._sourcesContents[util.toSetString(source)]; - if (Object.keys(this._sourcesContents).length === 0) { - this._sourcesContents = null; - } - } - }; - - /** - * Applies the mappings of a sub-source-map for a specific source file to the - * source map being generated. Each mapping to the supplied source file is - * rewritten using the supplied source map. Note: The resolution for the - * resulting mappings is the minimium of this map and the supplied map. - * - * @param aSourceMapConsumer The source map to be applied. - * @param aSourceFile Optional. The filename of the source file. - * If omitted, SourceMapConsumer's file property will be used. - */ - SourceMapGenerator.prototype.applySourceMap = - function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile) { - // If aSourceFile is omitted, we will use the file property of the SourceMap - if (!aSourceFile) { - aSourceFile = aSourceMapConsumer.file; - } - var sourceRoot = this._sourceRoot; - // Make "aSourceFile" relative if an absolute Url is passed. - if (sourceRoot) { - aSourceFile = util.relative(sourceRoot, aSourceFile); - } - // Applying the SourceMap can add and remove items from the sources and - // the names array. - var newSources = new ArraySet(); - var newNames = new ArraySet(); - - // Find mappings for the "aSourceFile" - this._mappings.forEach(function (mapping) { - if (mapping.source === aSourceFile && mapping.originalLine) { - // Check if it can be mapped by the source map, then update the mapping. - var original = aSourceMapConsumer.originalPositionFor({ - line: mapping.originalLine, - column: mapping.originalColumn - }); - if (original.source !== null) { - // Copy mapping - if (sourceRoot) { - mapping.source = util.relative(sourceRoot, original.source); - } else { - mapping.source = original.source; - } - mapping.originalLine = original.line; - mapping.originalColumn = original.column; - if (original.name !== null && mapping.name !== null) { - // Only use the identifier name if it's an identifier - // in both SourceMaps - mapping.name = original.name; - } - } - } - - var source = mapping.source; - if (source && !newSources.has(source)) { - newSources.add(source); - } - - var name = mapping.name; - if (name && !newNames.has(name)) { - newNames.add(name); - } - - }, this); - this._sources = newSources; - this._names = newNames; - - // Copy sourcesContents of applied map. - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - if (sourceRoot) { - sourceFile = util.relative(sourceRoot, sourceFile); - } - this.setSourceContent(sourceFile, content); - } - }, this); - }; - - /** - * A mapping can have one of the three levels of data: - * - * 1. Just the generated position. - * 2. The Generated position, original position, and original source. - * 3. Generated and original position, original source, as well as a name - * token. - * - * To maintain consistency, we validate that any new mapping being added falls - * in to one of these categories. - */ - SourceMapGenerator.prototype._validateMapping = - function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, - aName) { - if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aGenerated.line > 0 && aGenerated.column >= 0 - && !aOriginal && !aSource && !aName) { - // Case 1. - return; - } - else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated - && aOriginal && 'line' in aOriginal && 'column' in aOriginal - && aGenerated.line > 0 && aGenerated.column >= 0 - && aOriginal.line > 0 && aOriginal.column >= 0 - && aSource) { - // Cases 2 and 3. - return; - } - else { - throw new Error('Invalid mapping: ' + JSON.stringify({ - generated: aGenerated, - source: aSource, - orginal: aOriginal, - name: aName - })); - } - }; - - /** - * Serialize the accumulated mappings in to the stream of base 64 VLQs - * specified by the source map format. - */ - SourceMapGenerator.prototype._serializeMappings = - function SourceMapGenerator_serializeMappings() { - var previousGeneratedColumn = 0; - var previousGeneratedLine = 1; - var previousOriginalColumn = 0; - var previousOriginalLine = 0; - var previousName = 0; - var previousSource = 0; - var result = ''; - var mapping; - - // The mappings must be guaranteed to be in sorted order before we start - // serializing them or else the generated line numbers (which are defined - // via the ';' separators) will be all messed up. Note: it might be more - // performant to maintain the sorting as we insert them, rather than as we - // serialize them, but the big O is the same either way. - this._mappings.sort(util.compareByGeneratedPositions); - - for (var i = 0, len = this._mappings.length; i < len; i++) { - mapping = this._mappings[i]; - - if (mapping.generatedLine !== previousGeneratedLine) { - previousGeneratedColumn = 0; - while (mapping.generatedLine !== previousGeneratedLine) { - result += ';'; - previousGeneratedLine++; - } - } - else { - if (i > 0) { - if (!util.compareByGeneratedPositions(mapping, this._mappings[i - 1])) { - continue; - } - result += ','; - } - } - - result += base64VLQ.encode(mapping.generatedColumn - - previousGeneratedColumn); - previousGeneratedColumn = mapping.generatedColumn; - - if (mapping.source) { - result += base64VLQ.encode(this._sources.indexOf(mapping.source) - - previousSource); - previousSource = this._sources.indexOf(mapping.source); - - // lines are stored 0-based in SourceMap spec version 3 - result += base64VLQ.encode(mapping.originalLine - 1 - - previousOriginalLine); - previousOriginalLine = mapping.originalLine - 1; - - result += base64VLQ.encode(mapping.originalColumn - - previousOriginalColumn); - previousOriginalColumn = mapping.originalColumn; - - if (mapping.name) { - result += base64VLQ.encode(this._names.indexOf(mapping.name) - - previousName); - previousName = this._names.indexOf(mapping.name); - } - } - } - - return result; - }; - - SourceMapGenerator.prototype._generateSourcesContent = - function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { - return aSources.map(function (source) { - if (!this._sourcesContents) { - return null; - } - if (aSourceRoot) { - source = util.relative(aSourceRoot, source); - } - var key = util.toSetString(source); - return Object.prototype.hasOwnProperty.call(this._sourcesContents, - key) - ? this._sourcesContents[key] - : null; - }, this); - }; - - /** - * Externalize the source map. - */ - SourceMapGenerator.prototype.toJSON = - function SourceMapGenerator_toJSON() { - var map = { - version: this._version, - file: this._file, - sources: this._sources.toArray(), - names: this._names.toArray(), - mappings: this._serializeMappings() - }; - if (this._sourceRoot) { - map.sourceRoot = this._sourceRoot; - } - if (this._sourcesContents) { - map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); - } - - return map; - }; - - /** - * Render the source map being generated to a string. - */ - SourceMapGenerator.prototype.toString = - function SourceMapGenerator_toString() { - return JSON.stringify(this); - }; - - exports.SourceMapGenerator = SourceMapGenerator; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/source-node', function (require, exports, module) { - - var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; - var util = require('./util'); - - /** - * SourceNodes provide a way to abstract over interpolating/concatenating - * snippets of generated JavaScript source code while maintaining the line and - * column information associated with the original source code. - * - * @param aLine The original line number. - * @param aColumn The original column number. - * @param aSource The original source's filename. - * @param aChunks Optional. An array of strings which are snippets of - * generated JS, or other SourceNodes. - * @param aName The original identifier. - */ - function SourceNode(aLine, aColumn, aSource, aChunks, aName) { - this.children = []; - this.sourceContents = {}; - this.line = aLine === undefined ? null : aLine; - this.column = aColumn === undefined ? null : aColumn; - this.source = aSource === undefined ? null : aSource; - this.name = aName === undefined ? null : aName; - if (aChunks != null) this.add(aChunks); - } - - /** - * Creates a SourceNode from generated code and a SourceMapConsumer. - * - * @param aGeneratedCode The generated code - * @param aSourceMapConsumer The SourceMap for the generated code - */ - SourceNode.fromStringWithSourceMap = - function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer) { - // The SourceNode we want to fill with the generated code - // and the SourceMap - var node = new SourceNode(); - - // The generated code - // Processed fragments are removed from this array. - var remainingLines = aGeneratedCode.split('\n'); - - // We need to remember the position of "remainingLines" - var lastGeneratedLine = 1, lastGeneratedColumn = 0; - - // The generate SourceNodes we need a code range. - // To extract it current and last mapping is used. - // Here we store the last mapping. - var lastMapping = null; - - aSourceMapConsumer.eachMapping(function (mapping) { - if (lastMapping === null) { - // We add the generated code until the first mapping - // to the SourceNode without any mapping. - // Each line is added as separate string. - while (lastGeneratedLine < mapping.generatedLine) { - node.add(remainingLines.shift() + "\n"); - lastGeneratedLine++; - } - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - node.add(nextLine.substr(0, mapping.generatedColumn)); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - } else { - // We add the code from "lastMapping" to "mapping": - // First check if there is a new line in between. - if (lastGeneratedLine < mapping.generatedLine) { - var code = ""; - // Associate full lines with "lastMapping" - do { - code += remainingLines.shift() + "\n"; - lastGeneratedLine++; - lastGeneratedColumn = 0; - } while (lastGeneratedLine < mapping.generatedLine); - // When we reached the correct line, we add code until we - // reach the correct column too. - if (lastGeneratedColumn < mapping.generatedColumn) { - var nextLine = remainingLines[0]; - code += nextLine.substr(0, mapping.generatedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn); - lastGeneratedColumn = mapping.generatedColumn; - } - // Create the SourceNode. - addMappingWithCode(lastMapping, code); - } else { - // There is no new line in between. - // Associate the code between "lastGeneratedColumn" and - // "mapping.generatedColumn" with "lastMapping" - var nextLine = remainingLines[0]; - var code = nextLine.substr(0, mapping.generatedColumn - - lastGeneratedColumn); - remainingLines[0] = nextLine.substr(mapping.generatedColumn - - lastGeneratedColumn); - lastGeneratedColumn = mapping.generatedColumn; - addMappingWithCode(lastMapping, code); - } - } - lastMapping = mapping; - }, this); - // We have processed all mappings. - // Associate the remaining code in the current line with "lastMapping" - // and add the remaining lines without any mapping - addMappingWithCode(lastMapping, remainingLines.join("\n")); - - // Copy sourcesContent into SourceNode - aSourceMapConsumer.sources.forEach(function (sourceFile) { - var content = aSourceMapConsumer.sourceContentFor(sourceFile); - if (content) { - node.setSourceContent(sourceFile, content); - } - }); - - return node; - - function addMappingWithCode(mapping, code) { - if (mapping === null || mapping.source === undefined) { - node.add(code); - } else { - node.add(new SourceNode(mapping.originalLine, - mapping.originalColumn, - mapping.source, - code, - mapping.name)); - } - } - }; - - /** - * Add a chunk of generated JS to this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.add = function SourceNode_add(aChunk) { - if (Array.isArray(aChunk)) { - aChunk.forEach(function (chunk) { - this.add(chunk); - }, this); - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - if (aChunk) { - this.children.push(aChunk); - } - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Add a chunk of generated JS to the beginning of this source node. - * - * @param aChunk A string snippet of generated JS code, another instance of - * SourceNode, or an array where each member is one of those things. - */ - SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { - if (Array.isArray(aChunk)) { - for (var i = aChunk.length-1; i >= 0; i--) { - this.prepend(aChunk[i]); - } - } - else if (aChunk instanceof SourceNode || typeof aChunk === "string") { - this.children.unshift(aChunk); - } - else { - throw new TypeError( - "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk - ); - } - return this; - }; - - /** - * Walk over the tree of JS snippets in this node and its children. The - * walking function is called once for each snippet of JS and is passed that - * snippet and the its original associated source's line/column location. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walk = function SourceNode_walk(aFn) { - var chunk; - for (var i = 0, len = this.children.length; i < len; i++) { - chunk = this.children[i]; - if (chunk instanceof SourceNode) { - chunk.walk(aFn); - } - else { - if (chunk !== '') { - aFn(chunk, { source: this.source, - line: this.line, - column: this.column, - name: this.name }); - } - } - } - }; - - /** - * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between - * each of `this.children`. - * - * @param aSep The separator. - */ - SourceNode.prototype.join = function SourceNode_join(aSep) { - var newChildren; - var i; - var len = this.children.length; - if (len > 0) { - newChildren = []; - for (i = 0; i < len-1; i++) { - newChildren.push(this.children[i]); - newChildren.push(aSep); - } - newChildren.push(this.children[i]); - this.children = newChildren; - } - return this; - }; - - /** - * Call String.prototype.replace on the very right-most source snippet. Useful - * for trimming whitespace from the end of a source node, etc. - * - * @param aPattern The pattern to replace. - * @param aReplacement The thing to replace the pattern with. - */ - SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { - var lastChild = this.children[this.children.length - 1]; - if (lastChild instanceof SourceNode) { - lastChild.replaceRight(aPattern, aReplacement); - } - else if (typeof lastChild === 'string') { - this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); - } - else { - this.children.push(''.replace(aPattern, aReplacement)); - } - return this; - }; - - /** - * Set the source content for a source file. This will be added to the SourceMapGenerator - * in the sourcesContent field. - * - * @param aSourceFile The filename of the source file - * @param aSourceContent The content of the source file - */ - SourceNode.prototype.setSourceContent = - function SourceNode_setSourceContent(aSourceFile, aSourceContent) { - this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; - }; - - /** - * Walk over the tree of SourceNodes. The walking function is called for each - * source file content and is passed the filename and source content. - * - * @param aFn The traversal function. - */ - SourceNode.prototype.walkSourceContents = - function SourceNode_walkSourceContents(aFn) { - for (var i = 0, len = this.children.length; i < len; i++) { - if (this.children[i] instanceof SourceNode) { - this.children[i].walkSourceContents(aFn); - } - } - - var sources = Object.keys(this.sourceContents); - for (var i = 0, len = sources.length; i < len; i++) { - aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); - } - }; - - /** - * Return the string representation of this source node. Walks over the tree - * and concatenates all the various snippets together to one string. - */ - SourceNode.prototype.toString = function SourceNode_toString() { - var str = ""; - this.walk(function (chunk) { - str += chunk; - }); - return str; - }; - - /** - * Returns the string representation of this source node along with a source - * map. - */ - SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { - var generated = { - code: "", - line: 1, - column: 0 - }; - var map = new SourceMapGenerator(aArgs); - var sourceMappingActive = false; - var lastOriginalSource = null; - var lastOriginalLine = null; - var lastOriginalColumn = null; - var lastOriginalName = null; - this.walk(function (chunk, original) { - generated.code += chunk; - if (original.source !== null - && original.line !== null - && original.column !== null) { - if(lastOriginalSource !== original.source - || lastOriginalLine !== original.line - || lastOriginalColumn !== original.column - || lastOriginalName !== original.name) { - map.addMapping({ - source: original.source, - original: { - line: original.line, - column: original.column - }, - generated: { - line: generated.line, - column: generated.column - }, - name: original.name - }); - } - lastOriginalSource = original.source; - lastOriginalLine = original.line; - lastOriginalColumn = original.column; - lastOriginalName = original.name; - sourceMappingActive = true; - } else if (sourceMappingActive) { - map.addMapping({ - generated: { - line: generated.line, - column: generated.column - } - }); - lastOriginalSource = null; - sourceMappingActive = false; - } - chunk.split('').forEach(function (ch) { - if (ch === '\n') { - generated.line++; - generated.column = 0; - } else { - generated.column++; - } - }); - }); - this.walkSourceContents(function (sourceFile, sourceContent) { - map.setSourceContent(sourceFile, sourceContent); - }); - - return { code: generated.code, map: map }; - }; - - exports.SourceNode = SourceNode; - -}); -/* -*- Mode: js; js-indent-level: 2; -*- */ -/* - * Copyright 2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE or: - * http://opensource.org/licenses/BSD-3-Clause - */ - -define('source-map/util', function (require, exports, module) { - - /** - * This is a helper function for getting values from parameter/options - * objects. - * - * @param args The object we are extracting values from - * @param name The name of the property we are getting. - * @param defaultValue An optional value to return if the property is missing - * from the object. If this is not specified and the property is missing, an - * error will be thrown. - */ - function getArg(aArgs, aName, aDefaultValue) { - if (aName in aArgs) { - return aArgs[aName]; - } else if (arguments.length === 3) { - return aDefaultValue; - } else { - throw new Error('"' + aName + '" is a required argument.'); - } - } - exports.getArg = getArg; - - var urlRegexp = /([\w+\-.]+):\/\/((\w+:\w+)@)?([\w.]+)?(:(\d+))?(\S+)?/; - var dataUrlRegexp = /^data:.+\,.+/; - - function urlParse(aUrl) { - var match = aUrl.match(urlRegexp); - if (!match) { - return null; - } - return { - scheme: match[1], - auth: match[3], - host: match[4], - port: match[6], - path: match[7] - }; - } - exports.urlParse = urlParse; - - function urlGenerate(aParsedUrl) { - var url = aParsedUrl.scheme + "://"; - if (aParsedUrl.auth) { - url += aParsedUrl.auth + "@" - } - if (aParsedUrl.host) { - url += aParsedUrl.host; - } - if (aParsedUrl.port) { - url += ":" + aParsedUrl.port - } - if (aParsedUrl.path) { - url += aParsedUrl.path; - } - return url; - } - exports.urlGenerate = urlGenerate; - - function join(aRoot, aPath) { - var url; - - if (aPath.match(urlRegexp) || aPath.match(dataUrlRegexp)) { - return aPath; - } - - if (aPath.charAt(0) === '/' && (url = urlParse(aRoot))) { - url.path = aPath; - return urlGenerate(url); - } - - return aRoot.replace(/\/$/, '') + '/' + aPath; - } - exports.join = join; - - /** - * Because behavior goes wacky when you set `__proto__` on objects, we - * have to prefix all the strings in our set with an arbitrary character. - * - * See https://github.com/mozilla/source-map/pull/31 and - * https://github.com/mozilla/source-map/issues/30 - * - * @param String aStr - */ - function toSetString(aStr) { - return '$' + aStr; - } - exports.toSetString = toSetString; - - function fromSetString(aStr) { - return aStr.substr(1); - } - exports.fromSetString = fromSetString; - - function relative(aRoot, aPath) { - aRoot = aRoot.replace(/\/$/, ''); - - var url = urlParse(aRoot); - if (aPath.charAt(0) == "/" && url && url.path == "/") { - return aPath.slice(1); - } - - return aPath.indexOf(aRoot + '/') === 0 - ? aPath.substr(aRoot.length + 1) - : aPath; - } - exports.relative = relative; - - function strcmp(aStr1, aStr2) { - var s1 = aStr1 || ""; - var s2 = aStr2 || ""; - return (s1 > s2) - (s1 < s2); - } - - /** - * Comparator between two mappings where the original positions are compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same original source/line/column, but different generated - * line and column the same. Useful when searching for a mapping with a - * stubbed out mapping. - */ - function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { - var cmp; - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp || onlyCompareOriginal) { - return cmp; - } - - cmp = strcmp(mappingA.name, mappingB.name); - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - return mappingA.generatedColumn - mappingB.generatedColumn; - }; - exports.compareByOriginalPositions = compareByOriginalPositions; - - /** - * Comparator between two mappings where the generated positions are - * compared. - * - * Optionally pass in `true` as `onlyCompareGenerated` to consider two - * mappings with the same generated line and column, but different - * source/name/original line and column the same. Useful when searching for a - * mapping with a stubbed out mapping. - */ - function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { - var cmp; - - cmp = mappingA.generatedLine - mappingB.generatedLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.generatedColumn - mappingB.generatedColumn; - if (cmp || onlyCompareGenerated) { - return cmp; - } - - cmp = strcmp(mappingA.source, mappingB.source); - if (cmp) { - return cmp; - } - - cmp = mappingA.originalLine - mappingB.originalLine; - if (cmp) { - return cmp; - } - - cmp = mappingA.originalColumn - mappingB.originalColumn; - if (cmp) { - return cmp; - } - - return strcmp(mappingA.name, mappingB.name); - }; - exports.compareByGeneratedPositions = compareByGeneratedPositions; - -}); -define('source-map', function (require, exports, module) { - -/* - * Copyright 2009-2011 Mozilla Foundation and contributors - * Licensed under the New BSD license. See LICENSE.txt or: - * http://opensource.org/licenses/BSD-3-Clause - */ -exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; -exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; -exports.SourceNode = require('./source-map/source-node').SourceNode; - -}); - -//Distributed under the BSD license: -//Copyright 2012 (c) Mihai Bazon -define('uglifyjs2', ['exports', 'source-map', 'logger', 'env!env/file'], function (exports, MOZ_SourceMap, logger, rjsFile) { -(function(exports, global) { - global["UglifyJS"] = exports; - "use strict"; - function array_to_hash(a) { - var ret = Object.create(null); - for (var i = 0; i < a.length; ++i) ret[a[i]] = true; - return ret; - } - function slice(a, start) { - return Array.prototype.slice.call(a, start || 0); - } - function characters(str) { - return str.split(""); - } - function member(name, array) { - for (var i = array.length; --i >= 0; ) if (array[i] == name) return true; - return false; - } - function find_if(func, array) { - for (var i = 0, n = array.length; i < n; ++i) { - if (func(array[i])) return array[i]; - } - } - function repeat_string(str, i) { - if (i <= 0) return ""; - if (i == 1) return str; - var d = repeat_string(str, i >> 1); - d += d; - if (i & 1) d += str; - return d; - } - function DefaultsError(msg, defs) { - this.msg = msg; - this.defs = defs; - } - function defaults(args, defs, croak) { - if (args === true) args = {}; - var ret = args || {}; - if (croak) for (var i in ret) if (ret.hasOwnProperty(i) && !defs.hasOwnProperty(i)) throw new DefaultsError("`" + i + "` is not a supported option", defs); - for (var i in defs) if (defs.hasOwnProperty(i)) { - ret[i] = args && args.hasOwnProperty(i) ? args[i] : defs[i]; - } - return ret; - } - function merge(obj, ext) { - for (var i in ext) if (ext.hasOwnProperty(i)) { - obj[i] = ext[i]; - } - return obj; - } - function noop() {} - var MAP = function() { - function MAP(a, f, backwards) { - var ret = [], top = [], i; - function doit() { - var val = f(a[i], i); - var is_last = val instanceof Last; - if (is_last) val = val.v; - if (val instanceof AtTop) { - val = val.v; - if (val instanceof Splice) { - top.push.apply(top, backwards ? val.v.slice().reverse() : val.v); - } else { - top.push(val); - } - } else if (val !== skip) { - if (val instanceof Splice) { - ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); - } else { - ret.push(val); - } - } - return is_last; - } - if (a instanceof Array) { - if (backwards) { - for (i = a.length; --i >= 0; ) if (doit()) break; - ret.reverse(); - top.reverse(); - } else { - for (i = 0; i < a.length; ++i) if (doit()) break; - } - } else { - for (i in a) if (a.hasOwnProperty(i)) if (doit()) break; - } - return top.concat(ret); - } - MAP.at_top = function(val) { - return new AtTop(val); - }; - MAP.splice = function(val) { - return new Splice(val); - }; - MAP.last = function(val) { - return new Last(val); - }; - var skip = MAP.skip = {}; - function AtTop(val) { - this.v = val; - } - function Splice(val) { - this.v = val; - } - function Last(val) { - this.v = val; - } - return MAP; - }(); - function push_uniq(array, el) { - if (array.indexOf(el) < 0) array.push(el); - } - function string_template(text, props) { - return text.replace(/\{(.+?)\}/g, function(str, p) { - return props[p]; - }); - } - function remove(array, el) { - for (var i = array.length; --i >= 0; ) { - if (array[i] === el) array.splice(i, 1); - } - } - function mergeSort(array, cmp) { - if (array.length < 2) return array.slice(); - function merge(a, b) { - var r = [], ai = 0, bi = 0, i = 0; - while (ai < a.length && bi < b.length) { - cmp(a[ai], b[bi]) <= 0 ? r[i++] = a[ai++] : r[i++] = b[bi++]; - } - if (ai < a.length) r.push.apply(r, a.slice(ai)); - if (bi < b.length) r.push.apply(r, b.slice(bi)); - return r; - } - function _ms(a) { - if (a.length <= 1) return a; - var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m); - left = _ms(left); - right = _ms(right); - return merge(left, right); - } - return _ms(array); - } - function set_difference(a, b) { - return a.filter(function(el) { - return b.indexOf(el) < 0; - }); - } - function set_intersection(a, b) { - return a.filter(function(el) { - return b.indexOf(el) >= 0; - }); - } - function makePredicate(words) { - if (!(words instanceof Array)) words = words.split(" "); - var f = "", cats = []; - out: for (var i = 0; i < words.length; ++i) { - for (var j = 0; j < cats.length; ++j) if (cats[j][0].length == words[i].length) { - cats[j].push(words[i]); - continue out; - } - cats.push([ words[i] ]); - } - function compareTo(arr) { - if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; - f += "switch(str){"; - for (var i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":"; - f += "return true}return false;"; - } - if (cats.length > 3) { - cats.sort(function(a, b) { - return b.length - a.length; - }); - f += "switch(str.length){"; - for (var i = 0; i < cats.length; ++i) { - var cat = cats[i]; - f += "case " + cat[0].length + ":"; - compareTo(cat); - } - f += "}"; - } else { - compareTo(words); - } - return new Function("str", f); - } - function all(array, predicate) { - for (var i = array.length; --i >= 0; ) if (!predicate(array[i])) return false; - return true; - } - function Dictionary() { - this._values = Object.create(null); - this._size = 0; - } - Dictionary.prototype = { - set: function(key, val) { - if (!this.has(key)) ++this._size; - this._values["$" + key] = val; - return this; - }, - add: function(key, val) { - if (this.has(key)) { - this.get(key).push(val); - } else { - this.set(key, [ val ]); - } - return this; - }, - get: function(key) { - return this._values["$" + key]; - }, - del: function(key) { - if (this.has(key)) { - --this._size; - delete this._values["$" + key]; - } - return this; - }, - has: function(key) { - return "$" + key in this._values; - }, - each: function(f) { - for (var i in this._values) f(this._values[i], i.substr(1)); - }, - size: function() { - return this._size; - }, - map: function(f) { - var ret = []; - for (var i in this._values) ret.push(f(this._values[i], i.substr(1))); - return ret; - } - }; - "use strict"; - function DEFNODE(type, props, methods, base) { - if (arguments.length < 4) base = AST_Node; - if (!props) props = []; else props = props.split(/\s+/); - var self_props = props; - if (base && base.PROPS) props = props.concat(base.PROPS); - var code = "return function AST_" + type + "(props){ if (props) { "; - for (var i = props.length; --i >= 0; ) { - code += "this." + props[i] + " = props." + props[i] + ";"; - } - var proto = base && new base(); - if (proto && proto.initialize || methods && methods.initialize) code += "this.initialize();"; - code += "}}"; - var ctor = new Function(code)(); - if (proto) { - ctor.prototype = proto; - ctor.BASE = base; - } - if (base) base.SUBCLASSES.push(ctor); - ctor.prototype.CTOR = ctor; - ctor.PROPS = props || null; - ctor.SELF_PROPS = self_props; - ctor.SUBCLASSES = []; - if (type) { - ctor.prototype.TYPE = ctor.TYPE = type; - } - if (methods) for (i in methods) if (methods.hasOwnProperty(i)) { - if (/^\$/.test(i)) { - ctor[i.substr(1)] = methods[i]; - } else { - ctor.prototype[i] = methods[i]; - } - } - ctor.DEFMETHOD = function(name, method) { - this.prototype[name] = method; - }; - return ctor; - } - var AST_Token = DEFNODE("Token", "type value line col pos endpos nlb comments_before file", {}, null); - var AST_Node = DEFNODE("Node", "start end", { - clone: function() { - return new this.CTOR(this); - }, - $documentation: "Base class of all AST nodes", - $propdoc: { - start: "[AST_Token] The first token of this node", - end: "[AST_Token] The last token of this node" - }, - _walk: function(visitor) { - return visitor._visit(this); - }, - walk: function(visitor) { - return this._walk(visitor); - } - }, null); - AST_Node.warn_function = null; - AST_Node.warn = function(txt, props) { - if (AST_Node.warn_function) AST_Node.warn_function(string_template(txt, props)); - }; - var AST_Statement = DEFNODE("Statement", null, { - $documentation: "Base class of all statements" - }); - var AST_Debugger = DEFNODE("Debugger", null, { - $documentation: "Represents a debugger statement" - }, AST_Statement); - var AST_Directive = DEFNODE("Directive", "value scope", { - $documentation: 'Represents a directive, like "use strict";', - $propdoc: { - value: "[string] The value of this directive as a plain string (it's not an AST_String!)", - scope: "[AST_Scope/S] The scope that this directive affects" - } - }, AST_Statement); - var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { - $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", - $propdoc: { - body: "[AST_Node] an expression node (should not be instanceof AST_Statement)" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.body._walk(visitor); - }); - } - }, AST_Statement); - function walk_body(node, visitor) { - if (node.body instanceof AST_Statement) { - node.body._walk(visitor); - } else node.body.forEach(function(stat) { - stat._walk(visitor); - }); - } - var AST_Block = DEFNODE("Block", "body", { - $documentation: "A body of statements (usually bracketed)", - $propdoc: { - body: "[AST_Statement*] an array of statements" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - walk_body(this, visitor); - }); - } - }, AST_Statement); - var AST_BlockStatement = DEFNODE("BlockStatement", null, { - $documentation: "A block statement" - }, AST_Block); - var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { - $documentation: "The empty statement (empty block or simply a semicolon)", - _walk: function(visitor) { - return visitor._visit(this); - } - }, AST_Statement); - var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { - $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", - $propdoc: { - body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.body._walk(visitor); - }); - } - }, AST_Statement); - var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { - $documentation: "Statement with a label", - $propdoc: { - label: "[AST_Label] a label definition" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.label._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_DWLoop = DEFNODE("DWLoop", "condition", { - $documentation: "Base class for do/while statements", - $propdoc: { - condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_Do = DEFNODE("Do", null, { - $documentation: "A `do` statement" - }, AST_DWLoop); - var AST_While = DEFNODE("While", null, { - $documentation: "A `while` statement" - }, AST_DWLoop); - var AST_For = DEFNODE("For", "init condition step", { - $documentation: "A `for` statement", - $propdoc: { - init: "[AST_Node?] the `for` initialization code, or null if empty", - condition: "[AST_Node?] the `for` termination clause, or null if empty", - step: "[AST_Node?] the `for` update clause, or null if empty" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - if (this.init) this.init._walk(visitor); - if (this.condition) this.condition._walk(visitor); - if (this.step) this.step._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_ForIn = DEFNODE("ForIn", "init name object", { - $documentation: "A `for ... in` statement", - $propdoc: { - init: "[AST_Node] the `for/in` initialization code", - name: "[AST_SymbolRef?] the loop variable, only if `init` is AST_Var", - object: "[AST_Node] the object that we're looping through" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.init._walk(visitor); - this.object._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_With = DEFNODE("With", "expression", { - $documentation: "A `with` statement", - $propdoc: { - expression: "[AST_Node] the `with` expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.body._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_Scope = DEFNODE("Scope", "directives variables functions uses_with uses_eval parent_scope enclosed cname", { - $documentation: "Base class for all statements introducing a lexical scope", - $propdoc: { - directives: "[string*/S] an array of directives declared in this scope", - variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope", - functions: "[Object/S] like `variables`, but only lists function declarations", - uses_with: "[boolean/S] tells whether this scope uses the `with` statement", - uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", - parent_scope: "[AST_Scope?/S] link to the parent scope", - enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", - cname: "[integer/S] current index for mangling variables (used internally by the mangler)" - } - }, AST_Block); - var AST_Toplevel = DEFNODE("Toplevel", "globals", { - $documentation: "The toplevel scope", - $propdoc: { - globals: "[Object/S] a map of name -> SymbolDef for all undeclared names" - }, - wrap_enclose: function(arg_parameter_pairs) { - var self = this; - var args = []; - var parameters = []; - arg_parameter_pairs.forEach(function(pair) { - var split = pair.split(":"); - args.push(split[0]); - parameters.push(split[1]); - }); - var wrapped_tl = "(function(" + parameters.join(",") + "){ '$ORIG'; })(" + args.join(",") + ")"; - wrapped_tl = parse(wrapped_tl); - wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node) { - if (node instanceof AST_Directive && node.value == "$ORIG") { - return MAP.splice(self.body); - } - })); - return wrapped_tl; - }, - wrap_commonjs: function(name, export_all) { - var self = this; - var to_export = []; - if (export_all) { - self.figure_out_scope(); - self.walk(new TreeWalker(function(node) { - if (node instanceof AST_SymbolDeclaration && node.definition().global) { - if (!find_if(function(n) { - return n.name == node.name; - }, to_export)) to_export.push(node); - } - })); - } - var wrapped_tl = "(function(exports, global){ global['" + name + "'] = exports; '$ORIG'; '$EXPORTS'; }({}, (function(){return this}())))"; - wrapped_tl = parse(wrapped_tl); - wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node) { - if (node instanceof AST_SimpleStatement) { - node = node.body; - if (node instanceof AST_String) switch (node.getValue()) { - case "$ORIG": - return MAP.splice(self.body); - - case "$EXPORTS": - var body = []; - to_export.forEach(function(sym) { - body.push(new AST_SimpleStatement({ - body: new AST_Assign({ - left: new AST_Sub({ - expression: new AST_SymbolRef({ - name: "exports" - }), - property: new AST_String({ - value: sym.name - }) - }), - operator: "=", - right: new AST_SymbolRef(sym) - }) - })); - }); - return MAP.splice(body); - } - } - })); - return wrapped_tl; - } - }, AST_Scope); - var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments", { - $documentation: "Base class for functions", - $propdoc: { - name: "[AST_SymbolDeclaration?] the name of this function", - argnames: "[AST_SymbolFunarg*] array of function arguments", - uses_arguments: "[boolean/S] tells whether this function accesses the arguments array" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - if (this.name) this.name._walk(visitor); - this.argnames.forEach(function(arg) { - arg._walk(visitor); - }); - walk_body(this, visitor); - }); - } - }, AST_Scope); - var AST_Accessor = DEFNODE("Accessor", null, { - $documentation: "A setter/getter function" - }, AST_Lambda); - var AST_Function = DEFNODE("Function", null, { - $documentation: "A function expression" - }, AST_Lambda); - var AST_Defun = DEFNODE("Defun", null, { - $documentation: "A function definition" - }, AST_Lambda); - var AST_Jump = DEFNODE("Jump", null, { - $documentation: "Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)" - }, AST_Statement); - var AST_Exit = DEFNODE("Exit", "value", { - $documentation: "Base class for “exits” (`return` and `throw`)", - $propdoc: { - value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" - }, - _walk: function(visitor) { - return visitor._visit(this, this.value && function() { - this.value._walk(visitor); - }); - } - }, AST_Jump); - var AST_Return = DEFNODE("Return", null, { - $documentation: "A `return` statement" - }, AST_Exit); - var AST_Throw = DEFNODE("Throw", null, { - $documentation: "A `throw` statement" - }, AST_Exit); - var AST_LoopControl = DEFNODE("LoopControl", "label", { - $documentation: "Base class for loop control statements (`break` and `continue`)", - $propdoc: { - label: "[AST_LabelRef?] the label, or null if none" - }, - _walk: function(visitor) { - return visitor._visit(this, this.label && function() { - this.label._walk(visitor); - }); - } - }, AST_Jump); - var AST_Break = DEFNODE("Break", null, { - $documentation: "A `break` statement" - }, AST_LoopControl); - var AST_Continue = DEFNODE("Continue", null, { - $documentation: "A `continue` statement" - }, AST_LoopControl); - var AST_If = DEFNODE("If", "condition alternative", { - $documentation: "A `if` statement", - $propdoc: { - condition: "[AST_Node] the `if` condition", - alternative: "[AST_Statement?] the `else` part, or null if not present" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.body._walk(visitor); - if (this.alternative) this.alternative._walk(visitor); - }); - } - }, AST_StatementWithBody); - var AST_Switch = DEFNODE("Switch", "expression", { - $documentation: "A `switch` statement", - $propdoc: { - expression: "[AST_Node] the `switch` “discriminant”" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - walk_body(this, visitor); - }); - } - }, AST_Block); - var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { - $documentation: "Base class for `switch` branches" - }, AST_Block); - var AST_Default = DEFNODE("Default", null, { - $documentation: "A `default` switch branch" - }, AST_SwitchBranch); - var AST_Case = DEFNODE("Case", "expression", { - $documentation: "A `case` switch branch", - $propdoc: { - expression: "[AST_Node] the `case` expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - walk_body(this, visitor); - }); - } - }, AST_SwitchBranch); - var AST_Try = DEFNODE("Try", "bcatch bfinally", { - $documentation: "A `try` statement", - $propdoc: { - bcatch: "[AST_Catch?] the catch block, or null if not present", - bfinally: "[AST_Finally?] the finally block, or null if not present" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - walk_body(this, visitor); - if (this.bcatch) this.bcatch._walk(visitor); - if (this.bfinally) this.bfinally._walk(visitor); - }); - } - }, AST_Block); - var AST_Catch = DEFNODE("Catch", "argname", { - $documentation: "A `catch` node; only makes sense as part of a `try` statement", - $propdoc: { - argname: "[AST_SymbolCatch] symbol for the exception" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.argname._walk(visitor); - walk_body(this, visitor); - }); - } - }, AST_Block); - var AST_Finally = DEFNODE("Finally", null, { - $documentation: "A `finally` node; only makes sense as part of a `try` statement" - }, AST_Block); - var AST_Definitions = DEFNODE("Definitions", "definitions", { - $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)", - $propdoc: { - definitions: "[AST_VarDef*] array of variable definitions" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.definitions.forEach(function(def) { - def._walk(visitor); - }); - }); - } - }, AST_Statement); - var AST_Var = DEFNODE("Var", null, { - $documentation: "A `var` statement" - }, AST_Definitions); - var AST_Const = DEFNODE("Const", null, { - $documentation: "A `const` statement" - }, AST_Definitions); - var AST_VarDef = DEFNODE("VarDef", "name value", { - $documentation: "A variable declaration; only appears in a AST_Definitions node", - $propdoc: { - name: "[AST_SymbolVar|AST_SymbolConst] name of the variable", - value: "[AST_Node?] initializer, or null of there's no initializer" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.name._walk(visitor); - if (this.value) this.value._walk(visitor); - }); - } - }); - var AST_Call = DEFNODE("Call", "expression args", { - $documentation: "A function call expression", - $propdoc: { - expression: "[AST_Node] expression to invoke as function", - args: "[AST_Node*] array of arguments" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.args.forEach(function(arg) { - arg._walk(visitor); - }); - }); - } - }); - var AST_New = DEFNODE("New", null, { - $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties" - }, AST_Call); - var AST_Seq = DEFNODE("Seq", "car cdr", { - $documentation: "A sequence expression (two comma-separated expressions)", - $propdoc: { - car: "[AST_Node] first element in sequence", - cdr: "[AST_Node] second element in sequence" - }, - $cons: function(x, y) { - var seq = new AST_Seq(x); - seq.car = x; - seq.cdr = y; - return seq; - }, - $from_array: function(array) { - if (array.length == 0) return null; - if (array.length == 1) return array[0].clone(); - var list = null; - for (var i = array.length; --i >= 0; ) { - list = AST_Seq.cons(array[i], list); - } - var p = list; - while (p) { - if (p.cdr && !p.cdr.cdr) { - p.cdr = p.cdr.car; - break; - } - p = p.cdr; - } - return list; - }, - to_array: function() { - var p = this, a = []; - while (p) { - a.push(p.car); - if (p.cdr && !(p.cdr instanceof AST_Seq)) { - a.push(p.cdr); - break; - } - p = p.cdr; - } - return a; - }, - add: function(node) { - var p = this; - while (p) { - if (!(p.cdr instanceof AST_Seq)) { - var cell = AST_Seq.cons(p.cdr, node); - return p.cdr = cell; - } - p = p.cdr; - } - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.car._walk(visitor); - if (this.cdr) this.cdr._walk(visitor); - }); - } - }); - var AST_PropAccess = DEFNODE("PropAccess", "expression property", { - $documentation: 'Base class for property access expressions, i.e. `a.foo` or `a["foo"]`', - $propdoc: { - expression: "[AST_Node] the “container” expression", - property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" - } - }); - var AST_Dot = DEFNODE("Dot", null, { - $documentation: "A dotted property access expression", - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - }); - } - }, AST_PropAccess); - var AST_Sub = DEFNODE("Sub", null, { - $documentation: 'Index-style property access, i.e. `a["foo"]`', - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - this.property._walk(visitor); - }); - } - }, AST_PropAccess); - var AST_Unary = DEFNODE("Unary", "operator expression", { - $documentation: "Base class for unary expressions", - $propdoc: { - operator: "[string] the operator", - expression: "[AST_Node] expression that this unary operator applies to" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.expression._walk(visitor); - }); - } - }); - var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { - $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" - }, AST_Unary); - var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { - $documentation: "Unary postfix expression, i.e. `i++`" - }, AST_Unary); - var AST_Binary = DEFNODE("Binary", "left operator right", { - $documentation: "Binary expression, i.e. `a + b`", - $propdoc: { - left: "[AST_Node] left-hand side expression", - operator: "[string] the operator", - right: "[AST_Node] right-hand side expression" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.left._walk(visitor); - this.right._walk(visitor); - }); - } - }); - var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { - $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", - $propdoc: { - condition: "[AST_Node]", - consequent: "[AST_Node]", - alternative: "[AST_Node]" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.condition._walk(visitor); - this.consequent._walk(visitor); - this.alternative._walk(visitor); - }); - } - }); - var AST_Assign = DEFNODE("Assign", null, { - $documentation: "An assignment expression — `a = b + 5`" - }, AST_Binary); - var AST_Array = DEFNODE("Array", "elements", { - $documentation: "An array literal", - $propdoc: { - elements: "[AST_Node*] array of elements" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.elements.forEach(function(el) { - el._walk(visitor); - }); - }); - } - }); - var AST_Object = DEFNODE("Object", "properties", { - $documentation: "An object literal", - $propdoc: { - properties: "[AST_ObjectProperty*] array of properties" - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.properties.forEach(function(prop) { - prop._walk(visitor); - }); - }); - } - }); - var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { - $documentation: "Base class for literal object properties", - $propdoc: { - key: "[string] the property name; it's always a plain string in our AST, no matter if it was a string, number or identifier in original code", - value: "[AST_Node] property value. For setters and getters this is an AST_Function." - }, - _walk: function(visitor) { - return visitor._visit(this, function() { - this.value._walk(visitor); - }); - } - }); - var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", null, { - $documentation: "A key: value object property" - }, AST_ObjectProperty); - var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { - $documentation: "An object setter property" - }, AST_ObjectProperty); - var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { - $documentation: "An object getter property" - }, AST_ObjectProperty); - var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { - $propdoc: { - name: "[string] name of this symbol", - scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", - thedef: "[SymbolDef/S] the definition of this symbol" - }, - $documentation: "Base class for all symbols" - }); - var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, { - $documentation: "The name of a property accessor (setter/getter function)" - }, AST_Symbol); - var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { - $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)", - $propdoc: { - init: "[AST_Node*/S] array of initializers for this declaration." - } - }, AST_Symbol); - var AST_SymbolVar = DEFNODE("SymbolVar", null, { - $documentation: "Symbol defining a variable" - }, AST_SymbolDeclaration); - var AST_SymbolConst = DEFNODE("SymbolConst", null, { - $documentation: "A constant declaration" - }, AST_SymbolDeclaration); - var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { - $documentation: "Symbol naming a function argument" - }, AST_SymbolVar); - var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { - $documentation: "Symbol defining a function" - }, AST_SymbolDeclaration); - var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { - $documentation: "Symbol naming a function expression" - }, AST_SymbolDeclaration); - var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { - $documentation: "Symbol naming the exception in catch" - }, AST_SymbolDeclaration); - var AST_Label = DEFNODE("Label", "references", { - $documentation: "Symbol naming a label (declaration)", - $propdoc: { - references: "[AST_LabelRef*] a list of nodes referring to this label" - } - }, AST_Symbol); - var AST_SymbolRef = DEFNODE("SymbolRef", null, { - $documentation: "Reference to some symbol (not definition/declaration)" - }, AST_Symbol); - var AST_LabelRef = DEFNODE("LabelRef", null, { - $documentation: "Reference to a label symbol" - }, AST_Symbol); - var AST_This = DEFNODE("This", null, { - $documentation: "The `this` symbol" - }, AST_Symbol); - var AST_Constant = DEFNODE("Constant", null, { - $documentation: "Base class for all constants", - getValue: function() { - return this.value; - } - }); - var AST_String = DEFNODE("String", "value", { - $documentation: "A string literal", - $propdoc: { - value: "[string] the contents of this string" - } - }, AST_Constant); - var AST_Number = DEFNODE("Number", "value", { - $documentation: "A number literal", - $propdoc: { - value: "[number] the numeric value" - } - }, AST_Constant); - var AST_RegExp = DEFNODE("RegExp", "value", { - $documentation: "A regexp literal", - $propdoc: { - value: "[RegExp] the actual regexp" - } - }, AST_Constant); - var AST_Atom = DEFNODE("Atom", null, { - $documentation: "Base class for atoms" - }, AST_Constant); - var AST_Null = DEFNODE("Null", null, { - $documentation: "The `null` atom", - value: null - }, AST_Atom); - var AST_NaN = DEFNODE("NaN", null, { - $documentation: "The impossible value", - value: 0 / 0 - }, AST_Atom); - var AST_Undefined = DEFNODE("Undefined", null, { - $documentation: "The `undefined` value", - value: function() {}() - }, AST_Atom); - var AST_Hole = DEFNODE("Hole", null, { - $documentation: "A hole in an array", - value: function() {}() - }, AST_Atom); - var AST_Infinity = DEFNODE("Infinity", null, { - $documentation: "The `Infinity` value", - value: 1 / 0 - }, AST_Atom); - var AST_Boolean = DEFNODE("Boolean", null, { - $documentation: "Base class for booleans" - }, AST_Atom); - var AST_False = DEFNODE("False", null, { - $documentation: "The `false` atom", - value: false - }, AST_Boolean); - var AST_True = DEFNODE("True", null, { - $documentation: "The `true` atom", - value: true - }, AST_Boolean); - function TreeWalker(callback) { - this.visit = callback; - this.stack = []; - } - TreeWalker.prototype = { - _visit: function(node, descend) { - this.stack.push(node); - var ret = this.visit(node, descend ? function() { - descend.call(node); - } : noop); - if (!ret && descend) { - descend.call(node); - } - this.stack.pop(); - return ret; - }, - parent: function(n) { - return this.stack[this.stack.length - 2 - (n || 0)]; - }, - push: function(node) { - this.stack.push(node); - }, - pop: function() { - return this.stack.pop(); - }, - self: function() { - return this.stack[this.stack.length - 1]; - }, - find_parent: function(type) { - var stack = this.stack; - for (var i = stack.length; --i >= 0; ) { - var x = stack[i]; - if (x instanceof type) return x; - } - }, - has_directive: function(type) { - return this.find_parent(AST_Scope).has_directive(type); - }, - in_boolean_context: function() { - var stack = this.stack; - var i = stack.length, self = stack[--i]; - while (i > 0) { - var p = stack[--i]; - if (p instanceof AST_If && p.condition === self || p instanceof AST_Conditional && p.condition === self || p instanceof AST_DWLoop && p.condition === self || p instanceof AST_For && p.condition === self || p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self) { - return true; - } - if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) return false; - self = p; - } - }, - loopcontrol_target: function(label) { - var stack = this.stack; - if (label) { - for (var i = stack.length; --i >= 0; ) { - var x = stack[i]; - if (x instanceof AST_LabeledStatement && x.label.name == label.name) { - return x.body; - } - } - } else { - for (var i = stack.length; --i >= 0; ) { - var x = stack[i]; - if (x instanceof AST_Switch || x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) return x; - } - } - } - }; - "use strict"; - var KEYWORDS = "break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with"; - var KEYWORDS_ATOM = "false null true"; - var RESERVED_WORDS = "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile" + " " + KEYWORDS_ATOM + " " + KEYWORDS; - var KEYWORDS_BEFORE_EXPRESSION = "return new delete throw else case"; - KEYWORDS = makePredicate(KEYWORDS); - RESERVED_WORDS = makePredicate(RESERVED_WORDS); - KEYWORDS_BEFORE_EXPRESSION = makePredicate(KEYWORDS_BEFORE_EXPRESSION); - KEYWORDS_ATOM = makePredicate(KEYWORDS_ATOM); - var OPERATOR_CHARS = makePredicate(characters("+-*&%=<>!?|~^")); - var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i; - var RE_OCT_NUMBER = /^0[0-7]+$/; - var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i; - var OPERATORS = makePredicate([ "in", "instanceof", "typeof", "new", "void", "delete", "++", "--", "+", "-", "!", "~", "&", "|", "^", "*", "/", "%", ">>", "<<", ">>>", "<", ">", "<=", ">=", "==", "===", "!=", "!==", "?", "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=", "&&", "||" ]); - var WHITESPACE_CHARS = makePredicate(characters(" \u00a0\n\r\t\f\u000b\u200b\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000")); - var PUNC_BEFORE_EXPRESSION = makePredicate(characters("[{(,.;:")); - var PUNC_CHARS = makePredicate(characters("[]{}(),;:")); - var REGEXP_MODIFIERS = makePredicate(characters("gmsiy")); - var UNICODE = { - letter: new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), - non_spacing_mark: new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"), - space_combining_mark: new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"), - connector_punctuation: new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]") - }; - function is_letter(code) { - return code >= 97 && code <= 122 || code >= 65 && code <= 90 || code >= 170 && UNICODE.letter.test(String.fromCharCode(code)); - } - function is_digit(code) { - return code >= 48 && code <= 57; - } - function is_alphanumeric_char(code) { - return is_digit(code) || is_letter(code); - } - function is_unicode_combining_mark(ch) { - return UNICODE.non_spacing_mark.test(ch) || UNICODE.space_combining_mark.test(ch); - } - function is_unicode_connector_punctuation(ch) { - return UNICODE.connector_punctuation.test(ch); - } - function is_identifier(name) { - return !RESERVED_WORDS(name) && /^[a-z_$][a-z0-9_$]*$/i.test(name); - } - function is_identifier_start(code) { - return code == 36 || code == 95 || is_letter(code); - } - function is_identifier_char(ch) { - var code = ch.charCodeAt(0); - return is_identifier_start(code) || is_digit(code) || code == 8204 || code == 8205 || is_unicode_combining_mark(ch) || is_unicode_connector_punctuation(ch); - } - function is_identifier_string(str) { - var i = str.length; - if (i == 0) return false; - if (is_digit(str.charCodeAt(0))) return false; - while (--i >= 0) { - if (!is_identifier_char(str.charAt(i))) return false; - } - return true; - } - function parse_js_number(num) { - if (RE_HEX_NUMBER.test(num)) { - return parseInt(num.substr(2), 16); - } else if (RE_OCT_NUMBER.test(num)) { - return parseInt(num.substr(1), 8); - } else if (RE_DEC_NUMBER.test(num)) { - return parseFloat(num); - } - } - function JS_Parse_Error(message, line, col, pos) { - this.message = message; - this.line = line; - this.col = col; - this.pos = pos; - this.stack = new Error().stack; - } - JS_Parse_Error.prototype.toString = function() { - return this.message + " (line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack; - }; - function js_error(message, filename, line, col, pos) { - throw new JS_Parse_Error(message, line, col, pos); - } - function is_token(token, type, val) { - return token.type == type && (val == null || token.value == val); - } - var EX_EOF = {}; - function tokenizer($TEXT, filename) { - var S = { - text: $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/\uFEFF/g, ""), - filename: filename, - pos: 0, - tokpos: 0, - line: 1, - tokline: 0, - col: 0, - tokcol: 0, - newline_before: false, - regex_allowed: false, - comments_before: [] - }; - function peek() { - return S.text.charAt(S.pos); - } - function next(signal_eof, in_string) { - var ch = S.text.charAt(S.pos++); - if (signal_eof && !ch) throw EX_EOF; - if (ch == "\n") { - S.newline_before = S.newline_before || !in_string; - ++S.line; - S.col = 0; - } else { - ++S.col; - } - return ch; - } - function find(what, signal_eof) { - var pos = S.text.indexOf(what, S.pos); - if (signal_eof && pos == -1) throw EX_EOF; - return pos; - } - function start_token() { - S.tokline = S.line; - S.tokcol = S.col; - S.tokpos = S.pos; - } - function token(type, value, is_comment) { - S.regex_allowed = type == "operator" && !UNARY_POSTFIX(value) || type == "keyword" && KEYWORDS_BEFORE_EXPRESSION(value) || type == "punc" && PUNC_BEFORE_EXPRESSION(value); - var ret = { - type: type, - value: value, - line: S.tokline, - col: S.tokcol, - pos: S.tokpos, - endpos: S.pos, - nlb: S.newline_before, - file: filename - }; - if (!is_comment) { - ret.comments_before = S.comments_before; - S.comments_before = []; - for (var i = 0, len = ret.comments_before.length; i < len; i++) { - ret.nlb = ret.nlb || ret.comments_before[i].nlb; - } - } - S.newline_before = false; - return new AST_Token(ret); - } - function skip_whitespace() { - while (WHITESPACE_CHARS(peek())) next(); - } - function read_while(pred) { - var ret = "", ch, i = 0; - while ((ch = peek()) && pred(ch, i++)) ret += next(); - return ret; - } - function parse_error(err) { - js_error(err, filename, S.tokline, S.tokcol, S.tokpos); - } - function read_num(prefix) { - var has_e = false, after_e = false, has_x = false, has_dot = prefix == "."; - var num = read_while(function(ch, i) { - var code = ch.charCodeAt(0); - switch (code) { - case 120: - case 88: - return has_x ? false : has_x = true; - - case 101: - case 69: - return has_x ? true : has_e ? false : has_e = after_e = true; - - case 45: - return after_e || i == 0 && !prefix; - - case 43: - return after_e; - - case after_e = false, 46: - return !has_dot && !has_x && !has_e ? has_dot = true : false; - } - return is_alphanumeric_char(code); - }); - if (prefix) num = prefix + num; - var valid = parse_js_number(num); - if (!isNaN(valid)) { - return token("num", valid); - } else { - parse_error("Invalid syntax: " + num); - } - } - function read_escaped_char(in_string) { - var ch = next(true, in_string); - switch (ch.charCodeAt(0)) { - case 110: - return "\n"; - - case 114: - return "\r"; - - case 116: - return " "; - - case 98: - return "\b"; - - case 118: - return " "; - - case 102: - return "\f"; - - case 48: - return "\x00"; - - case 120: - return String.fromCharCode(hex_bytes(2)); - - case 117: - return String.fromCharCode(hex_bytes(4)); - - case 10: - return ""; - - default: - return ch; - } - } - function hex_bytes(n) { - var num = 0; - for (;n > 0; --n) { - var digit = parseInt(next(true), 16); - if (isNaN(digit)) parse_error("Invalid hex-character pattern in string"); - num = num << 4 | digit; - } - return num; - } - var read_string = with_eof_error("Unterminated string constant", function() { - var quote = next(), ret = ""; - for (;;) { - var ch = next(true); - if (ch == "\\") { - var octal_len = 0, first = null; - ch = read_while(function(ch) { - if (ch >= "0" && ch <= "7") { - if (!first) { - first = ch; - return ++octal_len; - } else if (first <= "3" && octal_len <= 2) return ++octal_len; else if (first >= "4" && octal_len <= 1) return ++octal_len; - } - return false; - }); - if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8)); else ch = read_escaped_char(true); - } else if (ch == quote) break; - ret += ch; - } - return token("string", ret); - }); - function read_line_comment() { - next(); - var i = find("\n"), ret; - if (i == -1) { - ret = S.text.substr(S.pos); - S.pos = S.text.length; - } else { - ret = S.text.substring(S.pos, i); - S.pos = i; - } - return token("comment1", ret, true); - } - var read_multiline_comment = with_eof_error("Unterminated multiline comment", function() { - next(); - var i = find("*/", true); - var text = S.text.substring(S.pos, i); - var a = text.split("\n"), n = a.length; - S.pos = i + 2; - S.line += n - 1; - if (n > 1) S.col = a[n - 1].length; else S.col += a[n - 1].length; - S.col += 2; - S.newline_before = S.newline_before || text.indexOf("\n") >= 0; - return token("comment2", text, true); - }); - function read_name() { - var backslash = false, name = "", ch, escaped = false, hex; - while ((ch = peek()) != null) { - if (!backslash) { - if (ch == "\\") escaped = backslash = true, next(); else if (is_identifier_char(ch)) name += next(); else break; - } else { - if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); - ch = read_escaped_char(); - if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); - name += ch; - backslash = false; - } - } - if (KEYWORDS(name) && escaped) { - hex = name.charCodeAt(0).toString(16).toUpperCase(); - name = "\\u" + "0000".substr(hex.length) + hex + name.slice(1); - } - return name; - } - var read_regexp = with_eof_error("Unterminated regular expression", function(regexp) { - var prev_backslash = false, ch, in_class = false; - while (ch = next(true)) if (prev_backslash) { - regexp += "\\" + ch; - prev_backslash = false; - } else if (ch == "[") { - in_class = true; - regexp += ch; - } else if (ch == "]" && in_class) { - in_class = false; - regexp += ch; - } else if (ch == "/" && !in_class) { - break; - } else if (ch == "\\") { - prev_backslash = true; - } else { - regexp += ch; - } - var mods = read_name(); - return token("regexp", new RegExp(regexp, mods)); - }); - function read_operator(prefix) { - function grow(op) { - if (!peek()) return op; - var bigger = op + peek(); - if (OPERATORS(bigger)) { - next(); - return grow(bigger); - } else { - return op; - } - } - return token("operator", grow(prefix || next())); - } - function handle_slash() { - next(); - var regex_allowed = S.regex_allowed; - switch (peek()) { - case "/": - S.comments_before.push(read_line_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - - case "*": - S.comments_before.push(read_multiline_comment()); - S.regex_allowed = regex_allowed; - return next_token(); - } - return S.regex_allowed ? read_regexp("") : read_operator("/"); - } - function handle_dot() { - next(); - return is_digit(peek().charCodeAt(0)) ? read_num(".") : token("punc", "."); - } - function read_word() { - var word = read_name(); - return KEYWORDS_ATOM(word) ? token("atom", word) : !KEYWORDS(word) ? token("name", word) : OPERATORS(word) ? token("operator", word) : token("keyword", word); - } - function with_eof_error(eof_error, cont) { - return function(x) { - try { - return cont(x); - } catch (ex) { - if (ex === EX_EOF) parse_error(eof_error); else throw ex; - } - }; - } - function next_token(force_regexp) { - if (force_regexp != null) return read_regexp(force_regexp); - skip_whitespace(); - start_token(); - var ch = peek(); - if (!ch) return token("eof"); - var code = ch.charCodeAt(0); - switch (code) { - case 34: - case 39: - return read_string(); - - case 46: - return handle_dot(); - - case 47: - return handle_slash(); - } - if (is_digit(code)) return read_num(); - if (PUNC_CHARS(ch)) return token("punc", next()); - if (OPERATOR_CHARS(ch)) return read_operator(); - if (code == 92 || is_identifier_start(code)) return read_word(); - parse_error("Unexpected character '" + ch + "'"); - } - next_token.context = function(nc) { - if (nc) S = nc; - return S; - }; - return next_token; - } - var UNARY_PREFIX = makePredicate([ "typeof", "void", "delete", "--", "++", "!", "~", "-", "+" ]); - var UNARY_POSTFIX = makePredicate([ "--", "++" ]); - var ASSIGNMENT = makePredicate([ "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=" ]); - var PRECEDENCE = function(a, ret) { - for (var i = 0, n = 1; i < a.length; ++i, ++n) { - var b = a[i]; - for (var j = 0; j < b.length; ++j) { - ret[b[j]] = n; - } - } - return ret; - }([ [ "||" ], [ "&&" ], [ "|" ], [ "^" ], [ "&" ], [ "==", "===", "!=", "!==" ], [ "<", ">", "<=", ">=", "in", "instanceof" ], [ ">>", "<<", ">>>" ], [ "+", "-" ], [ "*", "/", "%" ] ], {}); - var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); - var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); - function parse($TEXT, options) { - options = defaults(options, { - strict: false, - filename: null, - toplevel: null, - expression: false - }); - var S = { - input: typeof $TEXT == "string" ? tokenizer($TEXT, options.filename) : $TEXT, - token: null, - prev: null, - peeked: null, - in_function: 0, - in_directives: true, - in_loop: 0, - labels: [] - }; - S.token = next(); - function is(type, value) { - return is_token(S.token, type, value); - } - function peek() { - return S.peeked || (S.peeked = S.input()); - } - function next() { - S.prev = S.token; - if (S.peeked) { - S.token = S.peeked; - S.peeked = null; - } else { - S.token = S.input(); - } - S.in_directives = S.in_directives && (S.token.type == "string" || is("punc", ";")); - return S.token; - } - function prev() { - return S.prev; - } - function croak(msg, line, col, pos) { - var ctx = S.input.context(); - js_error(msg, ctx.filename, line != null ? line : ctx.tokline, col != null ? col : ctx.tokcol, pos != null ? pos : ctx.tokpos); - } - function token_error(token, msg) { - croak(msg, token.line, token.col); - } - function unexpected(token) { - if (token == null) token = S.token; - token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); - } - function expect_token(type, val) { - if (is(type, val)) { - return next(); - } - token_error(S.token, "Unexpected token " + S.token.type + " «" + S.token.value + "»" + ", expected " + type + " «" + val + "»"); - } - function expect(punc) { - return expect_token("punc", punc); - } - function can_insert_semicolon() { - return !options.strict && (S.token.nlb || is("eof") || is("punc", "}")); - } - function semicolon() { - if (is("punc", ";")) next(); else if (!can_insert_semicolon()) unexpected(); - } - function parenthesised() { - expect("("); - var exp = expression(true); - expect(")"); - return exp; - } - function embed_tokens(parser) { - return function() { - var start = S.token; - var expr = parser(); - var end = prev(); - expr.start = start; - expr.end = end; - return expr; - }; - } - var statement = embed_tokens(function() { - var tmp; - if (is("operator", "/") || is("operator", "/=")) { - S.peeked = null; - S.token = S.input(S.token.value.substr(1)); - } - switch (S.token.type) { - case "string": - var dir = S.in_directives, stat = simple_statement(); - if (dir && stat.body instanceof AST_String && !is("punc", ",")) return new AST_Directive({ - value: stat.body.value - }); - return stat; - - case "num": - case "regexp": - case "operator": - case "atom": - return simple_statement(); - - case "name": - return is_token(peek(), "punc", ":") ? labeled_statement() : simple_statement(); - - case "punc": - switch (S.token.value) { - case "{": - return new AST_BlockStatement({ - start: S.token, - body: block_(), - end: prev() - }); - - case "[": - case "(": - return simple_statement(); - - case ";": - next(); - return new AST_EmptyStatement(); - - default: - unexpected(); - } - - case "keyword": - switch (tmp = S.token.value, next(), tmp) { - case "break": - return break_cont(AST_Break); - - case "continue": - return break_cont(AST_Continue); - - case "debugger": - semicolon(); - return new AST_Debugger(); - - case "do": - return new AST_Do({ - body: in_loop(statement), - condition: (expect_token("keyword", "while"), tmp = parenthesised(), semicolon(), - tmp) - }); - - case "while": - return new AST_While({ - condition: parenthesised(), - body: in_loop(statement) - }); - - case "for": - return for_(); - - case "function": - return function_(true); - - case "if": - return if_(); - - case "return": - if (S.in_function == 0) croak("'return' outside of function"); - return new AST_Return({ - value: is("punc", ";") ? (next(), null) : can_insert_semicolon() ? null : (tmp = expression(true), - semicolon(), tmp) - }); - - case "switch": - return new AST_Switch({ - expression: parenthesised(), - body: in_loop(switch_body_) - }); - - case "throw": - if (S.token.nlb) croak("Illegal newline after 'throw'"); - return new AST_Throw({ - value: (tmp = expression(true), semicolon(), tmp) - }); - - case "try": - return try_(); - - case "var": - return tmp = var_(), semicolon(), tmp; - - case "const": - return tmp = const_(), semicolon(), tmp; - - case "with": - return new AST_With({ - expression: parenthesised(), - body: statement() - }); - - default: - unexpected(); - } - } - }); - function labeled_statement() { - var label = as_symbol(AST_Label); - if (find_if(function(l) { - return l.name == label.name; - }, S.labels)) { - croak("Label " + label.name + " defined twice"); - } - expect(":"); - S.labels.push(label); - var stat = statement(); - S.labels.pop(); - return new AST_LabeledStatement({ - body: stat, - label: label - }); - } - function simple_statement(tmp) { - return new AST_SimpleStatement({ - body: (tmp = expression(true), semicolon(), tmp) - }); - } - function break_cont(type) { - var label = null; - if (!can_insert_semicolon()) { - label = as_symbol(AST_LabelRef, true); - } - if (label != null) { - if (!find_if(function(l) { - return l.name == label.name; - }, S.labels)) croak("Undefined label " + label.name); - } else if (S.in_loop == 0) croak(type.TYPE + " not inside a loop or switch"); - semicolon(); - return new type({ - label: label - }); - } - function for_() { - expect("("); - var init = null; - if (!is("punc", ";")) { - init = is("keyword", "var") ? (next(), var_(true)) : expression(true, true); - if (is("operator", "in")) { - if (init instanceof AST_Var && init.definitions.length > 1) croak("Only one variable declaration allowed in for..in loop"); - next(); - return for_in(init); - } - } - return regular_for(init); - } - function regular_for(init) { - expect(";"); - var test = is("punc", ";") ? null : expression(true); - expect(";"); - var step = is("punc", ")") ? null : expression(true); - expect(")"); - return new AST_For({ - init: init, - condition: test, - step: step, - body: in_loop(statement) - }); - } - function for_in(init) { - var lhs = init instanceof AST_Var ? init.definitions[0].name : null; - var obj = expression(true); - expect(")"); - return new AST_ForIn({ - init: init, - name: lhs, - object: obj, - body: in_loop(statement) - }); - } - var function_ = function(in_statement, ctor) { - var is_accessor = ctor === AST_Accessor; - var name = is("name") ? as_symbol(in_statement ? AST_SymbolDefun : is_accessor ? AST_SymbolAccessor : AST_SymbolLambda) : is_accessor && (is("string") || is("num")) ? as_atom_node() : null; - if (in_statement && !name) unexpected(); - expect("("); - if (!ctor) ctor = in_statement ? AST_Defun : AST_Function; - return new ctor({ - name: name, - argnames: function(first, a) { - while (!is("punc", ")")) { - if (first) first = false; else expect(","); - a.push(as_symbol(AST_SymbolFunarg)); - } - next(); - return a; - }(true, []), - body: function(loop, labels) { - ++S.in_function; - S.in_directives = true; - S.in_loop = 0; - S.labels = []; - var a = block_(); - --S.in_function; - S.in_loop = loop; - S.labels = labels; - return a; - }(S.in_loop, S.labels) - }); - }; - function if_() { - var cond = parenthesised(), body = statement(), belse = null; - if (is("keyword", "else")) { - next(); - belse = statement(); - } - return new AST_If({ - condition: cond, - body: body, - alternative: belse - }); - } - function block_() { - expect("{"); - var a = []; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - a.push(statement()); - } - next(); - return a; - } - function switch_body_() { - expect("{"); - var a = [], cur = null, branch = null, tmp; - while (!is("punc", "}")) { - if (is("eof")) unexpected(); - if (is("keyword", "case")) { - if (branch) branch.end = prev(); - cur = []; - branch = new AST_Case({ - start: (tmp = S.token, next(), tmp), - expression: expression(true), - body: cur - }); - a.push(branch); - expect(":"); - } else if (is("keyword", "default")) { - if (branch) branch.end = prev(); - cur = []; - branch = new AST_Default({ - start: (tmp = S.token, next(), expect(":"), tmp), - body: cur - }); - a.push(branch); - } else { - if (!cur) unexpected(); - cur.push(statement()); - } - } - if (branch) branch.end = prev(); - next(); - return a; - } - function try_() { - var body = block_(), bcatch = null, bfinally = null; - if (is("keyword", "catch")) { - var start = S.token; - next(); - expect("("); - var name = as_symbol(AST_SymbolCatch); - expect(")"); - bcatch = new AST_Catch({ - start: start, - argname: name, - body: block_(), - end: prev() - }); - } - if (is("keyword", "finally")) { - var start = S.token; - next(); - bfinally = new AST_Finally({ - start: start, - body: block_(), - end: prev() - }); - } - if (!bcatch && !bfinally) croak("Missing catch/finally blocks"); - return new AST_Try({ - body: body, - bcatch: bcatch, - bfinally: bfinally - }); - } - function vardefs(no_in, in_const) { - var a = []; - for (;;) { - a.push(new AST_VarDef({ - start: S.token, - name: as_symbol(in_const ? AST_SymbolConst : AST_SymbolVar), - value: is("operator", "=") ? (next(), expression(false, no_in)) : null, - end: prev() - })); - if (!is("punc", ",")) break; - next(); - } - return a; - } - var var_ = function(no_in) { - return new AST_Var({ - start: prev(), - definitions: vardefs(no_in, false), - end: prev() - }); - }; - var const_ = function() { - return new AST_Const({ - start: prev(), - definitions: vardefs(false, true), - end: prev() - }); - }; - var new_ = function() { - var start = S.token; - expect_token("operator", "new"); - var newexp = expr_atom(false), args; - if (is("punc", "(")) { - next(); - args = expr_list(")"); - } else { - args = []; - } - return subscripts(new AST_New({ - start: start, - expression: newexp, - args: args, - end: prev() - }), true); - }; - function as_atom_node() { - var tok = S.token, ret; - switch (tok.type) { - case "name": - return as_symbol(AST_SymbolRef); - - case "num": - ret = new AST_Number({ - start: tok, - end: tok, - value: tok.value - }); - break; - - case "string": - ret = new AST_String({ - start: tok, - end: tok, - value: tok.value - }); - break; - - case "regexp": - ret = new AST_RegExp({ - start: tok, - end: tok, - value: tok.value - }); - break; - - case "atom": - switch (tok.value) { - case "false": - ret = new AST_False({ - start: tok, - end: tok - }); - break; - - case "true": - ret = new AST_True({ - start: tok, - end: tok - }); - break; - - case "null": - ret = new AST_Null({ - start: tok, - end: tok - }); - break; - } - break; - } - next(); - return ret; - } - var expr_atom = function(allow_calls) { - if (is("operator", "new")) { - return new_(); - } - var start = S.token; - if (is("punc")) { - switch (start.value) { - case "(": - next(); - var ex = expression(true); - ex.start = start; - ex.end = S.token; - expect(")"); - return subscripts(ex, allow_calls); - - case "[": - return subscripts(array_(), allow_calls); - - case "{": - return subscripts(object_(), allow_calls); - } - unexpected(); - } - if (is("keyword", "function")) { - next(); - var func = function_(false); - func.start = start; - func.end = prev(); - return subscripts(func, allow_calls); - } - if (ATOMIC_START_TOKEN[S.token.type]) { - return subscripts(as_atom_node(), allow_calls); - } - unexpected(); - }; - function expr_list(closing, allow_trailing_comma, allow_empty) { - var first = true, a = []; - while (!is("punc", closing)) { - if (first) first = false; else expect(","); - if (allow_trailing_comma && is("punc", closing)) break; - if (is("punc", ",") && allow_empty) { - a.push(new AST_Hole({ - start: S.token, - end: S.token - })); - } else { - a.push(expression(false)); - } - } - next(); - return a; - } - var array_ = embed_tokens(function() { - expect("["); - return new AST_Array({ - elements: expr_list("]", !options.strict, true) - }); - }); - var object_ = embed_tokens(function() { - expect("{"); - var first = true, a = []; - while (!is("punc", "}")) { - if (first) first = false; else expect(","); - if (!options.strict && is("punc", "}")) break; - var start = S.token; - var type = start.type; - var name = as_property_name(); - if (type == "name" && !is("punc", ":")) { - if (name == "get") { - a.push(new AST_ObjectGetter({ - start: start, - key: name, - value: function_(false, AST_Accessor), - end: prev() - })); - continue; - } - if (name == "set") { - a.push(new AST_ObjectSetter({ - start: start, - key: name, - value: function_(false, AST_Accessor), - end: prev() - })); - continue; - } - } - expect(":"); - a.push(new AST_ObjectKeyVal({ - start: start, - key: name, - value: expression(false), - end: prev() - })); - } - next(); - return new AST_Object({ - properties: a - }); - }); - function as_property_name() { - var tmp = S.token; - next(); - switch (tmp.type) { - case "num": - case "string": - case "name": - case "operator": - case "keyword": - case "atom": - return tmp.value; - - default: - unexpected(); - } - } - function as_name() { - var tmp = S.token; - next(); - switch (tmp.type) { - case "name": - case "operator": - case "keyword": - case "atom": - return tmp.value; - - default: - unexpected(); - } - } - function as_symbol(type, noerror) { - if (!is("name")) { - if (!noerror) croak("Name expected"); - return null; - } - var name = S.token.value; - var sym = new (name == "this" ? AST_This : type)({ - name: String(S.token.value), - start: S.token, - end: S.token - }); - next(); - return sym; - } - var subscripts = function(expr, allow_calls) { - var start = expr.start; - if (is("punc", ".")) { - next(); - return subscripts(new AST_Dot({ - start: start, - expression: expr, - property: as_name(), - end: prev() - }), allow_calls); - } - if (is("punc", "[")) { - next(); - var prop = expression(true); - expect("]"); - return subscripts(new AST_Sub({ - start: start, - expression: expr, - property: prop, - end: prev() - }), allow_calls); - } - if (allow_calls && is("punc", "(")) { - next(); - return subscripts(new AST_Call({ - start: start, - expression: expr, - args: expr_list(")"), - end: prev() - }), true); - } - return expr; - }; - var maybe_unary = function(allow_calls) { - var start = S.token; - if (is("operator") && UNARY_PREFIX(start.value)) { - next(); - var ex = make_unary(AST_UnaryPrefix, start.value, maybe_unary(allow_calls)); - ex.start = start; - ex.end = prev(); - return ex; - } - var val = expr_atom(allow_calls); - while (is("operator") && UNARY_POSTFIX(S.token.value) && !S.token.nlb) { - val = make_unary(AST_UnaryPostfix, S.token.value, val); - val.start = start; - val.end = S.token; - next(); - } - return val; - }; - function make_unary(ctor, op, expr) { - if ((op == "++" || op == "--") && !is_assignable(expr)) croak("Invalid use of " + op + " operator"); - return new ctor({ - operator: op, - expression: expr - }); - } - var expr_op = function(left, min_prec, no_in) { - var op = is("operator") ? S.token.value : null; - if (op == "in" && no_in) op = null; - var prec = op != null ? PRECEDENCE[op] : null; - if (prec != null && prec > min_prec) { - next(); - var right = expr_op(maybe_unary(true), prec, no_in); - return expr_op(new AST_Binary({ - start: left.start, - left: left, - operator: op, - right: right, - end: right.end - }), min_prec, no_in); - } - return left; - }; - function expr_ops(no_in) { - return expr_op(maybe_unary(true), 0, no_in); - } - var maybe_conditional = function(no_in) { - var start = S.token; - var expr = expr_ops(no_in); - if (is("operator", "?")) { - next(); - var yes = expression(false); - expect(":"); - return new AST_Conditional({ - start: start, - condition: expr, - consequent: yes, - alternative: expression(false, no_in), - end: peek() - }); - } - return expr; - }; - function is_assignable(expr) { - if (!options.strict) return true; - if (expr instanceof AST_This) return false; - return expr instanceof AST_PropAccess || expr instanceof AST_Symbol; - } - var maybe_assign = function(no_in) { - var start = S.token; - var left = maybe_conditional(no_in), val = S.token.value; - if (is("operator") && ASSIGNMENT(val)) { - if (is_assignable(left)) { - next(); - return new AST_Assign({ - start: start, - left: left, - operator: val, - right: maybe_assign(no_in), - end: prev() - }); - } - croak("Invalid assignment"); - } - return left; - }; - var expression = function(commas, no_in) { - var start = S.token; - var expr = maybe_assign(no_in); - if (commas && is("punc", ",")) { - next(); - return new AST_Seq({ - start: start, - car: expr, - cdr: expression(true, no_in), - end: peek() - }); - } - return expr; - }; - function in_loop(cont) { - ++S.in_loop; - var ret = cont(); - --S.in_loop; - return ret; - } - if (options.expression) { - return expression(true); - } - return function() { - var start = S.token; - var body = []; - while (!is("eof")) body.push(statement()); - var end = prev(); - var toplevel = options.toplevel; - if (toplevel) { - toplevel.body = toplevel.body.concat(body); - toplevel.end = end; - } else { - toplevel = new AST_Toplevel({ - start: start, - body: body, - end: end - }); - } - return toplevel; - }(); - } - "use strict"; - function TreeTransformer(before, after) { - TreeWalker.call(this); - this.before = before; - this.after = after; - } - TreeTransformer.prototype = new TreeWalker(); - (function(undefined) { - function _(node, descend) { - node.DEFMETHOD("transform", function(tw, in_list) { - var x, y; - tw.push(this); - if (tw.before) x = tw.before(this, descend, in_list); - if (x === undefined) { - if (!tw.after) { - x = this; - descend(x, tw); - } else { - tw.stack[tw.stack.length - 1] = x = this.clone(); - descend(x, tw); - y = tw.after(x, in_list); - if (y !== undefined) x = y; - } - } - tw.pop(); - return x; - }); - } - function do_list(list, tw) { - return MAP(list, function(node) { - return node.transform(tw, true); - }); - } - _(AST_Node, noop); - _(AST_LabeledStatement, function(self, tw) { - self.label = self.label.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_SimpleStatement, function(self, tw) { - self.body = self.body.transform(tw); - }); - _(AST_Block, function(self, tw) { - self.body = do_list(self.body, tw); - }); - _(AST_DWLoop, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_For, function(self, tw) { - if (self.init) self.init = self.init.transform(tw); - if (self.condition) self.condition = self.condition.transform(tw); - if (self.step) self.step = self.step.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_ForIn, function(self, tw) { - self.init = self.init.transform(tw); - self.object = self.object.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_With, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = self.body.transform(tw); - }); - _(AST_Exit, function(self, tw) { - if (self.value) self.value = self.value.transform(tw); - }); - _(AST_LoopControl, function(self, tw) { - if (self.label) self.label = self.label.transform(tw); - }); - _(AST_If, function(self, tw) { - self.condition = self.condition.transform(tw); - self.body = self.body.transform(tw); - if (self.alternative) self.alternative = self.alternative.transform(tw); - }); - _(AST_Switch, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - _(AST_Case, function(self, tw) { - self.expression = self.expression.transform(tw); - self.body = do_list(self.body, tw); - }); - _(AST_Try, function(self, tw) { - self.body = do_list(self.body, tw); - if (self.bcatch) self.bcatch = self.bcatch.transform(tw); - if (self.bfinally) self.bfinally = self.bfinally.transform(tw); - }); - _(AST_Catch, function(self, tw) { - self.argname = self.argname.transform(tw); - self.body = do_list(self.body, tw); - }); - _(AST_Definitions, function(self, tw) { - self.definitions = do_list(self.definitions, tw); - }); - _(AST_VarDef, function(self, tw) { - self.name = self.name.transform(tw); - if (self.value) self.value = self.value.transform(tw); - }); - _(AST_Lambda, function(self, tw) { - if (self.name) self.name = self.name.transform(tw); - self.argnames = do_list(self.argnames, tw); - self.body = do_list(self.body, tw); - }); - _(AST_Call, function(self, tw) { - self.expression = self.expression.transform(tw); - self.args = do_list(self.args, tw); - }); - _(AST_Seq, function(self, tw) { - self.car = self.car.transform(tw); - self.cdr = self.cdr.transform(tw); - }); - _(AST_Dot, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - _(AST_Sub, function(self, tw) { - self.expression = self.expression.transform(tw); - self.property = self.property.transform(tw); - }); - _(AST_Unary, function(self, tw) { - self.expression = self.expression.transform(tw); - }); - _(AST_Binary, function(self, tw) { - self.left = self.left.transform(tw); - self.right = self.right.transform(tw); - }); - _(AST_Conditional, function(self, tw) { - self.condition = self.condition.transform(tw); - self.consequent = self.consequent.transform(tw); - self.alternative = self.alternative.transform(tw); - }); - _(AST_Array, function(self, tw) { - self.elements = do_list(self.elements, tw); - }); - _(AST_Object, function(self, tw) { - self.properties = do_list(self.properties, tw); - }); - _(AST_ObjectProperty, function(self, tw) { - self.value = self.value.transform(tw); - }); - })(); - "use strict"; - function SymbolDef(scope, index, orig) { - this.name = orig.name; - this.orig = [ orig ]; - this.scope = scope; - this.references = []; - this.global = false; - this.mangled_name = null; - this.undeclared = false; - this.constant = false; - this.index = index; - } - SymbolDef.prototype = { - unmangleable: function(options) { - return this.global && !(options && options.toplevel) || this.undeclared || !(options && options.eval) && (this.scope.uses_eval || this.scope.uses_with); - }, - mangle: function(options) { - if (!this.mangled_name && !this.unmangleable(options)) { - var s = this.scope; - if (this.orig[0] instanceof AST_SymbolLambda && !options.screw_ie8) s = s.parent_scope; - this.mangled_name = s.next_mangled(options); - } - } - }; - AST_Toplevel.DEFMETHOD("figure_out_scope", function() { - var self = this; - var scope = self.parent_scope = null; - var labels = new Dictionary(); - var nesting = 0; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Scope) { - node.init_scope_vars(nesting); - var save_scope = node.parent_scope = scope; - var save_labels = labels; - ++nesting; - scope = node; - labels = new Dictionary(); - descend(); - labels = save_labels; - scope = save_scope; - --nesting; - return true; - } - if (node instanceof AST_Directive) { - node.scope = scope; - push_uniq(scope.directives, node.value); - return true; - } - if (node instanceof AST_With) { - for (var s = scope; s; s = s.parent_scope) s.uses_with = true; - return; - } - if (node instanceof AST_LabeledStatement) { - var l = node.label; - if (labels.has(l.name)) throw new Error(string_template("Label {name} defined twice", l)); - labels.set(l.name, l); - descend(); - labels.del(l.name); - return true; - } - if (node instanceof AST_Symbol) { - node.scope = scope; - } - if (node instanceof AST_Label) { - node.thedef = node; - node.init_scope_vars(); - } - if (node instanceof AST_SymbolLambda) { - scope.def_function(node); - } else if (node instanceof AST_SymbolDefun) { - (node.scope = scope.parent_scope).def_function(node); - } else if (node instanceof AST_SymbolVar || node instanceof AST_SymbolConst) { - var def = scope.def_variable(node); - def.constant = node instanceof AST_SymbolConst; - def.init = tw.parent().value; - } else if (node instanceof AST_SymbolCatch) { - scope.def_variable(node); - } - if (node instanceof AST_LabelRef) { - var sym = labels.get(node.name); - if (!sym) throw new Error(string_template("Undefined label {name} [{line},{col}]", { - name: node.name, - line: node.start.line, - col: node.start.col - })); - node.thedef = sym; - } - }); - self.walk(tw); - var func = null; - var globals = self.globals = new Dictionary(); - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_Lambda) { - var prev_func = func; - func = node; - descend(); - func = prev_func; - return true; - } - if (node instanceof AST_LabelRef) { - node.reference(); - return true; - } - if (node instanceof AST_SymbolRef) { - var name = node.name; - var sym = node.scope.find_variable(name); - if (!sym) { - var g; - if (globals.has(name)) { - g = globals.get(name); - } else { - g = new SymbolDef(self, globals.size(), node); - g.undeclared = true; - g.global = true; - globals.set(name, g); - } - node.thedef = g; - if (name == "eval" && tw.parent() instanceof AST_Call) { - for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) s.uses_eval = true; - } - if (name == "arguments") { - func.uses_arguments = true; - } - } else { - node.thedef = sym; - } - node.reference(); - return true; - } - }); - self.walk(tw); - }); - AST_Scope.DEFMETHOD("init_scope_vars", function(nesting) { - this.directives = []; - this.variables = new Dictionary(); - this.functions = new Dictionary(); - this.uses_with = false; - this.uses_eval = false; - this.parent_scope = null; - this.enclosed = []; - this.cname = -1; - this.nesting = nesting; - }); - AST_Scope.DEFMETHOD("strict", function() { - return this.has_directive("use strict"); - }); - AST_Lambda.DEFMETHOD("init_scope_vars", function() { - AST_Scope.prototype.init_scope_vars.apply(this, arguments); - this.uses_arguments = false; - }); - AST_SymbolRef.DEFMETHOD("reference", function() { - var def = this.definition(); - def.references.push(this); - var s = this.scope; - while (s) { - push_uniq(s.enclosed, def); - if (s === def.scope) break; - s = s.parent_scope; - } - this.frame = this.scope.nesting - def.scope.nesting; - }); - AST_Label.DEFMETHOD("init_scope_vars", function() { - this.references = []; - }); - AST_LabelRef.DEFMETHOD("reference", function() { - this.thedef.references.push(this); - }); - AST_Scope.DEFMETHOD("find_variable", function(name) { - if (name instanceof AST_Symbol) name = name.name; - return this.variables.get(name) || this.parent_scope && this.parent_scope.find_variable(name); - }); - AST_Scope.DEFMETHOD("has_directive", function(value) { - return this.parent_scope && this.parent_scope.has_directive(value) || (this.directives.indexOf(value) >= 0 ? this : null); - }); - AST_Scope.DEFMETHOD("def_function", function(symbol) { - this.functions.set(symbol.name, this.def_variable(symbol)); - }); - AST_Scope.DEFMETHOD("def_variable", function(symbol) { - var def; - if (!this.variables.has(symbol.name)) { - def = new SymbolDef(this, this.variables.size(), symbol); - this.variables.set(symbol.name, def); - def.global = !this.parent_scope; - } else { - def = this.variables.get(symbol.name); - def.orig.push(symbol); - } - return symbol.thedef = def; - }); - AST_Scope.DEFMETHOD("next_mangled", function(options) { - var ext = this.enclosed; - out: while (true) { - var m = base54(++this.cname); - if (!is_identifier(m)) continue; - for (var i = ext.length; --i >= 0; ) { - var sym = ext[i]; - var name = sym.mangled_name || sym.unmangleable(options) && sym.name; - if (m == name) continue out; - } - return m; - } - }); - AST_Scope.DEFMETHOD("references", function(sym) { - if (sym instanceof AST_Symbol) sym = sym.definition(); - return this.enclosed.indexOf(sym) < 0 ? null : sym; - }); - AST_Symbol.DEFMETHOD("unmangleable", function(options) { - return this.definition().unmangleable(options); - }); - AST_SymbolAccessor.DEFMETHOD("unmangleable", function() { - return true; - }); - AST_Label.DEFMETHOD("unmangleable", function() { - return false; - }); - AST_Symbol.DEFMETHOD("unreferenced", function() { - return this.definition().references.length == 0 && !(this.scope.uses_eval || this.scope.uses_with); - }); - AST_Symbol.DEFMETHOD("undeclared", function() { - return this.definition().undeclared; - }); - AST_LabelRef.DEFMETHOD("undeclared", function() { - return false; - }); - AST_Label.DEFMETHOD("undeclared", function() { - return false; - }); - AST_Symbol.DEFMETHOD("definition", function() { - return this.thedef; - }); - AST_Symbol.DEFMETHOD("global", function() { - return this.definition().global; - }); - AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options) { - return defaults(options, { - except: [], - eval: false, - sort: false, - toplevel: false, - screw_ie8: false - }); - }); - AST_Toplevel.DEFMETHOD("mangle_names", function(options) { - options = this._default_mangler_options(options); - var lname = -1; - var to_mangle = []; - var tw = new TreeWalker(function(node, descend) { - if (node instanceof AST_LabeledStatement) { - var save_nesting = lname; - descend(); - lname = save_nesting; - return true; - } - if (node instanceof AST_Scope) { - var p = tw.parent(), a = []; - node.variables.each(function(symbol) { - if (options.except.indexOf(symbol.name) < 0) { - a.push(symbol); - } - }); - if (options.sort) a.sort(function(a, b) { - return b.references.length - a.references.length; - }); - to_mangle.push.apply(to_mangle, a); - return; - } - if (node instanceof AST_Label) { - var name; - do name = base54(++lname); while (!is_identifier(name)); - node.mangled_name = name; - return true; - } - }); - this.walk(tw); - to_mangle.forEach(function(def) { - def.mangle(options); - }); - }); - AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options) { - options = this._default_mangler_options(options); - var tw = new TreeWalker(function(node) { - if (node instanceof AST_Constant) base54.consider(node.print_to_string()); else if (node instanceof AST_Return) base54.consider("return"); else if (node instanceof AST_Throw) base54.consider("throw"); else if (node instanceof AST_Continue) base54.consider("continue"); else if (node instanceof AST_Break) base54.consider("break"); else if (node instanceof AST_Debugger) base54.consider("debugger"); else if (node instanceof AST_Directive) base54.consider(node.value); else if (node instanceof AST_While) base54.consider("while"); else if (node instanceof AST_Do) base54.consider("do while"); else if (node instanceof AST_If) { - base54.consider("if"); - if (node.alternative) base54.consider("else"); - } else if (node instanceof AST_Var) base54.consider("var"); else if (node instanceof AST_Const) base54.consider("const"); else if (node instanceof AST_Lambda) base54.consider("function"); else if (node instanceof AST_For) base54.consider("for"); else if (node instanceof AST_ForIn) base54.consider("for in"); else if (node instanceof AST_Switch) base54.consider("switch"); else if (node instanceof AST_Case) base54.consider("case"); else if (node instanceof AST_Default) base54.consider("default"); else if (node instanceof AST_With) base54.consider("with"); else if (node instanceof AST_ObjectSetter) base54.consider("set" + node.key); else if (node instanceof AST_ObjectGetter) base54.consider("get" + node.key); else if (node instanceof AST_ObjectKeyVal) base54.consider(node.key); else if (node instanceof AST_New) base54.consider("new"); else if (node instanceof AST_This) base54.consider("this"); else if (node instanceof AST_Try) base54.consider("try"); else if (node instanceof AST_Catch) base54.consider("catch"); else if (node instanceof AST_Finally) base54.consider("finally"); else if (node instanceof AST_Symbol && node.unmangleable(options)) base54.consider(node.name); else if (node instanceof AST_Unary || node instanceof AST_Binary) base54.consider(node.operator); else if (node instanceof AST_Dot) base54.consider(node.property); - }); - this.walk(tw); - base54.sort(); - }); - var base54 = function() { - var string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789"; - var chars, frequency; - function reset() { - frequency = Object.create(null); - chars = string.split("").map(function(ch) { - return ch.charCodeAt(0); - }); - chars.forEach(function(ch) { - frequency[ch] = 0; - }); - } - base54.consider = function(str) { - for (var i = str.length; --i >= 0; ) { - var code = str.charCodeAt(i); - if (code in frequency) ++frequency[code]; - } - }; - base54.sort = function() { - chars = mergeSort(chars, function(a, b) { - if (is_digit(a) && !is_digit(b)) return 1; - if (is_digit(b) && !is_digit(a)) return -1; - return frequency[b] - frequency[a]; - }); - }; - base54.reset = reset; - reset(); - base54.get = function() { - return chars; - }; - base54.freq = function() { - return frequency; - }; - function base54(num) { - var ret = "", base = 54; - do { - ret += String.fromCharCode(chars[num % base]); - num = Math.floor(num / base); - base = 64; - } while (num > 0); - return ret; - } - return base54; - }(); - AST_Toplevel.DEFMETHOD("scope_warnings", function(options) { - options = defaults(options, { - undeclared: false, - unreferenced: true, - assign_to_global: true, - func_arguments: true, - nested_defuns: true, - eval: true - }); - var tw = new TreeWalker(function(node) { - if (options.undeclared && node instanceof AST_SymbolRef && node.undeclared()) { - AST_Node.warn("Undeclared symbol: {name} [{file}:{line},{col}]", { - name: node.name, - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - if (options.assign_to_global) { - var sym = null; - if (node instanceof AST_Assign && node.left instanceof AST_SymbolRef) sym = node.left; else if (node instanceof AST_ForIn && node.init instanceof AST_SymbolRef) sym = node.init; - if (sym && (sym.undeclared() || sym.global() && sym.scope !== sym.definition().scope)) { - AST_Node.warn("{msg}: {name} [{file}:{line},{col}]", { - msg: sym.undeclared() ? "Accidental global?" : "Assignment to global", - name: sym.name, - file: sym.start.file, - line: sym.start.line, - col: sym.start.col - }); - } - } - if (options.eval && node instanceof AST_SymbolRef && node.undeclared() && node.name == "eval") { - AST_Node.warn("Eval is used [{file}:{line},{col}]", node.start); - } - if (options.unreferenced && (node instanceof AST_SymbolDeclaration || node instanceof AST_Label) && node.unreferenced()) { - AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", { - type: node instanceof AST_Label ? "Label" : "Symbol", - name: node.name, - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - if (options.func_arguments && node instanceof AST_Lambda && node.uses_arguments) { - AST_Node.warn("arguments used in function {name} [{file}:{line},{col}]", { - name: node.name ? node.name.name : "anonymous", - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - if (options.nested_defuns && node instanceof AST_Defun && !(tw.parent() instanceof AST_Scope)) { - AST_Node.warn('Function {name} declared in nested statement "{type}" [{file}:{line},{col}]', { - name: node.name.name, - type: tw.parent().TYPE, - file: node.start.file, - line: node.start.line, - col: node.start.col - }); - } - }); - this.walk(tw); - }); - "use strict"; - function OutputStream(options) { - options = defaults(options, { - indent_start: 0, - indent_level: 4, - quote_keys: false, - space_colon: true, - ascii_only: false, - inline_script: false, - width: 80, - max_line_len: 32e3, - beautify: false, - source_map: null, - bracketize: false, - semicolons: true, - comments: false, - preserve_line: false, - screw_ie8: false - }, true); - var indentation = 0; - var current_col = 0; - var current_line = 1; - var current_pos = 0; - var OUTPUT = ""; - function to_ascii(str, identifier) { - return str.replace(/[\u0080-\uffff]/g, function(ch) { - var code = ch.charCodeAt(0).toString(16); - if (code.length <= 2 && !identifier) { - while (code.length < 2) code = "0" + code; - return "\\x" + code; - } else { - while (code.length < 4) code = "0" + code; - return "\\u" + code; - } - }); - } - function make_string(str) { - var dq = 0, sq = 0; - str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s) { - switch (s) { - case "\\": - return "\\\\"; - - case "\b": - return "\\b"; - - case "\f": - return "\\f"; - - case "\n": - return "\\n"; - - case "\r": - return "\\r"; - - case "\u2028": - return "\\u2028"; - - case "\u2029": - return "\\u2029"; - - case '"': - ++dq; - return '"'; - - case "'": - ++sq; - return "'"; - - case "\x00": - return "\\x00"; - } - return s; - }); - if (options.ascii_only) str = to_ascii(str); - if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'"; else return '"' + str.replace(/\x22/g, '\\"') + '"'; - } - function encode_string(str) { - var ret = make_string(str); - if (options.inline_script) ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); - return ret; - } - function make_name(name) { - name = name.toString(); - if (options.ascii_only) name = to_ascii(name, true); - return name; - } - function make_indent(back) { - return repeat_string(" ", options.indent_start + indentation - back * options.indent_level); - } - var might_need_space = false; - var might_need_semicolon = false; - var last = null; - function last_char() { - return last.charAt(last.length - 1); - } - function maybe_newline() { - if (options.max_line_len && current_col > options.max_line_len) print("\n"); - } - var requireSemicolonChars = makePredicate("( [ + * / - , ."); - function print(str) { - str = String(str); - var ch = str.charAt(0); - if (might_need_semicolon) { - if ((!ch || ";}".indexOf(ch) < 0) && !/[;]$/.test(last)) { - if (options.semicolons || requireSemicolonChars(ch)) { - OUTPUT += ";"; - current_col++; - current_pos++; - } else { - OUTPUT += "\n"; - current_pos++; - current_line++; - current_col = 0; - } - if (!options.beautify) might_need_space = false; - } - might_need_semicolon = false; - maybe_newline(); - } - if (!options.beautify && options.preserve_line && stack[stack.length - 1]) { - var target_line = stack[stack.length - 1].start.line; - while (current_line < target_line) { - OUTPUT += "\n"; - current_pos++; - current_line++; - current_col = 0; - might_need_space = false; - } - } - if (might_need_space) { - var prev = last_char(); - if (is_identifier_char(prev) && (is_identifier_char(ch) || ch == "\\") || /^[\+\-\/]$/.test(ch) && ch == prev) { - OUTPUT += " "; - current_col++; - current_pos++; - } - might_need_space = false; - } - var a = str.split(/\r?\n/), n = a.length - 1; - current_line += n; - if (n == 0) { - current_col += a[n].length; - } else { - current_col = a[n].length; - } - current_pos += str.length; - last = str; - OUTPUT += str; - } - var space = options.beautify ? function() { - print(" "); - } : function() { - might_need_space = true; - }; - var indent = options.beautify ? function(half) { - if (options.beautify) { - print(make_indent(half ? .5 : 0)); - } - } : noop; - var with_indent = options.beautify ? function(col, cont) { - if (col === true) col = next_indent(); - var save_indentation = indentation; - indentation = col; - var ret = cont(); - indentation = save_indentation; - return ret; - } : function(col, cont) { - return cont(); - }; - var newline = options.beautify ? function() { - print("\n"); - } : noop; - var semicolon = options.beautify ? function() { - print(";"); - } : function() { - might_need_semicolon = true; - }; - function force_semicolon() { - might_need_semicolon = false; - print(";"); - } - function next_indent() { - return indentation + options.indent_level; - } - function with_block(cont) { - var ret; - print("{"); - newline(); - with_indent(next_indent(), function() { - ret = cont(); - }); - indent(); - print("}"); - return ret; - } - function with_parens(cont) { - print("("); - var ret = cont(); - print(")"); - return ret; - } - function with_square(cont) { - print("["); - var ret = cont(); - print("]"); - return ret; - } - function comma() { - print(","); - space(); - } - function colon() { - print(":"); - if (options.space_colon) space(); - } - var add_mapping = options.source_map ? function(token, name) { - try { - if (token) options.source_map.add(token.file || "?", current_line, current_col, token.line, token.col, !name && token.type == "name" ? token.value : name); - } catch (ex) { - AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { - file: token.file, - line: token.line, - col: token.col, - cline: current_line, - ccol: current_col, - name: name || "" - }); - } - } : noop; - function get() { - return OUTPUT; - } - var stack = []; - return { - get: get, - toString: get, - indent: indent, - indentation: function() { - return indentation; - }, - current_width: function() { - return current_col - indentation; - }, - should_break: function() { - return options.width && this.current_width() >= options.width; - }, - newline: newline, - print: print, - space: space, - comma: comma, - colon: colon, - last: function() { - return last; - }, - semicolon: semicolon, - force_semicolon: force_semicolon, - to_ascii: to_ascii, - print_name: function(name) { - print(make_name(name)); - }, - print_string: function(str) { - print(encode_string(str)); - }, - next_indent: next_indent, - with_indent: with_indent, - with_block: with_block, - with_parens: with_parens, - with_square: with_square, - add_mapping: add_mapping, - option: function(opt) { - return options[opt]; - }, - line: function() { - return current_line; - }, - col: function() { - return current_col; - }, - pos: function() { - return current_pos; - }, - push_node: function(node) { - stack.push(node); - }, - pop_node: function() { - return stack.pop(); - }, - stack: function() { - return stack; - }, - parent: function(n) { - return stack[stack.length - 2 - (n || 0)]; - } - }; - } - (function() { - function DEFPRINT(nodetype, generator) { - nodetype.DEFMETHOD("_codegen", generator); - } - AST_Node.DEFMETHOD("print", function(stream, force_parens) { - var self = this, generator = self._codegen; - function doit() { - self.add_comments(stream); - self.add_source_map(stream); - generator(self, stream); - } - stream.push_node(self); - if (force_parens || self.needs_parens(stream)) { - stream.with_parens(doit); - } else { - doit(); - } - stream.pop_node(); - }); - AST_Node.DEFMETHOD("print_to_string", function(options) { - var s = OutputStream(options); - this.print(s); - return s.get(); - }); - AST_Node.DEFMETHOD("add_comments", function(output) { - var c = output.option("comments"), self = this; - if (c) { - var start = self.start; - if (start && !start._comments_dumped) { - start._comments_dumped = true; - var comments = start.comments_before; - if (self instanceof AST_Exit && self.value && self.value.start.comments_before.length > 0) { - comments = (comments || []).concat(self.value.start.comments_before); - self.value.start.comments_before = []; - } - if (c.test) { - comments = comments.filter(function(comment) { - return c.test(comment.value); - }); - } else if (typeof c == "function") { - comments = comments.filter(function(comment) { - return c(self, comment); - }); - } - comments.forEach(function(c) { - if (c.type == "comment1") { - output.print("//" + c.value + "\n"); - output.indent(); - } else if (c.type == "comment2") { - output.print("/*" + c.value + "*/"); - if (start.nlb) { - output.print("\n"); - output.indent(); - } else { - output.space(); - } - } - }); - } - } - }); - function PARENS(nodetype, func) { - nodetype.DEFMETHOD("needs_parens", func); - } - PARENS(AST_Node, function() { - return false; - }); - PARENS(AST_Function, function(output) { - return first_in_statement(output); - }); - PARENS(AST_Object, function(output) { - return first_in_statement(output); - }); - PARENS(AST_Unary, function(output) { - var p = output.parent(); - return p instanceof AST_PropAccess && p.expression === this; - }); - PARENS(AST_Seq, function(output) { - var p = output.parent(); - return p instanceof AST_Call || p instanceof AST_Unary || p instanceof AST_Binary || p instanceof AST_VarDef || p instanceof AST_Dot || p instanceof AST_Array || p instanceof AST_ObjectProperty || p instanceof AST_Conditional; - }); - PARENS(AST_Binary, function(output) { - var p = output.parent(); - if (p instanceof AST_Call && p.expression === this) return true; - if (p instanceof AST_Unary) return true; - if (p instanceof AST_PropAccess && p.expression === this) return true; - if (p instanceof AST_Binary) { - var po = p.operator, pp = PRECEDENCE[po]; - var so = this.operator, sp = PRECEDENCE[so]; - if (pp > sp || pp == sp && this === p.right && !(so == po && (so == "*" || so == "&&" || so == "||"))) { - return true; - } - } - }); - PARENS(AST_PropAccess, function(output) { - var p = output.parent(); - if (p instanceof AST_New && p.expression === this) { - try { - this.walk(new TreeWalker(function(node) { - if (node instanceof AST_Call) throw p; - })); - } catch (ex) { - if (ex !== p) throw ex; - return true; - } - } - }); - PARENS(AST_Call, function(output) { - var p = output.parent(); - return p instanceof AST_New && p.expression === this; - }); - PARENS(AST_New, function(output) { - var p = output.parent(); - if (no_constructor_parens(this, output) && (p instanceof AST_PropAccess || p instanceof AST_Call && p.expression === this)) return true; - }); - PARENS(AST_Number, function(output) { - var p = output.parent(); - if (this.getValue() < 0 && p instanceof AST_PropAccess && p.expression === this) return true; - }); - PARENS(AST_NaN, function(output) { - var p = output.parent(); - if (p instanceof AST_PropAccess && p.expression === this) return true; - }); - function assign_and_conditional_paren_rules(output) { - var p = output.parent(); - if (p instanceof AST_Unary) return true; - if (p instanceof AST_Binary && !(p instanceof AST_Assign)) return true; - if (p instanceof AST_Call && p.expression === this) return true; - if (p instanceof AST_Conditional && p.condition === this) return true; - if (p instanceof AST_PropAccess && p.expression === this) return true; - } - PARENS(AST_Assign, assign_and_conditional_paren_rules); - PARENS(AST_Conditional, assign_and_conditional_paren_rules); - DEFPRINT(AST_Directive, function(self, output) { - output.print_string(self.value); - output.semicolon(); - }); - DEFPRINT(AST_Debugger, function(self, output) { - output.print("debugger"); - output.semicolon(); - }); - function display_body(body, is_toplevel, output) { - var last = body.length - 1; - body.forEach(function(stmt, i) { - if (!(stmt instanceof AST_EmptyStatement)) { - output.indent(); - stmt.print(output); - if (!(i == last && is_toplevel)) { - output.newline(); - if (is_toplevel) output.newline(); - } - } - }); - } - AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output) { - force_statement(this.body, output); - }); - DEFPRINT(AST_Statement, function(self, output) { - self.body.print(output); - output.semicolon(); - }); - DEFPRINT(AST_Toplevel, function(self, output) { - display_body(self.body, true, output); - output.print(""); - }); - DEFPRINT(AST_LabeledStatement, function(self, output) { - self.label.print(output); - output.colon(); - self.body.print(output); - }); - DEFPRINT(AST_SimpleStatement, function(self, output) { - self.body.print(output); - output.semicolon(); - }); - function print_bracketed(body, output) { - if (body.length > 0) output.with_block(function() { - display_body(body, false, output); - }); else output.print("{}"); - } - DEFPRINT(AST_BlockStatement, function(self, output) { - print_bracketed(self.body, output); - }); - DEFPRINT(AST_EmptyStatement, function(self, output) { - output.semicolon(); - }); - DEFPRINT(AST_Do, function(self, output) { - output.print("do"); - output.space(); - self._do_print_body(output); - output.space(); - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.semicolon(); - }); - DEFPRINT(AST_While, function(self, output) { - output.print("while"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_For, function(self, output) { - output.print("for"); - output.space(); - output.with_parens(function() { - if (self.init) { - if (self.init instanceof AST_Definitions) { - self.init.print(output); - } else { - parenthesize_for_noin(self.init, output, true); - } - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.condition) { - self.condition.print(output); - output.print(";"); - output.space(); - } else { - output.print(";"); - } - if (self.step) { - self.step.print(output); - } - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_ForIn, function(self, output) { - output.print("for"); - output.space(); - output.with_parens(function() { - self.init.print(output); - output.space(); - output.print("in"); - output.space(); - self.object.print(output); - }); - output.space(); - self._do_print_body(output); - }); - DEFPRINT(AST_With, function(self, output) { - output.print("with"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - self._do_print_body(output); - }); - AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword) { - var self = this; - if (!nokeyword) { - output.print("function"); - } - if (self.name) { - output.space(); - self.name.print(output); - } - output.with_parens(function() { - self.argnames.forEach(function(arg, i) { - if (i) output.comma(); - arg.print(output); - }); - }); - output.space(); - print_bracketed(self.body, output); - }); - DEFPRINT(AST_Lambda, function(self, output) { - self._do_print(output); - }); - AST_Exit.DEFMETHOD("_do_print", function(output, kind) { - output.print(kind); - if (this.value) { - output.space(); - this.value.print(output); - } - output.semicolon(); - }); - DEFPRINT(AST_Return, function(self, output) { - self._do_print(output, "return"); - }); - DEFPRINT(AST_Throw, function(self, output) { - self._do_print(output, "throw"); - }); - AST_LoopControl.DEFMETHOD("_do_print", function(output, kind) { - output.print(kind); - if (this.label) { - output.space(); - this.label.print(output); - } - output.semicolon(); - }); - DEFPRINT(AST_Break, function(self, output) { - self._do_print(output, "break"); - }); - DEFPRINT(AST_Continue, function(self, output) { - self._do_print(output, "continue"); - }); - function make_then(self, output) { - if (output.option("bracketize")) { - make_block(self.body, output); - return; - } - if (!self.body) return output.force_semicolon(); - if (self.body instanceof AST_Do && !output.option("screw_ie8")) { - make_block(self.body, output); - return; - } - var b = self.body; - while (true) { - if (b instanceof AST_If) { - if (!b.alternative) { - make_block(self.body, output); - return; - } - b = b.alternative; - } else if (b instanceof AST_StatementWithBody) { - b = b.body; - } else break; - } - force_statement(self.body, output); - } - DEFPRINT(AST_If, function(self, output) { - output.print("if"); - output.space(); - output.with_parens(function() { - self.condition.print(output); - }); - output.space(); - if (self.alternative) { - make_then(self, output); - output.space(); - output.print("else"); - output.space(); - force_statement(self.alternative, output); - } else { - self._do_print_body(output); - } - }); - DEFPRINT(AST_Switch, function(self, output) { - output.print("switch"); - output.space(); - output.with_parens(function() { - self.expression.print(output); - }); - output.space(); - if (self.body.length > 0) output.with_block(function() { - self.body.forEach(function(stmt, i) { - if (i) output.newline(); - output.indent(true); - stmt.print(output); - }); - }); else output.print("{}"); - }); - AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output) { - if (this.body.length > 0) { - output.newline(); - this.body.forEach(function(stmt) { - output.indent(); - stmt.print(output); - output.newline(); - }); - } - }); - DEFPRINT(AST_Default, function(self, output) { - output.print("default:"); - self._do_print_body(output); - }); - DEFPRINT(AST_Case, function(self, output) { - output.print("case"); - output.space(); - self.expression.print(output); - output.print(":"); - self._do_print_body(output); - }); - DEFPRINT(AST_Try, function(self, output) { - output.print("try"); - output.space(); - print_bracketed(self.body, output); - if (self.bcatch) { - output.space(); - self.bcatch.print(output); - } - if (self.bfinally) { - output.space(); - self.bfinally.print(output); - } - }); - DEFPRINT(AST_Catch, function(self, output) { - output.print("catch"); - output.space(); - output.with_parens(function() { - self.argname.print(output); - }); - output.space(); - print_bracketed(self.body, output); - }); - DEFPRINT(AST_Finally, function(self, output) { - output.print("finally"); - output.space(); - print_bracketed(self.body, output); - }); - AST_Definitions.DEFMETHOD("_do_print", function(output, kind) { - output.print(kind); - output.space(); - this.definitions.forEach(function(def, i) { - if (i) output.comma(); - def.print(output); - }); - var p = output.parent(); - var in_for = p instanceof AST_For || p instanceof AST_ForIn; - var avoid_semicolon = in_for && p.init === this; - if (!avoid_semicolon) output.semicolon(); - }); - DEFPRINT(AST_Var, function(self, output) { - self._do_print(output, "var"); - }); - DEFPRINT(AST_Const, function(self, output) { - self._do_print(output, "const"); - }); - function parenthesize_for_noin(node, output, noin) { - if (!noin) node.print(output); else try { - node.walk(new TreeWalker(function(node) { - if (node instanceof AST_Binary && node.operator == "in") throw output; - })); - node.print(output); - } catch (ex) { - if (ex !== output) throw ex; - node.print(output, true); - } - } - DEFPRINT(AST_VarDef, function(self, output) { - self.name.print(output); - if (self.value) { - output.space(); - output.print("="); - output.space(); - var p = output.parent(1); - var noin = p instanceof AST_For || p instanceof AST_ForIn; - parenthesize_for_noin(self.value, output, noin); - } - }); - DEFPRINT(AST_Call, function(self, output) { - self.expression.print(output); - if (self instanceof AST_New && no_constructor_parens(self, output)) return; - output.with_parens(function() { - self.args.forEach(function(expr, i) { - if (i) output.comma(); - expr.print(output); - }); - }); - }); - DEFPRINT(AST_New, function(self, output) { - output.print("new"); - output.space(); - AST_Call.prototype._codegen(self, output); - }); - AST_Seq.DEFMETHOD("_do_print", function(output) { - this.car.print(output); - if (this.cdr) { - output.comma(); - if (output.should_break()) { - output.newline(); - output.indent(); - } - this.cdr.print(output); - } - }); - DEFPRINT(AST_Seq, function(self, output) { - self._do_print(output); - }); - DEFPRINT(AST_Dot, function(self, output) { - var expr = self.expression; - expr.print(output); - if (expr instanceof AST_Number && expr.getValue() >= 0) { - if (!/[xa-f.]/i.test(output.last())) { - output.print("."); - } - } - output.print("."); - output.add_mapping(self.end); - output.print_name(self.property); - }); - DEFPRINT(AST_Sub, function(self, output) { - self.expression.print(output); - output.print("["); - self.property.print(output); - output.print("]"); - }); - DEFPRINT(AST_UnaryPrefix, function(self, output) { - var op = self.operator; - output.print(op); - if (/^[a-z]/i.test(op)) output.space(); - self.expression.print(output); - }); - DEFPRINT(AST_UnaryPostfix, function(self, output) { - self.expression.print(output); - output.print(self.operator); - }); - DEFPRINT(AST_Binary, function(self, output) { - self.left.print(output); - output.space(); - output.print(self.operator); - output.space(); - self.right.print(output); - }); - DEFPRINT(AST_Conditional, function(self, output) { - self.condition.print(output); - output.space(); - output.print("?"); - output.space(); - self.consequent.print(output); - output.space(); - output.colon(); - self.alternative.print(output); - }); - DEFPRINT(AST_Array, function(self, output) { - output.with_square(function() { - var a = self.elements, len = a.length; - if (len > 0) output.space(); - a.forEach(function(exp, i) { - if (i) output.comma(); - exp.print(output); - if (i === len - 1 && exp instanceof AST_Hole) output.comma(); - }); - if (len > 0) output.space(); - }); - }); - DEFPRINT(AST_Object, function(self, output) { - if (self.properties.length > 0) output.with_block(function() { - self.properties.forEach(function(prop, i) { - if (i) { - output.print(","); - output.newline(); - } - output.indent(); - prop.print(output); - }); - output.newline(); - }); else output.print("{}"); - }); - DEFPRINT(AST_ObjectKeyVal, function(self, output) { - var key = self.key; - if (output.option("quote_keys")) { - output.print_string(key + ""); - } else if ((typeof key == "number" || !output.option("beautify") && +key + "" == key) && parseFloat(key) >= 0) { - output.print(make_num(key)); - } else if (RESERVED_WORDS(key) ? output.option("screw_ie8") : is_identifier_string(key)) { - output.print_name(key); - } else { - output.print_string(key); - } - output.colon(); - self.value.print(output); - }); - DEFPRINT(AST_ObjectSetter, function(self, output) { - output.print("set"); - self.value._do_print(output, true); - }); - DEFPRINT(AST_ObjectGetter, function(self, output) { - output.print("get"); - self.value._do_print(output, true); - }); - DEFPRINT(AST_Symbol, function(self, output) { - var def = self.definition(); - output.print_name(def ? def.mangled_name || def.name : self.name); - }); - DEFPRINT(AST_Undefined, function(self, output) { - output.print("void 0"); - }); - DEFPRINT(AST_Hole, noop); - DEFPRINT(AST_Infinity, function(self, output) { - output.print("1/0"); - }); - DEFPRINT(AST_NaN, function(self, output) { - output.print("0/0"); - }); - DEFPRINT(AST_This, function(self, output) { - output.print("this"); - }); - DEFPRINT(AST_Constant, function(self, output) { - output.print(self.getValue()); - }); - DEFPRINT(AST_String, function(self, output) { - output.print_string(self.getValue()); - }); - DEFPRINT(AST_Number, function(self, output) { - output.print(make_num(self.getValue())); - }); - DEFPRINT(AST_RegExp, function(self, output) { - var str = self.getValue().toString(); - if (output.option("ascii_only")) str = output.to_ascii(str); - output.print(str); - var p = output.parent(); - if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self) output.print(" "); - }); - function force_statement(stat, output) { - if (output.option("bracketize")) { - if (!stat || stat instanceof AST_EmptyStatement) output.print("{}"); else if (stat instanceof AST_BlockStatement) stat.print(output); else output.with_block(function() { - output.indent(); - stat.print(output); - output.newline(); - }); - } else { - if (!stat || stat instanceof AST_EmptyStatement) output.force_semicolon(); else stat.print(output); - } - } - function first_in_statement(output) { - var a = output.stack(), i = a.length, node = a[--i], p = a[--i]; - while (i > 0) { - if (p instanceof AST_Statement && p.body === node) return true; - if (p instanceof AST_Seq && p.car === node || p instanceof AST_Call && p.expression === node && !(p instanceof AST_New) || p instanceof AST_Dot && p.expression === node || p instanceof AST_Sub && p.expression === node || p instanceof AST_Conditional && p.condition === node || p instanceof AST_Binary && p.left === node || p instanceof AST_UnaryPostfix && p.expression === node) { - node = p; - p = a[--i]; - } else { - return false; - } - } - } - function no_constructor_parens(self, output) { - return self.args.length == 0 && !output.option("beautify"); - } - function best_of(a) { - var best = a[0], len = best.length; - for (var i = 1; i < a.length; ++i) { - if (a[i].length < len) { - best = a[i]; - len = best.length; - } - } - return best; - } - function make_num(num) { - var str = num.toString(10), a = [ str.replace(/^0\./, ".").replace("e+", "e") ], m; - if (Math.floor(num) === num) { - if (num >= 0) { - a.push("0x" + num.toString(16).toLowerCase(), "0" + num.toString(8)); - } else { - a.push("-0x" + (-num).toString(16).toLowerCase(), "-0" + (-num).toString(8)); - } - if (m = /^(.*?)(0+)$/.exec(num)) { - a.push(m[1] + "e" + m[2].length); - } - } else if (m = /^0?\.(0+)(.*)$/.exec(num)) { - a.push(m[2] + "e-" + (m[1].length + m[2].length), str.substr(str.indexOf("."))); - } - return best_of(a); - } - function make_block(stmt, output) { - if (stmt instanceof AST_BlockStatement) { - stmt.print(output); - return; - } - output.with_block(function() { - output.indent(); - stmt.print(output); - output.newline(); - }); - } - function DEFMAP(nodetype, generator) { - nodetype.DEFMETHOD("add_source_map", function(stream) { - generator(this, stream); - }); - } - DEFMAP(AST_Node, noop); - function basic_sourcemap_gen(self, output) { - output.add_mapping(self.start); - } - DEFMAP(AST_Directive, basic_sourcemap_gen); - DEFMAP(AST_Debugger, basic_sourcemap_gen); - DEFMAP(AST_Symbol, basic_sourcemap_gen); - DEFMAP(AST_Jump, basic_sourcemap_gen); - DEFMAP(AST_StatementWithBody, basic_sourcemap_gen); - DEFMAP(AST_LabeledStatement, noop); - DEFMAP(AST_Lambda, basic_sourcemap_gen); - DEFMAP(AST_Switch, basic_sourcemap_gen); - DEFMAP(AST_SwitchBranch, basic_sourcemap_gen); - DEFMAP(AST_BlockStatement, basic_sourcemap_gen); - DEFMAP(AST_Toplevel, noop); - DEFMAP(AST_New, basic_sourcemap_gen); - DEFMAP(AST_Try, basic_sourcemap_gen); - DEFMAP(AST_Catch, basic_sourcemap_gen); - DEFMAP(AST_Finally, basic_sourcemap_gen); - DEFMAP(AST_Definitions, basic_sourcemap_gen); - DEFMAP(AST_Constant, basic_sourcemap_gen); - DEFMAP(AST_ObjectProperty, function(self, output) { - output.add_mapping(self.start, self.key); - }); - })(); - "use strict"; - function Compressor(options, false_by_default) { - if (!(this instanceof Compressor)) return new Compressor(options, false_by_default); - TreeTransformer.call(this, this.before, this.after); - this.options = defaults(options, { - sequences: !false_by_default, - properties: !false_by_default, - dead_code: !false_by_default, - drop_debugger: !false_by_default, - unsafe: false, - unsafe_comps: false, - conditionals: !false_by_default, - comparisons: !false_by_default, - evaluate: !false_by_default, - booleans: !false_by_default, - loops: !false_by_default, - unused: !false_by_default, - hoist_funs: !false_by_default, - hoist_vars: false, - if_return: !false_by_default, - join_vars: !false_by_default, - cascade: !false_by_default, - side_effects: !false_by_default, - negate_iife: !false_by_default, - screw_ie8: false, - warnings: true, - global_defs: {} - }, true); - } - Compressor.prototype = new TreeTransformer(); - merge(Compressor.prototype, { - option: function(key) { - return this.options[key]; - }, - warn: function() { - if (this.options.warnings) AST_Node.warn.apply(AST_Node, arguments); - }, - before: function(node, descend, in_list) { - if (node._squeezed) return node; - if (node instanceof AST_Scope) { - node.drop_unused(this); - node = node.hoist_declarations(this); - } - descend(node, this); - node = node.optimize(this); - if (node instanceof AST_Scope) { - var save_warnings = this.options.warnings; - this.options.warnings = false; - node.drop_unused(this); - this.options.warnings = save_warnings; - } - node._squeezed = true; - return node; - } - }); - (function() { - function OPT(node, optimizer) { - node.DEFMETHOD("optimize", function(compressor) { - var self = this; - if (self._optimized) return self; - var opt = optimizer(self, compressor); - opt._optimized = true; - if (opt === self) return opt; - return opt.transform(compressor); - }); - } - OPT(AST_Node, function(self, compressor) { - return self; - }); - AST_Node.DEFMETHOD("equivalent_to", function(node) { - return this.print_to_string() == node.print_to_string(); - }); - function make_node(ctor, orig, props) { - if (!props) props = {}; - if (orig) { - if (!props.start) props.start = orig.start; - if (!props.end) props.end = orig.end; - } - return new ctor(props); - } - function make_node_from_constant(compressor, val, orig) { - if (val instanceof AST_Node) return val.transform(compressor); - switch (typeof val) { - case "string": - return make_node(AST_String, orig, { - value: val - }).optimize(compressor); - - case "number": - return make_node(isNaN(val) ? AST_NaN : AST_Number, orig, { - value: val - }).optimize(compressor); - - case "boolean": - return make_node(val ? AST_True : AST_False, orig).optimize(compressor); - - case "undefined": - return make_node(AST_Undefined, orig).optimize(compressor); - - default: - if (val === null) { - return make_node(AST_Null, orig).optimize(compressor); - } - if (val instanceof RegExp) { - return make_node(AST_RegExp, orig).optimize(compressor); - } - throw new Error(string_template("Can't handle constant of type: {type}", { - type: typeof val - })); - } - } - function as_statement_array(thing) { - if (thing === null) return []; - if (thing instanceof AST_BlockStatement) return thing.body; - if (thing instanceof AST_EmptyStatement) return []; - if (thing instanceof AST_Statement) return [ thing ]; - throw new Error("Can't convert thing to statement array"); - } - function is_empty(thing) { - if (thing === null) return true; - if (thing instanceof AST_EmptyStatement) return true; - if (thing instanceof AST_BlockStatement) return thing.body.length == 0; - return false; - } - function loop_body(x) { - if (x instanceof AST_Switch) return x; - if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) { - return x.body instanceof AST_BlockStatement ? x.body : x; - } - return x; - } - function tighten_body(statements, compressor) { - var CHANGED; - do { - CHANGED = false; - statements = eliminate_spurious_blocks(statements); - if (compressor.option("dead_code")) { - statements = eliminate_dead_code(statements, compressor); - } - if (compressor.option("if_return")) { - statements = handle_if_return(statements, compressor); - } - if (compressor.option("sequences")) { - statements = sequencesize(statements, compressor); - } - if (compressor.option("join_vars")) { - statements = join_consecutive_vars(statements, compressor); - } - } while (CHANGED); - if (compressor.option("negate_iife")) { - negate_iifes(statements, compressor); - } - return statements; - function eliminate_spurious_blocks(statements) { - var seen_dirs = []; - return statements.reduce(function(a, stat) { - if (stat instanceof AST_BlockStatement) { - CHANGED = true; - a.push.apply(a, eliminate_spurious_blocks(stat.body)); - } else if (stat instanceof AST_EmptyStatement) { - CHANGED = true; - } else if (stat instanceof AST_Directive) { - if (seen_dirs.indexOf(stat.value) < 0) { - a.push(stat); - seen_dirs.push(stat.value); - } else { - CHANGED = true; - } - } else { - a.push(stat); - } - return a; - }, []); - } - function handle_if_return(statements, compressor) { - var self = compressor.self(); - var in_lambda = self instanceof AST_Lambda; - var ret = []; - loop: for (var i = statements.length; --i >= 0; ) { - var stat = statements[i]; - switch (true) { - case in_lambda && stat instanceof AST_Return && !stat.value && ret.length == 0: - CHANGED = true; - continue loop; - - case stat instanceof AST_If: - if (stat.body instanceof AST_Return) { - if ((in_lambda && ret.length == 0 || ret[0] instanceof AST_Return && !ret[0].value) && !stat.body.value && !stat.alternative) { - CHANGED = true; - var cond = make_node(AST_SimpleStatement, stat.condition, { - body: stat.condition - }); - ret.unshift(cond); - continue loop; - } - if (ret[0] instanceof AST_Return && stat.body.value && ret[0].value && !stat.alternative) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = ret[0]; - ret[0] = stat.transform(compressor); - continue loop; - } - if ((ret.length == 0 || ret[0] instanceof AST_Return) && stat.body.value && !stat.alternative && in_lambda) { - CHANGED = true; - stat = stat.clone(); - stat.alternative = ret[0] || make_node(AST_Return, stat, { - value: make_node(AST_Undefined, stat) - }); - ret[0] = stat.transform(compressor); - continue loop; - } - if (!stat.body.value && in_lambda) { - CHANGED = true; - stat = stat.clone(); - stat.condition = stat.condition.negate(compressor); - stat.body = make_node(AST_BlockStatement, stat, { - body: as_statement_array(stat.alternative).concat(ret) - }); - stat.alternative = null; - ret = [ stat.transform(compressor) ]; - continue loop; - } - if (ret.length == 1 && in_lambda && ret[0] instanceof AST_SimpleStatement && (!stat.alternative || stat.alternative instanceof AST_SimpleStatement)) { - CHANGED = true; - ret.push(make_node(AST_Return, ret[0], { - value: make_node(AST_Undefined, ret[0]) - }).transform(compressor)); - ret = as_statement_array(stat.alternative).concat(ret); - ret.unshift(stat); - continue loop; - } - } - var ab = aborts(stat.body); - var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; - if (ab && (ab instanceof AST_Return && !ab.value && in_lambda || ab instanceof AST_Continue && self === loop_body(lct) || ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct)) { - if (ab.label) { - remove(ab.label.thedef.references, ab.label); - } - CHANGED = true; - var body = as_statement_array(stat.body).slice(0, -1); - stat = stat.clone(); - stat.condition = stat.condition.negate(compressor); - stat.body = make_node(AST_BlockStatement, stat, { - body: ret - }); - stat.alternative = make_node(AST_BlockStatement, stat, { - body: body - }); - ret = [ stat.transform(compressor) ]; - continue loop; - } - var ab = aborts(stat.alternative); - var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; - if (ab && (ab instanceof AST_Return && !ab.value && in_lambda || ab instanceof AST_Continue && self === loop_body(lct) || ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct)) { - if (ab.label) { - remove(ab.label.thedef.references, ab.label); - } - CHANGED = true; - stat = stat.clone(); - stat.body = make_node(AST_BlockStatement, stat.body, { - body: as_statement_array(stat.body).concat(ret) - }); - stat.alternative = make_node(AST_BlockStatement, stat.alternative, { - body: as_statement_array(stat.alternative).slice(0, -1) - }); - ret = [ stat.transform(compressor) ]; - continue loop; - } - ret.unshift(stat); - break; - - default: - ret.unshift(stat); - break; - } - } - return ret; - } - function eliminate_dead_code(statements, compressor) { - var has_quit = false; - var orig = statements.length; - var self = compressor.self(); - statements = statements.reduce(function(a, stat) { - if (has_quit) { - extract_declarations_from_unreachable_code(compressor, stat, a); - } else { - if (stat instanceof AST_LoopControl) { - var lct = compressor.loopcontrol_target(stat.label); - if (stat instanceof AST_Break && lct instanceof AST_BlockStatement && loop_body(lct) === self || stat instanceof AST_Continue && loop_body(lct) === self) { - if (stat.label) { - remove(stat.label.thedef.references, stat.label); - } - } else { - a.push(stat); - } - } else { - a.push(stat); - } - if (aborts(stat)) has_quit = true; - } - return a; - }, []); - CHANGED = statements.length != orig; - return statements; - } - function sequencesize(statements, compressor) { - if (statements.length < 2) return statements; - var seq = [], ret = []; - function push_seq() { - seq = AST_Seq.from_array(seq); - if (seq) ret.push(make_node(AST_SimpleStatement, seq, { - body: seq - })); - seq = []; - } - statements.forEach(function(stat) { - if (stat instanceof AST_SimpleStatement) seq.push(stat.body); else push_seq(), ret.push(stat); - }); - push_seq(); - ret = sequencesize_2(ret, compressor); - CHANGED = ret.length != statements.length; - return ret; - } - function sequencesize_2(statements, compressor) { - function cons_seq(right) { - ret.pop(); - var left = prev.body; - if (left instanceof AST_Seq) { - left.add(right); - } else { - left = AST_Seq.cons(left, right); - } - return left.transform(compressor); - } - var ret = [], prev = null; - statements.forEach(function(stat) { - if (prev) { - if (stat instanceof AST_For) { - var opera = {}; - try { - prev.body.walk(new TreeWalker(function(node) { - if (node instanceof AST_Binary && node.operator == "in") throw opera; - })); - if (stat.init && !(stat.init instanceof AST_Definitions)) { - stat.init = cons_seq(stat.init); - } else if (!stat.init) { - stat.init = prev.body; - ret.pop(); - } - } catch (ex) { - if (ex !== opera) throw ex; - } - } else if (stat instanceof AST_If) { - stat.condition = cons_seq(stat.condition); - } else if (stat instanceof AST_With) { - stat.expression = cons_seq(stat.expression); - } else if (stat instanceof AST_Exit && stat.value) { - stat.value = cons_seq(stat.value); - } else if (stat instanceof AST_Exit) { - stat.value = cons_seq(make_node(AST_Undefined, stat)); - } else if (stat instanceof AST_Switch) { - stat.expression = cons_seq(stat.expression); - } - } - ret.push(stat); - prev = stat instanceof AST_SimpleStatement ? stat : null; - }); - return ret; - } - function join_consecutive_vars(statements, compressor) { - var prev = null; - return statements.reduce(function(a, stat) { - if (stat instanceof AST_Definitions && prev && prev.TYPE == stat.TYPE) { - prev.definitions = prev.definitions.concat(stat.definitions); - CHANGED = true; - } else if (stat instanceof AST_For && prev instanceof AST_Definitions && (!stat.init || stat.init.TYPE == prev.TYPE)) { - CHANGED = true; - a.pop(); - if (stat.init) { - stat.init.definitions = prev.definitions.concat(stat.init.definitions); - } else { - stat.init = prev; - } - a.push(stat); - prev = stat; - } else { - prev = stat; - a.push(stat); - } - return a; - }, []); - } - function negate_iifes(statements, compressor) { - statements.forEach(function(stat) { - if (stat instanceof AST_SimpleStatement) { - stat.body = function transform(thing) { - return thing.transform(new TreeTransformer(function(node) { - if (node instanceof AST_Call && node.expression instanceof AST_Function) { - return make_node(AST_UnaryPrefix, node, { - operator: "!", - expression: node - }); - } else if (node instanceof AST_Call) { - node.expression = transform(node.expression); - } else if (node instanceof AST_Seq) { - node.car = transform(node.car); - } else if (node instanceof AST_Conditional) { - var expr = transform(node.condition); - if (expr !== node.condition) { - node.condition = expr; - var tmp = node.consequent; - node.consequent = node.alternative; - node.alternative = tmp; - } - } - return node; - })); - }(stat.body); - } - }); - } - } - function extract_declarations_from_unreachable_code(compressor, stat, target) { - compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); - stat.walk(new TreeWalker(function(node) { - if (node instanceof AST_Definitions) { - compressor.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start); - node.remove_initializers(); - target.push(node); - return true; - } - if (node instanceof AST_Defun) { - target.push(node); - return true; - } - if (node instanceof AST_Scope) { - return true; - } - })); - } - (function(def) { - var unary_bool = [ "!", "delete" ]; - var binary_bool = [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ]; - def(AST_Node, function() { - return false; - }); - def(AST_UnaryPrefix, function() { - return member(this.operator, unary_bool); - }); - def(AST_Binary, function() { - return member(this.operator, binary_bool) || (this.operator == "&&" || this.operator == "||") && this.left.is_boolean() && this.right.is_boolean(); - }); - def(AST_Conditional, function() { - return this.consequent.is_boolean() && this.alternative.is_boolean(); - }); - def(AST_Assign, function() { - return this.operator == "=" && this.right.is_boolean(); - }); - def(AST_Seq, function() { - return this.cdr.is_boolean(); - }); - def(AST_True, function() { - return true; - }); - def(AST_False, function() { - return true; - }); - })(function(node, func) { - node.DEFMETHOD("is_boolean", func); - }); - (function(def) { - def(AST_Node, function() { - return false; - }); - def(AST_String, function() { - return true; - }); - def(AST_UnaryPrefix, function() { - return this.operator == "typeof"; - }); - def(AST_Binary, function(compressor) { - return this.operator == "+" && (this.left.is_string(compressor) || this.right.is_string(compressor)); - }); - def(AST_Assign, function(compressor) { - return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor); - }); - def(AST_Seq, function(compressor) { - return this.cdr.is_string(compressor); - }); - def(AST_Conditional, function(compressor) { - return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); - }); - def(AST_Call, function(compressor) { - return compressor.option("unsafe") && this.expression instanceof AST_SymbolRef && this.expression.name == "String" && this.expression.undeclared(); - }); - })(function(node, func) { - node.DEFMETHOD("is_string", func); - }); - function best_of(ast1, ast2) { - return ast1.print_to_string().length > ast2.print_to_string().length ? ast2 : ast1; - } - (function(def) { - AST_Node.DEFMETHOD("evaluate", function(compressor) { - if (!compressor.option("evaluate")) return [ this ]; - try { - var val = this._eval(), ast = make_node_from_constant(compressor, val, this); - return [ best_of(ast, this), val ]; - } catch (ex) { - if (ex !== def) throw ex; - return [ this ]; - } - }); - def(AST_Statement, function() { - throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); - }); - def(AST_Function, function() { - throw def; - }); - function ev(node) { - return node._eval(); - } - def(AST_Node, function() { - throw def; - }); - def(AST_Constant, function() { - return this.getValue(); - }); - def(AST_UnaryPrefix, function() { - var e = this.expression; - switch (this.operator) { - case "!": - return !ev(e); - - case "typeof": - if (e instanceof AST_Function) return typeof function() {}; - e = ev(e); - if (e instanceof RegExp) throw def; - return typeof e; - - case "void": - return void ev(e); - - case "~": - return ~ev(e); - - case "-": - e = ev(e); - if (e === 0) throw def; - return -e; - - case "+": - return +ev(e); - } - throw def; - }); - def(AST_Binary, function() { - var left = this.left, right = this.right; - switch (this.operator) { - case "&&": - return ev(left) && ev(right); - - case "||": - return ev(left) || ev(right); - - case "|": - return ev(left) | ev(right); - - case "&": - return ev(left) & ev(right); - - case "^": - return ev(left) ^ ev(right); - - case "+": - return ev(left) + ev(right); - - case "*": - return ev(left) * ev(right); - - case "/": - return ev(left) / ev(right); - - case "%": - return ev(left) % ev(right); - - case "-": - return ev(left) - ev(right); - - case "<<": - return ev(left) << ev(right); - - case ">>": - return ev(left) >> ev(right); - - case ">>>": - return ev(left) >>> ev(right); - - case "==": - return ev(left) == ev(right); - - case "===": - return ev(left) === ev(right); - - case "!=": - return ev(left) != ev(right); - - case "!==": - return ev(left) !== ev(right); - - case "<": - return ev(left) < ev(right); - - case "<=": - return ev(left) <= ev(right); - - case ">": - return ev(left) > ev(right); - - case ">=": - return ev(left) >= ev(right); - - case "in": - return ev(left) in ev(right); - - case "instanceof": - return ev(left) instanceof ev(right); - } - throw def; - }); - def(AST_Conditional, function() { - return ev(this.condition) ? ev(this.consequent) : ev(this.alternative); - }); - def(AST_SymbolRef, function() { - var d = this.definition(); - if (d && d.constant && d.init) return ev(d.init); - throw def; - }); - })(function(node, func) { - node.DEFMETHOD("_eval", func); - }); - (function(def) { - function basic_negation(exp) { - return make_node(AST_UnaryPrefix, exp, { - operator: "!", - expression: exp - }); - } - def(AST_Node, function() { - return basic_negation(this); - }); - def(AST_Statement, function() { - throw new Error("Cannot negate a statement"); - }); - def(AST_Function, function() { - return basic_negation(this); - }); - def(AST_UnaryPrefix, function() { - if (this.operator == "!") return this.expression; - return basic_negation(this); - }); - def(AST_Seq, function(compressor) { - var self = this.clone(); - self.cdr = self.cdr.negate(compressor); - return self; - }); - def(AST_Conditional, function(compressor) { - var self = this.clone(); - self.consequent = self.consequent.negate(compressor); - self.alternative = self.alternative.negate(compressor); - return best_of(basic_negation(this), self); - }); - def(AST_Binary, function(compressor) { - var self = this.clone(), op = this.operator; - if (compressor.option("unsafe_comps")) { - switch (op) { - case "<=": - self.operator = ">"; - return self; - - case "<": - self.operator = ">="; - return self; - - case ">=": - self.operator = "<"; - return self; - - case ">": - self.operator = "<="; - return self; - } - } - switch (op) { - case "==": - self.operator = "!="; - return self; - - case "!=": - self.operator = "=="; - return self; - - case "===": - self.operator = "!=="; - return self; - - case "!==": - self.operator = "==="; - return self; - - case "&&": - self.operator = "||"; - self.left = self.left.negate(compressor); - self.right = self.right.negate(compressor); - return best_of(basic_negation(this), self); - - case "||": - self.operator = "&&"; - self.left = self.left.negate(compressor); - self.right = self.right.negate(compressor); - return best_of(basic_negation(this), self); - } - return basic_negation(this); - }); - })(function(node, func) { - node.DEFMETHOD("negate", function(compressor) { - return func.call(this, compressor); - }); - }); - (function(def) { - def(AST_Node, function() { - return true; - }); - def(AST_EmptyStatement, function() { - return false; - }); - def(AST_Constant, function() { - return false; - }); - def(AST_This, function() { - return false; - }); - def(AST_Block, function() { - for (var i = this.body.length; --i >= 0; ) { - if (this.body[i].has_side_effects()) return true; - } - return false; - }); - def(AST_SimpleStatement, function() { - return this.body.has_side_effects(); - }); - def(AST_Defun, function() { - return true; - }); - def(AST_Function, function() { - return false; - }); - def(AST_Binary, function() { - return this.left.has_side_effects() || this.right.has_side_effects(); - }); - def(AST_Assign, function() { - return true; - }); - def(AST_Conditional, function() { - return this.condition.has_side_effects() || this.consequent.has_side_effects() || this.alternative.has_side_effects(); - }); - def(AST_Unary, function() { - return this.operator == "delete" || this.operator == "++" || this.operator == "--" || this.expression.has_side_effects(); - }); - def(AST_SymbolRef, function() { - return false; - }); - def(AST_Object, function() { - for (var i = this.properties.length; --i >= 0; ) if (this.properties[i].has_side_effects()) return true; - return false; - }); - def(AST_ObjectProperty, function() { - return this.value.has_side_effects(); - }); - def(AST_Array, function() { - for (var i = this.elements.length; --i >= 0; ) if (this.elements[i].has_side_effects()) return true; - return false; - }); - def(AST_PropAccess, function() { - return true; - }); - def(AST_Seq, function() { - return this.car.has_side_effects() || this.cdr.has_side_effects(); - }); - })(function(node, func) { - node.DEFMETHOD("has_side_effects", func); - }); - function aborts(thing) { - return thing && thing.aborts(); - } - (function(def) { - def(AST_Statement, function() { - return null; - }); - def(AST_Jump, function() { - return this; - }); - function block_aborts() { - var n = this.body.length; - return n > 0 && aborts(this.body[n - 1]); - } - def(AST_BlockStatement, block_aborts); - def(AST_SwitchBranch, block_aborts); - def(AST_If, function() { - return this.alternative && aborts(this.body) && aborts(this.alternative); - }); - })(function(node, func) { - node.DEFMETHOD("aborts", func); - }); - OPT(AST_Directive, function(self, compressor) { - if (self.scope.has_directive(self.value) !== self.scope) { - return make_node(AST_EmptyStatement, self); - } - return self; - }); - OPT(AST_Debugger, function(self, compressor) { - if (compressor.option("drop_debugger")) return make_node(AST_EmptyStatement, self); - return self; - }); - OPT(AST_LabeledStatement, function(self, compressor) { - if (self.body instanceof AST_Break && compressor.loopcontrol_target(self.body.label) === self.body) { - return make_node(AST_EmptyStatement, self); - } - return self.label.references.length == 0 ? self.body : self; - }); - OPT(AST_Block, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return self; - }); - OPT(AST_BlockStatement, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - switch (self.body.length) { - case 1: - return self.body[0]; - - case 0: - return make_node(AST_EmptyStatement, self); - } - return self; - }); - AST_Scope.DEFMETHOD("drop_unused", function(compressor) { - var self = this; - if (compressor.option("unused") && !(self instanceof AST_Toplevel) && !self.uses_eval) { - var in_use = []; - var initializations = new Dictionary(); - var scope = this; - var tw = new TreeWalker(function(node, descend) { - if (node !== self) { - if (node instanceof AST_Defun) { - initializations.add(node.name.name, node); - return true; - } - if (node instanceof AST_Definitions && scope === self) { - node.definitions.forEach(function(def) { - if (def.value) { - initializations.add(def.name.name, def.value); - if (def.value.has_side_effects()) { - def.value.walk(tw); - } - } - }); - return true; - } - if (node instanceof AST_SymbolRef) { - push_uniq(in_use, node.definition()); - return true; - } - if (node instanceof AST_Scope) { - var save_scope = scope; - scope = node; - descend(); - scope = save_scope; - return true; - } - } - }); - self.walk(tw); - for (var i = 0; i < in_use.length; ++i) { - in_use[i].orig.forEach(function(decl) { - var init = initializations.get(decl.name); - if (init) init.forEach(function(init) { - var tw = new TreeWalker(function(node) { - if (node instanceof AST_SymbolRef) { - push_uniq(in_use, node.definition()); - } - }); - init.walk(tw); - }); - }); - } - var tt = new TreeTransformer(function before(node, descend, in_list) { - if (node instanceof AST_Lambda && !(node instanceof AST_Accessor)) { - for (var a = node.argnames, i = a.length; --i >= 0; ) { - var sym = a[i]; - if (sym.unreferenced()) { - a.pop(); - compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", { - name: sym.name, - file: sym.start.file, - line: sym.start.line, - col: sym.start.col - }); - } else break; - } - } - if (node instanceof AST_Defun && node !== self) { - if (!member(node.name.definition(), in_use)) { - compressor.warn("Dropping unused function {name} [{file}:{line},{col}]", { - name: node.name.name, - file: node.name.start.file, - line: node.name.start.line, - col: node.name.start.col - }); - return make_node(AST_EmptyStatement, node); - } - return node; - } - if (node instanceof AST_Definitions && !(tt.parent() instanceof AST_ForIn)) { - var def = node.definitions.filter(function(def) { - if (member(def.name.definition(), in_use)) return true; - var w = { - name: def.name.name, - file: def.name.start.file, - line: def.name.start.line, - col: def.name.start.col - }; - if (def.value && def.value.has_side_effects()) { - def._unused_side_effects = true; - compressor.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", w); - return true; - } - compressor.warn("Dropping unused variable {name} [{file}:{line},{col}]", w); - return false; - }); - def = mergeSort(def, function(a, b) { - if (!a.value && b.value) return -1; - if (!b.value && a.value) return 1; - return 0; - }); - var side_effects = []; - for (var i = 0; i < def.length; ) { - var x = def[i]; - if (x._unused_side_effects) { - side_effects.push(x.value); - def.splice(i, 1); - } else { - if (side_effects.length > 0) { - side_effects.push(x.value); - x.value = AST_Seq.from_array(side_effects); - side_effects = []; - } - ++i; - } - } - if (side_effects.length > 0) { - side_effects = make_node(AST_BlockStatement, node, { - body: [ make_node(AST_SimpleStatement, node, { - body: AST_Seq.from_array(side_effects) - }) ] - }); - } else { - side_effects = null; - } - if (def.length == 0 && !side_effects) { - return make_node(AST_EmptyStatement, node); - } - if (def.length == 0) { - return side_effects; - } - node.definitions = def; - if (side_effects) { - side_effects.body.unshift(node); - node = side_effects; - } - return node; - } - if (node instanceof AST_For && node.init instanceof AST_BlockStatement) { - descend(node, this); - var body = node.init.body.slice(0, -1); - node.init = node.init.body.slice(-1)[0].body; - body.push(node); - return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { - body: body - }); - } - if (node instanceof AST_Scope && node !== self) return node; - }); - self.transform(tt); - } - }); - AST_Scope.DEFMETHOD("hoist_declarations", function(compressor) { - var hoist_funs = compressor.option("hoist_funs"); - var hoist_vars = compressor.option("hoist_vars"); - var self = this; - if (hoist_funs || hoist_vars) { - var dirs = []; - var hoisted = []; - var vars = new Dictionary(), vars_found = 0, var_decl = 0; - self.walk(new TreeWalker(function(node) { - if (node instanceof AST_Scope && node !== self) return true; - if (node instanceof AST_Var) { - ++var_decl; - return true; - } - })); - hoist_vars = hoist_vars && var_decl > 1; - var tt = new TreeTransformer(function before(node) { - if (node !== self) { - if (node instanceof AST_Directive) { - dirs.push(node); - return make_node(AST_EmptyStatement, node); - } - if (node instanceof AST_Defun && hoist_funs) { - hoisted.push(node); - return make_node(AST_EmptyStatement, node); - } - if (node instanceof AST_Var && hoist_vars) { - node.definitions.forEach(function(def) { - vars.set(def.name.name, def); - ++vars_found; - }); - var seq = node.to_assignments(); - var p = tt.parent(); - if (p instanceof AST_ForIn && p.init === node) { - if (seq == null) return node.definitions[0].name; - return seq; - } - if (p instanceof AST_For && p.init === node) { - return seq; - } - if (!seq) return make_node(AST_EmptyStatement, node); - return make_node(AST_SimpleStatement, node, { - body: seq - }); - } - if (node instanceof AST_Scope) return node; - } - }); - self = self.transform(tt); - if (vars_found > 0) { - var defs = []; - vars.each(function(def, name) { - if (self instanceof AST_Lambda && find_if(function(x) { - return x.name == def.name.name; - }, self.argnames)) { - vars.del(name); - } else { - def = def.clone(); - def.value = null; - defs.push(def); - vars.set(name, def); - } - }); - if (defs.length > 0) { - for (var i = 0; i < self.body.length; ) { - if (self.body[i] instanceof AST_SimpleStatement) { - var expr = self.body[i].body, sym, assign; - if (expr instanceof AST_Assign && expr.operator == "=" && (sym = expr.left) instanceof AST_Symbol && vars.has(sym.name)) { - var def = vars.get(sym.name); - if (def.value) break; - def.value = expr.right; - remove(defs, def); - defs.push(def); - self.body.splice(i, 1); - continue; - } - if (expr instanceof AST_Seq && (assign = expr.car) instanceof AST_Assign && assign.operator == "=" && (sym = assign.left) instanceof AST_Symbol && vars.has(sym.name)) { - var def = vars.get(sym.name); - if (def.value) break; - def.value = assign.right; - remove(defs, def); - defs.push(def); - self.body[i].body = expr.cdr; - continue; - } - } - if (self.body[i] instanceof AST_EmptyStatement) { - self.body.splice(i, 1); - continue; - } - if (self.body[i] instanceof AST_BlockStatement) { - var tmp = [ i, 1 ].concat(self.body[i].body); - self.body.splice.apply(self.body, tmp); - continue; - } - break; - } - defs = make_node(AST_Var, self, { - definitions: defs - }); - hoisted.push(defs); - } - } - self.body = dirs.concat(hoisted, self.body); - } - return self; - }); - OPT(AST_SimpleStatement, function(self, compressor) { - if (compressor.option("side_effects")) { - if (!self.body.has_side_effects()) { - compressor.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); - return make_node(AST_EmptyStatement, self); - } - } - return self; - }); - OPT(AST_DWLoop, function(self, compressor) { - var cond = self.condition.evaluate(compressor); - self.condition = cond[0]; - if (!compressor.option("loops")) return self; - if (cond.length > 1) { - if (cond[1]) { - return make_node(AST_For, self, { - body: self.body - }); - } else if (self instanceof AST_While) { - if (compressor.option("dead_code")) { - var a = []; - extract_declarations_from_unreachable_code(compressor, self.body, a); - return make_node(AST_BlockStatement, self, { - body: a - }); - } - } - } - return self; - }); - function if_break_in_loop(self, compressor) { - function drop_it(rest) { - rest = as_statement_array(rest); - if (self.body instanceof AST_BlockStatement) { - self.body = self.body.clone(); - self.body.body = rest.concat(self.body.body.slice(1)); - self.body = self.body.transform(compressor); - } else { - self.body = make_node(AST_BlockStatement, self.body, { - body: rest - }).transform(compressor); - } - if_break_in_loop(self, compressor); - } - var first = self.body instanceof AST_BlockStatement ? self.body.body[0] : self.body; - if (first instanceof AST_If) { - if (first.body instanceof AST_Break && compressor.loopcontrol_target(first.body.label) === self) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition.negate(compressor) - }); - } else { - self.condition = first.condition.negate(compressor); - } - drop_it(first.alternative); - } else if (first.alternative instanceof AST_Break && compressor.loopcontrol_target(first.alternative.label) === self) { - if (self.condition) { - self.condition = make_node(AST_Binary, self.condition, { - left: self.condition, - operator: "&&", - right: first.condition - }); - } else { - self.condition = first.condition; - } - drop_it(first.body); - } - } - } - OPT(AST_While, function(self, compressor) { - if (!compressor.option("loops")) return self; - self = AST_DWLoop.prototype.optimize.call(self, compressor); - if (self instanceof AST_While) { - if_break_in_loop(self, compressor); - self = make_node(AST_For, self, self).transform(compressor); - } - return self; - }); - OPT(AST_For, function(self, compressor) { - var cond = self.condition; - if (cond) { - cond = cond.evaluate(compressor); - self.condition = cond[0]; - } - if (!compressor.option("loops")) return self; - if (cond) { - if (cond.length > 1 && !cond[1]) { - if (compressor.option("dead_code")) { - var a = []; - if (self.init instanceof AST_Statement) { - a.push(self.init); - } else if (self.init) { - a.push(make_node(AST_SimpleStatement, self.init, { - body: self.init - })); - } - extract_declarations_from_unreachable_code(compressor, self.body, a); - return make_node(AST_BlockStatement, self, { - body: a - }); - } - } - } - if_break_in_loop(self, compressor); - return self; - }); - OPT(AST_If, function(self, compressor) { - if (!compressor.option("conditionals")) return self; - var cond = self.condition.evaluate(compressor); - self.condition = cond[0]; - if (cond.length > 1) { - if (cond[1]) { - compressor.warn("Condition always true [{file}:{line},{col}]", self.condition.start); - if (compressor.option("dead_code")) { - var a = []; - if (self.alternative) { - extract_declarations_from_unreachable_code(compressor, self.alternative, a); - } - a.push(self.body); - return make_node(AST_BlockStatement, self, { - body: a - }).transform(compressor); - } - } else { - compressor.warn("Condition always false [{file}:{line},{col}]", self.condition.start); - if (compressor.option("dead_code")) { - var a = []; - extract_declarations_from_unreachable_code(compressor, self.body, a); - if (self.alternative) a.push(self.alternative); - return make_node(AST_BlockStatement, self, { - body: a - }).transform(compressor); - } - } - } - if (is_empty(self.alternative)) self.alternative = null; - var negated = self.condition.negate(compressor); - var negated_is_best = best_of(self.condition, negated) === negated; - if (self.alternative && negated_is_best) { - negated_is_best = false; - self.condition = negated; - var tmp = self.body; - self.body = self.alternative || make_node(AST_EmptyStatement); - self.alternative = tmp; - } - if (is_empty(self.body) && is_empty(self.alternative)) { - return make_node(AST_SimpleStatement, self.condition, { - body: self.condition - }).transform(compressor); - } - if (self.body instanceof AST_SimpleStatement && self.alternative instanceof AST_SimpleStatement) { - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Conditional, self, { - condition: self.condition, - consequent: self.body.body, - alternative: self.alternative.body - }) - }).transform(compressor); - } - if (is_empty(self.alternative) && self.body instanceof AST_SimpleStatement) { - if (negated_is_best) return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator: "||", - left: negated, - right: self.body.body - }) - }).transform(compressor); - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator: "&&", - left: self.condition, - right: self.body.body - }) - }).transform(compressor); - } - if (self.body instanceof AST_EmptyStatement && self.alternative && self.alternative instanceof AST_SimpleStatement) { - return make_node(AST_SimpleStatement, self, { - body: make_node(AST_Binary, self, { - operator: "||", - left: self.condition, - right: self.alternative.body - }) - }).transform(compressor); - } - if (self.body instanceof AST_Exit && self.alternative instanceof AST_Exit && self.body.TYPE == self.alternative.TYPE) { - return make_node(self.body.CTOR, self, { - value: make_node(AST_Conditional, self, { - condition: self.condition, - consequent: self.body.value || make_node(AST_Undefined, self.body).optimize(compressor), - alternative: self.alternative.value || make_node(AST_Undefined, self.alternative).optimize(compressor) - }) - }).transform(compressor); - } - if (self.body instanceof AST_If && !self.body.alternative && !self.alternative) { - self.condition = make_node(AST_Binary, self.condition, { - operator: "&&", - left: self.condition, - right: self.body.condition - }).transform(compressor); - self.body = self.body.body; - } - if (aborts(self.body)) { - if (self.alternative) { - var alt = self.alternative; - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, alt ] - }).transform(compressor); - } - } - if (aborts(self.alternative)) { - var body = self.body; - self.body = self.alternative; - self.condition = negated_is_best ? negated : self.condition.negate(compressor); - self.alternative = null; - return make_node(AST_BlockStatement, self, { - body: [ self, body ] - }).transform(compressor); - } - return self; - }); - OPT(AST_Switch, function(self, compressor) { - if (self.body.length == 0 && compressor.option("conditionals")) { - return make_node(AST_SimpleStatement, self, { - body: self.expression - }).transform(compressor); - } - for (;;) { - var last_branch = self.body[self.body.length - 1]; - if (last_branch) { - var stat = last_branch.body[last_branch.body.length - 1]; - if (stat instanceof AST_Break && loop_body(compressor.loopcontrol_target(stat.label)) === self) last_branch.body.pop(); - if (last_branch instanceof AST_Default && last_branch.body.length == 0) { - self.body.pop(); - continue; - } - } - break; - } - var exp = self.expression.evaluate(compressor); - out: if (exp.length == 2) try { - self.expression = exp[0]; - if (!compressor.option("dead_code")) break out; - var value = exp[1]; - var in_if = false; - var in_block = false; - var started = false; - var stopped = false; - var ruined = false; - var tt = new TreeTransformer(function(node, descend, in_list) { - if (node instanceof AST_Lambda || node instanceof AST_SimpleStatement) { - return node; - } else if (node instanceof AST_Switch && node === self) { - node = node.clone(); - descend(node, this); - return ruined ? node : make_node(AST_BlockStatement, node, { - body: node.body.reduce(function(a, branch) { - return a.concat(branch.body); - }, []) - }).transform(compressor); - } else if (node instanceof AST_If || node instanceof AST_Try) { - var save = in_if; - in_if = !in_block; - descend(node, this); - in_if = save; - return node; - } else if (node instanceof AST_StatementWithBody || node instanceof AST_Switch) { - var save = in_block; - in_block = true; - descend(node, this); - in_block = save; - return node; - } else if (node instanceof AST_Break && this.loopcontrol_target(node.label) === self) { - if (in_if) { - ruined = true; - return node; - } - if (in_block) return node; - stopped = true; - return in_list ? MAP.skip : make_node(AST_EmptyStatement, node); - } else if (node instanceof AST_SwitchBranch && this.parent() === self) { - if (stopped) return MAP.skip; - if (node instanceof AST_Case) { - var exp = node.expression.evaluate(compressor); - if (exp.length < 2) { - throw self; - } - if (exp[1] === value || started) { - started = true; - if (aborts(node)) stopped = true; - descend(node, this); - return node; - } - return MAP.skip; - } - descend(node, this); - return node; - } - }); - tt.stack = compressor.stack.slice(); - self = self.transform(tt); - } catch (ex) { - if (ex !== self) throw ex; - } - return self; - }); - OPT(AST_Case, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return self; - }); - OPT(AST_Try, function(self, compressor) { - self.body = tighten_body(self.body, compressor); - return self; - }); - AST_Definitions.DEFMETHOD("remove_initializers", function() { - this.definitions.forEach(function(def) { - def.value = null; - }); - }); - AST_Definitions.DEFMETHOD("to_assignments", function() { - var assignments = this.definitions.reduce(function(a, def) { - if (def.value) { - var name = make_node(AST_SymbolRef, def.name, def.name); - a.push(make_node(AST_Assign, def, { - operator: "=", - left: name, - right: def.value - })); - } - return a; - }, []); - if (assignments.length == 0) return null; - return AST_Seq.from_array(assignments); - }); - OPT(AST_Definitions, function(self, compressor) { - if (self.definitions.length == 0) return make_node(AST_EmptyStatement, self); - return self; - }); - OPT(AST_Function, function(self, compressor) { - self = AST_Lambda.prototype.optimize.call(self, compressor); - if (compressor.option("unused")) { - if (self.name && self.name.unreferenced()) { - self.name = null; - } - } - return self; - }); - OPT(AST_Call, function(self, compressor) { - if (compressor.option("unsafe")) { - var exp = self.expression; - if (exp instanceof AST_SymbolRef && exp.undeclared()) { - switch (exp.name) { - case "Array": - if (self.args.length != 1) { - return make_node(AST_Array, self, { - elements: self.args - }); - } - break; - - case "Object": - if (self.args.length == 0) { - return make_node(AST_Object, self, { - properties: [] - }); - } - break; - - case "String": - if (self.args.length == 0) return make_node(AST_String, self, { - value: "" - }); - return make_node(AST_Binary, self, { - left: self.args[0], - operator: "+", - right: make_node(AST_String, self, { - value: "" - }) - }); - - case "Function": - if (all(self.args, function(x) { - return x instanceof AST_String; - })) { - try { - var code = "(function(" + self.args.slice(0, -1).map(function(arg) { - return arg.value; - }).join(",") + "){" + self.args[self.args.length - 1].value + "})()"; - var ast = parse(code); - ast.figure_out_scope(); - var comp = new Compressor(compressor.options); - ast = ast.transform(comp); - ast.figure_out_scope(); - ast.mangle_names(); - var fun = ast.body[0].body.expression; - var args = fun.argnames.map(function(arg, i) { - return make_node(AST_String, self.args[i], { - value: arg.print_to_string() - }); - }); - var code = OutputStream(); - AST_BlockStatement.prototype._codegen.call(fun, fun, code); - code = code.toString().replace(/^\{|\}$/g, ""); - args.push(make_node(AST_String, self.args[self.args.length - 1], { - value: code - })); - self.args = args; - return self; - } catch (ex) { - if (ex instanceof JS_Parse_Error) { - compressor.warn("Error parsing code passed to new Function [{file}:{line},{col}]", self.args[self.args.length - 1].start); - compressor.warn(ex.toString()); - } else { - console.log(ex); - } - } - } - break; - } - } else if (exp instanceof AST_Dot && exp.property == "toString" && self.args.length == 0) { - return make_node(AST_Binary, self, { - left: make_node(AST_String, self, { - value: "" - }), - operator: "+", - right: exp.expression - }).transform(compressor); - } - } - if (compressor.option("side_effects")) { - if (self.expression instanceof AST_Function && self.args.length == 0 && !AST_Block.prototype.has_side_effects.call(self.expression)) { - return make_node(AST_Undefined, self).transform(compressor); - } - } - return self; - }); - OPT(AST_New, function(self, compressor) { - if (compressor.option("unsafe")) { - var exp = self.expression; - if (exp instanceof AST_SymbolRef && exp.undeclared()) { - switch (exp.name) { - case "Object": - case "RegExp": - case "Function": - case "Error": - case "Array": - return make_node(AST_Call, self, self).transform(compressor); - } - } - } - return self; - }); - OPT(AST_Seq, function(self, compressor) { - if (!compressor.option("side_effects")) return self; - if (!self.car.has_side_effects()) { - var p; - if (!(self.cdr instanceof AST_SymbolRef && self.cdr.name == "eval" && self.cdr.undeclared() && (p = compressor.parent()) instanceof AST_Call && p.expression === self)) { - return self.cdr; - } - } - if (compressor.option("cascade")) { - if (self.car instanceof AST_Assign && !self.car.left.has_side_effects() && self.car.left.equivalent_to(self.cdr)) { - return self.car; - } - if (!self.car.has_side_effects() && !self.cdr.has_side_effects() && self.car.equivalent_to(self.cdr)) { - return self.car; - } - } - return self; - }); - AST_Unary.DEFMETHOD("lift_sequences", function(compressor) { - if (compressor.option("sequences")) { - if (this.expression instanceof AST_Seq) { - var seq = this.expression; - var x = seq.to_array(); - this.expression = x.pop(); - x.push(this); - seq = AST_Seq.from_array(x).transform(compressor); - return seq; - } - } - return this; - }); - OPT(AST_UnaryPostfix, function(self, compressor) { - return self.lift_sequences(compressor); - }); - OPT(AST_UnaryPrefix, function(self, compressor) { - self = self.lift_sequences(compressor); - var e = self.expression; - if (compressor.option("booleans") && compressor.in_boolean_context()) { - switch (self.operator) { - case "!": - if (e instanceof AST_UnaryPrefix && e.operator == "!") { - return e.expression; - } - break; - - case "typeof": - compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start); - return make_node(AST_True, self); - } - if (e instanceof AST_Binary && self.operator == "!") { - self = best_of(self, e.negate(compressor)); - } - } - return self.evaluate(compressor)[0]; - }); - AST_Binary.DEFMETHOD("lift_sequences", function(compressor) { - if (compressor.option("sequences")) { - if (this.left instanceof AST_Seq) { - var seq = this.left; - var x = seq.to_array(); - this.left = x.pop(); - x.push(this); - seq = AST_Seq.from_array(x).transform(compressor); - return seq; - } - if (this.right instanceof AST_Seq && !(this.operator == "||" || this.operator == "&&") && !this.left.has_side_effects()) { - var seq = this.right; - var x = seq.to_array(); - this.right = x.pop(); - x.push(this); - seq = AST_Seq.from_array(x).transform(compressor); - return seq; - } - } - return this; - }); - var commutativeOperators = makePredicate("== === != !== * & | ^"); - OPT(AST_Binary, function(self, compressor) { - var reverse = compressor.has_directive("use asm") ? noop : function(op, force) { - if (force || !(self.left.has_side_effects() || self.right.has_side_effects())) { - if (op) self.operator = op; - var tmp = self.left; - self.left = self.right; - self.right = tmp; - } - }; - if (commutativeOperators(self.operator)) { - if (self.right instanceof AST_Constant && !(self.left instanceof AST_Constant)) { - reverse(null, true); - } - } - self = self.lift_sequences(compressor); - if (compressor.option("comparisons")) switch (self.operator) { - case "===": - case "!==": - if (self.left.is_string(compressor) && self.right.is_string(compressor) || self.left.is_boolean() && self.right.is_boolean()) { - self.operator = self.operator.substr(0, 2); - } - - case "==": - case "!=": - if (self.left instanceof AST_String && self.left.value == "undefined" && self.right instanceof AST_UnaryPrefix && self.right.operator == "typeof" && compressor.option("unsafe")) { - if (!(self.right.expression instanceof AST_SymbolRef) || !self.right.expression.undeclared()) { - self.right = self.right.expression; - self.left = make_node(AST_Undefined, self.left).optimize(compressor); - if (self.operator.length == 2) self.operator += "="; - } - } - break; - } - if (compressor.option("booleans") && compressor.in_boolean_context()) switch (self.operator) { - case "&&": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll.length > 1 && !ll[1] || rr.length > 1 && !rr[1]) { - compressor.warn("Boolean && always false [{file}:{line},{col}]", self.start); - return make_node(AST_False, self); - } - if (ll.length > 1 && ll[1]) { - return rr[0]; - } - if (rr.length > 1 && rr[1]) { - return ll[0]; - } - break; - - case "||": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll.length > 1 && ll[1] || rr.length > 1 && rr[1]) { - compressor.warn("Boolean || always true [{file}:{line},{col}]", self.start); - return make_node(AST_True, self); - } - if (ll.length > 1 && !ll[1]) { - return rr[0]; - } - if (rr.length > 1 && !rr[1]) { - return ll[0]; - } - break; - - case "+": - var ll = self.left.evaluate(compressor); - var rr = self.right.evaluate(compressor); - if (ll.length > 1 && ll[0] instanceof AST_String && ll[1] || rr.length > 1 && rr[0] instanceof AST_String && rr[1]) { - compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); - return make_node(AST_True, self); - } - break; - } - var exp = self.evaluate(compressor); - if (exp.length > 1) { - if (best_of(exp[0], self) !== self) return exp[0]; - } - if (compressor.option("comparisons")) { - if (!(compressor.parent() instanceof AST_Binary) || compressor.parent() instanceof AST_Assign) { - var negated = make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: self.negate(compressor) - }); - self = best_of(self, negated); - } - switch (self.operator) { - case "<": - reverse(">"); - break; - - case "<=": - reverse(">="); - break; - } - } - if (self.operator == "+" && self.right instanceof AST_String && self.right.getValue() === "" && self.left instanceof AST_Binary && self.left.operator == "+" && self.left.is_string(compressor)) { - return self.left; - } - return self; - }); - OPT(AST_SymbolRef, function(self, compressor) { - if (self.undeclared()) { - var defines = compressor.option("global_defs"); - if (defines && defines.hasOwnProperty(self.name)) { - return make_node_from_constant(compressor, defines[self.name], self); - } - switch (self.name) { - case "undefined": - return make_node(AST_Undefined, self); - - case "NaN": - return make_node(AST_NaN, self); - - case "Infinity": - return make_node(AST_Infinity, self); - } - } - return self; - }); - OPT(AST_Undefined, function(self, compressor) { - if (compressor.option("unsafe")) { - var scope = compressor.find_parent(AST_Scope); - var undef = scope.find_variable("undefined"); - if (undef) { - var ref = make_node(AST_SymbolRef, self, { - name: "undefined", - scope: scope, - thedef: undef - }); - ref.reference(); - return ref; - } - } - return self; - }); - var ASSIGN_OPS = [ "+", "-", "/", "*", "%", ">>", "<<", ">>>", "|", "^", "&" ]; - OPT(AST_Assign, function(self, compressor) { - self = self.lift_sequences(compressor); - if (self.operator == "=" && self.left instanceof AST_SymbolRef && self.right instanceof AST_Binary && self.right.left instanceof AST_SymbolRef && self.right.left.name == self.left.name && member(self.right.operator, ASSIGN_OPS)) { - self.operator = self.right.operator + "="; - self.right = self.right.right; - } - return self; - }); - OPT(AST_Conditional, function(self, compressor) { - if (!compressor.option("conditionals")) return self; - if (self.condition instanceof AST_Seq) { - var car = self.condition.car; - self.condition = self.condition.cdr; - return AST_Seq.cons(car, self); - } - var cond = self.condition.evaluate(compressor); - if (cond.length > 1) { - if (cond[1]) { - compressor.warn("Condition always true [{file}:{line},{col}]", self.start); - return self.consequent; - } else { - compressor.warn("Condition always false [{file}:{line},{col}]", self.start); - return self.alternative; - } - } - var negated = cond[0].negate(compressor); - if (best_of(cond[0], negated) === negated) { - self = make_node(AST_Conditional, self, { - condition: negated, - consequent: self.alternative, - alternative: self.consequent - }); - } - var consequent = self.consequent; - var alternative = self.alternative; - if (consequent instanceof AST_Assign && alternative instanceof AST_Assign && consequent.operator == alternative.operator && consequent.left.equivalent_to(alternative.left)) { - self = make_node(AST_Assign, self, { - operator: consequent.operator, - left: consequent.left, - right: make_node(AST_Conditional, self, { - condition: self.condition, - consequent: consequent.right, - alternative: alternative.right - }) - }); - } - return self; - }); - OPT(AST_Boolean, function(self, compressor) { - if (compressor.option("booleans")) { - var p = compressor.parent(); - if (p instanceof AST_Binary && (p.operator == "==" || p.operator == "!=")) { - compressor.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { - operator: p.operator, - value: self.value, - file: p.start.file, - line: p.start.line, - col: p.start.col - }); - return make_node(AST_Number, self, { - value: +self.value - }); - } - return make_node(AST_UnaryPrefix, self, { - operator: "!", - expression: make_node(AST_Number, self, { - value: 1 - self.value - }) - }); - } - return self; - }); - OPT(AST_Sub, function(self, compressor) { - var prop = self.property; - if (prop instanceof AST_String && compressor.option("properties")) { - prop = prop.getValue(); - if (RESERVED_WORDS(prop) ? compressor.option("screw_ie8") : is_identifier_string(prop)) { - return make_node(AST_Dot, self, { - expression: self.expression, - property: prop - }); - } - } - return self; - }); - function literals_in_boolean_context(self, compressor) { - if (compressor.option("booleans") && compressor.in_boolean_context()) { - return make_node(AST_True, self); - } - return self; - } - OPT(AST_Array, literals_in_boolean_context); - OPT(AST_Object, literals_in_boolean_context); - OPT(AST_RegExp, literals_in_boolean_context); - })(); - "use strict"; - function SourceMap(options) { - options = defaults(options, { - file: null, - root: null, - orig: null - }); - var generator = new MOZ_SourceMap.SourceMapGenerator({ - file: options.file, - sourceRoot: options.root - }); - var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); - function add(source, gen_line, gen_col, orig_line, orig_col, name) { - if (orig_map) { - var info = orig_map.originalPositionFor({ - line: orig_line, - column: orig_col - }); - source = info.source; - orig_line = info.line; - orig_col = info.column; - name = info.name; - } - generator.addMapping({ - generated: { - line: gen_line, - column: gen_col - }, - original: { - line: orig_line, - column: orig_col - }, - source: source, - name: name - }); - } - return { - add: add, - get: function() { - return generator; - }, - toString: function() { - return generator.toString(); - } - }; - } - "use strict"; - (function() { - var MOZ_TO_ME = { - TryStatement: function(M) { - return new AST_Try({ - start: my_start_token(M), - end: my_end_token(M), - body: from_moz(M.block).body, - bcatch: from_moz(M.handlers[0]), - bfinally: M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null - }); - }, - CatchClause: function(M) { - return new AST_Catch({ - start: my_start_token(M), - end: my_end_token(M), - argname: from_moz(M.param), - body: from_moz(M.body).body - }); - }, - ObjectExpression: function(M) { - return new AST_Object({ - start: my_start_token(M), - end: my_end_token(M), - properties: M.properties.map(function(prop) { - var key = prop.key; - var name = key.type == "Identifier" ? key.name : key.value; - var args = { - start: my_start_token(key), - end: my_end_token(prop.value), - key: name, - value: from_moz(prop.value) - }; - switch (prop.kind) { - case "init": - return new AST_ObjectKeyVal(args); - - case "set": - args.value.name = from_moz(key); - return new AST_ObjectSetter(args); - - case "get": - args.value.name = from_moz(key); - return new AST_ObjectGetter(args); - } - }) - }); - }, - SequenceExpression: function(M) { - return AST_Seq.from_array(M.expressions.map(from_moz)); - }, - MemberExpression: function(M) { - return new (M.computed ? AST_Sub : AST_Dot)({ - start: my_start_token(M), - end: my_end_token(M), - property: M.computed ? from_moz(M.property) : M.property.name, - expression: from_moz(M.object) - }); - }, - SwitchCase: function(M) { - return new (M.test ? AST_Case : AST_Default)({ - start: my_start_token(M), - end: my_end_token(M), - expression: from_moz(M.test), - body: M.consequent.map(from_moz) - }); - }, - Literal: function(M) { - var val = M.value, args = { - start: my_start_token(M), - end: my_end_token(M) - }; - if (val === null) return new AST_Null(args); - switch (typeof val) { - case "string": - args.value = val; - return new AST_String(args); - - case "number": - args.value = val; - return new AST_Number(args); - - case "boolean": - return new (val ? AST_True : AST_False)(args); - - default: - args.value = val; - return new AST_RegExp(args); - } - }, - UnaryExpression: From_Moz_Unary, - UpdateExpression: From_Moz_Unary, - Identifier: function(M) { - var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2]; - return new (M.name == "this" ? AST_This : p.type == "LabeledStatement" ? AST_Label : p.type == "VariableDeclarator" && p.id === M ? p.kind == "const" ? AST_SymbolConst : AST_SymbolVar : p.type == "FunctionExpression" ? p.id === M ? AST_SymbolLambda : AST_SymbolFunarg : p.type == "FunctionDeclaration" ? p.id === M ? AST_SymbolDefun : AST_SymbolFunarg : p.type == "CatchClause" ? AST_SymbolCatch : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef : AST_SymbolRef)({ - start: my_start_token(M), - end: my_end_token(M), - name: M.name - }); - } - }; - function From_Moz_Unary(M) { - var prefix = "prefix" in M ? M.prefix : M.type == "UnaryExpression" ? true : false; - return new (prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ - start: my_start_token(M), - end: my_end_token(M), - operator: M.operator, - expression: from_moz(M.argument) - }); - } - var ME_TO_MOZ = {}; - map("Node", AST_Node); - map("Program", AST_Toplevel, "body@body"); - map("Function", AST_Function, "id>name, params@argnames, body%body"); - map("EmptyStatement", AST_EmptyStatement); - map("BlockStatement", AST_BlockStatement, "body@body"); - map("ExpressionStatement", AST_SimpleStatement, "expression>body"); - map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); - map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); - map("BreakStatement", AST_Break, "label>label"); - map("ContinueStatement", AST_Continue, "label>label"); - map("WithStatement", AST_With, "object>expression, body>body"); - map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); - map("ReturnStatement", AST_Return, "argument>value"); - map("ThrowStatement", AST_Throw, "argument>value"); - map("WhileStatement", AST_While, "test>condition, body>body"); - map("DoWhileStatement", AST_Do, "test>condition, body>body"); - map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); - map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); - map("DebuggerStatement", AST_Debugger); - map("FunctionDeclaration", AST_Defun, "id>name, params@argnames, body%body"); - map("VariableDeclaration", AST_Var, "declarations@definitions"); - map("VariableDeclarator", AST_VarDef, "id>name, init>value"); - map("ThisExpression", AST_This); - map("ArrayExpression", AST_Array, "elements@elements"); - map("FunctionExpression", AST_Function, "id>name, params@argnames, body%body"); - map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); - map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); - map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); - map("NewExpression", AST_New, "callee>expression, arguments@args"); - map("CallExpression", AST_Call, "callee>expression, arguments@args"); - function my_start_token(moznode) { - return new AST_Token({ - file: moznode.loc && moznode.loc.source, - line: moznode.loc && moznode.loc.start.line, - col: moznode.loc && moznode.loc.start.column, - pos: moznode.start, - endpos: moznode.start - }); - } - function my_end_token(moznode) { - return new AST_Token({ - file: moznode.loc && moznode.loc.source, - line: moznode.loc && moznode.loc.end.line, - col: moznode.loc && moznode.loc.end.column, - pos: moznode.end, - endpos: moznode.end - }); - } - function map(moztype, mytype, propmap) { - var moz_to_me = "function From_Moz_" + moztype + "(M){\n"; - moz_to_me += "return new mytype({\n" + "start: my_start_token(M),\n" + "end: my_end_token(M)"; - if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop) { - var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); - if (!m) throw new Error("Can't understand property map: " + prop); - var moz = "M." + m[1], how = m[2], my = m[3]; - moz_to_me += ",\n" + my + ": "; - if (how == "@") { - moz_to_me += moz + ".map(from_moz)"; - } else if (how == ">") { - moz_to_me += "from_moz(" + moz + ")"; - } else if (how == "=") { - moz_to_me += moz; - } else if (how == "%") { - moz_to_me += "from_moz(" + moz + ").body"; - } else throw new Error("Can't understand operator in propmap: " + prop); - }); - moz_to_me += "\n})}"; - moz_to_me = new Function("mytype", "my_start_token", "my_end_token", "from_moz", "return(" + moz_to_me + ")")(mytype, my_start_token, my_end_token, from_moz); - return MOZ_TO_ME[moztype] = moz_to_me; - } - var FROM_MOZ_STACK = null; - function from_moz(node) { - FROM_MOZ_STACK.push(node); - var ret = node != null ? MOZ_TO_ME[node.type](node) : null; - FROM_MOZ_STACK.pop(); - return ret; - } - AST_Node.from_mozilla_ast = function(node) { - var save_stack = FROM_MOZ_STACK; - FROM_MOZ_STACK = []; - var ast = from_moz(node); - FROM_MOZ_STACK = save_stack; - return ast; - }; - })(); - exports["array_to_hash"] = array_to_hash; - exports["slice"] = slice; - exports["characters"] = characters; - exports["member"] = member; - exports["find_if"] = find_if; - exports["repeat_string"] = repeat_string; - exports["DefaultsError"] = DefaultsError; - exports["defaults"] = defaults; - exports["merge"] = merge; - exports["noop"] = noop; - exports["MAP"] = MAP; - exports["push_uniq"] = push_uniq; - exports["string_template"] = string_template; - exports["remove"] = remove; - exports["mergeSort"] = mergeSort; - exports["set_difference"] = set_difference; - exports["set_intersection"] = set_intersection; - exports["makePredicate"] = makePredicate; - exports["all"] = all; - exports["Dictionary"] = Dictionary; - exports["DEFNODE"] = DEFNODE; - exports["AST_Token"] = AST_Token; - exports["AST_Node"] = AST_Node; - exports["AST_Statement"] = AST_Statement; - exports["AST_Debugger"] = AST_Debugger; - exports["AST_Directive"] = AST_Directive; - exports["AST_SimpleStatement"] = AST_SimpleStatement; - exports["walk_body"] = walk_body; - exports["AST_Block"] = AST_Block; - exports["AST_BlockStatement"] = AST_BlockStatement; - exports["AST_EmptyStatement"] = AST_EmptyStatement; - exports["AST_StatementWithBody"] = AST_StatementWithBody; - exports["AST_LabeledStatement"] = AST_LabeledStatement; - exports["AST_DWLoop"] = AST_DWLoop; - exports["AST_Do"] = AST_Do; - exports["AST_While"] = AST_While; - exports["AST_For"] = AST_For; - exports["AST_ForIn"] = AST_ForIn; - exports["AST_With"] = AST_With; - exports["AST_Scope"] = AST_Scope; - exports["AST_Toplevel"] = AST_Toplevel; - exports["AST_Lambda"] = AST_Lambda; - exports["AST_Accessor"] = AST_Accessor; - exports["AST_Function"] = AST_Function; - exports["AST_Defun"] = AST_Defun; - exports["AST_Jump"] = AST_Jump; - exports["AST_Exit"] = AST_Exit; - exports["AST_Return"] = AST_Return; - exports["AST_Throw"] = AST_Throw; - exports["AST_LoopControl"] = AST_LoopControl; - exports["AST_Break"] = AST_Break; - exports["AST_Continue"] = AST_Continue; - exports["AST_If"] = AST_If; - exports["AST_Switch"] = AST_Switch; - exports["AST_SwitchBranch"] = AST_SwitchBranch; - exports["AST_Default"] = AST_Default; - exports["AST_Case"] = AST_Case; - exports["AST_Try"] = AST_Try; - exports["AST_Catch"] = AST_Catch; - exports["AST_Finally"] = AST_Finally; - exports["AST_Definitions"] = AST_Definitions; - exports["AST_Var"] = AST_Var; - exports["AST_Const"] = AST_Const; - exports["AST_VarDef"] = AST_VarDef; - exports["AST_Call"] = AST_Call; - exports["AST_New"] = AST_New; - exports["AST_Seq"] = AST_Seq; - exports["AST_PropAccess"] = AST_PropAccess; - exports["AST_Dot"] = AST_Dot; - exports["AST_Sub"] = AST_Sub; - exports["AST_Unary"] = AST_Unary; - exports["AST_UnaryPrefix"] = AST_UnaryPrefix; - exports["AST_UnaryPostfix"] = AST_UnaryPostfix; - exports["AST_Binary"] = AST_Binary; - exports["AST_Conditional"] = AST_Conditional; - exports["AST_Assign"] = AST_Assign; - exports["AST_Array"] = AST_Array; - exports["AST_Object"] = AST_Object; - exports["AST_ObjectProperty"] = AST_ObjectProperty; - exports["AST_ObjectKeyVal"] = AST_ObjectKeyVal; - exports["AST_ObjectSetter"] = AST_ObjectSetter; - exports["AST_ObjectGetter"] = AST_ObjectGetter; - exports["AST_Symbol"] = AST_Symbol; - exports["AST_SymbolAccessor"] = AST_SymbolAccessor; - exports["AST_SymbolDeclaration"] = AST_SymbolDeclaration; - exports["AST_SymbolVar"] = AST_SymbolVar; - exports["AST_SymbolConst"] = AST_SymbolConst; - exports["AST_SymbolFunarg"] = AST_SymbolFunarg; - exports["AST_SymbolDefun"] = AST_SymbolDefun; - exports["AST_SymbolLambda"] = AST_SymbolLambda; - exports["AST_SymbolCatch"] = AST_SymbolCatch; - exports["AST_Label"] = AST_Label; - exports["AST_SymbolRef"] = AST_SymbolRef; - exports["AST_LabelRef"] = AST_LabelRef; - exports["AST_This"] = AST_This; - exports["AST_Constant"] = AST_Constant; - exports["AST_String"] = AST_String; - exports["AST_Number"] = AST_Number; - exports["AST_RegExp"] = AST_RegExp; - exports["AST_Atom"] = AST_Atom; - exports["AST_Null"] = AST_Null; - exports["AST_NaN"] = AST_NaN; - exports["AST_Undefined"] = AST_Undefined; - exports["AST_Hole"] = AST_Hole; - exports["AST_Infinity"] = AST_Infinity; - exports["AST_Boolean"] = AST_Boolean; - exports["AST_False"] = AST_False; - exports["AST_True"] = AST_True; - exports["TreeWalker"] = TreeWalker; - exports["KEYWORDS"] = KEYWORDS; - exports["KEYWORDS_ATOM"] = KEYWORDS_ATOM; - exports["RESERVED_WORDS"] = RESERVED_WORDS; - exports["KEYWORDS_BEFORE_EXPRESSION"] = KEYWORDS_BEFORE_EXPRESSION; - exports["OPERATOR_CHARS"] = OPERATOR_CHARS; - exports["RE_HEX_NUMBER"] = RE_HEX_NUMBER; - exports["RE_OCT_NUMBER"] = RE_OCT_NUMBER; - exports["RE_DEC_NUMBER"] = RE_DEC_NUMBER; - exports["OPERATORS"] = OPERATORS; - exports["WHITESPACE_CHARS"] = WHITESPACE_CHARS; - exports["PUNC_BEFORE_EXPRESSION"] = PUNC_BEFORE_EXPRESSION; - exports["PUNC_CHARS"] = PUNC_CHARS; - exports["REGEXP_MODIFIERS"] = REGEXP_MODIFIERS; - exports["UNICODE"] = UNICODE; - exports["is_letter"] = is_letter; - exports["is_digit"] = is_digit; - exports["is_alphanumeric_char"] = is_alphanumeric_char; - exports["is_unicode_combining_mark"] = is_unicode_combining_mark; - exports["is_unicode_connector_punctuation"] = is_unicode_connector_punctuation; - exports["is_identifier"] = is_identifier; - exports["is_identifier_start"] = is_identifier_start; - exports["is_identifier_char"] = is_identifier_char; - exports["is_identifier_string"] = is_identifier_string; - exports["parse_js_number"] = parse_js_number; - exports["JS_Parse_Error"] = JS_Parse_Error; - exports["js_error"] = js_error; - exports["is_token"] = is_token; - exports["EX_EOF"] = EX_EOF; - exports["tokenizer"] = tokenizer; - exports["UNARY_PREFIX"] = UNARY_PREFIX; - exports["UNARY_POSTFIX"] = UNARY_POSTFIX; - exports["ASSIGNMENT"] = ASSIGNMENT; - exports["PRECEDENCE"] = PRECEDENCE; - exports["STATEMENTS_WITH_LABELS"] = STATEMENTS_WITH_LABELS; - exports["ATOMIC_START_TOKEN"] = ATOMIC_START_TOKEN; - exports["parse"] = parse; - exports["TreeTransformer"] = TreeTransformer; - exports["SymbolDef"] = SymbolDef; - exports["base54"] = base54; - exports["OutputStream"] = OutputStream; - exports["Compressor"] = Compressor; - exports["SourceMap"] = SourceMap; -})({}, function() { - return exports; -}()); - -var UglifyJS = exports.UglifyJS; - -UglifyJS.AST_Node.warn_function = function(txt) { - logger.error("uglifyjs2 WARN: " + txt); -}; - -//JRB: MODIFIED FROM UGLIFY SOURCE -//to take a name for the file, and then set toplevel.filename to be that name. -exports.minify = function(files, options, name) { - options = UglifyJS.defaults(options, { - outSourceMap : null, - sourceRoot : null, - inSourceMap : null, - fromString : false, - warnings : false, - mangle : {}, - output : null, - compress : {} - }); - if (typeof files == "string") - files = [ files ]; - - UglifyJS.base54.reset(); - - // 1. parse - var toplevel = null; - files.forEach(function(file){ - var code = options.fromString - ? file - : rjsFile.readFile(file, "utf8"); - toplevel = UglifyJS.parse(code, { - filename: options.fromString ? name : file, - toplevel: toplevel - }); - }); - - // 2. compress - if (options.compress) { - var compress = { warnings: options.warnings }; - UglifyJS.merge(compress, options.compress); - toplevel.figure_out_scope(); - var sq = UglifyJS.Compressor(compress); - toplevel = toplevel.transform(sq); - } - - // 3. mangle - if (options.mangle) { - toplevel.figure_out_scope(); - toplevel.compute_char_frequency(); - toplevel.mangle_names(options.mangle); - } - - // 4. output - var inMap = options.inSourceMap; - var output = {}; - if (typeof options.inSourceMap == "string") { - inMap = rjsFile.readFile(options.inSourceMap, "utf8"); - } - if (options.outSourceMap) { - output.source_map = UglifyJS.SourceMap({ - file: options.outSourceMap, - orig: inMap, - root: options.sourceRoot - }); - } - if (options.output) { - UglifyJS.merge(output, options.output); - } - var stream = UglifyJS.OutputStream(output); - toplevel.print(stream); - return { - code : stream + "", - map : output.source_map + "" - }; -}; - -// exports.describe_ast = function() { -// function doitem(ctor) { -// var sub = {}; -// ctor.SUBCLASSES.forEach(function(ctor){ -// sub[ctor.TYPE] = doitem(ctor); -// }); -// var ret = {}; -// if (ctor.SELF_PROPS.length > 0) ret.props = ctor.SELF_PROPS; -// if (ctor.SUBCLASSES.length > 0) ret.sub = sub; -// return ret; -// } -// return doitem(UglifyJS.AST_Node).sub; -// } - -exports.describe_ast = function() { - var out = UglifyJS.OutputStream({ beautify: true }); - function doitem(ctor) { - out.print("AST_" + ctor.TYPE); - var props = ctor.SELF_PROPS.filter(function(prop){ - return !/^\$/.test(prop); - }); - if (props.length > 0) { - out.space(); - out.with_parens(function(){ - props.forEach(function(prop, i){ - if (i) out.space(); - out.print(prop); - }); - }); - } - if (ctor.documentation) { - out.space(); - out.print_string(ctor.documentation); - } - if (ctor.SUBCLASSES.length > 0) { - out.space(); - out.with_block(function(){ - ctor.SUBCLASSES.forEach(function(ctor, i){ - out.indent(); - doitem(ctor); - out.newline(); - }); - }); - } - }; - doitem(UglifyJS.AST_Node); - return out + ""; -}; - -}); -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true */ -/*global define: false */ - -define('parse', ['./esprimaAdapter', 'lang'], function (esprima, lang) { - 'use strict'; - - function arrayToString(ary) { - var output = '['; - if (ary) { - ary.forEach(function (item, i) { - output += (i > 0 ? ',' : '') + '"' + lang.jsEscape(item) + '"'; - }); - } - output += ']'; - - return output; - } - - //This string is saved off because JSLint complains - //about obj.arguments use, as 'reserved word' - var argPropName = 'arguments'; - - //From an esprima example for traversing its ast. - function traverse(object, visitor) { - var key, child; - - if (!object) { - return; - } - - if (visitor.call(null, object) === false) { - return false; - } - for (key in object) { - if (object.hasOwnProperty(key)) { - child = object[key]; - if (typeof child === 'object' && child !== null) { - if (traverse(child, visitor) === false) { - return false; - } - } - } - } - } - - //Like traverse, but visitor returning false just - //stops that subtree analysis, not the rest of tree - //visiting. - function traverseBroad(object, visitor) { - var key, child; - - if (!object) { - return; - } - - if (visitor.call(null, object) === false) { - return false; - } - for (key in object) { - if (object.hasOwnProperty(key)) { - child = object[key]; - if (typeof child === 'object' && child !== null) { - traverse(child, visitor); - } - } - } - } - - /** - * Pulls out dependencies from an array literal with just string members. - * If string literals, will just return those string values in an array, - * skipping other items in the array. - * - * @param {Node} node an AST node. - * - * @returns {Array} an array of strings. - * If null is returned, then it means the input node was not a valid - * dependency. - */ - function getValidDeps(node) { - if (!node || node.type !== 'ArrayExpression' || !node.elements) { - return; - } - - var deps = []; - - node.elements.some(function (elem) { - if (elem.type === 'Literal') { - deps.push(elem.value); - } - }); - - return deps.length ? deps : undefined; - } - - /** - * Main parse function. Returns a string of any valid require or - * define/require.def calls as part of one JavaScript source string. - * @param {String} moduleName the module name that represents this file. - * It is used to create a default define if there is not one already for the - * file. This allows properly tracing dependencies for builds. Otherwise, if - * the file just has a require() call, the file dependencies will not be - * properly reflected: the file will come before its dependencies. - * @param {String} moduleName - * @param {String} fileName - * @param {String} fileContents - * @param {Object} options optional options. insertNeedsDefine: true will - * add calls to require.needsDefine() if appropriate. - * @returns {String} JS source string or null, if no require or - * define/require.def calls are found. - */ - function parse(moduleName, fileName, fileContents, options) { - options = options || {}; - - //Set up source input - var i, moduleCall, depString, - moduleDeps = [], - result = '', - moduleList = [], - needsDefine = true, - astRoot = esprima.parse(fileContents); - - parse.recurse(astRoot, function (callName, config, name, deps) { - if (!deps) { - deps = []; - } - - if (callName === 'define' && (!name || name === moduleName)) { - needsDefine = false; - } - - if (!name) { - //If there is no module name, the dependencies are for - //this file/default module name. - moduleDeps = moduleDeps.concat(deps); - } else { - moduleList.push({ - name: name, - deps: deps - }); - } - - //If define was found, no need to dive deeper, unless - //the config explicitly wants to dig deeper. - return !!options.findNestedDependencies; - }, options); - - if (options.insertNeedsDefine && needsDefine) { - result += 'require.needsDefine("' + moduleName + '");'; - } - - if (moduleDeps.length || moduleList.length) { - for (i = 0; i < moduleList.length; i++) { - moduleCall = moduleList[i]; - if (result) { - result += '\n'; - } - - //If this is the main module for this file, combine any - //"anonymous" dependencies (could come from a nested require - //call) with this module. - if (moduleCall.name === moduleName) { - moduleCall.deps = moduleCall.deps.concat(moduleDeps); - moduleDeps = []; - } - - depString = arrayToString(moduleCall.deps); - result += 'define("' + moduleCall.name + '",' + - depString + ');'; - } - if (moduleDeps.length) { - if (result) { - result += '\n'; - } - depString = arrayToString(moduleDeps); - result += 'define("' + moduleName + '",' + depString + ');'; - } - } - - return result || null; - } - - parse.traverse = traverse; - parse.traverseBroad = traverseBroad; - - /** - * Handles parsing a file recursively for require calls. - * @param {Array} parentNode the AST node to start with. - * @param {Function} onMatch function to call on a parse match. - * @param {Object} [options] This is normally the build config options if - * it is passed. - */ - parse.recurse = function (object, onMatch, options) { - //Like traverse, but skips if branches that would not be processed - //after has application that results in tests of true or false boolean - //literal values. - var key, child, - hasHas = options && options.has; - - if (!object) { - return; - } - - //If has replacement has resulted in if(true){} or if(false){}, take - //the appropriate branch and skip the other one. - if (hasHas && object.type === 'IfStatement' && object.test.type && - object.test.type === 'Literal') { - if (object.test.value) { - //Take the if branch - this.recurse(object.consequent, onMatch, options); - } else { - //Take the else branch - this.recurse(object.alternate, onMatch, options); - } - } else { - if (this.parseNode(object, onMatch) === false) { - return; - } - for (key in object) { - if (object.hasOwnProperty(key)) { - child = object[key]; - if (typeof child === 'object' && child !== null) { - this.recurse(child, onMatch, options); - } - } - } - } - }; - - /** - * Determines if the file defines the require/define module API. - * Specifically, it looks for the `define.amd = ` expression. - * @param {String} fileName - * @param {String} fileContents - * @returns {Boolean} - */ - parse.definesRequire = function (fileName, fileContents) { - var found = false; - - traverse(esprima.parse(fileContents), function (node) { - if (parse.hasDefineAmd(node)) { - found = true; - - //Stop traversal - return false; - } - }); - - return found; - }; - - /** - * Finds require("") calls inside a CommonJS anonymous module wrapped in a - * define(function(require, exports, module){}) wrapper. These dependencies - * will be added to a modified define() call that lists the dependencies - * on the outside of the function. - * @param {String} fileName - * @param {String|Object} fileContents: a string of contents, or an already - * parsed AST tree. - * @returns {Array} an array of module names that are dependencies. Always - * returns an array, but could be of length zero. - */ - parse.getAnonDeps = function (fileName, fileContents) { - var astRoot = typeof fileContents === 'string' ? - esprima.parse(fileContents) : fileContents, - defFunc = this.findAnonDefineFactory(astRoot); - - return parse.getAnonDepsFromNode(defFunc); - }; - - /** - * Finds require("") calls inside a CommonJS anonymous module wrapped - * in a define function, given an AST node for the definition function. - * @param {Node} node the AST node for the definition function. - * @returns {Array} and array of dependency names. Can be of zero length. - */ - parse.getAnonDepsFromNode = function (node) { - var deps = [], - funcArgLength; - - if (node) { - this.findRequireDepNames(node, deps); - - //If no deps, still add the standard CommonJS require, exports, - //module, in that order, to the deps, but only if specified as - //function args. In particular, if exports is used, it is favored - //over the return value of the function, so only add it if asked. - funcArgLength = node.params && node.params.length; - if (funcArgLength) { - deps = (funcArgLength > 1 ? ["require", "exports", "module"] : - ["require"]).concat(deps); - } - } - return deps; - }; - - parse.isDefineNodeWithArgs = function (node) { - return node && node.type === 'CallExpression' && - node.callee && node.callee.type === 'Identifier' && - node.callee.name === 'define' && node[argPropName]; - }; - - /** - * Finds the function in define(function (require, exports, module){}); - * @param {Array} node - * @returns {Boolean} - */ - parse.findAnonDefineFactory = function (node) { - var match; - - traverse(node, function (node) { - var arg0, arg1; - - if (parse.isDefineNodeWithArgs(node)) { - - //Just the factory function passed to define - arg0 = node[argPropName][0]; - if (arg0 && arg0.type === 'FunctionExpression') { - match = arg0; - return false; - } - - //A string literal module ID followed by the factory function. - arg1 = node[argPropName][1]; - if (arg0.type === 'Literal' && - arg1 && arg1.type === 'FunctionExpression') { - match = arg1; - return false; - } - } - }); - - return match; - }; - - /** - * Finds any config that is passed to requirejs. That includes calls to - * require/requirejs.config(), as well as require({}, ...) and - * requirejs({}, ...) - * @param {String} fileContents - * - * @returns {Object} a config details object with the following properties: - * - config: {Object} the config object found. Can be undefined if no - * config found. - * - range: {Array} the start index and end index in the contents where - * the config was found. Can be undefined if no config found. - * Can throw an error if the config in the file cannot be evaluated in - * a build context to valid JavaScript. - */ - parse.findConfig = function (fileContents) { - /*jslint evil: true */ - var jsConfig, foundConfig, stringData, foundRange, quote, quoteMatch, - quoteRegExp = /(:\s|\[\s*)(['"])/, - astRoot = esprima.parse(fileContents, { - loc: true - }); - - traverse(astRoot, function (node) { - var arg, - requireType = parse.hasRequire(node); - - if (requireType && (requireType === 'require' || - requireType === 'requirejs' || - requireType === 'requireConfig' || - requireType === 'requirejsConfig')) { - - arg = node[argPropName] && node[argPropName][0]; - - if (arg && arg.type === 'ObjectExpression') { - stringData = parse.nodeToString(fileContents, arg); - jsConfig = stringData.value; - foundRange = stringData.range; - return false; - } - } else { - arg = parse.getRequireObjectLiteral(node); - if (arg) { - stringData = parse.nodeToString(fileContents, arg); - jsConfig = stringData.value; - foundRange = stringData.range; - return false; - } - } - }); - - if (jsConfig) { - // Eval the config - quoteMatch = quoteRegExp.exec(jsConfig); - quote = (quoteMatch && quoteMatch[2]) || '"'; - foundConfig = eval('(' + jsConfig + ')'); - } - - return { - config: foundConfig, - range: foundRange, - quote: quote - }; - }; - - /** Returns the node for the object literal assigned to require/requirejs, - * for holding a declarative config. - */ - parse.getRequireObjectLiteral = function (node) { - if (node.id && node.id.type === 'Identifier' && - (node.id.name === 'require' || node.id.name === 'requirejs') && - node.init && node.init.type === 'ObjectExpression') { - return node.init; - } - }; - - /** - * Renames require/requirejs/define calls to be ns + '.' + require/requirejs/define - * Does *not* do .config calls though. See pragma.namespace for the complete - * set of namespace transforms. This function is used because require calls - * inside a define() call should not be renamed, so a simple regexp is not - * good enough. - * @param {String} fileContents the contents to transform. - * @param {String} ns the namespace, *not* including trailing dot. - * @return {String} the fileContents with the namespace applied - */ - parse.renameNamespace = function (fileContents, ns) { - var lines, - locs = [], - astRoot = esprima.parse(fileContents, { - loc: true - }); - - parse.recurse(astRoot, function (callName, config, name, deps, node) { - locs.push(node.loc); - //Do not recurse into define functions, they should be using - //local defines. - return callName !== 'define'; - }, {}); - - if (locs.length) { - lines = fileContents.split('\n'); - - //Go backwards through the found locs, adding in the namespace name - //in front. - locs.reverse(); - locs.forEach(function (loc) { - var startIndex = loc.start.column, - //start.line is 1-based, not 0 based. - lineIndex = loc.start.line - 1, - line = lines[lineIndex]; - - lines[lineIndex] = line.substring(0, startIndex) + - ns + '.' + - line.substring(startIndex, - line.length); - }); - - fileContents = lines.join('\n'); - } - - return fileContents; - }; - - /** - * Finds all dependencies specified in dependency arrays and inside - * simplified commonjs wrappers. - * @param {String} fileName - * @param {String} fileContents - * - * @returns {Array} an array of dependency strings. The dependencies - * have not been normalized, they may be relative IDs. - */ - parse.findDependencies = function (fileName, fileContents, options) { - var dependencies = [], - astRoot = esprima.parse(fileContents); - - parse.recurse(astRoot, function (callName, config, name, deps) { - if (deps) { - dependencies = dependencies.concat(deps); - } - }, options); - - return dependencies; - }; - - /** - * Finds only CJS dependencies, ones that are the form - * require('stringLiteral') - */ - parse.findCjsDependencies = function (fileName, fileContents) { - var dependencies = []; - - traverse(esprima.parse(fileContents), function (node) { - var arg; - - if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'require' && node[argPropName] && - node[argPropName].length === 1) { - arg = node[argPropName][0]; - if (arg.type === 'Literal') { - dependencies.push(arg.value); - } - } - }); - - return dependencies; - }; - - //function define() {} - parse.hasDefDefine = function (node) { - return node.type === 'FunctionDeclaration' && node.id && - node.id.type === 'Identifier' && node.id.name === 'define'; - }; - - //define.amd = ... - parse.hasDefineAmd = function (node) { - return node && node.type === 'AssignmentExpression' && - node.left && node.left.type === 'MemberExpression' && - node.left.object && node.left.object.name === 'define' && - node.left.property && node.left.property.name === 'amd'; - }; - - //define.amd reference, as in: if (define.amd) - parse.refsDefineAmd = function (node) { - return node && node.type === 'MemberExpression' && - node.object && node.object.name === 'define' && - node.object.type === 'Identifier' && - node.property && node.property.name === 'amd' && - node.property.type === 'Identifier'; - }; - - //require(), requirejs(), require.config() and requirejs.config() - parse.hasRequire = function (node) { - var callName, - c = node && node.callee; - - if (node && node.type === 'CallExpression' && c) { - if (c.type === 'Identifier' && - (c.name === 'require' || - c.name === 'requirejs')) { - //A require/requirejs({}, ...) call - callName = c.name; - } else if (c.type === 'MemberExpression' && - c.object && - c.object.type === 'Identifier' && - (c.object.name === 'require' || - c.object.name === 'requirejs') && - c.property && c.property.name === 'config') { - // require/requirejs.config({}) call - callName = c.object.name + 'Config'; - } - } - - return callName; - }; - - //define() - parse.hasDefine = function (node) { - return node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'define'; - }; - - /** - * If there is a named define in the file, returns the name. Does not - * scan for mulitple names, just the first one. - */ - parse.getNamedDefine = function (fileContents) { - var name; - traverse(esprima.parse(fileContents), function (node) { - if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'define' && - node[argPropName] && node[argPropName][0] && - node[argPropName][0].type === 'Literal') { - name = node[argPropName][0].value; - return false; - } - }); - - return name; - }; - - /** - * Determines if define(), require({}|[]) or requirejs was called in the - * file. Also finds out if define() is declared and if define.amd is called. - */ - parse.usesAmdOrRequireJs = function (fileName, fileContents) { - var uses; - - traverse(esprima.parse(fileContents), function (node) { - var type, callName, arg; - - if (parse.hasDefDefine(node)) { - //function define() {} - type = 'declaresDefine'; - } else if (parse.hasDefineAmd(node)) { - type = 'defineAmd'; - } else { - callName = parse.hasRequire(node); - if (callName) { - arg = node[argPropName] && node[argPropName][0]; - if (arg && (arg.type === 'ObjectExpression' || - arg.type === 'ArrayExpression')) { - type = callName; - } - } else if (parse.hasDefine(node)) { - type = 'define'; - } - } - - if (type) { - if (!uses) { - uses = {}; - } - uses[type] = true; - } - }); - - return uses; - }; - - /** - * Determines if require(''), exports.x =, module.exports =, - * __dirname, __filename are used. So, not strictly traditional CommonJS, - * also checks for Node variants. - */ - parse.usesCommonJs = function (fileName, fileContents) { - var uses = null, - assignsExports = false; - - - traverse(esprima.parse(fileContents), function (node) { - var type, - exp = node.expression || node.init; - - if (node.type === 'Identifier' && - (node.name === '__dirname' || node.name === '__filename')) { - type = node.name.substring(2); - } else if (node.type === 'VariableDeclarator' && node.id && - node.id.type === 'Identifier' && - node.id.name === 'exports') { - //Hmm, a variable assignment for exports, so does not use cjs - //exports. - type = 'varExports'; - } else if (exp && exp.type === 'AssignmentExpression' && exp.left && - exp.left.type === 'MemberExpression' && exp.left.object) { - if (exp.left.object.name === 'module' && exp.left.property && - exp.left.property.name === 'exports') { - type = 'moduleExports'; - } else if (exp.left.object.name === 'exports' && - exp.left.property) { - type = 'exports'; - } - - } else if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'require' && node[argPropName] && - node[argPropName].length === 1 && - node[argPropName][0].type === 'Literal') { - type = 'require'; - } - - if (type) { - if (type === 'varExports') { - assignsExports = true; - } else if (type !== 'exports' || !assignsExports) { - if (!uses) { - uses = {}; - } - uses[type] = true; - } - } - }); - - return uses; - }; - - - parse.findRequireDepNames = function (node, deps) { - traverse(node, function (node) { - var arg; - - if (node && node.type === 'CallExpression' && node.callee && - node.callee.type === 'Identifier' && - node.callee.name === 'require' && - node[argPropName] && node[argPropName].length === 1) { - - arg = node[argPropName][0]; - if (arg.type === 'Literal') { - deps.push(arg.value); - } - } - }); - }; - - /** - * Determines if a specific node is a valid require or define/require.def - * call. - * @param {Array} node - * @param {Function} onMatch a function to call when a match is found. - * It is passed the match name, and the config, name, deps possible args. - * The config, name and deps args are not normalized. - * - * @returns {String} a JS source string with the valid require/define call. - * Otherwise null. - */ - parse.parseNode = function (node, onMatch) { - var name, deps, cjsDeps, arg, factory, exp, refsDefine, bodyNode, - args = node && node[argPropName], - callName = parse.hasRequire(node); - - if (callName === 'require' || callName === 'requirejs') { - //A plain require/requirejs call - arg = node[argPropName] && node[argPropName][0]; - if (arg.type !== 'ArrayExpression') { - if (arg.type === 'ObjectExpression') { - //A config call, try the second arg. - arg = node[argPropName][1]; - } - } - - deps = getValidDeps(arg); - if (!deps) { - return; - } - - return onMatch("require", null, null, deps, node); - } else if (parse.hasDefine(node) && args && args.length) { - name = args[0]; - deps = args[1]; - factory = args[2]; - - if (name.type === 'ArrayExpression') { - //No name, adjust args - factory = deps; - deps = name; - name = null; - } else if (name.type === 'FunctionExpression') { - //Just the factory, no name or deps - factory = name; - name = deps = null; - } else if (name.type !== 'Literal') { - //An object literal, just null out - name = deps = factory = null; - } - - if (name && name.type === 'Literal' && deps) { - if (deps.type === 'FunctionExpression') { - //deps is the factory - factory = deps; - deps = null; - } else if (deps.type === 'ObjectExpression') { - //deps is object literal, null out - deps = factory = null; - } else if (deps.type === 'Identifier' && args.length === 2) { - // define('id', factory) - deps = factory = null; - } - } - - if (deps && deps.type === 'ArrayExpression') { - deps = getValidDeps(deps); - } else if (factory && factory.type === 'FunctionExpression') { - //If no deps and a factory function, could be a commonjs sugar - //wrapper, scan the function for dependencies. - cjsDeps = parse.getAnonDepsFromNode(factory); - if (cjsDeps.length) { - deps = cjsDeps; - } - } else if (deps || factory) { - //Does not match the shape of an AMD call. - return; - } - - //Just save off the name as a string instead of an AST object. - if (name && name.type === 'Literal') { - name = name.value; - } - - return onMatch("define", null, name, deps, node); - } else if (node.type === 'CallExpression' && node.callee && - node.callee.type === 'FunctionExpression' && - node.callee.body && node.callee.body.body && - node.callee.body.body.length === 1 && - node.callee.body.body[0].type === 'IfStatement') { - bodyNode = node.callee.body.body[0]; - //Look for a define(Identifier) case, but only if inside an - //if that has a define.amd test - if (bodyNode.consequent && bodyNode.consequent.body) { - exp = bodyNode.consequent.body[0]; - if (exp.type === 'ExpressionStatement' && exp.expression && - parse.hasDefine(exp.expression) && - exp.expression.arguments && - exp.expression.arguments.length === 1 && - exp.expression.arguments[0].type === 'Identifier') { - - //Calls define(Identifier) as first statement in body. - //Confirm the if test references define.amd - traverse(bodyNode.test, function (node) { - if (parse.refsDefineAmd(node)) { - refsDefine = true; - return false; - } - }); - - if (refsDefine) { - return onMatch("define", null, null, null, exp.expression); - } - } - } - } - }; - - /** - * Converts an AST node into a JS source string by extracting - * the node's location from the given contents string. Assumes - * esprima.parse() with loc was done. - * @param {String} contents - * @param {Object} node - * @returns {String} a JS source string. - */ - parse.nodeToString = function (contents, node) { - var extracted, - loc = node.loc, - lines = contents.split('\n'), - firstLine = loc.start.line > 1 ? - lines.slice(0, loc.start.line - 1).join('\n') + '\n' : - '', - preamble = firstLine + - lines[loc.start.line - 1].substring(0, loc.start.column); - - if (loc.start.line === loc.end.line) { - extracted = lines[loc.start.line - 1].substring(loc.start.column, - loc.end.column); - } else { - extracted = lines[loc.start.line - 1].substring(loc.start.column) + - '\n' + - lines.slice(loc.start.line, loc.end.line - 1).join('\n') + - '\n' + - lines[loc.end.line - 1].substring(0, loc.end.column); - } - - return { - value: extracted, - range: [ - preamble.length, - preamble.length + extracted.length - ] - }; - }; - - /** - * Extracts license comments from JS text. - * @param {String} fileName - * @param {String} contents - * @returns {String} a string of license comments. - */ - parse.getLicenseComments = function (fileName, contents) { - var commentNode, refNode, subNode, value, i, j, - //xpconnect's Reflect does not support comment or range, but - //prefer continued operation vs strict parity of operation, - //as license comments can be expressed in other ways, like - //via wrap args, or linked via sourcemaps. - ast = esprima.parse(contents, { - comment: true, - range: true - }), - result = '', - existsMap = {}, - lineEnd = contents.indexOf('\r') === -1 ? '\n' : '\r\n'; - - if (ast.comments) { - for (i = 0; i < ast.comments.length; i++) { - commentNode = ast.comments[i]; - - if (commentNode.type === 'Line') { - value = '//' + commentNode.value + lineEnd; - refNode = commentNode; - - if (i + 1 >= ast.comments.length) { - value += lineEnd; - } else { - //Look for immediately adjacent single line comments - //since it could from a multiple line comment made out - //of single line comments. Like this comment. - for (j = i + 1; j < ast.comments.length; j++) { - subNode = ast.comments[j]; - if (subNode.type === 'Line' && - subNode.range[0] === refNode.range[1] + 1) { - //Adjacent single line comment. Collect it. - value += '//' + subNode.value + lineEnd; - refNode = subNode; - } else { - //No more single line comment blocks. Break out - //and continue outer looping. - break; - } - } - value += lineEnd; - i = j - 1; - } - } else { - value = '/*' + commentNode.value + '*/' + lineEnd + lineEnd; - } - - if (!existsMap[value] && (value.indexOf('license') !== -1 || - (commentNode.type === 'Block' && - value.indexOf('/*!') === 0) || - value.indexOf('opyright') !== -1 || - value.indexOf('(c)') !== -1)) { - - result += value; - existsMap[value] = true; - } - - } - } - - return result; - }; - - return parse; -}); -/** - * @license Copyright (c) 2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*global define */ - -define('transform', [ './esprimaAdapter', './parse', 'logger', 'lang'], -function (esprima, parse, logger, lang) { - 'use strict'; - var transform, - baseIndentRegExp = /^([ \t]+)/, - indentRegExp = /\{[\r\n]+([ \t]+)/, - keyRegExp = /^[_A-Za-z]([A-Za-z\d_]*)$/, - bulkIndentRegExps = { - '\n': /\n/g, - '\r\n': /\r\n/g - }; - - function applyIndent(str, indent, lineReturn) { - var regExp = bulkIndentRegExps[lineReturn]; - return str.replace(regExp, '$&' + indent); - } - - transform = { - toTransport: function (namespace, moduleName, path, contents, onFound, options) { - options = options || {}; - - var astRoot, contentLines, modLine, - foundAnon, - scanCount = 0, - scanReset = false, - defineInfos = []; - - try { - astRoot = esprima.parse(contents, { - loc: true - }); - } catch (e) { - logger.trace('toTransport skipping ' + path + ': ' + - e.toString()); - return contents; - } - - //Find the define calls and their position in the files. - parse.traverseBroad(astRoot, function (node) { - var args, firstArg, firstArgLoc, factoryNode, - needsId, depAction, foundId, - sourceUrlData, range, - namespaceExists = false; - - namespaceExists = namespace && - node.type === 'CallExpression' && - node.callee && node.callee.object && - node.callee.object.type === 'Identifier' && - node.callee.object.name === namespace && - node.callee.property.type === 'Identifier' && - node.callee.property.name === 'define'; - - if (namespaceExists || parse.isDefineNodeWithArgs(node)) { - //The arguments are where its at. - args = node.arguments; - if (!args || !args.length) { - return; - } - - firstArg = args[0]; - firstArgLoc = firstArg.loc; - - if (args.length === 1) { - if (firstArg.type === 'Identifier') { - //The define(factory) case, but - //only allow it if one Identifier arg, - //to limit impact of false positives. - needsId = true; - depAction = 'empty'; - } else if (firstArg.type === 'FunctionExpression') { - //define(function(){}) - factoryNode = firstArg; - needsId = true; - depAction = 'scan'; - } else if (firstArg.type === 'ObjectExpression') { - //define({}); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'Literal' && - typeof firstArg.value === 'number') { - //define('12345'); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'UnaryExpression' && - firstArg.operator === '-' && - firstArg.argument && - firstArg.argument.type === 'Literal' && - typeof firstArg.argument.value === 'number') { - //define('-12345'); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'MemberExpression' && - firstArg.object && - firstArg.property && - firstArg.property.type === 'Identifier') { - //define(this.key); - needsId = true; - depAction = 'empty'; - } - } else if (firstArg.type === 'ArrayExpression') { - //define([], ...); - needsId = true; - depAction = 'skip'; - } else if (firstArg.type === 'Literal' && - typeof firstArg.value === 'string') { - //define('string', ....) - //Already has an ID. - needsId = false; - if (args.length === 2 && - args[1].type === 'FunctionExpression') { - //Needs dependency scanning. - factoryNode = args[1]; - depAction = 'scan'; - } else { - depAction = 'skip'; - } - } else { - //Unknown define entity, keep looking, even - //in the subtree for this node. - return; - } - - range = { - foundId: foundId, - needsId: needsId, - depAction: depAction, - namespaceExists: namespaceExists, - node: node, - defineLoc: node.loc, - firstArgLoc: firstArgLoc, - factoryNode: factoryNode, - sourceUrlData: sourceUrlData - }; - - //Only transform ones that do not have IDs. If it has an - //ID but no dependency array, assume it is something like - //a phonegap implementation, that has its own internal - //define that cannot handle dependency array constructs, - //and if it is a named module, then it means it has been - //set for transport form. - if (range.needsId) { - if (foundAnon) { - logger.trace(path + ' has more than one anonymous ' + - 'define. May be a built file from another ' + - 'build system like, Ender. Skipping normalization.'); - defineInfos = []; - return false; - } else { - foundAnon = range; - defineInfos.push(range); - } - } else if (depAction === 'scan') { - scanCount += 1; - if (scanCount > 1) { - //Just go back to an array that just has the - //anon one, since this is an already optimized - //file like the phonegap one. - if (!scanReset) { - defineInfos = foundAnon ? [foundAnon] : []; - scanReset = true; - } - } else { - defineInfos.push(range); - } - } - } - }); - - if (!defineInfos.length) { - return contents; - } - - //Reverse the matches, need to start from the bottom of - //the file to modify it, so that the ranges are still true - //further up. - defineInfos.reverse(); - - contentLines = contents.split('\n'); - - modLine = function (loc, contentInsertion) { - var startIndex = loc.start.column, - //start.line is 1-based, not 0 based. - lineIndex = loc.start.line - 1, - line = contentLines[lineIndex]; - contentLines[lineIndex] = line.substring(0, startIndex) + - contentInsertion + - line.substring(startIndex, - line.length); - }; - - defineInfos.forEach(function (info) { - var deps, - contentInsertion = '', - depString = ''; - - //Do the modifications "backwards", in other words, start with the - //one that is farthest down and work up, so that the ranges in the - //defineInfos still apply. So that means deps, id, then namespace. - if (info.needsId && moduleName) { - contentInsertion += "'" + moduleName + "',"; - } - - if (info.depAction === 'scan') { - deps = parse.getAnonDepsFromNode(info.factoryNode); - - if (deps.length) { - depString = '[' + deps.map(function (dep) { - return "'" + dep + "'"; - }) + ']'; - } else { - depString = '[]'; - } - depString += ','; - - if (info.factoryNode) { - //Already have a named module, need to insert the - //dependencies after the name. - modLine(info.factoryNode.loc, depString); - } else { - contentInsertion += depString; - } - } - - if (contentInsertion) { - modLine(info.firstArgLoc, contentInsertion); - } - - //Do namespace last so that ui does not mess upthe parenRange - //used above. - if (namespace && !info.namespaceExists) { - modLine(info.defineLoc, namespace + '.'); - } - - //Notify any listener for the found info - if (onFound) { - onFound(info); - } - }); - - contents = contentLines.join('\n'); - - if (options.useSourceUrl) { - contents = 'eval("' + lang.jsEscape(contents) + - '\\n//# sourceURL=' + (path.indexOf('/') === 0 ? '' : '/') + - path + - '");\n'; - } - - return contents; - }, - - /** - * Modify the contents of a require.config/requirejs.config call. This - * call will LOSE any existing comments that are in the config string. - * - * @param {String} fileContents String that may contain a config call - * @param {Function} onConfig Function called when the first config - * call is found. It will be passed an Object which is the current - * config, and the onConfig function should return an Object to use - * as the config. - * @return {String} the fileContents with the config changes applied. - */ - modifyConfig: function (fileContents, onConfig) { - var details = parse.findConfig(fileContents), - config = details.config; - - if (config) { - config = onConfig(config); - if (config) { - return transform.serializeConfig(config, - fileContents, - details.range[0], - details.range[1], - { - quote: details.quote - }); - } - } - - return fileContents; - }, - - serializeConfig: function (config, fileContents, start, end, options) { - //Calculate base level of indent - var indent, match, configString, outDentRegExp, - baseIndent = '', - startString = fileContents.substring(0, start), - existingConfigString = fileContents.substring(start, end), - lineReturn = existingConfigString.indexOf('\r') === -1 ? '\n' : '\r\n', - lastReturnIndex = startString.lastIndexOf('\n'); - - //Get the basic amount of indent for the require config call. - if (lastReturnIndex === -1) { - lastReturnIndex = 0; - } - - match = baseIndentRegExp.exec(startString.substring(lastReturnIndex + 1, start)); - if (match && match[1]) { - baseIndent = match[1]; - } - - //Calculate internal indentation for config - match = indentRegExp.exec(existingConfigString); - if (match && match[1]) { - indent = match[1]; - } - - if (!indent || indent.length < baseIndent) { - indent = ' '; - } else { - indent = indent.substring(baseIndent.length); - } - - outDentRegExp = new RegExp('(' + lineReturn + ')' + indent, 'g'); - - configString = transform.objectToString(config, { - indent: indent, - lineReturn: lineReturn, - outDentRegExp: outDentRegExp, - quote: options && options.quote - }); - - //Add in the base indenting level. - configString = applyIndent(configString, baseIndent, lineReturn); - - return startString + configString + fileContents.substring(end); - }, - - /** - * Tries converting a JS object to a string. This will likely suck, and - * is tailored to the type of config expected in a loader config call. - * So, hasOwnProperty fields, strings, numbers, arrays and functions, - * no weird recursively referenced stuff. - * @param {Object} obj the object to convert - * @param {Object} options options object with the following values: - * {String} indent the indentation to use for each level - * {String} lineReturn the type of line return to use - * {outDentRegExp} outDentRegExp the regexp to use to outdent functions - * {String} quote the quote type to use, ' or ". Optional. Default is " - * @param {String} totalIndent the total indent to print for this level - * @return {String} a string representation of the object. - */ - objectToString: function (obj, options, totalIndent) { - var startBrace, endBrace, nextIndent, - first = true, - value = '', - lineReturn = options.lineReturn, - indent = options.indent, - outDentRegExp = options.outDentRegExp, - quote = options.quote || '"'; - - totalIndent = totalIndent || ''; - nextIndent = totalIndent + indent; - - if (obj === null) { - value = 'null'; - } else if (obj === undefined) { - value = 'undefined'; - } else if (typeof obj === 'number' || typeof obj === 'boolean') { - value = obj; - } else if (typeof obj === 'string') { - //Use double quotes in case the config may also work as JSON. - value = quote + lang.jsEscape(obj) + quote; - } else if (lang.isArray(obj)) { - lang.each(obj, function (item, i) { - value += (i !== 0 ? ',' + lineReturn : '' ) + - nextIndent + - transform.objectToString(item, - options, - nextIndent); - }); - - startBrace = '['; - endBrace = ']'; - } else if (lang.isFunction(obj) || lang.isRegExp(obj)) { - //The outdent regexp just helps pretty up the conversion - //just in node. Rhino strips comments and does a different - //indent scheme for Function toString, so not really helpful - //there. - value = obj.toString().replace(outDentRegExp, '$1'); - } else { - //An object - lang.eachProp(obj, function (v, prop) { - value += (first ? '': ',' + lineReturn) + - nextIndent + - (keyRegExp.test(prop) ? prop : quote + lang.jsEscape(prop) + quote )+ - ': ' + - transform.objectToString(v, - options, - nextIndent); - first = false; - }); - startBrace = '{'; - endBrace = '}'; - } - - if (startBrace) { - value = startBrace + - lineReturn + - value + - lineReturn + totalIndent + - endBrace; - } - - return value; - } - }; - - return transform; -}); -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint regexp: true, plusplus: true */ -/*global define: false */ - -define('pragma', ['parse', 'logger'], function (parse, logger) { - 'use strict'; - function Temp() {} - - function create(obj, mixin) { - Temp.prototype = obj; - var temp = new Temp(), prop; - - //Avoid any extra memory hanging around - Temp.prototype = null; - - if (mixin) { - for (prop in mixin) { - if (mixin.hasOwnProperty(prop) && !temp.hasOwnProperty(prop)) { - temp[prop] = mixin[prop]; - } - } - } - - return temp; // Object - } - - var pragma = { - conditionalRegExp: /(exclude|include)Start\s*\(\s*["'](\w+)["']\s*,(.*)\)/, - useStrictRegExp: /['"]use strict['"];/g, - hasRegExp: /has\s*\(\s*['"]([^'"]+)['"]\s*\)/g, - configRegExp: /(^|[^\.])(requirejs|require)(\.config)\s*\(/g, - nsWrapRegExp: /\/\*requirejs namespace: true \*\//, - apiDefRegExp: /var requirejs,\s*require,\s*define;/, - defineCheckRegExp: /typeof\s+define\s*===\s*["']function["']\s*&&\s*define\s*\.\s*amd/g, - defineStringCheckRegExp: /typeof\s+define\s*===\s*["']function["']\s*&&\s*define\s*\[\s*["']amd["']\s*\]/g, - defineTypeFirstCheckRegExp: /\s*["']function["']\s*==(=?)\s*typeof\s+define\s*&&\s*define\s*\.\s*amd/g, - defineJQueryRegExp: /typeof\s+define\s*===\s*["']function["']\s*&&\s*define\s*\.\s*amd\s*&&\s*define\s*\.\s*amd\s*\.\s*jQuery/g, - defineHasRegExp: /typeof\s+define\s*==(=)?\s*['"]function['"]\s*&&\s*typeof\s+define\.amd\s*==(=)?\s*['"]object['"]\s*&&\s*define\.amd/g, - defineTernaryRegExp: /typeof\s+define\s*===\s*['"]function["']\s*&&\s*define\s*\.\s*amd\s*\?\s*define/, - amdefineRegExp: /if\s*\(\s*typeof define\s*\!==\s*'function'\s*\)\s*\{\s*[^\{\}]+amdefine[^\{\}]+\}/g, - - removeStrict: function (contents, config) { - return config.useStrict ? contents : contents.replace(pragma.useStrictRegExp, ''); - }, - - namespace: function (fileContents, ns, onLifecycleName) { - if (ns) { - //Namespace require/define calls - fileContents = fileContents.replace(pragma.configRegExp, '$1' + ns + '.$2$3('); - - - fileContents = parse.renameNamespace(fileContents, ns); - - //Namespace define ternary use: - fileContents = fileContents.replace(pragma.defineTernaryRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define.amd ? " + ns + ".define"); - - //Namespace define jquery use: - fileContents = fileContents.replace(pragma.defineJQueryRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define.amd && " + ns + ".define.amd.jQuery"); - - //Namespace has.js define use: - fileContents = fileContents.replace(pragma.defineHasRegExp, - "typeof " + ns + ".define === 'function' && typeof " + ns + ".define.amd === 'object' && " + ns + ".define.amd"); - - //Namespace define checks. - //Do these ones last, since they are a subset of the more specific - //checks above. - fileContents = fileContents.replace(pragma.defineCheckRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define.amd"); - fileContents = fileContents.replace(pragma.defineStringCheckRegExp, - "typeof " + ns + ".define === 'function' && " + ns + ".define['amd']"); - fileContents = fileContents.replace(pragma.defineTypeFirstCheckRegExp, - "'function' === typeof " + ns + ".define && " + ns + ".define.amd"); - - //Check for require.js with the require/define definitions - if (pragma.apiDefRegExp.test(fileContents) && - fileContents.indexOf("if (!" + ns + " || !" + ns + ".requirejs)") === -1) { - //Wrap the file contents in a typeof check, and a function - //to contain the API globals. - fileContents = "var " + ns + ";(function () { if (!" + ns + " || !" + ns + ".requirejs) {\n" + - "if (!" + ns + ") { " + ns + ' = {}; } else { require = ' + ns + '; }\n' + - fileContents + - "\n" + - ns + ".requirejs = requirejs;" + - ns + ".require = require;" + - ns + ".define = define;\n" + - "}\n}());"; - } - - //Finally, if the file wants a special wrapper because it ties - //in to the requirejs internals in a way that would not fit - //the above matches, do that. Look for /*requirejs namespace: true*/ - if (pragma.nsWrapRegExp.test(fileContents)) { - //Remove the pragma. - fileContents = fileContents.replace(pragma.nsWrapRegExp, ''); - - //Alter the contents. - fileContents = '(function () {\n' + - 'var require = ' + ns + '.require,' + - 'requirejs = ' + ns + '.requirejs,' + - 'define = ' + ns + '.define;\n' + - fileContents + - '\n}());'; - } - } - - return fileContents; - }, - - /** - * processes the fileContents for some //>> conditional statements - */ - process: function (fileName, fileContents, config, onLifecycleName, pluginCollector) { - /*jslint evil: true */ - var foundIndex = -1, startIndex = 0, lineEndIndex, conditionLine, - matches, type, marker, condition, isTrue, endRegExp, endMatches, - endMarkerIndex, shouldInclude, startLength, lifecycleHas, deps, - i, dep, moduleName, collectorMod, - lifecyclePragmas, pragmas = config.pragmas, hasConfig = config.has, - //Legacy arg defined to help in dojo conversion script. Remove later - //when dojo no longer needs conversion: - kwArgs = pragmas; - - //Mix in a specific lifecycle scoped object, to allow targeting - //some pragmas/has tests to only when files are saved, or at different - //lifecycle events. Do not bother with kwArgs in this section, since - //the old dojo kwArgs were for all points in the build lifecycle. - if (onLifecycleName) { - lifecyclePragmas = config['pragmas' + onLifecycleName]; - lifecycleHas = config['has' + onLifecycleName]; - - if (lifecyclePragmas) { - pragmas = create(pragmas || {}, lifecyclePragmas); - } - - if (lifecycleHas) { - hasConfig = create(hasConfig || {}, lifecycleHas); - } - } - - //Replace has references if desired - if (hasConfig) { - fileContents = fileContents.replace(pragma.hasRegExp, function (match, test) { - if (hasConfig.hasOwnProperty(test)) { - return !!hasConfig[test]; - } - return match; - }); - } - - if (!config.skipPragmas) { - - while ((foundIndex = fileContents.indexOf("//>>", startIndex)) !== -1) { - //Found a conditional. Get the conditional line. - lineEndIndex = fileContents.indexOf("\n", foundIndex); - if (lineEndIndex === -1) { - lineEndIndex = fileContents.length - 1; - } - - //Increment startIndex past the line so the next conditional search can be done. - startIndex = lineEndIndex + 1; - - //Break apart the conditional. - conditionLine = fileContents.substring(foundIndex, lineEndIndex + 1); - matches = conditionLine.match(pragma.conditionalRegExp); - if (matches) { - type = matches[1]; - marker = matches[2]; - condition = matches[3]; - isTrue = false; - //See if the condition is true. - try { - isTrue = !!eval("(" + condition + ")"); - } catch (e) { - throw "Error in file: " + - fileName + - ". Conditional comment: " + - conditionLine + - " failed with this error: " + e; - } - - //Find the endpoint marker. - endRegExp = new RegExp('\\/\\/\\>\\>\\s*' + type + 'End\\(\\s*[\'"]' + marker + '[\'"]\\s*\\)', "g"); - endMatches = endRegExp.exec(fileContents.substring(startIndex, fileContents.length)); - if (endMatches) { - endMarkerIndex = startIndex + endRegExp.lastIndex - endMatches[0].length; - - //Find the next line return based on the match position. - lineEndIndex = fileContents.indexOf("\n", endMarkerIndex); - if (lineEndIndex === -1) { - lineEndIndex = fileContents.length - 1; - } - - //Should we include the segment? - shouldInclude = ((type === "exclude" && !isTrue) || (type === "include" && isTrue)); - - //Remove the conditional comments, and optionally remove the content inside - //the conditional comments. - startLength = startIndex - foundIndex; - fileContents = fileContents.substring(0, foundIndex) + - (shouldInclude ? fileContents.substring(startIndex, endMarkerIndex) : "") + - fileContents.substring(lineEndIndex + 1, fileContents.length); - - //Move startIndex to foundIndex, since that is the new position in the file - //where we need to look for more conditionals in the next while loop pass. - startIndex = foundIndex; - } else { - throw "Error in file: " + - fileName + - ". Cannot find end marker for conditional comment: " + - conditionLine; - - } - } - } - } - - //If need to find all plugin resources to optimize, do that now, - //before namespacing, since the namespacing will change the API - //names. - //If there is a plugin collector, scan the file for plugin resources. - if (config.optimizeAllPluginResources && pluginCollector) { - try { - deps = parse.findDependencies(fileName, fileContents); - if (deps.length) { - for (i = 0; i < deps.length; i++) { - dep = deps[i]; - if (dep.indexOf('!') !== -1) { - moduleName = dep.split('!')[0]; - collectorMod = pluginCollector[moduleName]; - if (!collectorMod) { - collectorMod = pluginCollector[moduleName] = []; - } - collectorMod.push(dep); - } - } - } - } catch (eDep) { - logger.error('Parse error looking for plugin resources in ' + - fileName + ', skipping.'); - } - } - - //Strip amdefine use for node-shared modules. - fileContents = fileContents.replace(pragma.amdefineRegExp, ''); - - //Do namespacing - if (onLifecycleName === 'OnSave' && config.namespace) { - fileContents = pragma.namespace(fileContents, config.namespace, onLifecycleName); - } - - - return pragma.removeStrict(fileContents, config); - } - }; - - return pragma; -}); -if(env === 'browser') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false */ - -define('browser/optimize', {}); - -} - -if(env === 'node') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint strict: false */ -/*global define: false */ - -define('node/optimize', {}); - -} - -if(env === 'rhino') { -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint sloppy: true, plusplus: true */ -/*global define, java, Packages, com */ - -define('rhino/optimize', ['logger', 'env!env/file'], function (logger, file) { - - //Add .reduce to Rhino so UglifyJS can run in Rhino, - //inspired by https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Array/reduce - //but rewritten for brevity, and to be good enough for use by UglifyJS. - if (!Array.prototype.reduce) { - Array.prototype.reduce = function (fn /*, initialValue */) { - var i = 0, - length = this.length, - accumulator; - - if (arguments.length >= 2) { - accumulator = arguments[1]; - } else { - if (length) { - while (!(i in this)) { - i++; - } - accumulator = this[i++]; - } - } - - for (; i < length; i++) { - if (i in this) { - accumulator = fn.call(undefined, accumulator, this[i], i, this); - } - } - - return accumulator; - }; - } - - var JSSourceFilefromCode, optimize, - mapRegExp = /"file":"[^"]+"/; - - //Bind to Closure compiler, but if it is not available, do not sweat it. - try { - JSSourceFilefromCode = java.lang.Class.forName('com.google.javascript.jscomp.JSSourceFile').getMethod('fromCode', [java.lang.String, java.lang.String]); - } catch (e) {} - - //Helper for closure compiler, because of weird Java-JavaScript interactions. - function closurefromCode(filename, content) { - return JSSourceFilefromCode.invoke(null, [filename, content]); - } - - - function getFileWriter(fileName, encoding) { - var outFile = new java.io.File(fileName), outWriter, parentDir; - - parentDir = outFile.getAbsoluteFile().getParentFile(); - if (!parentDir.exists()) { - if (!parentDir.mkdirs()) { - throw "Could not create directory: " + parentDir.getAbsolutePath(); - } - } - - if (encoding) { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile), encoding); - } else { - outWriter = new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile)); - } - - return new java.io.BufferedWriter(outWriter); - } - - optimize = { - closure: function (fileName, fileContents, outFileName, keepLines, config) { - config = config || {}; - var result, mappings, optimized, compressed, baseName, writer, - outBaseName, outFileNameMap, outFileNameMapContent, - srcOutFileName, concatNameMap, - jscomp = Packages.com.google.javascript.jscomp, - flags = Packages.com.google.common.flags, - //Set up source input - jsSourceFile = closurefromCode(String(fileName), String(fileContents)), - sourceListArray = new java.util.ArrayList(), - options, option, FLAG_compilation_level, compiler, - Compiler = Packages.com.google.javascript.jscomp.Compiler, - CommandLineRunner = Packages.com.google.javascript.jscomp.CommandLineRunner; - - logger.trace("Minifying file: " + fileName); - - baseName = (new java.io.File(fileName)).getName(); - - //Set up options - options = new jscomp.CompilerOptions(); - for (option in config.CompilerOptions) { - // options are false by default and jslint wanted an if statement in this for loop - if (config.CompilerOptions[option]) { - options[option] = config.CompilerOptions[option]; - } - - } - options.prettyPrint = keepLines || options.prettyPrint; - - FLAG_compilation_level = jscomp.CompilationLevel[config.CompilationLevel || 'SIMPLE_OPTIMIZATIONS']; - FLAG_compilation_level.setOptionsForCompilationLevel(options); - - if (config.generateSourceMaps) { - mappings = new java.util.ArrayList(); - - mappings.add(new com.google.javascript.jscomp.SourceMap.LocationMapping(fileName, baseName + ".src.js")); - options.setSourceMapLocationMappings(mappings); - options.setSourceMapOutputPath(fileName + ".map"); - } - - //Trigger the compiler - Compiler.setLoggingLevel(Packages.java.util.logging.Level[config.loggingLevel || 'WARNING']); - compiler = new Compiler(); - - //fill the sourceArrrayList; we need the ArrayList because the only overload of compile - //accepting the getDefaultExterns return value (a List) also wants the sources as a List - sourceListArray.add(jsSourceFile); - - result = compiler.compile(CommandLineRunner.getDefaultExterns(), sourceListArray, options); - if (result.success) { - optimized = String(compiler.toSource()); - - if (config.generateSourceMaps && result.sourceMap && outFileName) { - outBaseName = (new java.io.File(outFileName)).getName(); - - srcOutFileName = outFileName + ".src.js"; - outFileNameMap = outFileName + ".map"; - - //If previous .map file exists, move it to the ".src.js" - //location. Need to update the sourceMappingURL part in the - //src.js file too. - if (file.exists(outFileNameMap)) { - concatNameMap = outFileNameMap.replace(/\.map$/, '.src.js.map'); - file.saveFile(concatNameMap, file.readFile(outFileNameMap)); - file.saveFile(srcOutFileName, - fileContents.replace(/\/\# sourceMappingURL=(.+).map/, - '/# sourceMappingURL=$1.src.js.map')); - } else { - file.saveUtf8File(srcOutFileName, fileContents); - } - - writer = getFileWriter(outFileNameMap, "utf-8"); - result.sourceMap.appendTo(writer, outFileName); - writer.close(); - - //Not sure how better to do this, but right now the .map file - //leaks the full OS path in the "file" property. Manually - //modify it to not do that. - file.saveFile(outFileNameMap, - file.readFile(outFileNameMap).replace(mapRegExp, '"file":"' + baseName + '"')); - - fileContents = optimized + "\n//# sourceMappingURL=" + outBaseName + ".map"; - } else { - fileContents = optimized; - } - return fileContents; - } else { - throw new Error('Cannot closure compile file: ' + fileName + '. Skipping it.'); - } - - return fileContents; - } - }; - - return optimize; -}); -} - -if(env === 'xpconnect') { -define('xpconnect/optimize', {}); -} -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true, nomen: true, regexp: true */ -/*global define: false */ - -define('optimize', [ 'lang', 'logger', 'env!env/optimize', 'env!env/file', 'parse', - 'pragma', 'uglifyjs/index', 'uglifyjs2', - 'source-map'], -function (lang, logger, envOptimize, file, parse, - pragma, uglify, uglify2, - sourceMap) { - 'use strict'; - - var optimize, - cssImportRegExp = /\@import\s+(url\()?\s*([^);]+)\s*(\))?([\w, ]*)(;)?/ig, - cssCommentImportRegExp = /\/\*[^\*]*@import[^\*]*\*\//g, - cssUrlRegExp = /\url\(\s*([^\)]+)\s*\)?/g, - SourceMapGenerator = sourceMap.SourceMapGenerator, - SourceMapConsumer =sourceMap.SourceMapConsumer; - - /** - * If an URL from a CSS url value contains start/end quotes, remove them. - * This is not done in the regexp, since my regexp fu is not that strong, - * and the CSS spec allows for ' and " in the URL if they are backslash escaped. - * @param {String} url - */ - function cleanCssUrlQuotes(url) { - //Make sure we are not ending in whitespace. - //Not very confident of the css regexps above that there will not be ending - //whitespace. - url = url.replace(/\s+$/, ""); - - if (url.charAt(0) === "'" || url.charAt(0) === "\"") { - url = url.substring(1, url.length - 1); - } - - return url; - } - - function fixCssUrlPaths(fileName, path, contents, cssPrefix) { - return contents.replace(cssUrlRegExp, function (fullMatch, urlMatch) { - var colonIndex, parts, i, - fixedUrlMatch = cleanCssUrlQuotes(urlMatch); - - fixedUrlMatch = fixedUrlMatch.replace(lang.backSlashRegExp, "/"); - - //Only do the work for relative URLs. Skip things that start with / or have - //a protocol. - colonIndex = fixedUrlMatch.indexOf(":"); - if (fixedUrlMatch.charAt(0) !== "/" && (colonIndex === -1 || colonIndex > fixedUrlMatch.indexOf("/"))) { - //It is a relative URL, tack on the cssPrefix and path prefix - urlMatch = cssPrefix + path + fixedUrlMatch; - - } else { - logger.trace(fileName + "\n URL not a relative URL, skipping: " + urlMatch); - } - - //Collapse .. and . - parts = urlMatch.split("/"); - for (i = parts.length - 1; i > 0; i--) { - if (parts[i] === ".") { - parts.splice(i, 1); - } else if (parts[i] === "..") { - if (i !== 0 && parts[i - 1] !== "..") { - parts.splice(i - 1, 2); - i -= 1; - } - } - } - - return "url(" + parts.join("/") + ")"; - }); - } - - /** - * Inlines nested stylesheets that have @import calls in them. - * @param {String} fileName the file name - * @param {String} fileContents the file contents - * @param {String} cssImportIgnore comma delimited string of files to ignore - * @param {String} cssPrefix string to be prefixed before relative URLs - * @param {Object} included an object used to track the files already imported - */ - function flattenCss(fileName, fileContents, cssImportIgnore, cssPrefix, included, topLevel) { - //Find the last slash in the name. - fileName = fileName.replace(lang.backSlashRegExp, "/"); - var endIndex = fileName.lastIndexOf("/"), - //Make a file path based on the last slash. - //If no slash, so must be just a file name. Use empty string then. - filePath = (endIndex !== -1) ? fileName.substring(0, endIndex + 1) : "", - //store a list of merged files - importList = [], - skippedList = []; - - //First make a pass by removing any commented out @import calls. - fileContents = fileContents.replace(cssCommentImportRegExp, ''); - - //Make sure we have a delimited ignore list to make matching faster - if (cssImportIgnore && cssImportIgnore.charAt(cssImportIgnore.length - 1) !== ",") { - cssImportIgnore += ","; - } - - fileContents = fileContents.replace(cssImportRegExp, function (fullMatch, urlStart, importFileName, urlEnd, mediaTypes) { - //Only process media type "all" or empty media type rules. - if (mediaTypes && ((mediaTypes.replace(/^\s\s*/, '').replace(/\s\s*$/, '')) !== "all")) { - skippedList.push(fileName); - return fullMatch; - } - - importFileName = cleanCssUrlQuotes(importFileName); - - //Ignore the file import if it is part of an ignore list. - if (cssImportIgnore && cssImportIgnore.indexOf(importFileName + ",") !== -1) { - return fullMatch; - } - - //Make sure we have a unix path for the rest of the operation. - importFileName = importFileName.replace(lang.backSlashRegExp, "/"); - - try { - //if a relative path, then tack on the filePath. - //If it is not a relative path, then the readFile below will fail, - //and we will just skip that import. - var fullImportFileName = importFileName.charAt(0) === "/" ? importFileName : filePath + importFileName, - importContents = file.readFile(fullImportFileName), - importEndIndex, importPath, flat; - - //Skip the file if it has already been included. - if (included[fullImportFileName]) { - return ''; - } - included[fullImportFileName] = true; - - //Make sure to flatten any nested imports. - flat = flattenCss(fullImportFileName, importContents, cssImportIgnore, cssPrefix, included); - importContents = flat.fileContents; - - if (flat.importList.length) { - importList.push.apply(importList, flat.importList); - } - if (flat.skippedList.length) { - skippedList.push.apply(skippedList, flat.skippedList); - } - - //Make the full import path - importEndIndex = importFileName.lastIndexOf("/"); - - //Make a file path based on the last slash. - //If no slash, so must be just a file name. Use empty string then. - importPath = (importEndIndex !== -1) ? importFileName.substring(0, importEndIndex + 1) : ""; - - //fix url() on relative import (#5) - importPath = importPath.replace(/^\.\//, ''); - - //Modify URL paths to match the path represented by this file. - importContents = fixCssUrlPaths(importFileName, importPath, importContents, cssPrefix); - - importList.push(fullImportFileName); - return importContents; - } catch (e) { - logger.warn(fileName + "\n Cannot inline css import, skipping: " + importFileName); - return fullMatch; - } - }); - - if (cssPrefix && topLevel) { - //Modify URL paths to match the path represented by this file. - fileContents = fixCssUrlPaths(fileName, '', fileContents, cssPrefix); - } - - return { - importList : importList, - skippedList: skippedList, - fileContents : fileContents - }; - } - - optimize = { - /** - * Optimizes a file that contains JavaScript content. Optionally collects - * plugin resources mentioned in a file, and then passes the content - * through an minifier if one is specified via config.optimize. - * - * @param {String} fileName the name of the file to optimize - * @param {String} fileContents the contents to optimize. If this is - * a null value, then fileName will be used to read the fileContents. - * @param {String} outFileName the name of the file to use for the - * saved optimized content. - * @param {Object} config the build config object. - * @param {Array} [pluginCollector] storage for any plugin resources - * found. - */ - jsFile: function (fileName, fileContents, outFileName, config, pluginCollector) { - if (!fileContents) { - fileContents = file.readFile(fileName); - } - - fileContents = optimize.js(fileName, fileContents, outFileName, config, pluginCollector); - - file.saveUtf8File(outFileName, fileContents); - }, - - /** - * Optimizes a file that contains JavaScript content. Optionally collects - * plugin resources mentioned in a file, and then passes the content - * through an minifier if one is specified via config.optimize. - * - * @param {String} fileName the name of the file that matches the - * fileContents. - * @param {String} fileContents the string of JS to optimize. - * @param {Object} [config] the build config object. - * @param {Array} [pluginCollector] storage for any plugin resources - * found. - */ - js: function (fileName, fileContents, outFileName, config, pluginCollector) { - var optFunc, optConfig, - parts = (String(config.optimize)).split('.'), - optimizerName = parts[0], - keepLines = parts[1] === 'keepLines', - licenseContents = ''; - - config = config || {}; - - //Apply pragmas/namespace renaming - fileContents = pragma.process(fileName, fileContents, config, 'OnSave', pluginCollector); - - //Optimize the JS files if asked. - if (optimizerName && optimizerName !== 'none') { - optFunc = envOptimize[optimizerName] || optimize.optimizers[optimizerName]; - if (!optFunc) { - throw new Error('optimizer with name of "' + - optimizerName + - '" not found for this environment'); - } - - optConfig = config[optimizerName] || {}; - if (config.generateSourceMaps) { - optConfig.generateSourceMaps = !!config.generateSourceMaps; - } - - try { - if (config.preserveLicenseComments) { - //Pull out any license comments for prepending after optimization. - try { - licenseContents = parse.getLicenseComments(fileName, fileContents); - } catch (e) { - throw new Error('Cannot parse file: ' + fileName + ' for comments. Skipping it. Error is:\n' + e.toString()); - } - } - - fileContents = licenseContents + optFunc(fileName, - fileContents, - outFileName, - keepLines, - optConfig); - } catch (e) { - if (config.throwWhen && config.throwWhen.optimize) { - throw e; - } else { - logger.error(e); - } - } - } - - return fileContents; - }, - - /** - * Optimizes one CSS file, inlining @import calls, stripping comments, and - * optionally removes line returns. - * @param {String} fileName the path to the CSS file to optimize - * @param {String} outFileName the path to save the optimized file. - * @param {Object} config the config object with the optimizeCss and - * cssImportIgnore options. - */ - cssFile: function (fileName, outFileName, config) { - - //Read in the file. Make sure we have a JS string. - var originalFileContents = file.readFile(fileName), - flat = flattenCss(fileName, originalFileContents, config.cssImportIgnore, config.cssPrefix, {}, true), - //Do not use the flattened CSS if there was one that was skipped. - fileContents = flat.skippedList.length ? originalFileContents : flat.fileContents, - startIndex, endIndex, buildText, comment; - - if (flat.skippedList.length) { - logger.warn('Cannot inline @imports for ' + fileName + - ',\nthe following files had media queries in them:\n' + - flat.skippedList.join('\n')); - } - - //Do comment removal. - try { - if (config.optimizeCss.indexOf(".keepComments") === -1) { - startIndex = 0; - //Get rid of comments. - while ((startIndex = fileContents.indexOf("/*", startIndex)) !== -1) { - endIndex = fileContents.indexOf("*/", startIndex + 2); - if (endIndex === -1) { - throw "Improper comment in CSS file: " + fileName; - } - comment = fileContents.substring(startIndex, endIndex); - - if (config.preserveLicenseComments && - (comment.indexOf('license') !== -1 || - comment.indexOf('opyright') !== -1 || - comment.indexOf('(c)') !== -1)) { - //Keep the comment, just increment the startIndex - startIndex = endIndex; - } else { - fileContents = fileContents.substring(0, startIndex) + fileContents.substring(endIndex + 2, fileContents.length); - startIndex = 0; - } - } - } - //Get rid of newlines. - if (config.optimizeCss.indexOf(".keepLines") === -1) { - fileContents = fileContents.replace(/[\r\n]/g, " "); - fileContents = fileContents.replace(/\s+/g, " "); - fileContents = fileContents.replace(/\{\s/g, "{"); - fileContents = fileContents.replace(/\s\}/g, "}"); - } else { - //Remove multiple empty lines. - fileContents = fileContents.replace(/(\r\n)+/g, "\r\n"); - fileContents = fileContents.replace(/(\n)+/g, "\n"); - } - } catch (e) { - fileContents = originalFileContents; - logger.error("Could not optimized CSS file: " + fileName + ", error: " + e); - } - - file.saveUtf8File(outFileName, fileContents); - - //text output to stdout and/or written to build.txt file - buildText = "\n"+ outFileName.replace(config.dir, "") +"\n----------------\n"; - flat.importList.push(fileName); - buildText += flat.importList.map(function(path){ - return path.replace(config.dir, ""); - }).join("\n"); - - return { - importList: flat.importList, - buildText: buildText +"\n" - }; - }, - - /** - * Optimizes CSS files, inlining @import calls, stripping comments, and - * optionally removes line returns. - * @param {String} startDir the path to the top level directory - * @param {Object} config the config object with the optimizeCss and - * cssImportIgnore options. - */ - css: function (startDir, config) { - var buildText = "", - importList = [], - shouldRemove = config.dir && config.removeCombined, - i, fileName, result, fileList; - if (config.optimizeCss.indexOf("standard") !== -1) { - fileList = file.getFilteredFileList(startDir, /\.css$/, true); - if (fileList) { - for (i = 0; i < fileList.length; i++) { - fileName = fileList[i]; - logger.trace("Optimizing (" + config.optimizeCss + ") CSS file: " + fileName); - result = optimize.cssFile(fileName, fileName, config); - buildText += result.buildText; - if (shouldRemove) { - result.importList.pop(); - importList = importList.concat(result.importList); - } - } - } - - if (shouldRemove) { - importList.forEach(function (path) { - if (file.exists(path)) { - file.deleteFile(path); - } - }); - } - } - return buildText; - }, - - optimizers: { - uglify: function (fileName, fileContents, outFileName, keepLines, config) { - var parser = uglify.parser, - processor = uglify.uglify, - ast, errMessage, errMatch; - - config = config || {}; - - logger.trace("Uglifying file: " + fileName); - - try { - ast = parser.parse(fileContents, config.strict_semicolons); - if (config.no_mangle !== true) { - ast = processor.ast_mangle(ast, config); - } - ast = processor.ast_squeeze(ast, config); - - fileContents = processor.gen_code(ast, config); - - if (config.max_line_length) { - fileContents = processor.split_lines(fileContents, config.max_line_length); - } - - //Add trailing semicolon to match uglifyjs command line version - fileContents += ';'; - } catch (e) { - errMessage = e.toString(); - errMatch = /\nError(\r)?\n/.exec(errMessage); - if (errMatch) { - errMessage = errMessage.substring(0, errMatch.index); - } - throw new Error('Cannot uglify file: ' + fileName + '. Skipping it. Error is:\n' + errMessage); - } - return fileContents; - }, - uglify2: function (fileName, fileContents, outFileName, keepLines, config) { - var result, existingMap, resultMap, finalMap, sourceIndex, - uconfig = {}, - existingMapPath = outFileName + '.map', - baseName = fileName && fileName.split('/').pop(); - - config = config || {}; - - lang.mixin(uconfig, config, true); - - uconfig.fromString = true; - - if (config.generateSourceMaps && outFileName) { - uconfig.outSourceMap = baseName; - - if (file.exists(existingMapPath)) { - uconfig.inSourceMap = existingMapPath; - existingMap = JSON.parse(file.readFile(existingMapPath)); - } - } - - logger.trace("Uglify2 file: " + fileName); - - try { - //var tempContents = fileContents.replace(/\/\/\# sourceMappingURL=.*$/, ''); - result = uglify2.minify(fileContents, uconfig, baseName + '.src.js'); - if (uconfig.outSourceMap && result.map) { - resultMap = result.map; - if (existingMap) { - resultMap = JSON.parse(resultMap); - finalMap = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(resultMap)); - finalMap.applySourceMap(new SourceMapConsumer(existingMap)); - resultMap = finalMap.toString(); - } else { - file.saveFile(outFileName + '.src.js', fileContents); - } - file.saveFile(outFileName + '.map', resultMap); - fileContents = result.code + "\n//# sourceMappingURL=" + baseName + ".map"; - } else { - fileContents = result.code; - } - } catch (e) { - throw new Error('Cannot uglify2 file: ' + fileName + '. Skipping it. Error is:\n' + e.toString()); - } - return fileContents; - } - } - }; - - return optimize; -}); -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -/* - * This file patches require.js to communicate with the build system. - */ - -//Using sloppy since this uses eval for some code like plugins, -//which may not be strict mode compliant. So if use strict is used -//below they will have strict rules applied and may cause an error. -/*jslint sloppy: true, nomen: true, plusplus: true, regexp: true */ -/*global require, define: true */ - -//NOT asking for require as a dependency since the goal is to modify the -//global require below -define('requirePatch', [ 'env!env/file', 'pragma', 'parse', 'lang', 'logger', 'commonJs', 'prim'], function ( - file, - pragma, - parse, - lang, - logger, - commonJs, - prim -) { - - var allowRun = true, - hasProp = lang.hasProp, - falseProp = lang.falseProp, - getOwn = lang.getOwn; - - //This method should be called when the patches to require should take hold. - return function () { - if (!allowRun) { - return; - } - allowRun = false; - - var layer, - pluginBuilderRegExp = /(["']?)pluginBuilder(["']?)\s*[=\:]\s*["']([^'"\s]+)["']/, - oldNewContext = require.s.newContext, - oldDef, - - //create local undefined values for module and exports, - //so that when files are evaled in this function they do not - //see the node values used for r.js - exports, - module; - - /** - * Reset "global" build caches that are kept around between - * build layer builds. Useful to do when there are multiple - * top level requirejs.optimize() calls. - */ - require._cacheReset = function () { - //Stored raw text caches, used by browser use. - require._cachedRawText = {}; - //Stored cached file contents for reuse in other layers. - require._cachedFileContents = {}; - //Store which cached files contain a require definition. - require._cachedDefinesRequireUrls = {}; - }; - require._cacheReset(); - - /** - * Makes sure the URL is something that can be supported by the - * optimization tool. - * @param {String} url - * @returns {Boolean} - */ - require._isSupportedBuildUrl = function (url) { - //Ignore URLs with protocols, hosts or question marks, means either network - //access is needed to fetch it or it is too dynamic. Note that - //on Windows, full paths are used for some urls, which include - //the drive, like c:/something, so need to test for something other - //than just a colon. - if (url.indexOf("://") === -1 && url.indexOf("?") === -1 && - url.indexOf('empty:') !== 0 && url.indexOf('//') !== 0) { - return true; - } else { - if (!layer.ignoredUrls[url]) { - if (url.indexOf('empty:') === -1) { - logger.info('Cannot optimize network URL, skipping: ' + url); - } - layer.ignoredUrls[url] = true; - } - return false; - } - }; - - function normalizeUrlWithBase(context, moduleName, url) { - //Adjust the URL if it was not transformed to use baseUrl. - if (require.jsExtRegExp.test(moduleName)) { - url = (context.config.dir || context.config.dirBaseUrl) + url; - } - return url; - } - - //Overrides the new context call to add existing tracking features. - require.s.newContext = function (name) { - var context = oldNewContext(name), - oldEnable = context.enable, - moduleProto = context.Module.prototype, - oldInit = moduleProto.init, - oldCallPlugin = moduleProto.callPlugin; - - //Only do this for the context used for building. - if (name === '_') { - //For build contexts, do everything sync - context.nextTick = function (fn) { - fn(); - }; - - context.needFullExec = {}; - context.fullExec = {}; - context.plugins = {}; - context.buildShimExports = {}; - - //Override the shim exports function generator to just - //spit out strings that can be used in the stringified - //build output. - context.makeShimExports = function (value) { - function fn() { - return '(function (global) {\n' + - ' return function () {\n' + - ' var ret, fn;\n' + - (value.init ? - (' fn = ' + value.init.toString() + ';\n' + - ' ret = fn.apply(global, arguments);\n') : '') + - (value.exports ? - ' return ret || global.' + value.exports + ';\n' : - ' return ret;\n') + - ' };\n' + - '}(this))'; - } - - return fn; - }; - - context.enable = function (depMap, parent) { - var id = depMap.id, - parentId = parent && parent.map.id, - needFullExec = context.needFullExec, - fullExec = context.fullExec, - mod = getOwn(context.registry, id); - - if (mod && !mod.defined) { - if (parentId && getOwn(needFullExec, parentId)) { - needFullExec[id] = true; - } - - } else if ((getOwn(needFullExec, id) && falseProp(fullExec, id)) || - (parentId && getOwn(needFullExec, parentId) && - falseProp(fullExec, id))) { - context.require.undef(id); - } - - return oldEnable.apply(context, arguments); - }; - - //Override load so that the file paths can be collected. - context.load = function (moduleName, url) { - /*jslint evil: true */ - var contents, pluginBuilderMatch, builderName, - shim, shimExports; - - //Do not mark the url as fetched if it is - //not an empty: URL, used by the optimizer. - //In that case we need to be sure to call - //load() for each module that is mapped to - //empty: so that dependencies are satisfied - //correctly. - if (url.indexOf('empty:') === 0) { - delete context.urlFetched[url]; - } - - //Only handle urls that can be inlined, so that means avoiding some - //URLs like ones that require network access or may be too dynamic, - //like JSONP - if (require._isSupportedBuildUrl(url)) { - //Adjust the URL if it was not transformed to use baseUrl. - url = normalizeUrlWithBase(context, moduleName, url); - - //Save the module name to path and path to module name mappings. - layer.buildPathMap[moduleName] = url; - layer.buildFileToModule[url] = moduleName; - - if (hasProp(context.plugins, moduleName)) { - //plugins need to have their source evaled as-is. - context.needFullExec[moduleName] = true; - } - - prim().start(function () { - if (hasProp(require._cachedFileContents, url) && - (falseProp(context.needFullExec, moduleName) || - getOwn(context.fullExec, moduleName))) { - contents = require._cachedFileContents[url]; - - //If it defines require, mark it so it can be hoisted. - //Done here and in the else below, before the - //else block removes code from the contents. - //Related to #263 - if (!layer.existingRequireUrl && require._cachedDefinesRequireUrls[url]) { - layer.existingRequireUrl = url; - } - } else { - //Load the file contents, process for conditionals, then - //evaluate it. - return require._cacheReadAsync(url).then(function (text) { - contents = text; - - if (context.config.cjsTranslate && - (!context.config.shim || !lang.hasProp(context.config.shim, moduleName))) { - contents = commonJs.convert(url, contents); - } - - //If there is a read filter, run it now. - if (context.config.onBuildRead) { - contents = context.config.onBuildRead(moduleName, url, contents); - } - - contents = pragma.process(url, contents, context.config, 'OnExecute'); - - //Find out if the file contains a require() definition. Need to know - //this so we can inject plugins right after it, but before they are needed, - //and to make sure this file is first, so that define calls work. - try { - if (!layer.existingRequireUrl && parse.definesRequire(url, contents)) { - layer.existingRequireUrl = url; - require._cachedDefinesRequireUrls[url] = true; - } - } catch (e1) { - throw new Error('Parse error using esprima ' + - 'for file: ' + url + '\n' + e1); - } - }).then(function () { - if (hasProp(context.plugins, moduleName)) { - //This is a loader plugin, check to see if it has a build extension, - //otherwise the plugin will act as the plugin builder too. - pluginBuilderMatch = pluginBuilderRegExp.exec(contents); - if (pluginBuilderMatch) { - //Load the plugin builder for the plugin contents. - builderName = context.makeModuleMap(pluginBuilderMatch[3], - context.makeModuleMap(moduleName), - null, - true).id; - return require._cacheReadAsync(context.nameToUrl(builderName)); - } - } - return contents; - }).then(function (text) { - contents = text; - - //Parse out the require and define calls. - //Do this even for plugins in case they have their own - //dependencies that may be separate to how the pluginBuilder works. - try { - if (falseProp(context.needFullExec, moduleName)) { - contents = parse(moduleName, url, contents, { - insertNeedsDefine: true, - has: context.config.has, - findNestedDependencies: context.config.findNestedDependencies - }); - } - } catch (e2) { - throw new Error('Parse error using esprima ' + - 'for file: ' + url + '\n' + e2); - } - - require._cachedFileContents[url] = contents; - }); - } - }).then(function () { - if (contents) { - eval(contents); - } - - try { - //If have a string shim config, and this is - //a fully executed module, try to see if - //it created a variable in this eval scope - if (getOwn(context.needFullExec, moduleName)) { - shim = getOwn(context.config.shim, moduleName); - if (shim && shim.exports) { - shimExports = eval(shim.exports); - if (typeof shimExports !== 'undefined') { - context.buildShimExports[moduleName] = shimExports; - } - } - } - - //Need to close out completion of this module - //so that listeners will get notified that it is available. - context.completeLoad(moduleName); - } catch (e) { - //Track which module could not complete loading. - if (!e.moduleTree) { - e.moduleTree = []; - } - e.moduleTree.push(moduleName); - throw e; - } - }).then(null, function (eOuter) { - - if (!eOuter.fileName) { - eOuter.fileName = url; - } - throw eOuter; - }).end(); - } else { - //With unsupported URLs still need to call completeLoad to - //finish loading. - context.completeLoad(moduleName); - } - }; - - //Marks module has having a name, and optionally executes the - //callback, but only if it meets certain criteria. - context.execCb = function (name, cb, args, exports) { - var buildShimExports = getOwn(layer.context.buildShimExports, name); - - if (buildShimExports) { - return buildShimExports; - } else if (cb.__requireJsBuild || getOwn(layer.context.needFullExec, name)) { - return cb.apply(exports, args); - } - return undefined; - }; - - moduleProto.init = function (depMaps) { - if (context.needFullExec[this.map.id]) { - lang.each(depMaps, lang.bind(this, function (depMap) { - if (typeof depMap === 'string') { - depMap = context.makeModuleMap(depMap, - (this.map.isDefine ? this.map : this.map.parentMap)); - } - - if (!context.fullExec[depMap.id]) { - context.require.undef(depMap.id); - } - })); - } - - return oldInit.apply(this, arguments); - }; - - moduleProto.callPlugin = function () { - var map = this.map, - pluginMap = context.makeModuleMap(map.prefix), - pluginId = pluginMap.id, - pluginMod = getOwn(context.registry, pluginId); - - context.plugins[pluginId] = true; - context.needFullExec[pluginId] = true; - - //If the module is not waiting to finish being defined, - //undef it and start over, to get full execution. - if (falseProp(context.fullExec, pluginId) && (!pluginMod || pluginMod.defined)) { - context.require.undef(pluginMap.id); - } - - return oldCallPlugin.apply(this, arguments); - }; - } - - return context; - }; - - //Clear up the existing context so that the newContext modifications - //above will be active. - delete require.s.contexts._; - - /** Reset state for each build layer pass. */ - require._buildReset = function () { - var oldContext = require.s.contexts._; - - //Clear up the existing context. - delete require.s.contexts._; - - //Set up new context, so the layer object can hold onto it. - require({}); - - layer = require._layer = { - buildPathMap: {}, - buildFileToModule: {}, - buildFilePaths: [], - pathAdded: {}, - modulesWithNames: {}, - needsDefine: {}, - existingRequireUrl: "", - ignoredUrls: {}, - context: require.s.contexts._ - }; - - //Return the previous context in case it is needed, like for - //the basic config object. - return oldContext; - }; - - require._buildReset(); - - //Override define() to catch modules that just define an object, so that - //a dummy define call is not put in the build file for them. They do - //not end up getting defined via context.execCb, so we need to catch them - //at the define call. - oldDef = define; - - //This function signature does not have to be exact, just match what we - //are looking for. - define = function (name) { - if (typeof name === "string" && falseProp(layer.needsDefine, name)) { - layer.modulesWithNames[name] = true; - } - return oldDef.apply(require, arguments); - }; - - define.amd = oldDef.amd; - - //Add some utilities for plugins - require._readFile = file.readFile; - require._fileExists = function (path) { - return file.exists(path); - }; - - //Called when execManager runs for a dependency. Used to figure out - //what order of execution. - require.onResourceLoad = function (context, map) { - var id = map.id, - url; - - //If build needed a full execution, indicate it - //has been done now. But only do it if the context is tracking - //that. Only valid for the context used in a build, not for - //other contexts being run, like for useLib, plain requirejs - //use in node/rhino. - if (context.needFullExec && getOwn(context.needFullExec, id)) { - context.fullExec[id] = true; - } - - //A plugin. - if (map.prefix) { - if (falseProp(layer.pathAdded, id)) { - layer.buildFilePaths.push(id); - //For plugins the real path is not knowable, use the name - //for both module to file and file to module mappings. - layer.buildPathMap[id] = id; - layer.buildFileToModule[id] = id; - layer.modulesWithNames[id] = true; - layer.pathAdded[id] = true; - } - } else if (map.url && require._isSupportedBuildUrl(map.url)) { - //If the url has not been added to the layer yet, and it - //is from an actual file that was loaded, add it now. - url = normalizeUrlWithBase(context, id, map.url); - if (!layer.pathAdded[url] && getOwn(layer.buildPathMap, id)) { - //Remember the list of dependencies for this layer. - layer.buildFilePaths.push(url); - layer.pathAdded[url] = true; - } - } - }; - - //Called by output of the parse() function, when a file does not - //explicitly call define, probably just require, but the parse() - //function normalizes on define() for dependency mapping and file - //ordering works correctly. - require.needsDefine = function (moduleName) { - layer.needsDefine[moduleName] = true; - }; - }; -}); -/** - * @license RequireJS Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint */ -/*global define: false, console: false */ - -define('commonJs', ['env!env/file', 'parse'], function (file, parse) { - 'use strict'; - var commonJs = { - //Set to false if you do not want this file to log. Useful in environments - //like node where you want the work to happen without noise. - useLog: true, - - convertDir: function (commonJsPath, savePath) { - var fileList, i, - jsFileRegExp = /\.js$/, - fileName, convertedFileName, fileContents; - - //Get list of files to convert. - fileList = file.getFilteredFileList(commonJsPath, /\w/, true); - - //Normalize on front slashes and make sure the paths do not end in a slash. - commonJsPath = commonJsPath.replace(/\\/g, "/"); - savePath = savePath.replace(/\\/g, "/"); - if (commonJsPath.charAt(commonJsPath.length - 1) === "/") { - commonJsPath = commonJsPath.substring(0, commonJsPath.length - 1); - } - if (savePath.charAt(savePath.length - 1) === "/") { - savePath = savePath.substring(0, savePath.length - 1); - } - - //Cycle through all the JS files and convert them. - if (!fileList || !fileList.length) { - if (commonJs.useLog) { - if (commonJsPath === "convert") { - //A request just to convert one file. - console.log('\n\n' + commonJs.convert(savePath, file.readFile(savePath))); - } else { - console.log("No files to convert in directory: " + commonJsPath); - } - } - } else { - for (i = 0; i < fileList.length; i++) { - fileName = fileList[i]; - convertedFileName = fileName.replace(commonJsPath, savePath); - - //Handle JS files. - if (jsFileRegExp.test(fileName)) { - fileContents = file.readFile(fileName); - fileContents = commonJs.convert(fileName, fileContents); - file.saveUtf8File(convertedFileName, fileContents); - } else { - //Just copy the file over. - file.copyFile(fileName, convertedFileName, true); - } - } - } - }, - - /** - * Does the actual file conversion. - * - * @param {String} fileName the name of the file. - * - * @param {String} fileContents the contents of a file :) - * - * @returns {String} the converted contents - */ - convert: function (fileName, fileContents) { - //Strip out comments. - try { - var preamble = '', - commonJsProps = parse.usesCommonJs(fileName, fileContents); - - //First see if the module is not already RequireJS-formatted. - if (parse.usesAmdOrRequireJs(fileName, fileContents) || !commonJsProps) { - return fileContents; - } - - if (commonJsProps.dirname || commonJsProps.filename) { - preamble = 'var __filename = module.uri || "", ' + - '__dirname = __filename.substring(0, __filename.lastIndexOf("/") + 1); '; - } - - //Construct the wrapper boilerplate. - fileContents = 'define(function (require, exports, module) {' + - preamble + - fileContents + - '\n});\n'; - - } catch (e) { - console.log("commonJs.convert: COULD NOT CONVERT: " + fileName + ", so skipping it. Error was: " + e); - return fileContents; - } - - return fileContents; - } - }; - - return commonJs; -}); -/** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/*jslint plusplus: true, nomen: true, regexp: true */ -/*global define, requirejs */ - - -define('build', function (require) { - 'use strict'; - - var build, buildBaseConfig, - lang = require('lang'), - prim = require('prim'), - logger = require('logger'), - file = require('env!env/file'), - parse = require('parse'), - optimize = require('optimize'), - pragma = require('pragma'), - transform = require('transform'), - requirePatch = require('requirePatch'), - env = require('env'), - commonJs = require('commonJs'), - SourceMapGenerator = require('source-map/source-map-generator'), - hasProp = lang.hasProp, - getOwn = lang.getOwn, - falseProp = lang.falseProp, - endsWithSemiColonRegExp = /;\s*$/, - resourceIsModuleIdRegExp = /^[\w\/\\\.]+$/; - - prim.nextTick = function (fn) { - fn(); - }; - - //Now map require to the outermost requirejs, now that we have - //local dependencies for this module. The rest of the require use is - //manipulating the requirejs loader. - require = requirejs; - - //Caching function for performance. Attached to - //require so it can be reused in requirePatch.js. _cachedRawText - //set up by requirePatch.js - require._cacheReadAsync = function (path, encoding) { - var d; - - if (lang.hasProp(require._cachedRawText, path)) { - d = prim(); - d.resolve(require._cachedRawText[path]); - return d.promise; - } else { - return file.readFileAsync(path, encoding).then(function (text) { - require._cachedRawText[path] = text; - return text; - }); - } - }; - - buildBaseConfig = { - appDir: "", - pragmas: {}, - paths: {}, - optimize: "uglify", - optimizeCss: "standard.keepLines", - inlineText: true, - isBuild: true, - optimizeAllPluginResources: false, - findNestedDependencies: false, - preserveLicenseComments: true, - //By default, all files/directories are copied, unless - //they match this regexp, by default just excludes .folders - dirExclusionRegExp: file.dirExclusionRegExp, - _buildPathToModuleIndex: {} - }; - - /** - * Some JS may not be valid if concatenated with other JS, in particular - * the style of omitting semicolons and rely on ASI. Add a semicolon in - * those cases. - */ - function addSemiColon(text, config) { - if (config.skipSemiColonInsertion || endsWithSemiColonRegExp.test(text)) { - return text; - } else { - return text + ";"; - } - } - - function endsWithSlash(dirName) { - if (dirName.charAt(dirName.length - 1) !== "/") { - dirName += "/"; - } - return dirName; - } - - //Method used by plugin writeFile calls, defined up here to avoid - //jslint warning about "making a function in a loop". - function makeWriteFile(namespace, layer) { - function writeFile(name, contents) { - logger.trace('Saving plugin-optimized file: ' + name); - file.saveUtf8File(name, contents); - } - - writeFile.asModule = function (moduleName, fileName, contents) { - writeFile(fileName, - build.toTransport(namespace, moduleName, fileName, contents, layer)); - }; - - return writeFile; - } - - /** - * Main API entry point into the build. The args argument can either be - * an array of arguments (like the onese passed on a command-line), - * or it can be a JavaScript object that has the format of a build profile - * file. - * - * If it is an object, then in addition to the normal properties allowed in - * a build profile file, the object should contain one other property: - * - * The object could also contain a "buildFile" property, which is a string - * that is the file path to a build profile that contains the rest - * of the build profile directives. - * - * This function does not return a status, it should throw an error if - * there is a problem completing the build. - */ - build = function (args) { - var buildFile, cmdConfig, errorMsg, errorStack, stackMatch, errorTree, - i, j, errorMod, - stackRegExp = /( {4}at[^\n]+)\n/, - standardIndent = ' '; - - return prim().start(function () { - if (!args || lang.isArray(args)) { - if (!args || args.length < 1) { - logger.error("build.js buildProfile.js\n" + - "where buildProfile.js is the name of the build file (see example.build.js for hints on how to make a build file)."); - return undefined; - } - - //Next args can include a build file path as well as other build args. - //build file path comes first. If it does not contain an = then it is - //a build file path. Otherwise, just all build args. - if (args[0].indexOf("=") === -1) { - buildFile = args[0]; - args.splice(0, 1); - } - - //Remaining args are options to the build - cmdConfig = build.convertArrayToObject(args); - cmdConfig.buildFile = buildFile; - } else { - cmdConfig = args; - } - - return build._run(cmdConfig); - }).then(null, function (e) { - var err; - - errorMsg = e.toString(); - errorTree = e.moduleTree; - stackMatch = stackRegExp.exec(errorMsg); - - if (stackMatch) { - errorMsg += errorMsg.substring(0, stackMatch.index + stackMatch[0].length + 1); - } - - //If a module tree that shows what module triggered the error, - //print it out. - if (errorTree && errorTree.length > 0) { - errorMsg += '\nIn module tree:\n'; - - for (i = errorTree.length - 1; i > -1; i--) { - errorMod = errorTree[i]; - if (errorMod) { - for (j = errorTree.length - i; j > -1; j--) { - errorMsg += standardIndent; - } - errorMsg += errorMod + '\n'; - } - } - - logger.error(errorMsg); - } - - errorStack = e.stack; - - if (typeof args === 'string' && args.indexOf('stacktrace=true') !== -1) { - errorMsg += '\n' + errorStack; - } else { - if (!stackMatch && errorStack) { - //Just trim out the first "at" in the stack. - stackMatch = stackRegExp.exec(errorStack); - if (stackMatch) { - errorMsg += '\n' + stackMatch[0] || ''; - } - } - } - - err = new Error(errorMsg); - err.originalError = e; - throw err; - }); - }; - - build._run = function (cmdConfig) { - var buildPaths, fileName, fileNames, - paths, i, - baseConfig, config, - modules, srcPath, buildContext, - destPath, moduleMap, parentModuleMap, context, - resources, resource, plugin, fileContents, - pluginProcessed = {}, - buildFileContents = "", - pluginCollector = {}; - - return prim().start(function () { - var prop; - - //Can now run the patches to require.js to allow it to be used for - //build generation. Do it here instead of at the top of the module - //because we want normal require behavior to load the build tool - //then want to switch to build mode. - requirePatch(); - - config = build.createConfig(cmdConfig); - paths = config.paths; - - //Remove the previous build dir, in case it contains source transforms, - //like the ones done with onBuildRead and onBuildWrite. - if (config.dir && !config.keepBuildDir && file.exists(config.dir)) { - file.deleteFile(config.dir); - } - - if (!config.out && !config.cssIn) { - //This is not just a one-off file build but a full build profile, with - //lots of files to process. - - //First copy all the baseUrl content - file.copyDir((config.appDir || config.baseUrl), config.dir, /\w/, true); - - //Adjust baseUrl if config.appDir is in play, and set up build output paths. - buildPaths = {}; - if (config.appDir) { - //All the paths should be inside the appDir, so just adjust - //the paths to use the dirBaseUrl - for (prop in paths) { - if (hasProp(paths, prop)) { - buildPaths[prop] = paths[prop].replace(config.appDir, config.dir); - } - } - } else { - //If no appDir, then make sure to copy the other paths to this directory. - for (prop in paths) { - if (hasProp(paths, prop)) { - //Set up build path for each path prefix, but only do so - //if the path falls out of the current baseUrl - if (paths[prop].indexOf(config.baseUrl) === 0) { - buildPaths[prop] = paths[prop].replace(config.baseUrl, config.dirBaseUrl); - } else { - buildPaths[prop] = paths[prop] === 'empty:' ? 'empty:' : prop.replace(/\./g, "/"); - - //Make sure source path is fully formed with baseUrl, - //if it is a relative URL. - srcPath = paths[prop]; - if (srcPath.indexOf('/') !== 0 && srcPath.indexOf(':') === -1) { - srcPath = config.baseUrl + srcPath; - } - - destPath = config.dirBaseUrl + buildPaths[prop]; - - //Skip empty: paths - if (srcPath !== 'empty:') { - //If the srcPath is a directory, copy the whole directory. - if (file.exists(srcPath) && file.isDirectory(srcPath)) { - //Copy files to build area. Copy all files (the /\w/ regexp) - file.copyDir(srcPath, destPath, /\w/, true); - } else { - //Try a .js extension - srcPath += '.js'; - destPath += '.js'; - file.copyFile(srcPath, destPath); - } - } - } - } - } - } - } - - //Figure out source file location for each module layer. Do this by seeding require - //with source area configuration. This is needed so that later the module layers - //can be manually copied over to the source area, since the build may be - //require multiple times and the above copyDir call only copies newer files. - require({ - baseUrl: config.baseUrl, - paths: paths, - packagePaths: config.packagePaths, - packages: config.packages - }); - buildContext = require.s.contexts._; - modules = config.modules; - - if (modules) { - modules.forEach(function (module) { - if (module.name) { - module._sourcePath = buildContext.nameToUrl(module.name); - //If the module does not exist, and this is not a "new" module layer, - //as indicated by a true "create" property on the module, and - //it is not a plugin-loaded resource, and there is no - //'rawText' containing the module's source then throw an error. - if (!file.exists(module._sourcePath) && !module.create && - module.name.indexOf('!') === -1 && - (!config.rawText || !lang.hasProp(config.rawText, module.name))) { - throw new Error("ERROR: module path does not exist: " + - module._sourcePath + " for module named: " + module.name + - ". Path is relative to: " + file.absPath('.')); - } - } - }); - } - - if (config.out) { - //Just set up the _buildPath for the module layer. - require(config); - if (!config.cssIn) { - config.modules[0]._buildPath = typeof config.out === 'function' ? - 'FUNCTION' : config.out; - } - } else if (!config.cssIn) { - //Now set up the config for require to use the build area, and calculate the - //build file locations. Pass along any config info too. - baseConfig = { - baseUrl: config.dirBaseUrl, - paths: buildPaths - }; - - lang.mixin(baseConfig, config); - require(baseConfig); - - if (modules) { - modules.forEach(function (module) { - if (module.name) { - module._buildPath = buildContext.nameToUrl(module.name, null); - if (!module.create) { - file.copyFile(module._sourcePath, module._buildPath); - } - } - }); - } - } - - //Run CSS optimizations before doing JS module tracing, to allow - //things like text loader plugins loading CSS to get the optimized - //CSS. - if (config.optimizeCss && config.optimizeCss !== "none" && config.dir) { - buildFileContents += optimize.css(config.dir, config); - } - }).then(function() { - baseConfig = lang.deeplikeCopy(require.s.contexts._.config); - }).then(function () { - var actions = []; - - if (modules) { - actions = modules.map(function (module, i) { - return function () { - //Save off buildPath to module index in a hash for quicker - //lookup later. - config._buildPathToModuleIndex[file.normalize(module._buildPath)] = i; - - //Call require to calculate dependencies. - return build.traceDependencies(module, config, baseConfig) - .then(function (layer) { - module.layer = layer; - }); - }; - }); - - return prim.serial(actions); - } - }).then(function () { - var actions; - - if (modules) { - //Now build up shadow layers for anything that should be excluded. - //Do this after tracing dependencies for each module, in case one - //of those modules end up being one of the excluded values. - actions = modules.map(function (module) { - return function () { - if (module.exclude) { - module.excludeLayers = []; - return prim.serial(module.exclude.map(function (exclude, i) { - return function () { - //See if it is already in the list of modules. - //If not trace dependencies for it. - var found = build.findBuildModule(exclude, modules); - if (found) { - module.excludeLayers[i] = found; - } else { - return build.traceDependencies({name: exclude}, config, baseConfig) - .then(function (layer) { - module.excludeLayers[i] = { layer: layer }; - }); - } - }; - })); - } - }; - }); - - return prim.serial(actions); - } - }).then(function () { - if (modules) { - return prim.serial(modules.map(function (module) { - return function () { - if (module.exclude) { - //module.exclude is an array of module names. For each one, - //get the nested dependencies for it via a matching entry - //in the module.excludeLayers array. - module.exclude.forEach(function (excludeModule, i) { - var excludeLayer = module.excludeLayers[i].layer, - map = excludeLayer.buildFileToModule; - excludeLayer.buildFilePaths.forEach(function(filePath){ - build.removeModulePath(map[filePath], filePath, module.layer); - }); - }); - } - if (module.excludeShallow) { - //module.excludeShallow is an array of module names. - //shallow exclusions are just that module itself, and not - //its nested dependencies. - module.excludeShallow.forEach(function (excludeShallowModule) { - var path = getOwn(module.layer.buildPathMap, excludeShallowModule); - if (path) { - build.removeModulePath(excludeShallowModule, path, module.layer); - } - }); - } - - //Flatten them and collect the build output for each module. - return build.flattenModule(module, module.layer, config).then(function (builtModule) { - var finalText, baseName; - //Save it to a temp file for now, in case there are other layers that - //contain optimized content that should not be included in later - //layer optimizations. See issue #56. - if (module._buildPath === 'FUNCTION') { - module._buildText = builtModule.text; - module._buildSourceMap = builtModule.sourceMap; - } else { - finalText = builtModule.text; - if (builtModule.sourceMap) { - baseName = module._buildPath.split('/'); - baseName = baseName.pop(); - finalText += '\n//# sourceMappingURL=' + baseName + '.map'; - file.saveUtf8File(module._buildPath + '.map', builtModule.sourceMap); - } - file.saveUtf8File(module._buildPath + '-temp', finalText); - - } - buildFileContents += builtModule.buildText; - }); - }; - })); - } - }).then(function () { - var moduleName; - if (modules) { - //Now move the build layers to their final position. - modules.forEach(function (module) { - var finalPath = module._buildPath; - if (finalPath !== 'FUNCTION') { - if (file.exists(finalPath)) { - file.deleteFile(finalPath); - } - file.renameFile(finalPath + '-temp', finalPath); - - //And finally, if removeCombined is specified, remove - //any of the files that were used in this layer. - //Be sure not to remove other build layers. - if (config.removeCombined && !config.out) { - module.layer.buildFilePaths.forEach(function (path) { - var isLayer = modules.some(function (mod) { - return mod._buildPath === path; - }), - relPath = build.makeRelativeFilePath(config.dir, path); - - if (file.exists(path) && - // not a build layer target - !isLayer && - // not outside the build directory - relPath.indexOf('..') !== 0) { - file.deleteFile(path); - } - }); - } - } - - //Signal layer is done - if (config.onModuleBundleComplete) { - config.onModuleBundleComplete(module.onCompleteData); - } - }); - } - - //If removeCombined in play, remove any empty directories that - //may now exist because of its use - if (config.removeCombined && !config.out && config.dir) { - file.deleteEmptyDirs(config.dir); - } - - //Do other optimizations. - if (config.out && !config.cssIn) { - //Just need to worry about one JS file. - fileName = config.modules[0]._buildPath; - if (fileName === 'FUNCTION') { - config.modules[0]._buildText = optimize.js(fileName, - config.modules[0]._buildText, - null, - config); - } else { - optimize.jsFile(fileName, null, fileName, config); - } - } else if (!config.cssIn) { - //Normal optimizations across modules. - - //JS optimizations. - fileNames = file.getFilteredFileList(config.dir, /\.js$/, true); - fileNames.forEach(function (fileName) { - var cfg, override, moduleIndex; - - //Generate the module name from the config.dir root. - moduleName = fileName.replace(config.dir, ''); - //Get rid of the extension - moduleName = moduleName.substring(0, moduleName.length - 3); - - //If there is an override for a specific layer build module, - //and this file is that module, mix in the override for use - //by optimize.jsFile. - moduleIndex = getOwn(config._buildPathToModuleIndex, fileName); - //Normalize, since getOwn could have returned undefined - moduleIndex = moduleIndex === 0 || moduleIndex > 0 ? moduleIndex : -1; - - //Try to avoid extra work if the other files do not need to - //be read. Build layers should be processed at the very - //least for optimization. - if (moduleIndex > -1 || !config.skipDirOptimize || - config.normalizeDirDefines === "all" || - config.cjsTranslate) { - //Convert the file to transport format, but without a name - //inserted (by passing null for moduleName) since the files are - //standalone, one module per file. - fileContents = file.readFile(fileName); - - - //For builds, if wanting cjs translation, do it now, so that - //the individual modules can be loaded cross domain via - //plain script tags. - if (config.cjsTranslate && - (!config.shim || !lang.hasProp(config.shim, moduleName))) { - fileContents = commonJs.convert(fileName, fileContents); - } - - if (moduleIndex === -1) { - if (config.onBuildRead) { - fileContents = config.onBuildRead(moduleName, - fileName, - fileContents); - } - - //Only do transport normalization if this is not a build - //layer (since it was already normalized) and if - //normalizeDirDefines indicated all should be done. - if (config.normalizeDirDefines === "all") { - fileContents = build.toTransport(config.namespace, - null, - fileName, - fileContents); - } - - if (config.onBuildWrite) { - fileContents = config.onBuildWrite(moduleName, - fileName, - fileContents); - } - } - - override = moduleIndex > -1 ? - config.modules[moduleIndex].override : null; - if (override) { - cfg = build.createOverrideConfig(config, override); - } else { - cfg = config; - } - - if (moduleIndex > -1 || !config.skipDirOptimize) { - optimize.jsFile(fileName, fileContents, fileName, cfg, pluginCollector); - } - } - }); - - //Normalize all the plugin resources. - context = require.s.contexts._; - - for (moduleName in pluginCollector) { - if (hasProp(pluginCollector, moduleName)) { - parentModuleMap = context.makeModuleMap(moduleName); - resources = pluginCollector[moduleName]; - for (i = 0; i < resources.length; i++) { - resource = resources[i]; - moduleMap = context.makeModuleMap(resource, parentModuleMap); - if (falseProp(context.plugins, moduleMap.prefix)) { - //Set the value in context.plugins so it - //will be evaluated as a full plugin. - context.plugins[moduleMap.prefix] = true; - - //Do not bother if the plugin is not available. - if (!file.exists(require.toUrl(moduleMap.prefix + '.js'))) { - continue; - } - - //Rely on the require in the build environment - //to be synchronous - context.require([moduleMap.prefix]); - - //Now that the plugin is loaded, redo the moduleMap - //since the plugin will need to normalize part of the path. - moduleMap = context.makeModuleMap(resource, parentModuleMap); - } - - //Only bother with plugin resources that can be handled - //processed by the plugin, via support of the writeFile - //method. - if (falseProp(pluginProcessed, moduleMap.id)) { - //Only do the work if the plugin was really loaded. - //Using an internal access because the file may - //not really be loaded. - plugin = getOwn(context.defined, moduleMap.prefix); - if (plugin && plugin.writeFile) { - plugin.writeFile( - moduleMap.prefix, - moduleMap.name, - require, - makeWriteFile( - config.namespace - ), - context.config - ); - } - - pluginProcessed[moduleMap.id] = true; - } - } - - } - } - - //console.log('PLUGIN COLLECTOR: ' + JSON.stringify(pluginCollector, null, " ")); - - - //All module layers are done, write out the build.txt file. - file.saveUtf8File(config.dir + "build.txt", buildFileContents); - } - - //If just have one CSS file to optimize, do that here. - if (config.cssIn) { - buildFileContents += optimize.cssFile(config.cssIn, config.out, config).buildText; - } - - if (typeof config.out === 'function') { - config.out(config.modules[0]._buildText); - } - - //Print out what was built into which layers. - if (buildFileContents) { - logger.info(buildFileContents); - return buildFileContents; - } - - return ''; - }); - }; - - /** - * Converts command line args like "paths.foo=../some/path" - * result.paths = { foo: '../some/path' } where prop = paths, - * name = paths.foo and value = ../some/path, so it assumes the - * name=value splitting has already happened. - */ - function stringDotToObj(result, name, value) { - var parts = name.split('.'); - - parts.forEach(function (prop, i) { - if (i === parts.length - 1) { - result[prop] = value; - } else { - if (falseProp(result, prop)) { - result[prop] = {}; - } - result = result[prop]; - } - - }); - } - - build.objProps = { - paths: true, - wrap: true, - pragmas: true, - pragmasOnSave: true, - has: true, - hasOnSave: true, - uglify: true, - uglify2: true, - closure: true, - map: true, - throwWhen: true - }; - - build.hasDotPropMatch = function (prop) { - var dotProp, - index = prop.indexOf('.'); - - if (index !== -1) { - dotProp = prop.substring(0, index); - return hasProp(build.objProps, dotProp); - } - return false; - }; - - /** - * Converts an array that has String members of "name=value" - * into an object, where the properties on the object are the names in the array. - * Also converts the strings "true" and "false" to booleans for the values. - * member name/value pairs, and converts some comma-separated lists into - * arrays. - * @param {Array} ary - */ - build.convertArrayToObject = function (ary) { - var result = {}, i, separatorIndex, prop, value, - needArray = { - "include": true, - "exclude": true, - "excludeShallow": true, - "insertRequire": true, - "stubModules": true, - "deps": true - }; - - for (i = 0; i < ary.length; i++) { - separatorIndex = ary[i].indexOf("="); - if (separatorIndex === -1) { - throw "Malformed name/value pair: [" + ary[i] + "]. Format should be name=value"; - } - - value = ary[i].substring(separatorIndex + 1, ary[i].length); - if (value === "true") { - value = true; - } else if (value === "false") { - value = false; - } - - prop = ary[i].substring(0, separatorIndex); - - //Convert to array if necessary - if (getOwn(needArray, prop)) { - value = value.split(","); - } - - if (build.hasDotPropMatch(prop)) { - stringDotToObj(result, prop, value); - } else { - result[prop] = value; - } - } - return result; //Object - }; - - build.makeAbsPath = function (path, absFilePath) { - if (!absFilePath) { - return path; - } - - //Add abspath if necessary. If path starts with a slash or has a colon, - //then already is an abolute path. - if (path.indexOf('/') !== 0 && path.indexOf(':') === -1) { - path = absFilePath + - (absFilePath.charAt(absFilePath.length - 1) === '/' ? '' : '/') + - path; - path = file.normalize(path); - } - return path.replace(lang.backSlashRegExp, '/'); - }; - - build.makeAbsObject = function (props, obj, absFilePath) { - var i, prop; - if (obj) { - for (i = 0; i < props.length; i++) { - prop = props[i]; - if (hasProp(obj, prop) && typeof obj[prop] === 'string') { - obj[prop] = build.makeAbsPath(obj[prop], absFilePath); - } - } - } - }; - - /** - * For any path in a possible config, make it absolute relative - * to the absFilePath passed in. - */ - build.makeAbsConfig = function (config, absFilePath) { - var props, prop, i; - - props = ["appDir", "dir", "baseUrl"]; - for (i = 0; i < props.length; i++) { - prop = props[i]; - - if (getOwn(config, prop)) { - //Add abspath if necessary, make sure these paths end in - //slashes - if (prop === "baseUrl") { - config.originalBaseUrl = config.baseUrl; - if (config.appDir) { - //If baseUrl with an appDir, the baseUrl is relative to - //the appDir, *not* the absFilePath. appDir and dir are - //made absolute before baseUrl, so this will work. - config.baseUrl = build.makeAbsPath(config.originalBaseUrl, config.appDir); - } else { - //The dir output baseUrl is same as regular baseUrl, both - //relative to the absFilePath. - config.baseUrl = build.makeAbsPath(config[prop], absFilePath); - } - } else { - config[prop] = build.makeAbsPath(config[prop], absFilePath); - } - - config[prop] = endsWithSlash(config[prop]); - } - } - - build.makeAbsObject(["out", "cssIn"], config, absFilePath); - build.makeAbsObject(["startFile", "endFile"], config.wrap, absFilePath); - }; - - /** - * Creates a relative path to targetPath from refPath. - * Only deals with file paths, not folders. If folders, - * make sure paths end in a trailing '/'. - */ - build.makeRelativeFilePath = function (refPath, targetPath) { - var i, dotLength, finalParts, length, - refParts = refPath.split('/'), - targetParts = targetPath.split('/'), - //Pull off file name - targetName = targetParts.pop(), - dotParts = []; - - //Also pop off the ref file name to make the matches against - //targetParts equivalent. - refParts.pop(); - - length = refParts.length; - - for (i = 0; i < length; i += 1) { - if (refParts[i] !== targetParts[i]) { - break; - } - } - - //Now i is the index in which they diverge. - finalParts = targetParts.slice(i); - - dotLength = length - i; - for (i = 0; i > -1 && i < dotLength; i += 1) { - dotParts.push('..'); - } - - return dotParts.join('/') + (dotParts.length ? '/' : '') + - finalParts.join('/') + (finalParts.length ? '/' : '') + - targetName; - }; - - build.nestedMix = { - paths: true, - has: true, - hasOnSave: true, - pragmas: true, - pragmasOnSave: true - }; - - /** - * Mixes additional source config into target config, and merges some - * nested config, like paths, correctly. - */ - function mixConfig(target, source) { - var prop, value; - - for (prop in source) { - if (hasProp(source, prop)) { - //If the value of the property is a plain object, then - //allow a one-level-deep mixing of it. - value = source[prop]; - if (typeof value === 'object' && value && - !lang.isArray(value) && !lang.isFunction(value) && - !lang.isRegExp(value)) { - target[prop] = lang.mixin({}, target[prop], value, true); - } else { - target[prop] = value; - } - } - } - - //Set up log level since it can affect if errors are thrown - //or caught and passed to errbacks while doing config setup. - if (lang.hasProp(target, 'logLevel')) { - logger.logLevel(target.logLevel); - } - } - - /** - * Converts a wrap.startFile or endFile to be start/end as a string. - * the startFile/endFile values can be arrays. - */ - function flattenWrapFile(wrap, keyName, absFilePath) { - var keyFileName = keyName + 'File'; - - if (typeof wrap[keyName] !== 'string' && wrap[keyFileName]) { - wrap[keyName] = ''; - if (typeof wrap[keyFileName] === 'string') { - wrap[keyFileName] = [wrap[keyFileName]]; - } - wrap[keyFileName].forEach(function (fileName) { - wrap[keyName] += (wrap[keyName] ? '\n' : '') + - file.readFile(build.makeAbsPath(fileName, absFilePath)); - }); - } else if (wrap[keyName] === null || wrap[keyName] === undefined) { - //Allow missing one, just set to empty string. - wrap[keyName] = ''; - } else if (typeof wrap[keyName] !== 'string') { - throw new Error('wrap.' + keyName + ' or wrap.' + keyFileName + ' malformed'); - } - } - - function normalizeWrapConfig(config, absFilePath) { - //Get any wrap text. - try { - if (config.wrap) { - if (config.wrap === true) { - //Use default values. - config.wrap = { - start: '(function () {', - end: '}());' - }; - } else { - flattenWrapFile(config.wrap, 'start', absFilePath); - flattenWrapFile(config.wrap, 'end', absFilePath); - } - } - } catch (wrapError) { - throw new Error('Malformed wrap config: ' + wrapError.toString()); - } - } - - /** - * Creates a config object for an optimization build. - * It will also read the build profile if it is available, to create - * the configuration. - * - * @param {Object} cfg config options that take priority - * over defaults and ones in the build file. These options could - * be from a command line, for instance. - * - * @param {Object} the created config object. - */ - build.createConfig = function (cfg) { - /*jslint evil: true */ - var config = {}, buildFileContents, buildFileConfig, mainConfig, - mainConfigFile, mainConfigPath, buildFile, absFilePath; - - //Make sure all paths are relative to current directory. - absFilePath = file.absPath('.'); - build.makeAbsConfig(cfg, absFilePath); - build.makeAbsConfig(buildBaseConfig, absFilePath); - - lang.mixin(config, buildBaseConfig); - lang.mixin(config, cfg, true); - - //Set up log level early since it can affect if errors are thrown - //or caught and passed to errbacks, even while constructing config. - if (lang.hasProp(config, 'logLevel')) { - logger.logLevel(config.logLevel); - } - - if (config.buildFile) { - //A build file exists, load it to get more config. - buildFile = file.absPath(config.buildFile); - - //Find the build file, and make sure it exists, if this is a build - //that has a build profile, and not just command line args with an in=path - if (!file.exists(buildFile)) { - throw new Error("ERROR: build file does not exist: " + buildFile); - } - - absFilePath = config.baseUrl = file.absPath(file.parent(buildFile)); - - //Load build file options. - buildFileContents = file.readFile(buildFile); - try { - buildFileConfig = eval("(" + buildFileContents + ")"); - build.makeAbsConfig(buildFileConfig, absFilePath); - - //Mix in the config now so that items in mainConfigFile can - //be resolved relative to them if necessary, like if appDir - //is set here, but the baseUrl is in mainConfigFile. Will - //re-mix in the same build config later after mainConfigFile - //is processed, since build config should take priority. - mixConfig(config, buildFileConfig); - } catch (e) { - throw new Error("Build file " + buildFile + " is malformed: " + e); - } - } - - mainConfigFile = config.mainConfigFile || (buildFileConfig && buildFileConfig.mainConfigFile); - if (mainConfigFile) { - mainConfigFile = build.makeAbsPath(mainConfigFile, absFilePath); - if (!file.exists(mainConfigFile)) { - throw new Error(mainConfigFile + ' does not exist.'); - } - try { - mainConfig = parse.findConfig(file.readFile(mainConfigFile)).config; - } catch (configError) { - throw new Error('The config in mainConfigFile ' + - mainConfigFile + - ' cannot be used because it cannot be evaluated' + - ' correctly while running in the optimizer. Try only' + - ' using a config that is also valid JSON, or do not use' + - ' mainConfigFile and instead copy the config values needed' + - ' into a build file or command line arguments given to the optimizer.\n' + - 'Source error from parsing: ' + mainConfigFile + ': ' + configError); - } - if (mainConfig) { - mainConfigPath = mainConfigFile.substring(0, mainConfigFile.lastIndexOf('/')); - - //Add in some existing config, like appDir, since they can be - //used inside the mainConfigFile -- paths and baseUrl are - //relative to them. - if (config.appDir && !mainConfig.appDir) { - mainConfig.appDir = config.appDir; - } - - //If no baseUrl, then use the directory holding the main config. - if (!mainConfig.baseUrl) { - mainConfig.baseUrl = mainConfigPath; - } - - build.makeAbsConfig(mainConfig, mainConfigPath); - mixConfig(config, mainConfig); - } - } - - //Mix in build file config, but only after mainConfig has been mixed in. - if (buildFileConfig) { - mixConfig(config, buildFileConfig); - } - - //Re-apply the override config values. Command line - //args should take precedence over build file values. - mixConfig(config, cfg); - - //Fix paths to full paths so that they can be adjusted consistently - //lately to be in the output area. - lang.eachProp(config.paths, function (value, prop) { - if (lang.isArray(value)) { - throw new Error('paths fallback not supported in optimizer. ' + - 'Please provide a build config path override ' + - 'for ' + prop); - } - config.paths[prop] = build.makeAbsPath(value, config.baseUrl); - }); - - //Set final output dir - if (hasProp(config, "baseUrl")) { - if (config.appDir) { - config.dirBaseUrl = build.makeAbsPath(config.originalBaseUrl, config.dir); - } else { - config.dirBaseUrl = config.dir || config.baseUrl; - } - //Make sure dirBaseUrl ends in a slash, since it is - //concatenated with other strings. - config.dirBaseUrl = endsWithSlash(config.dirBaseUrl); - } - - //Check for errors in config - if (config.main) { - throw new Error('"main" passed as an option, but the ' + - 'supported option is called "name".'); - } - if (config.out && !config.name && !config.modules && !config.include && - !config.cssIn) { - throw new Error('Missing either a "name", "include" or "modules" ' + - 'option'); - } - if (config.cssIn) { - if (config.dir || config.appDir) { - throw new Error('cssIn is only for the output of single file ' + - 'CSS optimizations and is not compatible with "dir" or "appDir" configuration.'); - } - if (!config.out) { - throw new Error('"out" option missing.'); - } - } - if (!config.cssIn && !config.baseUrl) { - //Just use the current directory as the baseUrl - config.baseUrl = './'; - } - if (!config.out && !config.dir) { - throw new Error('Missing either an "out" or "dir" config value. ' + - 'If using "appDir" for a full project optimization, ' + - 'use "dir". If you want to optimize to one file, ' + - 'use "out".'); - } - if (config.appDir && config.out) { - throw new Error('"appDir" is not compatible with "out". Use "dir" ' + - 'instead. appDir is used to copy whole projects, ' + - 'where "out" with "baseUrl" is used to just ' + - 'optimize to one file.'); - } - if (config.out && config.dir) { - throw new Error('The "out" and "dir" options are incompatible.' + - ' Use "out" if you are targeting a single file for' + - ' for optimization, and "dir" if you want the appDir' + - ' or baseUrl directories optimized.'); - } - - if (config.dir) { - // Make sure the output dir is not set to a parent of the - // source dir or the same dir, as it will result in source - // code deletion. - if (config.dir === config.baseUrl || - config.dir === config.appDir || - (config.baseUrl && build.makeRelativeFilePath(config.dir, - config.baseUrl).indexOf('..') !== 0) || - (config.appDir && - build.makeRelativeFilePath(config.dir, config.appDir).indexOf('..') !== 0)) { - throw new Error('"dir" is set to a parent or same directory as' + - ' "appDir" or "baseUrl". This can result in' + - ' the deletion of source code. Stopping.'); - } - } - - if (config.insertRequire && !lang.isArray(config.insertRequire)) { - throw new Error('insertRequire should be a list of module IDs' + - ' to insert in to a require([]) call.'); - } - - if (config.generateSourceMaps) { - if (config.preserveLicenseComments && config.optimize !== 'none') { - throw new Error('Cannot use preserveLicenseComments and ' + - 'generateSourceMaps together. Either explcitly set ' + - 'preserveLicenseComments to false (default is true) or ' + - 'turn off generateSourceMaps. If you want source maps with ' + - 'license comments, see: ' + - 'http://requirejs.org/docs/errors.html#sourcemapcomments'); - } else if (config.optimize !== 'none' && - config.optimize !== 'closure' && - config.optimize !== 'uglify2') { - //Allow optimize: none to pass, since it is useful when toggling - //minification on and off to debug something, and it implicitly - //works, since it does not need a source map. - throw new Error('optimize: "' + config.optimize + - '" does not support generateSourceMaps.'); - } - } - - if ((config.name || config.include) && !config.modules) { - //Just need to build one file, but may be part of a whole appDir/ - //baseUrl copy, but specified on the command line, so cannot do - //the modules array setup. So create a modules section in that - //case. - config.modules = [ - { - name: config.name, - out: config.out, - create: config.create, - include: config.include, - exclude: config.exclude, - excludeShallow: config.excludeShallow, - insertRequire: config.insertRequire, - stubModules: config.stubModules - } - ]; - delete config.stubModules; - } else if (config.modules && config.out) { - throw new Error('If the "modules" option is used, then there ' + - 'should be a "dir" option set and "out" should ' + - 'not be used since "out" is only for single file ' + - 'optimization output.'); - } else if (config.modules && config.name) { - throw new Error('"name" and "modules" options are incompatible. ' + - 'Either use "name" if doing a single file ' + - 'optimization, or "modules" if you want to target ' + - 'more than one file for optimization.'); - } - - if (config.out && !config.cssIn) { - //Just one file to optimize. - - //Does not have a build file, so set up some defaults. - //Optimizing CSS should not be allowed, unless explicitly - //asked for on command line. In that case the only task is - //to optimize a CSS file. - if (!cfg.optimizeCss) { - config.optimizeCss = "none"; - } - } - - //Normalize cssPrefix - if (config.cssPrefix) { - //Make sure cssPrefix ends in a slash - config.cssPrefix = endsWithSlash(config.cssPrefix); - } else { - config.cssPrefix = ''; - } - - //Cycle through modules and combine any local stubModules with - //global values. - if (config.modules && config.modules.length) { - config.modules.forEach(function (mod) { - if (config.stubModules) { - mod.stubModules = config.stubModules.concat(mod.stubModules || []); - } - - //Create a hash lookup for the stubModules config to make lookup - //cheaper later. - if (mod.stubModules) { - mod.stubModules._byName = {}; - mod.stubModules.forEach(function (id) { - mod.stubModules._byName[id] = true; - }); - } - - //Allow wrap config in overrides, but normalize it. - if (mod.override) { - normalizeWrapConfig(mod.override, absFilePath); - } - }); - } - - normalizeWrapConfig(config, absFilePath); - - //Do final input verification - if (config.context) { - throw new Error('The build argument "context" is not supported' + - ' in a build. It should only be used in web' + - ' pages.'); - } - - //Set up normalizeDirDefines. If not explicitly set, if optimize "none", - //set to "skip" otherwise set to "all". - if (!hasProp(config, 'normalizeDirDefines')) { - if (config.optimize === 'none' || config.skipDirOptimize) { - config.normalizeDirDefines = 'skip'; - } else { - config.normalizeDirDefines = 'all'; - } - } - - //Set file.fileExclusionRegExp if desired - if (hasProp(config, 'fileExclusionRegExp')) { - if (typeof config.fileExclusionRegExp === "string") { - file.exclusionRegExp = new RegExp(config.fileExclusionRegExp); - } else { - file.exclusionRegExp = config.fileExclusionRegExp; - } - } else if (hasProp(config, 'dirExclusionRegExp')) { - //Set file.dirExclusionRegExp if desired, this is the old - //name for fileExclusionRegExp before 1.0.2. Support for backwards - //compatibility - file.exclusionRegExp = config.dirExclusionRegExp; - } - - //Remove things that may cause problems in the build. - delete config.jQuery; - delete config.enforceDefine; - delete config.urlArgs; - - return config; - }; - - /** - * finds the module being built/optimized with the given moduleName, - * or returns null. - * @param {String} moduleName - * @param {Array} modules - * @returns {Object} the module object from the build profile, or null. - */ - build.findBuildModule = function (moduleName, modules) { - var i, module; - for (i = 0; i < modules.length; i++) { - module = modules[i]; - if (module.name === moduleName) { - return module; - } - } - return null; - }; - - /** - * Removes a module name and path from a layer, if it is supposed to be - * excluded from the layer. - * @param {String} moduleName the name of the module - * @param {String} path the file path for the module - * @param {Object} layer the layer to remove the module/path from - */ - build.removeModulePath = function (module, path, layer) { - var index = layer.buildFilePaths.indexOf(path); - if (index !== -1) { - layer.buildFilePaths.splice(index, 1); - } - }; - - /** - * Uses the module build config object to trace the dependencies for the - * given module. - * - * @param {Object} module the module object from the build config info. - * @param {Object} config the build config object. - * @param {Object} [baseLoaderConfig] the base loader config to use for env resets. - * - * @returns {Object} layer information about what paths and modules should - * be in the flattened module. - */ - build.traceDependencies = function (module, config, baseLoaderConfig) { - var include, override, layer, context, oldContext, - rawTextByIds, - syncChecks = { - rhino: true, - node: true, - xpconnect: true - }, - deferred = prim(); - - //Reset some state set up in requirePatch.js, and clean up require's - //current context. - oldContext = require._buildReset(); - - //Grab the reset layer and context after the reset, but keep the - //old config to reuse in the new context. - layer = require._layer; - context = layer.context; - - //Put back basic config, use a fresh object for it. - if (baseLoaderConfig) { - require(lang.deeplikeCopy(baseLoaderConfig)); - } - - logger.trace("\nTracing dependencies for: " + (module.name || - (typeof module.out === 'function' ? 'FUNCTION' : module.out))); - include = module.name && !module.create ? [module.name] : []; - if (module.include) { - include = include.concat(module.include); - } - - //If there are overrides to basic config, set that up now.; - if (module.override) { - if (baseLoaderConfig) { - override = build.createOverrideConfig(baseLoaderConfig, module.override); - } else { - override = lang.deeplikeCopy(module.override); - } - require(override); - } - - //Now, populate the rawText cache with any values explicitly passed in - //via config. - rawTextByIds = require.s.contexts._.config.rawText; - if (rawTextByIds) { - lang.eachProp(rawTextByIds, function (contents, id) { - var url = require.toUrl(id) + '.js'; - require._cachedRawText[url] = contents; - }); - } - - - //Configure the callbacks to be called. - deferred.reject.__requireJsBuild = true; - - //Use a wrapping function so can check for errors. - function includeFinished(value) { - //If a sync build environment, check for errors here, instead of - //in the then callback below, since some errors, like two IDs pointed - //to same URL but only one anon ID will leave the loader in an - //unresolved state since a setTimeout cannot be used to check for - //timeout. - var hasError = false; - if (syncChecks[env.get()]) { - try { - build.checkForErrors(context); - } catch (e) { - hasError = true; - deferred.reject(e); - } - } - - if (!hasError) { - deferred.resolve(value); - } - } - includeFinished.__requireJsBuild = true; - - //Figure out module layer dependencies by calling require to do the work. - require(include, includeFinished, deferred.reject); - - // If a sync env, then with the "two IDs to same anon module path" - // issue, the require never completes, need to check for errors - // here. - if (syncChecks[env.get()]) { - build.checkForErrors(context); - } - - return deferred.promise.then(function () { - //Reset config - if (module.override && baseLoaderConfig) { - require(lang.deeplikeCopy(baseLoaderConfig)); - } - - build.checkForErrors(context); - - return layer; - }); - }; - - build.checkForErrors = function (context) { - //Check to see if it all loaded. If not, then throw, and give - //a message on what is left. - var id, prop, mod, idParts, pluginId, - errMessage = '', - failedPluginMap = {}, - failedPluginIds = [], - errIds = [], - errUrlMap = {}, - errUrlConflicts = {}, - hasErrUrl = false, - hasUndefined = false, - defined = context.defined, - registry = context.registry; - - function populateErrUrlMap(id, errUrl, skipNew) { - if (!skipNew) { - errIds.push(id); - } - - if (errUrlMap[errUrl]) { - hasErrUrl = true; - //This error module has the same URL as another - //error module, could be misconfiguration. - if (!errUrlConflicts[errUrl]) { - errUrlConflicts[errUrl] = []; - //Store the original module that had the same URL. - errUrlConflicts[errUrl].push(errUrlMap[errUrl]); - } - errUrlConflicts[errUrl].push(id); - } else if (!skipNew) { - errUrlMap[errUrl] = id; - } - } - - for (id in registry) { - if (hasProp(registry, id) && id.indexOf('_@r') !== 0) { - hasUndefined = true; - mod = getOwn(registry, id); - - if (id.indexOf('_unnormalized') === -1 && mod && mod.enabled) { - populateErrUrlMap(id, mod.map.url); - } - - //Look for plugins that did not call load() - idParts = id.split('!'); - pluginId = idParts[0]; - if (idParts.length > 1 && falseProp(failedPluginMap, pluginId)) { - failedPluginIds.push(pluginId); - failedPluginMap[pluginId] = true; - } - } - } - - // If have some modules that are not defined/stuck in the registry, - // then check defined modules for URL overlap. - if (hasUndefined) { - for (id in defined) { - if (hasProp(defined, id) && id.indexOf('!') === -1) { - populateErrUrlMap(id, require.toUrl(id) + '.js', true); - } - } - } - - if (errIds.length || failedPluginIds.length) { - if (failedPluginIds.length) { - errMessage += 'Loader plugin' + - (failedPluginIds.length === 1 ? '' : 's') + - ' did not call ' + - 'the load callback in the build: ' + - failedPluginIds.join(', ') + '\n'; - } - errMessage += 'Module loading did not complete for: ' + errIds.join(', '); - - if (hasErrUrl) { - errMessage += '\nThe following modules share the same URL. This ' + - 'could be a misconfiguration if that URL only has ' + - 'one anonymous module in it:'; - for (prop in errUrlConflicts) { - if (hasProp(errUrlConflicts, prop)) { - errMessage += '\n' + prop + ': ' + - errUrlConflicts[prop].join(', '); - } - } - } - throw new Error(errMessage); - } - }; - - build.createOverrideConfig = function (config, override) { - var cfg = lang.deeplikeCopy(config), - oride = lang.deeplikeCopy(override); - - lang.eachProp(oride, function (value, prop) { - if (hasProp(build.objProps, prop)) { - //An object property, merge keys. Start a new object - //so that source object in config does not get modified. - cfg[prop] = {}; - lang.mixin(cfg[prop], config[prop], true); - lang.mixin(cfg[prop], override[prop], true); - } else { - cfg[prop] = override[prop]; - } - }); - - return cfg; - }; - - /** - * Uses the module build config object to create an flattened version - * of the module, with deep dependencies included. - * - * @param {Object} module the module object from the build config info. - * - * @param {Object} layer the layer object returned from build.traceDependencies. - * - * @param {Object} the build config object. - * - * @returns {Object} with two properties: "text", the text of the flattened - * module, and "buildText", a string of text representing which files were - * included in the flattened module text. - */ - build.flattenModule = function (module, layer, config) { - var fileContents, sourceMapGenerator, - sourceMapBase, - buildFileContents = ''; - - return prim().start(function () { - var reqIndex, currContents, - moduleName, shim, packageConfig, nonPackageName, - parts, builder, writeApi, - namespace, namespaceWithDot, stubModulesByName, - context = layer.context, - onLayerEnds = [], - onLayerEndAdded = {}; - - //Use override settings, particularly for pragmas - //Do this before the var readings since it reads config values. - if (module.override) { - config = build.createOverrideConfig(config, module.override); - } - - namespace = config.namespace || ''; - namespaceWithDot = namespace ? namespace + '.' : ''; - stubModulesByName = (module.stubModules && module.stubModules._byName) || {}; - - //Start build output for the module. - module.onCompleteData = { - name: module.name, - path: (config.dir ? module._buildPath.replace(config.dir, "") : module._buildPath), - included: [] - }; - - buildFileContents += "\n" + - module.onCompleteData.path + - "\n----------------\n"; - - //If there was an existing file with require in it, hoist to the top. - if (layer.existingRequireUrl) { - reqIndex = layer.buildFilePaths.indexOf(layer.existingRequireUrl); - if (reqIndex !== -1) { - layer.buildFilePaths.splice(reqIndex, 1); - layer.buildFilePaths.unshift(layer.existingRequireUrl); - } - } - - if (config.generateSourceMaps) { - sourceMapBase = config.dir || config.baseUrl; - sourceMapGenerator = new SourceMapGenerator.SourceMapGenerator({ - file: module._buildPath.replace(sourceMapBase, '') - }); - } - - //Write the built module to disk, and build up the build output. - fileContents = ""; - return prim.serial(layer.buildFilePaths.map(function (path) { - return function () { - var lineCount, - singleContents = ''; - - moduleName = layer.buildFileToModule[path]; - //If the moduleName is for a package main, then update it to the - //real main value. - packageConfig = layer.context.config.pkgs && - getOwn(layer.context.config.pkgs, moduleName); - if (packageConfig) { - nonPackageName = moduleName; - moduleName += '/' + packageConfig.main; - } - - return prim().start(function () { - //Figure out if the module is a result of a build plugin, and if so, - //then delegate to that plugin. - parts = context.makeModuleMap(moduleName); - builder = parts.prefix && getOwn(context.defined, parts.prefix); - if (builder) { - if (builder.onLayerEnd && falseProp(onLayerEndAdded, parts.prefix)) { - onLayerEnds.push(builder); - onLayerEndAdded[parts.prefix] = true; - } - - if (builder.write) { - writeApi = function (input) { - singleContents += "\n" + addSemiColon(input, config); - if (config.onBuildWrite) { - singleContents = config.onBuildWrite(moduleName, path, singleContents); - } - }; - writeApi.asModule = function (moduleName, input) { - singleContents += "\n" + - addSemiColon(build.toTransport(namespace, moduleName, path, input, layer, { - useSourceUrl: layer.context.config.useSourceUrl - }), config); - if (config.onBuildWrite) { - singleContents = config.onBuildWrite(moduleName, path, singleContents); - } - }; - builder.write(parts.prefix, parts.name, writeApi); - } - return; - } else { - return prim().start(function () { - if (hasProp(stubModulesByName, moduleName)) { - //Just want to insert a simple module definition instead - //of the source module. Useful for plugins that inline - //all their resources. - if (hasProp(layer.context.plugins, moduleName)) { - //Slightly different content for plugins, to indicate - //that dynamic loading will not work. - return 'define({load: function(id){throw new Error("Dynamic load not allowed: " + id);}});'; - } else { - return 'define({});'; - } - } else { - return require._cacheReadAsync(path); - } - }).then(function (text) { - var hasPackageName; - - currContents = text; - - if (config.cjsTranslate && - (!config.shim || !lang.hasProp(config.shim, moduleName))) { - currContents = commonJs.convert(path, currContents); - } - - if (config.onBuildRead) { - currContents = config.onBuildRead(moduleName, path, currContents); - } - - if (packageConfig) { - hasPackageName = (nonPackageName === parse.getNamedDefine(currContents)); - } - - if (namespace) { - currContents = pragma.namespace(currContents, namespace); - } - - currContents = build.toTransport(namespace, moduleName, path, currContents, layer, { - useSourceUrl: config.useSourceUrl - }); - - if (packageConfig && !hasPackageName) { - currContents = addSemiColon(currContents, config) + '\n'; - currContents += namespaceWithDot + "define('" + - packageConfig.name + "', ['" + moduleName + - "'], function (main) { return main; });\n"; - } - - if (config.onBuildWrite) { - currContents = config.onBuildWrite(moduleName, path, currContents); - } - - //Semicolon is for files that are not well formed when - //concatenated with other content. - singleContents += "\n" + addSemiColon(currContents, config); - }); - } - }).then(function () { - var refPath, pluginId, resourcePath, - sourceMapPath, sourceMapLineNumber, - shortPath = path.replace(config.dir, ""); - - module.onCompleteData.included.push(shortPath); - buildFileContents += shortPath + "\n"; - - //Some files may not have declared a require module, and if so, - //put in a placeholder call so the require does not try to load them - //after the module is processed. - //If we have a name, but no defined module, then add in the placeholder. - if (moduleName && falseProp(layer.modulesWithNames, moduleName) && !config.skipModuleInsertion) { - shim = config.shim && (getOwn(config.shim, moduleName) || (packageConfig && getOwn(config.shim, nonPackageName))); - if (shim) { - singleContents += '\n' + namespaceWithDot + 'define("' + moduleName + '", ' + - (shim.deps && shim.deps.length ? - build.makeJsArrayString(shim.deps) + ', ' : '') + - (shim.exportsFn ? shim.exportsFn() : 'function(){}') + - ');\n'; - } else { - singleContents += '\n' + namespaceWithDot + 'define("' + moduleName + '", function(){});\n'; - } - } - - //Add to the source map - if (sourceMapGenerator) { - refPath = config.out ? config.baseUrl : module._buildPath; - parts = path.split('!'); - if (parts.length === 1) { - //Not a plugin resource, fix the path - sourceMapPath = build.makeRelativeFilePath(refPath, path); - } else { - //Plugin resource. If it looks like just a plugin - //followed by a module ID, pull off the plugin - //and put it at the end of the name, otherwise - //just leave it alone. - pluginId = parts.shift(); - resourcePath = parts.join('!'); - if (resourceIsModuleIdRegExp.test(resourcePath)) { - sourceMapPath = build.makeRelativeFilePath(refPath, require.toUrl(resourcePath)) + - '!' + pluginId; - } else { - sourceMapPath = path; - } - } - - sourceMapLineNumber = fileContents.split('\n').length - 1; - lineCount = singleContents.split('\n').length; - for (var i = 1; i <= lineCount; i += 1) { - sourceMapGenerator.addMapping({ - generated: { - line: sourceMapLineNumber + i, - column: 0 - }, - original: { - line: i, - column: 0 - }, - source: sourceMapPath - }); - } - - //Store the content of the original in the source - //map since other transforms later like minification - //can mess up translating back to the original - //source. - sourceMapGenerator.setSourceContent(sourceMapPath, singleContents); - } - - //Add the file to the final contents - fileContents += singleContents; - }); - }; - })).then(function () { - if (onLayerEnds.length) { - onLayerEnds.forEach(function (builder) { - var path; - if (typeof module.out === 'string') { - path = module.out; - } else if (typeof module._buildPath === 'string') { - path = module._buildPath; - } - builder.onLayerEnd(function (input) { - fileContents += "\n" + addSemiColon(input, config); - }, { - name: module.name, - path: path - }); - }); - } - - if (module.create) { - //The ID is for a created layer. Write out - //a module definition for it in case the - //built file is used with enforceDefine - //(#432) - fileContents += '\n' + namespaceWithDot + 'define("' + module.name + '", function(){});\n'; - } - - //Add a require at the end to kick start module execution, if that - //was desired. Usually this is only specified when using small shim - //loaders like almond. - if (module.insertRequire) { - fileContents += '\n' + namespaceWithDot + 'require(["' + module.insertRequire.join('", "') + '"]);\n'; - } - }); - }).then(function () { - return { - text: config.wrap ? - config.wrap.start + fileContents + config.wrap.end : - fileContents, - buildText: buildFileContents, - sourceMap: sourceMapGenerator ? - JSON.stringify(sourceMapGenerator.toJSON(), null, ' ') : - undefined - }; - }); - }; - - //Converts an JS array of strings to a string representation. - //Not using JSON.stringify() for Rhino's sake. - build.makeJsArrayString = function (ary) { - return '["' + ary.map(function (item) { - //Escape any double quotes, backslashes - return lang.jsEscape(item); - }).join('","') + '"]'; - }; - - build.toTransport = function (namespace, moduleName, path, contents, layer, options) { - var baseUrl = layer && layer.context.config.baseUrl; - - function onFound(info) { - //Only mark this module as having a name if not a named module, - //or if a named module and the name matches expectations. - if (layer && (info.needsId || info.foundId === moduleName)) { - layer.modulesWithNames[moduleName] = true; - } - } - - //Convert path to be a local one to the baseUrl, useful for - //useSourceUrl. - if (baseUrl) { - path = path.replace(baseUrl, ''); - } - - return transform.toTransport(namespace, moduleName, path, contents, onFound, options); - }; - - return build; -}); - - } - - - /** - * Sets the default baseUrl for requirejs to be directory of top level - * script. - */ - function setBaseUrl(fileName) { - //Use the file name's directory as the baseUrl if available. - dir = fileName.replace(/\\/g, '/'); - if (dir.indexOf('/') !== -1) { - dir = dir.split('/'); - dir.pop(); - dir = dir.join('/'); - //Make sure dir is JS-escaped, since it will be part of a JS string. - exec("require({baseUrl: '" + dir.replace(/[\\"']/g, '\\$&') + "'});"); - } - } - - function createRjsApi() { - //Create a method that will run the optimzer given an object - //config. - requirejs.optimize = function (config, callback, errback) { - if (!loadedOptimizedLib) { - loadLib(); - loadedOptimizedLib = true; - } - - //Create the function that will be called once build modules - //have been loaded. - var runBuild = function (build, logger, quit) { - //Make sure config has a log level, and if not, - //make it "silent" by default. - config.logLevel = config.hasOwnProperty('logLevel') ? - config.logLevel : logger.SILENT; - - //Reset build internals first in case this is part - //of a long-running server process that could have - //exceptioned out in a bad state. It is only defined - //after the first call though. - if (requirejs._buildReset) { - requirejs._buildReset(); - requirejs._cacheReset(); - } - - function done(result) { - //And clean up, in case something else triggers - //a build in another pathway. - if (requirejs._buildReset) { - requirejs._buildReset(); - requirejs._cacheReset(); - } - - // Ensure errors get propagated to the errback - if (result instanceof Error) { - throw result; - } - - return result; - } - - errback = errback || function (err) { - // Using console here since logger may have - // turned off error logging. Since quit is - // called want to be sure a message is printed. - console.log(err); - quit(1); - }; - - build(config).then(done, done).then(callback, errback); - }; - - requirejs({ - context: 'build' - }, ['build', 'logger', 'env!env/quit'], runBuild); - }; - - requirejs.tools = { - useLib: function (contextName, callback) { - if (!callback) { - callback = contextName; - contextName = 'uselib'; - } - - if (!useLibLoaded[contextName]) { - loadLib(); - useLibLoaded[contextName] = true; - } - - var req = requirejs({ - context: contextName - }); - - req(['build'], function () { - callback(req); - }); - } - }; - - requirejs.define = define; - } - - //If in Node, and included via a require('requirejs'), just export and - //THROW IT ON THE GROUND! - if (env === 'node' && reqMain !== module) { - setBaseUrl(path.resolve(reqMain ? reqMain.filename : '.')); - - createRjsApi(); - - module.exports = requirejs; - return; - } else if (env === 'browser') { - //Only option is to use the API. - setBaseUrl(location.href); - createRjsApi(); - return; - } else if ((env === 'rhino' || env === 'xpconnect') && - //User sets up requirejsAsLib variable to indicate it is loaded - //via load() to be used as a library. - typeof requirejsAsLib !== 'undefined' && requirejsAsLib) { - //This script is loaded via rhino's load() method, expose the - //API and get out. - setBaseUrl(fileName); - createRjsApi(); - return; - } - - if (commandOption === 'o') { - //Do the optimizer work. - loadLib(); - - /** - * @license Copyright (c) 2010-2011, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ - -/* - * Create a build.js file that has the build options you want and pass that - * build file to this file to do the build. See example.build.js for more information. - */ - -/*jslint strict: false, nomen: false */ -/*global require: false */ - -require({ - baseUrl: require.s.contexts._.config.baseUrl, - //Use a separate context than the default context so that the - //build can use the default context. - context: 'build', - catchError: { - define: true - } -}, ['env!env/args', 'env!env/quit', 'logger', 'build'], -function (args, quit, logger, build) { - build(args).then(function () {}, function (err) { - logger.error(err); - quit(1); - }); -}); - - - } else if (commandOption === 'v') { - console.log('r.js: ' + version + - ', RequireJS: ' + this.requirejsVars.require.version + - ', UglifyJS2: 2.4.0, UglifyJS: 1.3.4'); - } else if (commandOption === 'convert') { - loadLib(); - - this.requirejsVars.require(['env!env/args', 'commonJs', 'env!env/print'], - function (args, commonJs, print) { - - var srcDir, outDir; - srcDir = args[0]; - outDir = args[1]; - - if (!srcDir || !outDir) { - print('Usage: path/to/commonjs/modules output/dir'); - return; - } - - commonJs.convertDir(args[0], args[1]); - }); - } else { - //Just run an app - - //Load the bundled libraries for use in the app. - if (commandOption === 'lib') { - loadLib(); - } - - setBaseUrl(fileName); - - if (exists(fileName)) { - exec(readFile(fileName), fileName); - } else { - showHelp(); - } - } - -}((typeof console !== 'undefined' ? console : undefined), - (typeof Packages !== 'undefined' || (typeof window === 'undefined' && - typeof Components !== 'undefined' && Components.interfaces) ? - Array.prototype.slice.call(arguments, 0) : []), - (typeof readFile !== 'undefined' ? readFile : undefined))); diff --git a/node_modules/requirejs/package.json b/node_modules/requirejs/package.json deleted file mode 100644 index 932c4b0a..00000000 --- a/node_modules/requirejs/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "requirejs", - "description": "Node adapter for RequireJS, for loading AMD modules. Includes RequireJS optimizer", - "version": "2.1.9", - "homepage": "http://github.com/jrburke/r.js", - "author": { - "name": "James Burke", - "email": "jrburke@gmail.com", - "url": "http://github.com/jrburke" - }, - "licenses": [ - { - "type": "BSD", - "url": "https://github.com/jrburke/r.js/blob/master/LICENSE" - }, - { - "type": "MIT", - "url": "https://github.com/jrburke/r.js/blob/master/LICENSE" - } - ], - "repository": { - "type": "git", - "url": "https://github.com/jrburke/r.js.git" - }, - "main": "./bin/r.js", - "bin": { - "r.js": "./bin/r.js" - }, - "engines": { - "node": ">=0.4.0" - }, - "readme": "# requirejs\n\nRequireJS for use in Node. includes:\n\n* r.js: the RequireJS optimizer, and AMD runtime for use in Node.\n* require.js: The browser-based AMD loader.\n\nMore information at http://requirejs.org\n\n", - "readmeFilename": "README.md", - "bugs": { - "url": "https://github.com/jrburke/r.js/issues" - }, - "_id": "requirejs@2.1.9", - "_from": "requirejs@~2.1" -} diff --git a/node_modules/requirejs/require.js b/node_modules/requirejs/require.js deleted file mode 100644 index 2ce09b5e..00000000 --- a/node_modules/requirejs/require.js +++ /dev/null @@ -1,2054 +0,0 @@ -/** vim: et:ts=4:sw=4:sts=4 - * @license RequireJS 2.1.9 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved. - * Available via the MIT or new BSD license. - * see: http://github.com/jrburke/requirejs for details - */ -//Not using strict: uneven strict support in browsers, #392, and causes -//problems with requirejs.exec()/transpiler plugins that may not be strict. -/*jslint regexp: true, nomen: true, sloppy: true */ -/*global window, navigator, document, importScripts, setTimeout, opera */ - -var requirejs, require, define; -(function (global) { - var req, s, head, baseElement, dataMain, src, - interactiveScript, currentlyAddingScript, mainScript, subPath, - version = '2.1.9', - commentRegExp = /(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/mg, - cjsRequireRegExp = /[^.]\s*require\s*\(\s*["']([^'"\s]+)["']\s*\)/g, - jsSuffixRegExp = /\.js$/, - currDirRegExp = /^\.\//, - op = Object.prototype, - ostring = op.toString, - hasOwn = op.hasOwnProperty, - ap = Array.prototype, - apsp = ap.splice, - isBrowser = !!(typeof window !== 'undefined' && typeof navigator !== 'undefined' && window.document), - isWebWorker = !isBrowser && typeof importScripts !== 'undefined', - //PS3 indicates loaded and complete, but need to wait for complete - //specifically. Sequence is 'loading', 'loaded', execution, - // then 'complete'. The UA check is unfortunate, but not sure how - //to feature test w/o causing perf issues. - readyRegExp = isBrowser && navigator.platform === 'PLAYSTATION 3' ? - /^complete$/ : /^(complete|loaded)$/, - defContextName = '_', - //Oh the tragedy, detecting opera. See the usage of isOpera for reason. - isOpera = typeof opera !== 'undefined' && opera.toString() === '[object Opera]', - contexts = {}, - cfg = {}, - globalDefQueue = [], - useInteractive = false; - - function isFunction(it) { - return ostring.call(it) === '[object Function]'; - } - - function isArray(it) { - return ostring.call(it) === '[object Array]'; - } - - /** - * Helper function for iterating over an array. If the func returns - * a true value, it will break out of the loop. - */ - function each(ary, func) { - if (ary) { - var i; - for (i = 0; i < ary.length; i += 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } - } - } - } - - /** - * Helper function for iterating over an array backwards. If the func - * returns a true value, it will break out of the loop. - */ - function eachReverse(ary, func) { - if (ary) { - var i; - for (i = ary.length - 1; i > -1; i -= 1) { - if (ary[i] && func(ary[i], i, ary)) { - break; - } - } - } - } - - function hasProp(obj, prop) { - return hasOwn.call(obj, prop); - } - - function getOwn(obj, prop) { - return hasProp(obj, prop) && obj[prop]; - } - - /** - * Cycles over properties in an object and calls a function for each - * property value. If the function returns a truthy value, then the - * iteration is stopped. - */ - function eachProp(obj, func) { - var prop; - for (prop in obj) { - if (hasProp(obj, prop)) { - if (func(obj[prop], prop)) { - break; - } - } - } - } - - /** - * Simple function to mix in properties from source into target, - * but only if target does not already have a property of the same name. - */ - function mixin(target, source, force, deepStringMixin) { - if (source) { - eachProp(source, function (value, prop) { - if (force || !hasProp(target, prop)) { - if (deepStringMixin && typeof value !== 'string') { - if (!target[prop]) { - target[prop] = {}; - } - mixin(target[prop], value, force, deepStringMixin); - } else { - target[prop] = value; - } - } - }); - } - return target; - } - - //Similar to Function.prototype.bind, but the 'this' object is specified - //first, since it is easier to read/figure out what 'this' will be. - function bind(obj, fn) { - return function () { - return fn.apply(obj, arguments); - }; - } - - function scripts() { - return document.getElementsByTagName('script'); - } - - function defaultOnError(err) { - throw err; - } - - //Allow getting a global that expressed in - //dot notation, like 'a.b.c'. - function getGlobal(value) { - if (!value) { - return value; - } - var g = global; - each(value.split('.'), function (part) { - g = g[part]; - }); - return g; - } - - /** - * Constructs an error with a pointer to an URL with more information. - * @param {String} id the error ID that maps to an ID on a web page. - * @param {String} message human readable error. - * @param {Error} [err] the original error, if there is one. - * - * @returns {Error} - */ - function makeError(id, msg, err, requireModules) { - var e = new Error(msg + '\nhttp://requirejs.org/docs/errors.html#' + id); - e.requireType = id; - e.requireModules = requireModules; - if (err) { - e.originalError = err; - } - return e; - } - - if (typeof define !== 'undefined') { - //If a define is already in play via another AMD loader, - //do not overwrite. - return; - } - - if (typeof requirejs !== 'undefined') { - if (isFunction(requirejs)) { - //Do not overwrite and existing requirejs instance. - return; - } - cfg = requirejs; - requirejs = undefined; - } - - //Allow for a require config object - if (typeof require !== 'undefined' && !isFunction(require)) { - //assume it is a config object. - cfg = require; - require = undefined; - } - - function newContext(contextName) { - var inCheckLoaded, Module, context, handlers, - checkLoadedTimeoutId, - config = { - //Defaults. Do not set a default for map - //config to speed up normalize(), which - //will run faster if there is no default. - waitSeconds: 7, - baseUrl: './', - paths: {}, - pkgs: {}, - shim: {}, - config: {} - }, - registry = {}, - //registry of just enabled modules, to speed - //cycle breaking code when lots of modules - //are registered, but not activated. - enabledRegistry = {}, - undefEvents = {}, - defQueue = [], - defined = {}, - urlFetched = {}, - requireCounter = 1, - unnormalizedCounter = 1; - - /** - * Trims the . and .. from an array of path segments. - * It will keep a leading path segment if a .. will become - * the first path segment, to help with module name lookups, - * which act like paths, but can be remapped. But the end result, - * all paths that use this function should look normalized. - * NOTE: this method MODIFIES the input array. - * @param {Array} ary the array of path segments. - */ - function trimDots(ary) { - var i, part; - for (i = 0; ary[i]; i += 1) { - part = ary[i]; - if (part === '.') { - ary.splice(i, 1); - i -= 1; - } else if (part === '..') { - if (i === 1 && (ary[2] === '..' || ary[0] === '..')) { - //End of the line. Keep at least one non-dot - //path segment at the front so it can be mapped - //correctly to disk. Otherwise, there is likely - //no path mapping for a path starting with '..'. - //This can still fail, but catches the most reasonable - //uses of .. - break; - } else if (i > 0) { - ary.splice(i - 1, 2); - i -= 2; - } - } - } - } - - /** - * Given a relative module name, like ./something, normalize it to - * a real name that can be mapped to a path. - * @param {String} name the relative name - * @param {String} baseName a real name that the name arg is relative - * to. - * @param {Boolean} applyMap apply the map config to the value. Should - * only be done if this normalization is for a dependency ID. - * @returns {String} normalized name - */ - function normalize(name, baseName, applyMap) { - var pkgName, pkgConfig, mapValue, nameParts, i, j, nameSegment, - foundMap, foundI, foundStarMap, starI, - baseParts = baseName && baseName.split('/'), - normalizedBaseParts = baseParts, - map = config.map, - starMap = map && map['*']; - - //Adjust any relative paths. - if (name && name.charAt(0) === '.') { - //If have a base name, try to normalize against it, - //otherwise, assume it is a top-level require that will - //be relative to baseUrl in the end. - if (baseName) { - if (getOwn(config.pkgs, baseName)) { - //If the baseName is a package name, then just treat it as one - //name to concat the name with. - normalizedBaseParts = baseParts = [baseName]; - } else { - //Convert baseName to array, and lop off the last part, - //so that . matches that 'directory' and not name of the baseName's - //module. For instance, baseName of 'one/two/three', maps to - //'one/two/three.js', but we want the directory, 'one/two' for - //this normalization. - normalizedBaseParts = baseParts.slice(0, baseParts.length - 1); - } - - name = normalizedBaseParts.concat(name.split('/')); - trimDots(name); - - //Some use of packages may use a . path to reference the - //'main' module name, so normalize for that. - pkgConfig = getOwn(config.pkgs, (pkgName = name[0])); - name = name.join('/'); - if (pkgConfig && name === pkgName + '/' + pkgConfig.main) { - name = pkgName; - } - } else if (name.indexOf('./') === 0) { - // No baseName, so this is ID is resolved relative - // to baseUrl, pull off the leading dot. - name = name.substring(2); - } - } - - //Apply map config if available. - if (applyMap && map && (baseParts || starMap)) { - nameParts = name.split('/'); - - for (i = nameParts.length; i > 0; i -= 1) { - nameSegment = nameParts.slice(0, i).join('/'); - - if (baseParts) { - //Find the longest baseName segment match in the config. - //So, do joins on the biggest to smallest lengths of baseParts. - for (j = baseParts.length; j > 0; j -= 1) { - mapValue = getOwn(map, baseParts.slice(0, j).join('/')); - - //baseName segment has config, find if it has one for - //this name. - if (mapValue) { - mapValue = getOwn(mapValue, nameSegment); - if (mapValue) { - //Match, update name to the new value. - foundMap = mapValue; - foundI = i; - break; - } - } - } - } - - if (foundMap) { - break; - } - - //Check for a star map match, but just hold on to it, - //if there is a shorter segment match later in a matching - //config, then favor over this star map. - if (!foundStarMap && starMap && getOwn(starMap, nameSegment)) { - foundStarMap = getOwn(starMap, nameSegment); - starI = i; - } - } - - if (!foundMap && foundStarMap) { - foundMap = foundStarMap; - foundI = starI; - } - - if (foundMap) { - nameParts.splice(0, foundI, foundMap); - name = nameParts.join('/'); - } - } - - return name; - } - - function removeScript(name) { - if (isBrowser) { - each(scripts(), function (scriptNode) { - if (scriptNode.getAttribute('data-requiremodule') === name && - scriptNode.getAttribute('data-requirecontext') === context.contextName) { - scriptNode.parentNode.removeChild(scriptNode); - return true; - } - }); - } - } - - function hasPathFallback(id) { - var pathConfig = getOwn(config.paths, id); - if (pathConfig && isArray(pathConfig) && pathConfig.length > 1) { - //Pop off the first array value, since it failed, and - //retry - pathConfig.shift(); - context.require.undef(id); - context.require([id]); - return true; - } - } - - //Turns a plugin!resource to [plugin, resource] - //with the plugin being undefined if the name - //did not have a plugin prefix. - function splitPrefix(name) { - var prefix, - index = name ? name.indexOf('!') : -1; - if (index > -1) { - prefix = name.substring(0, index); - name = name.substring(index + 1, name.length); - } - return [prefix, name]; - } - - /** - * Creates a module mapping that includes plugin prefix, module - * name, and path. If parentModuleMap is provided it will - * also normalize the name via require.normalize() - * - * @param {String} name the module name - * @param {String} [parentModuleMap] parent module map - * for the module name, used to resolve relative names. - * @param {Boolean} isNormalized: is the ID already normalized. - * This is true if this call is done for a define() module ID. - * @param {Boolean} applyMap: apply the map config to the ID. - * Should only be true if this map is for a dependency. - * - * @returns {Object} - */ - function makeModuleMap(name, parentModuleMap, isNormalized, applyMap) { - var url, pluginModule, suffix, nameParts, - prefix = null, - parentName = parentModuleMap ? parentModuleMap.name : null, - originalName = name, - isDefine = true, - normalizedName = ''; - - //If no name, then it means it is a require call, generate an - //internal name. - if (!name) { - isDefine = false; - name = '_@r' + (requireCounter += 1); - } - - nameParts = splitPrefix(name); - prefix = nameParts[0]; - name = nameParts[1]; - - if (prefix) { - prefix = normalize(prefix, parentName, applyMap); - pluginModule = getOwn(defined, prefix); - } - - //Account for relative paths if there is a base name. - if (name) { - if (prefix) { - if (pluginModule && pluginModule.normalize) { - //Plugin is loaded, use its normalize method. - normalizedName = pluginModule.normalize(name, function (name) { - return normalize(name, parentName, applyMap); - }); - } else { - normalizedName = normalize(name, parentName, applyMap); - } - } else { - //A regular module. - normalizedName = normalize(name, parentName, applyMap); - - //Normalized name may be a plugin ID due to map config - //application in normalize. The map config values must - //already be normalized, so do not need to redo that part. - nameParts = splitPrefix(normalizedName); - prefix = nameParts[0]; - normalizedName = nameParts[1]; - isNormalized = true; - - url = context.nameToUrl(normalizedName); - } - } - - //If the id is a plugin id that cannot be determined if it needs - //normalization, stamp it with a unique ID so two matching relative - //ids that may conflict can be separate. - suffix = prefix && !pluginModule && !isNormalized ? - '_unnormalized' + (unnormalizedCounter += 1) : - ''; - - return { - prefix: prefix, - name: normalizedName, - parentMap: parentModuleMap, - unnormalized: !!suffix, - url: url, - originalName: originalName, - isDefine: isDefine, - id: (prefix ? - prefix + '!' + normalizedName : - normalizedName) + suffix - }; - } - - function getModule(depMap) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (!mod) { - mod = registry[id] = new context.Module(depMap); - } - - return mod; - } - - function on(depMap, name, fn) { - var id = depMap.id, - mod = getOwn(registry, id); - - if (hasProp(defined, id) && - (!mod || mod.defineEmitComplete)) { - if (name === 'defined') { - fn(defined[id]); - } - } else { - mod = getModule(depMap); - if (mod.error && name === 'error') { - fn(mod.error); - } else { - mod.on(name, fn); - } - } - } - - function onError(err, errback) { - var ids = err.requireModules, - notified = false; - - if (errback) { - errback(err); - } else { - each(ids, function (id) { - var mod = getOwn(registry, id); - if (mod) { - //Set error on module, so it skips timeout checks. - mod.error = err; - if (mod.events.error) { - notified = true; - mod.emit('error', err); - } - } - }); - - if (!notified) { - req.onError(err); - } - } - } - - /** - * Internal method to transfer globalQueue items to this context's - * defQueue. - */ - function takeGlobalQueue() { - //Push all the globalDefQueue items into the context's defQueue - if (globalDefQueue.length) { - //Array splice in the values since the context code has a - //local var ref to defQueue, so cannot just reassign the one - //on context. - apsp.apply(defQueue, - [defQueue.length - 1, 0].concat(globalDefQueue)); - globalDefQueue = []; - } - } - - handlers = { - 'require': function (mod) { - if (mod.require) { - return mod.require; - } else { - return (mod.require = context.makeRequire(mod.map)); - } - }, - 'exports': function (mod) { - mod.usingExports = true; - if (mod.map.isDefine) { - if (mod.exports) { - return mod.exports; - } else { - return (mod.exports = defined[mod.map.id] = {}); - } - } - }, - 'module': function (mod) { - if (mod.module) { - return mod.module; - } else { - return (mod.module = { - id: mod.map.id, - uri: mod.map.url, - config: function () { - var c, - pkg = getOwn(config.pkgs, mod.map.id); - // For packages, only support config targeted - // at the main module. - c = pkg ? getOwn(config.config, mod.map.id + '/' + pkg.main) : - getOwn(config.config, mod.map.id); - return c || {}; - }, - exports: defined[mod.map.id] - }); - } - } - }; - - function cleanRegistry(id) { - //Clean up machinery used for waiting modules. - delete registry[id]; - delete enabledRegistry[id]; - } - - function breakCycle(mod, traced, processed) { - var id = mod.map.id; - - if (mod.error) { - mod.emit('error', mod.error); - } else { - traced[id] = true; - each(mod.depMaps, function (depMap, i) { - var depId = depMap.id, - dep = getOwn(registry, depId); - - //Only force things that have not completed - //being defined, so still in the registry, - //and only if it has not been matched up - //in the module already. - if (dep && !mod.depMatched[i] && !processed[depId]) { - if (getOwn(traced, depId)) { - mod.defineDep(i, defined[depId]); - mod.check(); //pass false? - } else { - breakCycle(dep, traced, processed); - } - } - }); - processed[id] = true; - } - } - - function checkLoaded() { - var map, modId, err, usingPathFallback, - waitInterval = config.waitSeconds * 1000, - //It is possible to disable the wait interval by using waitSeconds of 0. - expired = waitInterval && (context.startTime + waitInterval) < new Date().getTime(), - noLoads = [], - reqCalls = [], - stillLoading = false, - needCycleCheck = true; - - //Do not bother if this call was a result of a cycle break. - if (inCheckLoaded) { - return; - } - - inCheckLoaded = true; - - //Figure out the state of all the modules. - eachProp(enabledRegistry, function (mod) { - map = mod.map; - modId = map.id; - - //Skip things that are not enabled or in error state. - if (!mod.enabled) { - return; - } - - if (!map.isDefine) { - reqCalls.push(mod); - } - - if (!mod.error) { - //If the module should be executed, and it has not - //been inited and time is up, remember it. - if (!mod.inited && expired) { - if (hasPathFallback(modId)) { - usingPathFallback = true; - stillLoading = true; - } else { - noLoads.push(modId); - removeScript(modId); - } - } else if (!mod.inited && mod.fetched && map.isDefine) { - stillLoading = true; - if (!map.prefix) { - //No reason to keep looking for unfinished - //loading. If the only stillLoading is a - //plugin resource though, keep going, - //because it may be that a plugin resource - //is waiting on a non-plugin cycle. - return (needCycleCheck = false); - } - } - } - }); - - if (expired && noLoads.length) { - //If wait time expired, throw error of unloaded modules. - err = makeError('timeout', 'Load timeout for modules: ' + noLoads, null, noLoads); - err.contextName = context.contextName; - return onError(err); - } - - //Not expired, check for a cycle. - if (needCycleCheck) { - each(reqCalls, function (mod) { - breakCycle(mod, {}, {}); - }); - } - - //If still waiting on loads, and the waiting load is something - //other than a plugin resource, or there are still outstanding - //scripts, then just try back later. - if ((!expired || usingPathFallback) && stillLoading) { - //Something is still waiting to load. Wait for it, but only - //if a timeout is not already in effect. - if ((isBrowser || isWebWorker) && !checkLoadedTimeoutId) { - checkLoadedTimeoutId = setTimeout(function () { - checkLoadedTimeoutId = 0; - checkLoaded(); - }, 50); - } - } - - inCheckLoaded = false; - } - - Module = function (map) { - this.events = getOwn(undefEvents, map.id) || {}; - this.map = map; - this.shim = getOwn(config.shim, map.id); - this.depExports = []; - this.depMaps = []; - this.depMatched = []; - this.pluginMaps = {}; - this.depCount = 0; - - /* this.exports this.factory - this.depMaps = [], - this.enabled, this.fetched - */ - }; - - Module.prototype = { - init: function (depMaps, factory, errback, options) { - options = options || {}; - - //Do not do more inits if already done. Can happen if there - //are multiple define calls for the same module. That is not - //a normal, common case, but it is also not unexpected. - if (this.inited) { - return; - } - - this.factory = factory; - - if (errback) { - //Register for errors on this module. - this.on('error', errback); - } else if (this.events.error) { - //If no errback already, but there are error listeners - //on this module, set up an errback to pass to the deps. - errback = bind(this, function (err) { - this.emit('error', err); - }); - } - - //Do a copy of the dependency array, so that - //source inputs are not modified. For example - //"shim" deps are passed in here directly, and - //doing a direct modification of the depMaps array - //would affect that config. - this.depMaps = depMaps && depMaps.slice(0); - - this.errback = errback; - - //Indicate this module has be initialized - this.inited = true; - - this.ignore = options.ignore; - - //Could have option to init this module in enabled mode, - //or could have been previously marked as enabled. However, - //the dependencies are not known until init is called. So - //if enabled previously, now trigger dependencies as enabled. - if (options.enabled || this.enabled) { - //Enable this module and dependencies. - //Will call this.check() - this.enable(); - } else { - this.check(); - } - }, - - defineDep: function (i, depExports) { - //Because of cycles, defined callback for a given - //export can be called more than once. - if (!this.depMatched[i]) { - this.depMatched[i] = true; - this.depCount -= 1; - this.depExports[i] = depExports; - } - }, - - fetch: function () { - if (this.fetched) { - return; - } - this.fetched = true; - - context.startTime = (new Date()).getTime(); - - var map = this.map; - - //If the manager is for a plugin managed resource, - //ask the plugin to load it now. - if (this.shim) { - context.makeRequire(this.map, { - enableBuildCallback: true - })(this.shim.deps || [], bind(this, function () { - return map.prefix ? this.callPlugin() : this.load(); - })); - } else { - //Regular dependency. - return map.prefix ? this.callPlugin() : this.load(); - } - }, - - load: function () { - var url = this.map.url; - - //Regular dependency. - if (!urlFetched[url]) { - urlFetched[url] = true; - context.load(this.map.id, url); - } - }, - - /** - * Checks if the module is ready to define itself, and if so, - * define it. - */ - check: function () { - if (!this.enabled || this.enabling) { - return; - } - - var err, cjsModule, - id = this.map.id, - depExports = this.depExports, - exports = this.exports, - factory = this.factory; - - if (!this.inited) { - this.fetch(); - } else if (this.error) { - this.emit('error', this.error); - } else if (!this.defining) { - //The factory could trigger another require call - //that would result in checking this module to - //define itself again. If already in the process - //of doing that, skip this work. - this.defining = true; - - if (this.depCount < 1 && !this.defined) { - if (isFunction(factory)) { - //If there is an error listener, favor passing - //to that instead of throwing an error. However, - //only do it for define()'d modules. require - //errbacks should not be called for failures in - //their callbacks (#699). However if a global - //onError is set, use that. - if ((this.events.error && this.map.isDefine) || - req.onError !== defaultOnError) { - try { - exports = context.execCb(id, factory, depExports, exports); - } catch (e) { - err = e; - } - } else { - exports = context.execCb(id, factory, depExports, exports); - } - - if (this.map.isDefine) { - //If setting exports via 'module' is in play, - //favor that over return value and exports. After that, - //favor a non-undefined return value over exports use. - cjsModule = this.module; - if (cjsModule && - cjsModule.exports !== undefined && - //Make sure it is not already the exports value - cjsModule.exports !== this.exports) { - exports = cjsModule.exports; - } else if (exports === undefined && this.usingExports) { - //exports already set the defined value. - exports = this.exports; - } - } - - if (err) { - err.requireMap = this.map; - err.requireModules = this.map.isDefine ? [this.map.id] : null; - err.requireType = this.map.isDefine ? 'define' : 'require'; - return onError((this.error = err)); - } - - } else { - //Just a literal value - exports = factory; - } - - this.exports = exports; - - if (this.map.isDefine && !this.ignore) { - defined[id] = exports; - - if (req.onResourceLoad) { - req.onResourceLoad(context, this.map, this.depMaps); - } - } - - //Clean up - cleanRegistry(id); - - this.defined = true; - } - - //Finished the define stage. Allow calling check again - //to allow define notifications below in the case of a - //cycle. - this.defining = false; - - if (this.defined && !this.defineEmitted) { - this.defineEmitted = true; - this.emit('defined', this.exports); - this.defineEmitComplete = true; - } - - } - }, - - callPlugin: function () { - var map = this.map, - id = map.id, - //Map already normalized the prefix. - pluginMap = makeModuleMap(map.prefix); - - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(pluginMap); - - on(pluginMap, 'defined', bind(this, function (plugin) { - var load, normalizedMap, normalizedMod, - name = this.map.name, - parentName = this.map.parentMap ? this.map.parentMap.name : null, - localRequire = context.makeRequire(map.parentMap, { - enableBuildCallback: true - }); - - //If current map is not normalized, wait for that - //normalized name to load instead of continuing. - if (this.map.unnormalized) { - //Normalize the ID if the plugin allows it. - if (plugin.normalize) { - name = plugin.normalize(name, function (name) { - return normalize(name, parentName, true); - }) || ''; - } - - //prefix and name should already be normalized, no need - //for applying map config again either. - normalizedMap = makeModuleMap(map.prefix + '!' + name, - this.map.parentMap); - on(normalizedMap, - 'defined', bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true, - ignore: true - }); - })); - - normalizedMod = getOwn(registry, normalizedMap.id); - if (normalizedMod) { - //Mark this as a dependency for this plugin, so it - //can be traced for cycles. - this.depMaps.push(normalizedMap); - - if (this.events.error) { - normalizedMod.on('error', bind(this, function (err) { - this.emit('error', err); - })); - } - normalizedMod.enable(); - } - - return; - } - - load = bind(this, function (value) { - this.init([], function () { return value; }, null, { - enabled: true - }); - }); - - load.error = bind(this, function (err) { - this.inited = true; - this.error = err; - err.requireModules = [id]; - - //Remove temp unnormalized modules for this module, - //since they will never be resolved otherwise now. - eachProp(registry, function (mod) { - if (mod.map.id.indexOf(id + '_unnormalized') === 0) { - cleanRegistry(mod.map.id); - } - }); - - onError(err); - }); - - //Allow plugins to load other code without having to know the - //context or how to 'complete' the load. - load.fromText = bind(this, function (text, textAlt) { - /*jslint evil: true */ - var moduleName = map.name, - moduleMap = makeModuleMap(moduleName), - hasInteractive = useInteractive; - - //As of 2.1.0, support just passing the text, to reinforce - //fromText only being called once per resource. Still - //support old style of passing moduleName but discard - //that moduleName in favor of the internal ref. - if (textAlt) { - text = textAlt; - } - - //Turn off interactive script matching for IE for any define - //calls in the text, then turn it back on at the end. - if (hasInteractive) { - useInteractive = false; - } - - //Prime the system by creating a module instance for - //it. - getModule(moduleMap); - - //Transfer any config to this other module. - if (hasProp(config.config, id)) { - config.config[moduleName] = config.config[id]; - } - - try { - req.exec(text); - } catch (e) { - return onError(makeError('fromtexteval', - 'fromText eval for ' + id + - ' failed: ' + e, - e, - [id])); - } - - if (hasInteractive) { - useInteractive = true; - } - - //Mark this as a dependency for the plugin - //resource - this.depMaps.push(moduleMap); - - //Support anonymous modules. - context.completeLoad(moduleName); - - //Bind the value of that module to the value for this - //resource ID. - localRequire([moduleName], load); - }); - - //Use parentName here since the plugin's name is not reliable, - //could be some weird string with no path that actually wants to - //reference the parentName's path. - plugin.load(map.name, localRequire, load, config); - })); - - context.enable(pluginMap, this); - this.pluginMaps[pluginMap.id] = pluginMap; - }, - - enable: function () { - enabledRegistry[this.map.id] = this; - this.enabled = true; - - //Set flag mentioning that the module is enabling, - //so that immediate calls to the defined callbacks - //for dependencies do not trigger inadvertent load - //with the depCount still being zero. - this.enabling = true; - - //Enable each dependency - each(this.depMaps, bind(this, function (depMap, i) { - var id, mod, handler; - - if (typeof depMap === 'string') { - //Dependency needs to be converted to a depMap - //and wired up to this module. - depMap = makeModuleMap(depMap, - (this.map.isDefine ? this.map : this.map.parentMap), - false, - !this.skipMap); - this.depMaps[i] = depMap; - - handler = getOwn(handlers, depMap.id); - - if (handler) { - this.depExports[i] = handler(this); - return; - } - - this.depCount += 1; - - on(depMap, 'defined', bind(this, function (depExports) { - this.defineDep(i, depExports); - this.check(); - })); - - if (this.errback) { - on(depMap, 'error', bind(this, this.errback)); - } - } - - id = depMap.id; - mod = registry[id]; - - //Skip special modules like 'require', 'exports', 'module' - //Also, don't call enable if it is already enabled, - //important in circular dependency cases. - if (!hasProp(handlers, id) && mod && !mod.enabled) { - context.enable(depMap, this); - } - })); - - //Enable each plugin that is used in - //a dependency - eachProp(this.pluginMaps, bind(this, function (pluginMap) { - var mod = getOwn(registry, pluginMap.id); - if (mod && !mod.enabled) { - context.enable(pluginMap, this); - } - })); - - this.enabling = false; - - this.check(); - }, - - on: function (name, cb) { - var cbs = this.events[name]; - if (!cbs) { - cbs = this.events[name] = []; - } - cbs.push(cb); - }, - - emit: function (name, evt) { - each(this.events[name], function (cb) { - cb(evt); - }); - if (name === 'error') { - //Now that the error handler was triggered, remove - //the listeners, since this broken Module instance - //can stay around for a while in the registry. - delete this.events[name]; - } - } - }; - - function callGetModule(args) { - //Skip modules already defined. - if (!hasProp(defined, args[0])) { - getModule(makeModuleMap(args[0], null, true)).init(args[1], args[2]); - } - } - - function removeListener(node, func, name, ieName) { - //Favor detachEvent because of IE9 - //issue, see attachEvent/addEventListener comment elsewhere - //in this file. - if (node.detachEvent && !isOpera) { - //Probably IE. If not it will throw an error, which will be - //useful to know. - if (ieName) { - node.detachEvent(ieName, func); - } - } else { - node.removeEventListener(name, func, false); - } - } - - /** - * Given an event from a script node, get the requirejs info from it, - * and then removes the event listeners on the node. - * @param {Event} evt - * @returns {Object} - */ - function getScriptData(evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - var node = evt.currentTarget || evt.srcElement; - - //Remove the listeners once here. - removeListener(node, context.onScriptLoad, 'load', 'onreadystatechange'); - removeListener(node, context.onScriptError, 'error'); - - return { - node: node, - id: node && node.getAttribute('data-requiremodule') - }; - } - - function intakeDefines() { - var args; - - //Any defined modules in the global queue, intake them now. - takeGlobalQueue(); - - //Make sure any remaining defQueue items get properly processed. - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - return onError(makeError('mismatch', 'Mismatched anonymous define() module: ' + args[args.length - 1])); - } else { - //args are id, deps, factory. Should be normalized by the - //define() function. - callGetModule(args); - } - } - } - - context = { - config: config, - contextName: contextName, - registry: registry, - defined: defined, - urlFetched: urlFetched, - defQueue: defQueue, - Module: Module, - makeModuleMap: makeModuleMap, - nextTick: req.nextTick, - onError: onError, - - /** - * Set a configuration for the context. - * @param {Object} cfg config object to integrate. - */ - configure: function (cfg) { - //Make sure the baseUrl ends in a slash. - if (cfg.baseUrl) { - if (cfg.baseUrl.charAt(cfg.baseUrl.length - 1) !== '/') { - cfg.baseUrl += '/'; - } - } - - //Save off the paths and packages since they require special processing, - //they are additive. - var pkgs = config.pkgs, - shim = config.shim, - objs = { - paths: true, - config: true, - map: true - }; - - eachProp(cfg, function (value, prop) { - if (objs[prop]) { - if (prop === 'map') { - if (!config.map) { - config.map = {}; - } - mixin(config[prop], value, true, true); - } else { - mixin(config[prop], value, true); - } - } else { - config[prop] = value; - } - }); - - //Merge shim - if (cfg.shim) { - eachProp(cfg.shim, function (value, id) { - //Normalize the structure - if (isArray(value)) { - value = { - deps: value - }; - } - if ((value.exports || value.init) && !value.exportsFn) { - value.exportsFn = context.makeShimExports(value); - } - shim[id] = value; - }); - config.shim = shim; - } - - //Adjust packages if necessary. - if (cfg.packages) { - each(cfg.packages, function (pkgObj) { - var location; - - pkgObj = typeof pkgObj === 'string' ? { name: pkgObj } : pkgObj; - location = pkgObj.location; - - //Create a brand new object on pkgs, since currentPackages can - //be passed in again, and config.pkgs is the internal transformed - //state for all package configs. - pkgs[pkgObj.name] = { - name: pkgObj.name, - location: location || pkgObj.name, - //Remove leading dot in main, so main paths are normalized, - //and remove any trailing .js, since different package - //envs have different conventions: some use a module name, - //some use a file name. - main: (pkgObj.main || 'main') - .replace(currDirRegExp, '') - .replace(jsSuffixRegExp, '') - }; - }); - - //Done with modifications, assing packages back to context config - config.pkgs = pkgs; - } - - //If there are any "waiting to execute" modules in the registry, - //update the maps for them, since their info, like URLs to load, - //may have changed. - eachProp(registry, function (mod, id) { - //If module already has init called, since it is too - //late to modify them, and ignore unnormalized ones - //since they are transient. - if (!mod.inited && !mod.map.unnormalized) { - mod.map = makeModuleMap(id); - } - }); - - //If a deps array or a config callback is specified, then call - //require with those args. This is useful when require is defined as a - //config object before require.js is loaded. - if (cfg.deps || cfg.callback) { - context.require(cfg.deps || [], cfg.callback); - } - }, - - makeShimExports: function (value) { - function fn() { - var ret; - if (value.init) { - ret = value.init.apply(global, arguments); - } - return ret || (value.exports && getGlobal(value.exports)); - } - return fn; - }, - - makeRequire: function (relMap, options) { - options = options || {}; - - function localRequire(deps, callback, errback) { - var id, map, requireMod; - - if (options.enableBuildCallback && callback && isFunction(callback)) { - callback.__requireJsBuild = true; - } - - if (typeof deps === 'string') { - if (isFunction(callback)) { - //Invalid call - return onError(makeError('requireargs', 'Invalid require call'), errback); - } - - //If require|exports|module are requested, get the - //value for them from the special handlers. Caveat: - //this only works while module is being defined. - if (relMap && hasProp(handlers, deps)) { - return handlers[deps](registry[relMap.id]); - } - - //Synchronous access to one module. If require.get is - //available (as in the Node adapter), prefer that. - if (req.get) { - return req.get(context, deps, relMap, localRequire); - } - - //Normalize module name, if it contains . or .. - map = makeModuleMap(deps, relMap, false, true); - id = map.id; - - if (!hasProp(defined, id)) { - return onError(makeError('notloaded', 'Module name "' + - id + - '" has not been loaded yet for context: ' + - contextName + - (relMap ? '' : '. Use require([])'))); - } - return defined[id]; - } - - //Grab defines waiting in the global queue. - intakeDefines(); - - //Mark all the dependencies as needing to be loaded. - context.nextTick(function () { - //Some defines could have been added since the - //require call, collect them. - intakeDefines(); - - requireMod = getModule(makeModuleMap(null, relMap)); - - //Store if map config should be applied to this require - //call for dependencies. - requireMod.skipMap = options.skipMap; - - requireMod.init(deps, callback, errback, { - enabled: true - }); - - checkLoaded(); - }); - - return localRequire; - } - - mixin(localRequire, { - isBrowser: isBrowser, - - /** - * Converts a module name + .extension into an URL path. - * *Requires* the use of a module name. It does not support using - * plain URLs like nameToUrl. - */ - toUrl: function (moduleNamePlusExt) { - var ext, - index = moduleNamePlusExt.lastIndexOf('.'), - segment = moduleNamePlusExt.split('/')[0], - isRelative = segment === '.' || segment === '..'; - - //Have a file extension alias, and it is not the - //dots from a relative path. - if (index !== -1 && (!isRelative || index > 1)) { - ext = moduleNamePlusExt.substring(index, moduleNamePlusExt.length); - moduleNamePlusExt = moduleNamePlusExt.substring(0, index); - } - - return context.nameToUrl(normalize(moduleNamePlusExt, - relMap && relMap.id, true), ext, true); - }, - - defined: function (id) { - return hasProp(defined, makeModuleMap(id, relMap, false, true).id); - }, - - specified: function (id) { - id = makeModuleMap(id, relMap, false, true).id; - return hasProp(defined, id) || hasProp(registry, id); - } - }); - - //Only allow undef on top level require calls - if (!relMap) { - localRequire.undef = function (id) { - //Bind any waiting define() calls to this context, - //fix for #408 - takeGlobalQueue(); - - var map = makeModuleMap(id, relMap, true), - mod = getOwn(registry, id); - - removeScript(id); - - delete defined[id]; - delete urlFetched[map.url]; - delete undefEvents[id]; - - if (mod) { - //Hold on to listeners in case the - //module will be attempted to be reloaded - //using a different config. - if (mod.events.defined) { - undefEvents[id] = mod.events; - } - - cleanRegistry(id); - } - }; - } - - return localRequire; - }, - - /** - * Called to enable a module if it is still in the registry - * awaiting enablement. A second arg, parent, the parent module, - * is passed in for context, when this method is overriden by - * the optimizer. Not shown here to keep code compact. - */ - enable: function (depMap) { - var mod = getOwn(registry, depMap.id); - if (mod) { - getModule(depMap).enable(); - } - }, - - /** - * Internal method used by environment adapters to complete a load event. - * A load event could be a script load or just a load pass from a synchronous - * load call. - * @param {String} moduleName the name of the module to potentially complete. - */ - completeLoad: function (moduleName) { - var found, args, mod, - shim = getOwn(config.shim, moduleName) || {}, - shExports = shim.exports; - - takeGlobalQueue(); - - while (defQueue.length) { - args = defQueue.shift(); - if (args[0] === null) { - args[0] = moduleName; - //If already found an anonymous module and bound it - //to this name, then this is some other anon module - //waiting for its completeLoad to fire. - if (found) { - break; - } - found = true; - } else if (args[0] === moduleName) { - //Found matching define call for this script! - found = true; - } - - callGetModule(args); - } - - //Do this after the cycle of callGetModule in case the result - //of those calls/init calls changes the registry. - mod = getOwn(registry, moduleName); - - if (!found && !hasProp(defined, moduleName) && mod && !mod.inited) { - if (config.enforceDefine && (!shExports || !getGlobal(shExports))) { - if (hasPathFallback(moduleName)) { - return; - } else { - return onError(makeError('nodefine', - 'No define call for ' + moduleName, - null, - [moduleName])); - } - } else { - //A script that does not call define(), so just simulate - //the call for it. - callGetModule([moduleName, (shim.deps || []), shim.exportsFn]); - } - } - - checkLoaded(); - }, - - /** - * Converts a module name to a file path. Supports cases where - * moduleName may actually be just an URL. - * Note that it **does not** call normalize on the moduleName, - * it is assumed to have already been normalized. This is an - * internal API, not a public one. Use toUrl for the public API. - */ - nameToUrl: function (moduleName, ext, skipExt) { - var paths, pkgs, pkg, pkgPath, syms, i, parentModule, url, - parentPath; - - //If a colon is in the URL, it indicates a protocol is used and it is just - //an URL to a file, or if it starts with a slash, contains a query arg (i.e. ?) - //or ends with .js, then assume the user meant to use an url and not a module id. - //The slash is important for protocol-less URLs as well as full paths. - if (req.jsExtRegExp.test(moduleName)) { - //Just a plain path, not module name lookup, so just return it. - //Add extension if it is included. This is a bit wonky, only non-.js things pass - //an extension, this method probably needs to be reworked. - url = moduleName + (ext || ''); - } else { - //A module that needs to be converted to a path. - paths = config.paths; - pkgs = config.pkgs; - - syms = moduleName.split('/'); - //For each module name segment, see if there is a path - //registered for it. Start with most specific name - //and work up from it. - for (i = syms.length; i > 0; i -= 1) { - parentModule = syms.slice(0, i).join('/'); - pkg = getOwn(pkgs, parentModule); - parentPath = getOwn(paths, parentModule); - if (parentPath) { - //If an array, it means there are a few choices, - //Choose the one that is desired - if (isArray(parentPath)) { - parentPath = parentPath[0]; - } - syms.splice(0, i, parentPath); - break; - } else if (pkg) { - //If module name is just the package name, then looking - //for the main module. - if (moduleName === pkg.name) { - pkgPath = pkg.location + '/' + pkg.main; - } else { - pkgPath = pkg.location; - } - syms.splice(0, i, pkgPath); - break; - } - } - - //Join the path parts together, then figure out if baseUrl is needed. - url = syms.join('/'); - url += (ext || (/^data\:|\?/.test(url) || skipExt ? '' : '.js')); - url = (url.charAt(0) === '/' || url.match(/^[\w\+\.\-]+:/) ? '' : config.baseUrl) + url; - } - - return config.urlArgs ? url + - ((url.indexOf('?') === -1 ? '?' : '&') + - config.urlArgs) : url; - }, - - //Delegates to req.load. Broken out as a separate function to - //allow overriding in the optimizer. - load: function (id, url) { - req.load(context, id, url); - }, - - /** - * Executes a module callback function. Broken out as a separate function - * solely to allow the build system to sequence the files in the built - * layer in the right sequence. - * - * @private - */ - execCb: function (name, callback, args, exports) { - return callback.apply(exports, args); - }, - - /** - * callback for script loads, used to check status of loading. - * - * @param {Event} evt the event from the browser for the script - * that was loaded. - */ - onScriptLoad: function (evt) { - //Using currentTarget instead of target for Firefox 2.0's sake. Not - //all old browsers will be supported, but this one was easy enough - //to support and still makes sense. - if (evt.type === 'load' || - (readyRegExp.test((evt.currentTarget || evt.srcElement).readyState))) { - //Reset interactive script so a script node is not held onto for - //to long. - interactiveScript = null; - - //Pull out the name of the module and the context. - var data = getScriptData(evt); - context.completeLoad(data.id); - } - }, - - /** - * Callback for script errors. - */ - onScriptError: function (evt) { - var data = getScriptData(evt); - if (!hasPathFallback(data.id)) { - return onError(makeError('scripterror', 'Script error for: ' + data.id, evt, [data.id])); - } - } - }; - - context.require = context.makeRequire(); - return context; - } - - /** - * Main entry point. - * - * If the only argument to require is a string, then the module that - * is represented by that string is fetched for the appropriate context. - * - * If the first argument is an array, then it will be treated as an array - * of dependency string names to fetch. An optional function callback can - * be specified to execute when all of those dependencies are available. - * - * Make a local req variable to help Caja compliance (it assumes things - * on a require that are not standardized), and to give a short - * name for minification/local scope use. - */ - req = requirejs = function (deps, callback, errback, optional) { - - //Find the right context, use default - var context, config, - contextName = defContextName; - - // Determine if have config object in the call. - if (!isArray(deps) && typeof deps !== 'string') { - // deps is a config object - config = deps; - if (isArray(callback)) { - // Adjust args if there are dependencies - deps = callback; - callback = errback; - errback = optional; - } else { - deps = []; - } - } - - if (config && config.context) { - contextName = config.context; - } - - context = getOwn(contexts, contextName); - if (!context) { - context = contexts[contextName] = req.s.newContext(contextName); - } - - if (config) { - context.configure(config); - } - - return context.require(deps, callback, errback); - }; - - /** - * Support require.config() to make it easier to cooperate with other - * AMD loaders on globally agreed names. - */ - req.config = function (config) { - return req(config); - }; - - /** - * Execute something after the current tick - * of the event loop. Override for other envs - * that have a better solution than setTimeout. - * @param {Function} fn function to execute later. - */ - req.nextTick = typeof setTimeout !== 'undefined' ? function (fn) { - setTimeout(fn, 4); - } : function (fn) { fn(); }; - - /** - * Export require as a global, but only if it does not already exist. - */ - if (!require) { - require = req; - } - - req.version = version; - - //Used to filter out dependencies that are already paths. - req.jsExtRegExp = /^\/|:|\?|\.js$/; - req.isBrowser = isBrowser; - s = req.s = { - contexts: contexts, - newContext: newContext - }; - - //Create default context. - req({}); - - //Exports some context-sensitive methods on global require. - each([ - 'toUrl', - 'undef', - 'defined', - 'specified' - ], function (prop) { - //Reference from contexts instead of early binding to default context, - //so that during builds, the latest instance of the default context - //with its config gets used. - req[prop] = function () { - var ctx = contexts[defContextName]; - return ctx.require[prop].apply(ctx, arguments); - }; - }); - - if (isBrowser) { - head = s.head = document.getElementsByTagName('head')[0]; - //If BASE tag is in play, using appendChild is a problem for IE6. - //When that browser dies, this can be removed. Details in this jQuery bug: - //http://dev.jquery.com/ticket/2709 - baseElement = document.getElementsByTagName('base')[0]; - if (baseElement) { - head = s.head = baseElement.parentNode; - } - } - - /** - * Any errors that require explicitly generates will be passed to this - * function. Intercept/override it if you want custom error handling. - * @param {Error} err the error object. - */ - req.onError = defaultOnError; - - /** - * Creates the node for the load command. Only used in browser envs. - */ - req.createNode = function (config, moduleName, url) { - var node = config.xhtml ? - document.createElementNS('http://www.w3.org/1999/xhtml', 'html:script') : - document.createElement('script'); - node.type = config.scriptType || 'text/javascript'; - node.charset = 'utf-8'; - node.async = true; - return node; - }; - - /** - * Does the request to load a module for the browser case. - * Make this a separate function to allow other environments - * to override it. - * - * @param {Object} context the require context to find state. - * @param {String} moduleName the name of the module. - * @param {Object} url the URL to the module. - */ - req.load = function (context, moduleName, url) { - var config = (context && context.config) || {}, - node; - if (isBrowser) { - //In the browser so use a script tag - node = req.createNode(config, moduleName, url); - - node.setAttribute('data-requirecontext', context.contextName); - node.setAttribute('data-requiremodule', moduleName); - - //Set up load listener. Test attachEvent first because IE9 has - //a subtle issue in its addEventListener and script onload firings - //that do not match the behavior of all other browsers with - //addEventListener support, which fire the onload event for a - //script right after the script execution. See: - //https://connect.microsoft.com/IE/feedback/details/648057/script-onload-event-is-not-fired-immediately-after-script-execution - //UNFORTUNATELY Opera implements attachEvent but does not follow the script - //script execution mode. - if (node.attachEvent && - //Check if node.attachEvent is artificially added by custom script or - //natively supported by browser - //read https://github.com/jrburke/requirejs/issues/187 - //if we can NOT find [native code] then it must NOT natively supported. - //in IE8, node.attachEvent does not have toString() - //Note the test for "[native code" with no closing brace, see: - //https://github.com/jrburke/requirejs/issues/273 - !(node.attachEvent.toString && node.attachEvent.toString().indexOf('[native code') < 0) && - !isOpera) { - //Probably IE. IE (at least 6-8) do not fire - //script onload right after executing the script, so - //we cannot tie the anonymous define call to a name. - //However, IE reports the script as being in 'interactive' - //readyState at the time of the define call. - useInteractive = true; - - node.attachEvent('onreadystatechange', context.onScriptLoad); - //It would be great to add an error handler here to catch - //404s in IE9+. However, onreadystatechange will fire before - //the error handler, so that does not help. If addEventListener - //is used, then IE will fire error before load, but we cannot - //use that pathway given the connect.microsoft.com issue - //mentioned above about not doing the 'script execute, - //then fire the script load event listener before execute - //next script' that other browsers do. - //Best hope: IE10 fixes the issues, - //and then destroys all installs of IE 6-9. - //node.attachEvent('onerror', context.onScriptError); - } else { - node.addEventListener('load', context.onScriptLoad, false); - node.addEventListener('error', context.onScriptError, false); - } - node.src = url; - - //For some cache cases in IE 6-8, the script executes before the end - //of the appendChild execution, so to tie an anonymous define - //call to the module name (which is stored on the node), hold on - //to a reference to this node, but clear after the DOM insertion. - currentlyAddingScript = node; - if (baseElement) { - head.insertBefore(node, baseElement); - } else { - head.appendChild(node); - } - currentlyAddingScript = null; - - return node; - } else if (isWebWorker) { - try { - //In a web worker, use importScripts. This is not a very - //efficient use of importScripts, importScripts will block until - //its script is downloaded and evaluated. However, if web workers - //are in play, the expectation that a build has been done so that - //only one script needs to be loaded anyway. This may need to be - //reevaluated if other use cases become common. - importScripts(url); - - //Account for anonymous modules - context.completeLoad(moduleName); - } catch (e) { - context.onError(makeError('importscripts', - 'importScripts failed for ' + - moduleName + ' at ' + url, - e, - [moduleName])); - } - } - }; - - function getInteractiveScript() { - if (interactiveScript && interactiveScript.readyState === 'interactive') { - return interactiveScript; - } - - eachReverse(scripts(), function (script) { - if (script.readyState === 'interactive') { - return (interactiveScript = script); - } - }); - return interactiveScript; - } - - //Look for a data-main script attribute, which could also adjust the baseUrl. - if (isBrowser && !cfg.skipDataMain) { - //Figure out baseUrl. Get it from the script tag with require.js in it. - eachReverse(scripts(), function (script) { - //Set the 'head' where we can append children by - //using the script's parent. - if (!head) { - head = script.parentNode; - } - - //Look for a data-main attribute to set main script for the page - //to load. If it is there, the path to data main becomes the - //baseUrl, if it is not already set. - dataMain = script.getAttribute('data-main'); - if (dataMain) { - //Preserve dataMain in case it is a path (i.e. contains '?') - mainScript = dataMain; - - //Set final baseUrl if there is not already an explicit one. - if (!cfg.baseUrl) { - //Pull off the directory of data-main for use as the - //baseUrl. - src = mainScript.split('/'); - mainScript = src.pop(); - subPath = src.length ? src.join('/') + '/' : './'; - - cfg.baseUrl = subPath; - } - - //Strip off any trailing .js since mainScript is now - //like a module name. - mainScript = mainScript.replace(jsSuffixRegExp, ''); - - //If mainScript is still a path, fall back to dataMain - if (req.jsExtRegExp.test(mainScript)) { - mainScript = dataMain; - } - - //Put the data-main script in the files to load. - cfg.deps = cfg.deps ? cfg.deps.concat(mainScript) : [mainScript]; - - return true; - } - }); - } - - /** - * The function that handles definitions of modules. Differs from - * require() in that a string for the module should be the first argument, - * and the function to execute after dependencies are loaded should - * return a value to define the module corresponding to the first argument's - * name. - */ - define = function (name, deps, callback) { - var node, context; - - //Allow for anonymous modules - if (typeof name !== 'string') { - //Adjust args appropriately - callback = deps; - deps = name; - name = null; - } - - //This module may not have dependencies - if (!isArray(deps)) { - callback = deps; - deps = null; - } - - //If no name, and callback is a function, then figure out if it a - //CommonJS thing with dependencies. - if (!deps && isFunction(callback)) { - deps = []; - //Remove comments from the callback string, - //look for require calls, and pull them into the dependencies, - //but only if there are function args. - if (callback.length) { - callback - .toString() - .replace(commentRegExp, '') - .replace(cjsRequireRegExp, function (match, dep) { - deps.push(dep); - }); - - //May be a CommonJS thing even without require calls, but still - //could use exports, and module. Avoid doing exports and module - //work though if it just needs require. - //REQUIRES the function to expect the CommonJS variables in the - //order listed below. - deps = (callback.length === 1 ? ['require'] : ['require', 'exports', 'module']).concat(deps); - } - } - - //If in IE 6-8 and hit an anonymous define() call, do the interactive - //work. - if (useInteractive) { - node = currentlyAddingScript || getInteractiveScript(); - if (node) { - if (!name) { - name = node.getAttribute('data-requiremodule'); - } - context = contexts[node.getAttribute('data-requirecontext')]; - } - } - - //Always save off evaluating the def call until the script onload handler. - //This allows multiple modules to be in a file without prematurely - //tracing dependencies, and allows for anonymous module support, - //where the module name is not known until the script onload event - //occurs. If no context, use the global queue, and get it processed - //in the onscript load callback. - (context ? context.defQueue : globalDefQueue).push([name, deps, callback]); - }; - - define.amd = { - jQuery: true - }; - - - /** - * Executes the text. Normally just uses eval, but can be modified - * to use a better, environment-specific call. Only used for transpiling - * loader plugins, not for plain JS modules. - * @param {String} text the text to execute/evaluate. - */ - req.exec = function (text) { - /*jslint evil: true */ - return eval(text); - }; - - //Set up with config info. - req(cfg); -}(this));